<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office"><head><!--[if gte mso 9]><xml><o:OfficeDocumentSettings><o:AllowPNG/><o:PixelsPerInch>96</o:PixelsPerInch></o:OfficeDocumentSettings></xml><![endif]--></head><body><div class="ydpb9507dbayahoo-style-wrap" style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;"><div></div>
<div dir="ltr" data-setdir="false">Thanks a lot, Nicolas. Good to know. Will move to <span><a shape="rect" href="http://discourse.gstreamer.org" rel="nofollow" target="_blank" class="enhancr_card_6833728805">discourse.gstreamer.org</a></span><div id="ydp50e23b69enhancr_card_6833728805" class="ydp50e23b69yahoo-link-enhancr-card ydp50e23b69ymail-preserve-class ydp50e23b69ymail-preserve-style" style="max-width:400px;font-family:YahooSans VF, YahooSans, Helvetica Neue, Segoe UI, Helvetica, Arial, sans-serif" data-url="http://discourse.gstreamer.org" data-type="YENHANCER" data-size="MEDIUM" contenteditable="false"><a href="http://discourse.gstreamer.org" style="text-decoration-line: none !important; text-decoration-style: solid !important; text-decoration-color: currentcolor !important; color: rgb(0, 0, 0) !important;" class="ydp50e23b69yahoo-enhancr-cardlink" rel="nofollow" target="_blank"><table class="ydp50e23b69card-wrapper ydp50e23b69yahoo-ignore-table" style="max-width:400px" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td width="400"><table class="ydp50e23b69card ydp50e23b69yahoo-ignore-table" style="max-width:400px;border-width:1px;border-style:solid;border-color:rgb(224, 228, 233);border-radius:2px" width="100%" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td class="ydp50e23b69card-primary-image-cell" style="background-color: rgb(0, 0, 0); background-repeat: no-repeat; background-size: cover; position: relative; border-radius: 2px 2px 0px 0px; min-height: 175px;" valign="top" height="175" bgcolor="#000000" background="https://s.yimg.com/lo/api/res/1.2/a7cX0hnQPOATvIhpO.fr9Q--~A/Zmk9ZmlsbDt3PTQwMDtoPTIwMDthcHBpZD1pZXh0cmFjdA--/https://discourse.gstreamer.org/uploads/default/original/1X/b39794bde7833cc5510435c45db50a001b109713.png.cf.jpg"><!--[if gte mso 9]><v:rect fill="true" stroke="false" style="width:396px;height:175px;position:absolute;top:0;left:0;"><v:fill type="frame" color="#000000" src="https://s.yimg.com/lo/api/res/1.2/a7cX0hnQPOATvIhpO.fr9Q--~A/Zmk9ZmlsbDt3PTQwMDtoPTIwMDthcHBpZD1pZXh0cmFjdA--/https://discourse.gstreamer.org/uploads/default/original/1X/b39794bde7833cc5510435c45db50a001b109713.png.cf.jpg"/></v:rect><![endif]--><table class="ydp50e23b69card-overlay-container-table ydp50e23b69yahoo-ignore-table" style="width:100%" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td class="ydp50e23b69card-overlay-cell" style="background-color: transparent; border-radius: 2px 2px 0px 0px; min-height: 175px;" valign="top" bgcolor="transparent" background="https://s.yimg.com/cv/ae/nq/storm/assets/enhancrV21/1/enhancr_gradient-400x175.png"><!--[if gte mso 9]><v:rect fill="true" stroke="false" style="width:396px;height:175px;position:absolute;top:-18px;left:0;"><v:fill type="pattern" color="#000000" src="https://s.yimg.com/cv/ae/nq/storm/assets/enhancrV21/1/enhancr_gradient-400x175.png"/><v:textbox inset="0,0,20px,0"><![endif]--><table class="ydp50e23b69yahoo-ignore-table" style="width: 100%; min-height: 175px;" height="175" border="0"><tbody><tr><td class="ydp50e23b69card-richInfo2" style="text-align:left;padding:15px 0 0 15px;vertical-align:top"></td><td class="ydp50e23b69card-actions" style="text-align:right;padding:15px 15px 0 0;vertical-align:top"><div class="ydp50e23b69card-share-container"></div></td></tr></tbody></table><!--[if gte mso 9]></v:textbox></v:rect><![endif]--></td></tr></tbody></table></td></tr><tr><td><table class="ydp50e23b69card-info ydp50e23b69yahoo-ignore-table" style="background-color: rgb(255, 255, 255); background-repeat: repeat; background-attachment: scroll; background-image: none; background-size: auto; position: relative; z-index: 2; width: 100%; max-width: 400px; border-radius: 0px 0px 2px 2px; border-top: 1px solid rgb(224, 228, 233);" cellspacing="0" cellpadding="0" border="0" align="center"><tbody><tr><td style="background-color:#ffffff;padding:16px 0 16px 12px;vertical-align:top;border-radius:0 0 0 2px"></td><td style="vertical-align:middle;padding:12px 24px 16px 12px;width:99%;font-family:YahooSans VF, YahooSans, Helvetica Neue, Segoe UI, Helvetica, Arial, sans-serif;border-radius:0 0 2px 0"><h2 class="ydp50e23b69card-title" style="font-size: 14px; line-height: 19px; margin: 0px 0px 6px; font-family: YahooSans VF, YahooSans, Helvetica Neue, Segoe UI, Helvetica, Arial, sans-serif; color: rgb(29, 34, 40); max-width: 314px;">GStreamer Discourse</h2><p class="ydp50e23b69card-description" style="font-size: 12px; line-height: 16px; margin: 0px; color: rgb(151, 158, 168);">GStreamer Project and Community related discussions</p></td></tr></tbody></table></td></tr></tbody></table></td></tr></tbody></table></a></div><div><br></div></div><div dir="ltr" data-setdir="false"><br></div><div dir="ltr" data-setdir="false"> Joe<br></div><div><br></div>
</div><div id="yahoo_quoted_6938548446" class="yahoo_quoted">
<div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;">
<div>
On Friday, October 6, 2023, 07:45:39 a.m. EDT, Nicolas Dufresne via gstreamer-devel <gstreamer-devel@lists.freedesktop.org> wrote:
</div>
<div><br></div>
<div><br></div>
<div><div id="yiv2187385852"><div><div><div>Hi,<div><br clear="none"></div><div>Be aware that we now have a forum at <a rel="nofollow noopener noreferrer" shape="rect" target="_blank" href="http://discourse.gstreamer.org">discourse.gstreamer.org</a> which is getting more activity.</div><br clear="none"><br clear="none"><div class="yiv2187385852gmail_quote"><div dir="ltr" class="yiv2187385852gmail_attr">Le jeu. 5 oct. 2023, 20 h 15, cfd new via gstreamer-devel <<a rel="nofollow noopener noreferrer" shape="rect" ymailto="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank" href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a>> a écrit :<br clear="none"></div><blockquote style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;" class="yiv2187385852gmail_quote"><div><div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;"><div dir="ltr">I have a audio pipeline with a sink. When I switch audio devices, I want to replace the sink only. What I did in the code are,</div><div dir="ltr">1. set pipeline state to NULL<br clear="none"></div><div dir="ltr">1. disconnect sink element from the pipeline</div><div dir="ltr">2. unref it <===problem here: reference count is 0 and can not unref it. Why?<br clear="none"></div><div dir="ltr">3. create a new sink element and link it to pipeline</div><div dir="ltr">4. set pipeline state to PLAYING</div><div dir="ltr"><br clear="none"></div><div dir="ltr"> the pipeline works fine with the new sink. But why can not the old sink be deleted?</div></div></div></blockquote></div></div><div><br clear="none"></div><div>When you create an element from factory, it's created with a floating ref. As a side effect, when the element get added to the pipeline, the pipeline will get the floating ref, effectively passing ownership. In your case, you have dropped the last reference when you removed the element from the bin/pipeline. Use ref_sink if you want to prevent that.</div><div><br clear="none"></div><div>Nicolas</div><div id="yiv2187385852yqtfd19696" class="yiv2187385852yqt6337123591"><div><br clear="none"></div><div><div class="yiv2187385852gmail_quote"><blockquote style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;" class="yiv2187385852gmail_quote"><div><div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;"><div dir="ltr"> <br clear="none"></div><div dir="ltr"> thanks for your help,</div><div dir="ltr"><br clear="none"></div><div dir="ltr"> Joe<br clear="none"></div></div></div></blockquote></div></div></div></div><div id="yiv2187385852yqtfd04822" class="yiv2187385852yqt6337123591">
</div></div></div></div>
</div>
</div></body></html>