Summary: | Fails to play Last.fm streams with Amarok | ||
---|---|---|---|
Product: | [Unmaintained] phonon-backend-gstreamer | Reporter: | Mark Kretschmann <kretschmann> |
Component: | general | Assignee: | Harald Sitter <sitter> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | martin.sandsmark, myriam, sitter |
Priority: | HI | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Ubuntu | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | 4.4.4 | |
Sentry Crash Report: |
Description
Mark Kretschmann
2010-09-28 14:50:38 UTC
Seems as if GStreamer closes the data stream in between getting metadata and actual playback start. Last.fm urls however only work once (i.e. you can open the URL on time and after that you'll get a 403, which is what gst falls over here). This will be partially solved in Phonon 4.5 in KDE as it defaults to KIO streams for everything but file: I am not quite sure how to fix it natively though. The MediaObject resets connections somewhat randomly, however for Last.fm to work the connection must be held, as the URL is only valid for one connection attempt. commit a314c8e04f0e664c9efbb4419a2d48db38a997ae branch master Author: Harald Sitter <sitter@kde.org> Date: Thu Jan 13 21:15:48 2011 +0100 Make Last.fm streams work. Their URLs can only be opened once, after that they return with forbidden. However the MO likes to reset the pipeline a lot and thus opens the connection twice -> fail. Worked around it by explicitly preventing last.fm URLs to be reset. More appropriate fix (removal of the resetting logic) coming with 4.5 BUG: 252649 diff --git a/gstreamer/mediaobject.cpp b/gstreamer/mediaobject.cpp index b1de342..27b0b3b 100644 --- a/gstreamer/mediaobject.cpp +++ b/gstreamer/mediaobject.cpp @@ -785,7 +785,17 @@ void MediaObject::setState(State newstate) break; case Phonon::PlayingState: - if (m_resetNeeded) { +#ifdef __GNUC__ +#warning TODO 4.5 +#endif + // TODO 4.5: drop m_resetNeeded completely and use live connections, whatever + // those might be. + if (m_source.url().host().contains(QLatin1String("last.fm"))) { + // Never reset for last.fm as they only allow one connection attempt. + // https://bugs.kde.org/show_bug.cgi?id=252649 + m_resetNeeded = false; + } + if (m_resetNeeded) { // ### Note this is a workaround and it should really be gracefully // handled by medianode when we implement live connections. // This generally happens if medianodes have been connected after the MediaSource was set reassigning to the new bugzilla product for better bug tracing of the various backends. Sorry for the noise. |