From: Xavi Artigas Date: Wed, 12 Sep 2012 16:45:03 +0000 (+0200) Subject: Use a eglglessink (does not work yet) X-Git-Tag: 1.19.3~489^2~562^2~164^2^2~64 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a449e48aea86817e09b0c539932139c1ccf90e09;p=platform%2Fupstream%2Fgstreamer.git Use a eglglessink (does not work yet) --- diff --git a/gst-sdk/tutorials/android-tutorial-1/jni/Android.mk b/gst-sdk/tutorials/android-tutorial-1/jni/Android.mk index 7bf074d..b940790 100755 --- a/gst-sdk/tutorials/android-tutorial-1/jni/Android.mk +++ b/gst-sdk/tutorials/android-tutorial-1/jni/Android.mk @@ -22,7 +22,7 @@ LOCAL_SHARED_LIBRARIES := gstreamer_android LOCAL_LDLIBS := -landroid include $(BUILD_SHARED_LIBRARY) -GSTREAMER_PLUGINS = coreelements audiotestsrc videotestsrc ogg theora vorbis ffmpegcolorspace playback app audioconvert audiorate audioresample adder coreindexers gdp gio uridecodebin videorate videoscale typefindfunctions libvisual pango subparse +GSTREAMER_PLUGINS = coreelements audiotestsrc videotestsrc ogg theora vorbis ffmpegcolorspace playback app audioconvert audiorate audioresample adder coreindexers gdp gio uridecodebin videorate videoscale typefindfunctions libvisual pango subparse eglglessink GSTREAMER_STATIC_PLUGINS_PATH=/home/fluendo/cerbero/dist/android_arm/lib/gstreamer-0.10/static GSTREAMER_MK_PATH=/home/fluendo/cerbero/data/ndk-build/ include $(GSTREAMER_MK_PATH)/gstreamer.mk diff --git a/gst-sdk/tutorials/android-tutorial-1/jni/tutorial-1.c b/gst-sdk/tutorials/android-tutorial-1/jni/tutorial-1.c index 8bd7256..1d42bec 100755 --- a/gst-sdk/tutorials/android-tutorial-1/jni/tutorial-1.c +++ b/gst-sdk/tutorials/android-tutorial-1/jni/tutorial-1.c @@ -4,6 +4,7 @@ #include #include #include +#include GST_DEBUG_CATEGORY_STATIC (debug_category); #define GST_CAT_DEFAULT debug_category @@ -89,7 +90,7 @@ static void *gst_app_function (void *userdata) { GST_DEBUG ("Creating pipeline in CustomData at %p", data); - data->pipeline = gst_parse_launch ("videotestsrc num-buffers=1000 ! fakesink", NULL); + data->pipeline = gst_parse_launch ("videotestsrc ! eglglessink", NULL); /* Instruct the bus to emit signals for each received message, and connect to the interesting signals */ bus = gst_element_get_bus (data->pipeline); @@ -163,6 +164,8 @@ void gst_native_surface_init (JNIEnv *env, jobject thiz, jobject surface) { } data->native_window = ANativeWindow_fromSurface(env, surface); GST_DEBUG ("Got Native Window %p", data->native_window); + + gst_x_overlay_set_window_handle (GST_X_OVERLAY (data->pipeline), (guintptr)data->native_window); } void gst_native_surface_finalize (JNIEnv *env, jobject thiz) { @@ -170,6 +173,8 @@ void gst_native_surface_finalize (JNIEnv *env, jobject thiz) { GST_DEBUG ("Releasing Native Window %p", data->native_window); ANativeWindow_release (data->native_window); data->native_window = NULL; + + gst_x_overlay_set_window_handle (GST_X_OVERLAY (data->pipeline), (guintptr)NULL); } static JNINativeMethod native_methods[] = {