[MediaStream] AVVideoCaptureSource reports incorrect size when frames are scaled
authoreric.carlson@apple.com <eric.carlson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 9 Nov 2018 21:26:16 +0000 (21:26 +0000)
committereric.carlson@apple.com <eric.carlson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 9 Nov 2018 21:26:16 +0000 (21:26 +0000)
commit446e8facebabd01829ce4f96e26a856cade95c40
treed8084829a882a5ca83d737f482a37bbb8a393241
parent007f6b2f03baa984ba6702e5784c91fc5a075109
[MediaStream] AVVideoCaptureSource reports incorrect size when frames are scaled
https://bugs.webkit.org/show_bug.cgi?id=191479
<rdar://problem/45952201>

Reviewed by Jer Noble.

No new tests, tested manually.

* platform/mediastream/RealtimeVideoSource.cpp:
(WebCore::RealtimeVideoSource::standardVideoSizes): Drive-by fix: add a few more standard
video frame sizes, correct a typo.
(WebCore::RealtimeVideoSource::bestSupportedSizeAndFrameRate): Drive-by fix: don't consider
rescaled sized when we already have an exact or aspect ratio match because it won't be used.

* platform/mediastream/mac/AVVideoCaptureSource.h:
(WebCore::AVVideoCaptureSource::width const): Deleted.
(WebCore::AVVideoCaptureSource::height const): Deleted.
* platform/mediastream/mac/AVVideoCaptureSource.mm:
(WebCore::AVVideoCaptureSource::setSizeAndFrameRateWithPreset): Delete m_requestedSize.
(WebCore::AVVideoCaptureSource::shutdownCaptureSession): Delete m_width and m_height.
(WebCore::AVVideoCaptureSource::processNewFrame): Don't call setSize with captured size,
the frame may be resized before deliver.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@238053 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/mediastream/RealtimeVideoSource.cpp
Source/WebCore/platform/mediastream/mac/AVVideoCaptureSource.h
Source/WebCore/platform/mediastream/mac/AVVideoCaptureSource.mm