decreasing video playback start time

Bryan Noll bwnoll at gmail.com
Thu Sep 29 20:23:20 UTC 2016


Hello folks. I'm building an Android app that needs to play mjpeg video. So
far I've been able to successfully get the video playing on the Android
device following the tutorial here
https://cgit.freedesktop.org/~slomo/gst-sdk-tutorials/tree/gst-sdk/tutorials/android-tutorial-5/
. That said, right now I'm seeing it take roughly 5 seconds to get the
video playback started. To be very specific, in the `gst_native_play`
function in that tutorial there is a call to `gst_element_set_state`. I've
modified the code, splitting the lines apart so I capture the
GstStateChangeReturn value being returned from that call. This result is a
GST_STATE_CHANGE_ASYNC. Then, I call `gst_element_get_state` on the
pipeline (which blocks until the actual result is available). By the time
that function call returns, roughly 5 seconds have gone by since we
originally called `gst_element_set_state`. The specific line that I'm
talking about (the one I broke apart into separate lines) is this one:
https://cgit.freedesktop.org/~slomo/gst-sdk-tutorials/tree/gst-sdk/tutorials/android-tutorial-5/jni/tutorial-5.c#n457

More details about the stream. It's a live mjpeg stream playing off of a
local network (not public internet). I'd like to decrease this 5s figure as
much as I can so that video playback begins sooner. Can anyone point me in
the right direction on how I'd go about doing that?

Thanks in advance,
Bryan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-android/attachments/20160929/35e67cc3/attachment.html>


More information about the gstreamer-android mailing list