FFmpeg
|
#include <codec_internal.h>
Data Fields | |
AVCodec | p |
The public AVCodec. More... | |
unsigned | caps_internal:27 |
Internal codec capabilities FF_CODEC_CAP_*. More... | |
unsigned | color_ranges:2 |
This field determines the video color ranges supported by an encoder. 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... | |
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... | |
int(* | get_supported_config )(const AVCodecContext *avctx, const AVCodec *codec, enum AVCodecConfig config, unsigned flags, const void **out_configs, int *out_num_configs) |
Custom callback for avcodec_get_supported_config(). 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 av_codec_init_static(), ff_frame_thread_free(), ff_frame_thread_init(), init_thread(), LLVMFuzzerTestOneInput(), and priv_data_size_wrong().
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_get_packet(), decode_simple_internal(), ff_decode_frame_props(), ff_decode_preinit(), ff_encode_encode_cb(), ff_get_buffer(), ff_slice_thread_init(), init_thread(), lock_avcodec(), main(), unlock_avcodec(), and validate_thread_parameters().
unsigned FFCodec::color_ranges |
This field determines the video color ranges supported by an encoder.
Should be set to a bitmask of AVCOL_RANGE_MPEG and AVCOL_RANGE_JPEG.
Definition at line 142 of file codec_internal.h.
Referenced by ff_default_get_supported_config().
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 149 of file codec_internal.h.
Referenced by av_codec_is_decoder(), av_codec_is_encoder(), avcodec_decode_subtitle2(), encode_receive_packet_internal(), encode_simple_internal(), ff_decode_receive_frame_internal(), ff_encode_preinit(), and main().
int FFCodec::priv_data_size |
Definition at line 151 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 163 of file codec_internal.h.
Referenced by ff_thread_can_start_frame(), frame_worker_thread(), main(), thread_get_buffer_internal(), and update_context_from_thread().
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 168 of file codec_internal.h.
Referenced by main(), and update_context_from_thread().
const FFCodecDefault* FFCodec::defaults |
Private codec-specific defaults.
Definition at line 174 of file codec_internal.h.
Referenced by init_context_defaults().
int(* FFCodec::init) (struct AVCodecContext *) |
Definition at line 176 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 191 of file codec_internal.h.
Referenced by decode_simple_internal().
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 199 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 208 of file codec_internal.h.
Referenced by ff_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 220 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 226 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 235 of file codec_internal.h.
Referenced by encode_receive_packet_internal().
union { ... } FFCodec::cb |
int(* FFCodec::close) (struct AVCodecContext *) |
Definition at line 238 of file codec_internal.h.
Referenced by ff_codec_close(), and ff_frame_thread_free().
void(* FFCodec::flush) (struct AVCodecContext *) |
Flush buffers.
Will be called when seeking
Definition at line 244 of file codec_internal.h.
Referenced by avcodec_flush_buffers().
const char* FFCodec::bsfs |
Decoding only, a comma-separated list of bitstream filters to apply to packets before decoding.
Definition at line 250 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 259 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 264 of file codec_internal.h.
Referenced by LLVMFuzzerTestOneInput().
int(* FFCodec::get_supported_config) (const AVCodecContext *avctx, const AVCodec *codec, enum AVCodecConfig config, unsigned flags, const void **out_configs, int *out_num_configs) |
Custom callback for avcodec_get_supported_config().
If absent, ff_default_get_supported_config() will be used. out_num_configs
will always be set to a valid pointer.
Definition at line 271 of file codec_internal.h.
Referenced by av_codec_init_static(), and avcodec_get_supported_config().