Add support for MediaPlayer::minTimeSeekable()
authorjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 12 Apr 2013 18:39:37 +0000 (18:39 +0000)
committerjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 12 Apr 2013 18:39:37 +0000 (18:39 +0000)
commit4ea87720aa7b5223eb8d59847b0290acdd844a64
treebdc4f58ad97a352776b356acd858748a7da9d548
parent3e0179ae36e28ad51944442934100e9db4126b6f
Add support for MediaPlayer::minTimeSeekable()
https://bugs.webkit.org/show_bug.cgi?id=114484

Reviewed by Eric Carlson.

Plumb a new minTimeSeekable() method through MediaPlayer and
MediaPlayerPrivate and use this new method in the existing
HTMLMediaElement::minTimeSeekable() method.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::minTimeSeekable): Pass to MediaPlayer.
* platform/graphics/MediaPlayer.cpp:
(WebCore::NullMediaPlayerPrivate::minTimeSeekable): Return 0.
(WebCore::MediaPlayer::minTimeSeekable): Pass to MediaPlayerPrivate.
* platform/graphics/MediaPlayer.h:
* platform/graphics/MediaPlayerPrivate.h:
(WebCore::MediaPlayerPrivateInterface::seekable): Define in terms of
    minTimeSeekable()
(WebCore::MediaPlayerPrivateInterface::minTimeSeekable): Default to 0.
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
(WebCore::MediaPlayerPrivateAVFoundation::MediaPlayerPrivateAVFoundation):
    Initialize new m_cachedMinTimeSeekable ivar.
(WebCore::MediaPlayerPrivateAVFoundation::maxTimeSeekableDouble):
    Renamed from maxTimeSeekable().
(WebCore::MediaPlayerPrivateAVFoundation::minTimeSeekable): Added.
    Cache value of platformMinTimeSeekable().
(WebCore::MediaPlayerPrivateAVFoundation::seekableTimeRangesChanged):
    Reset m_cachedMinTimeSeekable.
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::seekToTime): float -> double.
(WebCore::MediaPlayerPrivateAVFoundationObjC::platformMinTimeSeekable):
    Added. Retrieve the lowest value from -[m_playerItem seekableTimeRanges].
(WebCore::MediaPlayerPrivateAVFoundationObjC::platformMaxTimeSeekable):
    float -> double.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@148291 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/html/HTMLMediaElement.cpp
Source/WebCore/platform/graphics/MediaPlayer.cpp
Source/WebCore/platform/graphics/MediaPlayer.h
Source/WebCore/platform/graphics/MediaPlayerPrivate.h
Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp
Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h
Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h
Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm