Title: [264706] branches/safari-610.1.23-branch/Source
Revision
264706
Author
[email protected]
Date
2020-07-22 11:00:18 -0700 (Wed, 22 Jul 2020)

Log Message

Cherry-pick r264659. rdar://problem/65944694

    [Cocoa] Adopt VTRegisterSupplementalVideoDecoderIfAvailable
    https://bugs.webkit.org/show_bug.cgi?id=214585
    <rdar://problem/65863651>

    Reviewed by Youenn Fablet.

    Source/WebCore:

    * WebCore.xcodeproj/project.pbxproj:
    * platform/cocoa/VideoToolboxSoftLink.cpp:
    * platform/cocoa/VideoToolboxSoftLink.h:
    * platform/graphics/cocoa/VP9UtilitiesCocoa.h:
    * platform/graphics/cocoa/VP9UtilitiesCocoa.mm:
    (WebCore::registerSupplementalVP9Decoder):

    Source/WebKit:

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

    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@264659 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Modified Paths

Diff

Modified: branches/safari-610.1.23-branch/Source/WebCore/ChangeLog (264705 => 264706)


--- branches/safari-610.1.23-branch/Source/WebCore/ChangeLog	2020-07-22 17:51:40 UTC (rev 264705)
+++ branches/safari-610.1.23-branch/Source/WebCore/ChangeLog	2020-07-22 18:00:18 UTC (rev 264706)
@@ -1,3 +1,45 @@
+2020-07-22  Alan Coon  <[email protected]>
+
+        Cherry-pick r264659. rdar://problem/65944694
+
+    [Cocoa] Adopt VTRegisterSupplementalVideoDecoderIfAvailable
+    https://bugs.webkit.org/show_bug.cgi?id=214585
+    <rdar://problem/65863651>
+    
+    Reviewed by Youenn Fablet.
+    
+    Source/WebCore:
+    
+    * WebCore.xcodeproj/project.pbxproj:
+    * platform/cocoa/VideoToolboxSoftLink.cpp:
+    * platform/cocoa/VideoToolboxSoftLink.h:
+    * platform/graphics/cocoa/VP9UtilitiesCocoa.h:
+    * platform/graphics/cocoa/VP9UtilitiesCocoa.mm:
+    (WebCore::registerSupplementalVP9Decoder):
+    
+    Source/WebKit:
+    
+    * WebProcess/WebProcess.cpp:
+    (WebKit::WebProcess::enableVP9Decoder):
+    
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@264659 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2020-07-21  Jer Noble  <[email protected]>
+
+            [Cocoa] Adopt VTRegisterSupplementalVideoDecoderIfAvailable
+            https://bugs.webkit.org/show_bug.cgi?id=214585
+            <rdar://problem/65863651>
+
+            Reviewed by Youenn Fablet.
+
+            * WebCore.xcodeproj/project.pbxproj:
+            * platform/cocoa/VideoToolboxSoftLink.cpp:
+            * platform/cocoa/VideoToolboxSoftLink.h:
+            * platform/graphics/cocoa/VP9UtilitiesCocoa.h:
+            * platform/graphics/cocoa/VP9UtilitiesCocoa.mm:
+            (WebCore::registerSupplementalVP9Decoder):
+
 2020-07-20  Commit Queue  <[email protected]>
 
         Unreviewed, reverting r264596.

Modified: branches/safari-610.1.23-branch/Source/WebCore/WebCore.xcodeproj/project.pbxproj (264705 => 264706)


--- branches/safari-610.1.23-branch/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2020-07-22 17:51:40 UTC (rev 264705)
+++ branches/safari-610.1.23-branch/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2020-07-22 18:00:18 UTC (rev 264706)
@@ -4160,6 +4160,7 @@
 		CD92F5182261038200F87BB3 /* FullscreenManager.h in Headers */ = {isa = PBXBuildFile; fileRef = CD92F5162261038200F87BB3 /* FullscreenManager.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		CD94A5DD1F71D5D800F525C5 /* CDMClearKey.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CD94A5DB1F71CBB000F525C5 /* CDMClearKey.cpp */; };
 		CD94A5DE1F72F57B00F525C5 /* CDMClient.h in Headers */ = {isa = PBXBuildFile; fileRef = CD94A5C91F71CA9D00F525C5 /* CDMClient.h */; settings = {ATTRIBUTES = (Private, ); }; };
+		CD9CC58524C6BBEB00CD3C64 /* VP9Utilities.h in Headers */ = {isa = PBXBuildFile; fileRef = CD6FE5BA24BCE7B6009FCDA4 /* VP9Utilities.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		CD9D82761C7AE535006FF066 /* TextureCacheCV.h in Headers */ = {isa = PBXBuildFile; fileRef = CD9D82741C7AE535006FF066 /* TextureCacheCV.h */; };
 		CD9D827A1C7B8EE1006FF066 /* VideoTextureCopierCV.h in Headers */ = {isa = PBXBuildFile; fileRef = CD9D82781C7B8EE1006FF066 /* VideoTextureCopierCV.h */; };
 		CD9DE17517AAC74C00EA386D /* JSMediaSource.h in Headers */ = {isa = PBXBuildFile; fileRef = CD9DE17317AAC74C00EA386D /* JSMediaSource.h */; };
@@ -4182,6 +4183,7 @@
 		CDAB6D2917C7DE6C00C60B34 /* MediaControlsHost.h in Headers */ = {isa = PBXBuildFile; fileRef = CDAB6D2717C7DE6C00C60B34 /* MediaControlsHost.h */; };
 		CDAB6D2E17C814EE00C60B34 /* JSMediaControlsHost.h in Headers */ = {isa = PBXBuildFile; fileRef = CDAB6D2C17C814EE00C60B34 /* JSMediaControlsHost.h */; };
 		CDAB6D3117C9259500C60B34 /* UserAgentScripts.h in Headers */ = {isa = PBXBuildFile; fileRef = CDAB6D2F17C9259500C60B34 /* UserAgentScripts.h */; };
+		CDAC068324C6A95A002F727F /* VP9UtilitiesCocoa.h in Headers */ = {isa = PBXBuildFile; fileRef = CD6FE5B724BCE645009FCDA4 /* VP9UtilitiesCocoa.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		CDB6354923F6023A00C0F9DE /* WebAVPlayerController.h in Headers */ = {isa = PBXBuildFile; fileRef = CDA29A2C1CBF73FC00901CCF /* WebAVPlayerController.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		CDB7045A1F7465A1003923DF /* CDMFairPlayStreaming.h in Headers */ = {isa = PBXBuildFile; fileRef = CDB704581F7465A1003923DF /* CDMFairPlayStreaming.h */; };
 		CDB7045B1F7465A1003923DF /* CDMFairPlayStreaming.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CDB704591F7465A1003923DF /* CDMFairPlayStreaming.cpp */; };
@@ -30032,6 +30034,7 @@
 				830030F81B7D3B7800ED3AAC /* CachedHTMLCollection.h in Headers */,
 				BCB16C1C0979C3BD00467741 /* CachedImage.h in Headers */,
 				319FBD5F15D2F464009640A6 /* CachedImageClient.h in Headers */,
+				CDAC068324C6A95A002F727F /* VP9UtilitiesCocoa.h in Headers */,
 				E307DED01D81E4C700141CAF /* CachedModuleScriptLoader.h in Headers */,
 				E307DED11D81E4CB00141CAF /* CachedModuleScriptLoaderClient.h in Headers */,
 				510184690B08602A004A825F /* CachedPage.h in Headers */,
@@ -31104,6 +31107,7 @@
 				519DBC6F1DC011A700329BF5 /* IDBGetAllRecordsData.h in Headers */,
 				519DBC721DC10F5200329BF5 /* IDBGetAllResult.h in Headers */,
 				5105F0691D4BA9D900FB80BC /* IDBGetRecordData.h in Headers */,
+				CD9CC58524C6BBEB00CD3C64 /* VP9Utilities.h in Headers */,
 				5185FC8F1BB4C4E80012898F /* IDBGetResult.h in Headers */,
 				5185FC911BB4C4E80012898F /* IDBIndex.h in Headers */,
 				51F798F01BE880E7008AE491 /* IDBIndexInfo.h in Headers */,

Modified: branches/safari-610.1.23-branch/Source/WebCore/platform/cocoa/VideoToolboxSoftLink.cpp (264705 => 264706)


--- branches/safari-610.1.23-branch/Source/WebCore/platform/cocoa/VideoToolboxSoftLink.cpp	2020-07-22 17:51:40 UTC (rev 264705)
+++ branches/safari-610.1.23-branch/Source/WebCore/platform/cocoa/VideoToolboxSoftLink.cpp	2020-07-22 18:00:18 UTC (rev 264706)
@@ -49,6 +49,7 @@
 SOFT_LINK_FUNCTION_MAY_FAIL_FOR_SOURCE(WebCore, VideoToolbox, VTCreateCGImageFromCVPixelBuffer, OSStatus, (CVPixelBufferRef pixelBuffer, CFDictionaryRef options, CGImageRef* imageOut), (pixelBuffer, options, imageOut))
 SOFT_LINK_FUNCTION_MAY_FAIL_FOR_SOURCE(WebCore, VideoToolbox, VTCopyHEVCDecoderCapabilitiesDictionary, CFDictionaryRef, (), ())
 SOFT_LINK_FUNCTION_MAY_FAIL_FOR_SOURCE(WebCore, VideoToolbox, VTGetHEVCCapabilitesForFormatDescription, OSStatus, (CMVideoFormatDescriptionRef formatDescription, CFDictionaryRef decoderCapabilitiesDict, Boolean* isDecodable, Boolean* mayBePlayable), (formatDescription, decoderCapabilitiesDict, isDecodable, mayBePlayable))
+SOFT_LINK_FUNCTION_MAY_FAIL_FOR_SOURCE(WebCore, VideoToolbox, VTRegisterSupplementalVideoDecoderIfAvailable, void, (CMVideoCodecType codecType), (codecType))
 SOFT_LINK_FUNCTION_FOR_SOURCE(WebCore, VideoToolbox, VTSelectAndCreateVideoDecoderInstance, OSStatus, (CMVideoCodecType codecType, CFAllocatorRef allocator, CFDictionaryRef videoDecoderSpecification, VTVideoDecoderRef *decoderInstanceOut), (codecType, allocator, videoDecoderSpecification, decoderInstanceOut))
 SOFT_LINK_CONSTANT_FOR_SOURCE(WebCore, VideoToolbox, kVTVideoDecoderSpecification_EnableHardwareAcceleratedVideoDecoder, CFStringRef)
 SOFT_LINK_CONSTANT_FOR_SOURCE(WebCore, VideoToolbox, kVTDecompressionPropertyKey_PixelBufferPool, CFStringRef)

Modified: branches/safari-610.1.23-branch/Source/WebCore/platform/cocoa/VideoToolboxSoftLink.h (264705 => 264706)


--- branches/safari-610.1.23-branch/Source/WebCore/platform/cocoa/VideoToolboxSoftLink.h	2020-07-22 17:51:40 UTC (rev 264705)
+++ branches/safari-610.1.23-branch/Source/WebCore/platform/cocoa/VideoToolboxSoftLink.h	2020-07-22 18:00:18 UTC (rev 264706)
@@ -121,3 +121,4 @@
 #define VTPixelBufferConformerIsConformantPixelBuffer softLink_VideoToolbox_VTPixelBufferConformerIsConformantPixelBuffer
 SOFT_LINK_FUNCTION_FOR_HEADER(WebCore, VideoToolbox, VTPixelBufferConformerCopyConformedPixelBuffer, OSStatus, (VTPixelBufferConformerRef conformer, CVPixelBufferRef sourceBuffer, Boolean ensureModifiable, CVPixelBufferRef* conformedBufferOut), (conformer, sourceBuffer, ensureModifiable, conformedBufferOut))
 #define VTPixelBufferConformerCopyConformedPixelBuffer softLink_VideoToolbox_VTPixelBufferConformerCopyConformedPixelBuffer
+SOFT_LINK_FUNCTION_MAY_FAIL_FOR_HEADER(WebCore, VideoToolbox, VTRegisterSupplementalVideoDecoderIfAvailable, void, (CMVideoCodecType codecType), (codecType))

Modified: branches/safari-610.1.23-branch/Source/WebCore/platform/graphics/cocoa/VP9UtilitiesCocoa.h (264705 => 264706)


--- branches/safari-610.1.23-branch/Source/WebCore/platform/graphics/cocoa/VP9UtilitiesCocoa.h	2020-07-22 17:51:40 UTC (rev 264705)
+++ branches/safari-610.1.23-branch/Source/WebCore/platform/graphics/cocoa/VP9UtilitiesCocoa.h	2020-07-22 18:00:18 UTC (rev 264706)
@@ -38,6 +38,7 @@
 WEBCORE_EXPORT extern void setOverrideVP9ScreenSizeAndScaleForTesting(float width, float height, float scale);
 WEBCORE_EXPORT extern void resetOverrideVP9ScreenSizeAndScaleForTesting();
 
+WEBCORE_EXPORT extern void registerSupplementalVP9Decoder();
 extern bool validateVPParameters(VPCodecConfigurationRecord&, MediaCapabilitiesInfo&, const VideoConfiguration&);
 
 }

Modified: branches/safari-610.1.23-branch/Source/WebCore/platform/graphics/cocoa/VP9UtilitiesCocoa.mm (264705 => 264706)


--- branches/safari-610.1.23-branch/Source/WebCore/platform/graphics/cocoa/VP9UtilitiesCocoa.mm	2020-07-22 17:51:40 UTC (rev 264705)
+++ branches/safari-610.1.23-branch/Source/WebCore/platform/graphics/cocoa/VP9UtilitiesCocoa.mm	2020-07-22 18:00:18 UTC (rev 264706)
@@ -96,6 +96,12 @@
     return ResolutionCategory::R_480p;
 }
 
+void registerSupplementalVP9Decoder()
+{
+    if (canLoad_VideoToolbox_VTRegisterSupplementalVideoDecoderIfAvailable())
+        softLink_VideoToolbox_VTRegisterSupplementalVideoDecoderIfAvailable(kCMVideoCodecType_VP9);
+}
+
 bool validateVPParameters(VPCodecConfigurationRecord& codecConfiguration, MediaCapabilitiesInfo& info, const VideoConfiguration& videoConfiguration)
 {
     OSStatus status = VTSelectAndCreateVideoDecoderInstance(kCMVideoCodecType_VP9, kCFAllocatorDefault, nullptr, nullptr);

Modified: branches/safari-610.1.23-branch/Source/WebKit/ChangeLog (264705 => 264706)


--- branches/safari-610.1.23-branch/Source/WebKit/ChangeLog	2020-07-22 17:51:40 UTC (rev 264705)
+++ branches/safari-610.1.23-branch/Source/WebKit/ChangeLog	2020-07-22 18:00:18 UTC (rev 264706)
@@ -1,3 +1,41 @@
+2020-07-22  Alan Coon  <[email protected]>
+
+        Cherry-pick r264659. rdar://problem/65944694
+
+    [Cocoa] Adopt VTRegisterSupplementalVideoDecoderIfAvailable
+    https://bugs.webkit.org/show_bug.cgi?id=214585
+    <rdar://problem/65863651>
+    
+    Reviewed by Youenn Fablet.
+    
+    Source/WebCore:
+    
+    * WebCore.xcodeproj/project.pbxproj:
+    * platform/cocoa/VideoToolboxSoftLink.cpp:
+    * platform/cocoa/VideoToolboxSoftLink.h:
+    * platform/graphics/cocoa/VP9UtilitiesCocoa.h:
+    * platform/graphics/cocoa/VP9UtilitiesCocoa.mm:
+    (WebCore::registerSupplementalVP9Decoder):
+    
+    Source/WebKit:
+    
+    * WebProcess/WebProcess.cpp:
+    (WebKit::WebProcess::enableVP9Decoder):
+    
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@264659 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2020-07-21  Jer Noble  <[email protected]>
+
+            [Cocoa] Adopt VTRegisterSupplementalVideoDecoderIfAvailable
+            https://bugs.webkit.org/show_bug.cgi?id=214585
+            <rdar://problem/65863651>
+
+            Reviewed by Youenn Fablet.
+
+            * WebProcess/WebProcess.cpp:
+            (WebKit::WebProcess::enableVP9Decoder):
+
 2020-07-20  Adrian Perez de Castro  <[email protected]>
 
         Some classes have final destructors but are non-final

Modified: branches/safari-610.1.23-branch/Source/WebKit/WebProcess/WebProcess.cpp (264705 => 264706)


--- branches/safari-610.1.23-branch/Source/WebKit/WebProcess/WebProcess.cpp	2020-07-22 17:51:40 UTC (rev 264705)
+++ branches/safari-610.1.23-branch/Source/WebKit/WebProcess/WebProcess.cpp	2020-07-22 18:00:18 UTC (rev 264706)
@@ -189,6 +189,10 @@
 #include "AudioSessionRoutingArbitrator.h"
 #endif
 
+#if PLATFORM(COCOA)
+#include <WebCore/VP9UtilitiesCocoa.h>
+#endif
+
 #define RELEASE_LOG_SESSION_ID (m_sessionID ? m_sessionID->toUInt64() : 0)
 #define RELEASE_LOG_IF_ALLOWED(channel, fmt, ...) RELEASE_LOG_IF(isAlwaysOnLoggingAllowed(), channel, "%p - [sessionID=%" PRIu64 "] WebProcess::" fmt, this, RELEASE_LOG_SESSION_ID, ##__VA_ARGS__)
 #define RELEASE_LOG_ERROR_IF_ALLOWED(channel, fmt, ...) RELEASE_LOG_ERROR_IF(isAlwaysOnLoggingAllowed(), channel, "%p - [sessionID=%" PRIu64 "] WebProcess::" fmt, this, RELEASE_LOG_SESSION_ID, ##__VA_ARGS__)
@@ -1955,6 +1959,10 @@
 
     m_vp9DecoderEnabled = true;
     LibWebRTCProvider::registerWebKitVP9Decoder();
+
+#if PLATFORM(COCOA)
+    WebCore::registerSupplementalVP9Decoder();
+#endif
 }
 
 } // namespace WebKit
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to