AVCodecParameters Struct Reference

This struct describes the properties of an encoded stream. More...

#include <avcodec.h>

Data Fields

enum AVMediaType codec_type
 General type of the encoded data. More...
 
enum AVCodecID codec_id
 Specific type of the encoded data (the codec used). More...
 
uint32_t codec_tag
 Additional information about the codec (corresponds to the AVI FOURCC). More...
 
uint8_t * extradata
 Extra binary data needed for initializing the decoder, codec-dependent. More...
 
int extradata_size
 Size of the extradata content in bytes. More...
 
int format
 
int bit_rate
 The average bitrate of the encoded data (in bits per second). More...
 
int bits_per_coded_sample
 
int profile
 Codec-specific bitstream restrictions that the stream conforms to. More...
 
int level
 
int width
 Video only. More...
 
int height
 
AVRational sample_aspect_ratio
 Video only. More...
 
enum AVFieldOrder field_order
 Video only. More...
 
enum AVColorRange color_range
 Video only. More...
 
enum AVColorPrimaries color_primaries
 
enum AVColorTransferCharacteristic color_trc
 
enum AVColorSpace color_space
 
enum AVChromaLocation chroma_location
 
uint64_t channel_layout
 Audio only. More...
 
int channels
 Audio only. More...
 
int sample_rate
 Audio only. More...
 
int block_align
 Audio only. More...
 
int initial_padding
 Audio only. More...
 
int trailing_padding
 Audio only. More...
 

Detailed Description

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().

Definition at line 3265 of file avcodec.h.

Field Documentation

◆ codec_type

enum AVMediaType AVCodecParameters::codec_type

General type of the encoded data.

Definition at line 3269 of file avcodec.h.

◆ codec_id

enum AVCodecID AVCodecParameters::codec_id

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

Definition at line 3273 of file avcodec.h.

◆ codec_tag

uint32_t AVCodecParameters::codec_tag

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

Definition at line 3277 of file avcodec.h.

◆ extradata

uint8_t* AVCodecParameters::extradata

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

Must be allocated with av_malloc() and will be freed by avcodec_parameters_free(). The allocated size of extradata must be at least extradata_size + AV_INPUT_BUFFER_PADDING_SIZE, with the padding bytes zeroed.

Definition at line 3287 of file avcodec.h.

◆ extradata_size

int AVCodecParameters::extradata_size

Size of the extradata content in bytes.

Definition at line 3291 of file avcodec.h.

◆ format

int AVCodecParameters::format
  • video: the pixel format, the value corresponds to enum AVPixelFormat.
  • audio: the sample format, the value corresponds to enum AVSampleFormat.

Definition at line 3297 of file avcodec.h.

◆ bit_rate

int AVCodecParameters::bit_rate

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

Definition at line 3302 of file avcodec.h.

◆ bits_per_coded_sample

int AVCodecParameters::bits_per_coded_sample

Definition at line 3304 of file avcodec.h.

◆ profile

int AVCodecParameters::profile

Codec-specific bitstream restrictions that the stream conforms to.

Definition at line 3309 of file avcodec.h.

◆ level

int AVCodecParameters::level

Definition at line 3310 of file avcodec.h.

◆ width

int AVCodecParameters::width

Video only.

The dimensions of the video frame in pixels.

Definition at line 3315 of file avcodec.h.

◆ height

int AVCodecParameters::height

Definition at line 3316 of file avcodec.h.

◆ sample_aspect_ratio

AVRational AVCodecParameters::sample_aspect_ratio

Video only.

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

When the aspect ratio is unknown / undefined, the numerator should be set to 0 (the denominator may have any value).

Definition at line 3325 of file avcodec.h.

◆ field_order

enum AVFieldOrder AVCodecParameters::field_order

Video only.

The order of the fields in interlaced video.

Definition at line 3330 of file avcodec.h.

◆ color_range

enum AVColorRange AVCodecParameters::color_range

Video only.

Additional colorspace characteristics.

Definition at line 3335 of file avcodec.h.

◆ color_primaries

enum AVColorPrimaries AVCodecParameters::color_primaries

Definition at line 3336 of file avcodec.h.

◆ color_trc

enum AVColorTransferCharacteristic AVCodecParameters::color_trc

Definition at line 3337 of file avcodec.h.

◆ color_space

enum AVColorSpace AVCodecParameters::color_space

Definition at line 3338 of file avcodec.h.

◆ chroma_location

enum AVChromaLocation AVCodecParameters::chroma_location

Definition at line 3339 of file avcodec.h.

◆ channel_layout

uint64_t AVCodecParameters::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.

Definition at line 3346 of file avcodec.h.

◆ channels

int AVCodecParameters::channels

Audio only.

The number of audio channels.

Definition at line 3350 of file avcodec.h.

◆ sample_rate

int AVCodecParameters::sample_rate

Audio only.

The number of audio samples per second.

Definition at line 3354 of file avcodec.h.

◆ block_align

int AVCodecParameters::block_align

Audio only.

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

Corresponds to nBlockAlign in WAVEFORMATEX.

Definition at line 3361 of file avcodec.h.

◆ initial_padding

int AVCodecParameters::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.

Definition at line 3369 of file avcodec.h.

◆ trailing_padding

int AVCodecParameters::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.

Definition at line 3376 of file avcodec.h.


The documentation for this struct was generated from the following file: