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

Changeset 282193 in webkit


Ignore:
Timestamp:
Sep 8, 2021, 11:49:35 PM (5 years ago)
Author:
youenn@apple.com
Message:

Add video metrics logging to LocalSampleBufferDisplayLayer
​https://bugs.webkit.org/show_bug.cgi?id=229930

Reviewed by Eric Carlson.

Source/WebCore:

No change of behavior.

  • platform/graphics/avfoundation/objc/LocalSampleBufferDisplayLayer.mm:

(WebCore::LocalSampleBufferDisplayLayer::enqueueSampleBuffer):
Log every minute AVSBDL metrics, which can help to evaluate video freeze issues.

Source/WebCore/PAL:

  • PAL/pal/spi/cocoa/AVFoundationSPI.h:
Location:
trunk/Source/WebCore
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r282192 r282193  
     12021-09-08  Youenn Fablet  <youenn@apple.com>
     2
     3        Add video metrics logging to LocalSampleBufferDisplayLayer
     4        https://bugs.webkit.org/show_bug.cgi?id=229930
     5
     6        Reviewed by Eric Carlson.
     7
     8        No change of behavior.
     9
     10        * platform/graphics/avfoundation/objc/LocalSampleBufferDisplayLayer.mm:
     11        (WebCore::LocalSampleBufferDisplayLayer::enqueueSampleBuffer):
     12        Log every minute AVSBDL metrics, which can help to evaluate video freeze issues.
     13
    1142021-09-08  Kimmo Kinnunen  <kkinnunen@apple.com>
    215
  • trunk/Source/WebCore/PAL/ChangeLog

    r282157 r282193  
     12021-09-08  Youenn Fablet  <youenn@apple.com>
     2
     3        Add video metrics logging to LocalSampleBufferDisplayLayer
     4        https://bugs.webkit.org/show_bug.cgi?id=229930
     5
     6        Reviewed by Eric Carlson.
     7
     8        * PAL/pal/spi/cocoa/AVFoundationSPI.h:
     9
    1102021-09-08  Per Arne  <pvollan@apple.com>
    211
  • trunk/Source/WebCore/PAL/pal/spi/cocoa/AVFoundationSPI.h

    r279119 r282193  
    372372@property (nonatomic, readonly) unsigned long numberOfCorruptedVideoFrames;
    373373@property (nonatomic, readonly) unsigned long numberOfDisplayCompositedVideoFrames;
     374@property (nonatomic, readonly) unsigned long numberOfNonDisplayCompositedVideoFrames;
    374375@property (nonatomic, readonly) double totalFrameDelay;
    375376@end
    … …  
    377378@interface AVVideoPerformanceMetrics (AVVideoPerformanceMetricsDisplayCompositedVideoFrames)
    378379@property (nonatomic, readonly) unsigned long numberOfDisplayCompositedVideoFrames;
     380@property (nonatomic, readonly) unsigned long numberOfNonDisplayCompositedVideoFrames;
    379381@end
    380382#endif
  • trunk/Source/WebCore/platform/graphics/avfoundation/objc/LocalSampleBufferDisplayLayer.mm

    r280731 r282193  
    4242#import <wtf/cf/TypeCastsCF.h>
    4343
     44#import <pal/spi/cocoa/AVFoundationSPI.h>
     45
    4446#import <pal/cocoa/AVFoundationSoftLink.h>
    4547
    … …  
    340342
    341343#if !RELEASE_LOG_DISABLED
     344    constexpr size_t frameCountPerLog = 1800; // log every minute at 30 fps
     345    if (!(m_frameRateMonitor.frameCount() % frameCountPerLog)) {
     346        if (auto* metrics = [m_sampleBufferDisplayLayer videoPerformanceMetrics])
     347            RELEASE_LOG(WebRTC, "LocalSampleBufferDisplayLayer (%{public}s) metrics, total=%lu, dropped=%lu, corrupted=%lu, display-composited=%lu, non-display-composited=%lu (pending=%lu)", m_logIdentifier.utf8().data(), metrics.totalNumberOfVideoFrames, metrics.numberOfDroppedVideoFrames, metrics.numberOfCorruptedVideoFrames, metrics.numberOfDisplayCompositedVideoFrames, metrics.numberOfNonDisplayCompositedVideoFrames, m_pendingVideoSampleQueue.size());
     348    }
    342349    m_frameRateMonitor.update();
    343350#endif
Note: See TracChangeset for help on using the changeset viewer.