Title: [265095] trunk
Revision
265095
Author
[email protected]
Date
2020-07-30 14:28:38 -0700 (Thu, 30 Jul 2020)

Log Message

[Cocoa] Make DecoderTest run against .mp4 files; add rate-limiting.
https://bugs.webkit.org/show_bug.cgi?id=214807

Reviewed by Darin Adler.

PerformanceTests:

Look up the UTI type of the specified file, and create the appropriate SourceBufferParser
by passing in the ContentType (converted from UTI). Also, add a --rate-limit flag which
causes the decompression session to run at the same FPS as the underlying media.

* DecoderTest/DecoderTest.xcodeproj/project.pbxproj:
* DecoderTest/DecoderTest/main.mm:
(main):

Source/WebCore:

Export registerWebKitVP9Decoder() from VP9UtilitiesCocoa instead of LibWebRTCProvider to make it easier
for DecodeTest to import, as LibWebRTCProvider also pulls in a bunch of libwebrtc headers. Also, export
SourceBufferParser.h so DecoderTest can create parsers for fMP4 files.

* SourcesCocoa.txt:
* WebCore.xcodeproj/project.pbxproj:
* platform/graphics/cocoa/VP9UtilitiesCocoa.h:
* platform/graphics/cocoa/VP9UtilitiesCocoa.mm:
(WebCore::registerWebKitVP9Decoder):

Source/WebKit:

* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::enableVP9Decoder):

Modified Paths

Diff

Modified: trunk/PerformanceTests/ChangeLog (265094 => 265095)


--- trunk/PerformanceTests/ChangeLog	2020-07-30 21:24:43 UTC (rev 265094)
+++ trunk/PerformanceTests/ChangeLog	2020-07-30 21:28:38 UTC (rev 265095)
@@ -1,3 +1,18 @@
+2020-07-30  Jer Noble  <[email protected]>
+
+        [Cocoa] Make DecoderTest run against .mp4 files; add rate-limiting.
+        https://bugs.webkit.org/show_bug.cgi?id=214807
+
+        Reviewed by Darin Adler.
+
+        Look up the UTI type of the specified file, and create the appropriate SourceBufferParser
+        by passing in the ContentType (converted from UTI). Also, add a --rate-limit flag which
+        causes the decompression session to run at the same FPS as the underlying media.
+
+        * DecoderTest/DecoderTest.xcodeproj/project.pbxproj:
+        * DecoderTest/DecoderTest/main.mm:
+        (main):
+
 2020-07-24  Jer Noble  <[email protected]>
 
         [Cocoa] Add PerformanceTest tool for measuring raw speed of a video decoder

Modified: trunk/PerformanceTests/DecoderTest/DecoderTest/main.mm (265094 => 265095)


--- trunk/PerformanceTests/DecoderTest/DecoderTest/main.mm	2020-07-30 21:24:43 UTC (rev 265094)
+++ trunk/PerformanceTests/DecoderTest/DecoderTest/main.mm	2020-07-30 21:28:38 UTC (rev 265095)
@@ -28,18 +28,22 @@
 #import <CoreMedia/CMBufferQueue.h>
 #import <CoreMedia/CMFormatDescription.h>
 #import <CoreMedia/CMSampleBuffer.h>
+#import <CoreServices/CoreServices.h>
 #import <Foundation/Foundation.h>
+#import <WebCore/ContentType.h>
 #import <WebCore/MediaSample.h>
 #import <WebCore/RuntimeEnabledFeatures.h>
 #import <WebCore/SharedBuffer.h>
 #import <WebCore/SourceBufferParserWebM.h>
+#import <WebCore/UTIUtilities.h>
 #import <WebCore/VP9UtilitiesCocoa.h>
 #import <WebCore/WebCoreDecompressionSession.h>
 #import <getopt.h>
-#import <webrtc/sdk/WebKit/WebKitVP9Decoder.h>
+#import <pal/avfoundation/MediaTimeAVFoundation.h>
 #import <wtf/CPUTime.h>
 #import <wtf/MonotonicTime.h>
 #import <wtf/NeverDestroyed.h>
+#import <wtf/URL.h>
 #import <wtf/WTFSemaphore.h>
 #import <wtf/cf/TypeCastsCF.h>
 
@@ -54,9 +58,11 @@
 int main(int argc, char* argv[])
 {
     int enableHardwareDecoder = true;
+    int rateLimit = false;
     static struct option longopts[] = {
         { "hardware",    no_argument, &enableHardwareDecoder, 1 },
         { "no-hardware", no_argument, &enableHardwareDecoder, 0 },
+        { "rate-limit",  no_argument, &rateLimit, 1 },
         { NULL,          0,           NULL, 0 }
     };
 
@@ -64,6 +70,7 @@
         fprintf(stderr, "Usage: %s [options] <file>\n", argv[0]);
         fprintf(stderr, "\tOptions:\n"
             "\t\t--[no-]hardware     # Enable or disable the hardware decoder\n"
+            "\t\t--rate-limit        # Rate limit the decoder to decode samples at the natural frame rate\n"
         );
     };
 
@@ -88,10 +95,26 @@
 
     @autoreleasepool {
         WTF::initializeMainThread();
-        webrtc::registerWebKitVP9Decoder();
+        registerWebKitVP9Decoder();
         registerSupplementalVP9Decoder();
         RuntimeEnabledFeatures::sharedFeatures().setWebMParserEnabled(true);
 
+        auto mdItem = adoptCF(MDItemCreate(kCFAllocatorDefault, filename.createCFString().get()));
+        auto mdContentType = adoptCF(checked_cf_cast<CFStringRef>(MDItemCopyAttribute(mdItem.get(), kMDItemContentType)));
+        if (!mdContentType) {
+            fprintf(stderr, "Could not discover file type of file \"%s\"\n", filename.utf8().data());
+            return -1;
+        }
+
+        auto mimeType = MIMETypeFromUTI(mdContentType.get());
+        if (mimeType.isEmpty() && filename.endsWith(".webm"))
+            mimeType = "video/webm";
+
+        if (mimeType.isEmpty()) {
+            fprintf(stderr, "Could not discover file type of file \"%s\"\n", filename.utf8().data());
+            return -1;
+        }
+
         auto buffer = SharedBuffer::createWithContentsOfFile(filename.utf8().data());
         if (!buffer) {
             fprintf(stderr, "Could not read file at \"%s\"\n", filename.utf8().data());
@@ -100,8 +123,13 @@
 
         fprintf(stdout, "Parsing \"%s\"...\n", filename.utf8().data());
 
-        SourceBufferParserWebM parser;
-        parser.setDidEncounterErrorDuringParsingCallback([&] (uint64_t errorCode) {
+        auto parser = SourceBufferParser::create(ContentType(mimeType));
+        if (!buffer) {
+            fprintf(stderr, "Could not create parser for file of type \"%s\"\n", mimeType.utf8().data());
+            return -1;
+        }
+
+        parser->setDidEncounterErrorDuringParsingCallback([&] (uint64_t errorCode) {
             fprintf(stderr, "Parser encountered error %llu, exiting", errorCode);
             exit(-1);
         });
@@ -124,20 +152,25 @@
             float fps = decodedSamples / duration.value();
 
             fprintf(stdout, "Decoded %llu samples in %g seconds (%g fps)\n", decodedSamples, duration.value(), fps);
-            if (startCPUTime && endCPUTime)
-                fprintf(stdout, "CPU Usage: %g %%\n", endCPUTime->percentageCPUUsageSince(*startCPUTime));
+            if (startCPUTime && endCPUTime) {
+                auto percentage = endCPUTime->percentageCPUUsageSince(*startCPUTime);
+                fprintf(stdout, "CPU Usage: %g %%, (%g %% per frame)\n", percentage, percentage / decodedSamples);
+            }
         };
 
         struct sigaction action { };
         action.sa_flags = SA_SIGINFO;
-        action.sa_sigaction = [] (int, siginfo_t*, void*) {
+        action.sa_sigaction = [] (int signal, siginfo_t*, void*) {
             if (updateOutputFunction())
                 updateOutputFunction()();
+            if (signal == SIGINT)
+                exit(-1);
         };
         sigaction(SIGINFO, &action, nullptr);
+        sigaction(SIGINT, &action, nullptr);
 
         WTF::Semaphore sampleSemaphore { 0 };
-        parser.setDidProvideMediaDataCallback([&] (Ref<MediaSample>&& sample, uint64_t, const String&) {
+        parser->setDidProvideMediaDataCallback([&] (Ref<MediaSample>&& sample, uint64_t, const String&) {
             auto platformSample = sample->platformSample();
             if (platformSample.type != PlatformSample::CMSampleBufferType)
                 return;
@@ -152,6 +185,7 @@
                 auto size = sample->presentationSize();
                 startTime = MonotonicTime::now();
                 startCPUTime = CPUTime::get();
+
                 fprintf(stdout, "Size: %g x %g\n", size.width(), size.height());
                 firstSample = false;
             }
@@ -167,16 +201,16 @@
             Vector<unsigned char> bytes;
             bytes.resize(buffer->size());
             memcpy(bytes.data(), buffer->data(), buffer->size());
-            parser.appendData(WTFMove(bytes));
+            parser->appendData(WTFMove(bytes));
             dispatch_async(dispatch_get_main_queue(), [&] {
                 finishedParsingSemaphore.signal();
             });
         });
 
+        auto decompressionSession = WebCoreDecompressionSession::createOpenGL();
         Semaphore finishedDecodingSemaphore { 0 };
         auto decoderQueue = dispatch_queue_create("decoder queue", DISPATCH_QUEUE_CONCURRENT);
         dispatch_async(decoderQueue, [&] {
-            auto decompressionSession = WebCoreDecompressionSession::createOpenGL();
             decompressionSession->setHardwareDecoderEnabled(enableHardwareDecoder);
 
             do {
@@ -187,7 +221,14 @@
                 }
 
                 auto sample = adoptCF((CMSampleBufferRef)(const_cast<void*>(CMBufferQueueDequeueAndRetain(bufferQueue))));
+                auto decodeStartTime = MonotonicTime::now();
+                auto duration = PAL::toMediaTime(CMSampleBufferGetOutputDuration(sample.get()));
                 decompressionSession->decodeSampleSync(sample.get());
+                auto decodeEndTime = MonotonicTime::now();
+                auto remainingTime = Seconds(duration.toDouble()) - (decodeEndTime - decodeStartTime);
+
+                if (rateLimit && remainingTime > Seconds(0))
+                    sleep(remainingTime);
                 ++decodedSamples;
             } while (true);
         });

Modified: trunk/PerformanceTests/DecoderTest/DecoderTest.xcodeproj/project.pbxproj (265094 => 265095)


--- trunk/PerformanceTests/DecoderTest/DecoderTest.xcodeproj/project.pbxproj	2020-07-30 21:24:43 UTC (rev 265094)
+++ trunk/PerformanceTests/DecoderTest/DecoderTest.xcodeproj/project.pbxproj	2020-07-30 21:28:38 UTC (rev 265095)
@@ -7,10 +7,11 @@
 	objects = {
 
 /* Begin PBXBuildFile section */
-		CD89724C24CA485100AF6621 /* libwebrtc.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = CD89724B24CA485100AF6621 /* libwebrtc.dylib */; };
-		CDE0C9BF24CA247A00593A83 /* _javascript_Core.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CDE0C9BE24CA247A00593A83 /* _javascript_Core.framework */; };
 		CDE0C9C124CA249A00593A83 /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CDE0C9C024CA249A00593A83 /* WebKit.framework */; };
 		CDE0C9C424CA36CD00593A83 /* CoreMedia.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CDE0C9C324CA36CD00593A83 /* CoreMedia.framework */; };
+		CDEB7B2924CB558C0015249E /* CoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CDEB7B2824CB558C0015249E /* CoreServices.framework */; };
+		CDEB7B2B24CB68E90015249E /* VideoToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CDEB7B2A24CB68E90015249E /* VideoToolbox.framework */; };
+		CDED1C3E24CD350600934E12 /* _javascript_Core.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CDE0C9BE24CA247A00593A83 /* _javascript_Core.framework */; };
 		CDF1350124C9F99900432E1E /* main.mm in Sources */ = {isa = PBXBuildFile; fileRef = CDF1350024C9F99900432E1E /* main.mm */; };
 /* End PBXBuildFile section */
 
@@ -27,11 +28,12 @@
 /* End PBXCopyFilesBuildPhase section */
 
 /* Begin PBXFileReference section */
-		CD89724B24CA485100AF6621 /* libwebrtc.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libwebrtc.dylib; path = ../../WebKitBuild/Release/libwebrtc.dylib; sourceTree = "<group>"; };
 		CDE0C9BE24CA247A00593A83 /* _javascript_Core.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = _javascript_Core.framework; path = System/Library/Frameworks/_javascript_Core.framework; sourceTree = SDKROOT; };
 		CDE0C9C024CA249A00593A83 /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = System/Library/Frameworks/WebKit.framework; sourceTree = SDKROOT; };
 		CDE0C9C324CA36CD00593A83 /* CoreMedia.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMedia.framework; path = System/Library/Frameworks/CoreMedia.framework; sourceTree = SDKROOT; };
 		CDEB7B2624CAC7420015249E /* config.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = config.h; sourceTree = "<group>"; };
+		CDEB7B2824CB558C0015249E /* CoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreServices.framework; path = System/Library/Frameworks/CoreServices.framework; sourceTree = SDKROOT; };
+		CDEB7B2A24CB68E90015249E /* VideoToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = VideoToolbox.framework; path = System/Library/Frameworks/VideoToolbox.framework; sourceTree = SDKROOT; };
 		CDF134FD24C9F99900432E1E /* DecoderTest */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = DecoderTest; sourceTree = BUILT_PRODUCTS_DIR; };
 		CDF1350024C9F99900432E1E /* main.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = main.mm; sourceTree = "<group>"; };
 		CDF1350B24CA02F300432E1E /* Base.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Base.xcconfig; sourceTree = "<group>"; };
@@ -45,8 +47,9 @@
 			buildActionMask = 2147483647;
 			files = (
 				CDE0C9C424CA36CD00593A83 /* CoreMedia.framework in Frameworks */,
-				CDE0C9BF24CA247A00593A83 /* _javascript_Core.framework in Frameworks */,
-				CD89724C24CA485100AF6621 /* libwebrtc.dylib in Frameworks */,
+				CDEB7B2924CB558C0015249E /* CoreServices.framework in Frameworks */,
+				CDED1C3E24CD350600934E12 /* _javascript_Core.framework in Frameworks */,
+				CDEB7B2B24CB68E90015249E /* VideoToolbox.framework in Frameworks */,
 				CDE0C9C124CA249A00593A83 /* WebKit.framework in Frameworks */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
@@ -58,8 +61,9 @@
 			isa = PBXGroup;
 			children = (
 				CDE0C9C324CA36CD00593A83 /* CoreMedia.framework */,
+				CDEB7B2824CB558C0015249E /* CoreServices.framework */,
 				CDE0C9BE24CA247A00593A83 /* _javascript_Core.framework */,
-				CD89724B24CA485100AF6621 /* libwebrtc.dylib */,
+				CDEB7B2A24CB68E90015249E /* VideoToolbox.framework */,
 				CDE0C9C024CA249A00593A83 /* WebKit.framework */,
 			);
 			name = Frameworks;
@@ -86,8 +90,8 @@
 		CDF134FF24C9F99900432E1E /* DecoderTest */ = {
 			isa = PBXGroup;
 			children = (
+				CDEB7B2624CAC7420015249E /* config.h */,
 				CDF1350024C9F99900432E1E /* main.mm */,
-				CDEB7B2624CAC7420015249E /* config.h */,
 			);
 			path = DecoderTest;
 			sourceTree = "<group>";

Modified: trunk/Source/WebCore/ChangeLog (265094 => 265095)


--- trunk/Source/WebCore/ChangeLog	2020-07-30 21:24:43 UTC (rev 265094)
+++ trunk/Source/WebCore/ChangeLog	2020-07-30 21:28:38 UTC (rev 265095)
@@ -1,3 +1,20 @@
+2020-07-30  Jer Noble  <[email protected]>
+
+        [Cocoa] Make DecoderTest run against .mp4 files; add rate-limiting.
+        https://bugs.webkit.org/show_bug.cgi?id=214807
+
+        Reviewed by Darin Adler.
+
+        Export registerWebKitVP9Decoder() from VP9UtilitiesCocoa instead of LibWebRTCProvider to make it easier
+        for DecodeTest to import, as LibWebRTCProvider also pulls in a bunch of libwebrtc headers. Also, export
+        SourceBufferParser.h so DecoderTest can create parsers for fMP4 files.
+
+        * SourcesCocoa.txt:
+        * WebCore.xcodeproj/project.pbxproj:
+        * platform/graphics/cocoa/VP9UtilitiesCocoa.h:
+        * platform/graphics/cocoa/VP9UtilitiesCocoa.mm:
+        (WebCore::registerWebKitVP9Decoder):
+
 2020-07-30  Ryosuke Niwa  <[email protected]>
 
         Clicking on a shadow DOM does not move the selection to the focused element when delegatesFocus is set to true

Modified: trunk/Source/WebCore/SourcesCocoa.txt (265094 => 265095)


--- trunk/Source/WebCore/SourcesCocoa.txt	2020-07-30 21:24:43 UTC (rev 265094)
+++ trunk/Source/WebCore/SourcesCocoa.txt	2020-07-30 21:28:38 UTC (rev 265095)
@@ -358,7 +358,7 @@
 platform/graphics/cocoa/SourceBufferParserWebM.cpp
 platform/graphics/cocoa/SystemFontDatabaseCoreText.cpp
 platform/graphics/cocoa/TextTrackRepresentationCocoa.mm
-platform/graphics/cocoa/VP9UtilitiesCocoa.mm
+platform/graphics/cocoa/VP9UtilitiesCocoa.mm @no-unify
 platform/graphics/cocoa/WebActionDisablingCALayerDelegate.mm
 platform/graphics/cocoa/WebCoreCALayerExtras.mm
 platform/graphics/cocoa/WebCoreDecompressionSession.mm

Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (265094 => 265095)


--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2020-07-30 21:24:43 UTC (rev 265094)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2020-07-30 21:28:38 UTC (rev 265095)
@@ -4249,6 +4249,7 @@
 		CDEA7C841276230400B846DD /* RenderFullScreen.h in Headers */ = {isa = PBXBuildFile; fileRef = CDEA7C821276230400B846DD /* RenderFullScreen.h */; };
 		CDECA89A1EDF447D00DCB08B /* AVAssetTrackUtilities.mm in Sources */ = {isa = PBXBuildFile; fileRef = CDECA8981EDF447D00DCB08B /* AVAssetTrackUtilities.mm */; };
 		CDECA89B1EDF447D00DCB08B /* AVAssetTrackUtilities.h in Headers */ = {isa = PBXBuildFile; fileRef = CDECA8991EDF447D00DCB08B /* AVAssetTrackUtilities.h */; };
+		CDED1C3C24CD305700934E12 /* VP9UtilitiesCocoa.mm in Sources */ = {isa = PBXBuildFile; fileRef = CD6FE5B824BCE645009FCDA4 /* VP9UtilitiesCocoa.mm */; };
 		CDEF4FD717E85C8F00AEE24B /* GridLength.h in Headers */ = {isa = PBXBuildFile; fileRef = CDEF4FD617E85C8F00AEE24B /* GridLength.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		CDEFA2281E7669E8000AE99C /* PlatformAudioData.h in Headers */ = {isa = PBXBuildFile; fileRef = CDE667A11E4BBA4D00E8154A /* PlatformAudioData.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		CDF1350824C9FA4400432E1E /* SourceBufferParserWebM.h in Headers */ = {isa = PBXBuildFile; fileRef = CD8F667224C0F208000C421C /* SourceBufferParserWebM.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -35048,6 +35049,7 @@
 				DECA80391F9FED6A00E3B661 /* UnifiedSource248.cpp in Sources */,
 				DECA803A1F9FED6A00E3B661 /* UnifiedSource249.cpp in Sources */,
 				DECA803B1F9FED6A00E3B661 /* UnifiedSource250.cpp in Sources */,
+				CDED1C3C24CD305700934E12 /* VP9UtilitiesCocoa.mm in Sources */,
 				DECA803C1F9FED6A00E3B661 /* UnifiedSource251.cpp in Sources */,
 				DECA803D1F9FED6A00E3B661 /* UnifiedSource252.cpp in Sources */,
 				DECA803E1F9FED6A00E3B661 /* UnifiedSource253.cpp in Sources */,

Modified: trunk/Source/WebCore/platform/graphics/cocoa/SourceBufferParser.h (265094 => 265095)


--- trunk/Source/WebCore/platform/graphics/cocoa/SourceBufferParser.h	2020-07-30 21:24:43 UTC (rev 265094)
+++ trunk/Source/WebCore/platform/graphics/cocoa/SourceBufferParser.h	2020-07-30 21:28:38 UTC (rev 265095)
@@ -37,7 +37,7 @@
 class ContentType;
 class MediaSample;
 
-class SourceBufferParser : public ThreadSafeRefCounted<SourceBufferParser> {
+class WEBCORE_EXPORT SourceBufferParser : public ThreadSafeRefCounted<SourceBufferParser> {
 public:
     static MediaPlayerEnums::SupportsType isContentTypeSupported(const ContentType&);
 

Modified: trunk/Source/WebCore/platform/graphics/cocoa/VP9UtilitiesCocoa.h (265094 => 265095)


--- trunk/Source/WebCore/platform/graphics/cocoa/VP9UtilitiesCocoa.h	2020-07-30 21:24:43 UTC (rev 265094)
+++ trunk/Source/WebCore/platform/graphics/cocoa/VP9UtilitiesCocoa.h	2020-07-30 21:28:38 UTC (rev 265095)
@@ -38,6 +38,7 @@
 WEBCORE_EXPORT extern void setOverrideVP9ScreenSizeAndScaleForTesting(float width, float height, float scale);
 WEBCORE_EXPORT extern void resetOverrideVP9ScreenSizeAndScaleForTesting();
 
+WEBCORE_EXPORT extern void registerWebKitVP9Decoder();
 WEBCORE_EXPORT extern void registerSupplementalVP9Decoder();
 extern bool isVP9DecoderAvailable();
 extern bool validateVPParameters(VPCodecConfigurationRecord&, MediaCapabilitiesInfo&, const VideoConfiguration&);

Modified: trunk/Source/WebCore/platform/graphics/cocoa/VP9UtilitiesCocoa.mm (265094 => 265095)


--- trunk/Source/WebCore/platform/graphics/cocoa/VP9UtilitiesCocoa.mm	2020-07-30 21:24:43 UTC (rev 265094)
+++ trunk/Source/WebCore/platform/graphics/cocoa/VP9UtilitiesCocoa.mm	2020-07-30 21:28:38 UTC (rev 265095)
@@ -29,6 +29,7 @@
 #if PLATFORM(COCOA)
 
 #import "FourCC.h"
+#import "LibWebRTCProvider.h"
 #import "MediaCapabilitiesInfo.h"
 #import "PlatformScreen.h"
 #import "ScreenProperties.h"
@@ -96,6 +97,11 @@
     return ResolutionCategory::R_480p;
 }
 
+void registerWebKitVP9Decoder()
+{
+    LibWebRTCProvider::registerWebKitVP9Decoder();
+}
+
 void registerSupplementalVP9Decoder()
 {
     if (!VideoToolboxLibrary(true))

Modified: trunk/Source/WebKit/ChangeLog (265094 => 265095)


--- trunk/Source/WebKit/ChangeLog	2020-07-30 21:24:43 UTC (rev 265094)
+++ trunk/Source/WebKit/ChangeLog	2020-07-30 21:28:38 UTC (rev 265095)
@@ -1,3 +1,13 @@
+2020-07-30  Jer Noble  <[email protected]>
+
+        [Cocoa] Make DecoderTest run against .mp4 files; add rate-limiting.
+        https://bugs.webkit.org/show_bug.cgi?id=214807
+
+        Reviewed by Darin Adler.
+
+        * WebProcess/WebProcess.cpp:
+        (WebKit::WebProcess::enableVP9Decoder):
+
 2020-07-30  Tim Horton  <[email protected]>
 
         Web content gets stuck in an inactive state (no cursor updates or text insertion caret) when activating a tab with a thumbnail visible

Modified: trunk/Source/WebKit/WebProcess/WebProcess.cpp (265094 => 265095)


--- trunk/Source/WebKit/WebProcess/WebProcess.cpp	2020-07-30 21:24:43 UTC (rev 265094)
+++ trunk/Source/WebKit/WebProcess/WebProcess.cpp	2020-07-30 21:28:38 UTC (rev 265095)
@@ -1960,9 +1960,9 @@
         return;
 
     m_vp9DecoderEnabled = true;
-    LibWebRTCProvider::registerWebKitVP9Decoder();
 
 #if PLATFORM(COCOA)
+    WebCore::registerWebKitVP9Decoder();
     WebCore::registerSupplementalVP9Decoder();
 #endif
 }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to