From d1ad31b9b35a0b705fe830df7fab666f4fbe65a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Mon, 15 Jun 2009 17:20:21 +0200 Subject: [PATCH] agingtv: Actually use GstController for syncing the properties to timestamps --- gst/effectv/Makefile.am | 2 ++ gst/effectv/gstaging.c | 18 ++++++++++++++++-- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/gst/effectv/Makefile.am b/gst/effectv/Makefile.am index dd6fe7f2f3..5346ee8761 100644 --- a/gst/effectv/Makefile.am +++ b/gst/effectv/Makefile.am @@ -5,11 +5,13 @@ libgsteffectv_la_SOURCES = \ gstshagadelic.c gstvertigo.c gstrev.c gstquark.c libgsteffectv_la_CFLAGS = \ $(GST_PLUGINS_BASE_CFLAGS) \ + $(GST_CONTROLLER_CFLAGS) \ $(GST_BASE_CFLAGS) \ $(GST_CFLAGS) \ -I$(top_srcdir)/gst/videofilter libgsteffectv_la_LIBADD = \ $(GST_PLUGINS_BASE_LIBS) -lgstvideo-@GST_MAJORMINOR@ \ + $(GST_CONTROLLER_LIBS) \ $(GST_BASE_LIBS) \ $(GST_LIBS) \ $(LIBM) diff --git a/gst/effectv/gstaging.c b/gst/effectv/gstaging.c index 8ff4dc1188..829fa3f0ec 100644 --- a/gst/effectv/gstaging.c +++ b/gst/effectv/gstaging.c @@ -28,12 +28,15 @@ #include "config.h" #endif -#include - #include #include +#include + #include +#include + +#include #define GST_TYPE_AGINGTV \ (gst_agingtv_get_type()) @@ -387,6 +390,17 @@ gst_agingtv_transform (GstBaseTransform * trans, GstBuffer * in, guint32 *dest = (guint32 *) GST_BUFFER_DATA (out); gint area_scale = width * height / 64 / 480; GstFlowReturn ret = GST_FLOW_OK; + GstClockTime timestamp, stream_time; + + timestamp = GST_BUFFER_TIMESTAMP (in); + stream_time = + gst_segment_to_stream_time (&trans->segment, GST_FORMAT_TIME, timestamp); + + GST_DEBUG_OBJECT (agingtv, "sync to %" GST_TIME_FORMAT, + GST_TIME_ARGS (timestamp)); + + if (GST_CLOCK_TIME_IS_VALID (stream_time)) + gst_object_sync_values (G_OBJECT (agingtv), stream_time); if (area_scale <= 0) area_scale = 1;