* Sample pipeline:
* |[
* gst-launch videotestsrc pattern=smpte75 ! alpha method=green ! \
- * videomixer name=mixer ! ffmpegcolorspace ! autovideosink \
+ * videomixer name=mixer ! videoconvert ! autovideosink \
* videotestsrc pattern=snow ! mixer.
* ]| This pipeline adds a alpha channel to the SMPTE color bars
* with green as the transparent color and mixes the output with
" (passthrough: %d)", incaps, outcaps, passthrough);
gst_base_transform_set_passthrough (btrans, passthrough);
- if (!gst_alpha_set_process_function (alpha) && !passthrough)
- goto no_process;
-
alpha->in_info = in_info;
alpha->out_info = out_info;
+ if (!gst_alpha_set_process_function (alpha) && !passthrough)
+ goto no_process;
+
gst_alpha_init_params (alpha);
GST_ALPHA_UNLOCK (alpha);
src = GST_VIDEO_FRAME_PLANE_DATA (in_frame, 0);
dest = GST_VIDEO_FRAME_PLANE_DATA (out_frame, 0);
- width = in_frame->info.width;
- height = in_frame->info.height;
+ width = GST_VIDEO_FRAME_WIDTH (in_frame);
+ height = GST_VIDEO_FRAME_HEIGHT (in_frame);
- o[0] = gst_video_format_get_component_offset (in_format, 3, width, height);
- o[1] = gst_video_format_get_component_offset (in_format, 0, width, height);
- o[2] = gst_video_format_get_component_offset (in_format, 1, width, height);
- o[3] = gst_video_format_get_component_offset (in_format, 2, width, height);
+ o[0] = GST_VIDEO_FRAME_COMP_OFFSET (in_frame, 3);
+ o[1] = GST_VIDEO_FRAME_COMP_OFFSET (in_frame, 0);
+ o[2] = GST_VIDEO_FRAME_COMP_OFFSET (in_frame, 1);
+ o[3] = GST_VIDEO_FRAME_COMP_OFFSET (in_frame, 2);
memcpy (matrix,
alpha->out_sdtv ? cog_rgb_to_ycbcr_matrix_8bit_sdtv :
src = GST_VIDEO_FRAME_PLANE_DATA (in_frame, 0);
dest = GST_VIDEO_FRAME_PLANE_DATA (out_frame, 0);
- width = in_frame->info.width;
- height = in_frame->info.height;
+ width = GST_VIDEO_FRAME_WIDTH (in_frame);
+ height = GST_VIDEO_FRAME_HEIGHT (in_frame);
- o[0] = gst_video_format_get_component_offset (in_format, 3, width, height);
- o[1] = gst_video_format_get_component_offset (in_format, 0, width, height);
- o[2] = gst_video_format_get_component_offset (in_format, 1, width, height);
- o[3] = gst_video_format_get_component_offset (in_format, 2, width, height);
+ o[0] = GST_VIDEO_FRAME_COMP_OFFSET (in_frame, 3);
+ o[1] = GST_VIDEO_FRAME_COMP_OFFSET (in_frame, 0);
+ o[2] = GST_VIDEO_FRAME_COMP_OFFSET (in_frame, 1);
+ o[3] = GST_VIDEO_FRAME_COMP_OFFSET (in_frame, 2);
smin = 128 - alpha->black_sensitivity;
smax = 128 + alpha->white_sensitivity;
src = GST_VIDEO_FRAME_PLANE_DATA (in_frame, 0);
dest = GST_VIDEO_FRAME_PLANE_DATA (out_frame, 0);
- width = in_frame->info.width;
- height = in_frame->info.height;
+ width = GST_VIDEO_FRAME_WIDTH (in_frame);
+ height = GST_VIDEO_FRAME_HEIGHT (in_frame);
- p[0] = gst_video_format_get_component_offset (out_format, 3, width, height);
- p[1] = gst_video_format_get_component_offset (out_format, 0, width, height);
- p[2] = gst_video_format_get_component_offset (out_format, 1, width, height);
- p[3] = gst_video_format_get_component_offset (out_format, 2, width, height);
+ p[0] = GST_VIDEO_FRAME_COMP_OFFSET (out_frame, 3);
+ p[1] = GST_VIDEO_FRAME_COMP_OFFSET (out_frame, 0);
+ p[2] = GST_VIDEO_FRAME_COMP_OFFSET (out_frame, 1);
+ p[3] = GST_VIDEO_FRAME_COMP_OFFSET (out_frame, 2);
- o[0] = gst_video_format_get_component_offset (in_format, 3, width, height);
- o[1] = gst_video_format_get_component_offset (in_format, 0, width, height);
- o[2] = gst_video_format_get_component_offset (in_format, 1, width, height);
- o[3] = gst_video_format_get_component_offset (in_format, 2, width, height);
+ o[0] = GST_VIDEO_FRAME_COMP_OFFSET (in_frame, 3);
+ o[1] = GST_VIDEO_FRAME_COMP_OFFSET (in_frame, 0);
+ o[2] = GST_VIDEO_FRAME_COMP_OFFSET (in_frame, 1);
+ o[3] = GST_VIDEO_FRAME_COMP_OFFSET (in_frame, 2);
for (i = 0; i < height; i++) {
for (j = 0; j < width; j++) {
src = GST_VIDEO_FRAME_PLANE_DATA (in_frame, 0);
dest = GST_VIDEO_FRAME_PLANE_DATA (out_frame, 0);
- width = in_frame->info.width;
- height = in_frame->info.height;
+ width = GST_VIDEO_FRAME_WIDTH (in_frame);
+ height = GST_VIDEO_FRAME_HEIGHT (in_frame);
- p[0] = gst_video_format_get_component_offset (out_format, 3, width, height);
- p[1] = gst_video_format_get_component_offset (out_format, 0, width, height);
- p[2] = gst_video_format_get_component_offset (out_format, 1, width, height);
- p[3] = gst_video_format_get_component_offset (out_format, 2, width, height);
+ p[0] = GST_VIDEO_FRAME_COMP_OFFSET (out_frame, 3);
+ p[1] = GST_VIDEO_FRAME_COMP_OFFSET (out_frame, 0);
+ p[2] = GST_VIDEO_FRAME_COMP_OFFSET (out_frame, 1);
+ p[3] = GST_VIDEO_FRAME_COMP_OFFSET (out_frame, 2);
- o[0] = gst_video_format_get_component_offset (in_format, 3, width, height);
- o[1] = gst_video_format_get_component_offset (in_format, 0, width, height);
- o[2] = gst_video_format_get_component_offset (in_format, 1, width, height);
- o[3] = gst_video_format_get_component_offset (in_format, 2, width, height);
+ o[0] = GST_VIDEO_FRAME_COMP_OFFSET (in_frame, 3);
+ o[1] = GST_VIDEO_FRAME_COMP_OFFSET (in_frame, 0);
+ o[2] = GST_VIDEO_FRAME_COMP_OFFSET (in_frame, 1);
+ o[3] = GST_VIDEO_FRAME_COMP_OFFSET (in_frame, 2);
smin = 128 - alpha->black_sensitivity;
smax = 128 + alpha->white_sensitivity;
src = GST_VIDEO_FRAME_PLANE_DATA (in_frame, 0);
dest = GST_VIDEO_FRAME_PLANE_DATA (out_frame, 0);
- width = in_frame->info.width;
- height = in_frame->info.height;
+ width = GST_VIDEO_FRAME_WIDTH (in_frame);
+ height = GST_VIDEO_FRAME_HEIGHT (in_frame);
- p[0] = gst_video_format_get_component_offset (out_format, 3, width, height);
- p[1] = gst_video_format_get_component_offset (out_format, 0, width, height);
- p[2] = gst_video_format_get_component_offset (out_format, 1, width, height);
- p[3] = gst_video_format_get_component_offset (out_format, 2, width, height);
+ p[0] = GST_VIDEO_FRAME_COMP_OFFSET (out_frame, 3);
+ p[1] = GST_VIDEO_FRAME_COMP_OFFSET (out_frame, 0);
+ p[2] = GST_VIDEO_FRAME_COMP_OFFSET (out_frame, 1);
+ p[3] = GST_VIDEO_FRAME_COMP_OFFSET (out_frame, 2);
memcpy (matrix,
alpha->in_sdtv ? cog_ycbcr_to_rgb_matrix_8bit_sdtv :
src = GST_VIDEO_FRAME_PLANE_DATA (in_frame, 0);
dest = GST_VIDEO_FRAME_PLANE_DATA (out_frame, 0);
- width = in_frame->info.width;
- height = in_frame->info.height;
+ width = GST_VIDEO_FRAME_WIDTH (in_frame);
+ height = GST_VIDEO_FRAME_HEIGHT (in_frame);
- p[0] = gst_video_format_get_component_offset (out_format, 3, width, height);
- p[1] = gst_video_format_get_component_offset (out_format, 0, width, height);
- p[2] = gst_video_format_get_component_offset (out_format, 1, width, height);
- p[3] = gst_video_format_get_component_offset (out_format, 2, width, height);
+ p[0] = GST_VIDEO_FRAME_COMP_OFFSET (out_frame, 3);
+ p[1] = GST_VIDEO_FRAME_COMP_OFFSET (out_frame, 0);
+ p[2] = GST_VIDEO_FRAME_COMP_OFFSET (out_frame, 1);
+ p[3] = GST_VIDEO_FRAME_COMP_OFFSET (out_frame, 2);
smin = 128 - alpha->black_sensitivity;
smax = 128 + alpha->white_sensitivity;
src = GST_VIDEO_FRAME_PLANE_DATA (in_frame, 0);
dest = GST_VIDEO_FRAME_PLANE_DATA (out_frame, 0);
- width = in_frame->info.width;
- height = in_frame->info.height;
+ width = GST_VIDEO_FRAME_WIDTH (in_frame);
+ height = GST_VIDEO_FRAME_HEIGHT (in_frame);
if (alpha->in_sdtv == alpha->out_sdtv) {
for (y = 0; y < height; y++) {
src = GST_VIDEO_FRAME_PLANE_DATA (in_frame, 0);
dest = GST_VIDEO_FRAME_PLANE_DATA (out_frame, 0);
- width = in_frame->info.width;
- height = in_frame->info.height;
+ width = GST_VIDEO_FRAME_WIDTH (in_frame);
+ height = GST_VIDEO_FRAME_HEIGHT (in_frame);
smin = 128 - alpha->black_sensitivity;
smax = 128 + alpha->white_sensitivity;
src = GST_VIDEO_FRAME_PLANE_DATA (in_frame, 0);
dest = GST_VIDEO_FRAME_PLANE_DATA (out_frame, 0);
- width = in_frame->info.width;
- height = in_frame->info.height;
-
- bpp = gst_video_format_get_pixel_stride (in_format, 0);
+ width = GST_VIDEO_FRAME_WIDTH (in_frame);
+ height = GST_VIDEO_FRAME_HEIGHT (in_frame);
- o[0] = gst_video_format_get_component_offset (in_format, 0, width, height);
- o[1] = gst_video_format_get_component_offset (in_format, 1, width, height);
- o[2] = gst_video_format_get_component_offset (in_format, 2, width, height);
+ bpp = GST_VIDEO_FRAME_COMP_PSTRIDE (in_frame, 0);
+ o[0] = GST_VIDEO_FRAME_COMP_OFFSET (in_frame, 0);
+ o[1] = GST_VIDEO_FRAME_COMP_OFFSET (in_frame, 1);
+ o[2] = GST_VIDEO_FRAME_COMP_OFFSET (in_frame, 2);
memcpy (matrix,
alpha->out_sdtv ? cog_rgb_to_ycbcr_matrix_8bit_sdtv :
src = GST_VIDEO_FRAME_PLANE_DATA (in_frame, 0);
dest = GST_VIDEO_FRAME_PLANE_DATA (out_frame, 0);
- width = in_frame->info.width;
- height = in_frame->info.height;
+ width = GST_VIDEO_FRAME_WIDTH (in_frame);
+ height = GST_VIDEO_FRAME_HEIGHT (in_frame);
- bpp = gst_video_format_get_pixel_stride (in_format, 0);
+ bpp = GST_VIDEO_FRAME_COMP_PSTRIDE (in_frame, 0);
- o[0] = gst_video_format_get_component_offset (in_format, 0, width, height);
- o[1] = gst_video_format_get_component_offset (in_format, 1, width, height);
- o[2] = gst_video_format_get_component_offset (in_format, 2, width, height);
+ o[0] = GST_VIDEO_FRAME_COMP_OFFSET (in_frame, 0);
+ o[1] = GST_VIDEO_FRAME_COMP_OFFSET (in_frame, 1);
+ o[2] = GST_VIDEO_FRAME_COMP_OFFSET (in_frame, 2);
smin = 128 - alpha->black_sensitivity;
smax = 128 + alpha->white_sensitivity;
gst_alpha_set_rgb_argb (const GstVideoFrame * in_frame,
GstVideoFrame * out_frame, GstAlpha * alpha)
{
- GstVideoFormat in_format, out_format;
const guint8 *src;
guint8 *dest;
gint width, height;
src = GST_VIDEO_FRAME_PLANE_DATA (in_frame, 0);
dest = GST_VIDEO_FRAME_PLANE_DATA (out_frame, 0);
- width = in_frame->info.width;
- height = in_frame->info.height;
+ width = GST_VIDEO_FRAME_WIDTH (in_frame);
+ height = GST_VIDEO_FRAME_HEIGHT (in_frame);
- bpp = gst_video_format_get_pixel_stride (in_format, 0);
+ bpp = GST_VIDEO_FRAME_COMP_PSTRIDE (in_frame, 0);
- o[0] = gst_video_format_get_component_offset (in_format, 0, width, height);
- o[1] = gst_video_format_get_component_offset (in_format, 1, width, height);
- o[2] = gst_video_format_get_component_offset (in_format, 2, width, height);
+ o[0] = GST_VIDEO_FRAME_COMP_OFFSET (in_frame, 0);
+ o[1] = GST_VIDEO_FRAME_COMP_OFFSET (in_frame, 1);
+ o[2] = GST_VIDEO_FRAME_COMP_OFFSET (in_frame, 2);
- p[0] = gst_video_format_get_component_offset (out_format, 3, width, height);
- p[1] = gst_video_format_get_component_offset (out_format, 0, width, height);
- p[2] = gst_video_format_get_component_offset (out_format, 1, width, height);
- p[3] = gst_video_format_get_component_offset (out_format, 2, width, height);
+ p[0] = GST_VIDEO_FRAME_COMP_OFFSET (out_frame, 3);
+ p[1] = GST_VIDEO_FRAME_COMP_OFFSET (out_frame, 0);
+ p[2] = GST_VIDEO_FRAME_COMP_OFFSET (out_frame, 1);
+ p[3] = GST_VIDEO_FRAME_COMP_OFFSET (out_frame, 2);
for (i = 0; i < height; i++) {
for (j = 0; j < width; j++) {
src = GST_VIDEO_FRAME_PLANE_DATA (in_frame, 0);
dest = GST_VIDEO_FRAME_PLANE_DATA (out_frame, 0);
- width = in_frame->info.width;
- height = in_frame->info.height;
+ width = GST_VIDEO_FRAME_WIDTH (in_frame);
+ height = GST_VIDEO_FRAME_HEIGHT (in_frame);
- bpp = gst_video_format_get_pixel_stride (in_format, 0);
+ bpp = GST_VIDEO_FRAME_COMP_PSTRIDE (in_frame, 0);
- o[0] = gst_video_format_get_component_offset (in_format, 0, width, height);
- o[1] = gst_video_format_get_component_offset (in_format, 1, width, height);
- o[2] = gst_video_format_get_component_offset (in_format, 2, width, height);
+ o[0] = GST_VIDEO_FRAME_COMP_OFFSET (in_frame, 0);
+ o[1] = GST_VIDEO_FRAME_COMP_OFFSET (in_frame, 1);
+ o[2] = GST_VIDEO_FRAME_COMP_OFFSET (in_frame, 2);
- p[0] = gst_video_format_get_component_offset (out_format, 3, width, height);
- p[1] = gst_video_format_get_component_offset (out_format, 0, width, height);
- p[2] = gst_video_format_get_component_offset (out_format, 1, width, height);
- p[3] = gst_video_format_get_component_offset (out_format, 2, width, height);
+ p[0] = GST_VIDEO_FRAME_COMP_OFFSET (out_frame, 3);
+ p[1] = GST_VIDEO_FRAME_COMP_OFFSET (out_frame, 0);
+ p[2] = GST_VIDEO_FRAME_COMP_OFFSET (out_frame, 1);
+ p[3] = GST_VIDEO_FRAME_COMP_OFFSET (out_frame, 2);
smin = 128 - alpha->black_sensitivity;
smax = 128 + alpha->white_sensitivity;
src = GST_VIDEO_FRAME_PLANE_DATA (in_frame, 0);
dest = GST_VIDEO_FRAME_PLANE_DATA (out_frame, 0);
- width = in_frame->info.width;
- height = in_frame->info.height;
+ width = GST_VIDEO_FRAME_WIDTH (in_frame);
+ height = GST_VIDEO_FRAME_HEIGHT (in_frame);
- y_stride = gst_video_format_get_row_stride (in_format, 0, width);
- uv_stride = gst_video_format_get_row_stride (in_format, 1, width);
+ y_stride = GST_VIDEO_FRAME_COMP_STRIDE (in_frame, 0);
+ uv_stride = GST_VIDEO_FRAME_COMP_STRIDE (in_frame, 1);
srcY_tmp = srcY = src;
- srcU_tmp = srcU =
- src + gst_video_format_get_component_offset (in_format, 1, width, height);
- srcV_tmp = srcV =
- src + gst_video_format_get_component_offset (in_format, 2, width, height);
+ srcU_tmp = srcU = src + GST_VIDEO_FRAME_COMP_OFFSET (in_frame, 1);
+ srcV_tmp = srcV = src + GST_VIDEO_FRAME_COMP_OFFSET (in_frame, 2);
- switch (in_format) {
+ switch (GST_VIDEO_FRAME_FORMAT (in_frame)) {
case GST_VIDEO_FORMAT_I420:
case GST_VIDEO_FORMAT_YV12:
v_subs = h_subs = 2;
static void
gst_alpha_chroma_key_planar_yuv_ayuv (const GstVideoFrame * in_frame,
- GstVideoFrame * out_frame, gint width, gint height, GstAlpha * alpha)
+ GstVideoFrame * out_frame, GstAlpha * alpha)
{
const guint8 *src;
guint8 *dest;
src = GST_VIDEO_FRAME_PLANE_DATA (in_frame, 0);
dest = GST_VIDEO_FRAME_PLANE_DATA (out_frame, 0);
- width = in_frame->info.width;
- height = in_frame->info.height;
+ width = GST_VIDEO_FRAME_WIDTH (in_frame);
+ height = GST_VIDEO_FRAME_HEIGHT (in_frame);
- y_stride = gst_video_format_get_row_stride (in_format, 0, width);
- uv_stride = gst_video_format_get_row_stride (in_format, 1, width);
+ y_stride = GST_VIDEO_FRAME_COMP_STRIDE (in_frame, 0);
+ uv_stride = GST_VIDEO_FRAME_COMP_STRIDE (in_frame, 1);
srcY_tmp = srcY = src;
- srcU_tmp = srcU =
- src + gst_video_format_get_component_offset (in_format, 1, width, height);
- srcV_tmp = srcV =
- src + gst_video_format_get_component_offset (in_format, 2, width, height);
+ srcU_tmp = srcU = src + GST_VIDEO_FRAME_COMP_OFFSET (in_frame, 1);
+ srcV_tmp = srcV = src + GST_VIDEO_FRAME_COMP_OFFSET (in_frame, 2);
- switch (in_format) {
+ switch (GST_VIDEO_FRAME_FORMAT (in_frame)) {
case GST_VIDEO_FORMAT_I420:
case GST_VIDEO_FORMAT_YV12:
v_subs = h_subs = 2;
static void
gst_alpha_set_planar_yuv_argb (const GstVideoFrame * in_frame,
- GstVideoFrame * out_frame, gint width, gint height, GstAlpha * alpha)
+ GstVideoFrame * out_frame, GstAlpha * alpha)
{
const guint8 *src;
guint8 *dest;
src = GST_VIDEO_FRAME_PLANE_DATA (in_frame, 0);
dest = GST_VIDEO_FRAME_PLANE_DATA (out_frame, 0);
- width = in_frame->info.width;
- height = in_frame->info.height;
+ width = GST_VIDEO_FRAME_WIDTH (in_frame);
+ height = GST_VIDEO_FRAME_HEIGHT (in_frame);
- p[0] = gst_video_format_get_component_offset (out_format, 3, width, height);
- p[1] = gst_video_format_get_component_offset (out_format, 0, width, height);
- p[2] = gst_video_format_get_component_offset (out_format, 1, width, height);
- p[3] = gst_video_format_get_component_offset (out_format, 2, width, height);
+ p[0] = GST_VIDEO_FRAME_COMP_OFFSET (out_frame, 3);
+ p[1] = GST_VIDEO_FRAME_COMP_OFFSET (out_frame, 0);
+ p[2] = GST_VIDEO_FRAME_COMP_OFFSET (out_frame, 1);
+ p[3] = GST_VIDEO_FRAME_COMP_OFFSET (out_frame, 2);
- y_stride = gst_video_format_get_row_stride (in_format, 0, width);
- uv_stride = gst_video_format_get_row_stride (in_format, 1, width);
+ y_stride = GST_VIDEO_FRAME_COMP_STRIDE (in_frame, 0);
+ uv_stride = GST_VIDEO_FRAME_COMP_STRIDE (in_frame, 1);
srcY_tmp = srcY = src;
- srcU_tmp = srcU =
- src + gst_video_format_get_component_offset (in_format, 1, width, height);
- srcV_tmp = srcV =
- src + gst_video_format_get_component_offset (in_format, 2, width, height);
+ srcU_tmp = srcU = src + GST_VIDEO_FRAME_COMP_OFFSET (in_frame, 1);
+ srcV_tmp = srcV = src + GST_VIDEO_FRAME_COMP_OFFSET (in_frame, 2);
- switch (alpha->in_format) {
+ switch (GST_VIDEO_FRAME_FORMAT (in_frame)) {
case GST_VIDEO_FORMAT_I420:
case GST_VIDEO_FORMAT_YV12:
v_subs = h_subs = 2;
static void
gst_alpha_chroma_key_planar_yuv_argb (const GstVideoFrame * in_frame,
- GstVideoFrame * out_frame, gint width, gint height, GstAlpha * alpha)
+ GstVideoFrame * out_frame, GstAlpha * alpha)
{
const guint8 *src;
guint8 *dest;
src = GST_VIDEO_FRAME_PLANE_DATA (in_frame, 0);
dest = GST_VIDEO_FRAME_PLANE_DATA (out_frame, 0);
- width = in_frame->info.width;
- height = in_frame->info.height;
-
- p[0] =
- gst_video_format_get_component_offset (alpha->out_format, 3, width,
- height);
- p[1] =
- gst_video_format_get_component_offset (alpha->out_format, 0, width,
- height);
- p[2] =
- gst_video_format_get_component_offset (alpha->out_format, 1, width,
- height);
- p[3] =
- gst_video_format_get_component_offset (alpha->out_format, 2, width,
- height);
-
- y_stride = gst_video_format_get_row_stride (alpha->in_format, 0, width);
- uv_stride = gst_video_format_get_row_stride (alpha->in_format, 1, width);
+ width = GST_VIDEO_FRAME_WIDTH (in_frame);
+ height = GST_VIDEO_FRAME_HEIGHT (in_frame);
+
+ p[0] = GST_VIDEO_FRAME_COMP_OFFSET (out_frame, 3);
+ p[1] = GST_VIDEO_FRAME_COMP_OFFSET (out_frame, 0);
+ p[2] = GST_VIDEO_FRAME_COMP_OFFSET (out_frame, 1);
+ p[3] = GST_VIDEO_FRAME_COMP_OFFSET (out_frame, 2);
+
+ y_stride = GST_VIDEO_FRAME_COMP_STRIDE (in_frame, 0);
+ uv_stride = GST_VIDEO_FRAME_COMP_STRIDE (in_frame, 1);
srcY_tmp = srcY = src;
- srcU_tmp = srcU =
- src + gst_video_format_get_component_offset (alpha->in_format, 1, width,
- height);
- srcV_tmp = srcV =
- src + gst_video_format_get_component_offset (alpha->in_format, 2, width,
- height);
-
- switch (alpha->in_format) {
+ srcU_tmp = srcU = src + GST_VIDEO_FRAME_COMP_OFFSET (in_frame, 1);
+ srcV_tmp = srcV = src + GST_VIDEO_FRAME_COMP_OFFSET (in_frame, 2);
+
+ switch (GST_VIDEO_FRAME_FORMAT (in_frame)) {
case GST_VIDEO_FORMAT_I420:
case GST_VIDEO_FORMAT_YV12:
v_subs = h_subs = 2;
static void
gst_alpha_set_packed_422_ayuv (const GstVideoFrame * in_frame,
- GstVideoFrame * out_frame, gint width, gint height, GstAlpha * alpha)
+ GstVideoFrame * out_frame, GstAlpha * alpha)
{
const guint8 *src;
guint8 *dest;
src = GST_VIDEO_FRAME_PLANE_DATA (in_frame, 0);
dest = GST_VIDEO_FRAME_PLANE_DATA (out_frame, 0);
- width = in_frame->info.width;
- height = in_frame->info.height;
+ width = GST_VIDEO_FRAME_WIDTH (in_frame);
+ height = GST_VIDEO_FRAME_HEIGHT (in_frame);
- src_stride = gst_video_format_get_row_stride (alpha->in_format, 0, width);
+ src_stride = GST_VIDEO_FRAME_COMP_STRIDE (in_frame, 0);
- p[0] =
- gst_video_format_get_component_offset (alpha->in_format, 0, width,
- height);
+ p[0] = GST_VIDEO_FRAME_COMP_OFFSET (in_frame, 0);
p[2] = p[0] + 2;
- p[1] =
- gst_video_format_get_component_offset (alpha->in_format, 1, width,
- height);
- p[3] =
- gst_video_format_get_component_offset (alpha->in_format, 2, width,
- height);
+ p[1] = GST_VIDEO_FRAME_COMP_OFFSET (in_frame, 1);
+ p[3] = GST_VIDEO_FRAME_COMP_OFFSET (in_frame, 2);
if (alpha->in_sdtv != alpha->out_sdtv) {
gint matrix[12];
static void
gst_alpha_chroma_key_packed_422_ayuv (const GstVideoFrame * in_frame,
- GstVideoFrame * out_frame, gint width, gint height, GstAlpha * alpha)
+ GstVideoFrame * out_frame, GstAlpha * alpha)
{
const guint8 *src;
guint8 *dest;
src = GST_VIDEO_FRAME_PLANE_DATA (in_frame, 0);
dest = GST_VIDEO_FRAME_PLANE_DATA (out_frame, 0);
- width = in_frame->info.width;
- height = in_frame->info.height;
+ width = GST_VIDEO_FRAME_WIDTH (in_frame);
+ height = GST_VIDEO_FRAME_HEIGHT (in_frame);
- src_stride = gst_video_format_get_row_stride (alpha->in_format, 0, width);
+ src_stride = GST_VIDEO_FRAME_COMP_STRIDE (in_frame, 0);
- p[0] =
- gst_video_format_get_component_offset (alpha->in_format, 0, width,
- height);
+ p[0] = GST_VIDEO_FRAME_COMP_OFFSET (in_frame, 0);
p[2] = p[0] + 2;
- p[1] =
- gst_video_format_get_component_offset (alpha->in_format, 1, width,
- height);
- p[3] =
- gst_video_format_get_component_offset (alpha->in_format, 2, width,
- height);
+ p[1] = GST_VIDEO_FRAME_COMP_OFFSET (in_frame, 1);
+ p[3] = GST_VIDEO_FRAME_COMP_OFFSET (in_frame, 2);
smin = 128 - alpha->black_sensitivity;
smax = 128 + alpha->white_sensitivity;
src = GST_VIDEO_FRAME_PLANE_DATA (in_frame, 0);
dest = GST_VIDEO_FRAME_PLANE_DATA (out_frame, 0);
- width = in_frame->info.width;
- height = in_frame->info.height;
+ width = GST_VIDEO_FRAME_WIDTH (in_frame);
+ height = GST_VIDEO_FRAME_HEIGHT (in_frame);
- src_stride = gst_video_format_get_row_stride (alpha->in_format, 0, width);
+ src_stride = GST_VIDEO_FRAME_COMP_STRIDE (in_frame, 0);
- o[0] =
- gst_video_format_get_component_offset (alpha->in_format, 0, width,
- height);
+ o[0] = GST_VIDEO_FRAME_COMP_OFFSET (in_frame, 0);
o[2] = o[0] + 2;
- o[1] =
- gst_video_format_get_component_offset (alpha->in_format, 1, width,
- height);
- o[3] =
- gst_video_format_get_component_offset (alpha->in_format, 2, width,
- height);
-
- p[0] =
- gst_video_format_get_component_offset (alpha->out_format, 3, width,
- height);
- p[1] =
- gst_video_format_get_component_offset (alpha->out_format, 0, width,
- height);
- p[2] =
- gst_video_format_get_component_offset (alpha->out_format, 1, width,
- height);
- p[3] =
- gst_video_format_get_component_offset (alpha->out_format, 2, width,
- height);
+ o[1] = GST_VIDEO_FRAME_COMP_OFFSET (in_frame, 1);
+ o[3] = GST_VIDEO_FRAME_COMP_OFFSET (in_frame, 2);
+
+ p[0] = GST_VIDEO_FRAME_COMP_OFFSET (out_frame, 3);
+ p[1] = GST_VIDEO_FRAME_COMP_OFFSET (out_frame, 0);
+ p[2] = GST_VIDEO_FRAME_COMP_OFFSET (out_frame, 1);
+ p[3] = GST_VIDEO_FRAME_COMP_OFFSET (out_frame, 2);
memcpy (matrix,
alpha->in_sdtv ? cog_ycbcr_to_rgb_matrix_8bit_sdtv :
static void
gst_alpha_chroma_key_packed_422_argb (const GstVideoFrame * in_frame,
- GstVideoFrame * out_frame, gint width, gint height, GstAlpha * alpha)
+ GstVideoFrame * out_frame, GstAlpha * alpha)
{
const guint8 *src;
guint8 *dest;
src = GST_VIDEO_FRAME_PLANE_DATA (in_frame, 0);
dest = GST_VIDEO_FRAME_PLANE_DATA (out_frame, 0);
- width = in_frame->info.width;
- height = in_frame->info.height;
+ width = GST_VIDEO_FRAME_WIDTH (in_frame);
+ height = GST_VIDEO_FRAME_HEIGHT (in_frame);
- src_stride = gst_video_format_get_row_stride (alpha->in_format, 0, width);
+ src_stride = GST_VIDEO_FRAME_COMP_STRIDE (in_frame, 0);
- o[0] =
- gst_video_format_get_component_offset (alpha->in_format, 0, width,
- height);
+ o[0] = GST_VIDEO_FRAME_COMP_OFFSET (in_frame, 0);
o[2] = o[0] + 2;
- o[1] =
- gst_video_format_get_component_offset (alpha->in_format, 1, width,
- height);
- o[3] =
- gst_video_format_get_component_offset (alpha->in_format, 2, width,
- height);
-
- p[0] =
- gst_video_format_get_component_offset (alpha->out_format, 3, width,
- height);
- p[1] =
- gst_video_format_get_component_offset (alpha->out_format, 0, width,
- height);
- p[2] =
- gst_video_format_get_component_offset (alpha->out_format, 1, width,
- height);
- p[3] =
- gst_video_format_get_component_offset (alpha->out_format, 2, width,
- height);
+ o[1] = GST_VIDEO_FRAME_COMP_OFFSET (in_frame, 1);
+ o[3] = GST_VIDEO_FRAME_COMP_OFFSET (in_frame, 2);
+
+ p[0] = GST_VIDEO_FRAME_COMP_OFFSET (out_frame, 3);
+ p[1] = GST_VIDEO_FRAME_COMP_OFFSET (out_frame, 0);
+ p[2] = GST_VIDEO_FRAME_COMP_OFFSET (out_frame, 1);
+ p[3] = GST_VIDEO_FRAME_COMP_OFFSET (out_frame, 2);
memcpy (matrix,
alpha->in_sdtv ? cog_ycbcr_to_rgb_matrix_8bit_sdtv :
gfloat tmp;
gfloat tmp1, tmp2;
gfloat y;
+ const GstVideoFormatInfo *in_info, *out_info;
const gint *matrix;
+ in_info = alpha->in_info.finfo;
+ out_info = alpha->out_info.finfo;
+
/* RGB->RGB: convert to SDTV YUV, chroma keying, convert back
* YUV->RGB: chroma keying, convert to RGB
* RGB->YUV: convert to YUV, chroma keying
* YUV->YUV: convert matrix, chroma keying
*/
- if (gst_video_format_is_rgb (alpha->in_format)
- && gst_video_format_is_rgb (alpha->out_format))
+ if (GST_VIDEO_FORMAT_INFO_IS_RGB (in_info)
+ && GST_VIDEO_FORMAT_INFO_IS_RGB (out_info))
matrix = cog_rgb_to_ycbcr_matrix_8bit_sdtv;
- else if (gst_video_format_is_yuv (alpha->in_format)
- && gst_video_format_is_rgb (alpha->out_format))
+ else if (GST_VIDEO_FORMAT_INFO_IS_YUV (in_info)
+ && GST_VIDEO_FORMAT_INFO_IS_RGB (out_info))
matrix =
(alpha->in_sdtv) ? cog_rgb_to_ycbcr_matrix_8bit_sdtv :
cog_rgb_to_ycbcr_matrix_8bit_hdtv;
- else if (gst_video_format_is_rgb (alpha->in_format)
- && gst_video_format_is_yuv (alpha->out_format))
+ else if (GST_VIDEO_FORMAT_INFO_IS_RGB (in_info)
+ && GST_VIDEO_FORMAT_INFO_IS_YUV (out_info))
matrix =
(alpha->out_sdtv) ? cog_rgb_to_ycbcr_matrix_8bit_sdtv :
cog_rgb_to_ycbcr_matrix_8bit_hdtv;
switch (alpha->method) {
case ALPHA_METHOD_SET:
- switch (alpha->out_format) {
+ switch (GST_VIDEO_INFO_FORMAT (&alpha->out_info)) {
case GST_VIDEO_FORMAT_AYUV:
- switch (alpha->in_format) {
+ switch (GST_VIDEO_INFO_FORMAT (&alpha->in_info)) {
case GST_VIDEO_FORMAT_AYUV:
alpha->process = gst_alpha_set_ayuv_ayuv;
break;
case GST_VIDEO_FORMAT_ABGR:
case GST_VIDEO_FORMAT_RGBA:
case GST_VIDEO_FORMAT_BGRA:
- switch (alpha->in_format) {
+ switch (GST_VIDEO_INFO_FORMAT (&alpha->in_info)) {
case GST_VIDEO_FORMAT_AYUV:
alpha->process = gst_alpha_set_ayuv_argb;
break;
case ALPHA_METHOD_GREEN:
case ALPHA_METHOD_BLUE:
case ALPHA_METHOD_CUSTOM:
- switch (alpha->out_format) {
+ switch (GST_VIDEO_INFO_FORMAT (&alpha->out_info)) {
case GST_VIDEO_FORMAT_AYUV:
- switch (alpha->in_format) {
+ switch (GST_VIDEO_INFO_FORMAT (&alpha->in_info)) {
case GST_VIDEO_FORMAT_AYUV:
alpha->process = gst_alpha_chroma_key_ayuv_ayuv;
break;
case GST_VIDEO_FORMAT_ABGR:
case GST_VIDEO_FORMAT_RGBA:
case GST_VIDEO_FORMAT_BGRA:
- switch (alpha->in_format) {
+ switch (GST_VIDEO_INFO_FORMAT (&alpha->in_info)) {
case GST_VIDEO_FORMAT_AYUV:
alpha->process = gst_alpha_chroma_key_ayuv_argb;
break;
*
* Sample pipeline:
* |[
- * gst-launch videotestsrc ! "video/x-raw-yuv,format=(fourcc)AYUV" ! \
- * alphacolor ! "video/x-raw-rgb" ! ffmpegcolorspace ! autovideosink
+ * gst-launch videotestsrc ! "video/x-raw,format=(fourcc)AYUV" ! \
+ * alphacolor ! videoconvert ! autovideosink
* ]|
*/
static GstStaticPadTemplate sink_template = GST_STATIC_PAD_TEMPLATE ("sink",
GST_PAD_SINK,
GST_PAD_ALWAYS,
- GST_STATIC_CAPS (GST_VIDEO_CAPS_RGBA ";" GST_VIDEO_CAPS_BGRA ";"
- GST_VIDEO_CAPS_ARGB ";" GST_VIDEO_CAPS_ABGR ";"
- GST_VIDEO_CAPS_YUV ("AYUV"))
+ GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE ("{ RGBA, BGRA, ARGB, ABGR, AYUV }"))
);
static GstStaticPadTemplate src_template = GST_STATIC_PAD_TEMPLATE ("src",
GST_PAD_SRC,
GST_PAD_ALWAYS,
- GST_STATIC_CAPS (GST_VIDEO_CAPS_RGBA ";" GST_VIDEO_CAPS_BGRA ";"
- GST_VIDEO_CAPS_ARGB ";" GST_VIDEO_CAPS_ABGR ";"
- GST_VIDEO_CAPS_YUV ("AYUV"))
+ GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE ("{ RGBA, BGRA, ARGB, ABGR, AYUV }"))
);
G_DEFINE_TYPE (GstAlphaColor, gst_alpha_color, GST_TYPE_VIDEO_FILTER);
gst_element_class_set_details_simple (gstelement_class, "Alpha color filter",
"Filter/Converter/Video",
"ARGB from/to AYUV colorspace conversion preserving the alpha channel",
- "Wim Taymans <wim@fluendo.com>");
+ "Wim Taymans <wim.taymans@gmail.com>");
gst_element_class_add_pad_template (gstelement_class,
gst_static_pad_template_get (&sink_template));
GST_DEBUG_FUNCPTR (gst_alpha_color_set_caps);
gstbasetransform_class->transform_ip =
GST_DEBUG_FUNCPTR (gst_alpha_color_transform_ip);
-
}
static void
#define DEFINE_ARGB_AYUV_FUNCTIONS(name, A, R, G, B) \
static void \
-transform_##name##_ayuv (guint8 * data, gint size, const gint *matrix) \
+transform_##name##_ayuv (GstVideoFrame * frame, const gint *matrix) \
{ \
+ guint8 *data; \
+ gsize size; \
gint y, u, v; \
gint yc[4]; \
gint uc[4]; \
gint vc[4]; \
\
+ data = GST_VIDEO_FRAME_PLANE_DATA (frame, 0);\
+ size = GST_VIDEO_FRAME_SIZE (frame);\
+ \
memcpy (yc, matrix, 4 * sizeof (gint)); \
memcpy (uc, matrix + 4, 4 * sizeof (gint)); \
memcpy (vc, matrix + 8, 4 * sizeof (gint)); \
} \
\
static void \
-transform_ayuv_##name (guint8 * data, gint size, const gint *matrix) \
+transform_ayuv_##name (GstVideoFrame * frame, const gint *matrix) \
{ \
+ guint8 *data; \
+ gsize size; \
gint r, g, b; \
gint rc[4]; \
gint gc[4]; \
gint bc[4]; \
\
+ data = GST_VIDEO_FRAME_PLANE_DATA (frame, 0);\
+ size = GST_VIDEO_FRAME_SIZE (frame);\
+ \
memcpy (rc, matrix, 4 * sizeof (gint)); \
memcpy (gc, matrix + 4, 4 * sizeof (gint)); \
memcpy (bc, matrix + 8, 4 * sizeof (gint)); \
DEFINE_ARGB_AYUV_FUNCTIONS (abgr, 0, 3, 2, 1);
static void
-transform_ayuv_ayuv (guint8 * data, gint size, const gint * matrix)
+transform_ayuv_ayuv (GstVideoFrame * frame, const gint * matrix)
{
+ guint8 *data;
+ gsize size;
gint y, u, v;
gint yc[4];
gint uc[4];
if (matrix == NULL)
return;
+ data = GST_VIDEO_FRAME_PLANE_DATA (frame, 0);
+ size = GST_VIDEO_FRAME_SIZE (frame);
+
memcpy (yc, matrix, 4 * sizeof (gint));
memcpy (uc, matrix + 4, 4 * sizeof (gint));
memcpy (vc, matrix + 8, 4 * sizeof (gint));
}
static void
-transform_argb_bgra (guint8 * data, gint size, const gint * matrix)
+transform_argb_bgra (GstVideoFrame * frame, const gint * matrix)
{
+ guint8 *data;
+ gsize size;
gint r, g, b;
+ data = GST_VIDEO_FRAME_PLANE_DATA (frame, 0);
+ size = GST_VIDEO_FRAME_SIZE (frame);
+
while (size > 0) {
r = data[1];
g = data[2];
#define transform_abgr_rgba transform_argb_bgra
static void
-transform_argb_abgr (guint8 * data, gint size, const gint * matrix)
+transform_argb_abgr (GstVideoFrame * frame, const gint * matrix)
{
+ guint8 *data;
+ gsize size;
gint r, g, b;
+ data = GST_VIDEO_FRAME_PLANE_DATA (frame, 0);
+ size = GST_VIDEO_FRAME_SIZE (frame);
+
while (size > 0) {
r = data[1];
g = data[2];
#define transform_abgr_argb transform_argb_abgr
static void
-transform_rgba_bgra (guint8 * data, gint size, const gint * matrix)
+transform_rgba_bgra (GstVideoFrame * frame, const gint * matrix)
{
+ guint8 *data;
+ gsize size;
gint r, g, b;
+ data = GST_VIDEO_FRAME_PLANE_DATA (frame, 0);
+ size = GST_VIDEO_FRAME_SIZE (frame);
+
while (size > 0) {
r = data[0];
g = data[1];
#define transform_bgra_rgba transform_rgba_bgra
static void
-transform_argb_rgba (guint8 * data, gint size, const gint * matrix)
+transform_argb_rgba (GstVideoFrame * frame, const gint * matrix)
{
+ guint8 *data;
+ gsize size;
gint r, g, b;
+ data = GST_VIDEO_FRAME_PLANE_DATA (frame, 0);
+ size = GST_VIDEO_FRAME_SIZE (frame);
+
while (size > 0) {
r = data[1];
g = data[2];
#define transform_abgr_bgra transform_argb_rgba
static void
-transform_bgra_argb (guint8 * data, gint size, const gint * matrix)
+transform_bgra_argb (GstVideoFrame * frame, const gint * matrix)
{
+ guint8 *data;
+ gsize size;
gint r, g, b;
+ data = GST_VIDEO_FRAME_PLANE_DATA (frame, 0);
+ size = GST_VIDEO_FRAME_SIZE (frame);
+
while (size > 0) {
r = data[2];
g = data[1];
#define transform_rgba_abgr transform_bgra_argb
static void
-transform_rgba_argb (guint8 * data, gint size, const gint * matrix)
+transform_rgba_argb (GstVideoFrame * frame, const gint * matrix)
{
+ guint8 *data;
+ gsize size;
gint r, g, b;
+ data = GST_VIDEO_FRAME_PLANE_DATA (frame, 0);
+ size = GST_VIDEO_FRAME_SIZE (frame);
+
while (size > 0) {
r = data[0];
g = data[1];
{
GstAlphaColor *alpha = GST_ALPHA_COLOR (btrans);
gboolean ret;
- gint w, h;
- gint w2, h2;
- GstVideoFormat in_format, out_format;
- const gchar *matrix;
+ GstVideoInfo in_info, out_info;
gboolean in_sdtv, out_sdtv;
alpha->process = NULL;
alpha->matrix = NULL;
- ret = gst_video_format_parse_caps (incaps, &in_format, &w, &h);
- ret &= gst_video_format_parse_caps (outcaps, &out_format, &w2, &h2);
+ ret = gst_video_info_from_caps (&in_info, incaps);
+ ret &= gst_video_info_from_caps (&out_info, outcaps);
+ if (!ret)
+ goto invalid_caps;
- if (!ret || w != w2 || h != h2) {
- GST_DEBUG_OBJECT (alpha, "incomplete or invalid caps!");
- return FALSE;
- }
-
- matrix = gst_video_parse_caps_color_matrix (incaps);
- in_sdtv = matrix ? g_str_equal (matrix, "sdtv") : TRUE;
- matrix = gst_video_parse_caps_color_matrix (outcaps);
- out_sdtv = matrix ? g_str_equal (matrix, "sdtv") : TRUE;
+ if (GST_VIDEO_INFO_WIDTH (&in_info) != GST_VIDEO_INFO_WIDTH (&out_info) ||
+ GST_VIDEO_INFO_HEIGHT (&in_info) != GST_VIDEO_INFO_HEIGHT (&out_info))
+ goto invalid_caps;
- alpha->in_format = in_format;
- alpha->out_format = out_format;
- alpha->width = w;
- alpha->height = h;
+ in_sdtv =
+ in_info.color_matrix ? g_str_equal (in_info.color_matrix, "sdtv") : TRUE;
+ out_sdtv =
+ out_info.color_matrix ? g_str_equal (out_info.color_matrix,
+ "sdtv") : TRUE;
- switch (alpha->in_format) {
+ switch (GST_VIDEO_INFO_FORMAT (&in_info)) {
case GST_VIDEO_FORMAT_ARGB:
- switch (alpha->out_format) {
+ switch (GST_VIDEO_INFO_FORMAT (&out_info)) {
case GST_VIDEO_FORMAT_ARGB:
alpha->process = NULL;
alpha->matrix = NULL;
}
break;
case GST_VIDEO_FORMAT_BGRA:
- switch (alpha->out_format) {
+ switch (GST_VIDEO_INFO_FORMAT (&out_info)) {
case GST_VIDEO_FORMAT_BGRA:
alpha->process = NULL;
alpha->matrix = NULL;
}
break;
case GST_VIDEO_FORMAT_ABGR:
- switch (alpha->out_format) {
+ switch (GST_VIDEO_INFO_FORMAT (&out_info)) {
case GST_VIDEO_FORMAT_ABGR:
alpha->process = NULL;
alpha->matrix = NULL;
}
break;
case GST_VIDEO_FORMAT_RGBA:
- switch (alpha->out_format) {
+ switch (GST_VIDEO_INFO_FORMAT (&out_info)) {
case GST_VIDEO_FORMAT_RGBA:
alpha->process = NULL;
alpha->matrix = NULL;
}
break;
case GST_VIDEO_FORMAT_AYUV:
- switch (alpha->out_format) {
+ switch (GST_VIDEO_INFO_FORMAT (&out_info)) {
case GST_VIDEO_FORMAT_AYUV:
if (in_sdtv == out_sdtv) {
alpha->process = transform_ayuv_ayuv;
break;
}
- if (in_format == out_format && in_sdtv == out_sdtv)
+ if (GST_VIDEO_INFO_FORMAT (&in_info) == GST_VIDEO_INFO_FORMAT (&out_info)
+ && in_sdtv == out_sdtv)
gst_base_transform_set_passthrough (btrans, TRUE);
else if (!alpha->process)
- return FALSE;
+ goto no_process;
return TRUE;
+
+ /* ERRORS */
+invalid_caps:
+ {
+ GST_DEBUG_OBJECT (alpha, "incomplete or invalid caps");
+ return FALSE;
+ }
+no_process:
+ {
+ GST_DEBUG_OBJECT (alpha, "could not find process function");
+ return FALSE;
+ }
}
static GstFlowReturn
gst_alpha_color_transform_ip (GstBaseTransform * btrans, GstBuffer * inbuf)
{
GstAlphaColor *alpha = GST_ALPHA_COLOR (btrans);
- guint8 *data;
- gsize size;
+ GstVideoFrame frame;
if (gst_base_transform_is_passthrough (btrans))
return GST_FLOW_OK;
- if (G_UNLIKELY (!alpha->process)) {
- GST_ERROR_OBJECT (alpha, "Not negotiated yet");
- return GST_FLOW_NOT_NEGOTIATED;
- }
-
- data = gst_buffer_map (inbuf, &size, NULL, GST_MAP_READWRITE);
+ if (G_UNLIKELY (!alpha->process))
+ goto not_negotiated;
- if (G_UNLIKELY (size != 4 * alpha->width * alpha->height)) {
- GST_ERROR_OBJECT (alpha, "Invalid buffer size (was %u, expected %u)",
- size, alpha->width * alpha->height);
- gst_buffer_unmap (inbuf, data, size);
- return GST_FLOW_ERROR;
- }
+ if (!gst_video_frame_map (&frame, &alpha->in_info, inbuf, GST_MAP_READWRITE))
+ goto invalid_buffer;
/* Transform in place */
- alpha->process (data, size, alpha->matrix);
+ alpha->process (&frame, alpha->matrix);
- gst_buffer_unmap (inbuf, data, size);
+ gst_video_frame_unmap (&frame);
return GST_FLOW_OK;
+
+ /* ERRORS */
+not_negotiated:
+ {
+ GST_ERROR_OBJECT (alpha, "Not negotiated yet");
+ return GST_FLOW_NOT_NEGOTIATED;
+ }
+invalid_buffer:
+ {
+ GST_ERROR_OBJECT (alpha, "Invalid buffer received");
+ return GST_FLOW_ERROR;
+ }
}
static gboolean