static GstFlowReturn gst_smpte_alpha_transform_frame (GstVideoFilter * vfilter, GstVideoFrame * in_frame, GstVideoFrame * out_frame) { GstSMPTEAlpha *smpte = GST_SMPTE_ALPHA (vfilter); gdouble position; gint border; if (G_UNLIKELY (!smpte->process)) goto not_negotiated; GST_OBJECT_LOCK (smpte); position = smpte->position; border = smpte->border; /* run the type specific filter code */ smpte->process (smpte, in_frame, out_frame, smpte->mask, border, ((1 << smpte->depth) + border) * position); GST_OBJECT_UNLOCK (smpte); return GST_FLOW_OK; /* ERRORS */ not_negotiated: { GST_ELEMENT_ERROR (smpte, CORE, NEGOTIATION, (NULL), ("No input format negotiated")); return GST_FLOW_NOT_NEGOTIATED; } }
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. */ GST_OBJECT_LOCK (smpte); position = smpte->position; border = smpte->border; GST_OBJECT_UNLOCK (smpte); /* run the type specific filter code */ smpte->process (smpte, GST_BUFFER_DATA (in), GST_BUFFER_DATA (out), smpte->mask, smpte->width, smpte->height, border, ((1 << smpte->depth) + border) * position); return GST_FLOW_OK; /* ERRORS */ not_negotiated: { GST_ELEMENT_ERROR (smpte, CORE, NEGOTIATION, (NULL), ("No input format negotiated")); return GST_FLOW_NOT_NEGOTIATED; } }