Go over Android tutorial 2

This commit is contained in:
Sebastian Dröge 2016-06-03 16:34:16 +03:00
parent 63804edcca
commit 65ea75a53d
2 changed files with 14 additions and 12 deletions

View file

@ -52,10 +52,10 @@ messages sent from the C code (for errors and state changes).
# A pipeline on Android \[Java code\] # A pipeline on Android \[Java code\]
**src/com/gst\_sdk\_tutorials/tutorial\_2/Tutorial2.java** **src/org/freedesktop/gstreamer/tutorials/tutorial\_2/Tutorial2.java**
``` lang=java ``` lang=java
package com.gst_sdk_tutorials.tutorial_2; package org.freedesktop.gstreamer.tutorials.tutorial_2;
import android.app.Activity; import android.app.Activity;
import android.os.Bundle; import android.os.Bundle;
@ -608,7 +608,7 @@ jint JNI_OnLoad(JavaVM *vm, void *reserved) {
__android_log_print (ANDROID_LOG_ERROR, "tutorial-2", "Could not retrieve JNIEnv"); __android_log_print (ANDROID_LOG_ERROR, "tutorial-2", "Could not retrieve JNIEnv");
return 0; return 0;
} }
jclass klass = (*env)->FindClass (env, "com/gst_sdk_tutorials/tutorial_2/Tutorial2"); jclass klass = (*env)->FindClass (env, "org/freedesktop/gstreamer/tutorials/tutorial_2/Tutorial2");
(*env)->RegisterNatives (env, klass, native_methods, G_N_ELEMENTS(native_methods)); (*env)->RegisterNatives (env, klass, native_methods, G_N_ELEMENTS(native_methods));
pthread_key_create (&current_jni_env, detach_current_thread); pthread_key_create (&current_jni_env, detach_current_thread);
@ -660,7 +660,7 @@ jint JNI_OnLoad(JavaVM *vm, void *reserved) {
__android_log_print (ANDROID_LOG_ERROR, "tutorial-2", "Could not retrieve JNIEnv"); __android_log_print (ANDROID_LOG_ERROR, "tutorial-2", "Could not retrieve JNIEnv");
return 0; return 0;
} }
jclass klass = (*env)->FindClass (env, "com/gst_sdk_tutorials/tutorial_2/Tutorial2"); jclass klass = (*env)->FindClass (env, "org/freedesktop/gstreamer/tutorials/tutorial_2/Tutorial2");
(*env)->RegisterNatives (env, klass, native_methods, G_N_ELEMENTS(native_methods)); (*env)->RegisterNatives (env, klass, native_methods, G_N_ELEMENTS(native_methods));
pthread_key_create (&current_jni_env, detach_current_thread); pthread_key_create (&current_jni_env, detach_current_thread);
@ -1006,16 +1006,16 @@ LOCAL_SHARED_LIBRARIES := gstreamer_android
LOCAL_LDLIBS := -llog LOCAL_LDLIBS := -llog
include $(BUILD_SHARED_LIBRARY) include $(BUILD_SHARED_LIBRARY)
ifndef GSTREAMER_SDK_ROOT ifndef GSTREAMER_ROOT
ifndef GSTREAMER_SDK_ROOT_ANDROID ifndef GSTREAMER_ROOT_ANDROID
$(error GSTREAMER_SDK_ROOT_ANDROID is not defined!) $(error GSTREAMER_ROOT_ANDROID is not defined!)
endif endif
GSTREAMER_SDK_ROOT := $(GSTREAMER_SDK_ROOT_ANDROID) GSTREAMER_ROOT := $(GSTREAMER_ROOT_ANDROID)
endif endif
GSTREAMER_NDK_BUILD_PATH := $(GSTREAMER_SDK_ROOT)/share/gst-android/ndk-build/ GSTREAMER_NDK_BUILD_PATH := $(GSTREAMER_ROOT)/share/gst-android/ndk-build/
include $(GSTREAMER_NDK_BUILD_PATH)/plugins.mk include $(GSTREAMER_NDK_BUILD_PATH)/plugins.mk
GSTREAMER_PLUGINS := $(GSTREAMER_PLUGINS_CORE) $(GSTREAMER_PLUGINS_SYS) GSTREAMER_PLUGINS := $(GSTREAMER_PLUGINS_CORE) $(GSTREAMER_PLUGINS_SYS)
include $(GSTREAMER_NDK_BUILD_PATH)/gstreamer.mk include $(GSTREAMER_NDK_BUILD_PATH)/gstreamer-1.0.mk
``` ```
Notice how the required `GSTREAMER_PLUGINS` are now Notice how the required `GSTREAMER_PLUGINS` are now

View file

@ -31,7 +31,6 @@ Pages to review:
- Playback+tutorial+8+Hardware-accelerated+video+decoding.markdown - Playback+tutorial+8+Hardware-accelerated+video+decoding.markdown
- Playback+tutorial+9+Digital+audio+pass-through.markdown - Playback+tutorial+9+Digital+audio+pass-through.markdown
- Android+tutorials.markdown - Android+tutorials.markdown
- Android+tutorial+2+A+running+pipeline.markdown
- Android+tutorial+3+Video.markdown - Android+tutorial+3+Video.markdown
- Android+tutorial+4+A+basic+media+player.markdown - Android+tutorial+4+A+basic+media+player.markdown
- Android+tutorial+5+A+Complete+media+player.markdown - Android+tutorial+5+A+Complete+media+player.markdown
@ -57,7 +56,9 @@ Pages to review:
Screenshots: Screenshots:
- Create new ones with the official GStreamer logo and not saying "0.10.36". Affected: - Create new ones with the official GStreamer logo and not saying "0.10.36". Affected:
- Android tutorial 1: attachments/2654326.png - Android tutorial 1
- Android tutorial 2
- Fix filenames of all attachments to make sense
Code: Code:
- Change namespace from com.gst\* to org.freedesktop.gstreamer - Change namespace from com.gst\* to org.freedesktop.gstreamer
@ -71,6 +72,7 @@ Reviewed pages:
- Table+of+Concepts.markdown - Table+of+Concepts.markdown
- Tutorials.markdown - Tutorials.markdown
- Android+tutorial+1+Link+against+GStreamer.markdown - Android+tutorial+1+Link+against+GStreamer.markdown
- Android+tutorial+2+A+running+pipeline.markdown
For-later pages: For-later pages:
- Qt+tutorials.markdown [tpm: this should all be rewritten from scratch with qmlglsink; QtGStreamer is outdated and unmaintained, we should not promote it] - Qt+tutorials.markdown [tpm: this should all be rewritten from scratch with qmlglsink; QtGStreamer is outdated and unmaintained, we should not promote it]