FFmpeg
|
Go to the source code of this file.
Data Structures | |
struct | FFCodecDefault |
struct | FFCodec |
Macros | |
#define | FF_CODEC_CAP_NOT_INIT_THREADSAFE (1 << 0) |
The codec is not known to be init-threadsafe (i.e. More... | |
#define | FF_CODEC_CAP_INIT_CLEANUP (1 << 1) |
The codec allows calling the close function for deallocation even if the init function returned a failure. More... | |
#define | FF_CODEC_CAP_SETS_PKT_DTS (1 << 2) |
Decoders marked with FF_CODEC_CAP_SETS_PKT_DTS want to set AVFrame.pkt_dts manually. More... | |
#define | FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM (1 << 3) |
The decoder extracts and fills its parameters even if the frame is skipped due to the skip_frame setting. More... | |
#define | FF_CODEC_CAP_EXPORTS_CROPPING (1 << 4) |
The decoder sets the cropping fields in the output frames manually. More... | |
#define | FF_CODEC_CAP_SLICE_THREAD_HAS_MF (1 << 5) |
Codec initializes slice-based threading with a main function. More... | |
#define | FF_CODEC_CAP_ALLOCATE_PROGRESS (1 << 6) |
#define | FF_CODEC_CAP_AUTO_THREADS (1 << 7) |
Codec handles avctx->thread_count == 0 (auto) internally. More... | |
#define | FF_CODEC_CAP_SETS_FRAME_PROPS (1 << 8) |
Codec handles output frame properties internally instead of letting the internal logic derive them from AVCodecInternal.last_pkt_props. More... | |
#define | FF_CODEC_CAP_ICC_PROFILES (1 << 9) |
Codec supports embedded ICC profiles (AV_FRAME_DATA_ICC_PROFILE). More... | |
#define | FF_CODEC_CAP_EOF_FLUSH (1 << 10) |
The encoder has AV_CODEC_CAP_DELAY set, but does not actually have delay - it only wants to be flushed at the end to update some context variables (e.g. More... | |
#define | FF_CODEC_TAGS_END -1 |
FFCodec.codec_tags termination value. More... | |
#define | CODEC_LONG_NAME(str) .p.long_name = str |
#define | UPDATE_THREAD_CONTEXT(func) .update_thread_context = NULL |
#define | UPDATE_THREAD_CONTEXT_FOR_USER(func) .update_thread_context_for_user = NULL |
#define | CODEC_OLD_CHANNEL_LAYOUTS(...) |
#define | CODEC_OLD_CHANNEL_LAYOUTS_ARRAY(array) |
#define | FF_CODEC_DECODE_CB(func) |
#define | FF_CODEC_DECODE_SUB_CB(func) |
#define | FF_CODEC_RECEIVE_FRAME_CB(func) |
#define | FF_CODEC_ENCODE_CB(func) |
#define | FF_CODEC_ENCODE_SUB_CB(func) |
#define | FF_CODEC_RECEIVE_PACKET_CB(func) |
Functions | |
static const av_always_inline FFCodec * | ffcodec (const AVCodec *codec) |
#define FF_CODEC_CAP_NOT_INIT_THREADSAFE (1 << 0) |
The codec is not known to be init-threadsafe (i.e.
it might be unsafe to initialize this codec and another codec concurrently, typically because the codec calls external APIs that are not known to be thread-safe). Therefore calling the codec's init function needs to be guarded with a lock.
Definition at line 34 of file codec_internal.h.
#define FF_CODEC_CAP_INIT_CLEANUP (1 << 1) |
The codec allows calling the close function for deallocation even if the init function returned a failure.
Without this capability flag, a codec does such cleanup internally when returning failures from the init function and does not expect the close function to be called at all.
Definition at line 42 of file codec_internal.h.
#define FF_CODEC_CAP_SETS_PKT_DTS (1 << 2) |
Decoders marked with FF_CODEC_CAP_SETS_PKT_DTS want to set AVFrame.pkt_dts manually.
If the flag is set, decode.c won't overwrite this field. If it's unset, decode.c tries to guess the pkt_dts field from the input AVPacket.
Definition at line 49 of file codec_internal.h.
#define FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM (1 << 3) |
The decoder extracts and fills its parameters even if the frame is skipped due to the skip_frame setting.
Definition at line 54 of file codec_internal.h.
#define FF_CODEC_CAP_EXPORTS_CROPPING (1 << 4) |
The decoder sets the cropping fields in the output frames manually.
If this cap is set, the generic code will initialize output frame dimensions to coded rather than display values.
Definition at line 60 of file codec_internal.h.
#define FF_CODEC_CAP_SLICE_THREAD_HAS_MF (1 << 5) |
Codec initializes slice-based threading with a main function.
Definition at line 64 of file codec_internal.h.
#define FF_CODEC_CAP_ALLOCATE_PROGRESS (1 << 6) |
Definition at line 69 of file codec_internal.h.
#define FF_CODEC_CAP_AUTO_THREADS (1 << 7) |
Codec handles avctx->thread_count == 0 (auto) internally.
Definition at line 73 of file codec_internal.h.
#define FF_CODEC_CAP_SETS_FRAME_PROPS (1 << 8) |
Codec handles output frame properties internally instead of letting the internal logic derive them from AVCodecInternal.last_pkt_props.
Definition at line 78 of file codec_internal.h.
#define FF_CODEC_CAP_ICC_PROFILES (1 << 9) |
Codec supports embedded ICC profiles (AV_FRAME_DATA_ICC_PROFILE).
Definition at line 82 of file codec_internal.h.
#define FF_CODEC_CAP_EOF_FLUSH (1 << 10) |
The encoder has AV_CODEC_CAP_DELAY set, but does not actually have delay - it only wants to be flushed at the end to update some context variables (e.g.
2pass stats) or produce a trailing packet. Besides that it immediately produces exactly one output packet per each input frame, just as no-delay encoders do.
Definition at line 90 of file codec_internal.h.
#define FF_CODEC_TAGS_END -1 |
FFCodec.codec_tags termination value.
Definition at line 95 of file codec_internal.h.
#define CODEC_LONG_NAME | ( | str | ) | .p.long_name = str |
Definition at line 272 of file codec_internal.h.
#define UPDATE_THREAD_CONTEXT | ( | func | ) | .update_thread_context = NULL |
Definition at line 281 of file codec_internal.h.
Definition at line 283 of file codec_internal.h.
#define CODEC_OLD_CHANNEL_LAYOUTS | ( | ... | ) |
Definition at line 302 of file codec_internal.h.
#define CODEC_OLD_CHANNEL_LAYOUTS_ARRAY | ( | array | ) |
Definition at line 303 of file codec_internal.h.
#define FF_CODEC_DECODE_CB | ( | func | ) |
Definition at line 306 of file codec_internal.h.
#define FF_CODEC_DECODE_SUB_CB | ( | func | ) |
Definition at line 309 of file codec_internal.h.
#define FF_CODEC_RECEIVE_FRAME_CB | ( | func | ) |
Definition at line 312 of file codec_internal.h.
#define FF_CODEC_ENCODE_CB | ( | func | ) |
Definition at line 315 of file codec_internal.h.
#define FF_CODEC_ENCODE_SUB_CB | ( | func | ) |
Definition at line 318 of file codec_internal.h.
#define FF_CODEC_RECEIVE_PACKET_CB | ( | func | ) |
Definition at line 321 of file codec_internal.h.
enum FFCodecType |
Enumerator | |
---|---|
FF_CODEC_CB_TYPE_DECODE | |
FF_CODEC_CB_TYPE_DECODE_SUB | |
FF_CODEC_CB_TYPE_RECEIVE_FRAME | |
FF_CODEC_CB_TYPE_ENCODE | |
FF_CODEC_CB_TYPE_ENCODE_SUB | |
FF_CODEC_CB_TYPE_RECEIVE_PACKET |
Definition at line 106 of file codec_internal.h.
|
static |
Definition at line 325 of file codec_internal.h.
Referenced by av_codec_is_decoder(), av_codec_is_encoder(), avcodec_close(), avcodec_decode_subtitle2(), avcodec_default_get_format(), avcodec_encode_subtitle(), avcodec_flush_buffers(), avcodec_get_hw_config(), avcodec_get_hw_frames_parameters(), avcodec_open2(), AVCodecInitialize(), avpriv_codec_get_cap_skip_frame_fill_param(), cuvid_decode_init(), decode_bsfs_init(), decode_get_packet(), decode_receive_frame_internal(), decode_simple_internal(), encode_receive_packet_internal(), encode_simple_internal(), ff_decode_frame_props(), ff_encode_encode_cb(), ff_encode_preinit(), ff_frame_thread_free(), ff_frame_thread_init(), ff_get_buffer(), ff_get_format(), ff_slice_thread_init(), ff_thread_can_start_frame(), ff_thread_flush(), ff_thread_get_ext_buffer(), frame_worker_thread(), init_context_defaults(), main(), thread_get_buffer_internal(), update_context_from_thread(), validate_thread_parameters(), and vp78_decode_frame().