Plugin dev Timestamp

Duchassin Frederic duchassin at sefram.fr
Thu May 31 14:53:41 UTC 2018


It works correctly during 2 or 3 seconds and after I get blank on the sound every seconds (the sound is hashed) and I get debug message that frame are dropped : 

../../../../gstreamer-1.6.3/libs/gst/base/gstbasesink.c(2846): gst_base_sink_is_too_late (): /GstPipeline:pipeline0/GstImxIpuVideoSink:imxipuvideosink0:
There may be a timestamping problem, or this computer is too slow.
WARNING: from element /GstPipeline:pipeline0/GstImxIpuVideoSink:imxipuvideosink0: A lot of buffers are being dropped.
Additional debug info:
../../../../gstreamer-1.6.3/libs/gst/base/gstbasesink.c(2846): gst_base_sink_is_too_late (): /GstPipeline:pipeline0/GstImxIpuVideoSink:imxipuvideosink0:
There may be a timestamping problem, or this computer is too slow.


This problem doesn't appear on filesrc. That's why I think it's a latency or timestamp problem...

Ok about query handler, I just have a look at it and quickly add my own handler :


static gboolean gst_my_filter_src_query (GstPad  *pad, GstObject *parent, GstQuery  *query)
{
    gboolean ret;
    Gstt2mi *filter = GST_T2MI (parent);

    gboolean live;
    GstClockTime min_latency, max_latency;

    //  const char * query_name = gst_query_type_get_name(GST_QUERY_TYPE (query));
    //  g_print (query_name); g_print ("\n");

    switch (GST_QUERY_TYPE (query)) {
    case GST_QUERY_LATENCY:
        //g_print ("GST_QUERY_LATENCY\n");
        gst_query_parse_latency (query, &live, &min_latency, &max_latency);

        g_print ("GST_QUERY_LATENCY live=%d ; min_latency=%lld max_latency=%lld\n", live, min_latency, max_latency);

        min_latency += 400000;	//fixed latency

        gst_query_set_latency (query, live, min_latency, max_latency);

        break;
    default:
        /* just call the default handler */
        ret = gst_pad_query_default (pad, parent, query);
        break;
    }
    return ret;
}

But it doesn't work !
Do you know where I can find example about this ? I try to read gstream plugin's writer guide but I can't really found example about latency query.


Many many thanks for helping me.

Frederic



-----Message d'origine-----
De : gstreamer-devel [mailto:gstreamer-devel-bounces at lists.freedesktop.org] De la part de Tim Müller
Envoyé : jeudi 31 mai 2018 16:01
À : gstreamer-devel at lists.freedesktop.org
Objet : Re: Plugin dev Timestamp

On Thu, 2018-05-31 at 15:30 +0200, Duchassin Frederic wrote:

Hi,

> I think my timestamp should be correct.
> I believe the problem come from latency which is not emitted by my
> element.

What is "the problem" exactly? How does it manifest itself?

> Someone can explain me how to emit this latency ?

You would add a query handler to your source pad and handle the LATENCY
query. When such a query comes in, you first pass it to upstream, and
then (if it was successful) you read it out and your own latency and
set the new values back on it before returning from the query handler.

Cheers
-Tim

-- 
Tim Müller, Centricular Ltd - http://www.centricular.com
_______________________________________________
gstreamer-devel mailing list
gstreamer-devel at lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel



More information about the gstreamer-devel mailing list