<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:SimSun;
panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
{font-family:SimSun;
panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
{font-family:SimSun;
panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
{mso-style-priority:99;
mso-style-link:"Balloon Text Char";
margin:0in;
margin-bottom:.0001pt;
font-size:8.0pt;
font-family:"Tahoma","sans-serif";}
span.EmailStyle17
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
span.BalloonTextChar
{mso-style-name:"Balloon Text Char";
mso-style-priority:99;
mso-style-link:"Balloon Text";
font-family:"Tahoma","sans-serif";}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.5pt;
font-family:"Calibri","sans-serif";}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.25in 1.0in 1.25in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Good to know.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Thanks for your explanation.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Wind<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> gstreamer-devel-bounces+feng.yuan=intel.com@lists.freedesktop.org [mailto:gstreamer-devel-bounces+feng.yuan=intel.com@lists.freedesktop.org]
<b>On Behalf Of </b>Krzysztof Konopko<br>
<b>Sent:</b> Tuesday, April 09, 2013 12:32 AM<br>
<b>To:</b> Discussion of the development of and with GStreamer<br>
<b>Subject:</b> Re: Pipeline not going into Playing state when uridecodebin with custom handler is used<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">Thanks Wind for sharing your experience.<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">I think that the problem is well understood now and GStreamer maintainers confirmed that some scenarios are not handled properly. My problem is twofold:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">* There's a *live* element being added *dynamically*, so there's *no* pre-roll anywhere downstream of that element. Currently there's no way in GStreamer to communicate this fact in certain contexts (like from within a decodebin)<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">* There's some state change inconsistency in non-top level bins when there's asynchronous state change and NO_PREROLL state change return involved [1]<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">I worked-around both problems by:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">* Setting both "async" and "sync" properties of my sink element to FALSE. These properties do not matter in my situation anyway as the sink is not a genuine media stream consumer--it passes it to some other process which handles synchronisation
on its own.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">* Forcing a new live element to go to state PLAYING within my bin after synchronising its state with the parent<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif"">[1] </span><a href="https://bugzilla.gnome.org/show_bug.cgi?id=632782" target="_blank"><span style="font-size:10.0pt;font-family:"Arial","sans-serif"">https://bugzilla.gnome.org/show_bug.cgi?id=632782</span></a><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Cheers,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Kris<o:p></o:p></p>
</div>
</div>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><o:p> </o:p></p>
<div>
<p class="MsoNormal">2013/4/8 Yuan, Feng <<a href="mailto:feng.yuan@intel.com" target="_blank">feng.yuan@intel.com</a>><o:p></o:p></p>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Hi,</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> I didn’t read every thread carefully, but just want to share some experience, and hope may help
you.</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> If some elements ever returned <</span>
<span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">GST_STATE_CHANGE_ASYNC>, e.g. from READY to PAUSE, this element need handle preroll to post a gst_message_new_state_changed when first buffer coming, in order to make states changing
going on. In this situation, some case like single thread may get dead-lock if multiple elements need to handle the same issue. Maybe you can try to add a <queue> between these elements or make the elment(or bin) post the message in another thread/async.</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> Just hope this can help you.</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Thanks,</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Wind</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> </span><o:p></o:p></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> gstreamer-devel-bounces+feng.yuan=<a href="mailto:intel.com@lists.freedesktop.org" target="_blank">intel.com@lists.freedesktop.org</a>
[mailto:<a href="mailto:gstreamer-devel-bounces%2Bfeng.yuan" target="_blank">gstreamer-devel-bounces+feng.yuan</a>=<a href="mailto:intel.com@lists.freedesktop.org" target="_blank">intel.com@lists.freedesktop.org</a>]
<b>On Behalf Of </b>Krzysztof Konopko<br>
<b>Sent:</b> Monday, April 08, 2013 5:59 PM<br>
<b>To:</b> Discussion of the development of and with GStreamer<br>
<b>Subject:</b> Re: Pipeline not going into Playing state when uridecodebin with custom handler is used</span><o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">According to the conversation on IRC in #gstreamer on 04/04/2013 my problem seems to be specifically an issue when a *live* element is added to the pipeline through a decodebin.<o:p></o:p></p>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Wim reproduced it with sdpdemux and concluded that adding a live element to the pipeline should be signalled with some sort of new message but there's no room for new messages in
GstMessageType.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Questions:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">1) Is adding a live element dynamically another problem and is loosely coupled with [1] (which BTW has been addressed so far with work-arounds only)?<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">2) Does extending GstMessageType really require changing its type?<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Wouldn't it be possible to ignore the fact that it's been designed to be a mask and start adding new values (existing ones that happen to be bit masks would be just another values)?<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">3) If there's a message emitted to inform that a new live element has been added, who should react upon it?<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">4) Any suggested work-arounds?<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Unfortunately setting "async" and "sync" on the sink to FALSE doesn't help reliably without explicitly prodding the new live element to go to state PLAYING. <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">[1] <a href="https://bugzilla.gnome.org/show_bug.cgi?id=632782" target="_blank"><span style="font-size:10.0pt;font-family:"Arial","sans-serif"">https://bugzilla.gnome.org/show_bug.cgi?id=632782</span></a><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Cheers,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Kris<o:p></o:p></p>
</div>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;margin-bottom:12.0pt"> <o:p></o:p></p>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">2013/4/3 Krzysztof Konopko <<a href="mailto:krzysztof.konopko@gmail.com" target="_blank">krzysztof.konopko@gmail.com</a>><o:p></o:p></p>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Do you think that gst_message_new_request_state() [1] could be of any help here?<o:p></o:p></p>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Is it worthwhile to send a request on behalf of the new live element to set it to playing and handle it in a more controlled manner in the main application rather than from within
a custom bin in the context of the typefinder? This would be a work-around I guess as the core issue still exists [2].<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">[1] <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstMessage.html#gst-message-new-request-state" target="_blank">http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstMessage.html#gst-message-new-request-state</a><o:p></o:p></p>
</div>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">[2] <a href="https://bugzilla.gnome.org/show_bug.cgi?id=632782" target="_blank"><span style="font-size:10.0pt;font-family:"Arial","sans-serif"">https://bugzilla.gnome.org/show_bug.cgi?id=632782</span></a><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Cheers,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Kris<o:p></o:p></p>
</div>
</div>
<div>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;margin-bottom:12.0pt"> <o:p></o:p></p>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">2013/4/2 Krzysztof Konopko <<a href="mailto:krzysztof.konopko@gmail.com" target="_blank">krzysztof.konopko@gmail.com</a>><o:p></o:p></p>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">OK, after some debugging I've come across a comment in gsturidecodebin.c that led me to this bug:<o:p></o:p></p>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><a href="https://bugzilla.gnome.org/show_bug.cgi?id=632782" target="_blank">https://bugzilla.gnome.org/show_bug.cgi?id=632782</a><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Looks like instantiating live elements through type-finding either does not work or at least it's racy.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">If this is all true and if there are any ideas of fixing it, I'd be tempted to have a look and tinker a little bit with it.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Cheers,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Kris<o:p></o:p></p>
</div>
</div>
<div>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;margin-bottom:12.0pt"> <o:p></o:p></p>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">2013/3/28 Krzysztof Konopko <<a href="mailto:krzysztof.konopko@youview.com" target="_blank">krzysztof.konopko@youview.com</a>><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Interestingly /decodebin2/ does not propagate instantiated element's<br>
GstStateChangeReturn return value as it's a type-found signal callback.<br>
gst-plugin-base/gst/playback/gstdecodebin2.c:connect_pad():<br>
<br>
/* Bring the element to the state of the parent */<br>
if ((gst_element_set_state (element,<br>
GST_STATE_PAUSED)) == GST_STATE_CHANGE_FAILURE) {<br>
<br>
so no way to say there will be no pre-roll.<br>
<br>
Does it make any sense to try to instantiate a live element through<br>
typfinding?<br>
<br>
Cheers,<br>
Kris<o:p></o:p></p>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;margin-bottom:12.0pt"><br>
On 11/01/13 17:05, Krzysztof Konopko wrote:<br>
> Hi,<br>
><br>
> I had a closer look into it. The problem can be reduced to something<br>
> like this (hope you don't mind if I rehash some bits of previous<br>
> description):<br>
><br>
> gst-launch-1.0 \<br>
> uridecodebin uri=file:///tmp/test.sdp caps=video/mpegts \<br>
> ! fakesink<br>
><br>
> On my laptop it doesn't matter whether it's a genuine HTTP or filesystem<br>
> request. It deadlocks.<br>
><br>
><br>
> There's a custom vqesdpdemux element which has application/sdp<br>
> capability on its sink. Here's how the gist of the problem goes:<br>
><br>
> 1. uridecodebin instantiates filesrc, queue2 and vqesdpdemux (typefinder<br>
> magic)<br>
><br>
> 2. vqesdpdemux receives data (buffers) from filesrc until it gets EOS<br>
> event on its sink pad (receives SDP content, simple text file)<br>
><br>
> 3. In the same thread were the EOS event was received vqesdpdemux<br>
> (GstBin) creates a genuine custom vqesrc element which is supposed to<br>
> receive the RTP traffic<br>
><br>
> 4. The new vqesrc element's state is synchronised with its parent<br>
> (vqesdpdemux) by calling gst_element_sync_state_with_parent() but this<br>
> can "trap" it in PAUSED or READY state (depends how far in the<br>
> transition the pipeline got after sending EOS).<br>
><br>
> Now because vqesrc is a *live* element, it's activated pad thread waits<br>
> in gst_base_src_wait_playing() for vqesrc to get into PLAYING. But it<br>
> won't transition to that state if it's "trapped" in pipeline's<br>
> transition towards READY (depending on timing conditions).<br>
><br>
><br>
><br>
> I'll be digging into it (*) but if it bells with anyone, please shout.<br>
><br>
> Basically we're looking for (or trying to find/understand) a good<br>
> pattern to create a new source element somewhere in the *middle* of the<br>
> pipeline based on some information (buffers) already received and<br>
> potentially ditch/replace (lop off) the old bit of upstream (if<br>
> possible) after it's done its job.<br>
><br>
> It works pretty well if the source is explicit (e. g. filesrc). Things<br>
> get complicated if one wants to use typefind magic and<br>
> auto-instantiating/connecting (some decodebin element).<br>
><br>
> Cheers,<br>
> Kris<br>
><br>
> (*) It's a quite involving piece of work to looking into. I'm not doing<br>
> it because I'm magnanimous but because Mariusz is sitting almost next to<br>
> me :)<br>
><br>
> On 07/01/13 17:57, Mariusz Buras wrote:<br>
>> Hi all,<br>
>><br>
>> I have a quite complex problem to describe so first I'll show you my<br>
>> pipeline setup:<br>
>><br>
>> uridecodebin uri=<a href="http://some_address_somewhere.co.uk/test.sdp" target="_blank">http://some_address_somewhere.co.uk/test.sdp</a><br>
>> caps=video/mpegts<br>
>> ! queue ! tsdemux ! video/x-h264 ! decodebin ! queue ! xvimagesink<br>
>><br>
>> Where "test.sdp" is an SDP file which refers to a multicast RTP stream.<br>
>> I have created an element "vqesrc"[1] which is a live source for this<br>
>> multicast RTP data. It takes the contents of an SDP file as a property.<br>
>> To get it to be autoplugged by decodebin I have also created<br>
>> vqesdpdemux which handles "application/sdp" caps much like hlsdemux or<br>
>> sdpdemux works.<br>
>><br>
>> vqesdpdemux is a bin. It creates a vqesrc, adds it to itself, sets the SDP<br>
>> file data as a one of the properties of vqesrc and adds a ghost pad on<br>
>> vqesdpdemux exposing the source pad of the gstvqesrc to outside of the<br>
>> bin. So when everything works I should be getting something like that on<br>
>> the diagram[2]. As you can see everything gets autoplugged as expected<br>
>> and I indeed can see live video on my screen. I have also attached a log<br>
>> file that shows what's going on when it works [3].<br>
>><br>
>> In vqesdpdemux when I create the vqesrc child element (which is a live<br>
>> source) I am careful to call gst_element_sync_state_with_parent for the<br>
>> child. Also I am careful to return GST_STATE_CHANGE_NO_PREROLL from<br>
>> vqesdpdemux whenever a request to enter state PAUSED is received as I<br>
>> know the child I will be adding will be live.<br>
>><br>
>><br>
>> The problem starts when uridecodebin is pointed to a locally stored SDP<br>
>> file, something like this:<br>
>><br>
>> uridecodebin uri=file:///home/mariusz.buras/tmp/test.sdp<br>
>> caps=video/mpegts<br>
>> ! queue ! tsdemux ! video/x-h264 ! decodebin ! queue ! xvimagesink<br>
>><br>
>> Basically, what seems to happen is that my pipeline never fully enters<br>
>> PAUSED state (only vqesdpdemux does) and gets stuck in READY forever.<br>
>> As shown in [4] pipeline start to preroll but never finishes. My<br>
>> experiments showed that in "http case" SDP file is delivered while the<br>
>> pipline is changing it's state to PLAYING. While in the "broken" case<br>
>> it's delivered when the pipeline is transitioning to the PAUSED state.<br>
>> This leads me to believe that something wrong happens (or something good<br>
>> doesn't happen) when vqesdpdemux receives a sink event callback with a<br>
>> buffer containing the SDP file.<br>
>><br>
>> What I have tried to fix/mitigate the problem*:<br>
>><br>
>> 1. Forcing vqesrc element state to PLAYING just after it's added to<br>
>> vqesdpdemux bin with gst_set_state rather than<br>
>> gst_element_sync_state_with_parent. This makes it work, but I don't<br>
>> think this is a right thing to do. It makes me a bit uneasy using a<br>
>> half baked "fix" to a problem I don't understand.<br>
>> 2. Sending a reconfigure event. Doesn't help.<br>
>> 3. Delaying the creation of vqesrc element - this doesn't work.<br>
>> 4. Plenty of weird/desperate hacks on vqesdpdemux - same result.<br>
>><br>
>> * when I write that "it doesn't work" I mean that it behaves in the same<br>
>> or very similar fashion to when the "fix" wasn't applied.<br>
>><br>
>> I've also attached [5] a diagram of the last state the pipeline gets<br>
>> into when it doesn't work. This is not very helpful though, because<br>
>> the last state my pipeline fully enters is READY when no auto-plugging<br>
>> happened yet.<br>
>><br>
>><br>
>> I think possibly what is happening is that the pipeline is prerolling in<br>
>> the PAUSED state so vqesrc doesn't produce any data so the pipeline<br>
>> never exits the prerolling state so makes it to state PLAYING but then<br>
>> I'm unsure why it would work with the http case but not with local file.<br>
>><br>
>><br>
>> Can someone help me with that?<br>
>><br>
>> Regards,<br>
>> Mariusz.<br>
>><br>
>><br>
>> [1] The code for both of these can be found on github:<br>
>> <a href="https://github.com/sqward/gst-vqe" target="_blank">https://github.com/sqward/gst-vqe</a><br>
>> [2] An example working pipeline attached as "example_working_pipeline.jpg"<br>
>> [3] An example working log attached as "example_working_log.txt"<br>
>> [4] Log of a broken case attached as "broken_case.txt"<br>
>> [5] A diagram of "broken" pipeline when it gets stuck in READY state<br>
>> attached as "broken_case.png"<br>
>><br>
>><br>
>><br>
>> _______________________________________________<br>
>> gstreamer-devel mailing list<br>
>> <a href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank">gstreamer-devel@lists.freedesktop.org</a><br>
>> <a href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_blank">
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
>><br>
> _______________________________________________<br>
> gstreamer-devel mailing list<br>
> <a href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank">gstreamer-devel@lists.freedesktop.org</a><br>
> <a href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_blank">
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
><o:p></o:p></p>
</div>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;margin-bottom:12.0pt">This transmission contains information that may be confidential and contain personal views which are not necessarily those of YouView TV Ltd. YouView TV Ltd (Co No:7308805) is a limited
liability company registered in England and Wales with its registered address at YouView TV Ltd, 3rd Floor, 10 Lower Thames Street, London, EC3R 6YT. For details see our web site at
<a href="http://www.youview.com" target="_blank">http://www.youview.com</a><o:p></o:p></p>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
</div>
</div>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
</div>
</div>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
</div>
</div>
</div>
</div>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><br>
_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</div>
</body>
</html>