Title: [279579] trunk/Source/WebCore
Revision
279579
Author
[email protected]
Date
2021-07-06 01:02:10 -0700 (Tue, 06 Jul 2021)

Log Message

Set kVTCompressionPropertyKey_MaxKeyFrameInterval in VideoSampleBufferCompressor
https://bugs.webkit.org/show_bug.cgi?id=227680
<rdar://78027782>

Reviewed by Eric Carlson.

Source/WebCore:

Set kVTCompressionPropertyKey_MaxKeyFrameInterval in addition to kVTCompressionPropertyKey_MaxKeyFrameIntervalDuration.
Manually tested.

* platform/mediarecorder/cocoa/VideoSampleBufferCompressor.mm:
(WebCore::VideoSampleBufferCompressor::initCompressionSession):

Source/WebCore/PAL:

* pal/cf/VideoToolboxSoftLink.cpp:
* pal/cf/VideoToolboxSoftLink.h:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (279578 => 279579)


--- trunk/Source/WebCore/ChangeLog	2021-07-06 07:55:05 UTC (rev 279578)
+++ trunk/Source/WebCore/ChangeLog	2021-07-06 08:02:10 UTC (rev 279579)
@@ -1,3 +1,17 @@
+2021-07-06  Youenn Fablet  <[email protected]>
+
+        Set kVTCompressionPropertyKey_MaxKeyFrameInterval in VideoSampleBufferCompressor
+        https://bugs.webkit.org/show_bug.cgi?id=227680
+        <rdar://78027782>
+
+        Reviewed by Eric Carlson.
+
+        Set kVTCompressionPropertyKey_MaxKeyFrameInterval in addition to kVTCompressionPropertyKey_MaxKeyFrameIntervalDuration.
+        Manually tested.
+
+        * platform/mediarecorder/cocoa/VideoSampleBufferCompressor.mm:
+        (WebCore::VideoSampleBufferCompressor::initCompressionSession):
+
 2021-07-06  Fujii Hironori  <[email protected]>
 
         [curl][Win] very high CPU load on page with WebSocket

Modified: trunk/Source/WebCore/PAL/ChangeLog (279578 => 279579)


--- trunk/Source/WebCore/PAL/ChangeLog	2021-07-06 07:55:05 UTC (rev 279578)
+++ trunk/Source/WebCore/PAL/ChangeLog	2021-07-06 08:02:10 UTC (rev 279579)
@@ -1,3 +1,14 @@
+2021-07-06  Youenn Fablet  <[email protected]>
+
+        Set kVTCompressionPropertyKey_MaxKeyFrameInterval in VideoSampleBufferCompressor
+        https://bugs.webkit.org/show_bug.cgi?id=227680
+        <rdar://78027782>
+
+        Reviewed by Eric Carlson.
+
+        * pal/cf/VideoToolboxSoftLink.cpp:
+        * pal/cf/VideoToolboxSoftLink.h:
+
 2021-07-01  John Wilander  <[email protected]>
 
         PCM: Change import from CryptoKitCBridging to CryptoKitPrivate

Modified: trunk/Source/WebCore/PAL/pal/cf/VideoToolboxSoftLink.cpp (279578 => 279579)


--- trunk/Source/WebCore/PAL/pal/cf/VideoToolboxSoftLink.cpp	2021-07-06 07:55:05 UTC (rev 279578)
+++ trunk/Source/WebCore/PAL/pal/cf/VideoToolboxSoftLink.cpp	2021-07-06 08:02:10 UTC (rev 279579)
@@ -32,6 +32,7 @@
 SOFT_LINK_FRAMEWORK_FOR_SOURCE_WITH_EXPORT(PAL, VideoToolbox, PAL_EXPORT)
 
 SOFT_LINK_CONSTANT_FOR_SOURCE(PAL, VideoToolbox, kVTCompressionPropertyKey_ExpectedFrameRate, CFStringRef)
+SOFT_LINK_CONSTANT_FOR_SOURCE(PAL, VideoToolbox, kVTCompressionPropertyKey_MaxKeyFrameInterval, CFStringRef)
 SOFT_LINK_CONSTANT_FOR_SOURCE(PAL, VideoToolbox, kVTCompressionPropertyKey_MaxKeyFrameIntervalDuration, CFStringRef)
 SOFT_LINK_CONSTANT_FOR_SOURCE(PAL, VideoToolbox, kVTCompressionPropertyKey_RealTime, CFStringRef)
 SOFT_LINK_CONSTANT_FOR_SOURCE(PAL, VideoToolbox, kVTCompressionPropertyKey_AverageBitRate, CFStringRef)

Modified: trunk/Source/WebCore/PAL/pal/cf/VideoToolboxSoftLink.h (279578 => 279579)


--- trunk/Source/WebCore/PAL/pal/cf/VideoToolboxSoftLink.h	2021-07-06 07:55:05 UTC (rev 279578)
+++ trunk/Source/WebCore/PAL/pal/cf/VideoToolboxSoftLink.h	2021-07-06 08:02:10 UTC (rev 279579)
@@ -33,6 +33,8 @@
 
 SOFT_LINK_CONSTANT_FOR_HEADER(PAL, VideoToolbox, kVTCompressionPropertyKey_ExpectedFrameRate, CFStringRef)
 #define kVTCompressionPropertyKey_ExpectedFrameRate get_VideoToolbox_kVTCompressionPropertyKey_ExpectedFrameRate()
+SOFT_LINK_CONSTANT_FOR_HEADER(PAL, VideoToolbox, kVTCompressionPropertyKey_MaxKeyFrameInterval, CFStringRef)
+#define kVTCompressionPropertyKey_MaxKeyFrameInterval get_VideoToolbox_kVTCompressionPropertyKey_MaxKeyFrameInterval()
 SOFT_LINK_CONSTANT_FOR_HEADER(PAL, VideoToolbox, kVTCompressionPropertyKey_MaxKeyFrameIntervalDuration, CFStringRef)
 #define kVTCompressionPropertyKey_MaxKeyFrameIntervalDuration get_VideoToolbox_kVTCompressionPropertyKey_MaxKeyFrameIntervalDuration()
 SOFT_LINK_CONSTANT_FOR_HEADER(PAL, VideoToolbox, kVTCompressionPropertyKey_RealTime, CFStringRef)

Modified: trunk/Source/WebCore/platform/mediarecorder/cocoa/VideoSampleBufferCompressor.mm (279578 => 279579)


--- trunk/Source/WebCore/platform/mediarecorder/cocoa/VideoSampleBufferCompressor.mm	2021-07-06 07:55:05 UTC (rev 279578)
+++ trunk/Source/WebCore/platform/mediarecorder/cocoa/VideoSampleBufferCompressor.mm	2021-07-06 08:02:10 UTC (rev 279579)
@@ -158,6 +158,8 @@
     RELEASE_LOG_ERROR_IF(error, MediaStream, "VideoSampleBufferCompressor VTSessionSetProperty kVTCompressionPropertyKey_RealTime failed with %d", error);
     error = setCompressionSessionProperty(m_vtSession.get(), PAL::kVTCompressionPropertyKey_MaxKeyFrameIntervalDuration, m_maxKeyFrameIntervalDuration);
     RELEASE_LOG_ERROR_IF(error, MediaStream, "VideoSampleBufferCompressor VTSessionSetProperty kVTCompressionPropertyKey_MaxKeyFrameIntervalDuration failed with %d", error);
+    error = setCompressionSessionProperty(m_vtSession.get(), PAL::kVTCompressionPropertyKey_MaxKeyFrameInterval, m_maxKeyFrameIntervalDuration * m_expectedFrameRate);
+    RELEASE_LOG_ERROR_IF(error, MediaStream, "VideoSampleBufferCompressor VTSessionSetProperty kVTCompressionPropertyKey_MaxKeyFrameInterval failed with %d", error);
     error = setCompressionSessionProperty(m_vtSession.get(), PAL::kVTCompressionPropertyKey_ExpectedFrameRate, m_expectedFrameRate);
     RELEASE_LOG_ERROR_IF(error, MediaStream, "VideoSampleBufferCompressor VTSessionSetProperty kVTCompressionPropertyKey_ExpectedFrameRate failed with %d", error);
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to