Read data from a queue of sources, with support for looping. All sources must share the same audio format.
Variables: | audio_format – Required audio format for queued sources. |
---|
Constructor:
Methods:
get_audio_data(bytes) Get next audio packet. get_current_source() get_next_video_frame() Get the next video frame. get_next_video_timestamp() Get the timestamp of the next video frame. has_next() next([immediate]) next_source([immediate]) queue(source) seek(time) translate_timestamp(timestamp) Get source-relative timestamp for the audio player’s timestamp.
Attributes:
loop Loop the current source indefinitely or until next is called.
Get next audio packet.
Parameters: | bytes (int) – Hint for preferred size of audio packet; may be ignored. |
---|---|
Return type: | AudioData |
Returns: | Audio data, or None if there is no more data. |
Get the next video frame.
Video frames may share memory: the previous frame may be invalidated or corrupted when this method is called unless the application has made a copy of it.
Return type: | pyglet.image.AbstractImage |
---|---|
Returns: | The next video frame image, or None if the video frame could not be decoded or there are no more video frames. |
Get the timestamp of the next video frame.
Return type: | float |
---|---|
Returns: | The next timestamp, or None if there are no more video frames. |
Warning
Deprecated. Use next_source instead.
Get source-relative timestamp for the audio player’s timestamp.