Skip to content

Commit 58faee6

Browse files
spenapphiln
authored andcommitted
Do not use get_mime_codec for <1.20.0 https://bugs.webkit.org/show_bug.cgi?id=294205
Reviewed by Philippe Normand. gst_codec_utils_caps_get_mime_codec is not available before 1.20.0, so compile it out conditionally, using tryAutoPlug in that case. * Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: (WebCore::MediaPlayerPrivateGStreamer::configureParsebin): Canonical link: https://commits.webkit.org/296032@main
1 parent 4325332 commit 58faee6

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2517,7 +2517,6 @@ void MediaPlayerPrivateGStreamer::configureParsebin(GstElement* parsebin)
25172517
G_CALLBACK(+[](GstElement*, GstPad*, GstCaps* caps, GstElementFactory* factory, MediaPlayerPrivateGStreamer* player) -> unsigned {
25182518
static auto tryAutoPlug = *gstGetAutoplugSelectResult("try"_s);
25192519
static auto skipAutoPlug = *gstGetAutoplugSelectResult("skip"_s);
2520-
static auto exposeAutoPlug = *gstGetAutoplugSelectResult("expose"_s);
25212520

25222521
auto name = StringView::fromLatin1(gst_plugin_feature_get_name(GST_PLUGIN_FEATURE_CAST(factory)));
25232522
if (name == "webkitthunderparser"_s && player->m_url.protocolIsBlob())
@@ -2534,6 +2533,8 @@ void MediaPlayerPrivateGStreamer::configureParsebin(GstElement* parsebin)
25342533
if (!isParsed || !*isParsed)
25352534
return tryAutoPlug;
25362535

2536+
#if GST_CHECK_VERSION(1, 20, 0)
2537+
static auto exposeAutoPlug = *gstGetAutoplugSelectResult("expose"_s);
25372538
auto& scanner = GStreamerRegistryScanner::singleton();
25382539
GUniquePtr<char> gstCodecName(gst_codec_utils_caps_get_mime_codec(caps));
25392540
auto codecName = String::fromUTF8(gstCodecName.get());
@@ -2546,6 +2547,7 @@ void MediaPlayerPrivateGStreamer::configureParsebin(GstElement* parsebin)
25462547

25472548
if (decoderFactoryAcceptsCaps)
25482549
return exposeAutoPlug;
2550+
#endif
25492551

25502552
return tryAutoPlug;
25512553
}), this);

0 commit comments

Comments
 (0)