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 118310 - Timeout support added for fdsrc
Timeout support added for fdsrc
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other All
: Normal enhancement
: 0.7.5
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2003-07-25 15:53 UTC by Mattias Wadman
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement


Attachments
Diff against CVS HEAD around 2003-07-23 (5.50 KB, patch)
2003-10-15 23:59 UTC, Mattias Wadman
none Details | Review
New patch against HEAD, includes uint64 for timeout value and EINTR handling. (5.62 KB, patch)
2004-02-13 19:16 UTC, Mattias Wadman
none Details | Review

Description Mattias Wadman 2003-07-25 15:53:49 UTC
Hello

Here is a patch that adds timeout support for the fdsrc element.

http://www.galaxen.se/~mattias/temp/gstfdsrc-timeout-patch.diff
Comment 1 David Schleef 2003-07-25 19:53:24 UTC
I like it.  We probably need a new timeout event.
Comment 2 David Schleef 2003-07-29 07:32:20 UTC
Some comments:

- the property should be a guint64, and in nanoseconds.  This is to
conform with other gstreamer properties.

- select() can return EINTR for a number of completely valid reasons.
 It's not necessarily an element error
Comment 3 Mattias Wadman 2003-07-29 08:53:01 UTC
I have been working on a similar patch for fdsink, but have been
unable to get select to work the way I want. fdsink seams to be a
"chain element" so i wonder if a solution as in fdsrc will work?
Comment 4 David Schleef 2003-07-29 18:20:24 UTC
_chain() is the equivalent of _get() for sink pads.  A source element
doesn't have a sink pad, so it's irrelevant.
Comment 5 Mattias Wadman 2003-10-15 23:59:54 UTC
Created attachment 20730 [details] [review]
Diff against CVS HEAD around 2003-07-23
Comment 6 Mattias Wadman 2003-10-16 00:01:26 UTC
Just add patch as attachment, as i may move it from the remote server.
Comment 7 David Schleef 2003-10-16 00:46:24 UTC
I'd be happy to apply it to HEAD, if you fix the things I commented
about previously.
Comment 8 Thomas Vander Stichele 2004-02-11 18:51:48 UTC
Mattias: ping ?
Comment 9 Mattias Wadman 2004-02-11 23:20:50 UTC
Pong.
Do you think the patch worth including? i can probably fix the things
David commented on, but currently im not sure if have the disk space
to compile the source :)
Comment 10 Mattias Wadman 2004-02-13 19:16:42 UTC
Created attachment 24389 [details] [review]
New patch against HEAD, includes uint64 for timeout value and EINTR handling.
Comment 11 Mattias Wadman 2004-02-13 19:31:16 UTC
Timeout is now in nanoseconds.
Does everything look ok?

Also, im curious about one thing:
If I for example set the timeout value to 1 second useing UL-postfix:
g_object_set (G_OBJECT (src), "timeout", 1000000000UL, NULL);
I get this warning about property "fdsrc", not "timeout", weird.
(process:14439): GLib-GObject-WARNING **: gobject.c:882: object class
`GstFdSrc' has no property named `fdsrc'
With ULL-postfix i get no warning, in both cases the timeout value
seams to get set.
Comment 12 David Schleef 2004-02-13 20:51:17 UTC
in that case, you're passing an unsigned long, instead of a guint64_t,
which probably translates to a unsigned long long on your machine.  You
should use G_GINT64_CONSTANT (1000000000), or less portably,
1000000000ULL.

Patch is applied, with g_error() converted to GST_ELEMENT_ERROR(). 
Thanks.