mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
tools: gst-inspect: fix readable flag printing for pad properties
This commit is contained in:
parent
4e6af6858b
commit
906bbd3817
1 changed files with 6 additions and 4 deletions
|
@ -305,17 +305,19 @@ print_object_properties_info (GObject * obj, GObjectClass * obj_class,
|
||||||
|
|
||||||
first_flag = TRUE;
|
first_flag = TRUE;
|
||||||
n_print ("flags: ");
|
n_print ("flags: ");
|
||||||
if (param->flags & G_PARAM_READABLE && obj != NULL) {
|
readable = ! !(param->flags & G_PARAM_READABLE);
|
||||||
|
if (readable && obj != NULL) {
|
||||||
g_object_get_property (obj, param->name, &value);
|
g_object_get_property (obj, param->name, &value);
|
||||||
readable = TRUE;
|
|
||||||
g_print ("%s%s", (first_flag) ? "" : ", ", _("readable"));
|
|
||||||
first_flag = FALSE;
|
|
||||||
} else {
|
} else {
|
||||||
/* if we can't read the property value, assume it's set to the default
|
/* if we can't read the property value, assume it's set to the default
|
||||||
* (which might not be entirely true for sub-classes, but that's an
|
* (which might not be entirely true for sub-classes, but that's an
|
||||||
* unlikely corner-case anyway) */
|
* unlikely corner-case anyway) */
|
||||||
g_param_value_set_default (param, &value);
|
g_param_value_set_default (param, &value);
|
||||||
}
|
}
|
||||||
|
if (readable) {
|
||||||
|
g_print ("%s%s", (first_flag) ? "" : ", ", _("readable"));
|
||||||
|
first_flag = FALSE;
|
||||||
|
}
|
||||||
if (param->flags & G_PARAM_WRITABLE) {
|
if (param->flags & G_PARAM_WRITABLE) {
|
||||||
g_print ("%s%s", (first_flag) ? "" : ", ", _("writable"));
|
g_print ("%s%s", (first_flag) ? "" : ", ", _("writable"));
|
||||||
first_flag = FALSE;
|
first_flag = FALSE;
|
||||||
|
|
Loading…
Reference in a new issue