mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-12 18:35:35 +00:00
agingtv: Actually use GstController for syncing the properties to timestamps
This commit is contained in:
parent
45ef8efc6b
commit
d1ad31b9b3
2 changed files with 18 additions and 2 deletions
|
@ -5,11 +5,13 @@ libgsteffectv_la_SOURCES = \
|
||||||
gstshagadelic.c gstvertigo.c gstrev.c gstquark.c
|
gstshagadelic.c gstvertigo.c gstrev.c gstquark.c
|
||||||
libgsteffectv_la_CFLAGS = \
|
libgsteffectv_la_CFLAGS = \
|
||||||
$(GST_PLUGINS_BASE_CFLAGS) \
|
$(GST_PLUGINS_BASE_CFLAGS) \
|
||||||
|
$(GST_CONTROLLER_CFLAGS) \
|
||||||
$(GST_BASE_CFLAGS) \
|
$(GST_BASE_CFLAGS) \
|
||||||
$(GST_CFLAGS) \
|
$(GST_CFLAGS) \
|
||||||
-I$(top_srcdir)/gst/videofilter
|
-I$(top_srcdir)/gst/videofilter
|
||||||
libgsteffectv_la_LIBADD = \
|
libgsteffectv_la_LIBADD = \
|
||||||
$(GST_PLUGINS_BASE_LIBS) -lgstvideo-@GST_MAJORMINOR@ \
|
$(GST_PLUGINS_BASE_LIBS) -lgstvideo-@GST_MAJORMINOR@ \
|
||||||
|
$(GST_CONTROLLER_LIBS) \
|
||||||
$(GST_BASE_LIBS) \
|
$(GST_BASE_LIBS) \
|
||||||
$(GST_LIBS) \
|
$(GST_LIBS) \
|
||||||
$(LIBM)
|
$(LIBM)
|
||||||
|
|
|
@ -28,12 +28,15 @@
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <gst/video/gstvideofilter.h>
|
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
|
#include <gst/gst.h>
|
||||||
|
|
||||||
#include <gst/video/video.h>
|
#include <gst/video/video.h>
|
||||||
|
#include <gst/video/gstvideofilter.h>
|
||||||
|
|
||||||
|
#include <gst/controller/gstcontroller.h>
|
||||||
|
|
||||||
#define GST_TYPE_AGINGTV \
|
#define GST_TYPE_AGINGTV \
|
||||||
(gst_agingtv_get_type())
|
(gst_agingtv_get_type())
|
||||||
|
@ -387,6 +390,17 @@ gst_agingtv_transform (GstBaseTransform * trans, GstBuffer * in,
|
||||||
guint32 *dest = (guint32 *) GST_BUFFER_DATA (out);
|
guint32 *dest = (guint32 *) GST_BUFFER_DATA (out);
|
||||||
gint area_scale = width * height / 64 / 480;
|
gint area_scale = width * height / 64 / 480;
|
||||||
GstFlowReturn ret = GST_FLOW_OK;
|
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)
|
if (area_scale <= 0)
|
||||||
area_scale = 1;
|
area_scale = 1;
|
||||||
|
|
Loading…
Reference in a new issue