From 0b329f2c2282633edd63fd27a36d6502d354fd3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Tue, 19 Feb 2013 12:46:14 +0000 Subject: [PATCH] video: add define for video formats supported by the overlay blending code For use in template caps by overlay elements that use video_overlay_composition_blend(). API: GST_VIDEO_OVERLAY_COMPOSITION_BLEND_FORMATS https://bugzilla.gnome.org/show_bug.cgi?id=665751 --- docs/libs/gst-plugins-base-libs-sections.txt | 2 ++ gst-libs/gst/video/video-overlay-composition.c | 4 ++++ gst-libs/gst/video/video-overlay-composition.h | 13 +++++++++++++ 3 files changed, 19 insertions(+) diff --git a/docs/libs/gst-plugins-base-libs-sections.txt b/docs/libs/gst-plugins-base-libs-sections.txt index d5d196af18..482136bc13 100644 --- a/docs/libs/gst-plugins-base-libs-sections.txt +++ b/docs/libs/gst-plugins-base-libs-sections.txt @@ -2293,6 +2293,8 @@ gst_video_overlay_composition_get_rectangle gst_video_overlay_composition_get_seqnum gst_video_overlay_composition_copy gst_video_overlay_composition_make_writable + +GST_VIDEO_OVERLAY_COMPOSITION_BLEND_FORMATS gst_video_overlay_composition_blend diff --git a/gst-libs/gst/video/video-overlay-composition.c b/gst-libs/gst/video/video-overlay-composition.c index 0298d25a6e..b18ec3ff5d 100644 --- a/gst-libs/gst/video/video-overlay-composition.c +++ b/gst-libs/gst/video/video-overlay-composition.c @@ -438,6 +438,10 @@ gst_video_overlay_rectangle_needs_scaling (GstVideoOverlayRectangle * r) * contained in @video_buf. The data in @video_buf must be writable and * mapped appropriately. */ +/* FIXME: formats with more than 8 bit per component which get unpacked into + * ARGB64 or AYUV64 (such as v210, v216, UYVP, GRAY16_LE and GRAY16_BE) + * are not supported yet by the code in video-blend.c. + */ gboolean gst_video_overlay_composition_blend (GstVideoOverlayComposition * comp, GstVideoFrame * video_buf) diff --git a/gst-libs/gst/video/video-overlay-composition.h b/gst-libs/gst/video/video-overlay-composition.h index f395b878b3..6dfa556b06 100644 --- a/gst-libs/gst/video/video-overlay-composition.h +++ b/gst-libs/gst/video/video-overlay-composition.h @@ -119,6 +119,19 @@ typedef enum { */ #define GST_VIDEO_OVERLAY_COMPOSITION_FORMAT_YUV GST_VIDEO_FORMAT_AYUV +/** + * GST_VIDEO_OVERLAY_COMPOSITION_BLEND_FORMATS: + * + * Video formats supported by gst_video_overlay_composition_blend(), for + * use in overlay elements' pad template caps. + * + * Since: 1.2 + */ +#define GST_VIDEO_OVERLAY_COMPOSITION_BLEND_FORMATS \ + "{ BGRx, RGBx, xRGB, xBGR, RGBA, BGRA, ARGB, ABGR, RGB, BGR," \ + " I420, YV12, AYUV, YUY2, UYVY, v308, Y41B, Y42B, Y444," \ + " NV12, NV21, A420, YUV9, YVU9, IYU1, GRAY8 }" + GType gst_video_overlay_rectangle_get_type (void); GstVideoOverlayRectangle * gst_video_overlay_rectangle_new_raw (GstBuffer * pixels,