FFmpeg
Data Structures | Macros | Functions | Variables
mediacodec_wrapper.c File Reference
#include <dlfcn.h>
#include <jni.h>
#include <stdbool.h>
#include <media/NdkMediaFormat.h>
#include <media/NdkMediaCodec.h>
#include <android/native_window_jni.h>
#include "libavutil/avassert.h"
#include "libavutil/mem.h"
#include "libavutil/avstring.h"
#include "avcodec.h"
#include "ffjni.h"
#include "mediacodec_wrapper.h"

Go to the source code of this file.

Data Structures

struct  JNIAMediaCodecListFields
 
struct  JNIAMediaFormatFields
 
struct  FFAMediaFormatJni
 
struct  JNIAMediaCodecFields
 
struct  FFAMediaCodecJni
 
struct  FFAMediaFormatNdk
 
struct  FFAMediaCodecNdk
 

Macros

#define JNI_GET_ENV_OR_RETURN(env, log_ctx, ret)
 
#define JNI_GET_ENV_OR_RETURN_VOID(env, log_ctx)
 
#define CREATE_CODEC_BY_NAME   0
 
#define CREATE_DECODER_BY_TYPE   1
 
#define CREATE_ENCODER_BY_TYPE   2
 
#define DECLARE_FF_AMEDIACODEC_CREATE_FUNC(name, method)
 
#define GET_OPTIONAL_SYMBOL(sym)   format->sym = dlsym(format->libmedia, "AMediaFormat_" #sym);
 
#define GET_SYMBOL(sym)
 
#define GET_SYMBOL(sym, required)
 
#define DECLARE_NDK_AMEDIACODEC_CREATE_FUNC(name, method)
 
#define MEDIACODEC_NDK_WRAPPER(method)
 

Functions

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. More...
 
char * ff_AMediaCodecList_getCodecNameByType (const char *mime, int profile, int encoder, void *log_ctx)
 
static FFAMediaFormatmediaformat_jni_new (void)
 
static FFAMediaFormatmediaformat_jni_newFromObject (void *object)
 
static int mediaformat_jni_delete (FFAMediaFormat *ctx)
 
static char * mediaformat_jni_toString (FFAMediaFormat *ctx)
 
static int mediaformat_jni_getInt32 (FFAMediaFormat *ctx, const char *name, int32_t *out)
 
static int mediaformat_jni_getInt64 (FFAMediaFormat *ctx, const char *name, int64_t *out)
 
static int mediaformat_jni_getFloat (FFAMediaFormat *ctx, const char *name, float *out)
 
static int mediaformat_jni_getBuffer (FFAMediaFormat *ctx, const char *name, void **data, size_t *size)
 
static int mediaformat_jni_getString (FFAMediaFormat *ctx, const char *name, const char **out)
 
static void mediaformat_jni_setInt32 (FFAMediaFormat *ctx, const char *name, int32_t value)
 
static void mediaformat_jni_setInt64 (FFAMediaFormat *ctx, const char *name, int64_t value)
 
static void mediaformat_jni_setFloat (FFAMediaFormat *ctx, const char *name, float value)
 
static void mediaformat_jni_setString (FFAMediaFormat *ctx, const char *name, const char *value)
 
static void mediaformat_jni_setBuffer (FFAMediaFormat *ctx, const char *name, void *data, size_t size)
 
static int codec_init_static_fields (FFAMediaCodecJni *codec)
 
static FFAMediaCodeccodec_create (int method, const char *arg)
 
static int mediacodec_jni_delete (FFAMediaCodec *ctx)
 
static char * mediacodec_jni_getName (FFAMediaCodec *ctx)
 
static int mediacodec_jni_configure (FFAMediaCodec *ctx, const FFAMediaFormat *format_ctx, FFANativeWindow *window, void *crypto, uint32_t flags)
 
static int mediacodec_jni_start (FFAMediaCodec *ctx)
 
static int mediacodec_jni_stop (FFAMediaCodec *ctx)
 
static int mediacodec_jni_flush (FFAMediaCodec *ctx)
 
static int mediacodec_jni_releaseOutputBuffer (FFAMediaCodec *ctx, size_t idx, int render)
 
static int mediacodec_jni_releaseOutputBufferAtTime (FFAMediaCodec *ctx, size_t idx, int64_t timestampNs)
 
static ssize_t mediacodec_jni_dequeueInputBuffer (FFAMediaCodec *ctx, int64_t timeoutUs)
 
static int mediacodec_jni_queueInputBuffer (FFAMediaCodec *ctx, size_t idx, off_t offset, size_t size, uint64_t time, uint32_t flags)
 
static ssize_t mediacodec_jni_dequeueOutputBuffer (FFAMediaCodec *ctx, FFAMediaCodecBufferInfo *info, int64_t timeoutUs)
 
static uint8_t * mediacodec_jni_getInputBuffer (FFAMediaCodec *ctx, size_t idx, size_t *out_size)
 
static uint8_t * mediacodec_jni_getOutputBuffer (FFAMediaCodec *ctx, size_t idx, size_t *out_size)
 
static FFAMediaFormatmediacodec_jni_getOutputFormat (FFAMediaCodec *ctx)
 
static int mediacodec_jni_infoTryAgainLater (FFAMediaCodec *ctx, ssize_t idx)
 
static int mediacodec_jni_infoOutputBuffersChanged (FFAMediaCodec *ctx, ssize_t idx)
 
static int mediacodec_jni_infoOutputFormatChanged (FFAMediaCodec *ctx, ssize_t idx)
 
static int mediacodec_jni_getBufferFlagCodecConfig (FFAMediaCodec *ctx)
 
static int mediacodec_jni_getBufferFlagEndOfStream (FFAMediaCodec *ctx)
 
static int mediacodec_jni_getBufferFlagKeyFrame (FFAMediaCodec *ctx)
 
static int mediacodec_jni_getConfigureFlagEncode (FFAMediaCodec *ctx)
 
static int mediacodec_jni_cleanOutputBuffers (FFAMediaCodec *ctx)
 
static int mediacodec_jni_signalEndOfInputStream (FFAMediaCodec *ctx)
 
static FFAMediaFormatmediaformat_ndk_create (AMediaFormat *impl)
 
static FFAMediaFormatmediaformat_ndk_new (void)
 
static int mediaformat_ndk_delete (FFAMediaFormat *ctx)
 
static char * mediaformat_ndk_toString (FFAMediaFormat *ctx)
 
static int mediaformat_ndk_getInt32 (FFAMediaFormat *ctx, const char *name, int32_t *out)
 
static int mediaformat_ndk_getInt64 (FFAMediaFormat *ctx, const char *name, int64_t *out)
 
static int mediaformat_ndk_getFloat (FFAMediaFormat *ctx, const char *name, float *out)
 
static int mediaformat_ndk_getBuffer (FFAMediaFormat *ctx, const char *name, void **data, size_t *size)
 
static int mediaformat_ndk_getString (FFAMediaFormat *ctx, const char *name, const char **out)
 
static int mediaformat_ndk_getRect (FFAMediaFormat *ctx, const char *name, int32_t *left, int32_t *top, int32_t *right, int32_t *bottom)
 
static void mediaformat_ndk_setInt32 (FFAMediaFormat *ctx, const char *name, int32_t value)
 
static void mediaformat_ndk_setInt64 (FFAMediaFormat *ctx, const char *name, int64_t value)
 
static void mediaformat_ndk_setFloat (FFAMediaFormat *ctx, const char *name, float value)
 
static void mediaformat_ndk_setString (FFAMediaFormat *ctx, const char *name, const char *value)
 
static void mediaformat_ndk_setBuffer (FFAMediaFormat *ctx, const char *name, void *data, size_t size)
 
static void mediaformat_ndk_setRect (FFAMediaFormat *ctx, const char *name, int32_t left, int32_t top, int32_t right, int32_t bottom)
 
static char * mediacodec_ndk_getName (FFAMediaCodec *ctx)
 
static FFAMediaCodecndk_codec_create (int method, const char *arg)
 
static int mediacodec_ndk_delete (FFAMediaCodec *ctx)
 
static int mediacodec_ndk_configure (FFAMediaCodec *ctx, const FFAMediaFormat *format_ctx, FFANativeWindow *window, void *crypto, uint32_t flags)
 
static uint8_t * mediacodec_ndk_getInputBuffer (FFAMediaCodec *ctx, size_t idx, size_t *out_size)
 
static uint8_t * mediacodec_ndk_getOutputBuffer (FFAMediaCodec *ctx, size_t idx, size_t *out_size)
 
static ssize_t mediacodec_ndk_dequeueInputBuffer (FFAMediaCodec *ctx, int64_t timeoutUs)
 
static int mediacodec_ndk_queueInputBuffer (FFAMediaCodec *ctx, size_t idx, off_t offset, size_t size, uint64_t time, uint32_t flags)
 
static ssize_t mediacodec_ndk_dequeueOutputBuffer (FFAMediaCodec *ctx, FFAMediaCodecBufferInfo *info, int64_t timeoutUs)
 
static FFAMediaFormatmediacodec_ndk_getOutputFormat (FFAMediaCodec *ctx)
 
static int mediacodec_ndk_releaseOutputBuffer (FFAMediaCodec *ctx, size_t idx, int render)
 
static int mediacodec_ndk_releaseOutputBufferAtTime (FFAMediaCodec *ctx, size_t idx, int64_t timestampNs)
 
static int mediacodec_ndk_infoTryAgainLater (FFAMediaCodec *ctx, ssize_t idx)
 
static int mediacodec_ndk_infoOutputBuffersChanged (FFAMediaCodec *ctx, ssize_t idx)
 
static int mediacodec_ndk_infoOutputFormatChanged (FFAMediaCodec *ctx, ssize_t idx)
 
static int mediacodec_ndk_getBufferFlagCodecConfig (FFAMediaCodec *ctx)
 
static int mediacodec_ndk_getBufferFlagEndOfStream (FFAMediaCodec *ctx)
 
static int mediacodec_ndk_getBufferFlagKeyFrame (FFAMediaCodec *ctx)
 
static int mediacodec_ndk_getConfigureFlagEncode (FFAMediaCodec *ctx)
 
static int mediacodec_ndk_cleanOutputBuffers (FFAMediaCodec *ctx)
 
static int mediacodec_ndk_signalEndOfInputStream (FFAMediaCodec *ctx)
 
FFAMediaFormatff_AMediaFormat_new (int ndk)
 
FFAMediaCodecff_AMediaCodec_createCodecByName (const char *name, int ndk)
 
FFAMediaCodecff_AMediaCodec_createDecoderByType (const char *mime_type, int ndk)
 
FFAMediaCodecff_AMediaCodec_createEncoderByType (const char *mime_type, int ndk)
 
int ff_Build_SDK_INT (AVCodecContext *avctx)
 

Variables

static const struct FFJniField jni_amediacodeclist_mapping []
 
static const struct FFJniField jni_amediaformat_mapping []
 
static const AVClass amediaformat_class
 
static const FFAMediaFormat media_format_jni
 
static const struct FFJniField jni_amediacodec_mapping []
 
static const AVClass amediacodec_class
 
static const FFAMediaCodec media_codec_jni
 
static const FFAMediaFormat media_format_ndk
 
static const FFAMediaCodec media_codec_ndk
 
static const AVClass amediaformat_ndk_class
 
static const AVClass amediacodec_ndk_class
 

Macro Definition Documentation

◆ JNI_GET_ENV_OR_RETURN

#define JNI_GET_ENV_OR_RETURN (   env,
  log_ctx,
  ret 
)
Value:
do { \
(env) = ff_jni_get_env(log_ctx); \
if (!(env)) { \
return ret; \
} \
} while (0)

Definition at line 289 of file mediacodec_wrapper.c.

◆ JNI_GET_ENV_OR_RETURN_VOID

#define JNI_GET_ENV_OR_RETURN_VOID (   env,
  log_ctx 
)
Value:
do { \
(env) = ff_jni_get_env(log_ctx); \
if (!(env)) { \
return; \
} \
} while (0)

Definition at line 296 of file mediacodec_wrapper.c.

◆ CREATE_CODEC_BY_NAME

#define CREATE_CODEC_BY_NAME   0

Definition at line 1175 of file mediacodec_wrapper.c.

◆ CREATE_DECODER_BY_TYPE

#define CREATE_DECODER_BY_TYPE   1

Definition at line 1176 of file mediacodec_wrapper.c.

◆ CREATE_ENCODER_BY_TYPE

#define CREATE_ENCODER_BY_TYPE   2

Definition at line 1177 of file mediacodec_wrapper.c.

◆ DECLARE_FF_AMEDIACODEC_CREATE_FUNC

#define DECLARE_FF_AMEDIACODEC_CREATE_FUNC (   name,
  method 
)
Value:
static FFAMediaCodec *mediacodec_jni_##name(const char *arg) \
{ \
return codec_create(method, arg); \
} \

Definition at line 1279 of file mediacodec_wrapper.c.

◆ GET_OPTIONAL_SYMBOL

#define GET_OPTIONAL_SYMBOL (   sym)    format->sym = dlsym(format->libmedia, "AMediaFormat_" #sym);

◆ GET_SYMBOL [1/2]

#define GET_SYMBOL (   sym)
Value:
if (!format->sym) \
goto error;

◆ GET_SYMBOL [2/2]

#define GET_SYMBOL (   sym,
  required 
)
Value:
codec->sym = dlsym(codec->libmedia, "AMediaCodec_" #sym); \
if (!codec->sym) { \
av_log(codec, required ? AV_LOG_ERROR : AV_LOG_INFO, \
#sym "() unavailable from %s\n", lib_name); \
if (required) \
goto error; \
}

◆ DECLARE_NDK_AMEDIACODEC_CREATE_FUNC

#define DECLARE_NDK_AMEDIACODEC_CREATE_FUNC (   name,
  method 
)
Value:
static FFAMediaCodec *mediacodec_ndk_##name(const char *arg) \
{ \
return ndk_codec_create(method, arg); \
} \

Definition at line 2175 of file mediacodec_wrapper.c.

◆ MEDIACODEC_NDK_WRAPPER

#define MEDIACODEC_NDK_WRAPPER (   method)
Value:
static int mediacodec_ndk_ ## method(FFAMediaCodec* ctx) \
{ \
FFAMediaCodecNdk *codec = (FFAMediaCodecNdk *)ctx; \
media_status_t status = codec->method(codec->impl); \
if (status != AMEDIA_OK) { \
av_log(codec, AV_LOG_ERROR, #method " failed, %d\n", status); \
return AVERROR_EXTERNAL; \
} \
\
return 0; \
} \

Definition at line 2265 of file mediacodec_wrapper.c.

Function Documentation

◆ ff_AMediaCodecProfile_getProfileFromAVCodecContext()

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 303 of file mediacodec_wrapper.c.

Referenced by ff_mediacodec_dec_init(), and mediacodec_init().

◆ ff_AMediaCodecList_getCodecNameByType()

char* ff_AMediaCodecList_getCodecNameByType ( const char *  mime,
int  profile,
int  encoder,
void *  log_ctx 
)

Definition at line 365 of file mediacodec_wrapper.c.

Referenced by ff_mediacodec_dec_init().

◆ mediaformat_jni_new()

static FFAMediaFormat* mediaformat_jni_new ( void  )
static

Definition at line 607 of file mediacodec_wrapper.c.

◆ mediaformat_jni_newFromObject()

static FFAMediaFormat* mediaformat_jni_newFromObject ( void *  object)
static

Definition at line 652 of file mediacodec_wrapper.c.

Referenced by mediacodec_jni_getOutputFormat().

◆ mediaformat_jni_delete()

static int mediaformat_jni_delete ( FFAMediaFormat ctx)
static

Definition at line 687 of file mediacodec_wrapper.c.

◆ mediaformat_jni_toString()

static char* mediaformat_jni_toString ( FFAMediaFormat ctx)
static

Definition at line 709 of file mediacodec_wrapper.c.

◆ mediaformat_jni_getInt32()

static int mediaformat_jni_getInt32 ( FFAMediaFormat ctx,
const char *  name,
int32_t out 
)
static

Definition at line 734 of file mediacodec_wrapper.c.

◆ mediaformat_jni_getInt64()

static int mediaformat_jni_getInt64 ( FFAMediaFormat ctx,
const char *  name,
int64_t *  out 
)
static

Definition at line 773 of file mediacodec_wrapper.c.

◆ mediaformat_jni_getFloat()

static int mediaformat_jni_getFloat ( FFAMediaFormat ctx,
const char *  name,
float out 
)
static

Definition at line 812 of file mediacodec_wrapper.c.

◆ mediaformat_jni_getBuffer()

static int mediaformat_jni_getBuffer ( FFAMediaFormat ctx,
const char *  name,
void **  data,
size_t *  size 
)
static

Definition at line 851 of file mediacodec_wrapper.c.

◆ mediaformat_jni_getString()

static int mediaformat_jni_getString ( FFAMediaFormat ctx,
const char *  name,
const char **  out 
)
static

Definition at line 909 of file mediacodec_wrapper.c.

◆ mediaformat_jni_setInt32()

static void mediaformat_jni_setInt32 ( FFAMediaFormat ctx,
const char *  name,
int32_t  value 
)
static

Definition at line 959 of file mediacodec_wrapper.c.

◆ mediaformat_jni_setInt64()

static void mediaformat_jni_setInt64 ( FFAMediaFormat ctx,
const char *  name,
int64_t  value 
)
static

Definition at line 985 of file mediacodec_wrapper.c.

◆ mediaformat_jni_setFloat()

static void mediaformat_jni_setFloat ( FFAMediaFormat ctx,
const char *  name,
float  value 
)
static

Definition at line 1011 of file mediacodec_wrapper.c.

◆ mediaformat_jni_setString()

static void mediaformat_jni_setString ( FFAMediaFormat ctx,
const char *  name,
const char *  value 
)
static

Definition at line 1037 of file mediacodec_wrapper.c.

◆ mediaformat_jni_setBuffer()

static void mediaformat_jni_setBuffer ( FFAMediaFormat ctx,
const char *  name,
void *  data,
size_t  size 
)
static

Definition at line 1073 of file mediacodec_wrapper.c.

◆ codec_init_static_fields()

static int codec_init_static_fields ( FFAMediaCodecJni codec)
static

Definition at line 1121 of file mediacodec_wrapper.c.

Referenced by codec_create().

◆ codec_create()

static FFAMediaCodec* codec_create ( int  method,
const char *  arg 
)
inlinestatic

Definition at line 1179 of file mediacodec_wrapper.c.

◆ mediacodec_jni_delete()

static int mediacodec_jni_delete ( FFAMediaCodec ctx)
static

Definition at line 1289 of file mediacodec_wrapper.c.

◆ mediacodec_jni_getName()

static char* mediacodec_jni_getName ( FFAMediaCodec ctx)
static

Definition at line 1325 of file mediacodec_wrapper.c.

◆ mediacodec_jni_configure()

static int mediacodec_jni_configure ( FFAMediaCodec ctx,
const FFAMediaFormat format_ctx,
FFANativeWindow window,
void *  crypto,
uint32_t  flags 
)
static

Definition at line 1349 of file mediacodec_wrapper.c.

◆ mediacodec_jni_start()

static int mediacodec_jni_start ( FFAMediaCodec ctx)
static

Definition at line 1392 of file mediacodec_wrapper.c.

◆ mediacodec_jni_stop()

static int mediacodec_jni_stop ( FFAMediaCodec ctx)
static

Definition at line 1410 of file mediacodec_wrapper.c.

◆ mediacodec_jni_flush()

static int mediacodec_jni_flush ( FFAMediaCodec ctx)
static

Definition at line 1428 of file mediacodec_wrapper.c.

◆ mediacodec_jni_releaseOutputBuffer()

static int mediacodec_jni_releaseOutputBuffer ( FFAMediaCodec ctx,
size_t  idx,
int  render 
)
static

Definition at line 1446 of file mediacodec_wrapper.c.

◆ mediacodec_jni_releaseOutputBufferAtTime()

static int mediacodec_jni_releaseOutputBufferAtTime ( FFAMediaCodec ctx,
size_t  idx,
int64_t  timestampNs 
)
static

Definition at line 1464 of file mediacodec_wrapper.c.

◆ mediacodec_jni_dequeueInputBuffer()

static ssize_t mediacodec_jni_dequeueInputBuffer ( FFAMediaCodec ctx,
int64_t  timeoutUs 
)
static

Definition at line 1482 of file mediacodec_wrapper.c.

◆ mediacodec_jni_queueInputBuffer()

static int mediacodec_jni_queueInputBuffer ( FFAMediaCodec ctx,
size_t  idx,
off_t  offset,
size_t  size,
uint64_t  time,
uint32_t  flags 
)
static

Definition at line 1500 of file mediacodec_wrapper.c.

◆ mediacodec_jni_dequeueOutputBuffer()

static ssize_t mediacodec_jni_dequeueOutputBuffer ( FFAMediaCodec ctx,
FFAMediaCodecBufferInfo info,
int64_t  timeoutUs 
)
static

Definition at line 1518 of file mediacodec_wrapper.c.

◆ mediacodec_jni_getInputBuffer()

static uint8_t* mediacodec_jni_getInputBuffer ( FFAMediaCodec ctx,
size_t  idx,
size_t *  out_size 
)
static

Definition at line 1554 of file mediacodec_wrapper.c.

◆ mediacodec_jni_getOutputBuffer()

static uint8_t* mediacodec_jni_getOutputBuffer ( FFAMediaCodec ctx,
size_t  idx,
size_t *  out_size 
)
static

Definition at line 1602 of file mediacodec_wrapper.c.

◆ mediacodec_jni_getOutputFormat()

static FFAMediaFormat* mediacodec_jni_getOutputFormat ( FFAMediaCodec ctx)
static

Definition at line 1650 of file mediacodec_wrapper.c.

◆ mediacodec_jni_infoTryAgainLater()

static int mediacodec_jni_infoTryAgainLater ( FFAMediaCodec ctx,
ssize_t  idx 
)
static

Definition at line 1674 of file mediacodec_wrapper.c.

◆ mediacodec_jni_infoOutputBuffersChanged()

static int mediacodec_jni_infoOutputBuffersChanged ( FFAMediaCodec ctx,
ssize_t  idx 
)
static

Definition at line 1680 of file mediacodec_wrapper.c.

◆ mediacodec_jni_infoOutputFormatChanged()

static int mediacodec_jni_infoOutputFormatChanged ( FFAMediaCodec ctx,
ssize_t  idx 
)
static

Definition at line 1686 of file mediacodec_wrapper.c.

◆ mediacodec_jni_getBufferFlagCodecConfig()

static int mediacodec_jni_getBufferFlagCodecConfig ( FFAMediaCodec ctx)
static

Definition at line 1692 of file mediacodec_wrapper.c.

◆ mediacodec_jni_getBufferFlagEndOfStream()

static int mediacodec_jni_getBufferFlagEndOfStream ( FFAMediaCodec ctx)
static

Definition at line 1698 of file mediacodec_wrapper.c.

◆ mediacodec_jni_getBufferFlagKeyFrame()

static int mediacodec_jni_getBufferFlagKeyFrame ( FFAMediaCodec ctx)
static

Definition at line 1704 of file mediacodec_wrapper.c.

◆ mediacodec_jni_getConfigureFlagEncode()

static int mediacodec_jni_getConfigureFlagEncode ( FFAMediaCodec ctx)
static

Definition at line 1710 of file mediacodec_wrapper.c.

◆ mediacodec_jni_cleanOutputBuffers()

static int mediacodec_jni_cleanOutputBuffers ( FFAMediaCodec ctx)
static

Definition at line 1716 of file mediacodec_wrapper.c.

◆ mediacodec_jni_signalEndOfInputStream()

static int mediacodec_jni_signalEndOfInputStream ( FFAMediaCodec ctx)
static

Definition at line 1740 of file mediacodec_wrapper.c.

◆ mediaformat_ndk_create()

static FFAMediaFormat* mediaformat_ndk_create ( AMediaFormat *  impl)
static

Definition at line 1904 of file mediacodec_wrapper.c.

Referenced by mediacodec_ndk_getOutputFormat(), and mediaformat_ndk_new().

◆ mediaformat_ndk_new()

static FFAMediaFormat* mediaformat_ndk_new ( void  )
static

Definition at line 1964 of file mediacodec_wrapper.c.

◆ mediaformat_ndk_delete()

static int mediaformat_ndk_delete ( FFAMediaFormat ctx)
static

Definition at line 1969 of file mediacodec_wrapper.c.

◆ mediaformat_ndk_toString()

static char* mediaformat_ndk_toString ( FFAMediaFormat ctx)
static

Definition at line 1987 of file mediacodec_wrapper.c.

◆ mediaformat_ndk_getInt32()

static int mediaformat_ndk_getInt32 ( FFAMediaFormat ctx,
const char *  name,
int32_t out 
)
static

Definition at line 1994 of file mediacodec_wrapper.c.

◆ mediaformat_ndk_getInt64()

static int mediaformat_ndk_getInt64 ( FFAMediaFormat ctx,
const char *  name,
int64_t *  out 
)
static

Definition at line 2000 of file mediacodec_wrapper.c.

◆ mediaformat_ndk_getFloat()

static int mediaformat_ndk_getFloat ( FFAMediaFormat ctx,
const char *  name,
float out 
)
static

Definition at line 2006 of file mediacodec_wrapper.c.

◆ mediaformat_ndk_getBuffer()

static int mediaformat_ndk_getBuffer ( FFAMediaFormat ctx,
const char *  name,
void **  data,
size_t *  size 
)
static

Definition at line 2012 of file mediacodec_wrapper.c.

◆ mediaformat_ndk_getString()

static int mediaformat_ndk_getString ( FFAMediaFormat ctx,
const char *  name,
const char **  out 
)
static

Definition at line 2018 of file mediacodec_wrapper.c.

◆ mediaformat_ndk_getRect()

static int mediaformat_ndk_getRect ( FFAMediaFormat ctx,
const char *  name,
int32_t left,
int32_t top,
int32_t right,
int32_t bottom 
)
static

Definition at line 2029 of file mediacodec_wrapper.c.

◆ mediaformat_ndk_setInt32()

static void mediaformat_ndk_setInt32 ( FFAMediaFormat ctx,
const char *  name,
int32_t  value 
)
static

Definition at line 2038 of file mediacodec_wrapper.c.

◆ mediaformat_ndk_setInt64()

static void mediaformat_ndk_setInt64 ( FFAMediaFormat ctx,
const char *  name,
int64_t  value 
)
static

Definition at line 2044 of file mediacodec_wrapper.c.

◆ mediaformat_ndk_setFloat()

static void mediaformat_ndk_setFloat ( FFAMediaFormat ctx,
const char *  name,
float  value 
)
static

Definition at line 2050 of file mediacodec_wrapper.c.

◆ mediaformat_ndk_setString()

static void mediaformat_ndk_setString ( FFAMediaFormat ctx,
const char *  name,
const char *  value 
)
static

Definition at line 2056 of file mediacodec_wrapper.c.

◆ mediaformat_ndk_setBuffer()

static void mediaformat_ndk_setBuffer ( FFAMediaFormat ctx,
const char *  name,
void *  data,
size_t  size 
)
static

Definition at line 2062 of file mediacodec_wrapper.c.

◆ mediaformat_ndk_setRect()

static void mediaformat_ndk_setRect ( FFAMediaFormat ctx,
const char *  name,
int32_t  left,
int32_t  top,
int32_t  right,
int32_t  bottom 
)
static

Definition at line 2068 of file mediacodec_wrapper.c.

◆ mediacodec_ndk_getName()

static char* mediacodec_ndk_getName ( FFAMediaCodec ctx)
static

Definition at line 2079 of file mediacodec_wrapper.c.

◆ ndk_codec_create()

static FFAMediaCodec* ndk_codec_create ( int  method,
const char *  arg 
)
inlinestatic

Definition at line 2099 of file mediacodec_wrapper.c.

◆ mediacodec_ndk_delete()

static int mediacodec_ndk_delete ( FFAMediaCodec ctx)
static

Definition at line 2185 of file mediacodec_wrapper.c.

◆ mediacodec_ndk_configure()

static int mediacodec_ndk_configure ( FFAMediaCodec ctx,
const FFAMediaFormat format_ctx,
FFANativeWindow window,
void *  crypto,
uint32_t  flags 
)
static

Definition at line 2206 of file mediacodec_wrapper.c.

◆ mediacodec_ndk_getInputBuffer()

static uint8_t* mediacodec_ndk_getInputBuffer ( FFAMediaCodec ctx,
size_t  idx,
size_t *  out_size 
)
static

Definition at line 2283 of file mediacodec_wrapper.c.

◆ mediacodec_ndk_getOutputBuffer()

static uint8_t* mediacodec_ndk_getOutputBuffer ( FFAMediaCodec ctx,
size_t  idx,
size_t *  out_size 
)
static

Definition at line 2289 of file mediacodec_wrapper.c.

◆ mediacodec_ndk_dequeueInputBuffer()

static ssize_t mediacodec_ndk_dequeueInputBuffer ( FFAMediaCodec ctx,
int64_t  timeoutUs 
)
static

Definition at line 2295 of file mediacodec_wrapper.c.

◆ mediacodec_ndk_queueInputBuffer()

static int mediacodec_ndk_queueInputBuffer ( FFAMediaCodec ctx,
size_t  idx,
off_t  offset,
size_t  size,
uint64_t  time,
uint32_t  flags 
)
static

Definition at line 2301 of file mediacodec_wrapper.c.

◆ mediacodec_ndk_dequeueOutputBuffer()

static ssize_t mediacodec_ndk_dequeueOutputBuffer ( FFAMediaCodec ctx,
FFAMediaCodecBufferInfo info,
int64_t  timeoutUs 
)
static

Definition at line 2309 of file mediacodec_wrapper.c.

◆ mediacodec_ndk_getOutputFormat()

static FFAMediaFormat* mediacodec_ndk_getOutputFormat ( FFAMediaCodec ctx)
static

Definition at line 2324 of file mediacodec_wrapper.c.

◆ mediacodec_ndk_releaseOutputBuffer()

static int mediacodec_ndk_releaseOutputBuffer ( FFAMediaCodec ctx,
size_t  idx,
int  render 
)
static

Definition at line 2334 of file mediacodec_wrapper.c.

◆ mediacodec_ndk_releaseOutputBufferAtTime()

static int mediacodec_ndk_releaseOutputBufferAtTime ( FFAMediaCodec ctx,
size_t  idx,
int64_t  timestampNs 
)
static

Definition at line 2348 of file mediacodec_wrapper.c.

◆ mediacodec_ndk_infoTryAgainLater()

static int mediacodec_ndk_infoTryAgainLater ( FFAMediaCodec ctx,
ssize_t  idx 
)
static

Definition at line 2362 of file mediacodec_wrapper.c.

◆ mediacodec_ndk_infoOutputBuffersChanged()

static int mediacodec_ndk_infoOutputBuffersChanged ( FFAMediaCodec ctx,
ssize_t  idx 
)
static

Definition at line 2367 of file mediacodec_wrapper.c.

◆ mediacodec_ndk_infoOutputFormatChanged()

static int mediacodec_ndk_infoOutputFormatChanged ( FFAMediaCodec ctx,
ssize_t  idx 
)
static

Definition at line 2372 of file mediacodec_wrapper.c.

◆ mediacodec_ndk_getBufferFlagCodecConfig()

static int mediacodec_ndk_getBufferFlagCodecConfig ( FFAMediaCodec ctx)
static

Definition at line 2377 of file mediacodec_wrapper.c.

◆ mediacodec_ndk_getBufferFlagEndOfStream()

static int mediacodec_ndk_getBufferFlagEndOfStream ( FFAMediaCodec ctx)
static

Definition at line 2382 of file mediacodec_wrapper.c.

◆ mediacodec_ndk_getBufferFlagKeyFrame()

static int mediacodec_ndk_getBufferFlagKeyFrame ( FFAMediaCodec ctx)
static

Definition at line 2387 of file mediacodec_wrapper.c.

◆ mediacodec_ndk_getConfigureFlagEncode()

static int mediacodec_ndk_getConfigureFlagEncode ( FFAMediaCodec ctx)
static

Definition at line 2392 of file mediacodec_wrapper.c.

◆ mediacodec_ndk_cleanOutputBuffers()

static int mediacodec_ndk_cleanOutputBuffers ( FFAMediaCodec ctx)
static

Definition at line 2397 of file mediacodec_wrapper.c.

◆ mediacodec_ndk_signalEndOfInputStream()

static int mediacodec_ndk_signalEndOfInputStream ( FFAMediaCodec ctx)
static

Definition at line 2402 of file mediacodec_wrapper.c.

◆ ff_AMediaFormat_new()

FFAMediaFormat* ff_AMediaFormat_new ( int  ndk)

Definition at line 2485 of file mediacodec_wrapper.c.

Referenced by mediacodec_decode_init(), and mediacodec_init().

◆ ff_AMediaCodec_createCodecByName()

FFAMediaCodec* ff_AMediaCodec_createCodecByName ( const char *  name,
int  ndk 
)

Definition at line 2492 of file mediacodec_wrapper.c.

Referenced by ff_mediacodec_dec_init(), and mediacodec_init().

◆ ff_AMediaCodec_createDecoderByType()

FFAMediaCodec* ff_AMediaCodec_createDecoderByType ( const char *  mime_type,
int  ndk 
)

Definition at line 2499 of file mediacodec_wrapper.c.

Referenced by ff_mediacodec_dec_init().

◆ ff_AMediaCodec_createEncoderByType()

FFAMediaCodec* ff_AMediaCodec_createEncoderByType ( const char *  mime_type,
int  ndk 
)

Definition at line 2506 of file mediacodec_wrapper.c.

Referenced by mediacodec_init().

◆ ff_Build_SDK_INT()

int ff_Build_SDK_INT ( AVCodecContext avctx)

Definition at line 2513 of file mediacodec_wrapper.c.

Referenced by mediacodec_decode_init().

Variable Documentation

◆ jni_amediacodeclist_mapping

const struct FFJniField jni_amediacodeclist_mapping[]
static
Initial value:
= {
{ "android/media/MediaCodecList", NULL, NULL, FF_JNI_CLASS, 0x42, 1 },
{ "android/media/MediaCodecList", "<init>", "(I)V", FF_JNI_METHOD, 0x42, 0 },
{ "android/media/MediaCodecList", "findDecoderForFormat", "(Landroid/media/MediaFormat;)Ljava/lang/String;", FF_JNI_METHOD, 0x42, 0 },
{ "android/media/MediaCodecList", "getCodecCount", "()I", FF_JNI_STATIC_METHOD, 0x42, 1 },
{ "android/media/MediaCodecList", "getCodecInfoAt", "(I)Landroid/media/MediaCodecInfo;", FF_JNI_STATIC_METHOD, 0x42, 1 },
{ "android/media/MediaCodecInfo", NULL, NULL, FF_JNI_CLASS, 0x42, 1 },
{ "android/media/MediaCodecInfo", "getName", "()Ljava/lang/String;", FF_JNI_METHOD, 0x42, 1 },
{ "android/media/MediaCodecInfo", "getCapabilitiesForType", "(Ljava/lang/String;)Landroid/media/MediaCodecInfo$CodecCapabilities;", FF_JNI_METHOD, 0x42, 1 },
{ "android/media/MediaCodecInfo", "getSupportedTypes", "()[Ljava/lang/String;", FF_JNI_METHOD, 0x42, 1 },
{ "android/media/MediaCodecInfo", "isEncoder", "()Z", FF_JNI_METHOD, 0x42, 1 },
{ "android/media/MediaCodecInfo", "isSoftwareOnly", "()Z", FF_JNI_METHOD, 0x42, 0 },
{ "android/media/MediaCodecInfo$CodecCapabilities", NULL, NULL, FF_JNI_CLASS, 0x42, 1 },
{ "android/media/MediaCodecInfo$CodecCapabilities", "colorFormats", "[I", FF_JNI_FIELD, 0x42, 1 },
{ "android/media/MediaCodecInfo$CodecCapabilities", "profileLevels", "[Landroid/media/MediaCodecInfo$CodecProfileLevel;", FF_JNI_FIELD, 0x42, 1 },
{ "android/media/MediaCodecInfo$CodecProfileLevel", NULL, NULL, FF_JNI_CLASS, 0x42, 1 },
{ "android/media/MediaCodecInfo$CodecProfileLevel", "profile", "I", FF_JNI_FIELD, 0x42, 1 },
{ "android/media/MediaCodecInfo$CodecProfileLevel", "level", "I", FF_JNI_FIELD, 0x42, 1 },
{ NULL }
}

Definition at line 63 of file mediacodec_wrapper.c.

Referenced by ff_AMediaCodecList_getCodecNameByType().

◆ jni_amediaformat_mapping

const struct FFJniField jni_amediaformat_mapping[]
static
Initial value:
= {
{ "android/media/MediaFormat", NULL, NULL, FF_JNI_CLASS, 0x42, 1 },
{ "android/media/MediaFormat", "<init>", "()V", FF_JNI_METHOD, 0x42, 1 },
{ "android/media/MediaFormat", "containsKey", "(Ljava/lang/String;)Z", FF_JNI_METHOD,0x42, 1 },
{ "android/media/MediaFormat", "getInteger", "(Ljava/lang/String;)I", FF_JNI_METHOD, 0x42, 1 },
{ "android/media/MediaFormat", "getLong", "(Ljava/lang/String;)J", FF_JNI_METHOD, 0x42, 1 },
{ "android/media/MediaFormat", "getFloat", "(Ljava/lang/String;)F", FF_JNI_METHOD, 0x42, 1 },
{ "android/media/MediaFormat", "getByteBuffer", "(Ljava/lang/String;)Ljava/nio/ByteBuffer;", FF_JNI_METHOD, 0x42, 1 },
{ "android/media/MediaFormat", "getString", "(Ljava/lang/String;)Ljava/lang/String;", FF_JNI_METHOD, 0x42, 1 },
{ "android/media/MediaFormat", "setInteger", "(Ljava/lang/String;I)V", FF_JNI_METHOD, 0x42, 1 },
{ "android/media/MediaFormat", "setLong", "(Ljava/lang/String;J)V", FF_JNI_METHOD, 0x42, 1 },
{ "android/media/MediaFormat", "setFloat", "(Ljava/lang/String;F)V", FF_JNI_METHOD, 0x42, 1 },
{ "android/media/MediaFormat", "setByteBuffer", "(Ljava/lang/String;Ljava/nio/ByteBuffer;)V", FF_JNI_METHOD, 0x42, 1 },
{ "android/media/MediaFormat", "setString", "(Ljava/lang/String;Ljava/lang/String;)V", FF_JNI_METHOD, 0x42, 1 },
{ "android/media/MediaFormat", "toString", "()Ljava/lang/String;", FF_JNI_METHOD, 0x42, 1 },
{ NULL }
}

Definition at line 113 of file mediacodec_wrapper.c.

Referenced by ff_AMediaCodecList_getCodecNameByType(), mediaformat_jni_delete(), mediaformat_jni_new(), and mediaformat_jni_newFromObject().

◆ amediaformat_class

const AVClass amediaformat_class
static
Initial value:
= {
.class_name = "amediaformat",
.item_name = av_default_item_name,
}

Definition at line 137 of file mediacodec_wrapper.c.

◆ media_format_jni

static const FFAMediaFormat media_format_jni
static

◆ jni_amediacodec_mapping

const struct FFJniField jni_amediacodec_mapping[]
static

Definition at line 205 of file mediacodec_wrapper.c.

Referenced by codec_create(), and mediacodec_jni_delete().

◆ amediacodec_class

const AVClass amediacodec_class
static
Initial value:
= {
.class_name = "amediacodec",
.item_name = av_default_item_name,
}

Definition at line 257 of file mediacodec_wrapper.c.

◆ media_codec_jni

static const FFAMediaCodec media_codec_jni
static

◆ media_format_ndk

static const FFAMediaFormat media_format_ndk
static

◆ media_codec_ndk

static const FFAMediaCodec media_codec_ndk
static

◆ amediaformat_ndk_class

const AVClass amediaformat_ndk_class
static
Initial value:
= {
.class_name = "amediaformat_ndk",
.item_name = av_default_item_name,
}

Definition at line 1892 of file mediacodec_wrapper.c.

Referenced by mediacodec_ndk_configure(), and mediaformat_ndk_delete().

◆ amediacodec_ndk_class

const AVClass amediacodec_ndk_class
static
Initial value:
= {
.class_name = "amediacodec_ndk",
.item_name = av_default_item_name,
}

Definition at line 1898 of file mediacodec_wrapper.c.

Referenced by mediacodec_ndk_delete().

error
static void error(const char *err)
Definition: target_bsf_fuzzer.c:31
mediaformat_ndk_setRect
static void mediaformat_ndk_setRect(FFAMediaFormat *ctx, const char *name, int32_t left, int32_t top, int32_t right, int32_t bottom)
Definition: mediacodec_wrapper.c:2068
name
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
Definition: writing_filters.txt:88
mediaformat_ndk_getString
static int mediaformat_ndk_getString(FFAMediaFormat *ctx, const char *name, const char **out)
Definition: mediacodec_wrapper.c:2018
status
they must not be accessed directly The fifo field contains the frames that are queued in the input for processing by the filter The status_in and status_out fields contains the queued status(EOF or error) of the link
mediaformat_jni_setInt32
static void mediaformat_jni_setInt32(FFAMediaFormat *ctx, const char *name, int32_t value)
Definition: mediacodec_wrapper.c:959
mediaformat_jni_delete
static int mediaformat_jni_delete(FFAMediaFormat *ctx)
Definition: mediacodec_wrapper.c:687
mediaformat_jni_new
static FFAMediaFormat * mediaformat_jni_new(void)
Definition: mediacodec_wrapper.c:607
mediaformat_jni_setBuffer
static void mediaformat_jni_setBuffer(FFAMediaFormat *ctx, const char *name, void *data, size_t size)
Definition: mediacodec_wrapper.c:1073
mediaformat_jni_getString
static int mediaformat_jni_getString(FFAMediaFormat *ctx, const char *name, const char **out)
Definition: mediacodec_wrapper.c:909
mediaformat_jni_getInt64
static int mediaformat_jni_getInt64(FFAMediaFormat *ctx, const char *name, int64_t *out)
Definition: mediacodec_wrapper.c:773
FFAMediaCodecNdk
Definition: mediacodec_wrapper.c:1845
mediaformat_jni_getInt32
static int mediaformat_jni_getInt32(FFAMediaFormat *ctx, const char *name, int32_t *out)
Definition: mediacodec_wrapper.c:734
mediaformat_ndk_getInt32
static int mediaformat_ndk_getInt32(FFAMediaFormat *ctx, const char *name, int32_t *out)
Definition: mediacodec_wrapper.c:1994
mediaformat_jni_setString
static void mediaformat_jni_setString(FFAMediaFormat *ctx, const char *name, const char *value)
Definition: mediacodec_wrapper.c:1037
FF_JNI_CLASS
@ FF_JNI_CLASS
Definition: ffjni.h:90
FFAMediaFormat::delete
int(* delete)(FFAMediaFormat *)
Definition: mediacodec_wrapper.h:67
mediaformat_ndk_getInt64
static int mediaformat_ndk_getInt64(FFAMediaFormat *ctx, const char *name, int64_t *out)
Definition: mediacodec_wrapper.c:2000
AV_LOG_ERROR
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
Definition: log.h:180
mediaformat_jni_setInt64
static void mediaformat_jni_setInt64(FFAMediaFormat *ctx, const char *name, int64_t value)
Definition: mediacodec_wrapper.c:985
format
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFrame structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample format(the sample packing is implied by the sample format) and sample rate. The lists are not just lists
ctx
AVFormatContext * ctx
Definition: movenc.c:48
mediaformat_ndk_getFloat
static int mediaformat_ndk_getFloat(FFAMediaFormat *ctx, const char *name, float *out)
Definition: mediacodec_wrapper.c:2006
arg
const char * arg
Definition: jacosubdec.c:67
mediaformat_ndk_setBuffer
static void mediaformat_ndk_setBuffer(FFAMediaFormat *ctx, const char *name, void *data, size_t size)
Definition: mediacodec_wrapper.c:2062
if
if(ret)
Definition: filter_design.txt:179
mediaformat_ndk_setInt32
static void mediaformat_ndk_setInt32(FFAMediaFormat *ctx, const char *name, int32_t value)
Definition: mediacodec_wrapper.c:2038
mediaformat_ndk_getRect
static int mediaformat_ndk_getRect(FFAMediaFormat *ctx, const char *name, int32_t *left, int32_t *top, int32_t *right, int32_t *bottom)
Definition: mediacodec_wrapper.c:2029
LIBAVUTIL_VERSION_INT
#define LIBAVUTIL_VERSION_INT
Definition: version.h:85
FF_JNI_METHOD
@ FF_JNI_METHOD
Definition: ffjni.h:93
NULL
#define NULL
Definition: coverity.c:32
GET_OPTIONAL_SYMBOL
#define GET_OPTIONAL_SYMBOL(sym)
av_default_item_name
const char * av_default_item_name(void *ptr)
Return the context name.
Definition: log.c:237
ff_jni_get_env
JNIEnv * ff_jni_get_env(void *log_ctx)
Definition: ffjni.c:52
mediaformat_ndk_getBuffer
static int mediaformat_ndk_getBuffer(FFAMediaFormat *ctx, const char *name, void **data, size_t *size)
Definition: mediacodec_wrapper.c:2012
mediaformat_jni_getFloat
static int mediaformat_jni_getFloat(FFAMediaFormat *ctx, const char *name, float *out)
Definition: mediacodec_wrapper.c:812
AVERROR_EXTERNAL
#define AVERROR_EXTERNAL
Generic error in an external library.
Definition: error.h:59
amediaformat_ndk_class
static const AVClass amediaformat_ndk_class
Definition: mediacodec_wrapper.c:1892
AV_LOG_INFO
#define AV_LOG_INFO
Standard information.
Definition: log.h:191
mediaformat_ndk_new
static FFAMediaFormat * mediaformat_ndk_new(void)
Definition: mediacodec_wrapper.c:1964
FF_JNI_FIELD
@ FF_JNI_FIELD
Definition: ffjni.h:91
FFAMediaCodec
Definition: mediacodec_wrapper.h:181
mediaformat_ndk_setFloat
static void mediaformat_ndk_setFloat(FFAMediaFormat *ctx, const char *name, float value)
Definition: mediacodec_wrapper.c:2050
ret
ret
Definition: filter_design.txt:187
amediaformat_class
static const AVClass amediaformat_class
Definition: mediacodec_wrapper.c:137
mediaformat_ndk_toString
static char * mediaformat_ndk_toString(FFAMediaFormat *ctx)
Definition: mediacodec_wrapper.c:1987
mediaformat_jni_getBuffer
static int mediaformat_jni_getBuffer(FFAMediaFormat *ctx, const char *name, void **data, size_t *size)
Definition: mediacodec_wrapper.c:851
mediaformat_ndk_setInt64
static void mediaformat_ndk_setInt64(FFAMediaFormat *ctx, const char *name, int64_t value)
Definition: mediacodec_wrapper.c:2044
FF_JNI_STATIC_METHOD
@ FF_JNI_STATIC_METHOD
Definition: ffjni.h:94
ndk_codec_create
static FFAMediaCodec * ndk_codec_create(int method, const char *arg)
Definition: mediacodec_wrapper.c:2099
mediaformat_jni_toString
static char * mediaformat_jni_toString(FFAMediaFormat *ctx)
Definition: mediacodec_wrapper.c:709
mediaformat_ndk_setString
static void mediaformat_ndk_setString(FFAMediaFormat *ctx, const char *name, const char *value)
Definition: mediacodec_wrapper.c:2056
mediaformat_ndk_delete
static int mediaformat_ndk_delete(FFAMediaFormat *ctx)
Definition: mediacodec_wrapper.c:1969
codec_create
static FFAMediaCodec * codec_create(int method, const char *arg)
Definition: mediacodec_wrapper.c:1179
mediaformat_jni_setFloat
static void mediaformat_jni_setFloat(FFAMediaFormat *ctx, const char *name, float value)
Definition: mediacodec_wrapper.c:1011