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

Matthew Ruth mruth at sbimagingsystems.com
Tue Feb 9 21:06:37 UTC 2016


On the first call to nativePause() in a video streaming application, it is creating the glthread which is hanging the application for almost 2 minutes. Why is this happening on nativePause and not nativeInit, and how can I circumvent the wait time? 
________________________________________
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