Version: 4.4.2 (KDE 4.5) (using KDE 4.5.1) OS: Linux Playing any Last.fm streams just cycles from error to error. Debug output from GStreamer is this: 0:00:22.765423684 23027 0x7f9f78012d70 WARN basesrc gstbasesrc.c:2550:gst_base_src_loop:<phononsrc0> error: Internal data flow error. 0:00:22.765463280 23027 0x7f9f78012d70 WARN basesrc gstbasesrc.c:2550:gst_base_src_loop:<phononsrc0> error: streaming task paused, reason error (-5) 0:00:22.765540670 23027 0x7f9f78012d70 WARN typefind gsttypefindelement.c:561:gst_type_find_element_handle_event:<typefind> error: Stream contains no data. 0:00:22.765568285 23027 0x7f9f78012d70 WARN typefind gsttypefindelement.c:561:gst_type_find_element_handle_event:<typefind> error: Can't typefind empty stream Reproducible: Always Steps to Reproduce: Play Last.fm stream in Amarok. Actual Results: fail Expected Results: works
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.