}
static void
-set_program (GstController * ctrl, GstStructure * prog)
+set_program (GstObject * elem, GstStructure * prog)
{
const GstStructure *s;
GstInterpolationControlSource *cs;
cs = g_hash_table_lookup (css, name);
if (!cs) {
cs = gst_interpolation_control_source_new ();
- gst_controller_set_control_source (ctrl, name, GST_CONTROL_SOURCE (cs));
+ gst_object_set_control_source (elem, name, GST_CONTROL_SOURCE (cs));
gst_interpolation_control_source_set_interpolation_mode (cs,
GST_INTERPOLATE_NONE);
g_hash_table_insert (css, (gpointer) name, cs);
GstElement *bin;
GstElement *src, *fmt, *enc, *sink;
GstCaps *caps;
- GstController *ctrl;
GstStructure *prog;
/* init gstreamer */
}
/* get the controller */
- if (!(ctrl = gst_controller_new (GST_OBJECT (src), "brightness", "contrast",
- "saturation", NULL))) {
+ if (!gst_object_control_properties (GST_OBJECT (src), "brightness",
+ "contrast", "saturation", NULL)) {
GST_WARNING ("can't control source element");
return -1;
}
", image03=(structure)\"image\\,brightness\\=0\\,contrast\\=15\\;\";",
NULL);
#endif
- set_program (ctrl, prog);
+ set_program (GST_OBJECT (src), prog);
g_object_set (src, "num-buffers", gst_structure_n_fields (prog), NULL);
/* prepare playback */