Multiple regressions in Android Gstreamer 1.7.1

Grégoire Gentil gregoire at gentil.com
Wed Jan 20 14:27:36 PST 2016


I have Android Gstreamer 1.7.1 and they are many problems that didn't 
exist before.

Environment: Eclipse + SDK 10e + Nexus 5x running 6.0.1

I have compiled gstreamer as of January 19, 2016, with:
./cerbero-uninstalled -c config/cross-android.cbc bootstrap
./cerbero-uninstalled -c config/cross-android-armv7.cbc package 
gstreamer-1.0

I'm running tutorial5 from 
git://people.freedesktop.org/~slomo/gst-sdk-tutorials with the patch below.

I'm running the video files available at: 
http://www.gentil.com/tmp/sdcard-gstreamer-1.7.1.zip


1) libav doesn't compile. If I have libav for software decoding, I have 
a compilation error:
GStreamer      : [GEN] => gst-build-armeabi/gstreamer_android.c
GStreamer      : [COMPILE] => gst-build-armeabi/gstreamer_android.c
GStreamer      : [LINK] => gst-build-armeabi/libgstreamer_android.so
gstavdeinterlace.c:379: error: undefined reference to 
'av_buffersrc_add_frame'
gstavdeinterlace.c:306: error: undefined reference to 'avfilter_graph_free'
gstavdeinterlace.c:329: error: undefined reference to 'avfilter_graph_alloc'
gstavdeinterlace.c:333: error: undefined reference to 
'avfilter_graph_parse2'
gstavdeinterlace.c:340: error: undefined reference to 
'avfilter_graph_config'
gstavdeinterlace.c:345: error: undefined reference to 
'avfilter_graph_get_filter'
gstavdeinterlace.c:347: error: undefined reference to 
'avfilter_graph_get_filter'
gstavdeinterlace.c:384: error: undefined reference to 
'av_buffersink_get_frame'
gstavdeinterlace.c:306: error: undefined reference to 'avfilter_graph_free'
collect2: error: ld returned 1 exit status
make: *** [buildsharedlibrary_armeabi] Error 1

This was compiling fine 2 or 3 weeks ago before new year's eve.


2) I have an error for glimagesink:
01-20 13:42:02.155: E/GStreamer+glbasetexture(30835): 0:00:02.907129009 
0xf3ac6b80 gstglmemory.c:725:_gl_tex_copy Cannot copy External OES textures


3) The files "stream-21fps-audio.mp4", "local-50fps.mp4" don't run at 
all. The file "local-25fps.mp4" works only every other time and it 
usually freezes quickly.


All the videos can't be played by vlc on Nexus 5.x and also by 
tutorial-5 if compiled against gstreamer-1.5 + ndk-v9.


On a more complex application, I have also seen multiple problems of 
performance with 1.7 which didn't exist on 1.5. But I'm reporting first 
what I can easily reproduce on the tutorial.

Has anyone any idea what's going on?

Grégoire




diff --git a/gst-sdk/tutorials/android-tutorial-5/AndroidManifest.xml 
b/gst-sdk/tutorials/android-tutorial-5/AndroidManifest.xml
index 06c9e5d..9c72e08 100755
--- a/gst-sdk/tutorials/android-tutorial-5/AndroidManifest.xml
+++ b/gst-sdk/tutorials/android-tutorial-5/AndroidManifest.xml
@@ -5,11 +5,12 @@
      android:versionName="1.0" >

      <uses-sdk
-        android:minSdkVersion="9"
-        android:targetSdkVersion="14" />
+        android:minSdkVersion="19"
+        android:targetSdkVersion="19" />

      <uses-permission android:name="android.permission.INTERNET" />
      <uses-permission android:name="android.permission.WAKE_LOCK" />
+    <uses-permission 
android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

      <uses-feature android:glEsVersion="0x00020000" />

diff --git a/gst-sdk/tutorials/android-tutorial-5/jni/Android.mk 
b/gst-sdk/tutorials/android-tutorial-5/jni/Android.mk
index 1211734..590ab59 100755
--- a/gst-sdk/tutorials/android-tutorial-5/jni/Android.mk
+++ b/gst-sdk/tutorials/android-tutorial-5/jni/Android.mk
@@ -8,6 +8,7 @@ LOCAL_SHARED_LIBRARIES := gstreamer_android
  LOCAL_LDLIBS := -llog -landroid
  include $(BUILD_SHARED_LIBRARY)

+GSTREAMER_ROOT_ANDROID := ../res-gstreamer
  ifndef GSTREAMER_ROOT
  ifndef GSTREAMER_ROOT_ANDROID
  $(error GSTREAMER_ROOT_ANDROID is not defined!)
@@ -16,7 +17,7 @@ GSTREAMER_ROOT        := $(GSTREAMER_ROOT_ANDROID)
  endif
  GSTREAMER_NDK_BUILD_PATH  := 
$(GSTREAMER_ROOT)/share/gst-android/ndk-build/
  include $(GSTREAMER_NDK_BUILD_PATH)/plugins.mk
-GSTREAMER_PLUGINS         := $(GSTREAMER_PLUGINS_CORE) 
$(GSTREAMER_PLUGINS_PLAYBACK) $(GSTREAMER_PLUGINS_CODECS) 
$(GSTREAMER_PLUGINS_NET) $(GSTREAMER_PLUGINS_SYS)
+GSTREAMER_PLUGINS         := $(GSTREAMER_PLUGINS_CORE) 
$(GSTREAMER_PLUGINS_PLAYBACK) $(GSTREAMER_PLUGINS_CODECS) 
$(GSTREAMER_PLUGINS_NET) $(GSTREAMER_PLUGINS_SYS) mpegtsdemux mpegtsmux 
avi debug videoconvert gdkpixbuf rtpmanager androidmedia lame isomp4 
videocrop
  G_IO_MODULES              := gnutls
  GSTREAMER_EXTRA_DEPS      := gstreamer-video-1.0
  include $(GSTREAMER_NDK_BUILD_PATH)/gstreamer-1.0.mk
diff --git a/gst-sdk/tutorials/android-tutorial-5/jni/tutorial-5.c 
b/gst-sdk/tutorials/android-tutorial-5/jni/tutorial-5.c
index 81e9524..053f9cd 100755
--- a/gst-sdk/tutorials/android-tutorial-5/jni/tutorial-5.c
+++ b/gst-sdk/tutorials/android-tutorial-5/jni/tutorial-5.c
@@ -281,6 +281,25 @@ static void check_media_size (CustomData *data) {
    gst_object_unref(video_sink);
  }

+void dumpBin_(GstElement* a, char *sz) {
+	GstIterator *it = gst_bin_iterate_elements((GstBin*)a);
+	GValue point = G_VALUE_INIT;
+	while (gst_iterator_next (it, &point) == GST_ITERATOR_OK) {
+		GstElement *e = (GstElement*)(g_value_peek_pointer(&point));
+		strcat(sz, " ");
+		strcat(sz, gst_element_get_name(e));
+		//GST_DEBUG ("element -> %s", gst_element_get_name(e));
+		dumpBin_(e, sz);
+	}
+}
+
+void dumpBin(CustomData *data) {
+	char sz[1024];
+	strcpy(sz, "DUMPELEMENTS:");
+	dumpBin_(data->pipeline, sz);
+	GST_DEBUG("%s", sz);
+}
+
  /* Notify UI about pipeline state changes */
  static void state_changed_cb (GstBus *bus, GstMessage *msg, CustomData 
*data) {
    GstState old_state, new_state, pending_state;
@@ -292,7 +311,10 @@ static void state_changed_cb (GstBus *bus, 
GstMessage *msg, CustomData *data) {
      set_ui_message(message, data);
      g_free (message);

-    if (new_state == GST_STATE_NULL || new_state == GST_STATE_READY)
+	if (new_state == GST_STATE_PLAYING)
+		dumpBin(data);
+
+	if (new_state == GST_STATE_NULL || new_state == GST_STATE_READY)
        data->is_live = FALSE;

      /* The Ready to Paused state change is particularly interesting: */
diff --git 
a/gst-sdk/tutorials/android-tutorial-5/src/com/gst_sdk_tutorials/tutorial_5/Tutorial5.java 
b/gst-sdk/tutorials/android-tutorial-5/src/com/gst_sdk_tutorials/tutorial_5/Tutorial5.java
index e51ecb3..1e62c18 100644
--- 
a/gst-sdk/tutorials/android-tutorial-5/src/com/gst_sdk_tutorials/tutorial_5/Tutorial5.java
+++ 
b/gst-sdk/tutorials/android-tutorial-5/src/com/gst_sdk_tutorials/tutorial_5/Tutorial5.java
@@ -44,7 +44,7 @@ public class Tutorial5 extends Activity implements 
SurfaceHolder.Callback, OnSee
      private int desired_position;         // Position where the users 
wants to seek to
      private String mediaUri;              // URI of the clip being played

-    private final String defaultMediaUri = 
"http://docs.gstreamer.com/media/sintel_trailer-368p.ogv";
+    private final String defaultMediaUri = 
"file:///sdcard/local-25fps.mp4";//"http://docs.gstreamer.com/media/sintel_trailer-368p.ogv";

      static private final int PICK_FILE_CODE = 1;
      private String last_folder;


More information about the gstreamer-devel mailing list