<div dir="ltr">Thanks a lot Sebastian!! You are my savior!<div>sync_state_with_parent() fixed the problem!</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Apr 4, 2023 at 12:52 AM Sebastian Dröge <<a href="mailto:sebastian@centricular.com">sebastian@centricular.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div>On Mon, 2023-04-03 at 17:38 -0700, Guru Govindan via gstreamer-devel wrote:</div><blockquote type="cite" style="margin:0px 0px 0px 0.8ex;border-left:2px solid rgb(114,159,207);padding-left:1ex"><div dir="ltr">[...]<br><div><br></div><div>For some reason the I receive the callback for the rtspsrc `connect_pad_added`, but I dont receive the callback that I connect the audio channel with.</div><div>Am I missing something?</div><div><br></div><div>I appreciate any help with this.</div><div>Here is a code snippet.</div><div><br></div><div><pre style="background-color:rgb(40,44,52);color:rgb(171,178,191);font-family:"JetBrains Mono",monospace;font-size:11.3pt"><br> <span style="color:rgb(198,120,221)">let </span>decoder = <span style="color:rgb(229,192,123)">ElementFactory</span>::<span style="color:rgb(97,175,239)">make</span>(<span style="color:rgb(152,195,121)">"decodebin"</span>, <span style="color:rgb(209,154,102)">None</span>).<span style="color:rgb(255,198,109)">unwrap</span>();<br> pipeline.<span style="color:rgb(255,198,109)">add</span>(&decoder).<span style="color:rgb(255,198,109)">unwrap</span>();<br><br> <span style="color:rgb(209,154,102)">src_pad</span>.<span style="color:rgb(255,198,109)">link</span>(&decoder.<span style="color:rgb(255,198,109)">static_pad</span>(<span style="color:rgb(152,195,121)">"sink"</span>).<span style="color:rgb(255,198,109)">unwrap</span>()).<span style="color:rgb(255,198,109)">unwrap</span>();<br> log::<span style="color:rgb(97,175,239)">info!</span>(<span style="color:rgb(152,195,121)">"linked rtspsrc.audio->decoder.sink!!"</span>);<br><br> <span style="color:rgb(198,120,221)">let </span>pipeline_weak = pipeline.<span style="color:rgb(255,198,109)">downgrade</span>();<br><br> decoder.<span style="color:rgb(255,198,109)">connect_pad_added</span>(<span style="color:rgb(198,120,221)">move </span>|<span style="color:rgb(209,154,102)">src</span>, <span style="color:rgb(209,154,102)">pad</span>| {<br> log::<span style="color:rgb(97,175,239)">info!</span>(<span style="color:rgb(152,195,121)">"recieved connect_pad added signal!!"</span>);<br> <span style="color:rgb(198,120,221)">if </span><span style="color:rgb(209,154,102)">pad</span>.<span style="color:rgb(255,198,109)">direction</span>() == gst::<span style="color:rgb(229,192,123)">PadDirection</span>::<span style="color:rgb(209,154,102)">Src </span>{<br> <span style="color:rgb(92,99,112)">// received the src pad for the decoder!!<br></span><span style="color:rgb(92,99,112)"> </span>log::<span style="color:rgb(97,175,239)">info!</span>(<span style="color:rgb(152,195,121)">"GUGURURURU received decoder pad from src!!!"</span>);<br> }<br> });<br></pre></div></div></blockquote><div><br></div><div>At this point you'll also have to change the state of the decodebin. That doesn't happen automatically as bin state changes only propagate to the children that are already existing at the time of the state change.</div><div>The easiest would be to call <font face="monospace">decoder.sync_state_with_parent()</font> here.</div><div><br></div><div><span><pre>-- <br></pre><div><div><span style="font-family:Calibri,sans-serif;font-size:14.6667px">Sebastian Dröge, Centricular Ltd · </span><a href="https://www.centricular.com/" title="Click to open https://www.centricular.com/" style="color:rgb(0,0,238);font-family:Calibri,sans-serif;font-size:14.6667px" target="_blank">https://www.centricular.com</a></div></div></span></div></div>
</blockquote></div>