Skip to content

Commit 1ce3455

Browse files
committed
[GStreamer] 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 c0067e9 commit 1ce3455

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
@@ -2546,7 +2546,6 @@ void MediaPlayerPrivateGStreamer::configureParsebin(GstElement* parsebin)
25462546
G_CALLBACK(+[](GstElement*, GstPad*, GstCaps* caps, GstElementFactory* factory, MediaPlayerPrivateGStreamer* player) -> unsigned {
25472547
static auto tryAutoPlug = *gstGetAutoplugSelectResult("try"_s);
25482548
static auto skipAutoPlug = *gstGetAutoplugSelectResult("skip"_s);
2549-
static auto exposeAutoPlug = *gstGetAutoplugSelectResult("expose"_s);
25502549

25512550
auto name = StringView::fromLatin1(gst_plugin_feature_get_name(GST_PLUGIN_FEATURE_CAST(factory)));
25522551
if (name == "webkitthunderparser"_s && player->m_url.protocolIsBlob())
@@ -2563,6 +2562,8 @@ void MediaPlayerPrivateGStreamer::configureParsebin(GstElement* parsebin)
25632562
if (!isParsed || !*isParsed)
25642563
return tryAutoPlug;
25652564

2565+
#if GST_CHECK_VERSION(1, 20, 0)
2566+
static auto exposeAutoPlug = *gstGetAutoplugSelectResult("expose"_s);
25662567
auto& scanner = GStreamerRegistryScanner::singleton();
25672568
GUniquePtr<char> gstCodecName(gst_codec_utils_caps_get_mime_codec(caps));
25682569
auto codecName = String::fromUTF8(gstCodecName.get());
@@ -2575,6 +2576,7 @@ void MediaPlayerPrivateGStreamer::configureParsebin(GstElement* parsebin)
25752576

25762577
if (decoderFactoryAcceptsCaps)
25772578
return exposeAutoPlug;
2579+
#endif
25782580

25792581
return tryAutoPlug;
25802582
}), this);

0 commit comments

Comments
 (0)