Bug 199327 - [PATCH] Metadata not updated in Ogg streams (metaDataChanged() not emitted by Xine backend)
Summary: [PATCH] Metadata not updated in Ogg streams (metaDataChanged() not emitted by...
Status: RESOLVED FIXED
Alias: None
Product: Phonon
Classification: Frameworks and Libraries
Component: Xine backend (show other bugs)
Version: 4.3.0 (KDE 4.2.0)
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Martin Sandsmark
URL:
Keywords:
: 218030 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-07-07 19:42 UTC by rangerGR
Modified: 2010-12-05 21:36 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.4.1
Sentry Crash Report:


Attachments
Patch to solve the metadate problem. (776 bytes, patch)
2009-12-07 04:53 UTC, klondike
Details

Note You need to log in before you can comment on or make changes to this bug.
Description rangerGR 2009-07-07 19:42:57 UTC
Version:           2.2-SVN (using 4.2.4 (KDE 4.2.4), Arch Linux)
Compiler:          gcc
OS:                Linux (x86_64) release 2.6.30-ARCH

When listenig to a ogg stream, (for example from an Icecast server) amarok doesn't update media info.
Current track applet and playlist always shows the first track that amarok played from the stream. When listening an mp3 stream from Icecast, current track is updated with every song change.
With amarok 1.4.x and with the same version of Icecast server, media info was updated for every song change and for both stream types.

How to Reproduce:
Open an Icecast ogg stream (eg http://ruby.keennotion.gr:8000) and wait for the next song. The server status will show the next song but amarok wont update media info.
Then open the mp3 stream form the same source and wait for the next song. Media info will be updated in playlist and current track applet.

Using latest r992653
Comment 1 Mark Kretschmann 2009-08-21 14:23:05 UTC
I can confirm this with Amarok 2.2-GIT, KDE 4.3.0.

The bug could be in Phonon or Amarok. Needs further analysis.
Comment 2 Mark Kretschmann 2009-08-23 14:27:23 UTC
On closer inspection it turns out that Phonon (xine backend) does not emit metaDataChanged() when the track changes in an Ogg Vorbis stream.

Example stream:
http://demovibes.de:8000/necta128.ogg

KDE version: 4.3.0

I assume this is a Phonon bug, so I'm reassigning.
Comment 3 Myriam Schweingruber 2009-11-08 22:16:20 UTC
Completing title.
Comment 4 klondike 2009-12-07 04:53:26 UTC
Created attachment 38891 [details]
Patch to solve the metadate problem.

The problem is caused because the backend expects a XINE_EVENT_UI_SET_TITLE to indicate the new Metadata though xine launchs a XINE_EVENT_UI_CHANNELS_CHANGED.

Adding the behaviour of the NewMetaData event to the UiChannelsChanged event works for kaffeine but fails randomly on amarok where the old metadata would be kept sometimes and fails always on the OSD of amarok which would display the old metadata.
Comment 5 Myriam Schweingruber 2009-12-10 09:51:20 UTC
*** Bug 218030 has been marked as a duplicate of this bug. ***
Comment 6 Martin Sandsmark 2010-04-08 00:24:53 UTC
commit 27f24b329bec74e2dc38ca4883ab68adb911b7f7
Author: Martin T. H. Sandsmark <sandsmark@samfundet.no>
Date:   Thu Apr 8 00:25:26 2010 +0200

    fix emitting of metaDataChanged() in ogg streams.
    CCBUG: 199327

diff --git a/xine/xinestream.cpp b/xine/xinestream.cpp
index dff7c5a..4817073 100644
--- a/xine/xinestream.cpp
+++ b/xine/xinestream.cpp
@@ -973,6 +973,9 @@ bool XineStream::event(QEvent *ev)
                 m_currentTitle = currentTitle;
                 emit titleChanged(m_currentTitle);
             }
+            //Check if the MetaData needs to be updated, bug#199327.  -- klondike
+            getStreamInfo();
+            updateMetaData();
         }
         return true;
     case Event::Error: