pango: Re-add shading support which was dropped by a previous patch
authorSebastian Dröge <sebastian.droege@collabora.co.uk>
Tue, 4 Aug 2009 10:11:00 +0000 (12:11 +0200)
committerSebastian Dröge <sebastian.droege@collabora.co.uk>
Thu, 6 Aug 2009 04:43:37 +0000 (06:43 +0200)
ext/pango/gsttextoverlay.c

index 6954245..1f02339 100644 (file)
@@ -1496,6 +1496,24 @@ gst_text_overlay_push_frame (GstTextOverlay * overlay, GstBuffer * video_frame)
   }
   ypos += overlay->deltay;
 
+  /* shaded background box */
+  if (overlay->want_shading) {
+    switch (overlay->format) {
+      case GST_MAKE_FOURCC ('I', '4', '2', '0'):
+        gst_text_overlay_shade_I420_y (overlay,
+            GST_BUFFER_DATA (video_frame), xpos, xpos + overlay->image_width,
+            ypos, ypos + overlay->image_height);
+        break;
+      case GST_MAKE_FOURCC ('U', 'Y', 'V', 'Y'):
+        gst_text_overlay_shade_UYVY_y (overlay,
+            GST_BUFFER_DATA (video_frame), xpos, xpos + overlay->image_width,
+            ypos, ypos + overlay->image_height);
+        break;
+      default:
+        g_assert_not_reached ();
+    }
+  }
+
   if (ypos < 0)
     ypos = 0;