Title: [245217] trunk/Source/WebCore
Revision
245217
Author
[email protected]
Date
2019-05-12 19:57:03 -0700 (Sun, 12 May 2019)

Log Message

Use clampTo in AVVideoCaptureSource::setSizeAndFrameRateWithPreset
https://bugs.webkit.org/show_bug.cgi?id=197704

Reviewed by Alex Christensen.

Use clampTo as suggested in bug 196214 review.
No change of behavior.

* platform/mediastream/mac/AVVideoCaptureSource.mm:
(WebCore::AVVideoCaptureSource::setSizeAndFrameRateWithPreset):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (245216 => 245217)


--- trunk/Source/WebCore/ChangeLog	2019-05-13 02:56:13 UTC (rev 245216)
+++ trunk/Source/WebCore/ChangeLog	2019-05-13 02:57:03 UTC (rev 245217)
@@ -1,5 +1,18 @@
 2019-05-12  Youenn Fablet  <[email protected]>
 
+        Use clampTo in AVVideoCaptureSource::setSizeAndFrameRateWithPreset
+        https://bugs.webkit.org/show_bug.cgi?id=197704
+
+        Reviewed by Alex Christensen.
+
+        Use clampTo as suggested in bug 196214 review.
+        No change of behavior.
+
+        * platform/mediastream/mac/AVVideoCaptureSource.mm:
+        (WebCore::AVVideoCaptureSource::setSizeAndFrameRateWithPreset):
+
+2019-05-12  Youenn Fablet  <[email protected]>
+
         Use the main screen for screen capture
         https://bugs.webkit.org/show_bug.cgi?id=197804
         <rdar://problem/47671383>

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


--- trunk/Source/WebCore/platform/mediastream/mac/AVVideoCaptureSource.mm	2019-05-13 02:56:13 UTC (rev 245216)
+++ trunk/Source/WebCore/platform/mediastream/mac/AVVideoCaptureSource.mm	2019-05-13 02:57:03 UTC (rev 245217)
@@ -326,10 +326,7 @@
             if (!frameRateRange)
                 return;
 
-            if (requestedFrameRate < frameRateRange.minFrameRate)
-                requestedFrameRate = frameRateRange.minFrameRate;
-            else if (requestedFrameRate > frameRateRange.maxFrameRate)
-                requestedFrameRate = frameRateRange.maxFrameRate;
+            requestedFrameRate = clampTo(requestedFrameRate, frameRateRange.minFrameRate, frameRateRange.maxFrameRate);
 
             ALWAYS_LOG_IF(loggerPtr(), LOGIDENTIFIER, "setting frame rate to ", requestedFrameRate);
             [device() setActiveVideoMinFrameDuration: CMTimeMake(1, requestedFrameRate)];
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to