<font face="verdana, sans-serif">Tim-Philipp, thanks for your quick and helpful reply. I'm glad I asked here first before starting to implement something. I will try your suggestion.</font><div><div><div><font face="verdana, sans-serif"><br>
</font></div><div><font face="verdana, sans-serif">I'm also not sure if inserting a queue element right after the udp source is the right way to catch my problems with udp streaming. The actual problem I'm having is corrupted sound on playing a raw udp stream containing a transport stream consisting of H264 video and MPEG 1 layer 2 audio. The image is fine but the sound starts crackling after a while until it sometimes disappears completely until it plays fine again and repeats this in a cycle of 60 seconds.</font></div>
<div><font face="verdana, sans-serif"><br></font></div><div><font face="verdana, sans-serif">As there is no buffering for live sources in playbin2, I'm suspecting this to be a problem. Why is there no facility in playbin2 to delay playback of a udp stream a bit to buffer it and handle possible packet delays? </font></div>
</div></div><div><font face="verdana, sans-serif"><br></font></div><div><font face="verdana, sans-serif">Best regards,</font></div><div><font face="verdana, sans-serif"><br></font></div><div><font face="verdana, sans-serif">Christophe</font></div>
<div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Nov 13, 2012 at 3:14 PM, Tim-Philipp Müller-2 [via GStreamer-devel] <span dir="ltr"><<a href="/user/SendEmail.jtp?type=node&node=4656896&i=0" target="_top" rel="nofollow" link="external">[hidden email]</a>></span> wrote:<br>
<blockquote style='border-left:2px solid #CCCCCC;padding:0 1em' class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
On Tue, 2012-11-13 at 05:40 -0800, Christophe Oosterlynck wrote:
<br></div><div class="im"><div><div class='shrinkable-quote'><br>> I'm looking to do the same thing. Right after the source, I want to insert
<br>> another element and let playbin2 do the rest.
<br>>
<br>> From what I see I have 2 possibilities:
<br>> * react to "notify::source" signal, add the extra element to the bin, link
<br>> it to the source and let playbin2 continue
<br>> * wait until playbin2 has finished constructing the whole pipeline, unlink
<br>> source and next element and insert extra element in between.
<br>>
<br>> Can I do one of these safely or shouldn't I fiddle with the playbin2
<br>> pipeline behind its back?
<br>>
<br>> What I want to achieve with this: buffer a live udp source.
<br>> The buffering mechanism in playbin2 is not usable for live sources as you
<br>> cannot pause them. I want to insert a queue element right behind the udpsrc
<br>> element with min-threshold-bytes. This works when I create a custom pipeline
<br>> with gst-launch. If this is not the best way to handle this, let me know.
<br>> Nevertheless, I'm still interested in the answer to my question on fiddling
<br>> with the playbin2 pipeline.
</div></div></div><div class="im">You should not fiddle with playbin's pipeline, and certainly not link
<br>elements behind its back. It won't work. Even if it does work, it might
<br>stop working tomorrow. And we won't even feel bad for a second if your
<br>app breaks doing things like that ;)
<br><br>The only sane way to do things like this is to write your own element,
<br>which could be a GstBin subclass where you add some source and whatever
<br>additional elements you want and then create a ghost source pad. You can
<br>then register a new (or existing, if you must) URI protocol for it, so
<br>if you do playbin uri=fooudp://a.b.c.d:port it will plug your bin.
<br><br>Or you could try to come up with API for playbin to add such a thing,
<br>but I think would need to be rather well-justified and deemed
<br>interesting enough to be added.
<br><br>(What does your "routine" element do, "BCXA" ?)
<br><br> Cheers
<br> -Tim
<br><br>_______________________________________________
<br>gstreamer-devel mailing list
<br></div><a href="http://user/SendEmail.jtp?type=node&node=4656890&i=0" rel="nofollow" link="external" target="_blank">[hidden email]</a>
<br><a href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" rel="nofollow" link="external" target="_blank">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
<br>
<br>
<hr noshade size="1" color="#cccccc">
<div style="color:#444;font:12px tahoma,geneva,helvetica,arial,sans-serif">
<div style="font-weight:bold">If you reply to this email, your message will be added to the discussion below:</div>
<a href="http://gstreamer-devel.966125.n4.nabble.com/question-how-to-add-own-customized-element-between-source-element-and-decodebin2-element-when-using-2-tp4353571p4656890.html" target="_blank" rel="nofollow" link="external">http://gstreamer-devel.966125.n4.nabble.com/question-how-to-add-own-customized-element-between-source-element-and-decodebin2-element-when-using-2-tp4353571p4656890.html</a>
</div>
<div style="color:#666;font:11px tahoma,geneva,helvetica,arial,sans-serif;margin-top:.4em;line-height:1.5em">
To unsubscribe from question how to add own customized element between source element and decodebin2 element when using playbin2, <a href="" target="_blank" rel="nofollow" link="external">click here</a>.<br>
<a href="http://gstreamer-devel.966125.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml" rel="nofollow" style="font:9px serif" target="_blank" link="external">NAML</a>
</div></blockquote></div><br></div>
<br/><hr align="left" width="300" />
View this message in context: <a href="http://gstreamer-devel.966125.n4.nabble.com/question-how-to-add-own-customized-element-between-source-element-and-decodebin2-element-when-using-2-tp4353571p4656896.html">Re: question how to add own customized element between source element and decodebin2 element when using playbin2</a><br/>
Sent from the <a href="http://gstreamer-devel.966125.n4.nabble.com/">GStreamer-devel mailing list archive</a> at Nabble.com.<br/>