"Creating pipes for GWakeup: Too many open files" issue with tcpserversink

Duzy Chan geek at duzy.info
Mon Feb 4 07:33:48 PST 2013


Dear All:

Greeting, people.

I'm writing a app (https://github.com/duzy/gst-switch), which will recreate
some pipelines with *tcpserversink* elements lots of times. I'm now
confronting an issue, which is:

GLib-ERROR **: Creating pipes for GWakeup: Too many open files

By hacking into *gsttcpserversink.c* and *gstmultisocketsink.c* in *
gst-plugins-base*, I found that *tcpserversink* is not closing any client
sockets it served. Instead, it will issue a "client-socket-removed" signal,
which allows application code to *close* the FD.

So I should need to close the socket FD by myself to avoid
too-many-open-files problem.

But I've tried to do these:

g_signal_connect (sink, "*client-socket-removed*",
      G_CALLBACK (*gst_composite_output_client_socket_removed*), composite);

And in the function *gst_composite_output_client_socket_removed*, I
performs the closing of the socket file descriptor. Which I think should be
the solution for the too-many-open-files problem.

But I tried many times, it looks like "*client-socket-removed*" was not
emitted at all. So the callback function was not called.

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 *GST_STATE_CHANGE_READY_TO_NULL*).

Does someone got any ideas on the *client-socket-removed* signal of *
tcpserversink*? Is it a "unimplemented" feature or something else of
tcpserversink? I will be very much thankful for any tips of it.

Best Regards Sincerely
Duzy Chan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20130204/0ac8d82a/attachment.html>


More information about the gstreamer-devel mailing list