Duration of track is zero/unchanged when source is set

Bug #1494031 reported by Andrew Hayzen
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical System Image
Triaged
High
John McAleely
media-hub (Ubuntu)
Triaged
High
Unassigned
media-hub (Ubuntu RTM)
Triaged
High
Unassigned

Bug Description

Duration of track is zero/unchanged when source is set, it only changes when the track starts playing.

This means, for example, in the music app if you add to the queue a track, then go to the now playing page, it shows 00:00 for the position and duration. Which then causes the seek bar not to function until the track is played.

Instead when the source is set, could the gstreamer pipeline not be created in a paused state, so that the duration can then be exposed to the player.

Jim Hodapp (jhodapp)
no longer affects: media-hub
Changed in canonical-devices-system-image:
assignee: nobody → John McAleely (john.mcaleely)
importance: Undecided → High
milestone: none → ww02-2016
status: New → Confirmed
tags: added: bgplaylist
Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

I confirm it is still an issue with krillin rc-proposed 228

Changed in canonical-devices-system-image:
milestone: ww02-2016 → ww08-2016
status: Confirmed → Triaged
tags: added: testcase
Changed in canonical-devices-system-image:
milestone: ww08-2016 → backlog
Revision history for this message
Jim Hodapp (jhodapp) wrote :

Can you verify if this still occurs?

Changed in canonical-devices-system-image:
status: Triaged → Incomplete
Changed in media-hub (Ubuntu):
status: New → Incomplete
Changed in media-hub (Ubuntu RTM):
status: New → Incomplete
Changed in qtubuntu-media (Ubuntu):
status: New → Incomplete
Changed in qtubuntu-media (Ubuntu RTM):
status: New → Incomplete
Revision history for this message
Pat McGowan (pat-mcgowan) wrote :

Yes I just ht this with something I was doing in sound settings

Changed in canonical-devices-system-image:
status: Incomplete → Confirmed
Revision history for this message
Andrew Hayzen (ahayzen) wrote :

Note we had a workaround for this within the music-app [0], this works by running a query for the duration after the source has been set. I wonder if this can be done internally in media-hub/qtubuntu-media and once a valid value is found for it to be emitted up to the QML layer.

0 - http://bazaar.launchpad.net/~music-app-dev/music-app/trunk/view/head:/app/components/NowPlayingFullView.qml#L266

Jim Hodapp (jhodapp)
Changed in canonical-devices-system-image:
status: Confirmed → Triaged
Changed in media-hub (Ubuntu):
status: Incomplete → Triaged
Changed in media-hub (Ubuntu RTM):
status: Incomplete → Triaged
no longer affects: qtubuntu-media (Ubuntu)
no longer affects: qtubuntu-media (Ubuntu RTM)
Revision history for this message
Pat McGowan (pat-mcgowan) wrote :

the onDurationChanged signal does work at least on an Audio component I tried. Its called immediately after play starts, before you even hear anything.
Unfortunately that doesn't help with what I am trying to do.

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

Basically what we need to do is to see if GStreamer can update this property/signal when prerolling which should happen when playbin is first told to open a uri.

Revision history for this message
Pat McGowan (pat-mcgowan) wrote :

@jim could we also just read it from the metadata prior to playback? I would think we already are somewhere.

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

@Pat: No, metadata and everything about a stream is not filled in until you transition the GStreamer playbin pipeline to the playing state. So there's no advantage to reading it from the metadata fields vs the explicit duration field.

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

Adding a note of something to try to fix this bug. When a new media-hub Player instance is created and media has been set on it, try placing the Player state into the paused state. According to this example [1], this should be enough to get metadata out of it. Also, for players that aren't played immediately by the user when first created, this would give the impression of playback starting more quickly.

[1] https://gstreamer.freedesktop.org/data/doc/gstreamer/head/manual/html/chapter-metadata.html

Changed in media-hub (Ubuntu):
importance: Undecided → High
Changed in media-hub (Ubuntu RTM):
importance: Undecided → High
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.