From 6be4d8efe034ddd05e0677b37b1e5dd3e622b5c1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sebastian=20Dr=C3=B6ge?= Date: Sat, 3 Jul 2010 17:47:29 +0200 Subject: [PATCH] [MOVED FROM BAD 052/134] vp8: Add initial documentation, based on the theoradec/theoraenc documentation --- ext/vp8/gstvp8dec.c | 23 ++++++++++++++++++++--- ext/vp8/gstvp8dec.h | 4 ++-- ext/vp8/gstvp8enc.c | 30 +++++++++++++++++++++++++++--- ext/vp8/gstvp8enc.h | 4 ++-- 4 files changed, 51 insertions(+), 10 deletions(-) diff --git a/ext/vp8/gstvp8dec.c b/ext/vp8/gstvp8dec.c index 3a5673f..1fc680d 100644 --- a/ext/vp8/gstvp8dec.c +++ b/ext/vp8/gstvp8dec.c @@ -19,6 +19,23 @@ * Boston, MA 02111-1307, USA. * */ +/** + * SECTION:element-vp8dec + * @see_also: vp8enc, matroskademux + * + * This element decodes VP8 streams into raw video. + * VP8 is a royalty-free + * video codec maintained by Google + * . It's the successor of On2 VP3, which was the base of the + * Theora video codec. + * + * + * Example pipeline + * |[ + * gst-launch -v filesrc location=videotestsrc.webm ! matroskademux ! vp8dec ! xvimagesink + * ]| This example pipeline will decode a WebM stream and decodes the VP8 video. + * + */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -185,7 +202,7 @@ gst_vp8_dec_finalize (GObject * object) GST_DEBUG_OBJECT (object, "finalize"); - g_return_if_fail (GST_IS_GST_VP8_DEC (object)); + g_return_if_fail (GST_IS_VP8_DEC (object)); gst_vp8_dec = GST_VP8_DEC (object); G_OBJECT_CLASS (parent_class)->finalize (object); @@ -197,7 +214,7 @@ gst_vp8_dec_set_property (GObject * object, guint prop_id, { GstVP8Dec *dec; - g_return_if_fail (GST_IS_GST_VP8_DEC (object)); + g_return_if_fail (GST_IS_VP8_DEC (object)); dec = GST_VP8_DEC (object); GST_DEBUG_OBJECT (object, "gst_vp8_dec_set_property"); @@ -226,7 +243,7 @@ gst_vp8_dec_get_property (GObject * object, guint prop_id, GValue * value, { GstVP8Dec *dec; - g_return_if_fail (GST_IS_GST_VP8_DEC (object)); + g_return_if_fail (GST_IS_VP8_DEC (object)); dec = GST_VP8_DEC (object); switch (prop_id) { diff --git a/ext/vp8/gstvp8dec.h b/ext/vp8/gstvp8dec.h index afcf9b3..6e3de84 100644 --- a/ext/vp8/gstvp8dec.h +++ b/ext/vp8/gstvp8dec.h @@ -44,9 +44,9 @@ G_BEGIN_DECLS (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_VP8_DEC,GstVP8Dec)) #define GST_VP8_DEC_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_VP8_DEC,GstVP8DecClass)) -#define GST_IS_GST_VP8_DEC(obj) \ +#define GST_IS_VP8_DEC(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_VP8_DEC)) -#define GST_IS_GST_VP8_DEC_CLASS(obj) \ +#define GST_IS_VP8_DEC_CLASS(obj) \ (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_VP8_DEC)) typedef struct _GstVP8Dec GstVP8Dec; diff --git a/ext/vp8/gstvp8enc.c b/ext/vp8/gstvp8enc.c index 7839fdd..8c42b45 100644 --- a/ext/vp8/gstvp8enc.c +++ b/ext/vp8/gstvp8enc.c @@ -19,6 +19,30 @@ * Boston, MA 02111-1307, USA. * */ +/** + * SECTION:element-vp8enc + * @see_also: vp8dec, webmmux, oggmux + * + * This element encodes raw video into a VP8 stream. + * VP8 is a royalty-free + * video codec maintained by Google + * . It's the successor of On2 VP3, which was the base of the + * Theora video codec. + * + * To control the quality of the encoding, the #GstVP8Enc::bitrate and + * #GstVP8Enc::quality properties can be used. These two properties are + * mutualy exclusive. Setting the bitrate property will produce a constant + * bitrate (CBR) stream while setting the quality property will produce a + * variable bitrate (VBR) stream. + * + * + * Example pipeline + * |[ + * gst-launch -v videotestsrc num-buffers=1000 ! vp8enc ! webmmux ! filesink location=videotestsrc.webm + * ]| This example pipeline will encode a test video source to VP8 muxed in an + * WebM container. + * + */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -295,7 +319,7 @@ gst_vp8_enc_finalize (GObject * object) GST_DEBUG_OBJECT (object, "finalize"); - g_return_if_fail (GST_IS_GST_VP8_ENC (object)); + g_return_if_fail (GST_IS_VP8_ENC (object)); gst_vp8_enc = GST_VP8_ENC (object); g_free (gst_vp8_enc->multipass_cache_file); @@ -311,7 +335,7 @@ gst_vp8_enc_set_property (GObject * object, guint prop_id, { GstVP8Enc *gst_vp8_enc; - g_return_if_fail (GST_IS_GST_VP8_ENC (object)); + g_return_if_fail (GST_IS_VP8_ENC (object)); gst_vp8_enc = GST_VP8_ENC (object); GST_DEBUG_OBJECT (object, "gst_vp8_enc_set_property"); @@ -359,7 +383,7 @@ gst_vp8_enc_get_property (GObject * object, guint prop_id, GValue * value, { GstVP8Enc *gst_vp8_enc; - g_return_if_fail (GST_IS_GST_VP8_ENC (object)); + g_return_if_fail (GST_IS_VP8_ENC (object)); gst_vp8_enc = GST_VP8_ENC (object); switch (prop_id) { diff --git a/ext/vp8/gstvp8enc.h b/ext/vp8/gstvp8enc.h index c84df91..26c4231 100644 --- a/ext/vp8/gstvp8enc.h +++ b/ext/vp8/gstvp8enc.h @@ -43,9 +43,9 @@ G_BEGIN_DECLS (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_VP8_ENC,GstVP8Enc)) #define GST_VP8_ENC_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_VP8_ENC,GstVP8EncClass)) -#define GST_IS_GST_VP8_ENC(obj) \ +#define GST_IS_VP8_ENC(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_VP8_ENC)) -#define GST_IS_GST_VP8_ENC_CLASS(obj) \ +#define GST_IS_VP8_ENC_CLASS(obj) \ (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_VP8_ENC)) typedef struct _GstVP8Enc GstVP8Enc; -- 2.7.4