detecting sink underruns in appsrc

Luca Bacci luca.bacci982 at gmail.com
Wed Mar 14 14:26:55 UTC 2018


Sorry, I mean to say that appsrc timestamps data in the past, with respect
to actual running time

Luca B.

2018-03-14 14:47 GMT+01:00 Luca Bacci <luca.bacci982 at gmail.com>:

> Hello,
>
> I have a pipeline where data is produced upstream by an appsrc element,
> passes through some elements and at the end there is a sink (pulsesink,
> alsasink) that outputs to the soundcard.
>
> Data is produced in the appsrc like that
>
> appsrc_needdata_cb(GstElement *appsrc, guint bytes, gpointer) {
>   static guint64 bytescounter = 0;
>   GstBuffer *buffer;
>
>   /* allocate buffer and produce data */
>
>   GST_BUFFER_PTS(buffer) = bytescounter;
>   GST_BUFFER_DURATION(buffer) = bytes;
>   bytescount += bytes;
> }
>
> everything is fine as long as I don't get underruns. If i underrun for say
> 1 second, the sink knows that and the clock increases as well by 1 second,
> but the appsrc callback doesn't detect that condition and timestamps data
> past the running time.
>
> How can I acknowledge for this in appsrc?
>
> Thank you very much!
> Luca B.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20180314/f27d9d79/attachment.html>


More information about the gstreamer-devel mailing list