Title: [289480] trunk/Source/WebCore
- Revision
- 289480
- Author
- [email protected]
- Date
- 2022-02-09 10:12:49 -0800 (Wed, 09 Feb 2022)
Log Message
[GStreamer] MediaPlayerPrivateGStreamer mishandles failure to create WebKitTextCombiner
https://bugs.webkit.org/show_bug.cgi?id=233230
<rdar://problem/86863068>
Patch by Philippe Normand <[email protected]> on 2022-02-09
Reviewed by Xabier Rodriguez-Calvar.
Fallback to fakesink in case fakevideosink is not available. Also no longer RELEASE_ASSERT
in makeGStreamerElement and makeGStreamerBin. We should gracefully handle call sites when
these functions return nullptr.
* platform/graphics/gstreamer/GStreamerCommon.cpp:
(WebCore::makeGStreamerElement):
(WebCore::makeGStreamerBin):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::createVideoSink):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (289479 => 289480)
--- trunk/Source/WebCore/ChangeLog 2022-02-09 18:05:48 UTC (rev 289479)
+++ trunk/Source/WebCore/ChangeLog 2022-02-09 18:12:49 UTC (rev 289480)
@@ -1,3 +1,21 @@
+2022-02-09 Philippe Normand <[email protected]>
+
+ [GStreamer] MediaPlayerPrivateGStreamer mishandles failure to create WebKitTextCombiner
+ https://bugs.webkit.org/show_bug.cgi?id=233230
+ <rdar://problem/86863068>
+
+ Reviewed by Xabier Rodriguez-Calvar.
+
+ Fallback to fakesink in case fakevideosink is not available. Also no longer RELEASE_ASSERT
+ in makeGStreamerElement and makeGStreamerBin. We should gracefully handle call sites when
+ these functions return nullptr.
+
+ * platform/graphics/gstreamer/GStreamerCommon.cpp:
+ (WebCore::makeGStreamerElement):
+ (WebCore::makeGStreamerBin):
+ * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
+ (WebCore::MediaPlayerPrivateGStreamer::createVideoSink):
+
2022-02-09 Chris Dumez <[email protected]>
Exceptions are not properly reported when initializing a worker as a module
Modified: trunk/Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.cpp (289479 => 289480)
--- trunk/Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.cpp 2022-02-09 18:05:48 UTC (rev 289479)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.cpp 2022-02-09 18:12:49 UTC (rev 289480)
@@ -544,7 +544,8 @@
GstElement* makeGStreamerElement(const char* factoryName, const char* name)
{
auto* element = gst_element_factory_make(factoryName, name);
- RELEASE_ASSERT_WITH_MESSAGE(element, "GStreamer element %s not found. Please install it", factoryName);
+ if (!element)
+ WTFLogAlways("GStreamer element %s not found. Please install it", factoryName);
return element;
}
@@ -552,7 +553,8 @@
{
GUniqueOutPtr<GError> error;
auto* bin = gst_parse_bin_from_description(description, ghostUnlinkedPads, &error.outPtr());
- RELEASE_ASSERT_WITH_MESSAGE(bin, "Unable to create bin for description: \"%s\". Error: %s", description, error->message);
+ if (!bin)
+ WTFLogAlways("Unable to create bin for description: \"%s\". Error: %s", description, error->message);
return bin;
}
Modified: trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp (289479 => 289480)
--- trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp 2022-02-09 18:05:48 UTC (rev 289479)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp 2022-02-09 18:12:49 UTC (rev 289480)
@@ -3491,6 +3491,12 @@
if (!m_player->isVideoPlayer()) {
m_videoSink = makeGStreamerElement("fakevideosink", nullptr);
+ if (!m_videoSink) {
+ GST_DEBUG_OBJECT(m_pipeline.get(), "Falling back to fakesink for video rendering");
+ m_videoSink = gst_element_factory_make("fakesink", nullptr);
+ g_object_set(m_videoSink.get(), "sync", TRUE, nullptr);
+ }
+
return m_videoSink.get();
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes