[webkit-reviews] review granted: [Bug 198839] [MacOS] getUserMedia called multiple times should better handle camera resolution : [Attachment 373058] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Aug 1 05:58:20 PDT 2019
Eric Carlson <eric.carlson at apple.com> has granted youenn fablet
<youennf at gmail.com>'s request for review:
Bug 198839: [MacOS] getUserMedia called multiple times should better handle
camera resolution
https://bugs.webkit.org/show_bug.cgi?id=198839
Attachment 373058: Patch
https://bugs.webkit.org/attachment.cgi?id=373058&action=review
--- Comment #17 from Eric Carlson <eric.carlson at apple.com> ---
Comment on attachment 373058
--> https://bugs.webkit.org/attachment.cgi?id=373058
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=373058&action=review
> Source/WebCore/platform/mediastream/mac/AVVideoCaptureSource.mm:129
> +#if PLATFORM(MAC)
> + AVCaptureDeviceManager::singleton().addVideoCaptureSource(*this);
> +#endif
We should try to minimize the differences between real and mock sources as much
as possible, so even though iOS can currently only have one camera active at a
time it would be better to have this and
VideoCaptureSourceFactoryMac::existingSource be the same on both platforms.
> Source/WebCore/platform/mock/MockRealtimeMediaSourceCenter.cpp:131
> + case CaptureDevice::DeviceType::Window: {
> + auto source = MockRealtimeVideoSource::create(String {
device.persistentId() }, String { device.label() }, String { });
> + if (constraints) {
> + auto result = source->applyConstraints(*constraints);
> + if (result)
> + return WTFMove(result.value().badConstraint);
> + }
> + return CaptureSourceOrError {
RealtimeVideoSource::create(source.releaseNonNull()) };
> + }
> break;
Nit: the "break" isn't needed.
More information about the webkit-reviews
mailing list