Commit 4a4a73ad authored by Tim-Philipp Müller's avatar Tim-Philipp Müller 🐠

plugins/elements/gsttypefindelement.c: Deprecate "maximum" property (not only...

plugins/elements/gsttypefindelement.c: Deprecate "maximum" property (not only was it only taken into account for type...

Original commit message from CVS:
* plugins/elements/gsttypefindelement.c:
(gst_type_find_element_class_init),
(gst_type_find_element_set_property),
(gst_type_find_element_get_property):
Deprecate "maximum" property (not only was it only taken into
account for typefinding in push-mode anyway, it also was never
actually possible to set it in the first place because the
property was registered with the numeric property ID for the
"minimum" property). Register "maximum" property correctly,
for the sake of future copy'n'pasters. Remove some cruft
from property get/set functions.
parent e7ec08ad
2006-03-03 Tim-Philipp Müller <tim at centricular dot net>
* plugins/elements/gsttypefindelement.c:
(gst_type_find_element_class_init),
(gst_type_find_element_set_property),
(gst_type_find_element_get_property):
Deprecate "maximum" property (not only was it only taken into
account for typefinding in push-mode anyway, it also was never
actually possible to set it in the first place because the
property was registered with the numeric property ID for the
"minimum" property). Register "maximum" property correctly,
for the sake of future copy'n'pasters. Remove some cruft
from property get/set functions.
2006-03-03 Tim-Philipp Müller <tim at centricular dot net>
* plugins/elements/gsttypefindelement.c:
(gst_type_find_element_activate):
Use gst_type_find_helper_get_range() here, so we
can honour the min-probability property and also emit
can honour the "minimum" property and also emit
the signal with the correct probability of the found caps.
2006-03-02 Tim-Philipp Müller <tim at centricular dot net>
......
......@@ -192,10 +192,11 @@ gst_type_find_element_class_init (GstTypeFindElementClass * typefind_class)
g_param_spec_uint ("minimum", _("minimum"),
"minimum probability required to accept caps", GST_TYPE_FIND_MINIMUM,
GST_TYPE_FIND_MAXIMUM, GST_TYPE_FIND_MINIMUM, G_PARAM_READWRITE));
g_object_class_install_property (gobject_class, ARG_MINIMUM,
g_object_class_install_property (gobject_class, ARG_MAXIMUM,
g_param_spec_uint ("maximum", _("maximum"),
"probability to stop typefinding", GST_TYPE_FIND_MINIMUM,
GST_TYPE_FIND_MAXIMUM, GST_TYPE_FIND_MAXIMUM, G_PARAM_READWRITE));
"probability to stop typefinding (deprecated; non-functional)",
GST_TYPE_FIND_MINIMUM, GST_TYPE_FIND_MAXIMUM, GST_TYPE_FIND_MAXIMUM,
G_PARAM_READWRITE));
/**
* GstTypeFindElement::have-type:
* @typefind: the typefind instance
......@@ -273,18 +274,14 @@ gst_type_find_element_set_property (GObject * object, guint prop_id,
{
GstTypeFindElement *typefind;
g_return_if_fail (GST_IS_TYPE_FIND_ELEMENT (object));
typefind = GST_TYPE_FIND_ELEMENT (object);
switch (prop_id) {
case ARG_MINIMUM:
typefind->min_probability = g_value_get_uint (value);
g_object_notify (object, "minimum");
break;
case ARG_MAXIMUM:
typefind->max_probability = g_value_get_uint (value);
g_object_notify (object, "maximum");
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
......@@ -297,8 +294,6 @@ gst_type_find_element_get_property (GObject * object, guint prop_id,
{
GstTypeFindElement *typefind;
g_return_if_fail (GST_IS_TYPE_FIND_ELEMENT (object));
typefind = GST_TYPE_FIND_ELEMENT (object);
switch (prop_id) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment