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