[gstreamer-bugs] [Bug 571559] [API] add GST_PARAM_MUTABLE_PLAYING etc. to indicate valid states for changing property

GStreamer (bugzilla.gnome.org) bugzilla-daemon at bugzilla.gnome.org
Tue Apr 14 00:17:00 PDT 2009

If you have any questions why you received this email, please see the text at
the end of this email. Replies to this email are NOT read, please see the text
at the end of this email. You can add comments to this bug at:

  GStreamer | gstreamer (core) | Ver: git

------- Comment #11 from Stefan Kost (gstreamer, gtkdoc dev)  2009-04-14 07:16 UTC -------
I am not sure what the solution is. Lets imagine one has this code in the app:

g_object_set(element, "param", value, NULL);

Now, one should do:

GParamSpec *pspec;
GstElementClass element_class;

element_class = GST_ELEMENT_GET_CLASS (element);
pspec = g_object_class_find_property(element_class, "param");
if (gst_param_spec_is_mutable (pspec, element)) {
  g_object_set(element, "param", value, NULL);

This is ofcourse racy, as one needs to take a lock. The
gst_param_spec_is_mutable() already takes GST_OBJECT_LOCK(), so the app can't
use that. Should we rather have 
gboolean gst_param_spec_set_if_mutable(element_class, "param", value);

Also we should add another API
gst_element_property_is_mutable (element, property_name)
for convinience.

See http://bugzilla.gnome.org/page.cgi?id=email.html for more info about why you received
this email, why you can't respond via email, how to stop receiving
emails (or reduce the number you receive), and how to contact someone
if you are having problems with the system.

You can add comments to this bug at http://bugzilla.gnome.org/show_bug.cgi?id=571559.

More information about the Gstreamer-bugs mailing list