Gstreamer hangs application for 2 minutes on first usage of nativePlay or nativePause

Matthew Ruth mruth at sbimagingsystems.com
Mon Feb 8 21:52:05 UTC 2016


I'm using GST_LEVEL_INFO, and can see that after native_init(), the pipeline is at state READY.
Then when I want to change to PLAYING, it first changes from READY to PAUSE, and in doing so, attempts to create a context for display, and the application hangs while the gl thread is created.
________________________________________
From: gstreamer-android [gstreamer-android-bounces at lists.freedesktop.org] on behalf of Sebastian Dröge [sebastian at centricular.com]
Sent: Thursday, February 04, 2016 3:56 PM
To: Discussions about GStreamer on Android
Subject: Re: Gstreamer hangs application for 2 minutes on first usage of nativePlay or nativePause

On Do, 2016-02-04 at 23:49 +0000, Matthew Ruth wrote:
> I'm unable to redirect Gstreamer debug to logcat in Android Studio,
> even using "setenv("GST_DEBUG","GST_ELEMENT_*:7",NULL);" in c, and
> redirecting the device stderr to logcat through "adb shell setprop
> log.redirect-studio true", so I'm unable to access all gstreamer
> debug statements, however I do have GST_DEBUG() statements in my c
> code.

Use the C API instead of environment variables. When using the
environment variables, you need to set them before gst_init().

See gstreamer_android-1.0.c.in, it currently calls
gst_debug_set_default_threshold(). Change that to make the default
GST_LEVEL_DEBUG.

All GStreamer debug output will go to the Android log btw, not stderr.


Alternatively what would also be useful is getting a backtrace of the
threads that are busy while things are hanging. Use ndk-gdb for that.

--
Sebastian Dröge, Centricular Ltd · http://www.centricular.com



More information about the gstreamer-android mailing list