Commit 5dc0a1e0 authored by jer.noble@apple.com's avatar jer.noble@apple.com

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

        Reviewed by Darin Adler.

        AVF: MediaPlayerPrivateAVFoundationObjC should not use -[AVPlayerItem isPlaybackBufferEmpty]
        https://bugs.webkit.org/show_bug.cgi?id=57982

        Query our cached loaded time array instead of asking AVPlayerItem if its buffer is empty.

        * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.mm:
        (WebCore::MediaPlayerPrivateAVFoundationObjC::playerItemStatus):

git-svn-id: svn://svn.chromium.org/blink/trunk@83135 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 7ef6838a
2011-04-06 Jer Noble <jer.noble@apple.com>
Reviewed by Darin Adler.
AVF: MediaPlayerPrivateAVFoundationObjC should not use -[AVPlayerItem isPlaybackBufferEmpty]
https://bugs.webkit.org/show_bug.cgi?id=57982
Query our cached loaded time array instead of asking AVPlayerItem if its buffer is empty.
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::playerItemStatus):
2011-04-06 Jer Noble <jer.noble@apple.com>
Reviewed by Eric Carlson.
......@@ -327,9 +327,9 @@ MediaPlayerPrivateAVFoundation::ItemStatus MediaPlayerPrivateAVFoundationObjC::p
return MediaPlayerPrivateAVFoundation::MediaPlayerAVPlayerItemStatusFailed;
if ([m_avPlayerItem.get() isPlaybackLikelyToKeepUp])
return MediaPlayerPrivateAVFoundation::MediaPlayerAVPlayerItemStatusPlaybackLikelyToKeepUp;
if ([m_avPlayerItem.get() isPlaybackBufferFull])
if (buffered()->contain(duration()))
return MediaPlayerPrivateAVFoundation::MediaPlayerAVPlayerItemStatusPlaybackBufferFull;
if ([m_avPlayerItem.get() isPlaybackBufferEmpty])
if (buffered()->contain(currentTime()))
return MediaPlayerPrivateAVFoundation::MediaPlayerAVPlayerItemStatusPlaybackBufferEmpty;
return MediaPlayerPrivateAVFoundation::MediaPlayerAVPlayerItemStatusReadyToPlay;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment