FFmpeg
|
#include <codec_internal.h>
Data Fields | |
AVCodec | p |
The public AVCodec. More... | |
unsigned | caps_internal:29 |
Internal codec capabilities FF_CODEC_CAP_*. More... | |
unsigned | cb_type:3 |
This field determines the type of the codec (decoder/encoder) and also the exact callback cb implemented by the codec. More... | |
int | priv_data_size |
const FFCodecDefault * | defaults |
Private codec-specific defaults. More... | |
void(* | init_static_data )(struct FFCodec *codec) |
Initialize codec static data, called from av_codec_iterate(). More... | |
int(* | init )(struct AVCodecContext *) |
union { | |
int(* decode )(struct AVCodecContext *avctx, struct AVFrame *frame, int *got_frame_ptr, struct AVPacket *avpkt) | |
Decode to an AVFrame. More... | |
int(* decode_sub )(struct AVCodecContext *avctx, struct AVSubtitle *sub, int *got_frame_ptr, const struct AVPacket *avpkt) | |
Decode subtitle data to an AVSubtitle. More... | |
int(* receive_frame )(struct AVCodecContext *avctx, struct AVFrame *frame) | |
Decode API with decoupled packet/frame dataflow. More... | |
int(* encode )(struct AVCodecContext *avctx, struct AVPacket *avpkt, const struct AVFrame *frame, int *got_packet_ptr) | |
Encode data to an AVPacket. More... | |
int(* encode_sub )(struct AVCodecContext *avctx, uint8_t *buf, int buf_size, const struct AVSubtitle *sub) | |
Encode subtitles to a raw buffer. More... | |
int(* receive_packet )(struct AVCodecContext *avctx, struct AVPacket *avpkt) | |
Encode API with decoupled frame/packet dataflow. More... | |
} | cb |
int(* | close )(struct AVCodecContext *) |
void(* | flush )(struct AVCodecContext *) |
Flush buffers. More... | |
const char * | bsfs |
Decoding only, a comma-separated list of bitstream filters to apply to packets before decoding. More... | |
const struct AVCodecHWConfigInternal *const * | hw_configs |
Array of pointers to hardware configurations supported by the codec, or NULL if no hardware supported. More... | |
const uint32_t * | codec_tags |
List of supported codec_tags, terminated by FF_CODEC_TAGS_END. More... | |
Frame-level threading support functions | |
int(* | update_thread_context )(struct AVCodecContext *dst, const struct AVCodecContext *src) |
Copy necessary context variables from a previous thread context to the current one. More... | |
int(* | update_thread_context_for_user )(struct AVCodecContext *dst, const struct AVCodecContext *src) |
Copy variables back to the user-facing context. More... | |
Definition at line 127 of file codec_internal.h.
AVCodec FFCodec::p |
The public AVCodec.
See codec.h for it.
Definition at line 131 of file codec_internal.h.
Referenced by av1_init_static(), ff_frame_thread_free(), ff_frame_thread_init(), ff_vp9_init_static(), init_thread(), libx265_encode_init_csp(), LLVMFuzzerTestOneInput(), priv_data_size_wrong(), and X264_init_static().
unsigned FFCodec::caps_internal |
Internal codec capabilities FF_CODEC_CAP_*.
Definition at line 136 of file codec_internal.h.
Referenced by avcodec_open2(), avpriv_codec_get_cap_skip_frame_fill_param(), decode_simple_internal(), ff_decode_frame_props(), ff_decode_get_packet(), ff_encode_encode_cb(), ff_get_buffer(), ff_slice_thread_init(), ff_thread_get_ext_buffer(), init_thread(), lock_avcodec(), main(), unlock_avcodec(), and validate_thread_parameters().
unsigned FFCodec::cb_type |
This field determines the type of the codec (decoder/encoder) and also the exact callback cb implemented by the codec.
cb_type uses enum FFCodecType values.
Definition at line 143 of file codec_internal.h.
Referenced by av_codec_is_decoder(), av_codec_is_encoder(), decode_receive_frame_internal(), encode_receive_packet_internal(), encode_simple_internal(), ff_encode_preinit(), and main().
int FFCodec::priv_data_size |
Definition at line 145 of file codec_internal.h.
Referenced by avcodec_open2(), init_context_defaults(), init_thread(), main(), and priv_data_size_wrong().
int(* FFCodec::update_thread_context) (struct AVCodecContext *dst, const struct AVCodecContext *src) |
Copy necessary context variables from a previous thread context to the current one.
If not defined, the next thread will start automatically; otherwise, the codec must call ff_thread_finish_setup().
dst and src will (rarely) point to the same context, in which case memcpy should be skipped.
Definition at line 157 of file codec_internal.h.
Referenced by ff_thread_can_start_frame(), frame_worker_thread(), main(), thread_get_buffer_internal(), update_context_from_thread(), and vp78_decode_frame().
int(* FFCodec::update_thread_context_for_user) (struct AVCodecContext *dst, const struct AVCodecContext *src) |
Copy variables back to the user-facing context.
Definition at line 162 of file codec_internal.h.
Referenced by main(), and update_context_from_thread().
const FFCodecDefault* FFCodec::defaults |
Private codec-specific defaults.
Definition at line 168 of file codec_internal.h.
Referenced by init_context_defaults().
void(* FFCodec::init_static_data) (struct FFCodec *codec) |
Initialize codec static data, called from av_codec_iterate().
This is not intended for time consuming operations as it is run for every codec regardless of that codec being used.
Definition at line 176 of file codec_internal.h.
Referenced by av_codec_init_static().
int(* FFCodec::init) (struct AVCodecContext *) |
Definition at line 178 of file codec_internal.h.
Referenced by avcodec_open2(), init_thread(), lock_avcodec(), and unlock_avcodec().
int(* FFCodec::decode) (struct AVCodecContext *avctx, struct AVFrame *frame, int *got_frame_ptr, struct AVPacket *avpkt) |
Decode to an AVFrame.
cb is in this state if cb_type is FF_CODEC_CB_TYPE_DECODE.
avctx | codec context | |
[out] | frame | AVFrame for output |
[out] | got_frame_ptr | decoder sets to 0 or 1 to indicate that a non-empty frame was returned in frame. |
[in] | avpkt | AVPacket containing the data to be decoded |
Definition at line 193 of file codec_internal.h.
Referenced by decode_simple_internal(), and frame_worker_thread().
int(* FFCodec::decode_sub) (struct AVCodecContext *avctx, struct AVSubtitle *sub, int *got_frame_ptr, const struct AVPacket *avpkt) |
Decode subtitle data to an AVSubtitle.
cb is in this state if cb_type is FF_CODEC_CB_TYPE_DECODE_SUB.
Apart from that this is like the decode callback.
Definition at line 201 of file codec_internal.h.
Referenced by avcodec_decode_subtitle2().
int(* FFCodec::receive_frame) (struct AVCodecContext *avctx, struct AVFrame *frame) |
Decode API with decoupled packet/frame dataflow.
cb is in this state if cb_type is FF_CODEC_CB_TYPE_RECEIVE_FRAME.
This function is called to get one output frame. It should call ff_decode_get_packet() to obtain input data.
Definition at line 210 of file codec_internal.h.
Referenced by decode_receive_frame_internal().
int(* FFCodec::encode) (struct AVCodecContext *avctx, struct AVPacket *avpkt, const struct AVFrame *frame, int *got_packet_ptr) |
Encode data to an AVPacket.
cb is in this state if cb_type is FF_CODEC_CB_TYPE_ENCODE
avctx | codec context | |
[out] | avpkt | output AVPacket |
[in] | frame | AVFrame containing the input to be encoded |
[out] | got_packet_ptr | encoder sets to 0 or 1 to indicate that a non-empty packet was returned in avpkt. |
Definition at line 222 of file codec_internal.h.
Referenced by ff_encode_encode_cb().
int(* FFCodec::encode_sub) (struct AVCodecContext *avctx, uint8_t *buf, int buf_size, const struct AVSubtitle *sub) |
Encode subtitles to a raw buffer.
cb is in this state if cb_type is FF_CODEC_CB_TYPE_ENCODE_SUB.
Definition at line 228 of file codec_internal.h.
Referenced by avcodec_encode_subtitle().
int(* FFCodec::receive_packet) (struct AVCodecContext *avctx, struct AVPacket *avpkt) |
Encode API with decoupled frame/packet dataflow.
cb is in this state if cb_type is FF_CODEC_CB_TYPE_RECEIVE_PACKET.
This function is called to get one output packet. It should call ff_encode_get_frame() to obtain input data.
Definition at line 237 of file codec_internal.h.
Referenced by encode_receive_packet_internal().
union { ... } FFCodec::cb |
int(* FFCodec::close) (struct AVCodecContext *) |
Definition at line 240 of file codec_internal.h.
Referenced by avcodec_close(), and ff_frame_thread_free().
void(* FFCodec::flush) (struct AVCodecContext *) |
Flush buffers.
Will be called when seeking
Definition at line 246 of file codec_internal.h.
Referenced by avcodec_flush_buffers(), and ff_thread_flush().
const char* FFCodec::bsfs |
Decoding only, a comma-separated list of bitstream filters to apply to packets before decoding.
Definition at line 252 of file codec_internal.h.
Referenced by cuvid_decode_init(), decode_bsfs_init(), and main().
const struct AVCodecHWConfigInternal* const * FFCodec::hw_configs |
Array of pointers to hardware configurations supported by the codec, or NULL if no hardware supported.
The array is terminated by a NULL pointer.
The user can only access this field via avcodec_get_hw_config().
Definition at line 261 of file codec_internal.h.
Referenced by avcodec_default_get_format(), avcodec_get_hw_config(), avcodec_get_hw_frames_parameters(), and ff_get_format().
const uint32_t* FFCodec::codec_tags |
List of supported codec_tags, terminated by FF_CODEC_TAGS_END.
Definition at line 266 of file codec_internal.h.
Referenced by LLVMFuzzerTestOneInput().