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 330410 - disable seek bar when player can't seek
disable seek bar when player can't seek
Status: RESOLVED OBSOLETE
Product: rhythmbox
Classification: Other
Component: playback
HEAD
Other Linux
: Normal normal
: ---
Assigned To: RhythmBox Maintainers
RhythmBox Maintainers
Depends on:
Blocks:
 
 
Reported: 2006-02-08 14:51 UTC by William Jon McCann
Modified: 2018-05-24 11:22 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
fix daap client seeking (8.05 KB, patch)
2006-07-12 14:19 UTC, Jonathan Matthew
committed Details | Review
fix itunes client seeking (mostly) (6.96 KB, patch)
2006-07-16 11:50 UTC, Jonathan Matthew
committed Details | Review
UI patch (3.32 KB, patch)
2006-08-09 22:22 UTC, Jonathan Matthew
committed Details | Review

Description William Jon McCann 2006-02-08 14:51:49 UTC
Looks like seeking in a track from a RB DAAP share using an iTunes client is not working.  The iTunes seek bar changes position but the track just starts again from the beginning.
Comment 1 Mårten Woxberg 2006-03-10 15:17:30 UTC
I have a similar problem, I run a mt-daapd server on a computer that shares all music in my home.

In Windows on iTunes I can seek in a song and it starts playing wherever I want it to. In rhythmbox it just jumps back to where it was and nothing happens, maybe the sound skips some but nothing else. 
I want to be able to seek in songs in rhythmbox too.
Please tell me if I should split this in a separate bug..
Using Rhythmbox 0.9.3.1 (Ubuntu Dapper)
Comment 2 William Jon McCann 2006-03-16 19:17:42 UTC
Looks like this isn't limited to iTunes clients.
Comment 4 William Jon McCann 2006-03-16 20:32:36 UTC
Best I can tell on the RB client side we seem to be requesting the seek on the server properly:

Range: bytes=307200-

http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35
Comment 5 William Jon McCann 2006-03-16 20:49:39 UTC
Well it also looks like the server is responding with the correct offset:

Content-Range: bytes 307200-3151196/3151196

Comment 6 Jonathan Matthew 2006-07-12 14:19:41 UTC
Created attachment 68817 [details] [review]
fix daap client seeking

This removes the evil seeking hacks (with gstreamer 0.10, not 0.8).  I haven't tested it with an itunes server, but it works nicely with rhythmbox.  

With this patch, vorbis seeking doesn't work at all.  I'd almost consider this an improvement.  MP3 seeking works pretty well.

The code in rb_daap_src_getcaps apparently didn't work with 0.8 and isn't necessary with 0.10, so we might as well remove it.

Since this removes all the DAAP bits from rb-player-gst.c, with this we could make DAAP a plugin for gstreamer 0.10 builds.
Comment 7 William Jon McCann 2006-07-12 15:28:00 UTC
With this patch when I try to play (using RB client) a song on an OS X iTunes server it says: 
(rhythmbox:6124): Rhythmbox-WARNING **: eos_cb: Unhandled error: Unknown playback error
(11:27:03) [0x92adf90] [rb_shell_player_error] rb-shell-player.c:2505: playback error while playing: No URI handler implemented for "daap".
(11:27:03) [0x92adf90] [error_cb] rb-shell-player.c:2544: exiting error hander

When I try to seek (using OS X iTunes client) an MP3 file on a RB server it doesn't seek but starts the song over.
Comment 8 Jonathan Matthew 2006-07-12 22:50:16 UTC
It seems that sometimes the daap source element doesn't get registered.  I had a slight hack for this somewhere (calling rb_daap_src_get_type in the daap source constructor) that fixed it for me.
Comment 9 Jonathan Matthew 2006-07-13 12:56:42 UTC
My itunes client (6.0.5 on OS X) is sending completely bogus range headers when I try seeking when playing from an RB DAAP share.  The byte offsets it requests are ludicrously low (541 bytes when seeking to 2:25) so the song plays pretty much from the start.  I've checked that we're sending bitrates correctly (and even if we didn't, itunes updates the song information the first time you try to play it).

On a brighter note, this patch for RB client seeking works with the itunes daap server (again 6.0.5 on OS X).
Comment 10 Jonathan Matthew 2006-07-14 12:53:26 UTC
Removing our use of chunked transfer encoding fixes the problem.
Comment 11 Jonathan Matthew 2006-07-16 11:50:51 UTC
Created attachment 68989 [details] [review]
fix itunes client seeking (mostly)

This uses GMappedFile to send local files without chunked encoding so itunes clients can seek properly.  Remote files are still sent chunked.  Reading whole remote files into memory to support broken clients wastes memory and is probably going to be very slow, so I don't think we should do it.
Comment 12 James "Doc" Livingston 2006-07-18 10:45:25 UTC
Looks sane, and seems to work okay here. Using GMappedFile would require bumping our glib dependency up to 2.8.
Comment 13 Jonathan Matthew 2006-07-22 08:26:20 UTC
Committed with some #ifdefs around the GMappedFile stuff.
Comment 14 Jonathan Matthew 2006-08-02 14:22:19 UTC
I've committed the client-side seeking patch.

We need to disable seeking when the player backend reports it cannot seek.  To do this, the player needs to wait for state changes to finish before returning, so we can do a seeking query immediately afterwards.  oggdemux also needs to be fixed to process seeking queries.
Comment 15 Jonathan Matthew 2006-08-09 22:19:44 UTC
The oggdemux issue is bug 350655.

Comment 16 Jonathan Matthew 2006-08-09 22:22:32 UTC
Created attachment 70594 [details] [review]
UI patch

Disables the seek bar if we won't be able to seek.  This won't work reliably until the player backend waits for the pipeline to actually go into PLAYING state before returning from rb_player_gst_play(), since some elements won't have determined whether they can seek by the time we call rb_player_seekable.
Comment 17 James "Doc" Livingston 2006-08-10 02:29:51 UTC
Looks fine to me.
Comment 18 Jonathan Matthew 2006-08-19 02:58:45 UTC
OK, committed.
Comment 19 Alex Lancaster 2006-08-19 07:10:23 UTC
Not sure if this is important, but I get some warnings at runtime with this new patch that's now in CVS:

(rhythmbox:8507): Rhythmbox-CRITICAL **: rb_player_gst_seekable: assertion `mp->priv->playbin != NULL' failed

(rhythmbox:8507): Rhythmbox-CRITICAL **: rb_player_gst_seekable: assertion `mp->priv->playbin != NULL' failed

(rhythmbox:8507): Rhythmbox-CRITICAL **: rb_player_gst_seekable: assertion `mp->priv->playbin != NULL' failed
Comment 20 Jonathan Matthew 2006-08-19 08:00:41 UTC
hmm, perhaps committing that wasn't such a good idea..

I've changed rb_player_gst_seekable to silently return FALSE if there's no playbin, and changed the call to rb_header_set_playing_entry to always pass in TRUE for seekable for now, since it appears to disable seeking for anything other than mp3.
Comment 21 Bastien Nocera 2008-09-08 15:49:45 UTC
There's code in Totem's GStreamer backend to do this sort of thing pretty reliably.
Comment 22 GNOME Infrastructure Team 2018-05-24 11:22:39 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/rhythmbox/issues/144.