FFmpeg
|
Modules | |
Pixel formats | |
Functions for working with pixel formats. | |
FFT functions | |
Data Structures | |
struct | AVBitStreamFilterContext |
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, 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 codec 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) |
attribute_deprecated AVBitStreamFilterContext * | av_bitstream_filter_init (const char *name) |
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) |
attribute_deprecated void | av_bitstream_filter_close (AVBitStreamFilterContext *bsf) |
const attribute_deprecated AVBitStreamFilter * | av_bitstream_filter_next (const AVBitStreamFilter *f) |
const attribute_deprecated AVBitStreamFilter * | av_bsf_next (void **opaque) |
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_register_hwaccel (AVHWAccel *hwaccel) |
Register the hardware accelerator hwaccel. More... | |
attribute_deprecated 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. More... | |
attribute_deprecated int | av_lockmgr_register (int(*cb)(void **mutex, enum AVLockOp op)) |
Register a user provided lock manager supporting the operations specified by AVLockOp. More... | |
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. More... | |
Miscellaneous utility functions related to both encoding and decoding (or neither).
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. |
attribute_deprecated 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.
buf | buffer to place codec tag in |
buf_size | size in bytes of buf |
codec_tag | codec tag to assign |
void avcodec_string | ( | char * | buf, |
int | buf_size, | ||
AVCodecContext * | enc, | ||
int | encode | ||
) |
Definition at line 1246 of file utils.c.
Referenced by avformat_find_stream_info(), and dump_stream_format().
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 |
Definition at line 1454 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 451 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.
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.
Definition at line 1080 of file utils.c.
Referenced by compat_decode(), compute_crc_of_packets(), decoder_decode_frame(), imm5_flush(), process_command(), process_input(), and rewind_file().
Return codec bits per sample.
[in] | codec_id | the codec |
Definition at line 1574 of file utils.c.
Referenced by adpcm_encode_init(), aiff_write_header(), avformat_find_stream_info(), caf_write_header(), epaf_read_header(), ff_alsa_open(), 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(), 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(), and wve_read_header().
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 |
Definition at line 1552 of file utils.c.
Referenced by lavfi_read_header(), and main().
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 |
Definition at line 1490 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.
avctx | codec context |
frame_bytes | size of the frame, or 0 if unknown |
Definition at line 1799 of file utils.c.
Referenced by do_streamcopy(), and ff_compute_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.
Definition at line 1809 of file utils.c.
Referenced by adp_read_header(), build_frame_code(), enable_pcr_generation_for_stream(), ff_compute_frame_duration(), ff_parse_specific_params(), ff_put_wav_header(), ff_voc_get_packet(), get_aiff_header(), msf_read_header(), rm_write_header(), rsd_read_header(), rtp_send_ilbc(), rv10_write_header(), swf_write_audio(), and vpk_read_seek().
attribute_deprecated void av_register_bitstream_filter | ( | AVBitStreamFilter * | bsf | ) |
Use the new bitstream filtering API (using AVBSFContext).
Definition at line 42 of file bitstream_filter.c.
attribute_deprecated AVBitStreamFilterContext* av_bitstream_filter_init | ( | const char * | name | ) |
Use av_bsf_get_by_name(), av_bsf_alloc(), and av_bsf_init() from the new bitstream filtering API (using AVBSFContext).
Definition at line 51 of file bitstream_filter.c.
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 | ||
) |
Use av_bsf_send_packet() and av_bsf_receive_packet() from the new bitstream filtering API (using AVBSFContext).
Definition at line 97 of file bitstream_filter.c.
attribute_deprecated void av_bitstream_filter_close | ( | AVBitStreamFilterContext * | bsf | ) |
Use av_bsf_free() from the new bitstream filtering API (using AVBSFContext).
Definition at line 83 of file bitstream_filter.c.
const attribute_deprecated AVBitStreamFilter* av_bitstream_filter_next | ( | const AVBitStreamFilter * | f | ) |
Use av_bsf_iterate() from the new bitstream filtering API (using AVBSFContext).
Definition at line 31 of file bitstream_filter.c.
const attribute_deprecated AVBitStreamFilter* av_bsf_next | ( | void ** | opaque | ) |
Definition at line 78 of file bitstream_filters.c.
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.
Definition at line 70 of file utils.c.
Referenced by allocate_buffers(), allocate_buffers2(), ape_decode_frame(), cdtoons_decode_frame(), cdxl_decode_frame(), cllc_decode_frame(), dcadec_decode_frame(), decode(), decode_block(), decode_frame(), decode_huffman2(), decode_i_frame(), decode_idat_chunk(), decode_inter(), decode_inter_plane(), decode_intra(), decode_intra_plane(), decode_motion_vectors(), decode_mous(), decode_move(), decode_p_frame(), decode_zlib(), deinvert_buffer(), encode_frame(), ff_alloc_packet2(), 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(), and xpm_decode_frame().
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 82 of file utils.c.
Referenced by decode_idat_chunk(), encode_frame(), and init_buffers().
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 |
Definition at line 1827 of file utils.c.
Referenced by fixup_vorbis_headers(), libvorbis_encode_init(), parse_packed_headers(), put_main_header(), and track_header().
attribute_deprecated void av_register_hwaccel | ( | AVHWAccel * | hwaccel | ) |
Register the hardware accelerator hwaccel.
attribute_deprecated 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.
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.
cb | User 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. |
int avcodec_is_open | ( | AVCodecContext * | s | ) |
Definition at line 1962 of file utils.c.
Referenced by avcodec_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(), and try_decode_video_frame().
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. |
Definition at line 2023 of file utils.c.
Referenced by ff_add_cpb_side_data(), and ff_mpv_encode_picture().