gstfunnel: avoid access of freed pad
[platform/upstream/gstreamer.git] / gst / gstcontrolbinding.h
index d462949..7f83d3d 100644 (file)
@@ -67,10 +67,12 @@ struct _GstControlBinding {
   GstObject parent;
   
   /*< public >*/
-  const gchar *name;            /* name of the property */
+  gchar *name;                  /* name of the property */
   GParamSpec *pspec;            /* GParamSpec for this property */
 
   /*< private >*/
+  GstObject *object;            /* GstObject owning the property
+                                 * (== parent when bound) */
   gboolean disabled;
 
   gpointer _gst_reserved[GST_PADDING];
@@ -91,12 +93,15 @@ struct _GstControlBindingClass
   /* virtual methods */
   gboolean (* sync_values) (GstControlBinding *self, GstObject *object, GstClockTime timestamp, GstClockTime last_sync);
   GValue * (* get_value) (GstControlBinding *self, GstClockTime timestamp);
-  gboolean (* get_value_array) (GstControlBinding *self, GstClockTime timestamp,GstClockTime interval, guint n_values, GValue *values);
+  gboolean (* get_value_array) (GstControlBinding *self, GstClockTime timestamp,GstClockTime interval, guint n_values, gpointer values);
+  gboolean (* get_g_value_array) (GstControlBinding *self, GstClockTime timestamp,GstClockTime interval, guint n_values, GValue *values);
 
   /*< private >*/
   gpointer _gst_reserved[GST_PADDING];
 };
 
+#define GST_CONTROL_BINDING_PSPEC(cb) (((GstControlBinding *) cb)->pspec)
+
 GType gst_control_binding_get_type (void);
 
 /* Functions */
@@ -106,6 +111,8 @@ gboolean            gst_control_binding_sync_values        (GstControlBinding *
 GValue *            gst_control_binding_get_value          (GstControlBinding *binding,
                                                             GstClockTime timestamp);
 gboolean            gst_control_binding_get_value_array    (GstControlBinding *binding, GstClockTime timestamp,
+                                                            GstClockTime interval, guint n_values, gpointer values);
+gboolean            gst_control_binding_get_g_value_array  (GstControlBinding *binding, GstClockTime timestamp,
                                                             GstClockTime interval, guint n_values, GValue *values);
 
 void                gst_control_binding_set_disabled       (GstControlBinding * self, gboolean disabled);