Title: [278764] trunk
- Revision
- 278764
- Author
- you...@apple.com
- Date
- 2021-06-11 10:25:40 -0700 (Fri, 11 Jun 2021)
Log Message
getDisplayMedia API doesn't work
https://bugs.webkit.org/show_bug.cgi?id=226874
<rdar://problem/79134041>
Reviewed by Eric Carlson.
Source/WebCore:
Test: fast/mediastream/getDisplayMedia-frame-rate.html
* platform/mediastream/RealtimeVideoSource.cpp:
(WebCore::RealtimeVideoSource::videoSampleAvailable):
Only apply decimation in case frame rate is set.
LayoutTests:
* fast/mediastream/getDisplayMedia-frame-rate-expected.txt: Added.
* fast/mediastream/getDisplayMedia-frame-rate.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (278763 => 278764)
--- trunk/LayoutTests/ChangeLog 2021-06-11 16:15:18 UTC (rev 278763)
+++ trunk/LayoutTests/ChangeLog 2021-06-11 17:25:40 UTC (rev 278764)
@@ -1,3 +1,14 @@
+2021-06-11 Youenn Fablet <you...@apple.com>
+
+ getDisplayMedia API doesn't work
+ https://bugs.webkit.org/show_bug.cgi?id=226874
+ <rdar://problem/79134041>
+
+ Reviewed by Eric Carlson.
+
+ * fast/mediastream/getDisplayMedia-frame-rate-expected.txt: Added.
+ * fast/mediastream/getDisplayMedia-frame-rate.html: Added.
+
2021-06-11 Alex Christensen <achristen...@webkit.org>
EventSource.constructor throws an exception when the url param is an empty string
Added: trunk/LayoutTests/fast/mediastream/getDisplayMedia-frame-rate-expected.txt (0 => 278764)
--- trunk/LayoutTests/fast/mediastream/getDisplayMedia-frame-rate-expected.txt (rev 0)
+++ trunk/LayoutTests/fast/mediastream/getDisplayMedia-frame-rate-expected.txt 2021-06-11 17:25:40 UTC (rev 278764)
@@ -0,0 +1,3 @@
+
+PASS Ensure getDisplayMedia generate frames
+
Added: trunk/LayoutTests/fast/mediastream/getDisplayMedia-frame-rate.html (0 => 278764)
--- trunk/LayoutTests/fast/mediastream/getDisplayMedia-frame-rate.html (rev 0)
+++ trunk/LayoutTests/fast/mediastream/getDisplayMedia-frame-rate.html 2021-06-11 17:25:40 UTC (rev 278764)
@@ -0,0 +1,24 @@
+<!doctype html>
+<html>
+ <head>
+ <meta charset="utf-8">
+ <title>getDisplayMedia and frame rate</title>
+ <script src=""
+ <script src=""
+ <script src=""
+ </head>
+ <body>
+ <script>
+promise_test(async () => {
+ if (!window.internals)
+ return;
+
+ const stream = await callGetDisplayMedia({ video: true });
+ internals.observeMediaStreamTrack(stream.getVideoTracks()[0]);
+ let currentCount = internals.trackVideoSampleCount;
+ while (currentCount === internals.trackVideoSampleCount)
+ await new Promise(resolve => setTimeout(resolve, 50));
+}, "Ensure getDisplayMedia generate frames");
+ </script>
+ </body>
+</html>
Modified: trunk/Source/WebCore/ChangeLog (278763 => 278764)
--- trunk/Source/WebCore/ChangeLog 2021-06-11 16:15:18 UTC (rev 278763)
+++ trunk/Source/WebCore/ChangeLog 2021-06-11 17:25:40 UTC (rev 278764)
@@ -1,3 +1,17 @@
+2021-06-11 Youenn Fablet <you...@apple.com>
+
+ getDisplayMedia API doesn't work
+ https://bugs.webkit.org/show_bug.cgi?id=226874
+ <rdar://problem/79134041>
+
+ Reviewed by Eric Carlson.
+
+ Test: fast/mediastream/getDisplayMedia-frame-rate.html
+
+ * platform/mediastream/RealtimeVideoSource.cpp:
+ (WebCore::RealtimeVideoSource::videoSampleAvailable):
+ Only apply decimation in case frame rate is set.
+
2021-06-11 Alex Christensen <achristen...@webkit.org>
EventSource.constructor throws an exception when the url param is an empty string
Modified: trunk/Source/WebCore/platform/mediastream/RealtimeVideoSource.cpp (278763 => 278764)
--- trunk/Source/WebCore/platform/mediastream/RealtimeVideoSource.cpp 2021-06-11 16:15:18 UTC (rev 278763)
+++ trunk/Source/WebCore/platform/mediastream/RealtimeVideoSource.cpp 2021-06-11 17:25:40 UTC (rev 278764)
@@ -183,7 +183,8 @@
if (m_frameDecimation > 1 && ++m_frameDecimationCounter % m_frameDecimation)
return;
- m_frameDecimation = static_cast<size_t>(m_source->observedFrameRate() / frameRate());
+ auto frameRate = this->frameRate();
+ m_frameDecimation = frameRate ? static_cast<size_t>(m_source->observedFrameRate() / frameRate) : 1;
if (!m_frameDecimation)
m_frameDecimation = 1;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes