After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 735443 - [Proposal] adjustment of rank by command line option
[Proposal] adjustment of rank by command line option
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
unspecified
Other Mac OS
: Normal enhancement
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-08-26 11:33 UTC by Justin Kim
Modified: 2018-11-03 12:22 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gst-rank option (4.39 KB, patch)
2014-08-26 11:34 UTC, Justin Kim
needs-work Details | Review

Description Justin Kim 2014-08-26 11:33:17 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".
Comment 1 Justin Kim 2014-08-26 11:34:23 UTC
Created attachment 284496 [details] [review]
gst-rank option
Comment 2 Sebastian Dröge (slomo) 2014-08-26 11:45:38 UTC
Related to bug #649542
Comment 3 Sebastian Dröge (slomo) 2014-08-26 11:47:50 UTC
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.
Comment 4 Justin Kim 2014-08-26 12:23:20 UTC
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?
Comment 5 Sebastian Dröge (slomo) 2014-08-26 12:31:12 UTC
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.
Comment 6 Thibault Saunier 2014-08-26 12:49:19 UTC
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.
Comment 7 Justin Kim 2014-08-27 04:38:12 UTC
Great! I didn't check devtools for gstreamer. Is there any official release version of devtools, or gst-validate?
Comment 8 Thibault Saunier 2014-08-27 08:43:38 UTC
(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).
Comment 9 GStreamer system administrator 2018-11-03 12:22:09 UTC
-- 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.