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

Patch by Philippe Normand <pnormand@igalia.com> 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:


Canonical link: https://commits.webkit.org/245526@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@287386 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
philn authored and webkit-commit-queue committed Dec 23, 2021
1 parent 5db7853 commit d43fcec9804afabfb946a5c3e6735a792057de15
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 10 deletions.
@@ -1,3 +1,12 @@
2021-12-23 Philippe Normand <pnormand@igalia.com>

[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 <akeerthi@apple.com>

[iOS] metromile.com <select> dropdowns open twice
@@ -1365,8 +1365,6 @@ webkit.org/b/227987 http/tests/media/media-stream/get-display-media-prompt.html

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
#////////////////////////////////////////////////////////////////////////////////////////
@@ -1,3 +1,20 @@
2021-12-23 Philippe Normand <pnormand@igalia.com>

[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 <rbuis@igalia.com>

RenderLayer WIP
@@ -50,21 +50,21 @@ CaptureSourceOrError MockRealtimeVideoSource::create(String&& deviceID, String&&
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))
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 @@ const RealtimeMediaSourceSettings& MockDisplayCaptureSourceGStreamer::settings()
auto size = m_source->size();
settings.setWidth(size.width());
settings.setHeight(size.height());
settings.setDeviceId(hashedId());

settings.setLogicalSurface(false);

@@ -128,6 +129,7 @@ const RealtimeMediaSourceSettings& MockDisplayCaptureSourceGStreamer::settings()
supportedConstraints.setSupportsHeight(true);
supportedConstraints.setSupportsDisplaySurface(true);
supportedConstraints.setSupportsLogicalSurface(true);
supportedConstraints.setSupportsDeviceId(true);

settings.setSupportedConstraints(supportedConstraints);

@@ -42,7 +42,7 @@ class MockRealtimeVideoSourceGStreamer final : public MockRealtimeVideoSource {

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 @@ class MockDisplayCaptureSourceGStreamer final : public RealtimeMediaSource, Real
void videoSampleAvailable(MediaSample&, VideoSampleMetadata) final;

private:
MockDisplayCaptureSourceGStreamer(Ref<MockRealtimeVideoSourceGStreamer>&&, CaptureDevice::DeviceType);
MockDisplayCaptureSourceGStreamer(Ref<MockRealtimeVideoSourceGStreamer>&&, String&&, CaptureDevice::DeviceType);
~MockDisplayCaptureSourceGStreamer();

void startProducingData() final { m_source->start(); }
@@ -188,7 +188,7 @@ class MockRealtimeDisplaySourceFactory : public DisplayCaptureFactory {
#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

0 comments on commit d43fcec

Please sign in to comment.