Commit df260a2e authored by Wim Taymans's avatar Wim Taymans

videomixer: port to 0.11

It builds and gst-inspect-0.11 works.. otherwise untested
parent bd032ae3
......@@ -313,7 +313,7 @@ dnl Non ported plugins (non-dependant, then dependant)
dnl Make sure you have a space before and after all plugins
GST_PLUGINS_NONPORTED="deinterlace interleave flx goom2k1 \
imagefreeze interleave monoscope smpte \
videobox videomixer \
videobox \
cairo cairo_gobject dv1394 gdk_pixbuf libdv \
oss oss4 shout2 \
taglib wavpack \
......
......@@ -44,14 +44,16 @@ GST_DEBUG_CATEGORY_STATIC (gst_videomixer_blend_debug);
#define BLEND_A32(name, method, LOOP) \
static void \
method##_ ##name (GstVideoFrame * srcframe, gint xpos, gint ypos, \
gint src_width, gint src_height, gdouble src_alpha, \
GstVideoFrame * destframe) \
gdouble src_alpha, GstVideoFrame * destframe) \
{ \
guint s_alpha; \
gint src_stride, dest_stride; \
gint dest_width, dest_height; \
guint8 *src, *dest; \
gint src_width, src_height; \
\
src_width = GST_VIDEO_FRAME_WIDTH (srcframe); \
src_height = GST_VIDEO_FRAME_HEIGHT (srcframe); \
src = GST_VIDEO_FRAME_PLANE_DATA (srcframe, 0); \
src_stride = GST_VIDEO_FRAME_COMP_STRIDE (srcframe, 0); \
dest = GST_VIDEO_FRAME_PLANE_DATA (destframe, 0); \
......@@ -229,13 +231,12 @@ _blend_##format_name (const guint8 * src, guint8 * dest, \
\
static void \
blend_##format_name (GstVideoFrame * srcframe, gint xpos, gint ypos, \
gint src_width, gint src_height, gdouble src_alpha, \
GstVideoFrame * destframe) \
gdouble src_alpha, GstVideoFrame * destframe) \
{ \
const guint8 *b_src; \
guint8 *b_dest; \
gint b_src_width = src_width; \
gint b_src_height = src_height; \
gint b_src_width; \
gint b_src_height; \
gint xoffset = 0; \
gint yoffset = 0; \
gint src_comp_rowstride, dest_comp_rowstride; \
......@@ -245,6 +246,10 @@ blend_##format_name (GstVideoFrame * srcframe, gint xpos, gint ypos, \
gint comp_yoffset, comp_xoffset; \
gint dest_width, dest_height; \
const GstVideoFormatInfo *info; \
gint src_width, src_height; \
\
src_width = GST_VIDEO_FRAME_WIDTH (srcframe); \
src_height = GST_VIDEO_FRAME_HEIGHT (srcframe); \
\
info = srcframe->info.finfo; \
dest_width = GST_VIDEO_FRAME_WIDTH (destframe); \
......@@ -253,6 +258,9 @@ blend_##format_name (GstVideoFrame * srcframe, gint xpos, gint ypos, \
xpos = x_round (xpos); \
ypos = y_round (ypos); \
\
b_src_width = src_width; \
b_src_height = src_height; \
\
/* adjust src pointers for negative sizes */ \
if (xpos < 0) { \
xoffset = -xpos; \
......@@ -439,14 +447,17 @@ PLANAR_YUV_FILL_COLOR (y41b, GST_VIDEO_FORMAT_Y41B, memset);
#define RGB_BLEND(name, bpp, MEMCPY, BLENDLOOP) \
static void \
blend_##name (GstVideoFrame * srcframe, gint xpos, gint ypos, \
gint src_width, gint src_height, gdouble src_alpha, \
GstVideoFrame * destframe) \
gdouble src_alpha, GstVideoFrame * destframe) \
{ \
gint b_alpha; \
gint i; \
gint src_stride, dest_stride; \
gint dest_width, dest_height; \
guint8 *dest, *src; \
gint src_width, src_height; \
\
src_width = GST_VIDEO_FRAME_WIDTH (srcframe); \
src_height = GST_VIDEO_FRAME_HEIGHT (srcframe); \
\
src = GST_VIDEO_FRAME_PLANE_DATA (srcframe, 0); \
dest = GST_VIDEO_FRAME_PLANE_DATA (destframe, 0); \
......@@ -602,14 +613,17 @@ RGB_FILL_COLOR (bgrx, 4, _memset_bgrx);
#define PACKED_422_BLEND(name, MEMCPY, BLENDLOOP) \
static void \
blend_##name (GstVideoFrame * srcframe, gint xpos, gint ypos, \
gint src_width, gint src_height, gdouble src_alpha, \
GstVideoFrame * destframe) \
gdouble src_alpha, GstVideoFrame * destframe) \
{ \
gint b_alpha; \
gint i; \
gint src_stride, dest_stride; \
gint dest_width, dest_height; \
guint8 *src, *dest; \
gint src_width, src_height; \
\
src_width = GST_VIDEO_FRAME_WIDTH (srcframe); \
src_height = GST_VIDEO_FRAME_HEIGHT (srcframe); \
\
dest_width = GST_VIDEO_FRAME_WIDTH (destframe); \
dest_height = GST_VIDEO_FRAME_HEIGHT (destframe); \
......
......@@ -23,7 +23,7 @@
#include <gst/gst.h>
#include <gst/video/video.h>
typedef void (*BlendFunction) (GstVideoFrame *srcframe, gint xpos, gint ypos, gint src_width, gint src_height, gdouble src_alpha, GstVideoFrame * destframe);
typedef void (*BlendFunction) (GstVideoFrame *srcframe, gint xpos, gint ypos, gdouble src_alpha, GstVideoFrame * destframe);
typedef void (*FillCheckerFunction) (GstVideoFrame * frame);
typedef void (*FillColorFunction) (GstVideoFrame * frame, gint c1, gint c2, gint c3);
......
This diff is collapsed.
......@@ -75,7 +75,7 @@ struct _GstVideoMixer2
GstPad *srcpad;
/* Lock to prevent the state to change while blending */
GMutex *lock;
GMutex lock;
/* Sink pads using Collect Pads 2*/
GstCollectPads2 *collect;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment