FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Modules | Data Structures | Enumerations | Functions
Utility functions

Miscellaneous utility functions related to both encoding and decoding (or neither). More...

Modules

 Pixel formats
 Functions for working with pixel formats.
 
 FFT functions
 

Data Structures

struct  AVBitStreamFilterContext
 
struct  AVBSFContext
 The bitstream filter state. More...
 
struct  AVBitStreamFilter
 

Enumerations

enum  AVLockOp { AV_LOCK_CREATE, AV_LOCK_OBTAIN, AV_LOCK_RELEASE, AV_LOCK_DESTROY }
 Lock operation used by lockmgr. More...
 

Functions

attribute_deprecated void avcodec_set_dimensions (AVCodecContext *s, int width, int height)
 
size_t av_get_codec_tag_string (char *buf, size_t buf_size, unsigned int codec_tag)
 Put a string representing the codec tag codec_tag in buf. More...
 
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. More...
 
const char * avcodec_profile_name (enum AVCodecID codec_id, int profile)
 Return a name for the specified profile, if available. More...
 
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. More...
 
void avcodec_flush_buffers (AVCodecContext *avctx)
 Reset the internal decoder state / flush internal buffers. More...
 
int av_get_bits_per_sample (enum AVCodecID codec_id)
 Return codec bits per sample. More...
 
enum AVCodecID av_get_pcm_codec (enum AVSampleFormat fmt, int be)
 Return the PCM codec associated with a sample format. More...
 
int av_get_exact_bits_per_sample (enum AVCodecID codec_id)
 Return codec bits per sample. More...
 
int av_get_audio_frame_duration (AVCodecContext *avctx, int frame_bytes)
 Return audio frame duration. More...
 
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. More...
 
attribute_deprecated void av_register_bitstream_filter (AVBitStreamFilter *bsf)
 Register a bitstream filter. More...
 
attribute_deprecated
AVBitStreamFilterContext
av_bitstream_filter_init (const char *name)
 Create and initialize a bitstream filter context given a bitstream filter name. More...
 
attribute_deprecated int av_bitstream_filter_filter (AVBitStreamFilterContext *bsfc, AVCodecContext *avctx, const char *args, uint8_t **poutbuf, int *poutbuf_size, const uint8_t *buf, int buf_size, int keyframe)
 Filter bitstream. More...
 
attribute_deprecated void av_bitstream_filter_close (AVBitStreamFilterContext *bsf)
 Release bitstream filter context. More...
 
attribute_deprecated
AVBitStreamFilter
av_bitstream_filter_next (const AVBitStreamFilter *f)
 If f is NULL, return the first registered bitstream filter, if f is non-NULL, return the next registered bitstream filter after f, or NULL if f is the last one. More...
 
const AVBitStreamFilterav_bsf_get_by_name (const char *name)
 
const AVBitStreamFilterav_bsf_next (void **opaque)
 Iterate over all registered bitstream filters. More...
 
int av_bsf_alloc (const AVBitStreamFilter *filter, AVBSFContext **ctx)
 Allocate a context for a given bitstream filter. More...
 
int av_bsf_init (AVBSFContext *ctx)
 Prepare the filter for use, after all the parameters and options have been set. More...
 
int av_bsf_send_packet (AVBSFContext *ctx, AVPacket *pkt)
 Submit a packet for filtering. More...
 
int av_bsf_receive_packet (AVBSFContext *ctx, AVPacket *pkt)
 Retrieve a filtered packet. More...
 
void av_bsf_free (AVBSFContext **ctx)
 Free a bitstream filter context and everything associated with it; write NULL into the supplied pointer. More...
 
const AVClassav_bsf_get_class (void)
 Get the AVClass for AVBSFContext. More...
 
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. More...
 
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. More...
 
unsigned int av_xiphlacing (unsigned char *s, unsigned int v)
 Encode extradata length to a buffer. More...
 
attribute_deprecated void av_log_missing_feature (void *avc, const char *feature, int want_sample)
 Log a generic warning message about a missing feature. More...
 
attribute_deprecated void av_log_ask_for_sample (void *avc, const char *msg,...) av_printf_format(2
 Log a generic warning message asking for a sample. More...
 
attribute_deprecated void void av_register_hwaccel (AVHWAccel *hwaccel)
 Register the hardware accelerator hwaccel. More...
 
AVHWAccelav_hwaccel_next (const AVHWAccel *hwaccel)
 If hwaccel is NULL, returns the first registered hardware accelerator, if hwaccel is non-NULL, returns the next registered hardware accelerator after hwaccel, or NULL if hwaccel is the last one. More...
 
int av_lockmgr_register (int(*cb)(void **mutex, enum AVLockOp op))
 Register a user provided lock manager supporting the operations specified by AVLockOp. More...
 
enum AVMediaType avcodec_get_type (enum AVCodecID codec_id)
 Get the type of the given codec. More...
 
const char * avcodec_get_name (enum AVCodecID id)
 Get the name of a codec. More...
 
int avcodec_is_open (AVCodecContext *s)
 
int av_codec_is_encoder (const AVCodec *codec)
 
int av_codec_is_decoder (const AVCodec *codec)
 
const AVCodecDescriptoravcodec_descriptor_get (enum AVCodecID id)
 
const AVCodecDescriptoravcodec_descriptor_next (const AVCodecDescriptor *prev)
 Iterate over all codec descriptors known to libavcodec. More...
 
const AVCodecDescriptoravcodec_descriptor_get_by_name (const char *name)
 
AVCPBPropertiesav_cpb_properties_alloc (size_t *size)
 Allocate a CPB properties structure and initialize its fields to default values. More...
 

Detailed Description

Miscellaneous utility functions related to both encoding and decoding (or neither).

Enumeration Type Documentation

enum AVLockOp

Lock operation used by lockmgr.

Enumerator
AV_LOCK_CREATE 

Create a mutex.

AV_LOCK_OBTAIN 

Lock the mutex.

AV_LOCK_RELEASE 

Unlock the mutex.

AV_LOCK_DESTROY 

Free mutex resources.

Definition at line 6006 of file avcodec.h.

Function Documentation

attribute_deprecated void avcodec_set_dimensions ( AVCodecContext s,
int  width,
int  height 
)
Deprecated:
this function is not supposed to be used from outside of lavc

Definition at line 201 of file utils.c.

size_t av_get_codec_tag_string ( char *  buf,
size_t  buf_size,
unsigned int  codec_tag 
)

Put a string representing the codec tag codec_tag in buf.

Parameters
bufbuffer to place codec tag in
buf_sizesize in bytes of buf
codec_tagcodec tag to assign
Returns
the length of the string that would have been generated if enough space had been available, excluding the trailing null

Definition at line 3102 of file utils.c.

Referenced by apng_read_packet(), avcodec_string(), avi_read_header(), control_port_cb(), ffmmal_init_decoder(), ffmmal_read_frame(), get_aiff_header(), init_muxer(), main(), matroska_parse_tracks(), mjpeg_decode_app(), mov_write_hdlr_tag(), parse_pixel_format(), print_pix_fmt_fourccs(), rsd_read_header(), show_stream(), and videotoolbox_retrieve_data().

void avcodec_string ( char *  buf,
int  buf_size,
AVCodecContext enc,
int  encode 
)

Definition at line 3122 of file utils.c.

Referenced by avformat_find_stream_info(), and dump_stream_format().

const char* av_get_profile_name ( const AVCodec codec,
int  profile 
)

Return a name for the specified profile, if available.

Parameters
codecthe codec that is searched for the given profile
profilethe profile value for which a name is requested
Returns
A name for the profile if found, NULL otherwise.

Definition at line 3298 of file utils.c.

const char* avcodec_profile_name ( enum AVCodecID  codec_id,
int  profile 
)

Return a name for the specified profile, if available.

Parameters
codec_idthe ID of the codec to which the requested profile belongs
profilethe profile value for which a name is requested
Returns
A name for the profile if found, NULL otherwise.
Note
unlike av_get_profile_name(), which searches a list of profiles supported by a specific decoder or encoder implementation, this function searches the list of profiles from the AVCodecDescriptor

Definition at line 3311 of file utils.c.

Referenced by avcodec_string(), and show_stream().

int avcodec_default_execute ( AVCodecContext c,
int(*)(AVCodecContext *c2, void *arg2)  func,
void arg,
int *  ret,
int  count,
int  size 
)

Definition at line 985 of file utils.c.

Referenced by init_context_defaults(), and thread_execute().

int avcodec_default_execute2 ( AVCodecContext c,
int(*)(AVCodecContext *c2, void *arg2, int, int)  func,
void arg,
int *  ret,
int  count 
)

Referenced by init_context_defaults().

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.

Parameters
framethe 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_channelschannel count
sample_fmtsample format
bufbuffer to use for frame data
buf_sizesize of buffer
alignplane size sample alignment (0 = default)
Returns
>=0 on success, negative error code on failure
Todo:
return the size in bytes required to store the samples in case of success, at the next libavutil bump
Examples:
decoding_encoding.c.

Definition at line 470 of file utils.c.

Referenced by audio_encode_example().

void avcodec_flush_buffers ( AVCodecContext avctx)

Reset the internal decoder state / flush internal buffers.

Should be called e.g. when seeking or when switching to a different stream.

Note
when refcounted frames are not used (i.e. avctx->refcounted_frames is 0), this invalidates the frames previously returned from the decoder. When refcounted frames are used, the decoder just releases any references it might keep internally, but the caller's reference remains valid.

Definition at line 3349 of file utils.c.

Referenced by compute_crc_of_packets(), decoder_decode_frame(), process_command(), rewind_file(), and seek_to_start().

int av_get_bits_per_sample ( enum AVCodecID  codec_id)
enum AVCodecID av_get_pcm_codec ( enum AVSampleFormat  fmt,
int  be 
)

Return the PCM codec associated with a sample format.

Parameters
beendianness, 0 for little, 1 for big, -1 (or anything else) for native
Returns
AV_CODEC_ID_PCM_* or AV_CODEC_ID_NONE

Definition at line 3425 of file utils.c.

Referenced by lavfi_read_header(), and main().

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.

Parameters
[in]codec_idthe codec
Returns
Number of bits per sample or zero if unknown for the given codec.

Definition at line 3369 of file utils.c.

Referenced by av_get_bits_per_sample(), get_audio_frame_duration(), and new_output_stream().

int av_get_audio_frame_duration ( AVCodecContext avctx,
int  frame_bytes 
)

Return audio frame duration.

Parameters
avctxcodec context
frame_bytessize of the frame, or 0 if unknown
Returns
frame duration, in samples, if known. 0 if not able to determine.

Definition at line 3648 of file utils.c.

Referenced by do_streamcopy().

int av_get_audio_frame_duration2 ( AVCodecParameters par,
int  frame_bytes 
)
attribute_deprecated void av_register_bitstream_filter ( AVBitStreamFilter bsf)

Register a bitstream filter.

The filter will be accessible to the application code through av_bitstream_filter_next() or can be directly initialized with av_bitstream_filter_init().

See Also
avcodec_register_all()

Definition at line 43 of file bitstream_filter.c.

attribute_deprecated AVBitStreamFilterContext* av_bitstream_filter_init ( const char *  name)

Create and initialize a bitstream filter context given a bitstream filter name.

The returned context must be freed with av_bitstream_filter_close().

Parameters
namethe name of the bitstream filter
Returns
a bitstream filter context if a matching filter was found and successfully initialized, NULL otherwise

Definition at line 52 of file bitstream_filter.c.

Referenced by detect_stream_specific(), init(), new_output_stream(), parse_bsfs(), and qsv_decode_init().

attribute_deprecated int av_bitstream_filter_filter ( AVBitStreamFilterContext bsfc,
AVCodecContext avctx,
const char *  args,
uint8_t **  poutbuf,
int *  poutbuf_size,
const uint8_t buf,
int  buf_size,
int  keyframe 
)

Filter bitstream.

This function filters the buffer buf with size buf_size, and places the filtered buffer in the buffer pointed to by poutbuf.

The output buffer must be freed by the caller.

Parameters
bsfcbitstream filter context created by av_bitstream_filter_init()
avctxAVCodecContext accessed by the filter, may be NULL. If specified, this must point to the encoder context of the output stream the packet is sent to.
argsarguments which specify the filter configuration, may be NULL
poutbufpointer which is updated to point to the filtered buffer
poutbuf_sizepointer which is updated to the filtered buffer size in bytes
bufbuffer containing the data to filter
buf_sizesize in bytes of buf
keyframeset to non-zero if the buffer to filter corresponds to a key-frame packet data
Returns
>= 0 in case of success, or a negative error code in case of failure

If the return value is positive, an output buffer is allocated and is available in *poutbuf, and is distinct from the input buffer.

If the return value is 0, the output buffer is not allocated and should be considered identical to the input buffer, or in case *poutbuf was set it points to the input buffer (not necessarily to its starting address). A special case is if *poutbuf was set to NULL and *poutbuf_size was set to 0, which indicates the packet should be dropped.

Definition at line 98 of file bitstream_filter.c.

Referenced by decode(), filter_packet(), init(), and qsv_decode_frame().

attribute_deprecated void av_bitstream_filter_close ( AVBitStreamFilterContext bsf)

Release bitstream filter context.

Parameters
bsfthe bitstream filter context created with av_bitstream_filter_init(), can be NULL

Definition at line 84 of file bitstream_filter.c.

Referenced by close_slave(), concat_read_close(), ffmpeg_cleanup(), qsv_decode_close(), and uninit().

attribute_deprecated AVBitStreamFilter* av_bitstream_filter_next ( const AVBitStreamFilter f)

If f is NULL, return the first registered bitstream filter, if f is non-NULL, return the next registered bitstream filter after f, or NULL if f is the last one.

This function can be used to iterate over all registered bitstream filters.

Definition at line 32 of file bitstream_filter.c.

Referenced by show_bsfs().

const AVBitStreamFilter* av_bsf_get_by_name ( const char *  name)
Returns
a bitstream filter with the specified name or NULL if no such bitstream filter exists.

Definition at line 57 of file bitstream_filters.c.

Referenced by av_bitstream_filter_init(), cuvid_decode_init(), ff_stream_add_bitstream_filter(), ffat_decode(), and mediacodec_decode_init().

const AVBitStreamFilter* av_bsf_next ( void **  opaque)

Iterate over all registered bitstream filters.

Parameters
opaquea pointer where libavcodec will store the iteration state. Must point to NULL to start the iteration.
Returns
the next registered bitstream filter or NULL when the iteration is finished

Definition at line 46 of file bitstream_filters.c.

Referenced by av_bitstream_filter_next().

int av_bsf_alloc ( const AVBitStreamFilter filter,
AVBSFContext **  ctx 
)

Allocate a context for a given bitstream filter.

The caller must fill in the context parameters as described in the documentation and then call av_bsf_init() before sending any data to the filter.

Parameters
filterthe filter for which to allocate an instance.
ctxa pointer into which the pointer to the newly-allocated context will be written. It must be freed with av_bsf_free() after the filtering is done.
Returns
0 on success, a negative AVERROR code on failure

Definition at line 79 of file bsf.c.

Referenced by av_bitstream_filter_filter(), cuvid_decode_init(), ff_stream_add_bitstream_filter(), ffat_decode(), and mediacodec_decode_init().

int av_bsf_init ( AVBSFContext ctx)

Prepare the filter for use, after all the parameters and options have been set.

Definition at line 132 of file bsf.c.

Referenced by av_bitstream_filter_filter(), cuvid_decode_init(), ff_stream_add_bitstream_filter(), ffat_decode(), and mediacodec_decode_init().

int av_bsf_send_packet ( AVBSFContext ctx,
AVPacket pkt 
)

Submit a packet for filtering.

After sending each packet, the filter must be completely drained by calling av_bsf_receive_packet() repeatedly until it returns AVERROR(EAGAIN) or AVERROR_EOF.

Parameters
pktthe packet to filter. The bitstream filter will take ownership of the packet and reset the contents of pkt. pkt is not touched if an error occurs. This parameter may be NULL, which signals the end of the stream (i.e. no more packets will be sent). That will cause the filter to output any packets it may have buffered internally.
Returns
0 on success, a negative AVERROR on error.

Definition at line 173 of file bsf.c.

Referenced by av_bitstream_filter_filter(), av_interleaved_write_frame(), ffat_decode(), and mediacodec_decode_frame().

int av_bsf_receive_packet ( AVBSFContext ctx,
AVPacket pkt 
)

Retrieve a filtered packet.

Parameters
[out]pktthis struct will be filled with the contents of the filtered packet. It is owned by the caller and must be freed using av_packet_unref() when it is no longer needed. This parameter should be "clean" (i.e. freshly allocated with av_packet_alloc() or unreffed with av_packet_unref()) when this function is called. If this function returns successfully, the contents of pkt will be completely overwritten by the returned data. On failure, pkt is not touched.
Returns
0 on success. AVERROR(EAGAIN) if more packets need to be sent to the filter (using av_bsf_send_packet()) to get more output. AVERROR_EOF if there will be no further output from the filter. Another negative AVERROR value if an error occurs.
Note
one input packet may result in several output packets, so after sending a packet with av_bsf_send_packet(), this function needs to be called repeatedly until it stops returning 0. It is also possible for a filter to output fewer packets than were sent to it, so this function may return AVERROR(EAGAIN) immediately after a successful av_bsf_send_packet() call.

Definition at line 194 of file bsf.c.

Referenced by av_bitstream_filter_filter(), av_interleaved_write_frame(), ffat_decode(), and mediacodec_decode_frame().

void av_bsf_free ( AVBSFContext **  ctx)

Free a bitstream filter context and everything associated with it; write NULL into the supplied pointer.

Definition at line 33 of file bsf.c.

Referenced by av_bitstream_filter_close(), av_bitstream_filter_init(), av_bsf_alloc(), cuvid_decode_end(), cuvid_decode_init(), ff_stream_add_bitstream_filter(), ffat_close_decoder(), ffat_decode(), free_stream(), and mediacodec_decode_close().

const AVClass* av_bsf_get_class ( void  )

Get the AVClass for AVBSFContext.

It can be used in combination with AV_OPT_SEARCH_FAKE_OBJ for examining options.

See Also
av_opt_find().

Definition at line 74 of file bsf.c.

void av_fast_padded_malloc ( void ptr,
unsigned int *  size,
size_t  min_size 
)
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.

Definition at line 132 of file utils.c.

Referenced by decode_idat_chunk(), and encode_frame().

unsigned int av_xiphlacing ( unsigned char *  s,
unsigned int  v 
)

Encode extradata length to a buffer.

Used by xiph codecs.

Parameters
sbuffer to write to; must be at least (v/255+1) bytes long
vsize of extradata in bytes
Returns
number of bytes written to the buffer.

Definition at line 3674 of file utils.c.

Referenced by fixup_vorbis_headers(), libvorbis_encode_init(), parse_packed_headers(), and put_main_header().

attribute_deprecated void av_log_missing_feature ( void avc,
const char *  feature,
int  want_sample 
)

Log a generic warning message about a missing feature.

This function is intended to be used internally by FFmpeg (libavcodec, libavformat, etc.) only, and would normally not be used by applications.

Parameters
[in]avca pointer to an arbitrary struct of which the first field is a pointer to an AVClass struct
[in]featurestring containing the name of the missing feature
[in]want_sampleindicates if samples are wanted which exhibit this feature. If want_sample is non-zero, additional verbiage will be added to the log message which tells the user how to report samples to the development mailing list.
Deprecated:
Use avpriv_report_missing_feature() instead.

Definition at line 3697 of file utils.c.

attribute_deprecated void av_log_ask_for_sample ( void avc,
const char *  msg,
  ... 
)

Log a generic warning message asking for a sample.

This function is intended to be used internally by FFmpeg (libavcodec, libavformat, etc.) only, and would normally not be used by applications.

Parameters
[in]avca pointer to an arbitrary struct of which the first field is a pointer to an AVClass struct
[in]msgstring containing an optional message, or NULL if no message
Deprecated:
Use avpriv_request_sample() instead.
attribute_deprecated void void av_register_hwaccel ( AVHWAccel hwaccel)

Register the hardware accelerator hwaccel.

Definition at line 3727 of file utils.c.

AVHWAccel* av_hwaccel_next ( const AVHWAccel hwaccel)

If hwaccel is NULL, returns the first registered hardware accelerator, if hwaccel is non-NULL, returns the next registered hardware accelerator after hwaccel, or NULL if hwaccel is the last one.

Definition at line 3736 of file utils.c.

Referenced by find_hwaccel().

int av_lockmgr_register ( int(*)(void **mutex, enum AVLockOp op cb)

Register a user provided lock manager supporting the operations specified by AVLockOp.

The "mutex" argument to the function points to a (void *) where the lockmgr should store/get a pointer to a user allocated mutex. It is NULL upon AV_LOCK_CREATE and equal to the value left by the last call for all other ops. If the lock manager is unable to perform the op then it should leave the mutex in the same state as when it was called and return a non-zero value. However, when called with AV_LOCK_DESTROY the mutex will always be assumed to have been successfully destroyed. If av_lockmgr_register succeeds it will return a non-negative value, if it fails it will return a negative value and destroy all mutex and unregister all callbacks. av_lockmgr_register is not thread-safe, it must be called from a single thread before any calls which make use of locking are used.

Parameters
cbUser defined callback. av_lockmgr_register invokes calls to this callback and the previously registered callback. The callback will be used to create more than one mutex each of which must be backed by its own underlying locking mechanism (i.e. do not use a single static object to implement your lock manager). If cb is set to NULL the lockmgr will be unregistered.

Definition at line 3741 of file utils.c.

Referenced by do_exit(), and main().

enum AVMediaType avcodec_get_type ( enum AVCodecID  codec_id)

Get the type of the given codec.

Definition at line 2985 of file codec_desc.c.

Referenced by m4sl_cb(), and mkv_query_codec().

const char* avcodec_get_name ( enum AVCodecID  id)
int avcodec_is_open ( AVCodecContext s)
int av_codec_is_encoder ( const AVCodec codec)
int av_codec_is_decoder ( const AVCodec codec)
Returns
a non-zero number if codec is a decoder, zero otherwise

Definition at line 173 of file utils.c.

Referenced by avcodec_find_decoder_by_name(), avcodec_open2(), avcodec_receive_frame(), avcodec_send_packet(), find_encdec(), and next_codec_for_id().

const AVCodecDescriptor* avcodec_descriptor_get ( enum AVCodecID  id)
const AVCodecDescriptor* avcodec_descriptor_next ( const AVCodecDescriptor prev)

Iterate over all codec descriptors known to libavcodec.

Parameters
prevprevious descriptor. NULL to get the first descriptor.
Returns
next descriptor or NULL after the last descriptor

Definition at line 2966 of file codec_desc.c.

Referenced by avcodec_descriptor_get_by_name(), and get_codecs_sorted().

const AVCodecDescriptor* avcodec_descriptor_get_by_name ( const char *  name)
Returns
codec descriptor with the given name or NULL if no such descriptor exists.

Definition at line 2975 of file codec_desc.c.

Referenced by find_codec_or_die(), and show_help_codec().

AVCPBProperties* av_cpb_properties_alloc ( size_t *  size)

Allocate a CPB properties structure and initialize its fields to default values.

Parameters
sizeif non-NULL, the size of the allocated struct will be written here. This is useful for embedding it in side data.
Returns
the newly allocated struct or NULL on failure

Definition at line 3978 of file utils.c.

Referenced by ff_add_cpb_side_data(), and ff_mpv_encode_picture().