Title: [259397] trunk/Source/ThirdParty/libwebrtc
- Revision
- 259397
- Author
- simon.fra...@apple.com
- Date
- 2020-04-02 11:27:08 -0700 (Thu, 02 Apr 2020)
Log Message
Build fix after r259385.
Reviewed by David Kilzer, Youenn Fablet.
Convert isStandardFrameSize() into a lambda function since it only has one call site.
* Source/webrtc/sdk/objc/components/video_codec/RTCVideoEncoderH264.mm:
(-[RTCVideoEncoderH264 resetCompressionSessionWithPixelFormat:]):
(isStandardFrameSize): Deleted.
Modified Paths
Diff
Modified: trunk/Source/ThirdParty/libwebrtc/ChangeLog (259396 => 259397)
--- trunk/Source/ThirdParty/libwebrtc/ChangeLog 2020-04-02 18:26:27 UTC (rev 259396)
+++ trunk/Source/ThirdParty/libwebrtc/ChangeLog 2020-04-02 18:27:08 UTC (rev 259397)
@@ -1,3 +1,15 @@
+2020-04-02 Simon Fraser <simon.fra...@apple.com>
+
+ Build fix after r259385.
+
+ Reviewed by David Kilzer, Youenn Fablet.
+
+ Convert isStandardFrameSize() into a lambda function since it only has one call site.
+
+ * Source/webrtc/sdk/objc/components/video_codec/RTCVideoEncoderH264.mm:
+ (-[RTCVideoEncoderH264 resetCompressionSessionWithPixelFormat:]):
+ (isStandardFrameSize): Deleted.
+
2020-04-02 Youenn Fablet <you...@apple.com>
Temporarily restrict kVTVideoEncoderSpecification_RequiredLowLatency use to iOS
Modified: trunk/Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/components/video_codec/RTCVideoEncoderH264.mm (259396 => 259397)
--- trunk/Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/components/video_codec/RTCVideoEncoderH264.mm 2020-04-02 18:26:27 UTC (rev 259396)
+++ trunk/Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/components/video_codec/RTCVideoEncoderH264.mm 2020-04-02 18:27:08 UTC (rev 259397)
@@ -48,34 +48,6 @@
VT_EXPORT const CFStringRef kVTVideoEncoderSpecification_Usage;
VT_EXPORT const CFStringRef kVTCompressionPropertyKey_Usage;
-#if defined(WEBRTC_MAC) && !defined(WEBRTC_IOS) && !HAVE_VTB_REQUIREDLOWLATENCY
-static inline bool isStandardFrameSize(int32_t width, int32_t height)
-{
- // FIXME: Envision relaxing this rule, something like width and height dividable by 4 or 8 should be good enough.
- if (width == 1280)
- return height == 720;
- if (width == 720)
- return height == 1280;
- if (width == 960)
- return height == 540;
- if (width == 540)
- return height == 960;
- if (width == 640)
- return height == 480;
- if (width == 480)
- return height == 640;
- if (width == 288)
- return height == 352;
- if (width == 352)
- return height == 288;
- if (width == 320)
- return height == 240;
- if (width == 240)
- return height == 320;
- return false;
-}
-#endif
-
@interface RTCVideoEncoderH264 ()
- (void)frameWasEncoded:(OSStatus)status
@@ -786,6 +758,31 @@
sourceAttributes = nullptr;
}
+ auto isStandardFrameSize = [](int32_t width, int32_t height) {
+ // FIXME: Envision relaxing this rule, something like width and height dividable by 4 or 8 should be good enough.
+ if (width == 1280)
+ return height == 720;
+ if (width == 720)
+ return height == 1280;
+ if (width == 960)
+ return height == 540;
+ if (width == 540)
+ return height == 960;
+ if (width == 640)
+ return height == 480;
+ if (width == 480)
+ return height == 640;
+ if (width == 288)
+ return height == 352;
+ if (width == 352)
+ return height == 288;
+ if (width == 320)
+ return height == 240;
+ if (width == 240)
+ return height == 320;
+ return false;
+ };
+
if (!isStandardFrameSize(_width, _height)) {
_disableEncoding = true;
RTC_LOG(LS_ERROR) << "Using H264 software encoder with non standard size is not supported";
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes