Title: [291374] trunk/Source/WebCore
Revision
291374
Author
eric.carl...@apple.com
Date
2022-03-16 16:01:09 -0700 (Wed, 16 Mar 2022)

Log Message

[Cocoa] Minor AVVideoCaptureSource cleanup
https://bugs.webkit.org/show_bug.cgi?id=237978
<rdar://problem/90388332>

Reviewed by Jer Noble.

No new tests, no behavior change.

* platform/mediastream/mac/AVVideoCaptureSource.mm:
(WebCore::AVVideoCaptureSource::setupSession): Use `instancesRespondToSelector:`
instead of `respondsToSelector:` so we don't have to allocate an AVCaptureSession
just to find out how to initialize it.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (291373 => 291374)


--- trunk/Source/WebCore/ChangeLog	2022-03-16 22:55:51 UTC (rev 291373)
+++ trunk/Source/WebCore/ChangeLog	2022-03-16 23:01:09 UTC (rev 291374)
@@ -1,3 +1,18 @@
+2022-03-16  Eric Carlson  <eric.carl...@apple.com>
+
+        [Cocoa] Minor AVVideoCaptureSource cleanup
+        https://bugs.webkit.org/show_bug.cgi?id=237978
+        <rdar://problem/90388332>
+
+        Reviewed by Jer Noble.
+
+        No new tests, no behavior change.
+
+        * platform/mediastream/mac/AVVideoCaptureSource.mm:
+        (WebCore::AVVideoCaptureSource::setupSession): Use `instancesRespondToSelector:`
+        instead of `respondsToSelector:` so we don't have to allocate an AVCaptureSession
+        just to find out how to initialize it.
+
 2022-03-16  Basuke Suzuki  <basuke.suz...@sony.com>
 
         [PlayStation] Fix build break after r291341

Modified: trunk/Source/WebCore/platform/mediastream/mac/AVVideoCaptureSource.mm (291373 => 291374)


--- trunk/Source/WebCore/platform/mediastream/mac/AVVideoCaptureSource.mm	2022-03-16 22:55:51 UTC (rev 291373)
+++ trunk/Source/WebCore/platform/mediastream/mac/AVVideoCaptureSource.mm	2022-03-16 23:01:09 UTC (rev 291374)
@@ -422,13 +422,13 @@
 
 #if ENABLE(APP_PRIVACY_REPORT)
     auto identity = RealtimeMediaSourceCenter::singleton().identity();
-    if (identity && [PAL::allocAVCaptureSessionInstance() respondsToSelector:@selector(initWithAssumedIdentity:)])
+    if (identity && [PAL::getAVCaptureSessionClass() instancesRespondToSelector:@selector(initWithAssumedIdentity:)])
         m_session = adoptNS([PAL::allocAVCaptureSessionInstance() initWithAssumedIdentity:identity.get()]);
     else
+#else
         m_session = adoptNS([PAL::allocAVCaptureSessionInstance() init]);
-#else
-    m_session = adoptNS([PAL::allocAVCaptureSessionInstance() init]);
 #endif
+
 #if PLATFORM(IOS_FAMILY)
     PAL::AVCaptureSessionSetAuthorizedToUseCameraInMultipleForegroundAppLayout(m_session.get());
 #endif
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to