controller: port to new location and api changes

This commit is contained in:
Stefan Sauer 2011-11-04 15:23:25 +01:00
parent b56ac475d3
commit 0019bcaa47
9 changed files with 11 additions and 29 deletions

View file

@ -17,13 +17,11 @@ libgstpango_la_SOURCES = \
libgstpango_la_CFLAGS = \
$(GST_PLUGINS_BASE_CFLAGS) \
$(GST_BASE_CFLAGS) \
$(GST_CONTROLLER_CFLAGS) \
$(GST_CFLAGS) \
$(PANGO_CFLAGS)
libgstpango_la_LIBADD = \
$(top_builddir)/gst-libs/gst/video/libgstvideo-$(GST_MAJORMINOR).la \
$(GST_BASE_LIBS) \
$(GST_CONTROLLER_LIBS) \
$(GST_LIBS) \
$(PANGO_LIBS)
libgstpango_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)

View file

@ -2484,7 +2484,7 @@ gst_base_text_overlay_video_chain (GstPad * pad, GstBuffer * buffer)
gst_caps_unref (caps);
}
gst_object_sync_values (G_OBJECT (overlay), GST_BUFFER_TIMESTAMP (buffer));
gst_object_sync_values (GST_OBJECT (overlay), GST_BUFFER_TIMESTAMP (buffer));
wait_for_text_buf:
@ -2774,8 +2774,6 @@ gst_base_text_overlay_change_state (GstElement * element,
static gboolean
plugin_init (GstPlugin * plugin)
{
gst_controller_init (NULL, NULL);
if (!gst_element_register (plugin, "textoverlay", GST_RANK_NONE,
GST_TYPE_TEXT_OVERLAY) ||
!gst_element_register (plugin, "timeoverlay", GST_RANK_NONE,

View file

@ -3,7 +3,6 @@
#include <gst/gst.h>
#include <gst/video/video.h>
#include <gst/controller/gstcontroller.h>
#include <pango/pangocairo.h>
G_BEGIN_DECLS

View file

@ -1,11 +1,11 @@
plugin_LTLIBRARIES = libgstaudiotestsrc.la
libgstaudiotestsrc_la_SOURCES = gstaudiotestsrc.c
libgstaudiotestsrc_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS) $(GST_CONTROLLER_CFLAGS)
libgstaudiotestsrc_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS)
libgstaudiotestsrc_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
libgstaudiotestsrc_la_LIBADD = \
$(top_builddir)/gst-libs/gst/audio/libgstaudio-@GST_MAJORMINOR@.la \
$(GST_BASE_LIBS) $(GST_LIBS) $(GST_CONTROLLER_LIBS) $(LIBM)
$(GST_BASE_LIBS) $(GST_LIBS) $(LIBM)
libgstaudiotestsrc_la_LIBTOOLFLAGS = --tag=disable-static
noinst_HEADERS = gstaudiotestsrc.h

View file

@ -43,7 +43,6 @@
#include <math.h>
#include <stdlib.h>
#include <string.h>
#include <gst/controller/gstcontroller.h>
#include "gstaudiotestsrc.h"
@ -1185,7 +1184,7 @@ gst_audio_test_src_fill (GstBaseSrc * basesrc, guint64 offset,
GST_BUFFER_DURATION (buffer) = src->next_time - next_time;
}
gst_object_sync_values (G_OBJECT (src), GST_BUFFER_TIMESTAMP (buffer));
gst_object_sync_values (GST_OBJECT (src), GST_BUFFER_TIMESTAMP (buffer));
src->next_time = next_time;
src->next_sample = next_sample;
@ -1288,9 +1287,6 @@ gst_audio_test_src_get_property (GObject * object, guint prop_id,
static gboolean
plugin_init (GstPlugin * plugin)
{
/* initialize gst controller library */
gst_controller_init (NULL, NULL);
GST_DEBUG_CATEGORY_INIT (audio_test_src_debug, "audiotestsrc", 0,
"Audio Test Source");

View file

@ -5,13 +5,12 @@ include $(top_srcdir)/common/orc.mak
libgstvolume_la_SOURCES = gstvolume.c
nodist_libgstvolume_la_SOURCES = $(ORC_NODIST_SOURCES)
libgstvolume_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CONTROLLER_CFLAGS) $(GST_CFLAGS) $(ORC_CFLAGS)
libgstvolume_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CFLAGS) $(ORC_CFLAGS)
libgstvolume_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
libgstvolume_la_LIBADD = \
$(top_builddir)/gst-libs/gst/interfaces/libgstinterfaces-$(GST_MAJORMINOR).la \
$(top_builddir)/gst-libs/gst/audio/libgstaudio-$(GST_MAJORMINOR).la \
$(GST_BASE_LIBS) \
$(GST_CONTROLLER_LIBS) \
$(GST_LIBS) \
$(ORC_LIBS)
libgstvolume_la_LIBTOOLFLAGS = --tag=disable-static

View file

@ -46,7 +46,6 @@
#include <gst/base/gstbasetransform.h>
#include <gst/audio/audio.h>
#include <gst/interfaces/mixer.h>
#include <gst/controller/gstcontroller.h>
#include <gst/audio/audio.h>
#include <gst/audio/gstaudiofilter.h>
@ -240,7 +239,6 @@ volume_update_volume (GstVolume * self, gfloat volume, gboolean mute)
{
gboolean passthrough;
gboolean res;
GstController *controller;
GST_DEBUG_OBJECT (self, "configure mute %d, volume %f", mute, volume);
@ -270,8 +268,7 @@ volume_update_volume (GstVolume * self, gfloat volume, gboolean mute)
* because the property can change from 1.0 to something
* else in the middle of a buffer.
*/
controller = gst_object_get_controller (G_OBJECT (self));
passthrough = passthrough && (controller == NULL);
passthrough = passthrough && (GST_OBJECT (self)->ctrl == NULL);
GST_DEBUG_OBJECT (self, "set passthrough %d", passthrough);
@ -777,7 +774,7 @@ volume_before_transform (GstBaseTransform * base, GstBuffer * buffer)
GST_TIME_ARGS (timestamp));
if (GST_CLOCK_TIME_IS_VALID (timestamp))
gst_object_sync_values (G_OBJECT (self), timestamp);
gst_object_sync_values (GST_OBJECT (self), timestamp);
/* get latest values */
GST_OBJECT_LOCK (self);
@ -815,8 +812,8 @@ volume_transform_ip (GstBaseTransform * base, GstBuffer * outbuf)
data = gst_buffer_map (outbuf, &size, NULL, GST_MAP_READWRITE);
mute_csource = gst_object_get_control_source (G_OBJECT (self), "mute");
volume_csource = gst_object_get_control_source (G_OBJECT (self), "volume");
mute_csource = gst_object_get_control_source (GST_OBJECT (self), "mute");
volume_csource = gst_object_get_control_source (GST_OBJECT (self), "volume");
if (mute_csource || (volume_csource && !self->current_mute)) {
gint rate = GST_AUDIO_INFO_RATE (&filter->info);
@ -960,9 +957,6 @@ plugin_init (GstPlugin * plugin)
{
gst_volume_orc_init ();
/* initialize gst controller library */
gst_controller_init (NULL, NULL);
GST_DEBUG_CATEGORY_INIT (GST_CAT_DEFAULT, "volume", 0, "Volume gain");
/* ref class from a thread-safe context to work around missing bit of

View file

@ -24,8 +24,8 @@
#include <gst/base/gstbasetransform.h>
#include <gst/check/gstcheck.h>
#include <gst/controller/gstcontroller.h>
#include <gst/interfaces/streamvolume.h>
#include <gst/controller/gstinterpolationcontrolsource.h>
/* For ease of programming we use globals to keep refs for our floating
* src and sink pads we create; otherwise we always have to do get_pad,

View file

@ -16,7 +16,6 @@
*/
#include <gst/gst.h>
#include <gst/controller/gstcontroller.h>
#include <gst/controller/gstinterpolationcontrolsource.h>
static void
@ -65,7 +64,6 @@ main (gint argc, gchar ** argv)
gboolean be_quiet = FALSE;
gst_init (&argc, &argv);
gst_controller_init (&argc, &argv);
if (argc) {
gint arg;
@ -128,7 +126,7 @@ main (gint argc, gchar ** argv)
gst_object_unref (src_pad);
/* add a controller to the source */
if (!(ctrl = gst_controller_new (G_OBJECT (src), "freq", "volume", NULL))) {
if (!(ctrl = gst_controller_new (GST_OBJECT (src), "freq", "volume", NULL))) {
GST_WARNING ("can't control source element");
goto Error;
}