GNOME Bugzilla – Bug 538628
Patch: added a timeout property to fdsrc used in gst_poll_wait
Last modified: 2008-06-20 10:02:14 UTC
When using the fdsrc to read from a socket, its useful to be able to specify a timeout for the gst_poll_wait that is used. The behavior should be unchanged when not setting the property, it will use -1 and wait forever. See patch for gstreamer/gstreamer/plugins/elements/gstfdsrc.c (1.82) gstreamer/gstreamer/plugins/elements/gstfdsrc.h (1.23) http://pastebin.com/f6e1b4e37 Also changed some old labels/debugmessages that used "select" to "poll". /joel
Created attachment 112845 [details] [review] add poll timeout property on gstfdsrc.c / gstfdsrc.h
Comment on attachment 112845 [details] [review] add poll timeout property on gstfdsrc.c / gstfdsrc.h the timeout is handled in the same way as eos, returning GST_FLOW_UNEXPECTED from the create function. Is this correct?
Why not do it the same way as udpsrc does it? it posts a message when the timeout occurs so that the application can decide what to do next. This sounds more flexible than simply stopping.
Created attachment 112894 [details] [review] handle poll timeout in the same way as udpsrc
Patch by: joel larsson <tilljoel at gmail dot com> * docs/plugins/gstreamer-plugins.args: * plugins/elements/gstfdsrc.c: (gst_fd_src_class_init), (gst_fd_src_init), (gst_fd_src_update_fd), (gst_fd_src_set_property), (gst_fd_src_get_property), (gst_fd_src_create): * plugins/elements/gstfdsrc.h: Add timeout property like udpsrc. Fixes #538628. Add some more docs and example pipelines.