QMediaPlayer never changes status to "Stopped" automatically

Bug #1320008 reported by Tiago Salem Herrmann
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Media Hub
Fix Released
High
Jim Hodapp
qtubuntu-media
Fix Released
High
Jim Hodapp
qtubuntu-media (Ubuntu)
Fix Released
Undecided
Jim Hodapp

Bug Description

In telephony-service-indicator we noticed that QMediaPlayer never goes into Stopped mode once the stream reaches its end.
As a workaround we are doing the following():

if (mediaPlayer.duration() == mediaPlayer.position()) {
    mediaPlayer.stop();
}

if (mediaPlayer.state() == QMediaPlayer::StoppedState) {
....
}

Not sure if related, but we noticed that calling stop() in a QMediaPlayer that is already stopped and that uses a playlist causes it to start playing again. As a workaround we are clearing the playlist before calling stop().

These two bugs started to happen at the same time last week.
For now we added those workarounds to telephony-service here: https://code.launchpad.net/~tiagosh/telephony-service/fix-indicator-bugs/+merge/219607

Tags: rtm14

Related branches

Revision history for this message
Jim Hodapp (jhodapp) wrote :

I'm curious if you try to use pause() instead of stop, do you get the desired behavior that you're looking for?

Changed in media-hub:
assignee: nobody → Jim Hodapp (jhodapp)
Changed in qtubuntu-media:
assignee: nobody → Jim Hodapp (jhodapp)
Revision history for this message
Tiago Salem Herrmann (tiagosh) wrote :

Yes, calling pause() works.

I am attaching a simple test project that reproduces the issue on the phone.

Revision history for this message
Tiago Salem Herrmann (tiagosh) wrote :

Also, setting the playlist playback mode to Loop does not work anymore.

Bill Filler (bfiller)
Changed in media-hub:
importance: Undecided → High
Changed in qtubuntu-media:
importance: Undecided → High
tags: added: rtm14
Jim Hodapp (jhodapp)
Changed in media-hub:
status: New → In Progress
Changed in qtubuntu-media:
status: New → In Progress
Jim Hodapp (jhodapp)
Changed in qtubuntu-media (Ubuntu):
status: New → In Progress
assignee: nobody → Jim Hodapp (jhodapp)
Changed in media-hub:
status: In Progress → Fix Committed
Changed in qtubuntu-media (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package qtubuntu-media - 0.7.1+14.10.20140604-0ubuntu1

---------------
qtubuntu-media (0.7.1+14.10.20140604-0ubuntu1) utopic; urgency=low

  [ Jim Hodapp ]
  * Allow the QMediaPlaylist loop=true case to work correctly while
    still keeping compatability with music-app and mediaplayer-app (LP:
    #1320008)
 -- Ubuntu daily release <email address hidden> Wed, 04 Jun 2014 20:34:27 +0000

Changed in qtubuntu-media (Ubuntu):
status: Fix Committed → Fix Released
Jim Hodapp (jhodapp)
Changed in media-hub:
status: Fix Committed → Fix Released
Changed in qtubuntu-media:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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