[gst-cvs] gst-plugins-good: alpha: Add documentation

Sebastian Dröge slomo at kemper.freedesktop.org
Thu Apr 8 04:14:30 PDT 2010


Module: gst-plugins-good
Branch: master
Commit: afed9b959c79f675e6bf6c37c577ad604ca7de2c
URL:    http://cgit.freedesktop.org/gstreamer/gst-plugins-good/commit/?id=afed9b959c79f675e6bf6c37c577ad604ca7de2c

Author: Sebastian Dröge <sebastian.droege at collabora.co.uk>
Date:   Thu Apr  8 13:13:34 2010 +0200

alpha: Add documentation

---

 docs/plugins/gst-plugins-good-plugins-docs.sgml    |    1 +
 docs/plugins/gst-plugins-good-plugins-sections.txt |   15 +++++++++++++++
 gst/alpha/gstalpha.c                               |   19 +++++++++++++++++++
 gst/alpha/gstalpha.h                               |    6 ++++++
 4 files changed, 41 insertions(+), 0 deletions(-)

diff --git a/docs/plugins/gst-plugins-good-plugins-docs.sgml b/docs/plugins/gst-plugins-good-plugins-docs.sgml
index 97c14f0..a0ad5c3 100644
--- a/docs/plugins/gst-plugins-good-plugins-docs.sgml
+++ b/docs/plugins/gst-plugins-good-plugins-docs.sgml
@@ -20,6 +20,7 @@
     <title>gst-plugins-good Elements</title>
     <xi:include href="xml/element-aasink.xml" />
     <xi:include href="xml/element-agingtv.xml" />
+    <xi:include href="xml/element-alpha.xml" />
     <xi:include href="xml/element-alphacolor.xml" />
     <xi:include href="xml/element-alawdec.xml" />
     <xi:include href="xml/element-alawenc.xml" />
diff --git a/docs/plugins/gst-plugins-good-plugins-sections.txt b/docs/plugins/gst-plugins-good-plugins-sections.txt
index c35ceb8..259ab1a 100644
--- a/docs/plugins/gst-plugins-good-plugins-sections.txt
+++ b/docs/plugins/gst-plugins-good-plugins-sections.txt
@@ -40,6 +40,21 @@ gst_alaw_enc_get_type
 </SECTION>
 
 <SECTION>
+<FILE>element-alpha</FILE>
+<TITLE>alpha</TITLE>
+GstAlpha
+GstAlphaMethod
+<SUBSECTION Standard>
+GstAlphaClass
+GST_ALPHA
+GST_IS_ALPHA
+GST_TYPE_ALPHA
+gst_alpha_get_type
+GST_ALPHA_CLASS
+GST_IS_ALPHA_CLASS
+</SECTION>
+
+<SECTION>
 <FILE>element-alphacolor</FILE>
 <TITLE>alphacolor</TITLE>
 GstAlphaColor
diff --git a/gst/alpha/gstalpha.c b/gst/alpha/gstalpha.c
index a88a938..fd189d3 100644
--- a/gst/alpha/gstalpha.c
+++ b/gst/alpha/gstalpha.c
@@ -20,6 +20,25 @@
  * Boston, MA 02111-1307, USA.
  */
 
+/**
+ * SECTION:element-alpha
+ * 
+ * The alpha element adds an alpha channel to a video stream. The values
+ * of the alpha channel can be either be set to a constant or can be
+ * dynamically calculated via chroma keying, e.g. blue can be set as
+ * the transparent color.
+ *
+ * Sample pipeline:
+ * |[
+ * gst-launch videotestsrc pattern=smpte75 ! alpha method=green ! \
+ *   videomixer name=mixer ! ffmpegcolorspace ! autovideosink     \
+ *   videotestsrc pattern=snow ! mixer.
+ * ]| This pipeline adds a alpha channel to the SMPTE color bars
+ * with green as the transparent color and mixes the output with
+ * a snow video stream.
+ */
+
+
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
diff --git a/gst/alpha/gstalpha.h b/gst/alpha/gstalpha.h
index bc13763..6e4dedf 100644
--- a/gst/alpha/gstalpha.h
+++ b/gst/alpha/gstalpha.h
@@ -44,6 +44,12 @@ G_BEGIN_DECLS
 typedef struct _GstAlpha GstAlpha;
 typedef struct _GstAlphaClass GstAlphaClass;
 
+/** GstAlphaMethod:
+ * @ALPHA_METHOD_SET: Set/adjust alpha channel
+ * @ALPHA_METHOD_GREEN: Chroma Key green
+ * @ALPHA_METHOD_BLUE: Chroma Key blue
+ * @ALPHA_METHOD_CUSTOM: Chroma Key on target_r/g/b
+ */
 typedef enum
 {
   ALPHA_METHOD_SET,





More information about the Gstreamer-commits mailing list