Movatterモバイル変換


[0]ホーム

URL:


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

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 size_t av_get_codec_tag_string (char *buf, size_t buf_size, unsignedint codec_tag)
 Put a string representing the codec tag codec_tag in buf.More...
 
void avcodec_string (char *buf,int buf_size,AVCodecContext *enc,intencode)
 
const char * av_get_profile_name (constAVCodec *codec,intprofile)
 Return a name for the specified profile, if available.More...
 
const char * avcodec_profile_name (enumAVCodecIDcodec_id,intprofile)
 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,intcount,intsize)
 
int avcodec_default_execute2 (AVCodecContext *c,int(*func)(AVCodecContext *c2,void *arg2,int,int),void *arg,int *ret,intcount)
 
int avcodec_fill_audio_frame (AVFrame *frame,intnb_channels, enumAVSampleFormat sample_fmt, constuint8_t *buf,int buf_size,intalign)
 FillAVFrame 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 (enumAVCodecIDcodec_id)
 Return codec bits per sample.More...
 
enumAVCodecID av_get_pcm_codec (enumAVSampleFormatfmt,int be)
 Return the PCM codec associated with a sample format.More...
 
int av_get_exact_bits_per_sample (enumAVCodecIDcodec_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 asav_get_audio_frame_duration(), except it works withAVCodecParameters instead of anAVCodecContext.More...
 
attribute_deprecatedvoid av_register_bitstream_filter (AVBitStreamFilter *bsf)
 
attribute_deprecated
AVBitStreamFilterContext
av_bitstream_filter_init (const char *name)
 
attribute_deprecatedint av_bitstream_filter_filter (AVBitStreamFilterContext *bsfc,AVCodecContext *avctx, const char *args,uint8_t **poutbuf,int *poutbuf_size, constuint8_t *buf,int buf_size,int keyframe)
 
attribute_deprecatedvoid av_bitstream_filter_close (AVBitStreamFilterContext *bsf)
 
attribute_deprecated const
AVBitStreamFilter
av_bitstream_filter_next (constAVBitStreamFilter *f)
 
constAVBitStreamFilterav_bsf_get_by_name (const char *name)
 
constAVBitStreamFilterav_bsf_iterate (void **opaque)
 Iterate over all registered bitstream filters.More...
 
attribute_deprecated const
AVBitStreamFilter
av_bsf_next (void **opaque)
 
int av_bsf_alloc (constAVBitStreamFilter *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_flush (AVBSFContext *ctx)
 Reset the internal bitstream filter state / flush internal buffers.More...
 
void av_bsf_free (AVBSFContext **ctx)
 Free a bitstream filter context and everything associated with it; write NULL into the supplied pointer.More...
 
constAVClassav_bsf_get_class (void)
 Get theAVClass forAVBSFContext.More...
 
AVBSFListav_bsf_list_alloc (void)
 Allocate empty list of bitstream filters.More...
 
void av_bsf_list_free (AVBSFList **lst)
 Free list of bitstream filters.More...
 
int av_bsf_list_append (AVBSFList *lst,AVBSFContext *bsf)
 Append bitstream filter to the list of bitstream filters.More...
 
int av_bsf_list_append2 (AVBSFList *lst, const char *bsf_name,AVDictionary **options)
 Construct new bitstream filter context given it's name and options and append it to the list of bitstream filters.More...
 
int av_bsf_list_finalize (AVBSFList **lst,AVBSFContext **bsf)
 Finalize list of bitstream filters.More...
 
int av_bsf_list_parse_str (const char *str,AVBSFContext **bsf)
 Parse string describing list of bitstream filters and create singleAVBSFContext describing the whole chain of bitstream filters.More...
 
int av_bsf_get_null_filter (AVBSFContext **bsf)
 Get null/pass-through bitstream filter.More...
 
void av_fast_padded_malloc (void *ptr, unsignedint *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, unsignedint *size, size_t min_size)
 Same behaviour av_fast_padded_malloc except that buffer will always be 0-initialized after call.More...
 
unsignedint av_xiphlacing (unsigned char *s, unsignedint v)
 Encode extradata length to a buffer.More...
 
attribute_deprecatedvoid av_register_hwaccel (AVHWAccel *hwaccel)
 Register the hardware accelerator hwaccel.More...
 
attribute_deprecatedAVHWAccelav_hwaccel_next (constAVHWAccel *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...
 
attribute_deprecatedint av_lockmgr_register (int(*cb)(void **mutex, enumAVLockOpop))
 Register a user provided lock manager supporting the operations specified by AVLockOp.More...
 
enumAVMediaType avcodec_get_type (enumAVCodecIDcodec_id)
 Get the type of the given codec.More...
 
const char * avcodec_get_name (enumAVCodecIDid)
 Get the name of a codec.More...
 
int avcodec_is_open (AVCodecContext *s)
 
int av_codec_is_encoder (constAVCodec *codec)
 
int av_codec_is_decoder (constAVCodec *codec)
 
constAVCodecDescriptoravcodec_descriptor_get (enumAVCodecIDid)
 
constAVCodecDescriptoravcodec_descriptor_next (constAVCodecDescriptor *prev)
 Iterate over all codec descriptors known to libavcodec.More...
 
constAVCodecDescriptoravcodec_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

enumAVLockOp

Lock operation used by lockmgr.

Deprecated:
Deprecated together withav_lockmgr_register().
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 line6069 of fileavcodec.h.

Function Documentation

attribute_deprecated size_t av_get_codec_tag_string(char * buf,
size_t buf_size,
unsignedint 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
Deprecated:
seeav_fourcc_make_string() andav_fourcc2str().

Definition at line1155 of fileutils.c.

void avcodec_string(char * buf,
int buf_size,
AVCodecContextenc,
int encode 
)

Definition at line1175 of fileutils.c.

Referenced byavformat_find_stream_info(), anddump_stream_format().

const char* av_get_profile_name(constAVCodeccodec,
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 line1370 of fileutils.c.

const char* avcodec_profile_name(enumAVCodecID 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
unlikeav_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 theAVCodecDescriptor

Definition at line1383 of fileutils.c.

Referenced byavcodec_string(), andshow_stream().

int avcodec_default_execute(AVCodecContextc,
int(*)(AVCodecContext *c2,void *arg2) func,
voidarg,
intret,
int count,
int size 
)

Definition at line431 of fileutils.c.

Referenced byinit_context_defaults(), andthread_execute().

int avcodec_default_execute2(AVCodecContextc,
int(*)(AVCodecContext *c2,void *arg2,int,intfunc,
voidarg,
intret,
int count 
)

Referenced byinit_context_defaults().

int avcodec_fill_audio_frame(AVFrameframe,
int nb_channels,
enumAVSampleFormat sample_fmt,
constuint8_tbuf,
int buf_size,
int align 
)

FillAVFrame 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 filledAVFrame data pointers will point to this buffer.

AVFrame extended_data channel pointers are allocated if necessary for planar audio.

Parameters
frametheAVFrame 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

Definition at line372 of fileutils.c.

void avcodec_flush_buffers(AVCodecContextavctx)

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 line1981 of filedecode.c.

Referenced bycompat_decode(),compute_crc_of_packets(),decoder_decode_frame(),process_command(),process_input(), andrewind_file().

int av_get_bits_per_sample(enumAVCodecID codec_id)

Return codec bits per sample.

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

Definition at line1504 of fileutils.c.

Referenced byadpcm_encode_init(),aiff_write_header(),avformat_find_stream_info(),caf_write_header(),epaf_read_header(),ff_alsa_open(),ff_audio_interleave_init(),ff_pcm_read_seek(),ff_put_wav_header(),ff_voc_get_packet(),g722_read_header(),get_aiff_header(),get_bit_rate(),gxf_packet(),iff_read_header(),init_muxer(),ircam_read_header(),mkv_write_track(),mov_get_codec_tag(),mov_init(),mov_parse_stsd_audio(),mov_write_audio_tag(),mxf_handle_missing_index_segment(),mxf_parse_structural_metadata(),mxf_set_audio_pts(),mxf_write_generic_sound_common(),mxf_write_header(),oma_read_header(),pcm_decode_frame(),pcm_decode_init(),pcm_encode_frame(),pcm_encode_init(),pcm_read_header(),pulse_read_packet(),read_header(),rso_read_header(),show_stream(), andwve_read_header().

enumAVCodecID av_get_pcm_codec(enumAVSampleFormat 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 line1482 of fileutils.c.

Referenced bylavfi_read_header(), andmain().

int av_get_exact_bits_per_sample(enumAVCodecID 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 line1421 of fileutils.c.

Referenced byav_get_bits_per_sample(),get_audio_frame_duration(), andnew_output_stream().

int av_get_audio_frame_duration(AVCodecContextavctx,
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 line1710 of fileutils.c.

Referenced bydo_streamcopy().

int av_get_audio_frame_duration2(AVCodecParameterspar,
int frame_bytes 
)

This function is the same asav_get_audio_frame_duration(), except it works withAVCodecParameters instead of anAVCodecContext.

Definition at line1719 of fileutils.c.

Referenced byadp_read_header(),build_frame_code(),ff_parse_specific_params(),ff_put_wav_header(),ff_voc_get_packet(),get_aiff_header(),mpegts_init(),msf_read_header(),rm_write_header(),rsd_read_header(),rtp_send_ilbc(), andswf_write_audio().

attribute_deprecatedvoid av_register_bitstream_filter(AVBitStreamFilterbsf)
Deprecated:
the old bitstream filtering API (usingAVBitStreamFilterContext) is deprecated. Use the new bitstream filtering API (usingAVBSFContext).

Definition at line42 of filebitstream_filter.c.

attribute_deprecatedAVBitStreamFilterContext* av_bitstream_filter_init(const char * name)
Deprecated:
the old bitstream filtering API (usingAVBitStreamFilterContext) is deprecated. Useav_bsf_get_by_name(),av_bsf_alloc(), andav_bsf_init() from the new bitstream filtering API (usingAVBSFContext).

Definition at line51 of filebitstream_filter.c.

attribute_deprecatedint av_bitstream_filter_filter(AVBitStreamFilterContextbsfc,
AVCodecContextavctx,
const char * args,
uint8_t ** poutbuf,
intpoutbuf_size,
constuint8_tbuf,
int buf_size,
int keyframe 
)
Deprecated:
the old bitstream filtering API (usingAVBitStreamFilterContext) is deprecated. Useav_bsf_send_packet() andav_bsf_receive_packet() from the new bitstream filtering API (usingAVBSFContext).

Definition at line97 of filebitstream_filter.c.

attribute_deprecatedvoid av_bitstream_filter_close(AVBitStreamFilterContextbsf)
Deprecated:
the old bitstream filtering API (usingAVBitStreamFilterContext) is deprecated. Useav_bsf_free() from the new bitstream filtering API (usingAVBSFContext).

Definition at line83 of filebitstream_filter.c.

attribute_deprecated constAVBitStreamFilter* av_bitstream_filter_next(constAVBitStreamFilterf)
Deprecated:
the old bitstream filtering API (usingAVBitStreamFilterContext) is deprecated. Useav_bsf_iterate() from the new bitstream filtering API (usingAVBSFContext).

Definition at line31 of filebitstream_filter.c.

constAVBitStreamFilter* 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 line77 of filebitstream_filters.c.

Referenced byaom_init(),av_bitstream_filter_init(),av_bsf_list_append2(),cuvid_decode_init(),detect_stream_specific(),extract_extradata_check(),extract_extradata_init(),ff_decode_bsfs_init(),ff_stream_add_bitstream_filter(),new_output_stream(), andshow_help_bsf().

constAVBitStreamFilter* av_bsf_iterate(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 line60 of filebitstream_filters.c.

Referenced byav_bitstream_filter_next(),av_bsf_get_by_name(),av_bsf_next(),ff_bsf_child_class_next(), andshow_bsfs().

attribute_deprecated constAVBitStreamFilter* av_bsf_next(void ** opaque)

Definition at line72 of filebitstream_filters.c.

int av_bsf_alloc(constAVBitStreamFilterfilter,
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 callav_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 withav_bsf_free() after the filtering is done.
Returns
0 on success, a negative AVERROR code on failure

Definition at line81 of filebsf.c.

Referenced byaom_init(),av_bitstream_filter_filter(),av_bsf_get_null_filter(),av_bsf_list_append2(),av_bsf_list_finalize(),cuvid_decode_init(),detect_stream_specific(),extract_extradata_init(),ff_decode_bsfs_init(),ff_stream_add_bitstream_filter(), andnew_output_stream().

int av_bsf_init(AVBSFContextctx)

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

Definition at line134 of filebsf.c.

Referenced byaom_init(),av_bitstream_filter_filter(),bsf_list_init(),cuvid_decode_init(),detect_stream_specific(),extract_extradata_init(),ff_decode_bsfs_init(),ff_stream_add_bitstream_filter(),init_output_bsfs(), andopen_slave().

int av_bsf_send_packet(AVBSFContextctx,
AVPacketpkt 
)

Submit a packet for filtering.

After sending each packet, the filter must be completely drained by callingav_bsf_receive_packet() repeatedly until it returnsAVERROR(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 line185 of filebsf.c.

Referenced byav_bitstream_filter_filter(),avcodec_send_packet(),bsf_list_filter(),bsfs_poll(),do_packet_auto_bsf(),extract_extradata(),filter_packet(),output_packet(),storeframe(), andtee_write_packet().

int av_bsf_receive_packet(AVBSFContextctx,
AVPacketpkt 
)

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 usingav_packet_unref() when it is no longer needed. This parameter should be "clean" (i.e. freshly allocated withav_packet_alloc() or unreffed withav_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 (usingav_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 withav_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 returnAVERROR(EAGAIN) immediately after a successfulav_bsf_send_packet() call.

Definition at line211 of filebsf.c.

Referenced byav_bitstream_filter_filter(),bsf_list_filter(),bsfs_poll(),do_packet_auto_bsf(),extract_extradata(),filter_packet(),output_packet(),storeframe(), andtee_write_packet().

void av_bsf_flush(AVBSFContextctx)

Reset the internal bitstream filter state / flush internal buffers.

Definition at line175 of filebsf.c.

Referenced bybsfs_flush().

void av_bsf_free(AVBSFContext ** ctx)

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

Definition at line35 of filebsf.c.

Referenced byaom_free(),av_bitstream_filter_close(),av_bitstream_filter_init(),av_bsf_alloc(),av_bsf_list_append2(),av_bsf_list_free(),avformat_find_stream_info(),bsf_list_close(),close_slave(),concat_read_close(),cuvid_decode_end(),cuvid_decode_init(),extract_extradata_init(),ff_decode_bsfs_uninit(),ff_stream_add_bitstream_filter(),ffmpeg_cleanup(), andfree_stream().

constAVClass* av_bsf_get_class(void )

Get theAVClass forAVBSFContext.

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

See Also
av_opt_find().

Definition at line76 of filebsf.c.

Referenced byshow_help_default().

AVBSFList* av_bsf_list_alloc(void )

Allocate empty list of bitstream filters.

The list must be later freed byav_bsf_list_free() or finalized byav_bsf_list_finalize().

Returns
Pointer toAVBSFList on success, NULL in case of failure

Definition at line409 of filebsf.c.

Referenced byav_bsf_list_parse_str().

void av_bsf_list_free(AVBSFList ** lst)

Free list of bitstream filters.

Parameters
lstPointer to pointer returned byav_bsf_list_alloc()

Definition at line414 of filebsf.c.

Referenced byav_bsf_list_parse_str().

int av_bsf_list_append(AVBSFListlst,
AVBSFContextbsf 
)

Append bitstream filter to the list of bitstream filters.

Parameters
lstList to append to
bsfFilter context to be appended
Returns
>=0 on success, negative AVERROR in case of failure

Definition at line427 of filebsf.c.

Referenced byav_bsf_list_append2().

int av_bsf_list_append2(AVBSFListlst,
const char * bsf_name,
AVDictionary ** options 
)

Construct new bitstream filter context given it's name and options and append it to the list of bitstream filters.

Parameters
lstList to append to
bsf_nameName of the bitstream filter
optionsOptions for the bitstream filter, can be set to NULL
Returns
>=0 on success, negative AVERROR in case of failure

Definition at line432 of filebsf.c.

Referenced bybsf_parse_single().

int av_bsf_list_finalize(AVBSFList ** lst,
AVBSFContext ** bsf 
)

Finalize list of bitstream filters.

This function will transformAVBSFList to singleAVBSFContext, so the whole chain of bitstream filters can be treated as single filter freshly allocated byav_bsf_alloc(). If the call is successful,AVBSFList structure is freed and lst will be set to NULL. In case of failure, caller is responsible for freeing the structure byav_bsf_list_free()

Parameters
lstFilter list structure to be transformed
[out]bsfPointer to be set to newly createdAVBSFContext structure representing the chain of bitstream filters
Returns
>=0 on success, negative AVERROR in case of failure

Definition at line461 of filebsf.c.

Referenced byav_bsf_list_parse_str().

int av_bsf_list_parse_str(const char * str,
AVBSFContext ** bsf 
)

Parse string describing list of bitstream filters and create singleAVBSFContext describing the whole chain of bitstream filters.

ResultingAVBSFContext can be treated as any otherAVBSFContext freshly allocated byav_bsf_alloc().

Parameters
strString describing chain of bitstream filters in formatbsf1[=opt1=val1:opt2=val2][,bsf2]
[out]bsfPointer to be set to newly createdAVBSFContext structure representing the chain of bitstream filters
Returns
>=0 on success, negative AVERROR in case of failure

Definition at line516 of filebsf.c.

Referenced byopen_slave().

int av_bsf_get_null_filter(AVBSFContext ** bsf)

Get null/pass-through bitstream filter.

Parameters
[out]bsfPointer to be set to new instance of pass-through bitstream filter
Returns

Definition at line554 of filebsf.c.

Referenced byav_bsf_list_parse_str(), andopen_slave().

void av_fast_padded_malloc(voidptr,
unsignedintsize,
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.

Definition at line70 of fileutils.c.

Referenced byallocate_buffers(),allocate_buffers2(),ape_decode_frame(),cdxl_decode_frame(),cllc_decode_frame(),dcadec_decode_frame(),decode(),decode_block(),decode_frame(),decode_i_frame(),decode_idat_chunk(),decode_mous(),decode_move(),decode_p_frame(),decode_zlib(),deinvert_buffer(),encode_frame(),ff_alloc_packet2(),ff_h2645_packet_split(),ff_mjpeg_find_marker(),ff_mpeg4_frame_end(),ff_mpv_reallocate_putbitbuffer(),generate_fake_vps(),mimic_decode_frame(),mp_decode_frame(),mpc7_decode_frame(),parse_nal_units(),parse_object_segment(),raw_decode(),svq1_decode_frame(),svq3_decode_frame(),tiff_unpack_fax(),tiff_unpack_strip(),tqi_decode_frame(),utvideo_encode_frame(),wavpack_encode_block(),wavpack_encode_frame(),wv_stereo(), andxpm_decode_frame().

void av_fast_padded_mallocz(voidptr,
unsignedintsize,
size_t min_size 
)

Same behaviour av_fast_padded_malloc except that buffer will always be 0-initialized after call.

Definition at line82 of fileutils.c.

Referenced bydecode_idat_chunk(),encode_frame(), andinit_buffers().

unsignedint av_xiphlacing(unsigned char * s,
unsignedint 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 line1736 of fileutils.c.

Referenced byfixup_vorbis_headers(),libvorbis_encode_init(),parse_packed_headers(), andput_main_header().

attribute_deprecatedvoid av_register_hwaccel(AVHWAccelhwaccel)

Register the hardware accelerator hwaccel.

Deprecated:
This function doesn't do anything.

Definition at line1774 of fileutils.c.

attribute_deprecatedAVHWAccel* av_hwaccel_next(constAVHWAccelhwaccel)

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.

Deprecated:
AVHWaccel structures contain no user-serviceable parts, so this function should not be used.

Definition at line1769 of fileutils.c.

attribute_deprecatedint av_lockmgr_register(int(*)(void **mutex, enumAVLockOpopcb)

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.
Deprecated:
This function does nothing, and always returns 0. Be sure to build with thread support to get basic thread safety.

Definition at line1780 of fileutils.c.

enumAVMediaType avcodec_get_type(enumAVCodecID codec_id)

Get the type of the given codec.

Definition at line3224 of filecodec_desc.c.

Referenced bym4sl_cb(),mkv_query_codec(), andmxf_parse_structural_metadata().

const char* avcodec_get_name(enumAVCodecID id)

Get the name of a codec.

Returns
a static string identifying the codec; never NULL
Examples:
muxing.c.

Definition at line1135 of fileutils.c.

Referenced byadd_stream(),avcodec_string(),avformat_find_stream_info(),choose_encoder(),configure_filtergraph(),device_try_init(),ff_framehash_write_header(),flv_write_header(),get_audio_flags(),init_input_stream(),log_slave(),lrc_write_header(),mkv_init(),mkv_write_codecprivate(),mov_init(),mpeg_mux_init(),mxf_parse_structural_metadata(),read_frame_internal(),rtp_write_header(),scc_write_header(),srt_write_header(), andstream_component_open().

int avcodec_is_open(AVCodecContexts)
Returns
a positive value if s is open (i.e.avcodec_open2() was called on it with no correspondingavcodec_close()), 0 otherwise.

Definition at line1871 of fileutils.c.

Referenced byavcodec_close(),avcodec_copy_context(),avcodec_open2(),avcodec_receive_frame(),avcodec_receive_packet(),avcodec_send_frame(),avcodec_send_packet(),mpegts_set_stream_info(),read_frame_internal(),try_decode_frame(), andtry_decode_video_frame().

int av_codec_is_encoder(constAVCodeccodec)
Returns
a non-zero number if codec is an encoder, zero otherwise

Definition at line94 of fileutils.c.

Referenced byalloc_frame_buffer(),avcodec_close(),avcodec_find_encoder(),avcodec_find_encoder_by_name(),avcodec_open2(),avcodec_receive_packet(),avcodec_send_frame(),ff_slice_thread_init(),ff_snow_get_buffer(),init_band_stepsize(),main(),next_codec_for_id(), andprint_codec().

int av_codec_is_decoder(constAVCodeccodec)
Returns
a non-zero number if codec is a decoder, zero otherwise

Definition at line99 of fileutils.c.

Referenced byavcodec_find_decoder(),avcodec_find_decoder_by_name(),avcodec_open2(),avcodec_receive_frame(),avcodec_send_packet(),ff_v4l2_m2m_codec_full_reinit(),find_probe_decoder(),next_codec_for_id(),v4l2_configure_contexts(), andv4l2_get_framesize_compressed().

constAVCodecDescriptor* avcodec_descriptor_get(enumAVCodecID id)
Returns
descriptor for given codec ID or NULL if no descriptor exists.

Definition at line3199 of filecodec_desc.c.

Referenced byasf_write_header1(),av_bsf_init(),avcodec_get_name(),avcodec_get_type(),avcodec_open2(),avcodec_profile_name(),ico_check_attributes(),init_muxer(),init_output_stream(),is_intra_only(),list_formats(),main(),open_output_file(),show_help_muxer(),show_stream(),transcode_init(),unsupported_codec(), andvaapi_decode_make_config().

constAVCodecDescriptor* avcodec_descriptor_next(constAVCodecDescriptorprev)

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 line3205 of filecodec_desc.c.

Referenced byavcodec_descriptor_get_by_name(),get_codecs_sorted(), andmain().

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

Definition at line3214 of filecodec_desc.c.

Referenced byfind_codec_or_die(),main(),show_help_codec(), andv4l2_read_header().

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 line1932 of fileutils.c.

Referenced byff_add_cpb_side_data(), andff_mpv_encode_picture().


Generated on Tue Nov 6 2018 18:11:56 for FFmpeg by  doxygen 1.8.6
[8]ページ先頭

©2009-2025 Movatter.jp