static int com_media_ffmpeg_FFMpegPlayer_getVideoHeight(JNIEnv *env, jobject thiz) { MediaPlayer* mp = getMediaPlayer(env, thiz); if (mp == NULL ) { jniThrowException(env, "java/lang/IllegalStateException", NULL); return 0; } int h; if (0 != mp->getVideoHeight(&h)) { h = 0; } return h; }
static int wseemann_media_FFmpegMediaPlayer_getVideoHeight(JNIEnv *env, jobject thiz) { MediaPlayer* mp = getMediaPlayer(env, thiz); if (mp == NULL ) { jniThrowException(env, "java/lang/IllegalStateException", NULL); return 0; } int h; if (0 != mp->getVideoHeight(&h)) { __android_log_write(ANDROID_LOG_ERROR, LOG_TAG, "getVideoHeight failed"); h = 0; } __android_log_print(ANDROID_LOG_VERBOSE, LOG_TAG, "getVideoHeight: %d", h); return h; }