Packet
A demuxed packet the caller owns.
A player queues packets independently of its decoders, so a packet must outlive the read that produced it. The compressed payload remains reference counted; taking or copying ownership is an O(1) reference operation, not a copy of the compressed bytes.
Close every packet exactly once. Reading any property, copying it or sending it after close throws rather than resolving memory or a token that the allocator is free to reuse.
A demuxed packet the caller owns.
A player queues packets independently of its decoders, so a packet must outlive the read that produced it. The compressed payload remains reference counted; taking or copying ownership is an O(1) reference operation, not a copy of the compressed bytes.
Close every packet exactly once. Reading any property, copying it or sending it after close throws rather than resolving memory or a token that the allocator is free to reuse.
A demuxed packet the caller owns.
A player has to queue packets: it reads ahead of its decoders so a slow disk or a network stall does not stop playback. So a packet must outlive the read that produced it, which the batch API's packets deliberately do not.
Taking ownership costs nothing. The payload is reference counted inside FFmpeg and moved rather than copied, so this is a pointer swap and not a memcpy of the compressed data.
Close it exactly once. An unclosed packet leaks its buffer, and reading anything off it after that throws rather than dereferencing memory the allocator has taken back.
A demuxed packet the caller owns.
A player queues packets independently of its decoders, so a packet must outlive the read that produced it. The compressed payload remains reference counted; taking or copying ownership is an O(1) reference operation, not a copy of the compressed bytes.
Close every packet exactly once. Reading any property, copying it or sending it after close throws rather than resolving memory or a token that the allocator is free to reuse.
A demuxed packet the caller owns.
A player queues packets independently of its decoders, so a packet must outlive the read that produced it. The compressed payload remains reference counted; taking or copying ownership is an O(1) reference operation, not a copy of the compressed bytes.
Close every packet exactly once. Reading any property, copying it or sending it after close throws rather than resolving memory or a token that the allocator is free to reuse.
Properties
Byte offset in the container, or -1 when unknown.
Byte offset in the container, or -1 when unknown.
Byte offset in the container, or -1. Useful for progress when timestamps are broken.
Byte offset in the container, or -1 when unknown.
Byte offset in the container, or -1 when unknown.
Decode timestamp in timeBase units, or FrameInfo.NOPTS when absent.
Decode timestamp in timeBase units, or FrameInfo.NOPTS when absent.
Decode timestamp in timeBase units, or FrameInfo.NOPTS when absent.
Decode timestamp in timeBase units, or FrameInfo.NOPTS when absent.
Decode timestamp in timeBase units, or FrameInfo.NOPTS when absent.
dts converted to microseconds on the stream's own timeline, or null when absent.
dts converted to microseconds on the stream's own timeline, or null when absent.
dts converted to microseconds on the stream's own timeline. Null when there is no dts.
dts converted to microseconds on the stream's own timeline, or null when absent.
Duration in timeBase units. 0 when unknown, which is common and not an error.
duration converted to microseconds, or null when the container supplied none or one that is not positive.
duration converted to microseconds, or null when the container supplied none or one that is not positive.
duration converted to microseconds. Null when the container gave none.
duration converted to microseconds, or null when the container supplied none or one that is not positive.
duration converted to microseconds, or null when the container supplied none or one that is not positive.
The container's tags as they stand from this packet on, present only on the first packet a read hands out after FFmpeg applied new container tags during playback, and null on every other packet. A station's ICY title through FFmpeg's own http, an ID3 tag between ADTS frames and an FLV onMetaData arrive this way. It is the whole new set, which MediaSource.metadata holds from the same read on. A copy carries it too.
The container's tags as they stand from this packet on, present only on the first packet a read hands out after FFmpeg applied new container tags during playback, and null on every other packet. A station's ICY title through FFmpeg's own http, an ID3 tag between ADTS frames and an FLV onMetaData arrive this way. It is the whole new set, which MediaSource.metadata holds from the same read on. A copy carries it too.
The container's tags as they stand from this packet on, present only on the first packet a read hands out after FFmpeg applied new container tags during playback, and null on every other packet. A station's ICY title through FFmpeg's own http, an ID3 tag between ADTS frames and an FLV onMetaData arrive this way. It is the whole new set, which MediaSource.metadata holds from the same read on. A copy carries it too.
The container's tags as they stand from this packet on, present only on the first packet a read hands out after FFmpeg applied new container tags during playback, and null on every other packet. A station's ICY title through FFmpeg's own http, an ID3 tag between ADTS frames and an FLV onMetaData arrive this way. It is the whole new set, which MediaSource.metadata holds from the same read on. A copy carries it too.
The container's tags as they stand from this packet on, present only on the first packet a read hands out after FFmpeg applied new container tags during playback, and null on every other packet. A station's ICY title through FFmpeg's own http, an ID3 tag between ADTS frames and an FLV onMetaData arrive this way. It is the whole new set, which MediaSource.metadata holds from the same read on. A copy carries it too.
The source's MediaSource.programs as they stand from this packet on, present only on the first packet a read hands out after FFmpeg changed them, and null on every other packet (#151). A stream the container stopped carrying has left its programme here. A copy carries it too.
The source's MediaSource.programs as they stand from this packet on, present only on the first packet a read hands out after FFmpeg changed them, and null on every other packet (#151). A stream the container stopped carrying has left its programme here. A copy carries it too.
The source's MediaSource.programs as they stand from this packet on, present only on the first packet a read hands out after FFmpeg changed them, and null on every other packet (#151). A stream the container stopped carrying has left its programme here. A copy carries it too.
The source's MediaSource.programs as they stand from this packet on, present only on the first packet a read hands out after FFmpeg changed them, and null on every other packet (#151). A stream the container stopped carrying has left its programme here. A copy carries it too.
The source's MediaSource.programs as they stand from this packet on, present only on the first packet a read hands out after FFmpeg changed them, and null on every other packet (#151). A stream the container stopped carrying has left its programme here. A copy carries it too.
The source's MediaSource.streams as they stand from this packet on, present only on the first packet a read hands out after FFmpeg added a stream or an entry was read again at its stream's first packet, and null on every other packet (#151). It is the whole list, so a stream is new when its index is past the end of the list before, and corrected when its entry differs. A change that a decode flow read, or that the reader before this one read and never handed a packet out after, rides this reader's first packet.
The source's MediaSource.streams as they stand from this packet on, present only on the first packet a read hands out after FFmpeg added a stream or an entry was read again at its stream's first packet, and null on every other packet (#151). It is the whole list, so a stream is new when its index is past the end of the list before, and corrected when its entry differs. A change that a decode flow read, or that the reader before this one read and never handed a packet out after, rides this reader's first packet.
The source's MediaSource.streams as they stand from this packet on, present only on the first packet a read hands out after FFmpeg added a stream or an entry was read again at its stream's first packet, and null on every other packet (#151). It is the whole list, so a stream is new when its index is past the end of the list before, and corrected when its entry differs. A change that a decode flow read, or that the reader before this one read and never handed a packet out after, rides this reader's first packet.
The source's MediaSource.streams as they stand from this packet on, present only on the first packet a read hands out after FFmpeg added a stream or an entry was read again at its stream's first packet, and null on every other packet (#151). It is the whole list, so a stream is new when its index is past the end of the list before, and corrected when its entry differs. A change that a decode flow read, or that the reader before this one read and never handed a packet out after, rides this reader's first packet.
The source's MediaSource.streams as they stand from this packet on, present only on the first packet a read hands out after FFmpeg added a stream or an entry was read again at its stream's first packet, and null on every other packet (#151). It is the whole list, so a stream is new when its index is past the end of the list before, and corrected when its entry differs. A change that a decode flow read, or that the reader before this one read and never handed a packet out after, rides this reader's first packet.
This packet's stream's tags as they stand from this packet on, present only on the first packet of that stream a read hands out after FFmpeg applied new tags to it during playback, and null on every other packet. The next song of a chained Ogg brings its comments this way, as the whole set, without the keys of the song before it, and a timed ID3 packet of an MPEG-TS or HLS data stream carries what it states on itself, so read that data stream to receive them. StreamInfo.metadata keeps what the stream said at open. A copy carries it too.
This packet's stream's tags as they stand from this packet on, present only on the first packet of that stream a read hands out after FFmpeg applied new tags to it during playback, and null on every other packet. The next song of a chained Ogg brings its comments this way, as the whole set, without the keys of the song before it, and a timed ID3 packet of an MPEG-TS or HLS data stream carries what it states on itself, so read that data stream to receive them. StreamInfo.metadata keeps what the stream said at open. A copy carries it too.
This packet's stream's tags as they stand from this packet on, present only on the first packet of that stream a read hands out after FFmpeg applied new tags to it during playback, and null on every other packet. The next song of a chained Ogg brings its comments this way, as the whole set, without the keys of the song before it, and a timed ID3 packet of an MPEG-TS or HLS data stream carries what it states on itself, so read that data stream to receive them. StreamInfo.metadata keeps what the stream said at open. A copy carries it too.
This packet's stream's tags as they stand from this packet on, present only on the first packet of that stream a read hands out after FFmpeg applied new tags to it during playback, and null on every other packet. The next song of a chained Ogg brings its comments this way, as the whole set, without the keys of the song before it, and a timed ID3 packet of an MPEG-TS or HLS data stream carries what it states on itself, so read that data stream to receive them. StreamInfo.metadata keeps what the stream said at open. A copy carries it too.
This packet's stream's tags as they stand from this packet on, present only on the first packet of that stream a read hands out after FFmpeg applied new tags to it during playback, and null on every other packet. The next song of a chained Ogg brings its comments this way, as the whole set, without the keys of the song before it, and a timed ID3 packet of an MPEG-TS or HLS data stream carries what it states on itself, so read that data stream to receive them. StreamInfo.metadata keeps what the stream said at open. A copy carries it too.
Presentation timestamp in timeBase units, or FrameInfo.NOPTS when absent.
Presentation timestamp in timeBase units, or FrameInfo.NOPTS when absent.
Presentation timestamp in timeBase units, or FrameInfo.NOPTS when the container gave none.
Presentation timestamp in timeBase units, or FrameInfo.NOPTS when absent.
Presentation timestamp in timeBase units, or FrameInfo.NOPTS when absent.
pts converted to microseconds on the stream's own timeline, or null when absent.
pts converted to microseconds on the stream's own timeline, or null when absent.
pts converted to microseconds on the stream's own timeline. Null when there is no pts.
pts converted to microseconds on the stream's own timeline, or null when absent.
The stream's time base, so the caller can convert pts without looking the stream up.
Functions
Returns a separately owned O(1) reference to this packet's compressed payload and metadata. The two packets may be closed independently, in either order.
Returns a separately owned O(1) reference to this packet's compressed payload and metadata. The two packets may be closed independently, in either order.
Returns a separately owned O(1) reference to this packet's compressed payload and metadata. The two packets may be closed independently, in either order.
Returns a separately owned O(1) reference to this packet's compressed payload and metadata. The two packets may be closed independently, in either order.
The packet's compressed payload, copied. For TEXT subtitle streams this is the cue body itself, which is why a subtitle decoder can be pure Kotlin. A copy per call: subtitle packets are tiny and rare; never call this per video packet.
The packet's compressed payload, copied. For TEXT subtitle streams this is the cue body itself, which is why a subtitle decoder can be pure Kotlin. A copy per call: subtitle packets are tiny and rare; never call this per video packet.
The packet's compressed payload, copied. For TEXT subtitle streams this is the cue body itself, which is why a subtitle decoder can be pure Kotlin. A copy per call: subtitle packets are tiny and rare; never call this per video packet.
The packet's compressed payload, copied. For TEXT subtitle streams this is the cue body itself, which is why a subtitle decoder can be pure Kotlin. A copy per call: subtitle packets are tiny and rare; never call this per video packet.