<div dir="ltr">Hey all.<br><br>I am a getting to know GStreamer. I was trying to develop a simple Android application that would receive a network stream generated on Desktop pc. I got stuck in displaying simple video (e.g. videotestsrc) on some of my Android devices and I have no clue where to go next.<br>
<br>First the description of my setup. For development I am using Nexus 10 (Android 4.3, API 18), Android emulators (different API's, tested on API's 9, 10, 16, 17) and a phone LG-P990 (Android 2.3.4, API 10). I develop on Ubuntu 13.04 (64 bit) and I am using Android NDK r9 (newest one). I was trying to run tutorial 3 from the website (<a href="http://docs.gstreamer.com/display/GstSDK/Android+tutorial+3%3A+Video">http://docs.gstreamer.com/display/GstSDK/Android+tutorial+3%3A+Video</a>) using two GStreamer SDK's:<br>
- GStreamer SDK 2013.6 (Congo, avalible at <a href="http://cdn.gstreamer.com/android/arm/gstreamer-sdk-android-arm-debug-2013.6.tar.bz2">http://cdn.gstreamer.com/android/arm/gstreamer-sdk-android-arm-debug-2013.6.tar.bz2</a>)<br>
- GStreamer 1.2 (newest one, avalible at <a href="http://gstreamer.freedesktop.org/data/pkg/android/1.2.0/gstreamer-1.0-android-arm-1.2.0-debug.tar.bz2">http://gstreamer.freedesktop.org/data/pkg/android/1.2.0/gstreamer-1.0-android-arm-1.2.0-debug.tar.bz2</a>)<br>
<br>Of course, running tutorial 3 using GStreamer 1.2 required some minor changes in code:<br>- Android.mk:<br>    change GSTREAMER_SDK_ROOT to GSTREAMER_ROOT, so that it fits the variable defined at <a href="http://gstreamer-1.0.mk">gstreamer-1.0.mk</a><br>
    change <a href="http://gstreamer.mk">gstreamer.mk</a> to <a href="http://gstreamer-1.0.mk">gstreamer-1.0.mk</a> and gstreamer-video-0.10 to gstreamer-video-1.0 (and also remove interfaces)<br>- tutorial-3.c<br>    change #include <gst/interfaces/xoverlay.h> to #include <gst/video/videooverlay.h><br>
    change all occurences of "x_overlay" string to "video_overlay"<br>        change ffmpegcolorspace to videoconvert<br><br>Taking into consideration those changes, I was able to run demos on LG-P990 phone (Android 2.3.4), but I was not able to make it work neither on Nexus 10 nor any of emulators. I get different errors from Nexus and from emulators, but I feel the origin of those errors is the same. <br>
<br>From what I inferred, the problem is connected with creating the surface to display video. In both cases (emulator and Nexus 10) the error is generated after invoking nativePause() in Tutorial3.java - line 108 (which invokes gst_native_pause of tutorial-3.c line 247, where gst_element_set_state (data->pipeline, GST_STATE_PAUSED) function is invoked).<br>
<br>Function gst_element_set_state (data->pipeline, GST_STATE_PAUSED) is being succesfully invoked and afterwards the error appears. Here is the part of log from Emulator where error occurs (full log listed at the end of the post):<br>
<raw><br>0-15 12:55:33.406: D/GStreamer+tutorial-3(518): 0:01:21.432822137 0x784460 jni/tutorial-3.c:92:set_ui_message Setting message to: State changed to READY<br>10-15 12:55:33.636: D/GStreamer+eglglessink(518): 0:01:21.662179397 0x79f180 gsteglglessink.c:1162:gst_eglglessink_setcaps:<autovideosink2-actual-sink-eglgles> Current caps 0x0, setting caps 0x798fa0<br>
10-15 12:55:33.636: D/GStreamer+eglglessink(518): 0:01:21.662682301 0x79f180 gsteglglessink.c:1033:gst_eglglessink_show_frame:<autovideosink2-actual-sink-eglgles> Got buffer: 0x7b5b10<br>10-15 12:55:33.636: D/GStreamer+eglglessink(518): 0:01:21.663674144 0x79f180 gsteglglessink.c:706:gst_eglglessink_queue_buffer:<autovideosink2-actual-sink-eglgles> Queueing buffer 0x7b5b10<br>
10-15 12:55:33.636: D/GStreamer+eglglessink(518): 0:01:21.664201190 0x795860 gsteglglessink.c:262:render_thread_func:<autovideosink2-actual-sink-eglgles> Handling object 0x7b5b10<br>10-15 12:55:33.646: E/GStreamer+egladaption(518): 0:01:21.664622353 0x795860 gstegladaptation.c:338:gst_egl_adaptation_choose_config:<autovideosink2-actual-sink-eglgles> Could not find matching framebuffer config<br>
10-15 12:55:33.646: E/GStreamer+egladaption(518): 0:01:21.664853550 0x795860 gstegladaptation.c:351:gst_egl_adaptation_choose_config:<autovideosink2-actual-sink-eglgles> Couldn't choose an usable config<br>10-15 12:55:33.646: E/GStreamer+eglglessink(518): 0:01:21.665080672 0x795860 gsteglglessink.c:1106:gst_eglglessink_configure_caps:<autovideosink2-actual-sink-eglgles> Couldn't choose EGL config<br>
10-15 12:55:33.646: E/GStreamer+eglglessink(518): 0:01:21.665306559 0x795860 gsteglglessink.c:1149:gst_eglglessink_configure_caps:<autovideosink2-actual-sink-eglgles> Configuring caps failed<br>10-15 12:55:33.646: D/GStreamer+eglglessink(518): 0:01:21.667165446 0x79f180 gsteglglessink.c:718:gst_eglglessink_queue_buffer:<autovideosink2-actual-sink-eglgles> Waiting for buffer to be rendered<br>
10-15 12:55:33.646: D/GStreamer+eglglessink(518): 0:01:21.667635710 0x795860 gsteglglessink.c:318:render_thread_func:<autovideosink2-actual-sink-eglgles> Shutting down thread<br>10-15 12:55:33.646: D/GStreamer+egladaption(518): 0:01:21.667885634 0x795860 gstegladaptation_egl.c:269:gst_egl_adaptation_make_current:<autovideosink2-actual-sink-eglgles> Detaching context from thread 0x795860<br>
</raw><br><br>and below there is part of the log where error happens on Nexus device (full log listed below):<br><raw><br>10-16 11:39:39.303: D/GStreamer+tutorial-3(2855): 0:00:17.576086508 0x738a2dc0 jni/tutorial-3.c:250:gst_native_pause Setting state to PAUSED<br>
10-16 11:39:39.463: D/mali_winsys(2855): new_window_surface returns 0x3000<br>10-16 11:39:39.463: A/libc(2855): Fatal signal 8 (SIGFPE) at 0x00000b27 (code=-6), thread 2927 (eglglessink-ren)<br>10-16 11:39:39.878: D/GStreamer+tutorial-3(2855): 0:00:18.147828675 0x738a30c0 jni/tutorial-3.c:88:set_ui_message Setting message to: State changed to PAUSED<br>
</raw><br><br>An error on Emulator from GStreamer1.2 is slightly different (more elements report) but apart from some more warnings the same errors appear.<br><br>Could any of you reproduce such error, or happened to see it before? Do you have any advice on how to proceed further (my aim is to get in running on Nexus 10 device, and running on emulator would be also nice). I have tried to research problem on the internet, but I couldn't find any information concerning those errors.<br>
<br>Thanks in advance for your help!<br><br>Regards,<br>Michal<br><br><br>Full log for Emulator:<br><raw><br>10-15 12:55:31.846: I/GStreamer(518): GStreamer already initialized<br>10-15 12:55:32.346: I/GStreamer(518): Activity created. There is no saved state, playing: false<br>
10-15 12:55:32.346: D/GStreamer+tutorial-3(518): 0:01:20.366688478 0x76f180 jni/tutorial-3.c:220:gst_native_init Created CustomData at 0x7b1308<br>10-15 12:55:32.346: D/GStreamer+tutorial-3(518): 0:01:20.367614399 0x76f180 jni/tutorial-3.c:222:gst_native_init Created GlobalRef for app object at 0x40524e30<br>
10-15 12:55:32.346: I/GStreamer(518): onMeasure called with 320x240<br>10-15 12:55:32.396: D/GStreamer+tutorial-3(518): 0:01:20.420183247 0x784460 jni/tutorial-3.c:156:app_function Creating pipeline in CustomData at 0x7b1308<br>
10-15 12:55:32.536: D/GStreamer(518): Surface created: Surface(name=null, identity=34)<br>10-15 12:55:32.546: D/GStreamer(518): Surface changed to format 4 width 557 height 418<br>10-15 12:55:32.546: D/GStreamer+tutorial-3(518): 0:01:20.565598112 0x76f180 jni/tutorial-3.c:278:gst_native_surface_init Received surface 0x40522e48 (native window 0x79e610)<br>
10-15 12:55:32.616: I/GStreamer(518): onMeasure called with 320x240<br>10-15 12:55:33.206: D/GStreamer+egladaption(518): 0:01:21.227959088 0x784460 gstegladaptation_egl.c:131:gst_egl_adaptation_init_display:<autovideosink2-actual-sink-eglgles> Enter EGL initial configuration<br>
10-15 12:55:33.206: I/GStreamer+egladaption(518): 0:01:21.228411565 0x784460 gstegladaptation_egl.c:172:gst_egl_adaptation_init_display:<autovideosink2-actual-sink-eglgles> System reports supported EGL version v1.4<br>
10-15 12:55:33.206: D/GStreamer+egladaption(518): 0:01:21.232498401 0x784460 gstegladaptation.c:362:gst_egl_adaptation_fill_supported_fbuffer_configs:<autovideosink2-actual-sink-eglgles> Building initial list of wanted eglattribs per format<br>
10-15 12:55:33.216: D/GStreamer+tutorial-3(518): 0:01:21.237238972 0x784460 jni/tutorial-3.c:192:app_function Entering main loop... (CustomData:0x7b1308)<br>10-15 12:55:33.216: D/GStreamer+tutorial-3(518): 0:01:21.238231246 0x784460 jni/tutorial-3.c:54:attach_current_thread Attaching thread 0x784460<br>
10-15 12:55:33.216: D/GStreamer+tutorial-3(518): 0:01:21.240439716 0x784460 jni/tutorial-3.c:134:check_initialization_complete Initialization complete, notifying application. native_window:0x79e610 main_loop:0xf76a0<br>10-15 12:55:33.216: D/GStreamer+eglglessink(518): 0:01:21.240906894 0x784460 gsteglglessink.c:647:gst_eglglessink_set_window_handle:<autovideosink2-actual-sink-eglgles> We got a window handle: 0x79e610<br>
10-15 12:55:33.216: I/GStreamer(518): Gst initialized. Restoring state, playing:false<br>10-15 12:55:33.216: D/GStreamer+tutorial-3(518): 0:01:21.241555194 0x784460 jni/tutorial-3.c:254:gst_native_pause Setting state to PAUSED<br>
10-15 12:55:33.216: D/GStreamer+eglglessink(518): 0:01:21.243261247 0x784460 gsteglglessink.c:345:gst_eglglessink_start:<autovideosink2-actual-sink-eglgles> Starting<br>10-15 12:55:33.216: D/GStreamer+eglglessink(518): 0:01:21.243988965 0x784460 gsteglglessink.c:380:gst_eglglessink_start:<autovideosink2-actual-sink-eglgles> Started<br>
10-15 12:55:33.226: D/GStreamer+eglglessink(518): 0:01:21.250997677 0x795860 gsteglglessink.c:252:render_thread_func:<autovideosink2-actual-sink-eglgles> posting ENTER stream status<br>10-15 12:55:33.406: D/GStreamer+tutorial-3(518): 0:01:21.432822137 0x784460 jni/tutorial-3.c:92:set_ui_message Setting message to: State changed to READY<br>
10-15 12:55:33.636: D/GStreamer+eglglessink(518): 0:01:21.662179397 0x79f180 gsteglglessink.c:1162:gst_eglglessink_setcaps:<autovideosink2-actual-sink-eglgles> Current caps 0x0, setting caps 0x798fa0<br>10-15 12:55:33.636: D/GStreamer+eglglessink(518): 0:01:21.662682301 0x79f180 gsteglglessink.c:1033:gst_eglglessink_show_frame:<autovideosink2-actual-sink-eglgles> Got buffer: 0x7b5b10<br>
10-15 12:55:33.636: D/GStreamer+eglglessink(518): 0:01:21.663674144 0x79f180 gsteglglessink.c:706:gst_eglglessink_queue_buffer:<autovideosink2-actual-sink-eglgles> Queueing buffer 0x7b5b10<br>10-15 12:55:33.636: D/GStreamer+eglglessink(518): 0:01:21.664201190 0x795860 gsteglglessink.c:262:render_thread_func:<autovideosink2-actual-sink-eglgles> Handling object 0x7b5b10<br>
10-15 12:55:33.646: E/GStreamer+egladaption(518): 0:01:21.664622353 0x795860 gstegladaptation.c:338:gst_egl_adaptation_choose_config:<autovideosink2-actual-sink-eglgles> Could not find matching framebuffer config<br>
10-15 12:55:33.646: E/GStreamer+egladaption(518): 0:01:21.664853550 0x795860 gstegladaptation.c:351:gst_egl_adaptation_choose_config:<autovideosink2-actual-sink-eglgles> Couldn't choose an usable config<br>10-15 12:55:33.646: E/GStreamer+eglglessink(518): 0:01:21.665080672 0x795860 gsteglglessink.c:1106:gst_eglglessink_configure_caps:<autovideosink2-actual-sink-eglgles> Couldn't choose EGL config<br>
10-15 12:55:33.646: E/GStreamer+eglglessink(518): 0:01:21.665306559 0x795860 gsteglglessink.c:1149:gst_eglglessink_configure_caps:<autovideosink2-actual-sink-eglgles> Configuring caps failed<br>10-15 12:55:33.646: D/GStreamer+eglglessink(518): 0:01:21.667165446 0x79f180 gsteglglessink.c:718:gst_eglglessink_queue_buffer:<autovideosink2-actual-sink-eglgles> Waiting for buffer to be rendered<br>
10-15 12:55:33.646: D/GStreamer+eglglessink(518): 0:01:21.667635710 0x795860 gsteglglessink.c:318:render_thread_func:<autovideosink2-actual-sink-eglgles> Shutting down thread<br>10-15 12:55:33.646: D/GStreamer+egladaption(518): 0:01:21.667885634 0x795860 gstegladaptation_egl.c:269:gst_egl_adaptation_make_current:<autovideosink2-actual-sink-eglgles> Detaching context from thread 0x795860<br>
10-15 12:55:33.646: D/GStreamer+eglglessink(518): 0:01:21.668215328 0x795860 gsteglglessink.c:333:render_thread_func:<autovideosink2-actual-sink-eglgles> posting LEAVE stream status<br>10-15 12:55:33.646: D/GStreamer+eglglessink(518): 0:01:21.669378653 0x79f180 gsteglglessink.c:721:gst_eglglessink_queue_buffer:<autovideosink2-actual-sink-eglgles> Buffer rendered: wrong-state<br>
</raw><br><br>Full log from Android device:<br><raw><br>10-16 11:39:22.118: I/GStreamer(2855): onMeasure called with 320x240<br>10-16 11:39:22.138: D/mali_winsys(2855): new_window_surface returns 0x3000<br>10-16 11:39:22.168: D/OpenGLRenderer(2855): Enabling debug mode 0<br>
10-16 11:39:22.183: D/GStreamer(2855): Surface created: Surface(name=null)<br>10-16 11:39:23.218: D/dalvikvm(2855): threadid=1: still suspended after undo (sc=1 dc=1)<br>10-16 11:39:28.748: D/GStreamer(2855): Surface changed to format 4 width 1525 height 1144<br>
10-16 11:39:29.978: D/GStreamer+tutorial-3(2855): 0:00:08.248850170 0x738a2dc0 jni/tutorial-3.c:274:gst_native_surface_init Received surface 0x72500021 (native window 0x74d79678)<br>10-16 11:39:29.978: D/GStreamer+tutorial-3(2855): 0:00:08.249431545 0x738a2dc0 jni/tutorial-3.c:54:attach_current_thread Attaching thread 0x738a2dc0<br>
10-16 11:39:29.978: D/GStreamer+tutorial-3(2855): 0:00:08.250389545 0x738a2dc0 jni/tutorial-3.c:130:check_initialization_complete Initialization complete, notifying application. native_window:0x74d79678 main_loop:0x738c3c28<br>
10-16 11:39:36.773: I/GStreamer(2855): Gst initialized. Restoring state, playing:false<br>10-16 11:39:39.303: D/GStreamer+tutorial-3(2855): 0:00:17.576086508 0x738a2dc0 jni/tutorial-3.c:250:gst_native_pause Setting state to PAUSED<br>
10-16 11:39:39.463: D/mali_winsys(2855): new_window_surface returns 0x3000<br>10-16 11:39:39.463: A/libc(2855): Fatal signal 8 (SIGFPE) at 0x00000b27 (code=-6), thread 2927 (eglglessink-ren)<br>10-16 11:39:39.878: D/GStreamer+tutorial-3(2855): 0:00:18.147828675 0x738a30c0 jni/tutorial-3.c:88:set_ui_message Setting message to: State changed to PAUSED<br>
</raw><br></div>