GstCaps * caps, guint * size);
static GstFlowReturn gst_smpte_alpha_transform (GstBaseTransform * trans,
GstBuffer * in, GstBuffer * out);
+static void gst_smpte_alpha_before_transform (GstBaseTransform * trans,
+ GstBuffer * buf);
static GstCaps *gst_smpte_alpha_transform_caps (GstBaseTransform * trans,
GstPadDirection direction, GstCaps * from);
trans_class->get_unit_size =
GST_DEBUG_FUNCPTR (gst_smpte_alpha_get_unit_size);
trans_class->transform = GST_DEBUG_FUNCPTR (gst_smpte_alpha_transform);
+ trans_class->before_transform =
+ GST_DEBUG_FUNCPTR (gst_smpte_alpha_before_transform);
trans_class->transform_caps =
GST_DEBUG_FUNCPTR (gst_smpte_alpha_transform_caps);
}
}
}
-static GstFlowReturn
-gst_smpte_alpha_transform (GstBaseTransform * trans, GstBuffer * in,
- GstBuffer * out)
+static void
+gst_smpte_alpha_before_transform (GstBaseTransform * trans, GstBuffer * buf)
{
GstSMPTEAlpha *smpte = GST_SMPTE_ALPHA (trans);
GstClockTime timestamp, stream_time;
- gdouble position;
- gint border;
-
- if (G_UNLIKELY (!smpte->process))
- goto not_negotiated;
/* first sync the controller to the current stream_time of the buffer */
- timestamp = GST_BUFFER_TIMESTAMP (in);
+ timestamp = GST_BUFFER_TIMESTAMP (buf);
stream_time =
gst_segment_to_stream_time (&trans->segment, GST_FORMAT_TIME, timestamp);
if (GST_CLOCK_TIME_IS_VALID (stream_time))
gst_object_sync_values (G_OBJECT (smpte), stream_time);
+}
+
+static GstFlowReturn
+gst_smpte_alpha_transform (GstBaseTransform * trans, GstBuffer * in,
+ GstBuffer * out)
+{
+ GstSMPTEAlpha *smpte = GST_SMPTE_ALPHA (trans);
+ gdouble position;
+ gint border;
+
+ if (G_UNLIKELY (!smpte->process))
+ goto not_negotiated;
/* these are the propertis we update with only the object lock, others are
* only updated with the TRANSFORM_LOCK. */