Bug 126692

Summary: [GStreamer] Playback rate is not set when pipeline is not ready.
Product: WebKit Reporter: Piotr Grad <piotr.grad>
Component: MediaAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: cgarcia, commit-queue, eric.carlson, glenn, gustavo, jer.noble, menard, mrobinson, pnormand
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch none

Description Piotr Grad 2014-01-09 06:44:15 PST
When pipeline is not in paused or playing state, setRate method just return instead of postphoning requested rate. Also HTMLMediaElement is not notified about changed rate when:
1. there is error,
2. player is not able to change playback rate.
Already working on patch. Will be proposed soon.
Comment 1 Piotr Grad 2014-01-09 06:59:38 PST
Created attachment 220727 [details]
Patch
Comment 2 Piotr Grad 2014-01-10 03:18:45 PST
Created attachment 220827 [details]
Patch
Comment 3 Eric Carlson 2014-01-11 17:04:21 PST
Comment on attachment 220827 [details]
Patch

This looks fine to me, but I know very little about GStreamer so I would prefer if someone who does (pnormand?) gives it an r+
Comment 4 Philippe Normand 2014-01-11 18:21:17 PST
Comment on attachment 220827 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=220827&action=review

> Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:638
> +    if (m_changingRate) {

Can this be changed to an early return please?

> Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:1473
> +    if (getStateResult == GST_STATE_CHANGE_SUCCESS && (state == GST_STATE_PAUSED || state == GST_STATE_PLAYING)) {

the second test could be simplified to state >= GST_STATE_PAUSED
Comment 5 Piotr Grad 2014-01-13 03:38:28 PST
Created attachment 221024 [details]
Patch
Comment 6 WebKit Commit Bot 2014-01-14 10:54:58 PST
Comment on attachment 221024 [details]
Patch

Clearing flags on attachment: 221024

Committed r161984: <http://trac.webkit.org/changeset/161984>
Comment 7 WebKit Commit Bot 2014-01-14 10:55:02 PST
All reviewed patches have been landed.  Closing bug.