Add support for reporting "display composited video frames" through the VideoPlayback...
authorjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 5 Oct 2018 01:11:22 +0000 (01:11 +0000)
committerjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 5 Oct 2018 01:11:22 +0000 (01:11 +0000)
commit5b55aca3d58f1177146fe46a78fc8d265174626a
tree9f3dfccb5d28ed8b85780d6f440df05caed0477c
parentb81252948c88183754e3b963be49147a1474ab6b
Add support for reporting "display composited video frames" through the VideoPlaybackQuality object.
https://bugs.webkit.org/show_bug.cgi?id=190266

Reviewed by Eric Carlson.

Source/WebCore:

Test: TestWebKitAPI.VideoQualityDisplayCompositing

Modify VideoPlaybackQuality to take a VideoPlaybackQualityMetrics object in its
constructor (rather than individual fields). Add a new setting to control visibility
of the displayCompositedVideoFrames attribute on VideoPlaybackQuality. Add support
for VideoPlaybackQualityMetrics to MediaPlayerPrivateAVFoundationObjC.

* Modules/mediasource/VideoPlaybackQuality.cpp:
(WebCore::VideoPlaybackQuality::create):
(WebCore::VideoPlaybackQuality::VideoPlaybackQuality):
* Modules/mediasource/VideoPlaybackQuality.h:
(WebCore::VideoPlaybackQuality::displayCompositedVideoFrames const):
* Modules/mediasource/VideoPlaybackQuality.idl:
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::getVideoPlaybackQuality):
* html/HTMLMediaElement.h:
* html/HTMLMediaElement.idl:
* page/Settings.yaml:
* platform/graphics/MediaPlayer.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::videoPlaybackQualityMetrics):
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::videoPlaybackQualityMetrics):
* platform/mock/mediasource/MockMediaSourcePrivate.cpp:
(WebCore::MockMediaSourcePrivate::videoPlaybackQualityMetrics):

Source/WebCore/PAL:

* pal/spi/mac/AVFoundationSPI.h:

Source/WebKit:

Add a new preference to control the visibility of displayCompositedVideoFrames in the VideoPlaybackQualityObject.

* Shared/WebPreferences.yaml:
* UIProcess/API/Cocoa/WKPreferences.mm:
(-[WKPreferences _setVideoQualityIncludesDisplayCompositingEnabled:]):
(-[WKPreferences _videoQualityIncludesDisplayCompositingEnabled]):
* UIProcess/API/Cocoa/WKPreferencesPrivate.h:

Tools:

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitCocoa/VideoQualityDisplayCompositing.mm: Added.
(TestWebKitAPI::TEST):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@236866 268f45cc-cd09-0410-ab3c-d52691b4dbfc
24 files changed:
Source/WebCore/ChangeLog
Source/WebCore/Modules/mediasource/VideoPlaybackQuality.cpp
Source/WebCore/Modules/mediasource/VideoPlaybackQuality.h
Source/WebCore/Modules/mediasource/VideoPlaybackQuality.idl
Source/WebCore/PAL/ChangeLog
Source/WebCore/PAL/pal/spi/mac/AVFoundationSPI.h
Source/WebCore/html/HTMLMediaElement.cpp
Source/WebCore/html/HTMLMediaElement.h
Source/WebCore/html/HTMLMediaElement.idl
Source/WebCore/page/Settings.yaml
Source/WebCore/platform/graphics/MediaPlayer.cpp
Source/WebCore/platform/graphics/MediaPlayer.h
Source/WebCore/platform/graphics/MediaPlayerPrivate.h
Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h
Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm
Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm
Source/WebCore/platform/mock/mediasource/MockMediaSourcePrivate.cpp
Source/WebKit/ChangeLog
Source/WebKit/Shared/WebPreferences.yaml
Source/WebKit/UIProcess/API/Cocoa/WKPreferences.mm
Source/WebKit/UIProcess/API/Cocoa/WKPreferencesPrivate.h
Tools/ChangeLog
Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
Tools/TestWebKitAPI/Tests/WebKitCocoa/VideoQualityDisplayCompositing.mm [new file with mode: 0644]