AVStream

Stream structure. New fields can be added to the end with minor version bumps. Removal, reordering and changes to existing fields require a major version bump. sizeof(AVStream) must not be used outside libav*.

Members

Structs

_Anonymous_0
struct _Anonymous_0

Those are used for average framerate estimation.

Variables

attached_pic
AVPacket attached_pic;

For streams with AV_DISPOSITION_ATTACHED_PIC disposition, this packet will contain the attached picture.

avg_frame_rate
AVRational avg_frame_rate;

Average framerate

codec
AVCodecContext* codec;

@deprecated use the codecpar struct instead

codec_info_nb_frames
int codec_info_nb_frames;

Number of frames that have been demuxed during avformat_find_stream_info()

codecpar
AVCodecParameters* codecpar;

Codec parameters associated with this stream. Allocated and freed by libavformat in avformat_new_stream() and avformat_free_context() respectively.

cur_dts
long cur_dts;
Undocumented in source.
discard
AVDiscard discard;

< Selects which packets can be discarded at will and do not need to be demuxed.

display_aspect_ratio
AVRational display_aspect_ratio;

display aspect ratio (0 if unknown) - encoding: unused - decoding: Set by libavformat to calculate sample_aspect_ratio internally

disposition
int disposition;

< AV_DISPOSITION_* bit field

dts_misordered
ubyte dts_misordered;
Undocumented in source.
dts_ordered
ubyte dts_ordered;
Undocumented in source.
duration
long duration;

Decoding: duration of the stream, in stream time base. If a source file does not specify a duration, but does specify a bitrate, this value will be estimated from bitrate and file size.

event_flags
int event_flags;

Flags for the user to detect events happening on the stream. Flags must be cleared by the user once the event has been handled. A combination of AVSTREAM_EVENT_FLAG_*.

first_discard_sample
long first_discard_sample;

If not 0, the first audio sample that should be discarded from the stream. This is broken by design (needs global sample count), but can't be avoided for broken by design formats such as mp3 with ad-hoc gapless audio support.

first_dts
long first_dts;

Timestamp corresponding to the last dts sync point.

id
int id;

Format-specific stream ID. decoding: set by libavformat encoding: set by the user, replaced by libavformat if left unset

index
int index;

< stream index in AVFormatContext

index_entries
AVIndexEntry* index_entries;

< Only used if the format does not support seeking natively.

index_entries_allocated_size
uint index_entries_allocated_size;
Undocumented in source.
info
_Anonymous_0* info;
Undocumented in source.
inject_global_side_data
int inject_global_side_data;

Internal data to inject global side data

interleaver_chunk_duration
long interleaver_chunk_duration;
Undocumented in source.
interleaver_chunk_size
long interleaver_chunk_size;
Undocumented in source.
internal
AVStreamInternal* internal;

An opaque field for libavformat internal usage. Must not be accessed in any way by callers.

last_IP_duration
int last_IP_duration;
Undocumented in source.
last_IP_pts
long last_IP_pts;
Undocumented in source.
last_discard_sample
long last_discard_sample;

The sample after last sample that is intended to be discarded after first_discard_sample. Works on frame boundaries only. Used to prevent early EOF if the gapless info is broken (considered concatenated mp3s).

last_dts_for_order_check
long last_dts_for_order_check;

Internal data to analyze DTS and detect faulty mpeg streams

last_in_packet_buffer
AVPacketList* last_in_packet_buffer;

last packet in packet_buffer for this stream when muxing.

metadata
AVDictionary* metadata;
Undocumented in source.
mux_ts_offset
long mux_ts_offset;

Timestamp offset added to timestamps before muxing NOT PART OF PUBLIC API

nb_decoded_frames
int nb_decoded_frames;

Number of internally decoded frames, used internally in libavformat, do not access its lifetime differs from info which is why it is not in that structure.

nb_frames
long nb_frames;

< number of frames in this stream if known or 0

nb_index_entries
int nb_index_entries;
Undocumented in source.
nb_side_data
int nb_side_data;

The number of elements in the AVStream.side_data array.

need_parsing
AVStreamParseType need_parsing;
Undocumented in source.
parser
AVCodecParserContext* parser;
Undocumented in source.
pmt_stream_idx
int pmt_stream_idx;
Undocumented in source.
pmt_version
int pmt_version;
Undocumented in source.
priv_data
void* priv_data;
Undocumented in source.
probe_data
AVProbeData probe_data;
Undocumented in source.
probe_packets
int probe_packets;

Number of packets to buffer for codec probing

program_num
int program_num;

Details of the MPEG-TS program which created this stream.

pts_buffer
long[17] pts_buffer;
Undocumented in source.
pts_reorder_error
long[17] pts_reorder_error;

Internal data to generate dts from pts

pts_reorder_error_count
ubyte[17] pts_reorder_error_count;
Undocumented in source.
pts_wrap_behavior
int pts_wrap_behavior;

Options for behavior, when a wrap is detected.

pts_wrap_bits
int pts_wrap_bits;

< number of bits in pts (used for wrapping control)

pts_wrap_reference
long pts_wrap_reference;

Internal data to check for wrapping of the time stamp

r_frame_rate
AVRational r_frame_rate;

Real base framerate of the stream. This is the lowest framerate with which all timestamps can be represented accurately (it is the least common multiple of all framerates in the stream). Note, this value is just a guess! For example, if the time base is 1/90000 and all frames have either approximately 3600 or 1800 timer ticks, then r_frame_rate will be 50/1.

recommended_encoder_configuration
char* recommended_encoder_configuration;

String containing pairs of key and values describing recommended encoder configuration. Pairs are separated by ','. Keys are separated from values by '='.

request_probe
int request_probe;

stream probing state -1 -> probing finished 0 -> no probing requested rest -> perform probing with request_probe being the minimum score to accept. NOT PART OF PUBLIC API

sample_aspect_ratio
AVRational sample_aspect_ratio;

sample aspect ratio (0 if unknown) - encoding: Set by user. - decoding: Set by libavformat.

side_data
AVPacketSideData* side_data;

An array of side data that applies to the whole stream (i.e. the container does not allow it to change between packets).

skip_samples
int skip_samples;

Number of samples to skip at the start of the frame decoded from the next packet.

skip_to_keyframe
int skip_to_keyframe;

Indicates that everything up to the next keyframe should be discarded.

start_skip_samples
long start_skip_samples;

If not 0, the number of samples that should be skipped from the start of the stream (the samples are removed from packets with pts==0, which also assumes negative timestamps do not happen). Intended for use with formats such as mp3 with ad-hoc gapless audio support.

start_time
long start_time;

Decoding: pts of the first frame of the stream in presentation order, in stream time base. Only set this if you are absolutely 100% sure that the value you set it to really is the pts of the first frame. This may be undefined (AV_NOPTS_VALUE). @note The ASF header does NOT contain a correct start_time the ASF demuxer must NOT set this.

stream_identifier
int stream_identifier;

Stream Identifier This is the MPEG-TS stream identifier +1 0 means unknown

time_base
AVRational time_base;

This is the fundamental unit of time (in seconds) in terms of which frame timestamps are represented.

update_initial_durations_done
int update_initial_durations_done;

Internal data to prevent doing update_initial_durations() twice

Meta