PacketReader
Reads owned packets from one MediaSource cursor under the caller's control. This is the demuxing half of a player, kept separate from decoding so audio and video decoding can proceed independently and a seek can replace the caller's queued generation explicitly.
Reading, seeking and closing must be serialized by the caller. One reader may be open for a source at a time, and while it is open the source's batch decode and direct seek APIs are refused. Closing restores the source's default stream selection.
Reads owned packets from one MediaSource cursor under the caller's control. This is the demuxing half of a player, kept separate from decoding so audio and video decoding can proceed independently and a seek can replace the caller's queued generation explicitly.
Reading, seeking and closing must be serialized by the caller. One reader may be open for a source at a time, and while it is open the source's batch decode and direct seek APIs are refused. Closing restores the source's default stream selection.
Reads packets from a container, one at a time, under the caller's control.
This is the demuxing half of a player, separated from decoding. The batch API fuses the two, which is right for transcoding and wrong for playback: a player needs audio and video decoding to proceed independently, so that a slow video decoder cannot stop the audio clock, and it needs to seek while all of that is running.
One reader per MediaSource. Reading, seeking and closing must all happen from one coroutine, or be serialised by the caller. libavformat's context is a single cursor and is not thread safe.
Reads owned packets from one MediaSource cursor under the caller's control. This is the demuxing half of a player, kept separate from decoding so audio and video decoding can proceed independently and a seek can replace the caller's queued generation explicitly.
Reading, seeking and closing must be serialized by the caller. One reader may be open for a source at a time, and while it is open the source's batch decode and direct seek APIs are refused. Closing restores the source's default stream selection.
Reads owned packets from one MediaSource cursor under the caller's control. This is the demuxing half of a player, kept separate from decoding so audio and video decoding can proceed independently and a seek can replace the caller's queued generation explicitly.
Reading, seeking and closing must be serialized by the caller. One reader may be open for a source at a time, and while it is open the source's batch decode and direct seek APIs are refused. Closing restores the source's default stream selection.
Functions
Returns the next selected-stream packet, or null at container EOF. The returned packet is owned by the caller. Null is the signal to begin decoder drain by sending a null packet.
Returns the next selected-stream packet, or null at container EOF. The returned packet is owned by the caller. Null is the signal to begin decoder drain by sending a null packet.
Returns the next selected-stream packet, or null at container EOF. The returned packet is owned by the caller. Null is the signal to begin decoder drain by sending a null packet.
Changes which streams read delivers without reopening this reader or moving its demuxer cursor.
Changes which streams read delivers without reopening this reader or moving its demuxer cursor.
Changes which streams read delivers without reopening this reader or moving its demuxer cursor.
Changes which streams read delivers without reopening this reader or moving its demuxer cursor.
Changes which streams read delivers without reopening this reader or moving its demuxer cursor.
Moves the demuxer cursor without flushing decoders or clearing caller-owned queues. The caller must discard the old packet/frame generation and flush every decoder itself.
Moves the demuxer cursor without flushing decoders or clearing caller-owned queues. The caller must discard the old packet/frame generation and flush every decoder itself.
Moves the read cursor.
Moves the demuxer cursor without flushing decoders or clearing caller-owned queues. The caller must discard the old packet/frame generation and flush every decoder itself.
Moves the demuxer cursor without flushing decoders or clearing caller-owned queues. The caller must discard the old packet/frame generation and flush every decoder itself.