[Bug 666177] gstvideo: overlays may now have premultiplied alpha

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Mon Dec 26 02:43:00 PST 2011


https://bugzilla.gnome.org/show_bug.cgi?id=666177
  GStreamer | gst-plugins-base | unspecified

Tim-Philipp Müller <t.i.m> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #204029|none                        |accepted-commit_now
             status|                            |

--- Comment #10 from Tim-Philipp Müller <t.i.m at zen.co.uk> 2011-12-26 10:42:57 UTC ---
(From update of attachment 204029)
Looks good to me, thanks for working on this.

Just one minor suggestion:

>+static gboolean
>+gst_video_overlay_rectangle_check_flags (GstVideoOverlayFormatFlags flags)
>+{
>+  /* Check flags only contains flags we know about */
>+  return (flags & ~(GST_VIDEO_OVERLAY_FORMAT_FLAG_PREMULTIPLIED_ALPHA)) == 0;
>+}
> ...
>-  g_return_val_if_fail (flags == 0, NULL);
>+  g_return_val_if_fail (gst_video_overlay_rectangle_check_flags (flags), NULL);

Make this either a static inline function or a macro, so we don't get a
compiler warning about the static function being unused if people compile
gstreamer without the function guards (as common on embedded systems).

>+/**
>+ * gst_video_overlay_rectangle_get_flags:
>..
>+ * Since: 0.10.36
>+ */

More 0.10.37 probably.

>diff --git a/gst-libs/gst/video/video-overlay-composition.h b/gst-libs/gst/video/video-overlay-composition.h
>index 5ff7ce3..11108be 100644
>--- a/gst-libs/gst/video/video-overlay-composition.h
>+++ b/gst-libs/gst/video/video-overlay-composition.h
>@@ -95,13 +95,15 @@ gst_video_overlay_rectangle_unref (GstVideoOverlayRectangle * comp)
> /**
>  * GstVideoOverlayFormatFlags:
>  * @GST_VIDEO_OVERLAY_FORMAT_FLAG_NONE: no flags
>+ * @GST_VIDEO_OVERLAY_FORMAT_FLAG_PREMULTIPLIED_ALPHA: RGB are premultiplied by A/255

Add a (Since 0.10.37) at the end of the description for the new flag (which is
not official markup, but the best we can do, gtk-doc doesn't allow
since-markers for individual enum values).

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list