mirror of
https://github.com/godotengine/godot-docs-l10n.git
synced 2026-01-04 10:09:56 +03:00
244 lines
16 KiB
ReStructuredText
244 lines
16 KiB
ReStructuredText
:github_url: hide
|
|
|
|
.. DO NOT EDIT THIS FILE!!!
|
|
.. Generated automatically from Godot engine sources.
|
|
.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
|
|
.. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/VideoStreamPlayback.xml.
|
|
|
|
.. _class_VideoStreamPlayback:
|
|
|
|
VideoStreamPlayback
|
|
===================
|
|
|
|
**Hereda:** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
|
|
|
Clase interna utilizada por :ref:`VideoStream<class_VideoStream>` para gestionar el estado de reproducción cuando se reproduce desde un :ref:`VideoStreamPlayer<class_VideoStreamPlayer>`.
|
|
|
|
.. rst-class:: classref-introduction-group
|
|
|
|
Descripción
|
|
----------------------
|
|
|
|
Esta clase está pensada para ser sobreescrita por extensiones de decodificadores de vídeo con implementaciones personalizadas de :ref:`VideoStream<class_VideoStream>`.
|
|
|
|
.. rst-class:: classref-reftable-group
|
|
|
|
Métodos
|
|
--------------
|
|
|
|
.. table::
|
|
:widths: auto
|
|
|
|
+-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`int<class_int>` | :ref:`_get_channels<class_VideoStreamPlayback_private_method__get_channels>`\ (\ ) |virtual| |const| |
|
|
+-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`float<class_float>` | :ref:`_get_length<class_VideoStreamPlayback_private_method__get_length>`\ (\ ) |virtual| |const| |
|
|
+-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`int<class_int>` | :ref:`_get_mix_rate<class_VideoStreamPlayback_private_method__get_mix_rate>`\ (\ ) |virtual| |const| |
|
|
+-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`float<class_float>` | :ref:`_get_playback_position<class_VideoStreamPlayback_private_method__get_playback_position>`\ (\ ) |virtual| |const| |
|
|
+-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`Texture2D<class_Texture2D>` | :ref:`_get_texture<class_VideoStreamPlayback_private_method__get_texture>`\ (\ ) |virtual| |const| |
|
|
+-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`bool<class_bool>` | :ref:`_is_paused<class_VideoStreamPlayback_private_method__is_paused>`\ (\ ) |virtual| |const| |
|
|
+-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`bool<class_bool>` | :ref:`_is_playing<class_VideoStreamPlayback_private_method__is_playing>`\ (\ ) |virtual| |const| |
|
|
+-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`_play<class_VideoStreamPlayback_private_method__play>`\ (\ ) |virtual| |
|
|
+-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`_seek<class_VideoStreamPlayback_private_method__seek>`\ (\ time\: :ref:`float<class_float>`\ ) |virtual| |
|
|
+-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`_set_audio_track<class_VideoStreamPlayback_private_method__set_audio_track>`\ (\ idx\: :ref:`int<class_int>`\ ) |virtual| |
|
|
+-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`_set_paused<class_VideoStreamPlayback_private_method__set_paused>`\ (\ paused\: :ref:`bool<class_bool>`\ ) |virtual| |
|
|
+-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`_stop<class_VideoStreamPlayback_private_method__stop>`\ (\ ) |virtual| |
|
|
+-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`_update<class_VideoStreamPlayback_private_method__update>`\ (\ delta\: :ref:`float<class_float>`\ ) |virtual| |required| |
|
|
+-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`int<class_int>` | :ref:`mix_audio<class_VideoStreamPlayback_method_mix_audio>`\ (\ num_frames\: :ref:`int<class_int>`, buffer\: :ref:`PackedFloat32Array<class_PackedFloat32Array>` = PackedFloat32Array(), offset\: :ref:`int<class_int>` = 0\ ) |
|
|
+-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
|
.. rst-class:: classref-section-separator
|
|
|
|
----
|
|
|
|
.. rst-class:: classref-descriptions-group
|
|
|
|
Descripciones de Métodos
|
|
------------------------------------------------
|
|
|
|
.. _class_VideoStreamPlayback_private_method__get_channels:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`int<class_int>` **_get_channels**\ (\ ) |virtual| |const| :ref:`🔗<class_VideoStreamPlayback_private_method__get_channels>`
|
|
|
|
Devuelve el número de canales de audio.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_VideoStreamPlayback_private_method__get_length:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`float<class_float>` **_get_length**\ (\ ) |virtual| |const| :ref:`🔗<class_VideoStreamPlayback_private_method__get_length>`
|
|
|
|
Devuelve la duración del vídeo en segundos, si se conoce, o 0 si se desconoce.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_VideoStreamPlayback_private_method__get_mix_rate:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`int<class_int>` **_get_mix_rate**\ (\ ) |virtual| |const| :ref:`🔗<class_VideoStreamPlayback_private_method__get_mix_rate>`
|
|
|
|
Devuelve la frecuencia de muestreo de audio utilizada para la mezcla.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_VideoStreamPlayback_private_method__get_playback_position:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`float<class_float>` **_get_playback_position**\ (\ ) |virtual| |const| :ref:`🔗<class_VideoStreamPlayback_private_method__get_playback_position>`
|
|
|
|
Devuelve la marca de tiempo de la reproducción actual. Llamado en respuesta al getter :ref:`VideoStreamPlayer.stream_position<class_VideoStreamPlayer_property_stream_position>`.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_VideoStreamPlayback_private_method__get_texture:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`Texture2D<class_Texture2D>` **_get_texture**\ (\ ) |virtual| |const| :ref:`🔗<class_VideoStreamPlayback_private_method__get_texture>`
|
|
|
|
Asigna una :ref:`Texture2D<class_Texture2D>` en la que se dibujarán los fotogramas de vídeo decodificados.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_VideoStreamPlayback_private_method__is_paused:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`bool<class_bool>` **_is_paused**\ (\ ) |virtual| |const| :ref:`🔗<class_VideoStreamPlayback_private_method__is_paused>`
|
|
|
|
Devuelve el estado de pausa, según lo establecido por :ref:`_set_paused()<class_VideoStreamPlayback_private_method__set_paused>`.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_VideoStreamPlayback_private_method__is_playing:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`bool<class_bool>` **_is_playing**\ (\ ) |virtual| |const| :ref:`🔗<class_VideoStreamPlayback_private_method__is_playing>`
|
|
|
|
Devuelve el estado de reproducción, determinado por las llamadas a :ref:`_play()<class_VideoStreamPlayback_private_method__play>` y :ref:`_stop()<class_VideoStreamPlayback_private_method__stop>`.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_VideoStreamPlayback_private_method__play:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **_play**\ (\ ) |virtual| :ref:`🔗<class_VideoStreamPlayback_private_method__play>`
|
|
|
|
Se llama en respuesta a :ref:`VideoStreamPlayer.autoplay<class_VideoStreamPlayer_property_autoplay>` o :ref:`VideoStreamPlayer.play()<class_VideoStreamPlayer_method_play>`. Ten en cuenta que la reproducción manual también puede invocar :ref:`_stop()<class_VideoStreamPlayback_private_method__stop>` varias veces antes de que se llame a este método. :ref:`_is_playing()<class_VideoStreamPlayback_private_method__is_playing>` debe devolver ``true`` una vez que se está reproduciendo.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_VideoStreamPlayback_private_method__seek:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **_seek**\ (\ time\: :ref:`float<class_float>`\ ) |virtual| :ref:`🔗<class_VideoStreamPlayback_private_method__seek>`
|
|
|
|
Salta a los ``time`` segundos. Se llama en respuesta al setter :ref:`VideoStreamPlayer.stream_position<class_VideoStreamPlayer_property_stream_position>`.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_VideoStreamPlayback_private_method__set_audio_track:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **_set_audio_track**\ (\ idx\: :ref:`int<class_int>`\ ) |virtual| :ref:`🔗<class_VideoStreamPlayback_private_method__set_audio_track>`
|
|
|
|
Selecciona la pista de audio ``idx``. Se llama cuando se inicia la reproducción y en respuesta al setter de :ref:`VideoStreamPlayer.audio_track<class_VideoStreamPlayer_property_audio_track>`.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_VideoStreamPlayback_private_method__set_paused:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **_set_paused**\ (\ paused\: :ref:`bool<class_bool>`\ ) |virtual| :ref:`🔗<class_VideoStreamPlayback_private_method__set_paused>`
|
|
|
|
Establece el estado de pausa de la reproducción de vídeo. :ref:`_is_paused()<class_VideoStreamPlayback_private_method__is_paused>` debe devolver ``paused``. Se llama en respuesta al setter de :ref:`VideoStreamPlayer.paused<class_VideoStreamPlayer_property_paused>`.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_VideoStreamPlayback_private_method__stop:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **_stop**\ (\ ) |virtual| :ref:`🔗<class_VideoStreamPlayback_private_method__stop>`
|
|
|
|
Detiene la reproducción. Se puede llamar varias veces antes de :ref:`_play()<class_VideoStreamPlayback_private_method__play>`, o en respuesta a :ref:`VideoStreamPlayer.stop()<class_VideoStreamPlayer_method_stop>`. :ref:`_is_playing()<class_VideoStreamPlayback_private_method__is_playing>` debe devolver ``false`` una vez detenido.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_VideoStreamPlayback_private_method__update:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **_update**\ (\ delta\: :ref:`float<class_float>`\ ) |virtual| |required| :ref:`🔗<class_VideoStreamPlayback_private_method__update>`
|
|
|
|
Avanza la reproducción de vídeo durante ``delta`` segundos. Se llama cada fotograma mientras :ref:`_is_paused()<class_VideoStreamPlayback_private_method__is_paused>` y :ref:`_is_playing()<class_VideoStreamPlayback_private_method__is_playing>` devuelvan ``true``.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_VideoStreamPlayback_method_mix_audio:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`int<class_int>` **mix_audio**\ (\ num_frames\: :ref:`int<class_int>`, buffer\: :ref:`PackedFloat32Array<class_PackedFloat32Array>` = PackedFloat32Array(), offset\: :ref:`int<class_int>` = 0\ ) :ref:`🔗<class_VideoStreamPlayback_method_mix_audio>`
|
|
|
|
Renderiza ``num_frames`` fotogramas de audio (de :ref:`_get_channels()<class_VideoStreamPlayback_private_method__get_channels>` flotantes cada uno) desde ``buffer``, empezando por el índice ``offset`` del array. Devuelve el número de fotogramas de audio renderizados, o -1 en caso de error.
|
|
|
|
.. |virtual| replace:: :abbr:`virtual (Normalmente, este método debería ser sobreescrito por el usuario para que tenga algún efecto.)`
|
|
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
|
|
.. |const| replace:: :abbr:`const (Este método no tiene efectos secundarios. No modifica ninguna de las variables miembro de la instancia.)`
|
|
.. |vararg| replace:: :abbr:`vararg (Este método permite agregar cualquier número de argumentos después de los descritos aquí.)`
|
|
.. |constructor| replace:: :abbr:`constructor (Este método se utiliza para construir un tipo.)`
|
|
.. |static| replace:: :abbr:`static (Este método no necesita una instancia para ser llamado, por lo que puede llamarse directamente utilizando el nombre de la clase.)`
|
|
.. |operator| replace:: :abbr:`operator (Este método describe un operador válido para usar con este tipo como operando izquierdo.)`
|
|
.. |bitfield| replace:: :abbr:`BitField (Este valor es un entero compuesto como una máscara de bits de las siguientes banderas.)`
|
|
.. |void| replace:: :abbr:`void (Sin valor de retorno.)`
|