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 532364 - tcpclientsrc broken in 0.10.19
tcpclientsrc broken in 0.10.19
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
0.10.19
Other Linux
: Normal normal
: 0.10.20
Assigned To: Wim Taymans
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2008-05-09 15:45 UTC by Hannes Bistry
Modified: 2008-05-13 16:02 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fixes this bug (568 bytes, patch)
2008-05-13 12:10 UTC, Hannes Bistry
none Details | Review

Description Hannes Bistry 2008-05-09 15:45:05 UTC
Hello,

tcpclientsrc is not working anymore in 0.10.19. 
This can be reproduced with:
Shell 1:
gst-launch-0.10 -v videotestsrc ! tcpserversink buffers-max=2 buffers-soft-max=1 recover-policy=1 protocol=gdp sync=0 
Shell 2:
./gst-launch-0.10 -v tcpclientsrc protocol=gdp ! fakesink sync=0

Stops after: New clock: GstSystemClock

Works(drops) fine with 10.17. Reproduced on two systems (kernel 2.6.18 + 2.6.16, I know, quite old:)

Maybe it is fixed in cvs already(there have been changes to this file), but I failed to compile it due to dependencies that are not checked within configure.

Greetings
Hannes B.
Comment 1 Hannes Bistry 2008-05-09 17:37:15 UTC
Bug Reproduced with my bleeding edge Ubuntu:
kernel 2.6.24, Gstreamer 0.10.18
Comment 2 Hannes Bistry 2008-05-13 12:10:46 UTC
Created attachment 110849 [details] [review]
Fixes this bug

I solved this bug and maybe other related bugs by adding two lines to gsttcpclientsrc.c:
  gst_poll_add_fd (src->fdset,&src->sock_fd);
  gst_poll_fd_ctl_read(src->fdset,&src->sock_fd,TRUE);

inside the start method. This configures the GstPoll to return if data can be read. At the moment, gst_poll_wait will never return. To make the code cleaner you should check the return value of these calls.
Comment 3 Wim Taymans 2008-05-13 16:02:28 UTC
Thanks for spotting!

        Patch by: Hannes Bistry <hannesb at gmx dot de>

        * gst/tcp/gsttcpclientsrc.c: (gst_tcp_client_src_start):
        * gst/tcp/gsttcpserversink.c:
        (gst_tcp_server_sink_handle_server_read),
        (gst_tcp_server_sink_handle_wait), (gst_tcp_server_sink_init_send):
        Fix regression in clientsrc because we did not add the fd to the poll
        set anymore. Fixes #532364.
        Do some cleanups here and there.