GNOME Bugzilla – Bug 168257
[PATCH] [tcpserversink] add buffer-processed signal to tcpserversink
Last modified: 2005-09-24 17:15:43 UTC
Add a signal to tcpserversink emitted when a frame has been written on the socket. For a longer description see: http://sourceforge.net/mailarchive/forum.php?thread_id=6437031&forum_id=5947 (If this is a too application specific feature just reject this patch and i'll mantain my own copy of tcpserversink..)
Created attachment 37831 [details] [review] add a buffer-processed signal
Why don't you add a probe to the pad (see http://gstreamer.freedesktop.org/data/doc/gstreamer/head/manual/html/chapter-dataaccess.html)? Like you said, adding hooks for all kind of apps isn't a good idea... Marking wontfix. Feel free to poke me on IRC if you need help with the probes.
Because (imho) it won't work. Using probes i have this problem: When i receive a signal from a probe i know that a buffer will be processed by the _chain function in multifdsink (or subclass) but i'm not sure if this buffer will be sent to a client or not. And if i have more than one client connected to multifdsink i'm not sure if the buffer will be sent to all clients (and when it'll be sent)
In that case I'll leave it reopened and for some of the tcp people to triage and apply. I can't say for sure if it is right or not.
I've also done a patch to send only N frames to each connected client. I can attach it here if you think that it'll be useful.
Created attachment 48452 [details] [review] new patch - implement buffer-processed signal (send a signal every time a buffer has been sent to a specific fd) - implement buffers-to-send property (send only N buffers to each fd)
updated the patch. If someone wants to review it..
Adding wim for a comment.
Max limit seems ok and usefull, too bad it only works for buffers and not bytes/time. My problem with the signals is that they are slow and grab a global lock. I fear this might not scale for a very large number of clients. An easy solution would be to only fire the signal when a property on the element is TRUE (something like "signal"=TRUE).
Created attachment 49354 [details] [review] new patch Add a property to activate the "buffer-processed" signal. If buffer-processed-signal == FALSE (default) -> don't emit signal If buffer-processed-signal == TRUE -> emit signal
ping. I've updated the patch as wim's comment, can i commit ?
committed.