<div dir="ltr">Please ignore this post and forgive my mistake. There no client-added and client-socket-removed signals because of that there are no tcpclientsrc in my test case.<div><br></div><div style>Thanks very much.</div>
<div style><br></div><div style>Best Wishes</div><div style>Duzy Chan</div><div style><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Feb 4, 2013 at 11:33 PM, Duzy Chan <span dir="ltr"><<a href="mailto:geek@duzy.info" target="_blank">geek@duzy.info</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Dear All:<div><br></div><div>Greeting, people.</div><div><br></div><div>I'm writing a app (<a href="https://github.com/duzy/gst-switch" target="_blank">https://github.com/duzy/gst-switch</a>), which will recreate some pipelines with <b>tcpserversink</b> elements lots of times. I'm now confronting an issue, which is:</div>
<div><br></div><div>GLib-ERROR **: Creating pipes for GWakeup: Too many open files<br></div><div><br></div><div>By hacking into <i>gsttcpserversink.c</i> and <i>gstmultisocketsink.c</i> in <b>gst-plugins-base</b>, I found that <b>tcpserversink</b> is not closing any client sockets it served. Instead, it will issue a "client-socket-removed" signal, which allows application code to <b>close</b> the FD.</div>
<div><br></div><div>So I should need to close the socket FD by myself to avoid too-many-open-files problem.</div><div><br></div><div>But I've tried to do these:</div><div><br></div><div>
<blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><div><font color="#444444">g_signal_connect (sink, "<b>client-socket-removed</b>",</font></div><div><font color="#444444"> G_CALLBACK (<b>gst_composite_output_client_socket_removed</b>), composite);</font></div>
<div><br></div></div></blockquote><div><div>And in the function <span style="color:rgb(68,68,68)"><b>gst_composite_output_client_socket_removed</b></span>, I performs the closing of the socket file descriptor. Which I think should be the solution for the too-many-open-files problem.</div>
<div><br></div><div>But I tried many times, it looks like "<b>client-socket-removed</b>" was not emitted at all. So the callback function was not called.</div><div><br></div><div>I've gone through gstmultisocketsink.c many times, it looks that signal is not emitted while the state of the element changed from ready into null (say <b>GST_STATE_CHANGE_READY_TO_NULL</b>).</div>
<div><br></div><div>Does someone got any ideas on the <b>client-socket-removed</b> signal of <b>tcpserversink</b>? Is it a "unimplemented" feature or something else of tcpserversink? I will be very much thankful for any tips of it.</div>
</div></div><div><br></div><div>Best Regards Sincerely</div><span class="HOEnZb"><font color="#888888"><div>Duzy Chan</div><div><br></div><div><br></div></font></span></div>
</blockquote></div><br></div>