[gst-cvs] gst-plugins-good: videobox: Sync properties to the controller in before_transform

Sebastian Dröge slomo at kemper.freedesktop.org
Thu Apr 29 10:36:25 PDT 2010


Module: gst-plugins-good
Branch: master
Commit: 90058bc0762409622e866fc0c053b707b14dc160
URL:    http://cgit.freedesktop.org/gstreamer/gst-plugins-good/commit/?id=90058bc0762409622e866fc0c053b707b14dc160

Author: Sebastian Dröge <sebastian.droege at collabora.co.uk>
Date:   Sun Apr 18 15:02:42 2010 +0200

videobox: Sync properties to the controller in before_transform

---

 gst/videobox/gstvideobox.c |   20 +++++++++++++++-----
 1 files changed, 15 insertions(+), 5 deletions(-)

diff --git a/gst/videobox/gstvideobox.c b/gst/videobox/gstvideobox.c
index 7f2f284..484c787 100644
--- a/gst/videobox/gstvideobox.c
+++ b/gst/videobox/gstvideobox.c
@@ -1877,6 +1877,8 @@ static gboolean gst_video_box_get_unit_size (GstBaseTransform * trans,
     GstCaps * caps, guint * size);
 static GstFlowReturn gst_video_box_transform (GstBaseTransform * trans,
     GstBuffer * in, GstBuffer * out);
+static void gst_video_box_before_transform (GstBaseTransform * trans,
+    GstBuffer * in);
 static void gst_video_box_fixate_caps (GstBaseTransform * trans,
     GstPadDirection direction, GstCaps * caps, GstCaps * othercaps);
 
@@ -1987,6 +1989,8 @@ gst_video_box_class_init (GstVideoBoxClass * klass)
           "Auto crop", FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
 
   trans_class->transform = GST_DEBUG_FUNCPTR (gst_video_box_transform);
+  trans_class->before_transform =
+      GST_DEBUG_FUNCPTR (gst_video_box_before_transform);
   trans_class->transform_caps =
       GST_DEBUG_FUNCPTR (gst_video_box_transform_caps);
   trans_class->set_caps = GST_DEBUG_FUNCPTR (gst_video_box_set_caps);
@@ -2655,13 +2659,10 @@ gst_video_box_process (GstVideoBox * video_box, const guint8 * src,
   GST_LOG_OBJECT (video_box, "image created");
 }
 
-static GstFlowReturn
-gst_video_box_transform (GstBaseTransform * trans, GstBuffer * in,
-    GstBuffer * out)
+static void
+gst_video_box_before_transform (GstBaseTransform * trans, GstBuffer * in)
 {
   GstVideoBox *video_box = GST_VIDEO_BOX (trans);
-  const guint8 *indata;
-  guint8 *outdata;
   GstClockTime timestamp, stream_time;
 
   timestamp = GST_BUFFER_TIMESTAMP (in);
@@ -2673,6 +2674,15 @@ gst_video_box_transform (GstBaseTransform * trans, GstBuffer * in,
 
   if (GST_CLOCK_TIME_IS_VALID (stream_time))
     gst_object_sync_values (G_OBJECT (video_box), stream_time);
+}
+
+static GstFlowReturn
+gst_video_box_transform (GstBaseTransform * trans, GstBuffer * in,
+    GstBuffer * out)
+{
+  GstVideoBox *video_box = GST_VIDEO_BOX (trans);
+  const guint8 *indata;
+  guint8 *outdata;
 
   indata = GST_BUFFER_DATA (in);
   outdata = GST_BUFFER_DATA (out);





More information about the Gstreamer-commits mailing list