video: add define for video formats supported by the overlay blending code
authorTim-Philipp Müller <tim.muller@collabora.co.uk>
Tue, 19 Feb 2013 12:46:14 +0000 (12:46 +0000)
committerTim-Philipp Müller <tim.muller@collabora.co.uk>
Tue, 19 Feb 2013 12:54:40 +0000 (12:54 +0000)
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
gst-libs/gst/video/video-overlay-composition.c
gst-libs/gst/video/video-overlay-composition.h

index d5d196a..482136b 100644 (file)
@@ -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
 
 <SUBSECTION composition-set-get>
index 0298d25..b18ec3f 100644 (file)
@@ -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)
index f395b87..6dfa556 100644 (file)
@@ -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,