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 499771 - using a fifo as filesink doesn't seem to work
using a fifo as filesink doesn't seem to work
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: dont know
git master
Other Linux
: Normal normal
: 0.10.16
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2007-11-26 16:31 UTC by Gabriel Bouvigne
Modified: 2007-11-27 18:45 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
first attempt (1.31 KB, patch)
2007-11-27 11:55 UTC, Wim Taymans
committed Details | Review

Description Gabriel Bouvigne 2007-11-26 16:31:20 UTC
Using:
gst-launch  filesrc location="./testfile" ! filesink location="./testfifo"

with ./testfifo being a fifo is failing due to a tentative of seeking on./testfifo.

Since #343312 was closed, filesink is reporting tentative of seeking on non seekable outputs. In the current case, it properly reports the error.

However, it seems that this still doesn't work. From reading gst_file_sink_event within gstfilesink.c, I noticed that in case of GST_EVENT_NEWSEGMENT, the filesink element would issue a seek.

In my case, the problematic seek request tries to seek at offset 0 (from debug output of gst-inspect).

I think that it might be because a GST_EVENT_NEWSEGMENT is initially issued, and filesink then tries to seek, even if it's requested to seek at the current (initial) position.
Comment 1 Wim Taymans 2007-11-27 11:55:08 UTC
Created attachment 99710 [details] [review]
first attempt

The patch checks if the requested seek offset is different from the current offset and only tries to seek if different. This should not fail for the initial segment even if the sink is not seekable.
Comment 2 Wim Taymans 2007-11-27 18:45:38 UTC
        * plugins/elements/gstfilesink.c: (gst_file_sink_event):
        Be a bit smarter when seeking, like, don't try to do a seek when it's
        not needed. This avoids errors when the file is not seekable.
        Fixes #499771.