Diff
Modified: trunk/LayoutTests/ChangeLog (272051 => 272052)
--- trunk/LayoutTests/ChangeLog 2021-01-29 08:49:50 UTC (rev 272051)
+++ trunk/LayoutTests/ChangeLog 2021-01-29 08:53:14 UTC (rev 272052)
@@ -1,3 +1,22 @@
+2021-01-29 Youenn Fablet <[email protected]>
+
+ Use WebRTC GPU process flag for MediaRecorder
+ https://bugs.webkit.org/show_bug.cgi?id=220967
+
+ Reviewed by Eric Carlson.
+
+ Update test to use feature flag instead of internals API.
+ Removing webrtc/video-gpuProcess.html since it is now equivalent to webrtc/video.html.
+
+ * http/wpt/mediarecorder/MediaRecorder-AV-audio-video-dataavailable-gpuprocess.html:
+ * http/wpt/mediarecorder/MediaRecorder-AV-audio-video-dataavailable.html:
+ * http/wpt/mediarecorder/MediaRecorder-requestData.html:
+ * http/wpt/mediarecorder/mute-tracks.html:
+ * http/wpt/mediarecorder/pause-recording.html:
+ * platform/glib/TestExpectations:
+ * webrtc/video-gpuProcess-expected.txt: Deleted.
+ * webrtc/video-gpuProcess.html: Deleted.
+
2021-01-29 Carlos Garcia Campos <[email protected]>
[SOUP] Use a GInputStream to set the request body in preparation for libsoup3
Modified: trunk/LayoutTests/http/wpt/mediarecorder/MediaRecorder-AV-audio-video-dataavailable-gpuprocess.html (272051 => 272052)
--- trunk/LayoutTests/http/wpt/mediarecorder/MediaRecorder-AV-audio-video-dataavailable-gpuprocess.html 2021-01-29 08:49:50 UTC (rev 272051)
+++ trunk/LayoutTests/http/wpt/mediarecorder/MediaRecorder-AV-audio-video-dataavailable-gpuprocess.html 2021-01-29 08:53:14 UTC (rev 272052)
@@ -20,9 +20,6 @@
</canvas>
</div>
<script>
- if (window.internals)
- window.internals.setUseGPUProcessForWebRTC(true);
-
var context;
var drawStartTime;
Modified: trunk/LayoutTests/http/wpt/mediarecorder/MediaRecorder-AV-audio-video-dataavailable.html (272051 => 272052)
--- trunk/LayoutTests/http/wpt/mediarecorder/MediaRecorder-AV-audio-video-dataavailable.html 2021-01-29 08:49:50 UTC (rev 272051)
+++ trunk/LayoutTests/http/wpt/mediarecorder/MediaRecorder-AV-audio-video-dataavailable.html 2021-01-29 08:53:14 UTC (rev 272052)
@@ -1,3 +1,4 @@
+<!-- webkit-test-runner [ WebRTCPlatformCodecsInGPUProcessEnabled=false ] -->
<!doctype html>
<html>
<head>
@@ -19,9 +20,6 @@
</canvas>
</div>
<script>
- if (window.internals)
- window.internals.setUseGPUProcessForWebRTC(false);
-
var context;
var drawStartTime;
Modified: trunk/LayoutTests/http/wpt/mediarecorder/MediaRecorder-requestData.html (272051 => 272052)
--- trunk/LayoutTests/http/wpt/mediarecorder/MediaRecorder-requestData.html 2021-01-29 08:49:50 UTC (rev 272051)
+++ trunk/LayoutTests/http/wpt/mediarecorder/MediaRecorder-requestData.html 2021-01-29 08:53:14 UTC (rev 272052)
@@ -20,9 +20,6 @@
</canvas>
</div>
<script>
- if (window.internals)
- window.internals.setUseGPUProcessForWebRTC(true);
-
var context;
var drawStartTime;
Modified: trunk/LayoutTests/http/wpt/mediarecorder/mute-tracks.html (272051 => 272052)
--- trunk/LayoutTests/http/wpt/mediarecorder/mute-tracks.html 2021-01-29 08:49:50 UTC (rev 272051)
+++ trunk/LayoutTests/http/wpt/mediarecorder/mute-tracks.html 2021-01-29 08:53:14 UTC (rev 272052)
@@ -1,3 +1,4 @@
+<!-- webkit-test-runner [ WebRTCPlatformCodecsInGPUProcessEnabled=false ] -->
<!DOCTYPE html>
<html>
<head>
@@ -12,9 +13,6 @@
<video id="video3" controls></video>
<canvas id="canvas3" width="320" height="240"></canvas>
<script>
-if (window.internals)
- window.internals.setUseGPUProcessForWebRTC(false);
-
function analyseAudio(streamOrVideo, duration, context)
{
return new Promise((resolve, reject) => {
Modified: trunk/LayoutTests/http/wpt/mediarecorder/pause-recording.html (272051 => 272052)
--- trunk/LayoutTests/http/wpt/mediarecorder/pause-recording.html 2021-01-29 08:49:50 UTC (rev 272051)
+++ trunk/LayoutTests/http/wpt/mediarecorder/pause-recording.html 2021-01-29 08:53:14 UTC (rev 272052)
@@ -1,3 +1,4 @@
+<!-- webkit-test-runner [ WebRTCPlatformCodecsInGPUProcessEnabled=false ] -->
<!DOCTYPE html>
<html>
<head>
@@ -9,9 +10,6 @@
<body>
<video id="video1" controls></video>
<script>
-if (window.internals)
- window.internals.setUseGPUProcessForWebRTC(false);
-
function waitFor(duration)
{
return new Promise((resolve) => setTimeout(resolve, duration));
Modified: trunk/LayoutTests/platform/glib/TestExpectations (272051 => 272052)
--- trunk/LayoutTests/platform/glib/TestExpectations 2021-01-29 08:49:50 UTC (rev 272051)
+++ trunk/LayoutTests/platform/glib/TestExpectations 2021-01-29 08:53:14 UTC (rev 272052)
@@ -942,9 +942,6 @@
webkit.org/b/206464 webkit.org/b/218787 webrtc/peerconnection-page-cache-long.html [ Failure Pass Timeout ]
webkit.org/b/206464 webkit.org/b/218787 webrtc/peerconnection-page-cache.html [ Failure Pass Timeout ]
-webkit.org/b/206583 [ Release ] webrtc/video-gpuProcess.html [ Failure ]
-webkit.org/b/206583 [ Debug ] webrtc/video-gpuProcess.html [ Timeout ]
-
webkit.org/b/208125 webrtc/peerconnection-new-candidate-page-cache.html [ Failure Timeout ]
webkit.org/b/209163 webrtc/audio-video-element-playing.html [ Crash Failure Pass ]
Deleted: trunk/LayoutTests/webrtc/video-gpuProcess-expected.txt (272051 => 272052)
--- trunk/LayoutTests/webrtc/video-gpuProcess-expected.txt 2021-01-29 08:49:50 UTC (rev 272051)
+++ trunk/LayoutTests/webrtc/video-gpuProcess-expected.txt 2021-01-29 08:53:14 UTC (rev 272052)
@@ -1,6 +0,0 @@
-
-
-PASS Basic video exchange
-PASS Call setParameters to disable sending a given encoding
-PASS Call setParameters to reenable sending a given encoding
-
Deleted: trunk/LayoutTests/webrtc/video-gpuProcess.html (272051 => 272052)
--- trunk/LayoutTests/webrtc/video-gpuProcess.html 2021-01-29 08:49:50 UTC (rev 272051)
+++ trunk/LayoutTests/webrtc/video-gpuProcess.html 2021-01-29 08:53:14 UTC (rev 272052)
@@ -1,129 +0,0 @@
-<!doctype html>
-<html>
- <head>
- <meta charset="utf-8">
- <title>Video exchange using GPU process</title>
- <script src=""
- <script src=""
- </head>
- <body>
- <video id="video" autoplay=""></video>
- <canvas id="canvas" width="640" height="480"></canvas>
- <script src =""
- <script>
-if (window.internals)
- internals.setUseGPUProcessForWebRTC(true);
-
-video = document.getElementById("video");
-canvas = document.getElementById("canvas");
-
-function grabFrameData(x, y, w, h)
-{
- canvas.width = video.videoWidth;
- canvas.height = video.videoHeight;
-
- canvas.getContext('2d').drawImage(video, x, y, w, h, x, y, w, h);
- return canvas.getContext('2d').getImageData(x, y, w, h).data;
-}
-
-function testImage()
-{
- const data = "" 325, 250, 1);
-
- var index = 20;
- assert_true(data[index] < 100);
- assert_true(data[index + 1] < 100);
- assert_true(data[index + 2] < 100);
-
- index = 80;
- assert_true(data[index] > 200);
- assert_true(data[index + 1] > 200);
- assert_true(data[index + 2] > 200);
-
- index += 80;
- assert_true(data[index] > 200);
- assert_true(data[index + 1] > 200);
- assert_true(data[index + 2] < 100);
-}
-
-var pc1, pc2;
-promise_test(async (test) => {
- if (window.testRunner)
- testRunner.setUserMediaPermission(true);
-
- const localStream = await navigator.mediaDevices.getUserMedia({video: {advanced: [{width:{min:640}}, {height:{min:480} } ]}});
- if (window.internals)
- assert_true(internals.pageMediaState().includes('HasActiveVideoCaptureDevice'), "Unexpected HasActiveVideoCaptureDevice");
- const stream = await new Promise((resolve, reject) => {
- createConnections((firstConnection) => {
- pc1 = firstConnection;
- firstConnection.addTrack(localStream.getVideoTracks()[0], localStream);
- }, (secondConnection) => {
- pc2 = secondConnection;
- secondConnection._ontrack_ = (trackEvent) => {
- assert_true(trackEvent.track instanceof MediaStreamTrack);
- assert_true(trackEvent.receiver instanceof RTCRtpReceiver);
- assert_true(Array.isArray(trackEvent.streams), "Array.isArray() should return true");
- assert_true(Object.isFrozen(trackEvent.streams), "Object.isFrozen() should return true");
- assert_equals(trackEvent.track.id, localStream.getVideoTracks()[0].id);
- assert_equals(trackEvent.track, trackEvent.streams[0].getVideoTracks()[0]);
- resolve(trackEvent.streams[0]);
- };
- });
- setTimeout(() => reject("Test timed out"), 5000);
- });
-
- video.srcObject = stream;
- await video.play();
-
- testImage();
-}, "Basic video exchange");
-
-function getCircleImageData()
-{
- return grabFrameData(450, 100, 150, 100);
-}
-
-async function checkVideoIsUpdated(shouldBeUpdated, count, referenceData)
-{
- if (count === undefined)
- count = 0;
- else if (count >= 20)
- return Promise.reject("checkVideoIsUpdated timed out :" + shouldBeUpdated + " " + count);
-
- if (referenceData === undefined)
- referenceData = getCircleImageData();
-
- await waitFor(200);
- const newData = getCircleImageData();
-
- if (shouldBeUpdated === (JSON.stringify(referenceData) !== JSON.stringify(newData)))
- return;
-
- await checkVideoIsUpdated(shouldBeUpdated, ++count, newData);
-}
-
-promise_test(async (test) => {
- const sender = pc1.getSenders()[0];
- let p = sender.getParameters();
- p.encodings[0].active = false;
- await sender.setParameters(p);
-
- assert_false(sender.getParameters().encodings[0].active, "encodings[0].active should be false");
-
- await checkVideoIsUpdated(false);
-}, "Call setParameters to disable sending a given encoding");
-
-promise_test(async (test) => {
- const sender = pc1.getSenders()[0];
- let p = sender.getParameters();
- p.encodings[0].active = true;
- await sender.setParameters(p);
-
- assert_true(sender.getParameters().encodings[0].active, "encodings[0].active should be true");
-
- await checkVideoIsUpdated(true);
-}, "Call setParameters to reenable sending a given encoding");
- </script>
- </body>
-</html>
Modified: trunk/Source/WebCore/ChangeLog (272051 => 272052)
--- trunk/Source/WebCore/ChangeLog 2021-01-29 08:49:50 UTC (rev 272051)
+++ trunk/Source/WebCore/ChangeLog 2021-01-29 08:53:14 UTC (rev 272052)
@@ -1,3 +1,18 @@
+2021-01-29 Youenn Fablet <[email protected]>
+
+ Use WebRTC GPU process flag for MediaRecorder
+ https://bugs.webkit.org/show_bug.cgi?id=220967
+
+ Reviewed by Eric Carlson.
+
+ Remove Internals::setUseGPUProcessForWebRTC and rely on WebRTC codec feature flag.
+
+ * Modules/mediarecorder/MediaRecorderProvider.h:
+ * testing/Internals.cpp:
+ (WebCore::Internals::setUseGPUProcessForWebRTC): Deleted.
+ * testing/Internals.h:
+ * testing/Internals.idl:
+
2021-01-29 Carlos Garcia Campos <[email protected]>
[SOUP] Use a GInputStream to set the request body in preparation for libsoup3
Modified: trunk/Source/WebCore/Modules/mediarecorder/MediaRecorderProvider.h (272051 => 272052)
--- trunk/Source/WebCore/Modules/mediarecorder/MediaRecorderProvider.h 2021-01-29 08:49:50 UTC (rev 272051)
+++ trunk/Source/WebCore/Modules/mediarecorder/MediaRecorderProvider.h 2021-01-29 08:53:14 UTC (rev 272052)
@@ -43,11 +43,6 @@
virtual std::unique_ptr<MediaRecorderPrivate> createMediaRecorderPrivate(MediaStreamPrivate&, const MediaRecorderPrivateOptions&);
virtual bool isSupported(const String&);
#endif
-
- void setUseGPUProcess(bool value) { m_useGPUProcess = value; }
-
-protected:
- bool m_useGPUProcess { false };
};
}
Modified: trunk/Source/WebCore/testing/Internals.cpp (272051 => 272052)
--- trunk/Source/WebCore/testing/Internals.cpp 2021-01-29 08:49:50 UTC (rev 272051)
+++ trunk/Source/WebCore/testing/Internals.cpp 2021-01-29 08:53:14 UTC (rev 272052)
@@ -1606,17 +1606,7 @@
#endif
}
-void Internals::setUseGPUProcessForWebRTC(bool useGPUProcess)
-{
-#if USE(LIBWEBRTC)
- auto* document = contextDocument();
- if (!document || !document->page())
- return;
-
- document->page()->mediaRecorderProvider().setUseGPUProcess(useGPUProcess);
#endif
-}
-#endif
#if ENABLE(MEDIA_STREAM)
void Internals::setShouldInterruptAudioOnPageVisibilityChange(bool shouldInterrupt)
Modified: trunk/Source/WebCore/testing/Internals.h (272051 => 272052)
--- trunk/Source/WebCore/testing/Internals.h 2021-01-29 08:49:50 UTC (rev 272051)
+++ trunk/Source/WebCore/testing/Internals.h 2021-01-29 08:53:14 UTC (rev 272052)
@@ -615,7 +615,6 @@
uint64_t sframeKeyId(const RTCRtpSFrameTransform&);
void setEnableWebRTCEncryption(bool);
void setUseDTLS10(bool);
- void setUseGPUProcessForWebRTC(bool);
#endif
String getImageSourceURL(Element&);
Modified: trunk/Source/WebCore/testing/Internals.idl (272051 => 272052)
--- trunk/Source/WebCore/testing/Internals.idl 2021-01-29 08:49:50 UTC (rev 272051)
+++ trunk/Source/WebCore/testing/Internals.idl 2021-01-29 08:53:14 UTC (rev 272052)
@@ -717,7 +717,6 @@
[Conditional=WEB_RTC] undefined clearPeerConnectionFactory();
[Conditional=WEB_RTC] undefined setEnableWebRTCEncryption(boolean enabled);
[Conditional=WEB_RTC] undefined setUseDTLS10(boolean use);
- [Conditional=WEB_RTC] undefined setUseGPUProcessForWebRTC(boolean use);
[Conditional=VIDEO] undefined simulateSystemSleep();
[Conditional=VIDEO] undefined simulateSystemWake();
Modified: trunk/Source/WebKit/ChangeLog (272051 => 272052)
--- trunk/Source/WebKit/ChangeLog 2021-01-29 08:49:50 UTC (rev 272051)
+++ trunk/Source/WebKit/ChangeLog 2021-01-29 08:53:14 UTC (rev 272052)
@@ -1,5 +1,15 @@
2021-01-29 Youenn Fablet <[email protected]>
+ Use WebRTC GPU process flag for MediaRecorder
+ https://bugs.webkit.org/show_bug.cgi?id=220967
+
+ Reviewed by Eric Carlson.
+
+ * WebProcess/GPU/webrtc/MediaRecorderProvider.cpp:
+ (WebKit::MediaRecorderProvider::createMediaRecorderPrivate):
+
+2021-01-29 Youenn Fablet <[email protected]>
+
Recover audio and video capture from GPUProcess crash
https://bugs.webkit.org/show_bug.cgi?id=221086
Modified: trunk/Source/WebKit/WebProcess/GPU/webrtc/MediaRecorderProvider.cpp (272051 => 272052)
--- trunk/Source/WebKit/WebProcess/GPU/webrtc/MediaRecorderProvider.cpp 2021-01-29 08:49:50 UTC (rev 272051)
+++ trunk/Source/WebKit/WebProcess/GPU/webrtc/MediaRecorderProvider.cpp 2021-01-29 08:53:14 UTC (rev 272052)
@@ -30,6 +30,7 @@
#include "MediaRecorderPrivate.h"
#include <WebCore/MediaRecorderPrivate.h>
+#include <WebCore/RuntimeEnabledFeatures.h>
namespace WebKit {
using namespace WebCore;
@@ -37,7 +38,7 @@
std::unique_ptr<WebCore::MediaRecorderPrivate> MediaRecorderProvider::createMediaRecorderPrivate(MediaStreamPrivate& stream, const MediaRecorderPrivateOptions& options)
{
#if ENABLE(GPU_PROCESS) && HAVE(AVASSETWRITERDELEGATE)
- if (m_useGPUProcess)
+ if (RuntimeEnabledFeatures::sharedFeatures().webRTCPlatformCodecsInGPUProcessEnabled())
return makeUnique<MediaRecorderPrivate>(stream, options);
#endif
return WebCore::MediaRecorderProvider::createMediaRecorderPrivate(stream, options);