Unreviewed build failure; update MediaPlayerPrivateAVFFoundationCF::seekToTime after...
authorbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 14 Nov 2013 20:10:36 +0000 (20:10 +0000)
committerbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 14 Nov 2013 20:10:36 +0000 (20:10 +0000)
After r159208, seekToTime takes tolerance parameters.

Patch by Jer Noble <jer.noble@apple.com> on 2013-11-13

* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
(WebCore::MediaPlayerPrivateAVFoundationCF::seekToTime):
(WebCore::AVFWrapper::seekToTime):
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@159302 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp
Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h

index 335fcf85867b582016b14989049fff69ad235438..f327e1530068e08c0720ae3bc228e5b76a9dc663 100644 (file)
@@ -1,3 +1,14 @@
+2013-11-13  Jer Noble  <jer.noble@apple.com>
+
+        Unreviewed build failure; update MediaPlayerPrivateAVFFoundationCF::seekToTime after r159208.
+
+        After r159208, seekToTime takes tolerance parameters.
+
+        * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
+        (WebCore::MediaPlayerPrivateAVFoundationCF::seekToTime):
+        (WebCore::AVFWrapper::seekToTime):
+        * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h:
+
 2013-11-14  Beth Dakin  <bdakin@apple.com>
 
         Add a new mode where fixed elements don't constrain their positions during a
index 3582510a3af51fd10d21fec122ab5c971506d5bf..90ed705d8b164460885824681a3c825e4fdfaf8a 100644 (file)
@@ -107,7 +107,7 @@ public:
     void checkPlayability();
     void beginLoadingMetadata();
     
-    void seekToTime(float);
+    void seekToTime(double, double, double);
     void updateVideoLayerGravity();
 
     void setCurrentTrack(InbandTextTrackPrivateAVF*);
@@ -554,14 +554,14 @@ float MediaPlayerPrivateAVFoundationCF::currentTime() const
     return 0;
 }
 
-void MediaPlayerPrivateAVFoundationCF::seekToTime(double time)
+void MediaPlayerPrivateAVFoundationCF::seekToTime(double time, double negativeTolerance, double positiveTolerance)
 {
     if (!m_avfWrapper)
         return;
     
     // seekToTime generates several event callbacks, update afterwards.
     setDelayCallbacks(true);
-    m_avfWrapper->seekToTime(time);
+    m_avfWrapper->seekToTime(time, negativeTolerance, positiveTolerance);
     setDelayCallbacks(false);
 }
 
@@ -1516,11 +1516,13 @@ void AVFWrapper::seekCompletedCallback(AVCFPlayerItemRef, Boolean finished, void
     self->m_owner->scheduleMainThreadNotification(MediaPlayerPrivateAVFoundation::Notification::SeekCompleted, static_cast<bool>(finished));
 }
 
-void AVFWrapper::seekToTime(float time)
+void AVFWrapper::seekToTime(double time, double negativeTolerance, double positiveTolerance)
 {
     ASSERT(avPlayerItem());
-    AVCFPlayerItemSeekToTimeWithToleranceAndCompletionCallback(avPlayerItem(), CMTimeMakeWithSeconds(time, 600),
-        kCMTimeZero, kCMTimeZero, &seekCompletedCallback, callbackContext());
+    CMTime cmTime = CMTimeMakeWithSeconds(time, 600);
+    CMTime cmBefore = CMTimeMakeWithSeconds(negativeTolerance, 600);
+    CMTime cmAfter = CMTimeMakeWithSeconds(positiveTolerance, 600);
+    AVCFPlayerItemSeekToTimeWithToleranceAndCompletionCallback(avPlayerItem(), cmTime, cmBefore, cmAfter, &seekCompletedCallback, callbackContext());
 }
 
 #if HAVE(AVFOUNDATION_MEDIA_SELECTION_GROUP) && HAVE(AVFOUNDATION_LEGIBLE_OUTPUT_SUPPORT)
index c40dff7ab852f13cf61b52664de205deec0019b8..279e582b16f7dc5409c573066ceb68551bc7abef 100644 (file)
@@ -76,7 +76,7 @@ private:
     virtual void checkPlayability();
     virtual void updateRate();
     virtual float rate() const;
-    virtual void seekToTime(double time);
+    virtual void seekToTime(double time, double negativeTolerance, double positiveTolerance);
     virtual unsigned totalBytes() const;
     virtual PassRefPtr<TimeRanges> platformBufferedTimeRanges() const;
     virtual double platformMinTimeSeekable() const;