<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">I have been trying many many things but as soon as i use my own plugin in the pipeline the behavior remains the same.</div><div class="">QoS is not applied and all but the first buffer is flagged as DISCONT.</div><div class=""><br class=""></div><div class="">So if i do this :</div><div class=""><div style="margin: 0px; font-size: 10px; line-height: normal; font-family: Monaco; color: rgb(244, 244, 244); background-color: rgba(0, 0, 0, 0.85098);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">gst-launch-1.0 filesrc location=... ! queue ! decodebin ! videoconvert ! jpegenc ! avimux ! filesink location=... sync=false|true</span></div></div><div class=""><br class=""></div><div class="">It indeed keep the processing in sync or not depending on the sink property i set.</div><div class="">I can also control buffering with the queue which works really well.</div><div class="">A custom plugin using python works as excpected.</div><div class=""><br class=""></div><div class="">But now i want to add my own plugin in C with processing.</div><div class=""><br class=""></div><div class=""><div style="margin: 0px; font-size: 10px; line-height: normal; font-family: Monaco; color: rgb(244, 244, 244); background-color: rgba(0, 0, 0, 0.85098);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">gst-launch-1.0 filesrc location=... ! queue ! decodebin ! videoconvert ! processing_plugin ! jpegenc ! avimux ! filesink location=... sync=true|false</span></div></div><div class=""><br class=""></div><div class="">I also tried without a queue or adding "identity sync=true" after videoconvert but the behavior never change.</div><div class="">I am really at loss for what is happening but i am certain i am not doing something right in my plugin code.</div><div class=""><br class=""></div><div class="">For my plugin code here is the relevant parts, i did not include the processing code nor the setup of properties.</div><div class="">Transform_ip is the only method i override.</div><div class=""><br class=""></div><div class=""><div class=""><br class=""></div><div class="">/* initialize the tfobjectdetection's class */</div><div class="">static void gst_tfobjectdetection_class_init (GsttfobjectdetectionClass * klass) {</div><div class="">    GObjectClass *gobject_class;</div><div class="">    GstElementClass *gstelement_class;</div><div class=""><br class=""></div><div class="">    gobject_class = (GObjectClass *) klass;</div><div class="">    gstelement_class = (GstElementClass *) klass;</div><div class=""><br class=""></div><div class="">    g_type_class_add_private (klass, sizeof (GstTFObjectDetectionPrivate));</div><div class=""><br class=""></div><div class="">    parent_class = g_type_class_peek_parent(klass);</div><div class=""><br class=""></div><div class="">    gobject_class->set_property = gst_tfobjectdetection_set_property;</div><div class="">    gobject_class->get_property = gst_tfobjectdetection_get_property;</div><div class=""><br class=""></div><div class="">    /* Register properties used by tensorflow */</div><div class="">    </div><div class=""><br class=""></div><div class="">    gst_element_class_add_pad_template (gstelement_class, gst_static_pad_template_get (&src_template));</div><div class="">    gst_element_class_add_pad_template (gstelement_class, gst_static_pad_template_get (&sink_template));</div><div class=""><br class=""></div><div class="">    GST_BASE_TRANSFORM_CLASS(klass)->transform_ip = GST_DEBUG_FUNCPTR(gst_tfobjectdetection_transform_ip);</div><div class=""><br class=""></div><div class="">    /* debug category for filtering log messages</div><div class="">    */</div><div class="">    GST_DEBUG_CATEGORY_INIT(gst_tfobjectdetection_debug, "gsttfobjectdetection", 0, "Tensorflow Debug");</div><div class="">}</div><div class=""><br class=""></div><div class="">/* initialize the new element</div><div class=""> * initialize instance structure</div><div class=""> */</div><div class="">static void gst_tfobjectdetection_init (Gsttfobjectdetection *filter) {</div><div class="">    GstTFObjectDetectionPrivate *priv;</div><div class=""><br class=""></div><div class="">    GST_DEBUG("gst_tfobjectdetection_init");</div><div class=""><br class=""></div><div class="">    /* Always enable qos */</div><div class="">    gst_base_transform_set_qos_enabled(GST_BASE_TRANSFORM(filter), TRUE);</div><div class="">}</div><div class=""><br class=""></div><div class="">/* this function does the actual processing */</div><div class="">static GstFlowReturn gst_tfobjectdetection_transform_ip(GstBaseTransform * base, GstBuffer * outbuf) {</div><div class="">    gpointer bytes;</div><div class="">    gsize copied;</div><div class=""><br class=""></div><div class="">    Gsttfobjectdetection *filter = GST_TFOBJECTDETECTION(base);</div><div class="">    </div><div class="">    if (GST_CLOCK_TIME_IS_VALID (GST_BUFFER_TIMESTAMP(outbuf))) {</div><div class="">        gst_object_sync_values (GST_OBJECT(filter), GST_BUFFER_TIMESTAMP(outbuf));</div><div class="">    }</div><div class=""><br class=""></div><div class="">    if (GST_BUFFER_IS_DISCONT(outbuf)) {</div><div class="">        GST_WARNING("The buffer is DISCONT OMG!!!!");</div><div class="">    }</div><div class=""><br class=""></div><div class="">    ... processing stuff ...</div><div class="">}</div></div><div class=""><br class=""></div><br class=""><div><blockquote type="cite" class=""><div class="">On 20 Dec 2017, at 15:42, Nicolas Dufresne <<a href="mailto:nicolas@ndufresne.ca" class="">nicolas@ndufresne.ca</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="auto" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><div class=""><div class="gmail_extra"><br class="Apple-interchange-newline"><br class=""><div class="gmail_quote">Le 20 déc. 2017 7:31 AM, "Jimmy De Pauw" <<a href="mailto:jimmy@dcode.eu" class="">jimmy@dcode.eu</a>> a écrit :<br type="attribution" class=""><blockquote class="quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204); padding-left: 1ex;"><div style="word-wrap: break-word;" class=""><div class="">I am almost certain that BaseTransform ignore QoS because it does not have any segment timing to work with.</div><div class="">Therefore i wonder if it is possible to have QoS when the main sink is filesrc with a test file.</div><div class=""><br class=""></div><div class="">Considering the following pipeline :</div><div class=""><br class=""></div><div class="">filesrc ! decodebin ! queue ! videoconvert ! <my plugin> ! jpegenc ! multifilesink</div><div class=""><br class=""></div><div class="">In the debug log i have only one « <span style="background-color: rgba(0, 0, 0, 0.85098);" class=""><font color="#f4f4f4" face="Monaco" size="1" class="">gst_base_transform_chain ... </font></span><span style="color: rgb(244, 244, 244); font-family: Monaco; font-size: 10px; background-color: rgba(0, 0, 0, 0.85098);" class="">we have a pending DISCONT</span><span style="color: rgb(244, 244, 244); font-family: Monaco; font-size: x-small; background-color: rgba(0, 0, 0, 0.85098);" class="">» </span> but never twice.</div><div class="">I also never have a buffer dropped, looking at the code of GstBaseTransform i think this is because i don’t receive and segment information.</div><div class=""><br class=""></div><div class="">Is it possible to simulate a live feed from a video file with full QoS support so i can test my processing speed?</div></div></blockquote></div></div></div><div dir="auto" class=""><br class=""></div><div dir="auto" class="">As soon as you have time segment and timestamp (e.g. after demuxer/parsing/decoding) you can add identity sync=1 to simulate a live feed.</div><div dir="auto" class=""><br class=""></div><div dir="auto" class=""><br class=""></div><div dir="auto" class=""><div class="gmail_extra"><div class="gmail_quote"><blockquote class="quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204); padding-left: 1ex;"><div style="word-wrap: break-word;" class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="quoted-text"><div class="">On 18 Dec 2017, at 15:24, Nicolas Dufresne <<a href="mailto:nicolas@ndufresne.ca" target="_blank" class="">nicolas@ndufresne.ca</a>> wrote:</div><br class="m_9068865779230125564Apple-interchange-newline"></div><div class="elided-text"><div class=""><div dir="auto" class=""><div class=""><br class=""><div class="gmail_extra"><br class=""><div class="gmail_quote">Le 18 déc. 2017 5:10 AM, "Jimmy De Pauw" <<a href="mailto:jimmy@dcode.eu" target="_blank" class="">jimmy@dcode.eu</a>> a écrit :<br type="attribution" class=""><blockquote class="m_9068865779230125564quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204); padding-left: 1ex;">Hello,<br class=""><br class="">I have been creating my own plugin using GstBaseTransform as the parent class.<br class="">It works find but now i want to handle the QoS in my tranform method to know if i have to drop the buffer or not.<br class=""><br class="">I can see that BaseTransform already listen to QoS event on its sink and set some properties in its priv structure.<br class="">I would like to have access to the earliest_time property from my own transform method but i don’t know how to do it, if it is possible at all.<br class="">It sounds like i have no access to it at all.<br class=""><br class="">Looking at the videoconvert source code i don’t see how it handles QoS eventl.<br class=""></blockquote></div></div></div><div dir="auto" class=""><br class=""></div><div dir="auto" class="">It's entirely handled by the base class.  But you can catch the event on your srcpad, there is virtual functions for that.</div><div dir="auto" class=""><br class=""></div><div dir="auto" class=""><div class="gmail_extra"><div class="gmail_quote"><blockquote class="m_9068865779230125564quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204); padding-left: 1ex;"><br class="">What is the proper way of using what is already there in the BaseTransform class to handle QoS on my own subclass?<br class=""><br class="">Thanks<br class="">______________________________<wbr class="">_________________<br class="">gstreamer-devel mailing list<br class=""><a href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank" class="">gstreamer-devel@lists.freedesk<wbr class="">top.org</a><br class=""><a href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" rel="noreferrer" target="_blank" class="">https://lists.freedesktop.org/<wbr class="">mailman/listinfo/gstreamer-dev<wbr class="">el</a><br class=""></blockquote></div><br class=""></div></div></div>______________________________<wbr class="">_________________<br class="">gstreamer-devel mailing list<br class=""><a href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank" class="">gstreamer-devel@lists.<wbr class="">freedesktop.org</a><br class=""><a href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_blank" class="">https://lists.freedesktop.org/<wbr class="">mailman/listinfo/gstreamer-<wbr class="">devel</a><br class=""></div></div></blockquote></div><br class=""></div><br class="">______________________________<wbr class="">_________________<br class="">gstreamer-devel mailing list<br class=""><a href="mailto:gstreamer-devel@lists.freedesktop.org" class="">gstreamer-devel@lists.<wbr class="">freedesktop.org</a><br class=""><a href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" rel="noreferrer" target="_blank" class="">https://lists.freedesktop.org/<wbr class="">mailman/listinfo/gstreamer-<wbr class="">devel</a><br class=""><br class=""></blockquote></div><br class=""></div></div></div><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">_______________________________________________</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">gstreamer-devel mailing list</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><a href="mailto:gstreamer-devel@lists.freedesktop.org" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">gstreamer-devel@lists.freedesktop.org</a><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><a href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a></div></blockquote></div><br class=""></body></html>