From 1e384e5414b3c70d57c3855caf28dc14ee6b27a4 Mon Sep 17 00:00:00 2001 From: Nirbheek Chauhan Date: Tue, 27 Feb 2024 14:22:58 +0530 Subject: [PATCH] rtspsrc: Increase rank to PRIMARY for autoplug purposes This affects autoplug by gst_element_make_from_uri() in, for example, uridecodebin. The element should've already been PRIMARY rank, but it was NONE because gst_element_make_from_uri() doesn't ignore NONE rank elements when searching for element factories, unlike decodebin. Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/issues/502 Part-of: --- subprojects/gst-plugins-good/docs/gst_plugins_cache.json | 2 +- subprojects/gst-plugins-good/gst/rtsp/gstrtspsrc.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/subprojects/gst-plugins-good/docs/gst_plugins_cache.json b/subprojects/gst-plugins-good/docs/gst_plugins_cache.json index 68ec2f404b..18e181b63a 100644 --- a/subprojects/gst-plugins-good/docs/gst_plugins_cache.json +++ b/subprojects/gst-plugins-good/docs/gst_plugins_cache.json @@ -21288,7 +21288,7 @@ "writable": true } }, - "rank": "none", + "rank": "primary", "signals": { "accept-certificate": { "args": [ diff --git a/subprojects/gst-plugins-good/gst/rtsp/gstrtspsrc.c b/subprojects/gst-plugins-good/gst/rtsp/gstrtspsrc.c index aa35666159..75da188acd 100644 --- a/subprojects/gst-plugins-good/gst/rtsp/gstrtspsrc.c +++ b/subprojects/gst-plugins-good/gst/rtsp/gstrtspsrc.c @@ -507,7 +507,7 @@ static guint gst_rtspsrc_signals[LAST_SIGNAL] = { 0 }; #define gst_rtspsrc_parent_class parent_class G_DEFINE_TYPE_WITH_CODE (GstRTSPSrc, gst_rtspsrc, GST_TYPE_BIN, G_IMPLEMENT_INTERFACE (GST_TYPE_URI_HANDLER, gst_rtspsrc_uri_handler_init)); -GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (rtspsrc, "rtspsrc", GST_RANK_NONE, +GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (rtspsrc, "rtspsrc", GST_RANK_PRIMARY, GST_TYPE_RTSPSRC, rtsp_element_init (plugin)); #ifndef GST_DISABLE_GST_DEBUG