Skip to content

[GStreamer] Video element with canvas captureStream source should not…#1688

Open
pgorszkowski-igalia wants to merge 1 commit into
wpe-2.46from
pgorszkowski/2.46/GStreamer-Video-element-with-canvas-captureStream-source-should-not-use-holepunch-rendering
Open

[GStreamer] Video element with canvas captureStream source should not…#1688
pgorszkowski-igalia wants to merge 1 commit into
wpe-2.46from
pgorszkowski/2.46/GStreamer-Video-element-with-canvas-captureStream-source-should-not-use-holepunch-rendering

Conversation

@pgorszkowski-igalia

Copy link
Copy Markdown

… use holepunch rendering

https://bugs.webkit.org/show_bug.cgi?id=316297

Reviewed by Philippe Normand.

Introduce a dedicated Canvas device type in CaptureDevice::DeviceType to distinguish CanvasCaptureMediaStreamTrack sources from Camera sources. Update all switch statements and type checks across the mediastream stack to handle Canvas as a video type.
Disable GStreamer hole-punch rendering for canvas-captured streams since they render via a different path.

No new tests.

There is: ManualTests/mediastream/mediastream-canvas-to-video.html, which can be used to test this change. It should behave in the same way with: WEBKIT_GST_HOLE_PUNCH_QUIRK=fake and without it.

  • Source/WebCore/Modules/mediastream/CanvasCaptureMediaStreamTrack.cpp: (WebCore::CanvasCaptureMediaStreamTrack::Source::Source):
  • Source/WebCore/Modules/mediastream/CanvasCaptureMediaStreamTrack.h:
  • Source/WebCore/Modules/mediastream/MediaDeviceInfo.cpp: (WebCore::toMediaDeviceInfoKind):
  • Source/WebCore/Modules/mediastream/MediaStreamTrack.cpp: (WebCore::MediaStreamTrack::captureState):
  • Source/WebCore/dom/Document.cpp: (WebCore::updateCaptureSourceToPageMutedState):
  • Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: (WebCore::MediaPlayerPrivateGStreamer::isHolePunchRenderingEnabled const):
  • Source/WebCore/platform/mediastream/CaptureDevice.h:
  • Source/WebCore/platform/mediastream/RealtimeMediaSource.cpp: (WebCore::toSourceType):
  • Source/WebCore/platform/mediastream/gstreamer/GStreamerCaptureDeviceManager.cpp: (WebCore::GStreamerCaptureDeviceManager::refreshCaptureDevices):
  • Source/WebCore/platform/mock/MockRealtimeMediaSourceCenter.cpp:

Canonical link: https://commits.webkit.org/315089@main

… use holepunch rendering

https://bugs.webkit.org/show_bug.cgi?id=316297

Reviewed by Philippe Normand.

Introduce a dedicated Canvas device type in CaptureDevice::DeviceType
to distinguish CanvasCaptureMediaStreamTrack sources from Camera sources.
Update all switch statements and type checks across the mediastream stack to
handle Canvas as a video type.
Disable GStreamer hole-punch rendering for canvas-captured streams since they
render via a different path.

No new tests.

There is: ManualTests/mediastream/mediastream-canvas-to-video.html, which can
be used to test this change. It should behave in the same way with:
WEBKIT_GST_HOLE_PUNCH_QUIRK=fake and without it.

* Source/WebCore/Modules/mediastream/CanvasCaptureMediaStreamTrack.cpp:
(WebCore::CanvasCaptureMediaStreamTrack::Source::Source):
* Source/WebCore/Modules/mediastream/CanvasCaptureMediaStreamTrack.h:
* Source/WebCore/Modules/mediastream/MediaDeviceInfo.cpp:
(WebCore::toMediaDeviceInfoKind):
* Source/WebCore/Modules/mediastream/MediaStreamTrack.cpp:
(WebCore::MediaStreamTrack::captureState):
* Source/WebCore/dom/Document.cpp:
(WebCore::updateCaptureSourceToPageMutedState):
* Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::isHolePunchRenderingEnabled const):
* Source/WebCore/platform/mediastream/CaptureDevice.h:
* Source/WebCore/platform/mediastream/RealtimeMediaSource.cpp:
(WebCore::toSourceType):
* Source/WebCore/platform/mediastream/gstreamer/GStreamerCaptureDeviceManager.cpp:
(WebCore::GStreamerCaptureDeviceManager::refreshCaptureDevices):
* Source/WebCore/platform/mock/MockRealtimeMediaSourceCenter.cpp:

Canonical link: https://commits.webkit.org/315089@main
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

1 participant