@@ -985,6 +985,8 @@ void MediaPlayerPrivateGStreamer::syncOnClock(bool sync)
985985#if !USE(WESTEROS_SINK)
986986 setSyncOnClock (videoSink (), sync);
987987 setSyncOnClock (audioSink (), sync);
988+ #else
989+ UNUSED_PARAM (sync);
988990#endif
989991}
990992
@@ -2301,44 +2303,6 @@ void MediaPlayerPrivateGStreamer::configureElementPlatformQuirks(GstElement* ele
23012303#endif
23022304#endif
23032305
2304- #if USE(WESTEROS_SINK)
2305- static GstCaps* westerosSinkCaps = nullptr ;
2306- static GType westerosSinkType = G_TYPE_INVALID;
2307- static std::once_flag onceFlag;
2308- std::call_once (onceFlag, [] {
2309- GRefPtr<GstElementFactory> westerosfactory = adoptGRef (gst_element_factory_find (" westerossink" ));
2310- if (westerosfactory) {
2311- gst_object_unref (gst_plugin_feature_load (GST_PLUGIN_FEATURE (westerosfactory.get ())));
2312- westerosSinkType = gst_element_factory_get_element_type (westerosfactory.get ());
2313- for (auto * t = gst_element_factory_get_static_pad_templates (westerosfactory.get ()); t; t = g_list_next (t)) {
2314- GstStaticPadTemplate* padtemplate = static_cast <GstStaticPadTemplate*>(t->data );
2315- if (padtemplate->direction != GST_PAD_SINK)
2316- continue ;
2317- if (westerosSinkCaps)
2318- westerosSinkCaps = gst_caps_merge (westerosSinkCaps, gst_static_caps_get (&padtemplate->static_caps ));
2319- else
2320- westerosSinkCaps = gst_static_caps_get (&padtemplate->static_caps );
2321- }
2322- }
2323- });
2324- #if ENABLE(MEDIA_STREAM)
2325- if (G_TYPE_CHECK_INSTANCE_TYPE (G_OBJECT (element), westerosSinkType)) {
2326- if (m_streamPrivate && gstObjectHasProperty (element, " immediate-output" )) {
2327- GST_DEBUG_OBJECT (pipeline (), " Enable 'immediate-output' in WesterosSink" );
2328- g_object_set (G_OBJECT (element), " immediate-output" , TRUE , nullptr );
2329- }
2330- }
2331- #endif
2332- // FIXME: Following is a hack needed to get westeros-sink autoplug correctly with playbin3.
2333- if (!m_isLegacyPlaybin && westerosSinkCaps && g_str_has_prefix (GST_ELEMENT_NAME (element), " uridecodebin3" )) {
2334- GRefPtr<GstCaps> defaultCaps;
2335- g_object_get (element, " caps" , &defaultCaps.outPtr (), NULL );
2336- defaultCaps = adoptGRef (gst_caps_merge (gst_caps_ref (westerosSinkCaps), defaultCaps.leakRef ()));
2337- g_object_set (element, " caps" , defaultCaps.get (), NULL );
2338- GST_INFO_OBJECT (pipeline (), " setting stop caps tp %" GST_PTR_FORMAT, defaultCaps.get ());
2339- }
2340- #endif
2341-
23422306#if ENABLE(MEDIA_STREAM) && PLATFORM(REALTEK)
23432307 if (m_streamPrivate) {
23442308 if (gstObjectHasProperty (element, " media-tunnel" )) {
0 commit comments