Go to the source code of this file.
|
static void | mediacodec_dump_format (AVCodecContext *avctx, FFAMediaFormat *out_format) |
|
static void | mediacodec_output_format (AVCodecContext *avctx) |
|
static int | extract_extradata_support (AVCodecContext *avctx) |
|
static int | mediacodec_init_bsf (AVCodecContext *avctx) |
|
static void | copy_frame_to_buffer (AVCodecContext *avctx, const AVFrame *frame, uint8_t *dst, size_t size) |
|
static void | on_error (FFAMediaCodec *codec, void *userdata, int error, const char *detail) |
|
static void | on_input_available (FFAMediaCodec *codec, void *userdata, int32_t index) |
|
static void | on_output_available (FFAMediaCodec *codec, void *userdata, int32_t index, FFAMediaCodecBufferInfo *out_info) |
|
static void | on_format_changed (FFAMediaCodec *codec, void *userdata, FFAMediaFormat *format) |
|
static int | mediacodec_init_async_state (AVCodecContext *avctx) |
|
static void | mediacodec_uninit_async_state (AVCodecContext *avctx) |
|
static int | mediacodec_generate_extradata (AVCodecContext *avctx) |
|
static void | mediacodec_set_qp_range (AVCodecContext *avctx, FFAMediaFormat *format) |
|
static av_cold int | mediacodec_init (AVCodecContext *avctx) |
|
static int | mediacodec_get_output_index (AVCodecContext *avctx, ssize_t *index, FFAMediaCodecBufferInfo *out_info) |
|
static int | mediacodec_receive (AVCodecContext *avctx, AVPacket *pkt) |
|
static int | mediacodec_get_input_index (AVCodecContext *avctx, ssize_t *index) |
|
static int | mediacodec_send (AVCodecContext *avctx, const AVFrame *frame) |
|
static int | mediacodec_encode (AVCodecContext *avctx, AVPacket *pkt) |
|
static int | mediacodec_send_dummy_frame (AVCodecContext *avctx) |
|
static int | mediacodec_receive_dummy_pkt (AVCodecContext *avctx, AVPacket *pkt) |
|
static av_cold int | mediacodec_close (AVCodecContext *avctx) |
|
static av_cold void | mediacodec_flush (AVCodecContext *avctx) |
|
◆ INPUT_DEQUEUE_TIMEOUT_US
#define INPUT_DEQUEUE_TIMEOUT_US 8000 |
◆ OUTPUT_DEQUEUE_TIMEOUT_US
#define OUTPUT_DEQUEUE_TIMEOUT_US 8000 |
◆ OFFSET
◆ VE
◆ COMMON_OPTION
◆ MEDIACODEC_ENCODER_CLASS
#define MEDIACODEC_ENCODER_CLASS |
( |
|
name | ) |
|
◆ DECLARE_MEDIACODEC_ENCODER
#define DECLARE_MEDIACODEC_ENCODER |
( |
|
short_name, |
|
|
|
long_name, |
|
|
|
codec_id |
|
) |
| |
Value:
const
FFCodec ff_ ## short_name ## _mediacodec_encoder = { \
.
p.
name = #short_name
"_mediacodec", \
CODEC_LONG_NAME(long_name " Android MediaCodec encoder"), \
AV_CODEC_CAP_HARDWARE | \
AV_CODEC_CAP_ENCODER_FLUSH, \
.p.priv_class = &short_name ## _mediacodec_class, \
.p.wrapper_name = "mediacodec", \
}; \
Definition at line 1086 of file mediacodecenc.c.
◆ BitrateMode
Enumerator |
---|
BITRATE_MODE_CQ | |
BITRATE_MODE_VBR | |
BITRATE_MODE_CBR | |
BITRATE_MODE_CBR_FD | |
Definition at line 48 of file mediacodecenc.c.
◆ anonymous enum
Enumerator |
---|
COLOR_FormatYUV420Planar | |
COLOR_FormatYUV420SemiPlanar | |
COLOR_FormatSurface | |
Definition at line 107 of file mediacodecenc.c.
◆ mediacodec_dump_format()
◆ mediacodec_output_format()
◆ extract_extradata_support()
◆ mediacodec_init_bsf()
◆ copy_frame_to_buffer()
static void copy_frame_to_buffer |
( |
AVCodecContext * |
avctx, |
|
|
const AVFrame * |
frame, |
|
|
uint8_t * |
dst, |
|
|
size_t |
size |
|
) |
| |
|
static |
◆ on_error()
static void on_error |
( |
FFAMediaCodec * |
codec, |
|
|
void * |
userdata, |
|
|
int |
error, |
|
|
const char * |
detail |
|
) |
| |
|
static |
◆ on_input_available()
◆ on_output_available()
◆ on_format_changed()
◆ mediacodec_init_async_state()
◆ mediacodec_uninit_async_state()
◆ mediacodec_generate_extradata()
◆ mediacodec_set_qp_range()
◆ mediacodec_init()
◆ mediacodec_get_output_index()
◆ mediacodec_receive()
◆ mediacodec_get_input_index()
static int mediacodec_get_input_index |
( |
AVCodecContext * |
avctx, |
|
|
ssize_t * |
index |
|
) |
| |
|
static |
◆ mediacodec_send()
◆ mediacodec_encode()
◆ mediacodec_send_dummy_frame()
◆ mediacodec_receive_dummy_pkt()
◆ mediacodec_close()
◆ mediacodec_flush()
◆ color_format
◆ pix_fmt
◆ color_formats
const { ... } color_formats[] |
◆ avc_pix_fmts
◆ mediacodec_hw_configs
◆ mediacodec_defaults
Initial value:= {
{"qmin", "-1"},
{"qmax", "-1"},
}
Definition at line 1034 of file mediacodecenc.c.
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf default minimum maximum flags name is the option name
#define FF_CODEC_CAP_INIT_CLEANUP
The codec allows calling the close function for deallocation even if the init function returned a fai...
@ AVCOL_RANGE_JPEG
Full range content.
@ AV_HWDEVICE_TYPE_MEDIACODEC
AVCodec p
The public AVCodec.
@ AV_CODEC_HW_CONFIG_METHOD_AD_HOC
The codec supports this format by some ad-hoc method.
@ AV_PIX_FMT_YUV420P
planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)
@ AV_PIX_FMT_MEDIACODEC
hardware decoding through MediaCodec
#define LIBAVUTIL_VERSION_INT
Describe the class of an AVClass context structure.
#define FF_CODEC_RECEIVE_PACKET_CB(func)
const char * av_default_item_name(void *ptr)
Return the context name.
@ AV_CODEC_HW_CONFIG_METHOD_HW_DEVICE_CTX
The codec supports this format via the hw_device_ctx interface.
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() or get_encode_buffer() for allocating buffers and supports custom allocators.
const char * name
Name of the codec implementation.
@ AVCOL_RANGE_MPEG
Narrow or limited range content.
@ AV_PIX_FMT_NV12
planar YUV 4:2:0, 12bpp, 1 plane for Y and 1 plane for the UV components, which are interleaved (firs...
#define AV_CODEC_CAP_DELAY
Encoder or decoder requires flushing with NULL input at the end in order to give the complete and cor...