libgpac
Documentation of the core library of GPAC
Loading...
Searching...
No Matches
dec_mediacodec_jni.c File Reference
#include <gpac/tools.h>
#include <gpac/constants.h>
#include <android/native_window_jni.h>
#include <android/asset_manager.h>
#include <android/asset_manager_jni.h>
#include <jni.h>
#include "dec_mediacodec.h"

Macros

#define ALL_CODECS   1
 

Functions

static void HandleJNIError (JNIEnv *env)
 
static jclass FindAppClass (JNIEnv *env, const char *name)
 
static GF_Err CacheAppClassLoader (JNIEnv *env, const char *name)
 
jint JNI_OnLoad (JavaVM *vm, void *reserved)
 
JNIEnv * GetEnv ()
 
JavaVM * GetJavaVM ()
 
u32 mcdec_exit_callback (void *param)
 
GF_Err mcdec_create_surface (GLuint tex_id, ANativeWindow **window, Bool *surface_rendering, GF_MCDecSurfaceTexture *surfaceTex)
 
static char * mcdec_get_decoder_name (JNIEnv *env, jobject mediaCodecList, jmethodID findId, jobject mediaFomat)
 
char * mcdec_find_decoder (const char *mime, u32 width, u32 height, Bool *is_adaptive)
 
GF_Err mcdec_update_surface (GF_MCDecSurfaceTexture surfaceTex)
 
GF_Err mcdec_get_transform_matrix (GF_Matrix *mx, GF_MCDecSurfaceTexture surfaceTex)
 
GF_Err mcdec_delete_surface (GF_MCDecSurfaceTexture surfaceTex)
 

Variables

static jclass cSurfaceTexture = NULL
 
static jclass cSurface = NULL
 
static jclass cMediaCodecList = NULL
 
static jclass cMediaFormat = NULL
 
static jmethodID mUpdateTexImage
 
static jmethodID mSurfaceTexConstructor
 
static jmethodID mSurfaceConstructor
 
static jmethodID mSurfaceRelease
 
static jmethodID mGetTransformMatrix
 
static jmethodID mFindClassMethod
 
static jmethodID mMediaCodecListConstructor
 
static jmethodID mFindDecoderForFormat
 
static jmethodID mCreateVideoFormat
 
static jmethodID mSetFeatureEnabled
 
static jobject oClassLoader = NULL
 
static JavaVM * javaVM = 0
 

Macro Definition Documentation

◆ ALL_CODECS

#define ALL_CODECS   1

Function Documentation

◆ HandleJNIError()

static void HandleJNIError ( JNIEnv *  env)
static

◆ FindAppClass()

static jclass FindAppClass ( JNIEnv *  env,
const char *  name 
)
static

◆ CacheAppClassLoader()

static GF_Err CacheAppClassLoader ( JNIEnv *  env,
const char *  name 
)
static

◆ JNI_OnLoad()

jint JNI_OnLoad ( JavaVM *  vm,
void *  reserved 
)

◆ GetEnv()

JNIEnv * GetEnv ( )

◆ GetJavaVM()

JavaVM * GetJavaVM ( )

◆ mcdec_exit_callback()

u32 mcdec_exit_callback ( void *  param)

◆ mcdec_create_surface()

GF_Err mcdec_create_surface ( GLuint  tex_id,
ANativeWindow **  window,
Bool surface_rendering,
GF_MCDecSurfaceTexture surfaceTex 
)

◆ mcdec_get_decoder_name()

static char * mcdec_get_decoder_name ( JNIEnv *  env,
jobject  mediaCodecList,
jmethodID  findId,
jobject  mediaFomat 
)
static

◆ mcdec_find_decoder()

char * mcdec_find_decoder ( const char *  mime,
u32  width,
u32  height,
Bool is_adaptive 
)

◆ mcdec_update_surface()

GF_Err mcdec_update_surface ( GF_MCDecSurfaceTexture  surfaceTex)

◆ mcdec_get_transform_matrix()

GF_Err mcdec_get_transform_matrix ( GF_Matrix mx,
GF_MCDecSurfaceTexture  surfaceTex 
)

◆ mcdec_delete_surface()

GF_Err mcdec_delete_surface ( GF_MCDecSurfaceTexture  surfaceTex)

Variable Documentation

◆ cSurfaceTexture

jclass cSurfaceTexture = NULL
static

◆ cSurface

jclass cSurface = NULL
static

◆ cMediaCodecList

jclass cMediaCodecList = NULL
static

◆ cMediaFormat

jclass cMediaFormat = NULL
static

◆ mUpdateTexImage

jmethodID mUpdateTexImage
static

◆ mSurfaceTexConstructor

jmethodID mSurfaceTexConstructor
static

◆ mSurfaceConstructor

jmethodID mSurfaceConstructor
static

◆ mSurfaceRelease

jmethodID mSurfaceRelease
static

◆ mGetTransformMatrix

jmethodID mGetTransformMatrix
static

◆ mFindClassMethod

jmethodID mFindClassMethod
static

◆ mMediaCodecListConstructor

jmethodID mMediaCodecListConstructor
static

◆ mFindDecoderForFormat

jmethodID mFindDecoderForFormat
static

◆ mCreateVideoFormat

jmethodID mCreateVideoFormat
static

◆ mSetFeatureEnabled

jmethodID mSetFeatureEnabled
static

◆ oClassLoader

jobject oClassLoader = NULL
static

◆ javaVM

JavaVM* javaVM = 0
static