|
FFmpeg 4.4.6
|
Miscellaneous utility functions related to both encoding and decoding (or neither). More...
Modules | |
| Pixel formats | |
| Functions for working with pixel formats. | |
| FFT functions | |
Functions | |
| void | avcodec_string (char *buf, int buf_size, AVCodecContext *enc, int encode) |
| const char * | av_get_profile_name (const AVCodec *codec, int profile) |
| Return a name for the specified profile, if available. | |
| const char * | avcodec_profile_name (enum AVCodecID codec_id, int profile) |
| Return a name for the specified profile, if available. | |
| int | avcodec_default_execute (AVCodecContext *c, int(*func)(AVCodecContext *c2, void *arg2), void *arg, int *ret, int count, int size) |
| int | avcodec_default_execute2 (AVCodecContext *c, int(*func)(AVCodecContext *c2, void *arg2, int, int), void *arg, int *ret, int count) |
| int | avcodec_fill_audio_frame (AVFrame *frame, int nb_channels, enum AVSampleFormat sample_fmt, const uint8_t *buf, int buf_size, int align) |
| Fill AVFrame audio data and linesize pointers. | |
| void | avcodec_flush_buffers (AVCodecContext *avctx) |
| Reset the internal codec state / flush internal buffers. | |
| int | av_get_bits_per_sample (enum AVCodecID codec_id) |
| Return codec bits per sample. | |
| enum AVCodecID | av_get_pcm_codec (enum AVSampleFormat fmt, int be) |
| Return the PCM codec associated with a sample format. | |
| int | av_get_exact_bits_per_sample (enum AVCodecID codec_id) |
| Return codec bits per sample. | |
| int | av_get_audio_frame_duration (AVCodecContext *avctx, int frame_bytes) |
| Return audio frame duration. | |
| 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. | |
| void | av_fast_padded_malloc (void *ptr, unsigned int *size, size_t min_size) |
| Same behaviour av_fast_malloc but the buffer has additional AV_INPUT_BUFFER_PADDING_SIZE at the end which will always be 0. | |
| void | av_fast_padded_mallocz (void *ptr, unsigned int *size, size_t min_size) |
| Same behaviour av_fast_padded_malloc except that buffer will always be 0-initialized after call. | |
| unsigned int | av_xiphlacing (unsigned char *s, unsigned int v) |
| Encode extradata length to a buffer. | |
| int | avcodec_is_open (AVCodecContext *s) |
| AVCPBProperties * | av_cpb_properties_alloc (size_t *size) |
| Allocate a CPB properties structure and initialize its fields to default values. | |
Miscellaneous utility functions related to both encoding and decoding (or neither).
| void avcodec_string | ( | char * | buf, |
| int | buf_size, | ||
| AVCodecContext * | enc, | ||
| int | encode | ||
| ) |
| const char * av_get_profile_name | ( | const AVCodec * | codec, |
| int | profile | ||
| ) |
Return a name for the specified profile, if available.
| codec | the codec that is searched for the given profile |
| profile | the profile value for which a name is requested |
| const char * avcodec_profile_name | ( | enum AVCodecID | codec_id, |
| int | profile | ||
| ) |
Return a name for the specified profile, if available.
| codec_id | the ID of the codec to which the requested profile belongs |
| profile | the profile value for which a name is requested |
| int avcodec_default_execute | ( | AVCodecContext * | c, |
| int(*)(AVCodecContext *c2, void *arg2) | func, | ||
| void * | arg, | ||
| int * | ret, | ||
| int | count, | ||
| int | size | ||
| ) |
| int avcodec_default_execute2 | ( | AVCodecContext * | c, |
| int(*)(AVCodecContext *c2, void *arg2, int, int) | func, | ||
| void * | arg, | ||
| int * | ret, | ||
| int | count | ||
| ) |
| int avcodec_fill_audio_frame | ( | AVFrame * | frame, |
| int | nb_channels, | ||
| enum AVSampleFormat | sample_fmt, | ||
| const uint8_t * | buf, | ||
| int | buf_size, | ||
| int | align | ||
| ) |
Fill AVFrame audio data and linesize pointers.
The buffer buf must be a preallocated buffer with a size big enough to contain the specified samples amount. The filled AVFrame data pointers will point to this buffer.
AVFrame extended_data channel pointers are allocated if necessary for planar audio.
| frame | the AVFrame frame->nb_samples must be set prior to calling the function. This function fills in frame->data, frame->extended_data, frame->linesize[0]. |
| nb_channels | channel count |
| sample_fmt | sample format |
| buf | buffer to use for frame data |
| buf_size | size of buffer |
| align | plane size sample alignment (0 = default) |
| void avcodec_flush_buffers | ( | AVCodecContext * | avctx | ) |
Reset the internal codec state / flush internal buffers.
Should be called e.g. when seeking or when switching to a different stream.
| int av_get_bits_per_sample | ( | enum AVCodecID | codec_id | ) |
Return codec bits per sample.
| [in] | codec_id | the codec |
| enum AVCodecID av_get_pcm_codec | ( | enum AVSampleFormat | fmt, |
| int | be | ||
| ) |
Return the PCM codec associated with a sample format.
| be | endianness, 0 for little, 1 for big, -1 (or anything else) for native |
| int av_get_exact_bits_per_sample | ( | enum AVCodecID | codec_id | ) |
Return codec bits per sample.
Only return non-zero if the bits per sample is exactly correct, not an approximation.
| [in] | codec_id | the codec |
| int av_get_audio_frame_duration | ( | AVCodecContext * | avctx, |
| int | frame_bytes | ||
| ) |
Return audio frame duration.
| avctx | codec context |
| frame_bytes | size of the frame, or 0 if unknown |
| 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.
| void av_fast_padded_malloc | ( | void * | ptr, |
| unsigned int * | size, | ||
| size_t | min_size | ||
| ) |
Same behaviour av_fast_malloc but the buffer has additional AV_INPUT_BUFFER_PADDING_SIZE at the end which will always be 0.
In addition the whole buffer will initially and after resizes be 0-initialized so that no uninitialized data will ever appear.
| void av_fast_padded_mallocz | ( | void * | ptr, |
| unsigned int * | size, | ||
| size_t | min_size | ||
| ) |
Same behaviour av_fast_padded_malloc except that buffer will always be 0-initialized after call.
| unsigned int av_xiphlacing | ( | unsigned char * | s, |
| unsigned int | v | ||
| ) |
Encode extradata length to a buffer.
Used by xiph codecs.
| s | buffer to write to; must be at least (v/255+1) bytes long |
| v | size of extradata in bytes |
| int avcodec_is_open | ( | AVCodecContext * | s | ) |
| AVCPBProperties * av_cpb_properties_alloc | ( | size_t * | size | ) |
Allocate a CPB properties structure and initialize its fields to default values.
| size | if non-NULL, the size of the allocated struct will be written here. This is useful for embedding it in side data. |