38 memset(par, 0,
sizeof(*par));
82 int nb_dst = *pnb_dst;
91 for (
int i = 0;
i < nb_src;
i++) {
116 dst->extradata_size = 0;
118 dst->nb_coded_side_data = 0;
119 if (
src->extradata) {
123 memcpy(
dst->extradata,
src->extradata,
src->extradata_size);
124 dst->extradata_size =
src->extradata_size;
127 src->coded_side_data,
src->nb_coded_side_data);
uint8_t ptrdiff_t const uint8_t ptrdiff_t int intptr_t intptr_t int int16_t * dst
Libavcodec external API header.
#define i(width, name, range_min, range_max)
int avcodec_parameters_from_context(AVCodecParameters *par, const AVCodecContext *codec)
AVCodecParameters * avcodec_parameters_alloc(void)
int avcodec_parameters_copy(AVCodecParameters *dst, const AVCodecParameters *src)
static void codec_parameters_reset(AVCodecParameters *par)
void avcodec_parameters_free(AVCodecParameters **ppar)
static int codec_parameters_copy_side_data(AVPacketSideData **pdst, int *pnb_dst, const AVPacketSideData *src, int nb_src)
int avcodec_parameters_to_context(AVCodecContext *codec, const AVCodecParameters *par)
#define AV_PROFILE_UNKNOWN
#define AV_INPUT_BUFFER_PADDING_SIZE
Required number of additionally allocated bytes at the end of the input bitstream for decoding.
void av_packet_side_data_free(AVPacketSideData **psd, int *pnb_sd)
Convenience function to free all the side data stored in an array, and the array itself.
void av_channel_layout_uninit(AVChannelLayout *channel_layout)
Free any allocated data in the channel layout and reset the channel count to 0.
int av_channel_layout_copy(AVChannelLayout *dst, const AVChannelLayout *src)
Make a copy of a channel layout.
@ AV_CHANNEL_ORDER_UNSPEC
Only the channel count is specified, without any further information about the channel order.
void * av_memdup(const void *p, size_t size)
Duplicate a buffer with av_malloc().
@ AVMEDIA_TYPE_UNKNOWN
Usually treated as AVMEDIA_TYPE_DATA.
void * av_calloc(size_t nmemb, size_t size)
Memory handling functions.
@ AVCHROMA_LOC_UNSPECIFIED
@ AVCOL_RANGE_UNSPECIFIED
@ AVALPHA_MODE_UNSPECIFIED
Unknown alpha handling, or no alpha channel.
An AVChannelLayout holds information about the channel layout of audio data.
enum AVChannelOrder order
Channel order used in this layout.
main external API structure.
enum AVPixelFormat pix_fmt
Pixel format, see AV_PIX_FMT_xxx.
int width
picture width / height.
AVPacketSideData * coded_side_data
Additional data associated with the entire coded stream.
AVChannelLayout ch_layout
Audio channel layout.
enum AVSampleFormat sample_fmt
audio sample format
enum AVPixelFormat sw_pix_fmt
Nominal unaccelerated pixel format, see AV_PIX_FMT_xxx.
enum AVColorRange color_range
MPEG vs JPEG YUV range.
unsigned int codec_tag
fourcc (LSB first, so "ABCD" -> ('D'<<24) + ('C'<<16) + ('B'<<8) + 'A').
enum AVColorPrimaries color_primaries
Chromaticity coordinates of the source primaries.
enum AVMediaType codec_type
AVRational sample_aspect_ratio
sample aspect ratio (0 if unknown) That is the width of a pixel divided by the height of the pixel.
int bits_per_coded_sample
bits per sample/pixel from the demuxer (needed for huffyuv).
enum AVFieldOrder field_order
Field order.
int has_b_frames
Size of the frame reordering buffer in the decoder.
int level
Encoding level descriptor.
int64_t bit_rate
the average bitrate
int bits_per_raw_sample
Bits per sample/pixel of internal libavcodec pixel/sample format.
enum AVColorSpace colorspace
YUV colorspace type.
int initial_padding
Audio only.
int sample_rate
samples per second
enum AVColorTransferCharacteristic color_trc
Color Transfer Characteristic.
int seek_preroll
Number of samples to skip after a discontinuity.
uint8_t * extradata
Out-of-band global headers that may be used by some codecs.
int trailing_padding
Audio only.
enum AVChromaLocation chroma_sample_location
This defines the location of chroma samples.
enum AVAlphaMode alpha_mode
Indicates how the alpha channel of the video is represented.
int block_align
number of bytes per packet if constant and known or 0 Used by some WAV based audio codecs.
int frame_size
Number of samples per channel in an audio frame.
This struct describes the properties of an encoded stream.
enum AVColorSpace color_space
int extradata_size
Size of the extradata content in bytes.
int frame_size
Audio frame size, if known.
enum AVFieldOrder field_order
The order of the fields in interlaced video.
int height
The height of the video frame in pixels.
int nb_coded_side_data
Amount of entries in coded_side_data.
int bits_per_coded_sample
The number of bits per sample in the codedwords.
AVChannelLayout ch_layout
The channel layout and number of channels.
int width
The width of the video frame in pixels.
int64_t bit_rate
The average bitrate of the encoded data (in bits per second).
int seek_preroll
Number of audio samples to skip after a discontinuity.
enum AVMediaType codec_type
General type of the encoded data.
int trailing_padding
Number of padding audio samples at the end.
AVRational framerate
Number of frames per second, for streams with constant frame durations.
int profile
Codec-specific bitstream restrictions that the stream conforms to.
int block_align
The number of bytes per coded audio frame, required by some formats.
int bits_per_raw_sample
The number of valid bits in each output sample.
AVRational sample_aspect_ratio
The aspect ratio (width/height) which a single pixel should have when displayed.
int video_delay
Number of delayed frames.
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.
enum AVCodecID codec_id
Specific type of the encoded data (the codec used).
enum AVColorPrimaries color_primaries
int sample_rate
The number of audio samples per second.
enum AVColorTransferCharacteristic color_trc
enum AVAlphaMode alpha_mode
Video with alpha channel only.
int initial_padding
Number of padding audio samples at the start.
AVPacketSideData * coded_side_data
Additional data associated with the entire stream.
enum AVChromaLocation chroma_location
enum AVColorRange color_range
Additional colorspace characteristics.
This structure stores auxiliary information for decoding, presenting, or otherwise processing the cod...
enum AVPacketSideDataType type
Rational number (pair of numerator and denominator).