Title: [253426] trunk/Source/WebCore
Revision
253426
Author
[email protected]
Date
2019-12-12 06:22:18 -0800 (Thu, 12 Dec 2019)

Log Message

Roll-out part of revision 253275 related to rotation handling
https://bugs.webkit.org/show_bug.cgi?id=205156

Unreviewed.

These changes only work for a remote source, not a local one.
Roll-them out until we have a proper fix.


* platform/mediastream/RealtimeVideoSource.cpp:
(WebCore::m_source):
(WebCore::RealtimeVideoSource::sourceSettingsChanged):
* platform/mediastream/RealtimeVideoSource.h:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (253425 => 253426)


--- trunk/Source/WebCore/ChangeLog	2019-12-12 11:05:34 UTC (rev 253425)
+++ trunk/Source/WebCore/ChangeLog	2019-12-12 14:22:18 UTC (rev 253426)
@@ -1,5 +1,20 @@
 2019-12-12  youenn fablet  <[email protected]>
 
+        Roll-out part of revision 253275 related to rotation handling
+        https://bugs.webkit.org/show_bug.cgi?id=205156
+
+        Unreviewed.
+
+        These changes only work for a remote source, not a local one.
+        Roll-them out until we have a proper fix.
+
+        * platform/mediastream/RealtimeVideoSource.cpp:
+        (WebCore::m_source):
+        (WebCore::RealtimeVideoSource::sourceSettingsChanged):
+        * platform/mediastream/RealtimeVideoSource.h:
+
+2019-12-12  youenn fablet  <[email protected]>
+
         Remove debug ASSERT in PeerConnectionBackend
         https://bugs.webkit.org/show_bug.cgi?id=205061
 

Modified: trunk/Source/WebCore/platform/mediastream/RealtimeVideoSource.cpp (253425 => 253426)


--- trunk/Source/WebCore/platform/mediastream/RealtimeVideoSource.cpp	2019-12-12 11:05:34 UTC (rev 253425)
+++ trunk/Source/WebCore/platform/mediastream/RealtimeVideoSource.cpp	2019-12-12 14:22:18 UTC (rev 253426)
@@ -36,7 +36,6 @@
 {
     m_source->addObserver(*this);
     m_currentSettings = m_source->settings();
-    m_rotation = m_source->sampleRotation();
     setSize(m_source->size());
 }
 
@@ -93,29 +92,13 @@
 
 void RealtimeVideoSource::sourceSettingsChanged()
 {
+    auto rotation = m_source->sampleRotation();
     auto size = this->size();
     if (size.isEmpty())
         size = m_source->size();
+    if (rotation == MediaSample::VideoRotation::Left || rotation == MediaSample::VideoRotation::Right)
+        size = size.transposedSize();
 
-    auto rotation = m_source->sampleRotation();
-    if (m_rotation != rotation) {
-        bool shouldTransposeSize = false;
-        switch (m_rotation) {
-        case MediaSample::VideoRotation::None:
-        case MediaSample::VideoRotation::UpsideDown:
-            shouldTransposeSize = rotation == MediaSample::VideoRotation::Left || rotation == MediaSample::VideoRotation::Right;
-            break;
-        case MediaSample::VideoRotation::Left:
-        case MediaSample::VideoRotation::Right:
-            shouldTransposeSize = rotation == MediaSample::VideoRotation::None || rotation == MediaSample::VideoRotation::UpsideDown;
-        }
-        m_rotation = rotation;
-        if (shouldTransposeSize) {
-            size = size.transposedSize();
-            setSize(size);
-        }
-    }
-
     m_currentSettings.setWidth(size.width());
     m_currentSettings.setHeight(size.height());
 

Modified: trunk/Source/WebCore/platform/mediastream/RealtimeVideoSource.h (253425 => 253426)


--- trunk/Source/WebCore/platform/mediastream/RealtimeVideoSource.h	2019-12-12 11:05:34 UTC (rev 253425)
+++ trunk/Source/WebCore/platform/mediastream/RealtimeVideoSource.h	2019-12-12 14:22:18 UTC (rev 253426)
@@ -64,7 +64,6 @@
     bool preventSourceFromStopping() final;
     void videoSampleAvailable(MediaSample&) final;
 
-    MediaSample::VideoRotation m_rotation { MediaSample::VideoRotation::None };
     Ref<RealtimeVideoCaptureSource> m_source;
     RealtimeMediaSourceSettings m_currentSettings;
 };
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to