FFmpeg
|
Go to the source code of this file.
Data Structures | |
struct | FFAMediaFormat |
struct | FFAMediaCodecBufferInfo |
struct | FFAMediaCodecOnAsyncNotifyCallback |
struct | FFAMediaCodec |
Typedefs | |
typedef struct FFAMediaCodecCryptoInfo | FFAMediaCodecCryptoInfo |
Enumerations | |
enum | FFAMediaFormatColorRange { COLOR_RANGE_UNSPECIFIED = 0x0, COLOR_RANGE_FULL = 0x1, COLOR_RANGE_LIMITED = 0x2 } |
enum | FFAMediaFormatColorStandard { COLOR_STANDARD_UNSPECIFIED = 0x0, COLOR_STANDARD_BT709 = 0x1, COLOR_STANDARD_BT601_PAL = 0x2, COLOR_STANDARD_BT601_NTSC = 0x4, COLOR_STANDARD_BT2020 = 0x6 } |
enum | FFAMediaFormatColorTransfer { COLOR_TRANSFER_UNSPECIFIED = 0x0, COLOR_TRANSFER_LINEAR = 0x1, COLOR_TRANSFER_SDR_VIDEO = 0x3, COLOR_TRANSFER_ST2084 = 0x6, COLOR_TRANSFER_HLG = 0x7 } |
typedef struct FFAMediaCodecCryptoInfo FFAMediaCodecCryptoInfo |
Definition at line 170 of file mediacodec_wrapper.h.
Enumerator | |
---|---|
COLOR_RANGE_UNSPECIFIED | |
COLOR_RANGE_FULL | |
COLOR_RANGE_LIMITED |
Definition at line 376 of file mediacodec_wrapper.h.
Enumerator | |
---|---|
COLOR_STANDARD_UNSPECIFIED | |
COLOR_STANDARD_BT709 | |
COLOR_STANDARD_BT601_PAL | |
COLOR_STANDARD_BT601_NTSC | |
COLOR_STANDARD_BT2020 |
Definition at line 382 of file mediacodec_wrapper.h.
Enumerator | |
---|---|
COLOR_TRANSFER_UNSPECIFIED | |
COLOR_TRANSFER_LINEAR | |
COLOR_TRANSFER_SDR_VIDEO | |
COLOR_TRANSFER_ST2084 | |
COLOR_TRANSFER_HLG |
Definition at line 390 of file mediacodec_wrapper.h.
int ff_AMediaCodecProfile_getProfileFromAVCodecContext | ( | AVCodecContext * | avctx | ) |
The following API around MediaCodec and MediaFormat is based on the NDK one provided by Google since Android 5.0.
Differences from the NDK API:
Buffers returned by ff_AMediaFormat_toString and ff_AMediaFormat_getString are newly allocated buffer and must be freed by the user after use.
The MediaCrypto API is not implemented.
ff_AMediaCodec_infoTryAgainLater, ff_AMediaCodec_infoOutputBuffersChanged, ff_AMediaCodec_infoOutputFormatChanged, ff_AMediaCodec_cleanOutputBuffers ff_AMediaCodec_getName and ff_AMediaCodec_getBufferFlagEndOfStream are not part of the original NDK API and are convenience functions to hide JNI implementation.
The API around MediaCodecList is not part of the NDK (and is lacking as we still need to retrieve the codec name to work around faulty decoders and encoders).
For documentation, please refers to NdkMediaCodec.h NdkMediaFormat.h and http://developer.android.com/reference/android/media/MediaCodec.html.
Definition at line 309 of file mediacodec_wrapper.c.
Referenced by mediacodec_dec_get_video_codec(), and mediacodec_init().
char* ff_AMediaCodecList_getCodecNameByType | ( | const char * | mime, |
int | profile, | ||
int | encoder, | ||
void * | log_ctx | ||
) |
Definition at line 470 of file mediacodec_wrapper.c.
Referenced by mediacodec_dec_get_video_codec().
FFAMediaFormat* ff_AMediaFormat_new | ( | int | ndk | ) |
Definition at line 2531 of file mediacodec_wrapper.c.
Referenced by mediacodec_decode_init(), and mediacodec_init().
|
inlinestatic |
Definition at line 92 of file mediacodec_wrapper.h.
Referenced by ff_mediacodec_dec_receive(), ff_mediacodec_dec_unref(), mediacodec_decode_init(), mediacodec_init(), mediacodec_ndk_onFormatChanged(), and mediacodec_output_format().
|
inlinestatic |
Definition at line 97 of file mediacodec_wrapper.h.
Referenced by ff_mediacodec_dec_init(), ff_mediacodec_dec_receive(), mediacodec_dec_parse_audio_format(), mediacodec_dec_parse_video_format(), and mediacodec_dump_format().
|
inlinestatic |
Definition at line 102 of file mediacodec_wrapper.h.
|
inlinestatic |
Definition at line 107 of file mediacodec_wrapper.h.
|
inlinestatic |
Definition at line 112 of file mediacodec_wrapper.h.
|
inlinestatic |
Definition at line 117 of file mediacodec_wrapper.h.
|
inlinestatic |
Definition at line 122 of file mediacodec_wrapper.h.
|
inlinestatic |
Definition at line 127 of file mediacodec_wrapper.h.
Referenced by mediacodec_dec_parse_video_format().
|
inlinestatic |
Definition at line 135 of file mediacodec_wrapper.h.
Referenced by mediacodec_decode_init(), and mediacodec_init().
|
inlinestatic |
Definition at line 140 of file mediacodec_wrapper.h.
|
inlinestatic |
Definition at line 145 of file mediacodec_wrapper.h.
|
inlinestatic |
Definition at line 150 of file mediacodec_wrapper.h.
Referenced by mediacodec_decode_init(), and mediacodec_init().
|
inlinestatic |
Definition at line 155 of file mediacodec_wrapper.h.
|
inlinestatic |
Definition at line 160 of file mediacodec_wrapper.h.
|
inlinestatic |
Definition at line 245 of file mediacodec_wrapper.h.
Referenced by mediacodec_dec_get_audio_codec(), mediacodec_dec_get_video_codec(), and mediacodec_output_format().
FFAMediaCodec* ff_AMediaCodec_createCodecByName | ( | const char * | name, |
int | ndk | ||
) |
Definition at line 2538 of file mediacodec_wrapper.c.
Referenced by mediacodec_dec_get_video_codec(), and mediacodec_init().
FFAMediaCodec* ff_AMediaCodec_createDecoderByType | ( | const char * | mime_type, |
int | ndk | ||
) |
Definition at line 2545 of file mediacodec_wrapper.c.
Referenced by mediacodec_dec_get_audio_codec(), and mediacodec_dec_get_video_codec().
FFAMediaCodec* ff_AMediaCodec_createEncoderByType | ( | const char * | mime_type, |
int | ndk | ||
) |
Definition at line 2552 of file mediacodec_wrapper.c.
Referenced by mediacodec_init().
|
inlinestatic |
Definition at line 254 of file mediacodec_wrapper.h.
Referenced by ff_mediacodec_dec_init(), and mediacodec_init().
|
inlinestatic |
Definition at line 262 of file mediacodec_wrapper.h.
Referenced by ff_mediacodec_dec_init(), and mediacodec_init().
|
inlinestatic |
Definition at line 267 of file mediacodec_wrapper.h.
Referenced by ff_mediacodec_dec_close(), and mediacodec_close().
|
inlinestatic |
Definition at line 272 of file mediacodec_wrapper.h.
Referenced by mediacodec_dec_flush_codec(), mediacodec_flush(), and mediacodec_generate_extradata().
|
inlinestatic |
Definition at line 277 of file mediacodec_wrapper.h.
Referenced by ff_mediacodec_dec_unref(), and mediacodec_close().
|
inlinestatic |
Definition at line 282 of file mediacodec_wrapper.h.
Referenced by ff_mediacodec_dec_send(), and mediacodec_send().
|
inlinestatic |
Definition at line 287 of file mediacodec_wrapper.h.
Referenced by ff_mediacodec_dec_receive(), and mediacodec_receive().
|
inlinestatic |
Definition at line 292 of file mediacodec_wrapper.h.
Referenced by ff_mediacodec_dec_send(), mediacodec_get_input_index(), and mediacodec_receive_frame().
|
inlinestatic |
Definition at line 297 of file mediacodec_wrapper.h.
Referenced by ff_mediacodec_dec_send(), and mediacodec_send().
|
inlinestatic |
Definition at line 302 of file mediacodec_wrapper.h.
Referenced by ff_mediacodec_dec_receive(), and mediacodec_get_output_index().
|
inlinestatic |
Definition at line 307 of file mediacodec_wrapper.h.
Referenced by ff_mediacodec_dec_init(), ff_mediacodec_dec_receive(), and mediacodec_output_format().
|
inlinestatic |
Definition at line 312 of file mediacodec_wrapper.h.
Referenced by ff_mediacodec_dec_receive(), mediacodec_buffer_release(), mediacodec_receive(), mediacodec_wrap_hw_buffer(), mediacodec_wrap_sw_audio_buffer(), and mediacodec_wrap_sw_video_buffer().
|
inlinestatic |
Definition at line 317 of file mediacodec_wrapper.h.
|
inlinestatic |
Definition at line 322 of file mediacodec_wrapper.h.
Referenced by ff_mediacodec_dec_receive(), ff_mediacodec_dec_send(), mediacodec_receive(), mediacodec_receive_frame(), and mediacodec_send().
|
inlinestatic |
Definition at line 327 of file mediacodec_wrapper.h.
Referenced by ff_mediacodec_dec_receive(), and mediacodec_receive().
|
inlinestatic |
Definition at line 332 of file mediacodec_wrapper.h.
Referenced by ff_mediacodec_dec_receive(), and mediacodec_receive().
|
inlinestatic |
Definition at line 337 of file mediacodec_wrapper.h.
Referenced by mediacodec_receive().
|
inlinestatic |
Definition at line 342 of file mediacodec_wrapper.h.
Referenced by ff_mediacodec_dec_receive(), ff_mediacodec_dec_send(), mediacodec_receive(), and mediacodec_send().
|
inlinestatic |
Definition at line 347 of file mediacodec_wrapper.h.
Referenced by mediacodec_receive().
|
inlinestatic |
Definition at line 352 of file mediacodec_wrapper.h.
Referenced by mediacodec_init().
|
inlinestatic |
Definition at line 357 of file mediacodec_wrapper.h.
Referenced by ff_mediacodec_dec_receive(), and mediacodec_receive().
|
inlinestatic |
Definition at line 362 of file mediacodec_wrapper.h.
Referenced by mediacodec_send().
|
inlinestatic |
Definition at line 367 of file mediacodec_wrapper.h.
Referenced by mediacodec_init().
int ff_Build_SDK_INT | ( | AVCodecContext * | avctx | ) |
Definition at line 2559 of file mediacodec_wrapper.c.
Referenced by mediacodec_decode_init().
enum AVColorRange ff_AMediaFormatColorRange_to_AVColorRange | ( | int | color_range | ) |
Map MediaFormat color range to AVColorRange.
return AVCOL_RANGE_UNSPECIFIED when failed.
Definition at line 2630 of file mediacodec_wrapper.c.
Referenced by mediacodec_dec_parse_video_format().
int ff_AMediaFormatColorRange_from_AVColorRange | ( | enum AVColorRange | color_range | ) |
Map AVColorRange to MediaFormat color range.
return COLOR_RANGE_UNSPECIFIED when failed.
Definition at line 2639 of file mediacodec_wrapper.c.
Referenced by mediacodec_init().
enum AVColorSpace ff_AMediaFormatColorStandard_to_AVColorSpace | ( | int | color_standard | ) |
Map MediaFormat color standard to AVColorSpace.
return AVCOL_SPC_UNSPECIFIED when failed.
Definition at line 2647 of file mediacodec_wrapper.c.
Referenced by mediacodec_dec_parse_video_format().
int ff_AMediaFormatColorStandard_from_AVColorSpace | ( | enum AVColorSpace | color_space | ) |
Map AVColorSpace to MediaFormat color standard.
return COLOR_STANDARD_UNSPECIFIED when failed.
Definition at line 2656 of file mediacodec_wrapper.c.
Referenced by mediacodec_init().
enum AVColorPrimaries ff_AMediaFormatColorStandard_to_AVColorPrimaries | ( | int | color_standard | ) |
Map MediaFormat color standard to AVColorPrimaries.
return AVCOL_PRI_UNSPECIFIED when failed.
Definition at line 2665 of file mediacodec_wrapper.c.
Referenced by mediacodec_dec_parse_video_format().
enum AVColorTransferCharacteristic ff_AMediaFormatColorTransfer_to_AVColorTransfer | ( | int | color_transfer | ) |
Map MediaFormat color transfer to AVColorTransferCharacteristic.
return AVCOL_TRC_UNSPECIFIED when failed.
Definition at line 2675 of file mediacodec_wrapper.c.
Referenced by mediacodec_dec_parse_video_format().
int ff_AMediaFormatColorTransfer_from_AVColorTransfer | ( | enum AVColorTransferCharacteristic | color_transfer | ) |
Map AVColorTransferCharacteristic to MediaFormat color transfer.
return COLOR_TRANSFER_UNSPECIFIED when failed.
Definition at line 2684 of file mediacodec_wrapper.c.
Referenced by mediacodec_init().