Title: [287386] trunk
Revision
287386
Author
[email protected]
Date
2021-12-23 00:46:14 -0800 (Thu, 23 Dec 2021)

Log Message

[GStreamer] test fast/mediastream/get-display-media-settings.html fails
https://bugs.webkit.org/show_bug.cgi?id=233879

Patch by Philippe Normand <[email protected]> on 2021-12-23
Reviewed by Youenn Fablet.

Source/WebCore:

Pass down hashSalt to GStreamer display mock capture source and
advertise its deviceId as supported constraint.

* platform/mediastream/gstreamer/MockRealtimeVideoSourceGStreamer.cpp:
(WebCore::MockDisplayCaptureSourceGStreamer::create):
(WebCore::MockDisplayCaptureSourceGStreamer::MockDisplayCaptureSourceGStreamer):
(WebCore::MockDisplayCaptureSourceGStreamer::settings):
* platform/mediastream/gstreamer/MockRealtimeVideoSourceGStreamer.h:
* platform/mock/MockRealtimeMediaSourceCenter.cpp:

LayoutTests:

* platform/glib/TestExpectations:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (287385 => 287386)


--- trunk/LayoutTests/ChangeLog	2021-12-23 07:14:55 UTC (rev 287385)
+++ trunk/LayoutTests/ChangeLog	2021-12-23 08:46:14 UTC (rev 287386)
@@ -1,3 +1,12 @@
+2021-12-23  Philippe Normand  <[email protected]>
+
+        [GStreamer] test fast/mediastream/get-display-media-settings.html fails
+        https://bugs.webkit.org/show_bug.cgi?id=233879
+
+        Reviewed by Youenn Fablet.
+
+        * platform/glib/TestExpectations:
+
 2021-12-22  Aditya Keerthi  <[email protected]>
 
         [iOS] metromile.com <select> dropdowns open twice

Modified: trunk/LayoutTests/platform/glib/TestExpectations (287385 => 287386)


--- trunk/LayoutTests/platform/glib/TestExpectations	2021-12-23 07:14:55 UTC (rev 287385)
+++ trunk/LayoutTests/platform/glib/TestExpectations	2021-12-23 08:46:14 UTC (rev 287386)
@@ -1365,8 +1365,6 @@
 
 webkit.org/b/229055 http/wpt/webrtc/sframe-transform-error.html [ Failure ]
 
-webkit.org/b/233879 fast/mediastream/get-display-media-settings.html [ Failure ]
-
 #////////////////////////////////////////////////////////////////////////////////////////
 # End of WebRTC-related bugs
 #////////////////////////////////////////////////////////////////////////////////////////

Modified: trunk/Source/WebCore/ChangeLog (287385 => 287386)


--- trunk/Source/WebCore/ChangeLog	2021-12-23 07:14:55 UTC (rev 287385)
+++ trunk/Source/WebCore/ChangeLog	2021-12-23 08:46:14 UTC (rev 287386)
@@ -1,3 +1,20 @@
+2021-12-23  Philippe Normand  <[email protected]>
+
+        [GStreamer] test fast/mediastream/get-display-media-settings.html fails
+        https://bugs.webkit.org/show_bug.cgi?id=233879
+
+        Reviewed by Youenn Fablet.
+
+        Pass down hashSalt to GStreamer display mock capture source and
+        advertise its deviceId as supported constraint.
+
+        * platform/mediastream/gstreamer/MockRealtimeVideoSourceGStreamer.cpp:
+        (WebCore::MockDisplayCaptureSourceGStreamer::create):
+        (WebCore::MockDisplayCaptureSourceGStreamer::MockDisplayCaptureSourceGStreamer):
+        (WebCore::MockDisplayCaptureSourceGStreamer::settings):
+        * platform/mediastream/gstreamer/MockRealtimeVideoSourceGStreamer.h:
+        * platform/mock/MockRealtimeMediaSourceCenter.cpp:
+
 2021-12-22  Rob Buis  <[email protected]>
 
         RenderLayer WIP

Modified: trunk/Source/WebCore/platform/mediastream/gstreamer/MockRealtimeVideoSourceGStreamer.cpp (287385 => 287386)


--- trunk/Source/WebCore/platform/mediastream/gstreamer/MockRealtimeVideoSourceGStreamer.cpp	2021-12-23 07:14:55 UTC (rev 287385)
+++ trunk/Source/WebCore/platform/mediastream/gstreamer/MockRealtimeVideoSourceGStreamer.cpp	2021-12-23 08:46:14 UTC (rev 287386)
@@ -50,9 +50,9 @@
     return CaptureSourceOrError(RealtimeVideoSource::create(WTFMove(source)));
 }
 
-CaptureSourceOrError MockDisplayCaptureSourceGStreamer::create(const CaptureDevice& device, const MediaConstraints* constraints)
+CaptureSourceOrError MockDisplayCaptureSourceGStreamer::create(const CaptureDevice& device, String&& hashSalt, const MediaConstraints* constraints)
 {
-    auto mockSource = adoptRef(*new MockRealtimeVideoSourceGStreamer(String { device.persistentId() }, String { device.label() }, { }));
+    auto mockSource = adoptRef(*new MockRealtimeVideoSourceGStreamer(String { device.persistentId() }, String { device.label() }, WTFMove(hashSalt)));
 
     if (constraints) {
         if (auto error = mockSource->applyConstraints(*constraints))
@@ -59,12 +59,12 @@
             return WTFMove(error.value().badConstraint);
     }
 
-    auto source = adoptRef(*new MockDisplayCaptureSourceGStreamer(WTFMove(mockSource), device.type()));
+    auto source = adoptRef(*new MockDisplayCaptureSourceGStreamer(WTFMove(mockSource), WTFMove(hashSalt), device.type()));
     return CaptureSourceOrError(WTFMove(source));
 }
 
-MockDisplayCaptureSourceGStreamer::MockDisplayCaptureSourceGStreamer(Ref<MockRealtimeVideoSourceGStreamer>&& source, CaptureDevice::DeviceType type)
-    : RealtimeMediaSource(Type::Video, source->name().isolatedCopy())
+MockDisplayCaptureSourceGStreamer::MockDisplayCaptureSourceGStreamer(Ref<MockRealtimeVideoSourceGStreamer>&& source, String&& hashSalt, CaptureDevice::DeviceType type)
+    : RealtimeMediaSource(Type::Video, source->name().isolatedCopy(), source->persistentID().isolatedCopy(), WTFMove(hashSalt))
     , m_source(WTFMove(source))
     , m_type(type)
 {
@@ -119,6 +119,7 @@
         auto size = m_source->size();
         settings.setWidth(size.width());
         settings.setHeight(size.height());
+        settings.setDeviceId(hashedId());
 
         settings.setLogicalSurface(false);
 
@@ -128,6 +129,7 @@
         supportedConstraints.setSupportsHeight(true);
         supportedConstraints.setSupportsDisplaySurface(true);
         supportedConstraints.setSupportsLogicalSurface(true);
+        supportedConstraints.setSupportsDeviceId(true);
 
         settings.setSupportedConstraints(supportedConstraints);
 

Modified: trunk/Source/WebCore/platform/mediastream/gstreamer/MockRealtimeVideoSourceGStreamer.h (287385 => 287386)


--- trunk/Source/WebCore/platform/mediastream/gstreamer/MockRealtimeVideoSourceGStreamer.h	2021-12-23 07:14:55 UTC (rev 287385)
+++ trunk/Source/WebCore/platform/mediastream/gstreamer/MockRealtimeVideoSourceGStreamer.h	2021-12-23 08:46:14 UTC (rev 287386)
@@ -42,7 +42,7 @@
 
 class MockDisplayCaptureSourceGStreamer final : public RealtimeMediaSource, RealtimeMediaSource::VideoSampleObserver {
 public:
-    static CaptureSourceOrError create(const CaptureDevice&, const MediaConstraints*);
+    static CaptureSourceOrError create(const CaptureDevice&, String&&, const MediaConstraints*);
 
     void requestToEnd(Observer&) final;
 
@@ -51,7 +51,7 @@
     void videoSampleAvailable(MediaSample&, VideoSampleMetadata) final;
 
 private:
-    MockDisplayCaptureSourceGStreamer(Ref<MockRealtimeVideoSourceGStreamer>&&, CaptureDevice::DeviceType);
+    MockDisplayCaptureSourceGStreamer(Ref<MockRealtimeVideoSourceGStreamer>&&, String&&, CaptureDevice::DeviceType);
     ~MockDisplayCaptureSourceGStreamer();
 
     void startProducingData() final { m_source->start(); }

Modified: trunk/Source/WebCore/platform/mock/MockRealtimeMediaSourceCenter.cpp (287385 => 287386)


--- trunk/Source/WebCore/platform/mock/MockRealtimeMediaSourceCenter.cpp	2021-12-23 07:14:55 UTC (rev 287385)
+++ trunk/Source/WebCore/platform/mock/MockRealtimeMediaSourceCenter.cpp	2021-12-23 08:46:14 UTC (rev 287386)
@@ -188,7 +188,7 @@
 #if PLATFORM(MAC)
             return DisplayCaptureSourceCocoa::create(UniqueRef<DisplayCaptureSourceCocoa::Capturer>(makeUniqueRef<MockDisplayCapturer>(device)), device, WTFMove(hashSalt), constraints);
 #elif USE(GSTREAMER)
-            return MockDisplayCaptureSourceGStreamer::create(device, constraints);
+            return MockDisplayCaptureSourceGStreamer::create(device, WTFMove(hashSalt), constraints);
 #else
             return MockRealtimeVideoSource::create(String { device.persistentId() }, String { device.label() }, WTFMove(hashSalt), constraints);
 #endif
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to