How to prevent latency from changing?

Sebastian Dröge sebastian at centricular.com
Wed Mar 16 22:04:13 UTC 2016


On Mi, 2016-03-16 at 08:01 -0700, kmesbah wrote:
> I'm new to GStreamer. I'm trying to stream from an IP camera using an rtsp
> URI. I have been using the  5th Android tutorial
>   
> as a base for my code. the problem is that there were 2 seconds latency.
> after searching around, I managed to reduce it by replacing
> 
> data->pipeline = gst_parse_launch("playbin", &error);
> 
> with
> 
> data->pipeline = gst_parse_launch("playbin
> uridecodebin0::source::latency=250", &error);
> 
> the problem now is whenever the activity that has the surface view gets
> paused then resumed, the latency gets reset back to 2 seconds. any idea how
> I can prevent this from happening? I'm using GStreamer 1.7.91.

Use the source-setup signal on playbin. That will give you the source
element whenever one is created and to be set up.

You can there then set the latency. The problem in your case is most
likely that there will be an uridecodebin1, uridecodebin2, etc..

-- 
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: 949 bytes
Desc: This is a digitally signed message part
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20160317/e2ec751b/attachment-0001.sig>


More information about the gstreamer-devel mailing list