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 423304 - file descriptor closed in udpsrc and dynudpsink
file descriptor closed in udpsrc and dynudpsink
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other Linux
: Normal normal
: 0.10.6
Assigned To: Wim Taymans
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2007-03-27 10:56 UTC by Laurent Glayal
Modified: 2007-03-29 10:00 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch for 'closefd' property on udpsrc/dynudpsink elements (3.14 KB, application/x-bzip2)
2007-03-27 10:57 UTC, Laurent Glayal
Details

Description Laurent Glayal 2007-03-27 10:56:54 UTC
Hi,
when passing a sock fd  to udpsrc and/or dynudpsink these elements close the fd on state change. This is a problem if the same fd is used in two elements such as udpsrc an dynudpsink (for ex. for RTP endpoints). The application should have possibility to control the close() of the passed fd .

The following patch adds this ability with a new property : 'closefd', defaulting to TRUE to keep the elements in the old behaviour.
If set to FALSE the passed fd (and only this one) will not be closed.

Regards.
Comment 1 Laurent Glayal 2007-03-27 10:57:50 UTC
Created attachment 85378 [details]
patch for 'closefd' property on udpsrc/dynudpsink elements
Comment 2 Wim Taymans 2007-03-29 10:00:06 UTC
        Patch by: Laurent Glayal <spglegle at yahoo dot fr>

        * gst/udp/gstdynudpsink.c: (gst_dynudpsink_class_init),
        (gst_dynudpsink_init), (gst_dynudpsink_set_property),
        (gst_dynudpsink_get_property), (gst_dynudpsink_init_send),
        (gst_dynudpsink_close):
        * gst/udp/gstdynudpsink.h:
        * gst/udp/gstudpsrc.c: (gst_udpsrc_class_init), (gst_udpsrc_init),
        (gst_udpsrc_create), (gst_udpsrc_set_property),
        (gst_udpsrc_get_property), (gst_udpsrc_start), (gst_udpsrc_stop):
        * gst/udp/gstudpsrc.h:
        Rework the socket allocation a bit based on the sockfd argument so that
        it becomes usable.
        Add a closefd property to instruct the udp elements to close the custom
        file descriptors when going to READY. Fixes #423304.
        API:GstUDPSrc::closefd property
        API:GstDynUDPSink::closefd property