GNOME Bugzilla – Bug 735443
[Proposal] adjustment of rank by command line option
Last modified: 2018-11-03 12:22:09 UTC
In case of special element with rank zero, there's no way to deploy by gst-launch and autoplugging. If ranks can be set by an option, we can do test simply by command line tool even plugins has zero rank. I suggest "--gst-rank" option for gst_init. However, I failed to find a proper location for this feature so I just modified "gst.c".
Created attachment 284496 [details] [review] gst-rank option
Related to bug #649542
Comment on attachment 284496 [details] [review] gst-rank option Independent of if that approach is a good idea or not, the rank overriding should happen during plugin registration directly. Plugins can be registered at any point after gst_init(), and you would miss them if they are registered afterwards.
The rank can be set anytime even after gst_init , as you mentioned. However, my point is that I want to set rank by command line tool like gst-launch, not by test or toy codes. This idea was started from testing some element which was delivered from third party without test code. Usually, ranks of special decoder element were set as zero to prevent interfering autoplugging. In this case, the only way to test is writing small code with setting rank again. Is there any simple way to achieve my purpose, rather than this patch?
No, but we should add something to make this possible somehow :) For your patch to make more sense you would parse the commandline parameter early in gst_init(), and inside gst_element_register() somewhere you would check if the element that is currently to be registered was inside the rank-override list and in that case use the overriden rank.
Just to let you know that this is already possible to do that with gst-validate (which uses the same synthax as gst-launch) using a simple scenario such as: --- description, is-config=true set-feature-rank, feature-name="someelementfactoryname", rank="primary"; --- From the @set-feature-rank documentation: Action type: Name: set-feature-rank Is config action (meaning it will be executing right at the begining of the execution of the pipeline) Description: Changes the ranking of a particular plugin feature Parametters: feature-name : The name of a GstFeature Possible types: string Mandatory. rank : The GstRank to set on @feature-name Possible types: string, int Mandatory.
Great! I didn't check devtools for gstreamer. Is there any official release version of devtools, or gst-validate?
(In reply to comment #7) > Great! I didn't check devtools for gstreamer. Is there any official release > version of devtools, or gst-validate? There is no release of gst-validate, I am wondering if we should release it as it is a developing tool. My current goal is to stabilize its API (which should not take much more time now).
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gstreamer/issues/72.