Commit bd0b307a authored by Sebastian Dröge's avatar Sebastian Dröge

videomixer: Add support for Y444, Y42B, Y41B and YV12

parent 314fbd80
This diff is collapsed.
......@@ -32,6 +32,10 @@ extern BlendFunction gst_video_mixer_blend_bgra;
#define gst_video_mixer_blend_abgr gst_video_mixer_blend_argb
#define gst_video_mixer_blend_rgba gst_video_mixer_blend_bgra
extern BlendFunction gst_video_mixer_blend_i420;
#define gst_video_mixer_blend_yv12 gst_video_mixer_blend_i420
extern BlendFunction gst_video_mixer_blend_y41b;
extern BlendFunction gst_video_mixer_blend_y42b;
extern BlendFunction gst_video_mixer_blend_y444;
extern BlendFunction gst_video_mixer_blend_rgb;
#define gst_video_mixer_blend_bgr gst_video_mixer_blend_rgb
extern BlendFunction gst_video_mixer_blend_rgbx;
......@@ -45,6 +49,10 @@ extern FillCheckerFunction gst_video_mixer_fill_checker_bgra;
#define gst_video_mixer_fill_checker_rgba gst_video_mixer_fill_checker_bgra
extern FillCheckerFunction gst_video_mixer_fill_checker_ayuv;
extern FillCheckerFunction gst_video_mixer_fill_checker_i420;
#define gst_video_mixer_fill_checker_yv12 gst_video_mixer_fill_checker_i420
extern FillCheckerFunction gst_video_mixer_fill_checker_y41b;
extern FillCheckerFunction gst_video_mixer_fill_checker_y42b;
extern FillCheckerFunction gst_video_mixer_fill_checker_y444;
extern FillCheckerFunction gst_video_mixer_fill_checker_rgb;
#define gst_video_mixer_fill_checker_bgr gst_video_mixer_fill_checker_rgb
extern FillCheckerFunction gst_video_mixer_fill_checker_rgbx;
......@@ -58,6 +66,10 @@ extern FillColorFunction gst_video_mixer_fill_color_bgra;
extern FillColorFunction gst_video_mixer_fill_color_rgba;
extern FillColorFunction gst_video_mixer_fill_color_ayuv;
extern FillColorFunction gst_video_mixer_fill_color_i420;
extern FillColorFunction gst_video_mixer_fill_color_yv12;
extern FillColorFunction gst_video_mixer_fill_color_y41b;
extern FillColorFunction gst_video_mixer_fill_color_y42b;
extern FillColorFunction gst_video_mixer_fill_color_y444;
extern FillColorFunction gst_video_mixer_fill_color_rgb;
extern FillColorFunction gst_video_mixer_fill_color_bgr;
extern FillColorFunction gst_video_mixer_fill_color_xrgb;
......
......@@ -471,7 +471,9 @@ static GstStaticPadTemplate src_factory = GST_STATIC_PAD_TEMPLATE ("src",
GST_PAD_ALWAYS,
GST_STATIC_CAPS (GST_VIDEO_CAPS_YUV ("AYUV") ";" GST_VIDEO_CAPS_BGRA ";"
GST_VIDEO_CAPS_ARGB ";" GST_VIDEO_CAPS_RGBA ";" GST_VIDEO_CAPS_ABGR ";"
GST_VIDEO_CAPS_YUV ("I420") ";" GST_VIDEO_CAPS_RGB ";"
GST_VIDEO_CAPS_YUV ("Y444") ";" GST_VIDEO_CAPS_YUV ("Y42B") ";"
GST_VIDEO_CAPS_YUV ("{ I420, YV12 }") ";"
GST_VIDEO_CAPS_YUV ("Y41B") ";" GST_VIDEO_CAPS_RGB ";"
GST_VIDEO_CAPS_BGR ";" GST_VIDEO_CAPS_xRGB ";" GST_VIDEO_CAPS_xBGR ";"
GST_VIDEO_CAPS_RGBx ";" GST_VIDEO_CAPS_BGRx)
);
......@@ -481,7 +483,9 @@ static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink_%d",
GST_PAD_REQUEST,
GST_STATIC_CAPS (GST_VIDEO_CAPS_YUV ("AYUV") ";" GST_VIDEO_CAPS_BGRA ";"
GST_VIDEO_CAPS_ARGB ";" GST_VIDEO_CAPS_RGBA ";" GST_VIDEO_CAPS_ABGR ";"
GST_VIDEO_CAPS_YUV ("I420") ";" GST_VIDEO_CAPS_RGB ";"
GST_VIDEO_CAPS_YUV ("Y444") ";" GST_VIDEO_CAPS_YUV ("Y42B") ";"
GST_VIDEO_CAPS_YUV ("{ I420, YV12 }") ";"
GST_VIDEO_CAPS_YUV ("Y41B") ";" GST_VIDEO_CAPS_RGB ";"
GST_VIDEO_CAPS_BGR ";" GST_VIDEO_CAPS_xRGB ";" GST_VIDEO_CAPS_xBGR ";"
GST_VIDEO_CAPS_RGBx ";" GST_VIDEO_CAPS_BGRx)
);
......@@ -975,12 +979,36 @@ gst_videomixer_setcaps (GstPad * pad, GstCaps * caps)
mixer->fill_color = gst_video_mixer_fill_color_rgba;
ret = TRUE;
break;
case GST_VIDEO_FORMAT_Y444:
mixer->blend = gst_video_mixer_blend_y444;
mixer->fill_checker = gst_video_mixer_fill_checker_y444;
mixer->fill_color = gst_video_mixer_fill_color_y444;
ret = TRUE;
break;
case GST_VIDEO_FORMAT_Y42B:
mixer->blend = gst_video_mixer_blend_y42b;
mixer->fill_checker = gst_video_mixer_fill_checker_y42b;
mixer->fill_color = gst_video_mixer_fill_color_y42b;
ret = TRUE;
break;
case GST_VIDEO_FORMAT_I420:
mixer->blend = gst_video_mixer_blend_i420;
mixer->fill_checker = gst_video_mixer_fill_checker_i420;
mixer->fill_color = gst_video_mixer_fill_color_i420;
ret = TRUE;
break;
case GST_VIDEO_FORMAT_YV12:
mixer->blend = gst_video_mixer_blend_yv12;
mixer->fill_checker = gst_video_mixer_fill_checker_yv12;
mixer->fill_color = gst_video_mixer_fill_color_yv12;
ret = TRUE;
break;
case GST_VIDEO_FORMAT_Y41B:
mixer->blend = gst_video_mixer_blend_y41b;
mixer->fill_checker = gst_video_mixer_fill_checker_y41b;
mixer->fill_color = gst_video_mixer_fill_color_y41b;
ret = TRUE;
break;
case GST_VIDEO_FORMAT_RGB:
mixer->blend = gst_video_mixer_blend_rgb;
mixer->fill_checker = gst_video_mixer_fill_checker_rgb;
......
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