decreasing video playback start time

Sebastian Dröge sebastian at centricular.com
Fri Sep 30 07:10:56 UTC 2016


On Thu, 2016-09-29 at 15:23 -0500, Bryan Noll wrote:
> 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.freedeskt
> op.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? 

Which GStreamer version are you using, and what kind of file or stream
are you trying to play? Also on which hardware is this, and is it using
the hardware codecs?

-- 
Sebastian Dröge, Centricular Ltd · http://www.centricular.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 931 bytes
Desc: This is a digitally signed message part
URL: <https://lists.freedesktop.org/archives/gstreamer-android/attachments/20160930/3e636706/attachment.sig>


More information about the gstreamer-android mailing list