*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
*/
#ifndef __GST_OBJECT_H__
*
* Acquire a reference to the mutex of this object.
*/
-#define GST_OBJECT_GET_LOCK(obj) (GST_OBJECT_CAST(obj)->lock)
+#define GST_OBJECT_GET_LOCK(obj) (&GST_OBJECT_CAST(obj)->lock)
/**
* GST_OBJECT_LOCK:
* @obj: a #GstObject to lock
* @obj: a #GstObject.
*
* This macro will try to obtain a lock on the object, but will return with
- * FALSE if it can't get it immediately.
+ * %FALSE if it can't get it immediately.
*/
#define GST_OBJECT_TRYLOCK(obj) g_mutex_trylock(GST_OBJECT_GET_LOCK(obj))
/**
* @obj: a #GstObject
* @flag: Flag to set
*
- * This macro usets the given bits.
+ * This macro unsets the given bits.
*/
#define GST_OBJECT_FLAG_UNSET(obj,flag) (GST_OBJECT_FLAGS (obj) &= ~(flag))
-
typedef struct _GstObject GstObject;
typedef struct _GstObjectClass GstObjectClass;
GInitiallyUnowned object;
/*< public >*/ /* with LOCK */
- GMutex *lock; /* object LOCK */
+ GMutex lock; /* object LOCK */
gchar *name; /* object name */
GstObject *parent; /* this object's parent, weak ref */
guint32 flags;
/*< private >*/
+ GList *control_bindings; /* List of GstControlBinding */
+ guint64 control_rate;
+ guint64 last_sync;
+
gpointer _gst_reserved;
};
/* misc utils */
gboolean gst_object_check_uniqueness (GList *list, const gchar *name);
+/* controller functions */
+#include <gst/gstcontrolbinding.h>
+#include <gst/gstcontrolsource.h>
+
+GstClockTime gst_object_suggest_next_sync (GstObject * object);
+gboolean gst_object_sync_values (GstObject * object, GstClockTime timestamp);
+
+gboolean gst_object_has_active_control_bindings (GstObject *object);
+void gst_object_set_control_bindings_disabled (GstObject *object, gboolean disabled);
+void gst_object_set_control_binding_disabled (GstObject *object,
+ const gchar * property_name,
+ gboolean disabled);
+
+gboolean gst_object_add_control_binding (GstObject * object, GstControlBinding * binding);
+GstControlBinding *
+ gst_object_get_control_binding (GstObject *object, const gchar * property_name);
+gboolean gst_object_remove_control_binding (GstObject * object, GstControlBinding * binding);
+
+GValue * gst_object_get_value (GstObject * object, const gchar * property_name,
+ GstClockTime timestamp);
+gboolean gst_object_get_value_array (GstObject * object, const gchar * property_name,
+ GstClockTime timestamp, GstClockTime interval,
+ guint n_values, gpointer values);
+gboolean gst_object_get_g_value_array (GstObject * object, const gchar * property_name,
+ GstClockTime timestamp, GstClockTime interval,
+ guint n_values, GValue *values);
+
+GstClockTime gst_object_get_control_rate (GstObject * object);
+void gst_object_set_control_rate (GstObject * object, GstClockTime control_rate);
+
G_END_DECLS
#endif /* __GST_OBJECT_H__ */