diff options
author | Jan Schmidt <thaytan@noraisin.net> | 2009-04-16 00:02:07 +0100 |
---|---|---|
committer | Jan Schmidt <thaytan@noraisin.net> | 2009-04-16 00:48:11 +0100 |
commit | 4c6c9c2d5b674708bc36a96fceafff5a593d5fb2 (patch) | |
tree | 6c756a00369b89ddbfa3ff153448615430f1c022 | |
parent | e778c5fd8bb31516298c384872e376e602af4166 (diff) |
paramspecs: revert gst_param_spec_is_mutable() for release
Revert the gst_param_spec_is_mutable API for this release so we can
discuss it a bit further first.
-rw-r--r-- | docs/gst/gstreamer-sections.txt | 2 | ||||
-rw-r--r-- | gst/gstparamspecs.c | 47 | ||||
-rw-r--r-- | gst/gstparamspecs.h | 4 | ||||
-rw-r--r-- | plugins/elements/gstfilesrc.c | 5 |
4 files changed, 0 insertions, 58 deletions
diff --git a/docs/gst/gstreamer-sections.txt b/docs/gst/gstreamer-sections.txt index 70f3c8555f..eb28680fc6 100644 --- a/docs/gst/gstreamer-sections.txt +++ b/docs/gst/gstreamer-sections.txt @@ -1541,8 +1541,6 @@ GST_PARAM_MUTABLE_PAUSED GST_PARAM_MUTABLE_PLAYING GST_PARAM_MUTABLE_READY -gst_param_spec_is_mutable - <SUBSECTION paramspecfraction> GstParamSpecFraction gst_param_spec_fraction diff --git a/gst/gstparamspecs.c b/gst/gstparamspecs.c index ec5365f08d..e75a944322 100644 --- a/gst/gstparamspecs.c +++ b/gst/gstparamspecs.c @@ -205,50 +205,3 @@ gst_param_spec_fraction (const gchar * name, const gchar * nick, return pspec; } - -/** - * gst_param_spec_is_mutable - * @param_spec: a GParamSpec representing a property - * @element: the GstElement of the property to be modified - * - * Checks if an object property for the GstElement given in @element - * may be modified given the current state of @element. In order to - * avoid races, this function should be called with the object lock - * of @element held. - * - * <note>By the time this method returns, the state of the element might have - * changed already. Use this method only if you can control the state of the - * element between calling this method and setting the property, such as with a - * mutex.</note> - * - * Returns: TRUE if the property may be modified - * - * Since: 0.10.23 - */ -gboolean -gst_param_spec_is_mutable (GParamSpec * param_spec, GstElement * element) -{ - gboolean ret = TRUE; - GstState state; - - if (param_spec->flags & GST_PARAM_MUTABLE_PLAYING) { - return TRUE; - } - - state = GST_STATE (element); - if (param_spec->flags & GST_PARAM_MUTABLE_PAUSED) { - if (state > GST_STATE_PAUSED) { - ret = FALSE; - } - } else if (param_spec->flags & GST_PARAM_MUTABLE_READY) { - if (state > GST_STATE_READY) { - ret = FALSE; - } - } else { - if (state > GST_STATE_NULL) { - ret = FALSE; - } - } - - return ret; -} diff --git a/gst/gstparamspecs.h b/gst/gstparamspecs.h index 992b65b10c..22d0e34a3b 100644 --- a/gst/gstparamspecs.h +++ b/gst/gstparamspecs.h @@ -20,7 +20,6 @@ #ifndef __GST_PARAMSPECS_H__ #define __GST_PARAMSPECS_H__ -#include <gst/gstelement.h> #include <gst/gstvalue.h> G_BEGIN_DECLS @@ -123,9 +122,6 @@ GParamSpec * gst_param_spec_fraction (const gchar * name, gint default_num, gint default_denom, GParamFlags flags); -gboolean gst_param_spec_is_mutable (GParamSpec *param_spec, - GstElement *element); - G_END_DECLS #endif /* __GST_PARAMSPECS_H__ */ diff --git a/plugins/elements/gstfilesrc.c b/plugins/elements/gstfilesrc.c index 2c03167686..caa2ef7521 100644 --- a/plugins/elements/gstfilesrc.c +++ b/plugins/elements/gstfilesrc.c @@ -389,11 +389,6 @@ gst_file_src_set_property (GObject * object, guint prop_id, src = GST_FILE_SRC (object); - if (!gst_param_spec_is_mutable (pspec, GST_ELEMENT (src))) { - GST_WARNING_OBJECT (src, "attempting to change property in wrong state"); - return; - } - switch (prop_id) { case ARG_LOCATION: gst_file_src_set_location (src, g_value_get_string (value)); |