diff options
author | Stefan Sauer <ensonic@users.sf.net> | 2011-12-20 22:36:18 +0100 |
---|---|---|
committer | Stefan Sauer <ensonic@users.sf.net> | 2011-12-25 18:50:45 +0100 |
commit | a80401b22c6f8693e733767aec3086296ac6ed05 (patch) | |
tree | 7d1ac24e25883874e1b0b163cc522cfa269f1b32 /gst/gstcontrolsource.c | |
parent | 81ce8b76d0b31c130ea4a49ea10eb7718490ba6e (diff) | |
download | gstreamer-a80401b22c6f8693e733767aec3086296ac6ed05.tar.gz |
controller: move GstControlledProperty into a separate class
Add a GstControlBinding class. This is a preparation for making the
controlsources generate double valued control curves and do the gparamspec
mapping in the control binding. Now the API in GstObject is again mostly
for convenience.
Diffstat (limited to 'gst/gstcontrolsource.c')
-rw-r--r-- | gst/gstcontrolsource.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/gst/gstcontrolsource.c b/gst/gstcontrolsource.c index faffc47e3d..85f242d5fc 100644 --- a/gst/gstcontrolsource.c +++ b/gst/gstcontrolsource.c @@ -51,7 +51,12 @@ #define GST_CAT_DEFAULT control_source_debug GST_DEBUG_CATEGORY_STATIC (GST_CAT_DEFAULT); -G_DEFINE_ABSTRACT_TYPE (GstControlSource, gst_control_source, G_TYPE_OBJECT); +#define _do_init \ + GST_DEBUG_CATEGORY_INIT (GST_CAT_DEFAULT, "gstcontrolsource", 0, \ + "dynamic parameter control sources"); + +G_DEFINE_ABSTRACT_TYPE_WITH_CODE (GstControlSource, gst_control_source, + G_TYPE_OBJECT, _do_init); static void gst_control_source_class_init (GstControlSourceClass * klass) @@ -60,15 +65,11 @@ gst_control_source_class_init (GstControlSourceClass * klass) /* Has to be implemented by children */ klass->bind = NULL; - - GST_DEBUG_CATEGORY_INIT (GST_CAT_DEFAULT, "gstcontrolsource", 0, - "dynamic parameter control sources"); } static void gst_control_source_init (GstControlSource * self) { - /* Set default handlers that print a warning */ self->get_value = NULL; self->get_value_array = NULL; self->bound = FALSE; @@ -150,8 +151,12 @@ gst_control_source_bind (GstControlSource * self, GParamSpec * pspec) ret = GST_CONTROL_SOURCE_GET_CLASS (self)->bind (self, pspec); - if (ret) + if (ret) { + GST_DEBUG ("bound control source for param %s", pspec->name); self->bound = TRUE; + } else { + GST_DEBUG ("failed to bind control source for param %s", pspec->name); + } return ret; } |