Title: [179843] trunk/Source/WebCore
Revision
179843
Author
[email protected]
Date
2015-02-09 14:57:14 -0800 (Mon, 09 Feb 2015)

Log Message

[Mac] Disable the currentTime estimation code in HTMLMediaElement for Yosemite+
https://bugs.webkit.org/show_bug.cgi?id=141399

Reviewed by Eric Carlson.

Apparenty -[AVPlayer rate] means different things for HLS and progressive content; for progressive,
the -rate is the actual rate of playback. For HLS, the -rate is the requested rate, and will return
the requested value even if time is not progressing.

We added the currentTime estimation engine because asking AVFoundation for its -currentTime used to
be expensive, but we've been assured that in recent iOS and OS X releases, -currentTime should be
very fast. That, in combination with the HLS behavior of -rate and how it breaks the currentTime
estimation, means we should probably turn it off for iOS and Yosemite.

* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
(WebCore::MediaPlayerPrivateAVFoundationObjC::maximumDurationToCacheMediaTime): Move implementation to .mm.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::maximumDurationToCacheMediaTime): Disable on iOS and >=10.10.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (179842 => 179843)


--- trunk/Source/WebCore/ChangeLog	2015-02-09 20:50:15 UTC (rev 179842)
+++ trunk/Source/WebCore/ChangeLog	2015-02-09 22:57:14 UTC (rev 179843)
@@ -1,3 +1,24 @@
+2015-02-09  Jer Noble  <[email protected]>
+
+        [Mac] Disable the currentTime estimation code in HTMLMediaElement for Yosemite+
+        https://bugs.webkit.org/show_bug.cgi?id=141399
+
+        Reviewed by Eric Carlson.
+
+        Apparenty -[AVPlayer rate] means different things for HLS and progressive content; for progressive,
+        the -rate is the actual rate of playback. For HLS, the -rate is the requested rate, and will return
+        the requested value even if time is not progressing.
+
+        We added the currentTime estimation engine because asking AVFoundation for its -currentTime used to
+        be expensive, but we've been assured that in recent iOS and OS X releases, -currentTime should be
+        very fast. That, in combination with the HLS behavior of -rate and how it breaks the currentTime
+        estimation, means we should probably turn it off for iOS and Yosemite.
+
+        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
+        (WebCore::MediaPlayerPrivateAVFoundationObjC::maximumDurationToCacheMediaTime): Move implementation to .mm.
+        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
+        (WebCore::MediaPlayerPrivateAVFoundationObjC::maximumDurationToCacheMediaTime): Disable on iOS and >=10.10.
+
 2015-02-07  Roger Fong  <[email protected]>
 
         WebGL 2: Texture call format, internal format, and type validation.

Modified: trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h (179842 => 179843)


--- trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h	2015-02-09 20:50:15 UTC (rev 179842)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h	2015-02-09 22:57:14 UTC (rev 179843)
@@ -167,7 +167,7 @@
 
     virtual bool supportsAcceleratedRendering() const { return true; }
     virtual MediaTime mediaTimeForTimeValue(const MediaTime&) const;
-    virtual double maximumDurationToCacheMediaTime() const { return 5; }
+    virtual double maximumDurationToCacheMediaTime() const;
 
     virtual void createAVPlayer();
     virtual void createAVPlayerItem();

Modified: trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm (179842 => 179843)


--- trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm	2015-02-09 20:50:15 UTC (rev 179842)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm	2015-02-09 22:57:14 UTC (rev 179843)
@@ -1719,6 +1719,15 @@
     return timeValue;
 }
 
+double MediaPlayerPrivateAVFoundationObjC::maximumDurationToCacheMediaTime() const
+{
+#if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1010
+    return 0;
+#else
+    return 5;
+#endif
+}
+
 void MediaPlayerPrivateAVFoundationObjC::updateVideoLayerGravity()
 {
     if (!m_videoLayer)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to