After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 168257 - [PATCH] [tcpserversink] add buffer-processed signal to tcpserversink
[PATCH] [tcpserversink] add buffer-processed signal to tcpserversink
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins
git master
Other Linux
: Normal enhancement
: 0.8.12
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2005-02-23 13:17 UTC by Luca Ognibene
Modified: 2005-09-24 17:15 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
add a buffer-processed signal (1.94 KB, patch)
2005-02-23 13:18 UTC, Luca Ognibene
none Details | Review
new patch (5.94 KB, patch)
2005-06-30 10:44 UTC, Luca Ognibene
none Details | Review
new patch (6.82 KB, patch)
2005-07-18 13:42 UTC, Luca Ognibene
none Details | Review

Description Luca Ognibene 2005-02-23 13:17:46 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..)
Comment 1 Luca Ognibene 2005-02-23 13:18:48 UTC
Created attachment 37831 [details] [review]
add a buffer-processed signal
Comment 2 Ronald Bultje 2005-02-25 08:56:30 UTC
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.
Comment 3 Luca Ognibene 2005-02-28 14:36:43 UTC
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)
Comment 4 Ronald Bultje 2005-02-28 18:20:20 UTC
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.
Comment 5 Luca Ognibene 2005-05-03 15:22:46 UTC
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. 
Comment 6 Luca Ognibene 2005-06-30 10:44:23 UTC
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)
Comment 7 Luca Ognibene 2005-06-30 10:47:33 UTC
updated the patch. If someone wants to review it..
Comment 8 Andy Wingo 2005-07-16 10:31:01 UTC
Adding wim for a comment.
Comment 9 Wim Taymans 2005-07-16 11:05:06 UTC
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).

Comment 10 Luca Ognibene 2005-07-18 13:42:16 UTC
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
Comment 11 Luca Ognibene 2005-09-17 09:49:51 UTC
ping. I've updated the patch as wim's comment, can i commit ?
Comment 12 Luca Ognibene 2005-09-24 17:15:43 UTC
committed.