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

Changeset 223182 in webkit


Ignore:
Timestamp:
Oct 11, 2017, 9:09:26 AM (9 years ago)
Author:
jmarcell@apple.com
Message:

Cherry-pick r221937. rdar://problem/34893195

Location:
branches/safari-604-branch/Source/WebCore
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/safari-604-branch/Source/WebCore/ChangeLog

    r223181 r223182  
     12017-10-10  Jason Marcell  <jmarcell@apple.com>
     2
     3        Cherry-pick r221937. rdar://problem/34893195
     4
     5    2017-09-12  Jer Noble  <jer.noble@apple.com>
     6
     7            [MSE] Don't increase the reported totalFrameDelay for non-displayed frames (or frames coming in while paused).
     8            https://bugs.webkit.org/show_bug.cgi?id=175900
     9
     10            Reviewed by Eric Carlson.
     11
     12            When seeking to a specific time, the decompression session necessarily needs to be fed samples from before that
     13            time (i.e., all samples from the previous I-frame forward). These shouldn't contribute to the "total frame
     14            delay" metric. Neither should samples delivered when the video is paused (like, during seeking), as a frame can't
     15            be "late" if time is not moving forward.
     16
     17            * platform/graphics/cocoa/WebCoreDecompressionSession.mm:
     18            (WebCore::WebCoreDecompressionSession::handleDecompressionOutput):
     19            * platform/cf/CoreMediaSoftLink.cpp:
     20            * platform/cf/CoreMediaSoftLink.h:
     21
    1222017-10-10  Jason Marcell  <jmarcell@apple.com>
    223
  • branches/safari-604-branch/Source/WebCore/platform/cf/CoreMediaSoftLink.cpp

    r223105 r223182  
    103103SOFT_LINK_FUNCTION_FOR_SOURCE(WebCore, CoreMedia, CMTimebaseCreateWithMasterClock, OSStatus, (CFAllocatorRef allocator, CMClockRef masterClock, CMTimebaseRef *timebaseOut), (allocator, masterClock, timebaseOut))
    104104SOFT_LINK_FUNCTION_FOR_SOURCE(WebCore, CoreMedia, CMTimebaseGetTime, CMTime, (CMTimebaseRef timebase), (timebase))
     105SOFT_LINK_FUNCTION_FOR_SOURCE(WebCore, CoreMedia, CMTimebaseGetRate, Float64, (CMTimebaseRef timebase), (timebase))
    105106SOFT_LINK_FUNCTION_FOR_SOURCE(WebCore, CoreMedia, CMTimebaseSetRate, OSStatus, (CMTimebaseRef timebase, Float64 rate), (timebase, rate))
    106107SOFT_LINK_FUNCTION_FOR_SOURCE(WebCore, CoreMedia, CMTimebaseSetTime, OSStatus, (CMTimebaseRef timebase, CMTime time), (timebase, time))
  • branches/safari-604-branch/Source/WebCore/platform/cf/CoreMediaSoftLink.h

    r223105 r223182  
    164164SOFT_LINK_FUNCTION_FOR_HEADER(WebCore, CoreMedia, CMTimebaseGetTime, CMTime, (CMTimebaseRef timebase), (timebase))
    165165#define CMTimebaseGetTime softLink_CoreMedia_CMTimebaseGetTime
     166SOFT_LINK_FUNCTION_FOR_HEADER(WebCore, CoreMedia, CMTimebaseGetRate, Float64, (CMTimebaseRef timebase), (timebase))
     167#define CMTimebaseGetRate softLink_CoreMedia_CMTimebaseGetRate
    166168SOFT_LINK_FUNCTION_FOR_HEADER(WebCore, CoreMedia, CMTimebaseSetRate, OSStatus, (CMTimebaseRef timebase, Float64 rate), (timebase, rate))
    167169#define CMTimebaseSetRate softLink_CoreMedia_CMTimebaseSetRate
  • branches/safari-604-branch/Source/WebCore/platform/graphics/cocoa/WebCoreDecompressionSession.mm

    r223120 r223182  
    280280    }
    281281
    282     auto currentTime = CMTimebaseGetTime(m_timebase.get());
    283     if (m_timebase && CMTimeCompare(presentationTimeStamp, currentTime) < 0)
    284         m_totalFrameDelay += toMediaTime(CMTimeSubtract(currentTime, presentationTimeStamp));
     282    if (displaying && m_timebase) {
     283        auto currentTime = CMTimebaseGetTime(m_timebase.get());
     284        auto currentRate = CMTimebaseGetRate(m_timebase.get());
     285        if (currentRate > 0 && CMTimeCompare(presentationTimeStamp, currentTime) < 0)
     286            m_totalFrameDelay += toMediaTime(CMTimeSubtract(currentTime, presentationTimeStamp));
     287    }
    285288
    286289    dispatch_async(m_enqueingQueue.get(), [protectedThis = makeRefPtr(this), status, imageSampleBuffer = adoptCF(rawImageSampleBuffer), infoFlags, displaying] {
Note: See TracChangeset for help on using the changeset viewer.