I set my live appsrc video elements like this:<div><br></div><div>g_object_set(G_OBJECT(appsrc), "caps", src_caps, NULL);</div><div><div>g_object_set(G_OBJECT(appsrc), "is-live", TRUE, NULL);</div><div>
g_object_set(G_OBJECT(appsrc), "block", FALSE, NULL);</div><div>g_object_set(G_OBJECT(appsrc), "do-timestamp", TRUE, NULL);</div><div><br></div><div>I seem to recall other elements needing the timestamps. Then I spawn a background thread that pushes at a constant rate.</div>
<div><br></div><div>GstBuffer* buffer = gst_buffer_new_and_alloc(width * height * 4);</div><div><div>GstFlowReturn flow_return = gst_app_src_push_buffer(GST_APP_SRC(pd->appsrc), buffer);</div></div><br><div class="gmail_quote">
On Sun, Aug 26, 2012 at 10:22 PM, Soho Soho123 <span dir="ltr"><<a href="mailto:soho123.2012@gmail.com" target="_blank">soho123.2012@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi All,<br>
<br>
Can someone give me example about how to set latency for appsrc?<br>
I can find the API about latency setting,<br>
but I do not know how to use that:<br>
which value is suitable for a rtp receiver?<br>
Since I implement a rtp socket to receive rtp packet, it can receive<br>
rtp packet, when I call gst_app_src_push_buffer to input payload to<br>
appsrc element. It seems does not workable, the audio data can not<br>
hear from alsa device.<br>
I would like to modify the property of Appsrc,<br>
like set latency, is-live,<br>
which value is suitable for a rtp receiver when I call API<br>
gst_app_src_set_latency?<br>
And How to set property "is-live"?<br>
<br>
Thanks!<br>
Best Regards,<br>
Soho<br>
_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
</blockquote></div><br></div>