mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-09-03 10:43:55 +00:00
ges-launch: Gracefully handle missing properties
This commit is contained in:
parent
da806759d1
commit
d2019f3a3d
1 changed files with 15 additions and 11 deletions
|
@ -318,7 +318,7 @@ print_transition_list (void)
|
||||||
tr = ges_timeline_transition_new (GES_VIDEO_TRANSITION_TYPE_CROSSFADE);
|
tr = ges_timeline_transition_new (GES_VIDEO_TRANSITION_TYPE_CROSSFADE);
|
||||||
klass = GES_TIMELINE_TRANSITION_GET_CLASS (tr);
|
klass = GES_TIMELINE_TRANSITION_GET_CLASS (tr);
|
||||||
|
|
||||||
pspec = g_object_class_find_property (G_OBJECT_CLASS (klass), "vtype");
|
if ((pspec = g_object_class_find_property (G_OBJECT_CLASS (klass), "vtype"))) {
|
||||||
|
|
||||||
smpte_class = G_ENUM_CLASS (g_type_class_ref (pspec->value_type));
|
smpte_class = G_ENUM_CLASS (g_type_class_ref (pspec->value_type));
|
||||||
|
|
||||||
|
@ -327,6 +327,8 @@ print_transition_list (void)
|
||||||
}
|
}
|
||||||
|
|
||||||
g_type_class_unref (smpte_class);
|
g_type_class_unref (smpte_class);
|
||||||
|
}
|
||||||
|
|
||||||
g_object_unref (tr);
|
g_object_unref (tr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -342,7 +344,8 @@ print_pattern_list (void)
|
||||||
tr = ges_timeline_test_source_new ();
|
tr = ges_timeline_test_source_new ();
|
||||||
klass = GES_TIMELINE_TEST_SOURCE_GET_CLASS (tr);
|
klass = GES_TIMELINE_TEST_SOURCE_GET_CLASS (tr);
|
||||||
|
|
||||||
pspec = g_object_class_find_property (G_OBJECT_CLASS (klass), "vpattern");
|
if ((pspec =
|
||||||
|
g_object_class_find_property (G_OBJECT_CLASS (klass), "vpattern"))) {
|
||||||
|
|
||||||
enum_class = G_ENUM_CLASS (g_type_class_ref (pspec->value_type));
|
enum_class = G_ENUM_CLASS (g_type_class_ref (pspec->value_type));
|
||||||
|
|
||||||
|
@ -351,6 +354,7 @@ print_pattern_list (void)
|
||||||
}
|
}
|
||||||
|
|
||||||
g_type_class_unref (enum_class);
|
g_type_class_unref (enum_class);
|
||||||
|
}
|
||||||
g_object_unref (tr);
|
g_object_unref (tr);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue