From 4476243228db6d760e8d5995de925e981ac9bee8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sebastian=20Dr=C3=B6ge?= Date: Thu, 13 Dec 2007 10:31:33 +0000 Subject: [PATCH] tools/gst-inspect.c: Add support for GstFraction properties. Original commit message from CVS: * tools/gst-inspect.c: (print_element_properties_info): Add support for GstFraction properties. --- ChangeLog | 5 +++++ common | 2 +- tools/gst-inspect.c | 14 ++++++++++++++ 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 60cc2d9..6762381 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2007-12-13 Sebastian Dröge + + * tools/gst-inspect.c: (print_element_properties_info): + Add support for GstFraction properties. + 2007-12-12 Tim-Philipp Müller * Makefile.am: diff --git a/common b/common index 4f261af..fb7ab03 160000 --- a/common +++ b/common @@ -1 +1 @@ -Subproject commit 4f261af78b1128862cb847afb1b7254b8f458834 +Subproject commit fb7ab03319930496e922173d54f6dfccfff6f357 diff --git a/tools/gst-inspect.c b/tools/gst-inspect.c index c634134..b4cbd98 100644 --- a/tools/gst-inspect.c +++ b/tools/gst-inspect.c @@ -545,6 +545,20 @@ print_element_properties_info (GstElement * element) } } else if (param->value_type == G_TYPE_VALUE_ARRAY) { n_print ("%-23.23s Array of GValues", ""); + } else if (GST_IS_PARAM_SPEC_FRACTION (param)) { + GstParamSpecFraction *pfraction = GST_PARAM_SPEC_FRACTION (param); + + n_print ("%-23.23s Fraction. ", ""); + + g_print ("Range: %d/%d - %d/%d Default: %d/%d ", + pfraction->min_num, pfraction->min_den, + pfraction->max_num, pfraction->max_den, + pfraction->def_num, pfraction->def_den); + if (readable) + g_print ("Current: %d/%d", + gst_value_get_fraction_numerator (&value), + gst_value_get_fraction_denominator (&value)); + } else { n_print ("%-23.23s Unknown type %ld \"%s\"", "", param->value_type, g_type_name (param->value_type)); -- 2.7.4