Thanks a lot for such a fast fix!<div><br></div><div>Toni Silvestre<br><br><div class="gmail_quote">On Wed, Dec 22, 2010 at 11:48, Wim Taymans <span dir="ltr">&lt;<a href="mailto:wim.taymans@gmail.com">wim.taymans@gmail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">On Wed, 2010-12-22 at 11:29 +0100, Antoni Silvestre Padrós wrote:<br>
&gt; If I haven&#39;t done anything wrong with my debugging, the<br>
&gt; signal request-pt-map for the GstRtpBin element is emitted with the<br>
&gt; element locked, and in my case my concurrent code was getting<br>
&gt; deadlocked in the function gst_element_get_request_pad.<br>
&gt;<br>
</div>Ok, gstrtpsession was not releasing a lock, fixed in git with this<br>
commit:<br>
<a href="http://cgit.freedesktop.org/gstreamer/gst-plugins-good/commit/?id=2b53cbe923419a87df9cccd8fbcb911e61b46c9e" target="_blank">http://cgit.freedesktop.org/gstreamer/gst-plugins-good/commit/?id=2b53cbe923419a87df9cccd8fbcb911e61b46c9e</a><br>


<font color="#888888"><br>
Wim<br>
</font><div><div></div><div class="h5">&gt;<br>
&gt; thanks,<br>
&gt; Toni Silvestre<br>
&gt;<br>
&gt; On Wed, Dec 22, 2010 at 11:21, Wim Taymans &lt;<a href="mailto:wim.taymans@gmail.com">wim.taymans@gmail.com</a>&gt;<br>
&gt; wrote:<br>
&gt;<br>
&gt;         On Wed, 2010-12-22 at 10:32 +0100, Antoni Silvestre Padrós<br>
&gt;         wrote:<br>
&gt;         &gt; Hi, I am using GstRtpBin for my application and I have a<br>
&gt;         problem with<br>
&gt;         &gt; signals and locks. I need the program to hold back the<br>
&gt;         emission of<br>
&gt;         &gt; certain gstrtpbin signals while I am executing some<br>
&gt;         functions.<br>
&gt;         &gt; Stopping the execution of the callbacks of those signals<br>
&gt;         when they<br>
&gt;         &gt; have already been called doesn&#39;t work because when those<br>
&gt;         callbacks<br>
&gt;         &gt; have been called the gstrtpbin code that has emitted them<br>
&gt;         has already<br>
&gt;         &gt; acquired the lock for the gstrtpbin object and my concurrent<br>
&gt;         part of<br>
&gt;         &gt; the code uses functions like gst_element_get_request_pad<br>
&gt;         that also<br>
&gt;         &gt; need to acquire that same lock.<br>
&gt;         &gt;<br>
&gt;         &gt;<br>
&gt;         &gt; One solution would be to acquire the lock of the gstrtpbin<br>
&gt;         object<br>
&gt;         &gt; myself every time I run that part of the code that is not<br>
&gt;         compatible<br>
&gt;         &gt; with the signals. That would hold back the emission of<br>
&gt;         gstrtpbin<br>
&gt;         &gt; signals, however as gst object locks are not recursive when<br>
&gt;         I use<br>
&gt;         &gt; functions like gst_element_get_request_pad that also acquire<br>
&gt;         the gst<br>
&gt;         &gt; lock, my code gets deadlocked by locking the same mutex two<br>
&gt;         times by<br>
&gt;         &gt; the same thread. One workaround would be releasing the gst<br>
&gt;         object lock<br>
&gt;         &gt; just before any call to such functions but then obviously I<br>
&gt;         would have<br>
&gt;         &gt; the risk of a signal emission occurring in between the lock<br>
&gt;         release<br>
&gt;         &gt; and the call to the gst function that requires a lock.<br>
&gt;         &gt;<br>
&gt;         &gt;<br>
&gt;         &gt; Right now I can&#39;t think of any elegant solution to this<br>
&gt;         problem,<br>
&gt;         &gt; anyone has any ideas?<br>
&gt;<br>
&gt;<br>
&gt;         What are you trying to do? all signals are emitted without any<br>
&gt;         locks, if<br>
&gt;         not that&#39;s a bug. What signals are you talking about, what<br>
&gt;         actions are<br>
&gt;         you performing that causes deadlocks?<br>
&gt;<br>
&gt;         Wim<br>
&gt;<br>
&gt;         &gt;<br>
&gt;         &gt;<br>
&gt;         &gt; Thanks,<br>
&gt;         &gt; Toni Silvestre<br>
&gt;         &gt;<br>
&gt;         ------------------------------------------------------------------------------<br>
&gt;         &gt; Forrester recently released a report on the Return on<br>
&gt;         Investment (ROI) of<br>
&gt;         &gt; Google Apps. They found a 300% ROI, 38%-56% cost savings,<br>
&gt;         and break-even<br>
&gt;         &gt; within 7 months.  Over 3 million businesses have gone Google<br>
&gt;         with Google Apps:<br>
&gt;         &gt; an online email calendar, and document program that&#39;s<br>
&gt;         accessible from your<br>
&gt;         &gt; browser. Read the Forrester report:<br>
&gt;         <a href="http://p.sf.net/sfu/googleapps-sfnew" target="_blank">http://p.sf.net/sfu/googleapps-sfnew</a><br>
&gt;         &gt; _______________________________________________<br>
&gt;         gstreamer-devel mailing list<br>
&gt;         <a href="mailto:gstreamer-devel@lists.sourceforge.net">gstreamer-devel@lists.sourceforge.net</a><br>
&gt;         <a href="https://lists.sourceforge.net/lists/listinfo/gstreamer-devel" target="_blank">https://lists.sourceforge.net/lists/listinfo/gstreamer-devel</a><br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;         ------------------------------------------------------------------------------<br>
&gt;         Forrester recently released a report on the Return on<br>
&gt;         Investment (ROI) of<br>
&gt;         Google Apps. They found a 300% ROI, 38%-56% cost savings, and<br>
&gt;         break-even<br>
&gt;         within 7 months.  Over 3 million businesses have gone Google<br>
&gt;         with Google Apps:<br>
&gt;         an online email calendar, and document program that&#39;s<br>
&gt;         accessible from your<br>
&gt;         browser. Read the Forrester report:<br>
&gt;         <a href="http://p.sf.net/sfu/googleapps-sfnew" target="_blank">http://p.sf.net/sfu/googleapps-sfnew</a><br>
&gt;         _______________________________________________<br>
&gt;         gstreamer-devel mailing list<br>
&gt;         <a href="mailto:gstreamer-devel@lists.sourceforge.net">gstreamer-devel@lists.sourceforge.net</a><br>
&gt;         <a href="https://lists.sourceforge.net/lists/listinfo/gstreamer-devel" target="_blank">https://lists.sourceforge.net/lists/listinfo/gstreamer-devel</a><br>
&gt;<br>
&gt;<br>
&gt; ------------------------------------------------------------------------------<br>
&gt; Forrester recently released a report on the Return on Investment (ROI) of<br>
&gt; Google Apps. They found a 300% ROI, 38%-56% cost savings, and break-even<br>
&gt; within 7 months.  Over 3 million businesses have gone Google with Google Apps:<br>
&gt; an online email calendar, and document program that&#39;s accessible from your<br>
&gt; browser. Read the Forrester report: <a href="http://p.sf.net/sfu/googleapps-sfnew" target="_blank">http://p.sf.net/sfu/googleapps-sfnew</a><br>
&gt; _______________________________________________ gstreamer-devel mailing list <a href="mailto:gstreamer-devel@lists.sourceforge.net">gstreamer-devel@lists.sourceforge.net</a> <a href="https://lists.sourceforge.net/lists/listinfo/gstreamer-devel" target="_blank">https://lists.sourceforge.net/lists/listinfo/gstreamer-devel</a><br>


<br>
<br>
<br>
------------------------------------------------------------------------------<br>
Forrester recently released a report on the Return on Investment (ROI) of<br>
Google Apps. They found a 300% ROI, 38%-56% cost savings, and break-even<br>
within 7 months.  Over 3 million businesses have gone Google with Google Apps:<br>
an online email calendar, and document program that&#39;s accessible from your<br>
browser. Read the Forrester report: <a href="http://p.sf.net/sfu/googleapps-sfnew" target="_blank">http://p.sf.net/sfu/googleapps-sfnew</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>
</div></div></blockquote></div><br></div>