Title: [294243] trunk/Source/WebCore
- Revision
- 294243
- Author
- commit-qu...@webkit.org
- Date
- 2022-05-16 10:53:21 -0700 (Mon, 16 May 2022)
Log Message
REGRESSION(r294104): [GStreamer][VideoCapture] Webcam raw streams may hang up the video capture pipeline
https://bugs.webkit.org/show_bug.cgi?id=240456
Patch by Loïc Le Page <llep...@igalia.com> on 2022-05-16
Reviewed by Philippe Normand.
When capturing a raw stream from a webcam, the pipeline may hang up because the decodebin3 cannot fix the upstream caps.
The webcam capsfilter should not only specify the captured mime-type (video/x-raw) but also the capture image dimensions.
Manually tested.
* platform/mediastream/gstreamer/GStreamerVideoCapturer.cpp:
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (294242 => 294243)
--- trunk/Source/WebCore/ChangeLog 2022-05-16 17:48:17 UTC (rev 294242)
+++ trunk/Source/WebCore/ChangeLog 2022-05-16 17:53:21 UTC (rev 294243)
@@ -1,3 +1,17 @@
+2022-05-16 Loïc Le Page <llep...@igalia.com>
+
+ REGRESSION(r294104): [GStreamer][VideoCapture] Webcam raw streams may hang up the video capture pipeline
+ https://bugs.webkit.org/show_bug.cgi?id=240456
+
+ Reviewed by Philippe Normand.
+
+ When capturing a raw stream from a webcam, the pipeline may hang up because the decodebin3 cannot fix the upstream caps.
+ The webcam capsfilter should not only specify the captured mime-type (video/x-raw) but also the capture image dimensions.
+
+ Manually tested.
+
+ * platform/mediastream/gstreamer/GStreamerVideoCapturer.cpp:
+
2022-05-16 Alan Bujtas <za...@apple.com>
[LFC][FFC] Add support for logical ordering
Modified: trunk/Source/WebCore/platform/mediastream/gstreamer/GStreamerVideoCapturer.cpp (294242 => 294243)
--- trunk/Source/WebCore/platform/mediastream/gstreamer/GStreamerVideoCapturer.cpp 2022-05-16 17:48:17 UTC (rev 294242)
+++ trunk/Source/WebCore/platform/mediastream/gstreamer/GStreamerVideoCapturer.cpp 2022-05-16 17:53:21 UTC (rev 294243)
@@ -317,6 +317,9 @@
if (*width >= selector->stopCondition.width && *height >= selector->stopCondition.height
&& *frameRate >= selector->stopCondition.frameRate) {
+ selector->maxWidth = *width;
+ selector->maxHeight = *height;
+ selector->maxFrameRate = *frameRate;
selector->mimeType = gst_structure_get_name(structure);
selector->format = gst_structure_get_string(structure, "format");
return FALSE;
@@ -333,7 +336,8 @@
return TRUE;
}), &selector);
- auto caps = adoptGRef(gst_caps_new_empty_simple(selector.mimeType));
+ auto caps = adoptGRef(gst_caps_new_simple(selector.mimeType, "width", G_TYPE_INT, selector.maxWidth,
+ "height", G_TYPE_INT, selector.maxHeight, nullptr));
// Workaround for https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/1793.
if (selector.format)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes