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: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6226>
This commit is contained in:
Nirbheek Chauhan 2024-02-27 14:22:58 +05:30 committed by Tim-Philipp Müller
parent a3980f4838
commit cf2238a522
2 changed files with 2 additions and 2 deletions

View file

@ -21859,7 +21859,7 @@
"writable": true "writable": true
} }
}, },
"rank": "none", "rank": "primary",
"signals": { "signals": {
"accept-certificate": { "accept-certificate": {
"args": [ "args": [

View file

@ -510,7 +510,7 @@ static guint gst_rtspsrc_signals[LAST_SIGNAL] = { 0 };
#define gst_rtspsrc_parent_class parent_class #define gst_rtspsrc_parent_class parent_class
G_DEFINE_TYPE_WITH_CODE (GstRTSPSrc, gst_rtspsrc, GST_TYPE_BIN, G_DEFINE_TYPE_WITH_CODE (GstRTSPSrc, gst_rtspsrc, GST_TYPE_BIN,
G_IMPLEMENT_INTERFACE (GST_TYPE_URI_HANDLER, gst_rtspsrc_uri_handler_init)); 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)); GST_TYPE_RTSPSRC, rtsp_element_init (plugin));
#ifndef GST_DISABLE_GST_DEBUG #ifndef GST_DISABLE_GST_DEBUG