Audio gets confused when playing from source after playing from playlist

Bug #1511029 reported by Albert Astals Cid
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Canonical System Image
Fix Released
High
John McAleely
media-hub (Ubuntu)
Fix Released
High
Alfonso Sanchez-Beato
media-hub (Ubuntu RTM)
Fix Released
High
Alfonso Sanchez-Beato
qtmultimedia-opensource-src (Ubuntu)
Fix Released
High
Alfonso Sanchez-Beato
qtmultimedia-opensource-src (Ubuntu RTM)
Fix Released
High
Alfonso Sanchez-Beato

Bug Description

Can be reproduced with the code from http://paste.ubuntu.com/13008980/

How to reproduce:
 1. Press the red area
 2. Listen to song1.mp3 play
 3. Press the blue area
 4. Notice how song 1 is playing instead of song 2

Note this only happens on the phone, on the desktop all is good.

Tags: bgplaylist

Related branches

Simon Fels (morphis)
Changed in media-hub (Ubuntu RTM):
status: New → Confirmed
status: Confirmed → New
Changed in canonical-devices-system-image:
status: New → Confirmed
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in media-hub (Ubuntu):
status: New → Confirmed
Revision history for this message
Simon Fels (morphis) wrote :

I looked into this and got it reproduced. However it looks for me like this isn't anything wrong in media-hub.

Once I do step 4 I get the following in .cache/upstart/unity8-dash.log:

virtual void AalMediaPlayerControl::setMedia(const QMediaContent&, QIODevice*)

setMedia() media: QUrl( "" )
void QDeclarativeAudio::setPlaylist(QDeclarativePlaylist*)
void QDeclarativeAudio::setSource(const QUrl&)
Calling setMedia
void QMediaPlayer::setMedia(const QMediaContent&, QIODevice*)
virtual void AalMediaPlayerControl::stop()

virtual void AalMediaPlayerControl::setMedia(const QMediaContent&, QIODevice*)

Local file URI: "file:///home/phablet/Music/test.ogg"
setMedia() media: QUrl( "file:///home/phablet/Music/test.ogg" )
virtual QMediaPlayer::MediaStatus AalMediaPlayerControl::mediaStatus() const

virtual QMediaPlayer::MediaStatus AalMediaPlayerControl::mediaStatus() const

virtual QMediaPlayer::MediaStatus AalMediaPlayerControl::mediaStatus() const

Local file URI: "file:///home/phablet/Music/test.ogg"
Setting media to: QUrl( "file:///home/phablet/Music/test.ogg" )
Setting player as current player
virtual void AalMediaPlayerControl::play()

virtual QMediaPlayer::MediaStatus AalMediaPlayerControl::mediaStatus() const

virtual QMediaPlayer::MediaStatus AalMediaPlayerControl::mediaStatus() const

void AalMediaPlayerService::play()
virtual QMediaPlayer::MediaStatus AalMediaPlayerControl::mediaStatus() const

virtual QMediaPlayer::MediaStatus AalMediaPlayerControl::mediaStatus() const

Actually calling m_hubPlayerSession->play()
PlaybackStatusChanged signal arrived via the bus (Status: PlaybackStatus::ready)
PlaybackStatusChanged signal arrived via the bus (Status: PlaybackStatus::paused)
PlaybackStatusChanged signal arrived via the bus (Status: PlaybackStatus::playing)
PlaybackStatusChanged signal arrived via the bus (Status: PlaybackStatus::playing)
PlaybackStatus changed to: "playing"

Where test.ogg is the song I played with step 2. With this its pretty clear that something is loading the wrong track into the media player where we're off to fix anything then. If it is not a problem with how the dash is using QMediaPlayer or QMediaPlaylist then it still could be something in qtmultimedia itself.

description: updated
Changed in media-hub (Ubuntu):
status: Confirmed → Invalid
Changed in media-hub (Ubuntu RTM):
status: New → Invalid
Revision history for this message
Albert Astals Cid (aacid) wrote :

Must be a bug in qtmultimedia then, i've added

console.log("PLAYING")
console.log("audio.source", audio.source != "" ? audio.source : "empty")
console.log("audio.playlist", audio.playlist ? audio.playlist.currentSource : "undefined")

to the play() function in DashAudioPlayer.qml and the output says

qml: PLAYING
qml: audio.source empty
qml: audio.playlist file:///home/phablet/Music/The Gossip/Standing In The Way Of Control/The Gossip - 01 - Fire With Fire.mp3

qml: PLAYING
qml: audio.source file:///home/phablet/Music/The Gossip/Standing In The Way Of Control/The Gossip - 02 - Standing In The Way Of Control.mp3
qml: audio.playlist undefined

but as said on the bug i get the first song to play even if i'm passing the second one.

Revision history for this message
Albert Astals Cid (aacid) wrote :

The full log at http://paste.ubuntu.com/12998027/ the spaces between lines 157 and 175 are to separate before and after i pressed the second play.

Simon Fels (morphis)
Changed in media-hub (Ubuntu):
status: Invalid → New
Changed in media-hub (Ubuntu RTM):
status: Invalid → New
description: updated
Jim Hodapp (jhodapp)
tags: added: bgplaylist
Changed in canonical-devices-system-image:
status: Confirmed → In Progress
Changed in media-hub (Ubuntu):
assignee: nobody → Alfonso Sanchez-Beato (alfonsosanchezbeato)
status: New → In Progress
Changed in media-hub (Ubuntu RTM):
status: New → In Progress
Changed in qtmultimedia-opensource-src (Ubuntu):
status: New → In Progress
Changed in qtmultimedia-opensource-src (Ubuntu RTM):
status: New → In Progress
Changed in media-hub (Ubuntu RTM):
assignee: nobody → Alfonso Sanchez-Beato (alfonsosanchezbeato)
Changed in qtmultimedia-opensource-src (Ubuntu):
assignee: nobody → Alfonso Sanchez-Beato (alfonsosanchezbeato)
Changed in qtmultimedia-opensource-src (Ubuntu RTM):
assignee: nobody → Alfonso Sanchez-Beato (alfonsosanchezbeato)
Jim Hodapp (jhodapp)
Changed in media-hub (Ubuntu):
importance: Undecided → High
Changed in media-hub (Ubuntu RTM):
importance: Undecided → High
Changed in qtmultimedia-opensource-src (Ubuntu):
importance: Undecided → High
Changed in qtmultimedia-opensource-src (Ubuntu RTM):
importance: Undecided → High
Changed in canonical-devices-system-image:
assignee: nobody → John McAleely (john.mcaleely)
importance: Undecided → High
milestone: none → ww46-2015
Revision history for this message
Albert Astals Cid (aacid) wrote :

seems to be fixed with current silo 9

Changed in canonical-devices-system-image:
milestone: ww46-2015 → ww02-2016
Changed in canonical-devices-system-image:
milestone: ww02-2016 → ww46-2015
Changed in canonical-devices-system-image:
milestone: ww46-2015 → ww02-2016
Jim Hodapp (jhodapp)
Changed in media-hub (Ubuntu RTM):
status: In Progress → Fix Committed
Changed in qtmultimedia-opensource-src (Ubuntu RTM):
status: In Progress → Fix Committed
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

This bug was fixed in the package media-hub 4.0.0+15.04.20151118.1-0ubuntu1 in https://launchpad.net/~ci-train-ppa-service/+archive/ubuntu/stable-phone-overlay

---------------

media-hub (4.0.0+15.04.20151118.1-0ubuntu1) vivid; urgency=medium

  [ Jim Hodapp ]
  * Added move_track and various fixes for TrackList.
  * Major bump for new TrackList API changes.

  [ Alfonso Sanchez-Beato ]
  * Make sure our iterator for the current track points to the right
    place when (un)shuffling (LP #1510219). Fix crash when client tries
    to set the player for a non-existing key. Do not add empty URIs to
    the list (LP: #1511029). (LP: #1511073, #1511385, #1510219,
    #1510227, #1511029)

 -- Jim Hodapp <email address hidden> Wed, 18 Nov 2015 18:36:18 +0000

Changed in media-hub (Ubuntu RTM):
status: Fix Committed → Fix Released
Changed in canonical-devices-system-image:
status: In Progress → Fix Committed
Changed in canonical-devices-system-image:
status: Fix Committed → Fix Released
Changed in qtmultimedia-opensource-src (Ubuntu RTM):
status: Fix Committed → Fix Released
Changed in qtmultimedia-opensource-src (Ubuntu):
status: In Progress → Fix Released
Changed in media-hub (Ubuntu):
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.