提交 6c36df29 编写于 作者: Z Zhang Rui

remove redundant functions

上级 99a7ce5c
......@@ -566,7 +566,7 @@ IjkMediaPlayer_getMediaMeta(JNIEnv *env, jobject thiz)
is_locked = true;
jlocal_bundle = JJKC_Bundle__Bundle(env);
if (SDL_JNI_RethrowException(env)) {
if (JJK_ExceptionCheck__throwAny(env)) {
goto LABEL_RETURN;
}
......@@ -579,7 +579,7 @@ IjkMediaPlayer_getMediaMeta(JNIEnv *env, jobject thiz)
fillMetaInternal(env, jlocal_bundle, meta, IJKM_KEY_AUDIO_STREAM, "-1");
jarray_list = JJKC_ArrayList__ArrayList(env);
if (SDL_JNI_RethrowException(env)) {
if (JJK_ExceptionCheck__throwAny(env)) {
goto LABEL_RETURN;
}
......@@ -588,7 +588,7 @@ IjkMediaPlayer_getMediaMeta(JNIEnv *env, jobject thiz)
IjkMediaMeta *streamRawMeta = ijkmeta_get_child_l(meta, i);
if (streamRawMeta) {
jstream_bundle = JJKC_Bundle__Bundle(env);
if (SDL_JNI_RethrowException(env)) {
if (JJK_ExceptionCheck__throwAny(env)) {
goto LABEL_RETURN;
}
......@@ -616,7 +616,7 @@ IjkMediaPlayer_getMediaMeta(JNIEnv *env, jobject thiz)
fillMetaInternal(env, jstream_bundle, streamRawMeta, IJKM_KEY_CHANNEL_LAYOUT, NULL );
}
JJKC_ArrayList__add(env, jarray_list, jstream_bundle);
if (SDL_JNI_RethrowException(env)) {
if (JJK_ExceptionCheck__throwAny(env)) {
goto LABEL_RETURN;
}
}
......@@ -707,8 +707,8 @@ inject_callback(void *opaque, int what, void *data, size_t data_size)
case IJKAVINJECT_ON_HTTP_RETRY:
case IJKAVINJECT_ON_LIVE_RETRY: {
IJKAVInject_OnUrlOpenData *real_data = (IJKAVInject_OnUrlOpenData *) data;
jbundle = JJKC_Bundle__Bundle(env);
if (SDL_JNI_CatchException(env) || !jbundle) {
jbundle = JJKC_Bundle__Bundle__catchAll(env);
if (!jbundle) {
ALOGE("%s: ASDK_Bundle__init failed\n", __func__);
goto fail;
}
......@@ -730,7 +730,7 @@ inject_callback(void *opaque, int what, void *data, size_t data_size)
}
fail:
SDL_JNI_CatchException(env);
JJK_ExceptionCheck__catchAll(env);
SDL_JNI_DeleteLocalRefP(env, &jbundle);
return ret;
}
......
......@@ -25,6 +25,7 @@
#define IJKSDL_ANDROID__IJKSDL_ANDROID_JNI_H
#include <jni.h>
#include "ijksdl/android/jjk/internal/jjk_internal.h"
#define IJK_API_1_BASE 1 // 1.0
#define IJK_API_2_BASE_1_1 2 // 1.1
......@@ -55,8 +56,6 @@ JavaVM *SDL_JNI_GetJvm();
jint SDL_JNI_SetupThreadEnv(JNIEnv **p_env);
void SDL_JNI_DetachThreadEnv();
jboolean SDL_JNI_RethrowException(JNIEnv *env);
jboolean SDL_JNI_CatchException(JNIEnv *env);
int SDL_JNI_ThrowException(JNIEnv *env, const char *exception, const char* msg);
int SDL_JNI_ThrowIllegalStateException(JNIEnv *env, const char* msg);
......@@ -70,12 +69,12 @@ int SDL_Android_GetApiLevel();
#define IJK_FIND_JAVA_CLASS(env__, var__, classsign__) \
do { \
jclass clazz = (*env__)->FindClass(env__, classsign__); \
if (SDL_JNI_CatchException(env) || !(clazz)) { \
if (JJK_ExceptionCheck__catchAll(env) || !(clazz)) { \
ALOGE("FindClass failed: %s", classsign__); \
return -1; \
} \
var__ = (*env__)->NewGlobalRef(env__, clazz); \
if (SDL_JNI_CatchException(env) || !(var__)) { \
if (JJK_ExceptionCheck__catchAll(env) || !(var__)) { \
ALOGE("FindClass::NewGlobalRef failed: %s", classsign__); \
(*env__)->DeleteLocalRef(env__, clazz); \
return -1; \
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册