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 629212 - [oggdemux] Improve support for push mode (seeking, duration)
[oggdemux] Improve support for push mode (seeking, duration)
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
0.10.24
Other Linux
: Normal enhancement
: 0.10.36
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2010-09-09 19:15 UTC by Hans de Goede
Modified: 2011-10-29 15:36 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Hans de Goede 2010-09-09 19:15:28 UTC
Hi,

When playing back urls like for example:
http://stream101.jamendo.com/stream/537309/ogg2/07%20-%20Magdalen%20Graal%20-%20Goodbye.ogg?u=0&h=c99d39f075

In totem, they are not seekable and the duration is off. Where as downloading
them using wget and then playing them in totem both are fine. I believe this is an issue with the libgstsouphttpsrc plugin.

Most of the time I use audacious as my media player for sound files (and totem for video), and audacious had the same issue. I've created a patch for this
for audacious. The problem with audacious was that the seek function of the ov_callbacks struct passed in when using libvorbis, was getting called like this: "fseek(f, 0, SEEK_END)" this is quite a normal thing to do to determine
filesize, but it effectively seeks 1 byte past the end of the file (to the magical EOF marker byte). The neon http plugin in audacious could not handle this seeking of 1 byte past the end, and this lead to exactly the same results as I'm seeing under totem. So the chances are that the issue in gstreamer is the same (but that is just a hunch).

Regards,

Hans

p.s.

To reproduce login to jamendo, and choose to play music using an external player with m3u files with ogg vorbis files linked inside them.
Comment 1 Sebastian Dröge (slomo) 2010-09-10 16:18:05 UTC
Well, the duration is only 3 seconds off, that's good for an estimation. Seeking and duration reporting over HTTP is only working/accurate if the file has a Skeleton stream with an index table.
Comment 2 Hans de Goede 2010-09-10 19:02:25 UTC
(In reply to comment #1)
> Well, the duration is only 3 seconds off, that's good for an estimation.
> Seeking and duration reporting over HTTP is only working/accurate if the file
> has a Skeleton stream with an index table.

Hmm,

This is working fine with audacious (with the seek to eof issue fixed). I find it weird that gstreamer which I consider more advanced then the xmms derived
audacious cannot handle this. Esp. as ogg is supposed to nbe *the* open
format.

Ah well.

Regards,

Hans
Comment 3 Vincent Penquerc'h 2010-12-13 16:11:35 UTC
First pass push mode seeking implementation for oggdemux.
Upon the first seek, duration is determined, and a message is sent with the duratoin. Before that seek, the existing estimated duration will still be there, but seeking when readying the pipeline didn't work.
Seeking is currently done to the previous keyframe, so there's a granularity in the seeking. 

http://git.collabora.co.uk/?p=user/vincent/gst-plugins-base;a=shortlog;h=refs/heads/seeking

Here's the work so far. Comments welcome.
Comment 4 Vincent Penquerc'h 2010-12-14 11:40:21 UTC
Updated, it now doesn't need to wait for a user seek to determine duration.
Seeking is disabled for chained streams.
Comment 5 Hans de Goede 2010-12-14 11:46:47 UTC
Hi,

Thanks for working on this! You're implementation sounds good. I'll give it a test run as time permits (likely some where next week during my christmas
holliday).

Regards,

Hans
Comment 6 Hans de Goede 2010-12-15 11:59:00 UTC
(In reply to comment #4)
> Updated, it now doesn't need to wait for a user seek to determine duration.
> Seeking is disabled for chained streams.

I've given the version from your git tree a test and now seeking in oggs streamed from jamendo works great. Thanks for fixing this!

Regards,

Hans
Comment 7 Vincent Penquerc'h 2010-12-16 18:08:36 UTC
Thanks for testing.
The branch has been updated with various fixes (mostly for streams having a video track though).
Comment 8 Vincent Penquerc'h 2011-09-16 21:04:49 UTC
Fixed by 0173afa38cc6f8a2cb810f99a24ddb1d5d5f4868
See https://bugzilla.gnome.org/show_bug.cgi?id=621897