|
FFmpeg 9.0
|
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. | |
| enum AVCodecID | codec_id |
| Specific type of the encoded data (the codec used). | |
| uint32_t | codec_tag |
| Additional information about the codec (corresponds to the AVI FOURCC). | |
| uint8_t * | extradata |
| Extra binary data needed for initializing the decoder, codec-dependent. | |
| int | extradata_size |
| Size of the extradata content in bytes. | |
| AVPacketSideData * | coded_side_data |
| Additional data associated with the entire stream. | |
| int | nb_coded_side_data |
| Amount of entries in coded_side_data. | |
| int | format |
| int64_t | bit_rate |
| The average bitrate of the encoded data (in bits per second). | |
| int | bits_per_coded_sample |
| The number of bits per sample in the codedwords. | |
| int | bits_per_raw_sample |
| The number of valid bits in each output sample. | |
| int | profile |
| Codec-specific bitstream restrictions that the stream conforms to. | |
| int | level |
| int | width |
| The width of the video frame in pixels. | |
| int | height |
| The height of the video frame in pixels. | |
| AVRational | sample_aspect_ratio |
| The aspect ratio (width/height) which a single pixel should have when displayed. | |
| AVRational | framerate |
| Number of frames per second, for streams with constant frame durations. | |
| enum AVFieldOrder | field_order |
| The order of the fields in interlaced video. | |
| enum AVColorRange | color_range |
| Additional colorspace characteristics. | |
| enum AVColorPrimaries | color_primaries |
| enum AVColorTransferCharacteristic | color_trc |
| enum AVColorSpace | color_space |
| enum AVChromaLocation | chroma_location |
| int | video_delay |
| Number of delayed frames. | |
| AVChannelLayout | ch_layout |
| The channel layout and number of channels. | |
| int | sample_rate |
| The number of audio samples per second. | |
| int | block_align |
| The number of bytes per coded audio frame, required by some formats. | |
| int | frame_size |
| Audio frame size, if known. | |
| int | initial_padding |
| Number of padding audio samples at the start. | |
| int | trailing_padding |
| Number of padding audio samples at the end. | |
| int | seek_preroll |
| Number of audio samples to skip after a discontinuity. | |
| enum AVAlphaMode | alpha_mode |
| Video with alpha channel only. | |
Related Symbols | |
(Note that these are not member symbols.) | |
| int | avcodec_parameters_from_context (struct AVCodecParameters *par, const AVCodecContext *codec) |
| Fill the parameters struct based on the values from the supplied codec context. | |
| int | avcodec_parameters_to_context (AVCodecContext *codec, const struct AVCodecParameters *par) |
| Fill the codec context based on the values from the supplied codec parameters. | |
| AVCodecParameters * | avcodec_parameters_alloc (void) |
| Allocate a new AVCodecParameters and set its fields to default values (unknown/invalid/0). | |
| void | avcodec_parameters_free (AVCodecParameters **par) |
| Free an AVCodecParameters instance and everything associated with it and write NULL to the supplied pointer. | |
| int | avcodec_parameters_copy (AVCodecParameters *dst, const AVCodecParameters *src) |
Copy the contents of src to dst. | |
| int | av_get_audio_frame_duration2 (AVCodecParameters *par, int frame_bytes) |
| This function is the same as av_get_audio_frame_duration(), except it works with AVCodecParameters instead of an AVCodecContext. | |
This struct describes the properties of an encoded stream.
Definition at line 49 of file codec_par.h.
| enum AVMediaType AVCodecParameters::codec_type |
General type of the encoded data.
Definition at line 53 of file codec_par.h.
Referenced by main().
| enum AVCodecID AVCodecParameters::codec_id |
Specific type of the encoded data (the codec used).
Definition at line 57 of file codec_par.h.
Referenced by main(), open_codec_context(), open_input_file(), open_input_file(), and open_input_file().
| uint32_t AVCodecParameters::codec_tag |
Additional information about the codec (corresponds to the AVI FOURCC).
Definition at line 61 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 71 of file codec_par.h.
Referenced by main().
| int AVCodecParameters::extradata_size |
Size of the extradata content in bytes.
Definition at line 75 of file codec_par.h.
Referenced by main().
| AVPacketSideData* AVCodecParameters::coded_side_data |
Additional data associated with the entire stream.
Should be allocated with av_packet_side_data_new() or av_packet_side_data_add(), and will be freed by ::avcodec_parameters_free().
Definition at line 83 of file codec_par.h.
| int AVCodecParameters::nb_coded_side_data |
Amount of entries in coded_side_data.
Definition at line 88 of file codec_par.h.
| int AVCodecParameters::format |
Definition at line 94 of file codec_par.h.
| int64_t AVCodecParameters::bit_rate |
The average bitrate of the encoded data (in bits per second).
Definition at line 99 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 113 of file codec_par.h.
| int AVCodecParameters::bits_per_raw_sample |
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 130 of file codec_par.h.
| int AVCodecParameters::profile |
Codec-specific bitstream restrictions that the stream conforms to.
Definition at line 135 of file codec_par.h.
| int AVCodecParameters::level |
Definition at line 136 of file codec_par.h.
| int AVCodecParameters::width |
| int AVCodecParameters::height |
| AVRational AVCodecParameters::sample_aspect_ratio |
The aspect ratio (width/height) which a single pixel should have when displayed.
When the aspect ratio is unknown or undefined, the numerator should be set to 0 (the denominator may have any value).
Video only.
Definition at line 161 of file codec_par.h.
| AVRational AVCodecParameters::framerate |
Number of frames per second, for streams with constant frame durations.
Should be set to { 0, 1 } when some frames have differing durations or if the value is not known.
Video only.
Definition at line 175 of file codec_par.h.
| enum AVFieldOrder AVCodecParameters::field_order |
The order of the fields in interlaced video.
Video only.
Definition at line 182 of file codec_par.h.
| enum AVColorRange AVCodecParameters::color_range |
| enum AVColorPrimaries AVCodecParameters::color_primaries |
Definition at line 190 of file codec_par.h.
| enum AVColorTransferCharacteristic AVCodecParameters::color_trc |
Definition at line 191 of file codec_par.h.
| enum AVColorSpace AVCodecParameters::color_space |
Definition at line 192 of file codec_par.h.
| enum AVChromaLocation AVCodecParameters::chroma_location |
Definition at line 193 of file codec_par.h.
| int AVCodecParameters::video_delay |
| AVChannelLayout AVCodecParameters::ch_layout |
| int AVCodecParameters::sample_rate |
| int AVCodecParameters::block_align |
The number of bytes per coded audio frame, required by some formats.
Audio only.
Corresponds to nBlockAlign in WAVEFORMATEX.
Definition at line 221 of file codec_par.h.
| int AVCodecParameters::frame_size |
Audio frame size, if known.
Required by some formats to be static.
Audio only.
Definition at line 227 of file codec_par.h.
| int AVCodecParameters::initial_padding |
Number of padding audio samples at the start.
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 to get the original audio without leading padding.
Audio only.
Definition at line 239 of file codec_par.h.
| int AVCodecParameters::trailing_padding |
Number of padding audio samples at the end.
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 from the end of the stream to get the original audio without any trailing padding.
Audio only.
Definition at line 250 of file codec_par.h.
| int AVCodecParameters::seek_preroll |
Number of audio samples to skip after a discontinuity.
Audio only.
Definition at line 256 of file codec_par.h.
| enum AVAlphaMode AVCodecParameters::alpha_mode |