AVCodecParameters

This struct describes the properties of an encoded stream.

sizeof(AVCodecParameters) is not a part of the public ABI, this struct must be allocated with avcodec_parameters_alloc() and freed with avcodec_parameters_free().

Members

Variables

bit_rate
long bit_rate;

The average bitrate of the encoded data (in bits per second).

bits_per_coded_sample
int bits_per_coded_sample;

The number of bits per sample in the codedwords.

bits_per_raw_sample
int bits_per_raw_sample;

This is the number of valid bits in each output sample. If the sample format has more bits, the least significant bits are additional padding bits, which are always 0. Use right shifts to reduce the sample to its actual size. For example, audio formats with 24 bit samples will have bits_per_raw_sample set to 24, and format set to AV_SAMPLE_FMT_S32. To get the original sample use "(int32_t)sample >> 8"."

block_align
int block_align;

Audio only. The number of bytes per coded audio frame, required by some formats.

channel_layout
ulong channel_layout;

Audio only. The channel layout bitmask. May be 0 if the channel layout is unknown or unspecified, otherwise the number of bits set must be equal to the channels field.

channels
int channels;

Audio only. The number of audio channels.

chroma_location
AVChromaLocation chroma_location;
Undocumented in source.
codec_id
AVCodecID codec_id;

Specific type of the encoded data (the codec used).

codec_tag
uint codec_tag;

Additional information about the codec (corresponds to the AVI FOURCC).

codec_type
AVMediaType codec_type;

General type of the encoded data.

color_primaries
AVColorPrimaries color_primaries;
Undocumented in source.
color_range
AVColorRange color_range;

Video only. Additional colorspace characteristics.

color_space
AVColorSpace color_space;
Undocumented in source.
color_trc
AVColorTransferCharacteristic color_trc;
Undocumented in source.
extradata
ubyte* extradata;

Extra binary data needed for initializing the decoder, codec-dependent.

extradata_size
int extradata_size;

Size of the extradata content in bytes.

field_order
AVFieldOrder field_order;

Video only. The order of the fields in interlaced video.

format
int format;

- video: the pixel format, the value corresponds to enum AVPixelFormat. - audio: the sample format, the value corresponds to enum AVSampleFormat.

frame_size
int frame_size;

Audio only. Audio frame size, if known. Required by some formats to be static.

height
int height;
Undocumented in source.
initial_padding
int initial_padding;

Audio only. The amount of padding (in samples) inserted by the encoder at the beginning of the audio. I.e. this number of leading decoded samples must be discarded by the caller to get the original audio without leading padding.

level
int level;
Undocumented in source.
profile
int profile;

Codec-specific bitstream restrictions that the stream conforms to.

sample_aspect_ratio
AVRational sample_aspect_ratio;

Video only. The aspect ratio (width / height) which a single pixel should have when displayed.

sample_rate
int sample_rate;

Audio only. The number of audio samples per second.

seek_preroll
int seek_preroll;

Audio only. Number of samples to skip after a discontinuity.

trailing_padding
int trailing_padding;

Audio only. The amount of padding (in samples) appended by the encoder to the end of the audio. I.e. this number of decoded samples must be discarded by the caller from the end of the stream to get the original audio without any trailing padding.

video_delay
int video_delay;

Video only. Number of delayed frames.

width
int width;

Video only. The dimensions of the video frame in pixels.

Meta