mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-24 18:51:11 +00:00
Do not use GST_ERROR before GStreamer has been initialized
This commit is contained in:
parent
686de232a6
commit
6bdae5f2a6
2 changed files with 3 additions and 1 deletions
|
@ -5,6 +5,7 @@ include $(CLEAR_VARS)
|
|||
LOCAL_MODULE := tutorial-1
|
||||
LOCAL_SRC_FILES := tutorial-1.c
|
||||
LOCAL_SHARED_LIBRARIES := gstreamer_android
|
||||
LOCAL_LDLIBS := -llog
|
||||
include $(BUILD_SHARED_LIBRARY)
|
||||
|
||||
ifndef GSTREAMER_SDK_ROOT
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#include <string.h>
|
||||
#include <jni.h>
|
||||
#include <android/log.h>
|
||||
#include <gst/gst.h>
|
||||
|
||||
/*
|
||||
|
@ -17,7 +18,7 @@ jint JNI_OnLoad(JavaVM *vm, void *reserved) {
|
|||
JNIEnv *env = NULL;
|
||||
|
||||
if ((*vm)->GetEnv(vm, (void**) &env, JNI_VERSION_1_4) != JNI_OK) {
|
||||
GST_ERROR ("Could not retrieve JNIEnv");
|
||||
__android_log_print (ANDROID_LOG_ERROR, "tutorial-2", "Could not retrieve JNIEnv");
|
||||
return 0;
|
||||
}
|
||||
jclass klass = (*env)->FindClass (env, "com/gst_sdk_tutorials/tutorial_1/Tutorial1");
|
||||
|
|
Loading…
Reference in a new issue