Changeset 83134 in webkit


Ignore:
Timestamp:
Apr 6, 2011 8:31:55 PM (13 years ago)
Author:
jer.noble@apple.com
Message:

2011-04-06 Jer Noble <jer.noble@apple.com>

Reviewed by Eric Carlson.

MediaPlayerPrivateAVFoundation does not change rate due to setRate().
https://bugs.webkit.org/show_bug.cgi?id=57919

  • media/video-set-rate-from-pause-expected.txt: Added.
  • media/video-set-rate-from-pause.html: Added.

2011-04-06 Jer Noble <jer.noble@apple.com>

Reviewed by Eric Carlson.

MediaPlayerPrivateAVFoundation does not change rate due to setRate().
https://bugs.webkit.org/show_bug.cgi?id=57919

Test: media/video-set-rate-from-pause.html

The base class of MediaPlayerPrivateAVFoundation does not actually change the rate
of the media; instead a subclass must do that work. So when setRate() is called,
inform a subclass through a new pure virtual updateRate() function that there's
work to be done.

  • platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp: (WebCore::MediaPlayerPrivateAVFoundation::setRate): Call updateRate()
  • platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
  • platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.h:
  • platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.mm: (WebCore::MediaPlayerPrivateAVFoundationObjC::updateRate): Added. Set the requested rate.
Location:
trunk
Files:
2 added
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r83132 r83134  
     12011-04-06  Jer Noble  <jer.noble@apple.com>
     2
     3        Reviewed by Eric Carlson.
     4
     5        MediaPlayerPrivateAVFoundation does not change rate due to setRate().
     6        https://bugs.webkit.org/show_bug.cgi?id=57919
     7
     8        * media/video-set-rate-from-pause-expected.txt: Added.
     9        * media/video-set-rate-from-pause.html: Added.
     10
    1112011-04-06  Dan Bernstein  <mitz@apple.com>
    212
  • trunk/Source/WebCore/ChangeLog

    r83133 r83134  
     12011-04-06  Jer Noble  <jer.noble@apple.com>
     2
     3        Reviewed by Eric Carlson.
     4
     5        MediaPlayerPrivateAVFoundation does not change rate due to setRate().
     6        https://bugs.webkit.org/show_bug.cgi?id=57919
     7
     8        Test: media/video-set-rate-from-pause.html
     9
     10        The base class of MediaPlayerPrivateAVFoundation does not actually change the rate
     11        of the media; instead a subclass must do that work.  So when setRate() is called,
     12        inform a subclass through a new pure virtual updateRate() function that there's
     13        work to be done.
     14
     15        * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
     16        (WebCore::MediaPlayerPrivateAVFoundation::setRate): Call updateRate()
     17        * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
     18        * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.h:
     19        * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.mm:
     20        (WebCore::MediaPlayerPrivateAVFoundationObjC::updateRate): Added.  Set the requested rate.
     21
    1222011-04-06  Dai Mikurube  <dmikurube@chromium.org>
    223
  • trunk/Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp

    r82167 r83134  
    286286    LOG(Media, "MediaPlayerPrivateAVFoundation::setRate(%p) - seting to %f", this, rate);
    287287    m_requestedRate = rate;
     288
     289    updateRate();
    288290}
    289291
  • trunk/Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h

    r82167 r83134  
    171171
    172172    virtual void checkPlayability() = 0;
     173    virtual void updateRate() = 0;
    173174    virtual float rate() const = 0;
    174175    virtual void seekToTime(float time) = 0;
  • trunk/Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.h

    r82165 r83134  
    9494
    9595    virtual void checkPlayability();
     96    virtual void updateRate();
    9697    virtual float rate() const;
    9798    virtual void seekToTime(float time);
  • trunk/Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.mm

    r82165 r83134  
    438438}
    439439
     440void MediaPlayerPrivateAVFoundationObjC::updateRate()
     441{
     442    setDelayCallbacks(true);
     443    [m_avPlayer.get() setRate:requestedRate()];
     444    setDelayCallbacks(false);
     445}
     446
    440447float MediaPlayerPrivateAVFoundationObjC::rate() const
    441448{
Note: See TracChangeset for help on using the changeset viewer.