Hi,<br><br><div class="gmail_quote">On Wed, Nov 3, 2010 at 8:24 PM, HaroldJRoth <span dir="ltr">&lt;<a href="mailto:dlafferty@gmail.com">dlafferty@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<br>
I&#39;m working with a custom plugin that extends GstBaseSink.  I add this and a<br>
queue to my pipeline.  E.g.<br>
<br>
gst_bin_add(GST_BIN(mGstPipeline), mVideoQueue);<br>
gst_bin_add(GST_BIN(mGstPipeline), mVideoSnoop);<br>
gst_element_link(mVideoQueue, mVideoSnoop);<br>
<br>
I link this queue/GstBaseSink pair to a decodebin2 manually when a video pad<br>
appears.  E.g.<br>
<br>
mDecoderOutput = gst_element_factory_make(&quot;decodebin2&quot;, &quot;decoder&quot;);<br>
g_signal_connect(mDecoderOutput, &quot;new-decoded-pad&quot;, G_CALLBACK(cb_newpad),<br>
this);<br>
<br>
The difficulty I find is that my GstBaseSink causes the pipeline to pause.<br>
It doesn&#39;t grab the buffers and so the queue fills up.  This pauses the<br>
stream both upstream and downstream.<br>
<br>
What I&#39;m wondering is whether this is<br>
<br>
a)  Because I&#39;m using an appsrc, but I&#39;m not setting the timestamp properly.<br></blockquote><div><br>likely basesink is dropping the buffers. What if you sent your sink&#39;s property &quot;sync&quot; to false?<br>
 </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
E.g.<br>
<br>
GstBuffer * buffer = gst_buffer_new();<br>
GST_BUFFER_SIZE (buffer) = g_data_packet.pkt_len;<br>
GST_BUFFER_MALLOCDATA (buffer) = (guint8*)g_malloc (g_data_packet.pkt_len);<br>
GST_BUFFER_DATA (buffer) = GST_BUFFER_MALLOCDATA (buffer);<br>
<br>
GST_DEBUG (&quot;feed buffer %p, len -%u&quot;, buffer, g_data_packet.pkt_len);<br>
<br>
// @todo change to memcpy or something sensible<br>
for (int i = 0 ; i &lt; g_data_packet.pkt_len; i++) {<br>
        GST_BUFFER_DATA(buffer)[i] = g_data_packet.data[i];<br>
}<br>
GST_BUFFER_TIMESTAMP(buffer)   =GST_CLOCK_TIME_NONE;<br></blockquote><div><br>I suggest you to fix this event if the &quot;sync=false&quot; works , unless it is really what you want.<br> </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

<br>
of b) should I revise the GstBaseSink to restart the pipeline?  (Don&#39;t know<br>
what the code would look like)<br></blockquote><div><br>I&#39;m not a great expert about dynamic pipelines, but afaik you should add all the elements when the pipeline is in NULL (or PAUSED) state, then trigger the state changes to PLAYING.<br>
<br>At least in my experience, violations may bring you to unpredictable results (and extra-hackish-code to write for manually dealing with state changes).<br><br>Regards<br> </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

<br>
<br>
--<br>
View this message in context: <a href="http://gstreamer-devel.966125.n4.nabble.com/Queue-Flow-Control-req-d-by-GstBaseSink-or-GST-BUFFER-TIMESTAMP-problems-tp3025912p3025912.html" target="_blank">http://gstreamer-devel.966125.n4.nabble.com/Queue-Flow-Control-req-d-by-GstBaseSink-or-GST-BUFFER-TIMESTAMP-problems-tp3025912p3025912.html</a><br>

Sent from the GStreamer-devel mailing list archive at Nabble.com.<br>
<br>
------------------------------------------------------------------------------<br>
Achieve Improved Network Security with IP and DNS Reputation.<br>
Defend against bad network traffic, including botnets, malware,<br>
phishing sites, and compromised hosts - saving your company time,<br>
money, and embarrassment.   Learn More!<br>
<a href="http://p.sf.net/sfu/hpdev2dev-nov" target="_blank">http://p.sf.net/sfu/hpdev2dev-nov</a><br>
_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.sourceforge.net">gstreamer-devel@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/gstreamer-devel" target="_blank">https://lists.sourceforge.net/lists/listinfo/gstreamer-devel</a><br>
</blockquote></div><br>