how to set property for Appsrc?

Stefan Sauer ensonic at hora-obscura.de
Tue Aug 28 14:01:35 PDT 2012


On 08/27/2012 03:03 PM, Matt Pekar wrote:
> I set my live appsrc video elements like this:
>
> g_object_set(G_OBJECT(appsrc), "caps", src_caps, NULL);
> g_object_set(G_OBJECT(appsrc), "is-live", TRUE, NULL);
> g_object_set(G_OBJECT(appsrc), "block", FALSE, NULL);
> g_object_set(G_OBJECT(appsrc), "do-timestamp", TRUE, NULL);
FYI: a more efficient way would be to do it in one call:
g_object_set(G_OBJECT(appsrc), "caps", src_caps, "is-live", TRUE,
"block", FALSE,"do-timestamp", TRUE, NULL);

Stefan
>
> I seem to recall other elements needing the timestamps.  Then I spawn
> a background thread that pushes at a constant rate.
>
> GstBuffer* buffer = gst_buffer_new_and_alloc(width * height * 4);
> GstFlowReturn flow_return =
> gst_app_src_push_buffer(GST_APP_SRC(pd->appsrc), buffer);
>
> On Sun, Aug 26, 2012 at 10:22 PM, Soho Soho123 <soho123.2012 at gmail.com
> <mailto:soho123.2012 at gmail.com>> wrote:
>
>     Hi All,
>
>     Can someone  give me example about how to set latency for appsrc?
>     I can find the API about latency setting,
>     but I do not know how to use that:
>     which value is suitable for a rtp receiver?
>     Since  I implement a rtp socket to receive rtp packet, it can receive
>     rtp packet, when I call gst_app_src_push_buffer to input payload to
>     appsrc element. It seems does not workable, the audio data can not
>     hear from alsa device.
>     I would like to modify the property of Appsrc,
>     like set latency, is-live,
>     which value is suitable for a rtp receiver when I call API
>     gst_app_src_set_latency?
>     And How to set property "is-live"?
>
>     Thanks!
>     Best Regards,
>     Soho
>     _______________________________________________
>     gstreamer-devel mailing list
>     gstreamer-devel at lists.freedesktop.org
>     <mailto:gstreamer-devel at lists.freedesktop.org>
>     http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
>
>
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20120828/4778e735/attachment.html>


More information about the gstreamer-devel mailing list