FFmpeg
4.3.1
|
This struct describes the properties of an encoded stream. More...
#include <libavcodec/codec_par.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 |
int64_t | bit_rate |
The average bitrate of the encoded data (in bits per second). More... | |
int | bits_per_coded_sample |
The number of bits per sample in the codedwords. More... | |
int | bits_per_raw_sample |
This is the number of valid bits in each output sample. More... | |
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 |
int | video_delay |
Video only. More... | |
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 | frame_size |
Audio only. More... | |
int | initial_padding |
Audio only. More... | |
int | trailing_padding |
Audio only. More... | |
int | seek_preroll |
Audio only. More... | |
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 52 of file codec_par.h.
enum AVMediaType AVCodecParameters::codec_type |
General type of the encoded data.
Definition at line 222 of file codec_par.h.
Referenced by encode_write_frame(), init_filters(), and main().
enum AVCodecID AVCodecParameters::codec_id |
Specific type of the encoded data (the codec used).
Definition at line 222 of file codec_par.h.
Referenced by main(), open_codec_context(), and open_input_file().
uint32_t AVCodecParameters::codec_tag |
Additional information about the codec (corresponds to the AVI FOURCC).
Definition at line 64 of file codec_par.h.
Referenced by main().
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 74 of file codec_par.h.
Referenced by main().
int AVCodecParameters::extradata_size |
Size of the extradata content in bytes.
Definition at line 78 of file codec_par.h.
Referenced by main().
int AVCodecParameters::format |
Definition at line 84 of file codec_par.h.
int64_t AVCodecParameters::bit_rate |
The average bitrate of the encoded data (in bits per second).
Definition at line 89 of file codec_par.h.
int AVCodecParameters::bits_per_coded_sample |
The number of bits per sample in the codedwords.
This is basically the bitrate per sample. It is mandatory for a bunch of formats to actually decode them. It's the number of bits for one sample in the actual coded bitstream.
This could be for example 4 for ADPCM For PCM formats this matches bits_per_raw_sample Can be 0
Definition at line 102 of file codec_par.h.
int AVCodecParameters::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"."
For ADPCM this might be 12 or 16 or similar Can be 0
Definition at line 115 of file codec_par.h.
int AVCodecParameters::profile |
Codec-specific bitstream restrictions that the stream conforms to.
Definition at line 120 of file codec_par.h.
int AVCodecParameters::level |
Definition at line 121 of file codec_par.h.
int AVCodecParameters::width |
Video only.
The dimensions of the video frame in pixels.
Definition at line 126 of file codec_par.h.
int AVCodecParameters::height |
Definition at line 127 of file codec_par.h.
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 136 of file codec_par.h.
enum AVFieldOrder AVCodecParameters::field_order |
Video only.
The order of the fields in interlaced video.
Definition at line 136 of file codec_par.h.
enum AVColorRange AVCodecParameters::color_range |
enum AVColorPrimaries AVCodecParameters::color_primaries |
Definition at line 136 of file codec_par.h.
enum AVColorTransferCharacteristic AVCodecParameters::color_trc |
Definition at line 136 of file codec_par.h.
enum AVColorSpace AVCodecParameters::color_space |
Definition at line 136 of file codec_par.h.
enum AVChromaLocation AVCodecParameters::chroma_location |
Definition at line 136 of file codec_par.h.
int AVCodecParameters::video_delay |
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 162 of file codec_par.h.
int AVCodecParameters::channels |
int AVCodecParameters::sample_rate |
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 177 of file codec_par.h.
int AVCodecParameters::frame_size |
Audio only.
Audio frame size, if known. Required by some formats to be static.
Definition at line 181 of file codec_par.h.
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 189 of file codec_par.h.
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 196 of file codec_par.h.
int AVCodecParameters::seek_preroll |
Audio only.
Number of samples to skip after a discontinuity.
Definition at line 200 of file codec_par.h.