⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 179843 in webkit


Ignore:
Timestamp:
Feb 9, 2015, 2:57:14 PM (12 years ago)
Author:
jer.noble@apple.com
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.

Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r179842 r179843  
     12015-02-09  Jer Noble  <jer.noble@apple.com>
     2
     3        [Mac] Disable the currentTime estimation code in HTMLMediaElement for Yosemite+
     4        https://bugs.webkit.org/show_bug.cgi?id=141399
     5
     6        Reviewed by Eric Carlson.
     7
     8        Apparenty -[AVPlayer rate] means different things for HLS and progressive content; for progressive,
     9        the -rate is the actual rate of playback. For HLS, the -rate is the requested rate, and will return
     10        the requested value even if time is not progressing.
     11
     12        We added the currentTime estimation engine because asking AVFoundation for its -currentTime used to
     13        be expensive, but we've been assured that in recent iOS and OS X releases, -currentTime should be
     14        very fast. That, in combination with the HLS behavior of -rate and how it breaks the currentTime
     15        estimation, means we should probably turn it off for iOS and Yosemite.
     16
     17        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
     18        (WebCore::MediaPlayerPrivateAVFoundationObjC::maximumDurationToCacheMediaTime): Move implementation to .mm.
     19        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
     20        (WebCore::MediaPlayerPrivateAVFoundationObjC::maximumDurationToCacheMediaTime): Disable on iOS and >=10.10.
     21
    1222015-02-07  Roger Fong  <roger_fong@apple.com>
    223
  • trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h

    r179641 r179843  
    168168    virtual bool supportsAcceleratedRendering() const { return true; }
    169169    virtual MediaTime mediaTimeForTimeValue(const MediaTime&) const;
    170     virtual double maximumDurationToCacheMediaTime() const { return 5; }
     170    virtual double maximumDurationToCacheMediaTime() const;
    171171
    172172    virtual void createAVPlayer();
  • trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm

    r179784 r179843  
    17201720}
    17211721
     1722double MediaPlayerPrivateAVFoundationObjC::maximumDurationToCacheMediaTime() const
     1723{
     1724#if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1010
     1725    return 0;
     1726#else
     1727    return 5;
     1728#endif
     1729}
     1730
    17221731void MediaPlayerPrivateAVFoundationObjC::updateVideoLayerGravity()
    17231732{
Note: See TracChangeset for help on using the changeset viewer.