From: Wim Taymans Date: Wed, 1 Mar 2006 17:39:28 +0000 (+0000) Subject: Fix some more docs. X-Git-Tag: 1.19.3~511^2~12141 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8011ea8e2dd5ec78374b4d4af3453bf1b087eae6;p=platform%2Fupstream%2Fgstreamer.git Fix some more docs. Original commit message from CVS: * docs/plugins/Makefile.am: * docs/plugins/gst-plugins-base-plugins-docs.sgml: * docs/plugins/gst-plugins-base-plugins-sections.txt: * ext/gnomevfs/gstgnomevfssink.h: * ext/gnomevfs/gstgnomevfssrc.h: * ext/vorbis/vorbisdec.c: (vorbis_handle_data_packet): * ext/vorbis/vorbisdec.h: * ext/vorbis/vorbisenc.c: (gst_vorbisenc_convert_sink): * ext/vorbis/vorbisenc.h: * ext/vorbis/vorbisparse.c: (vorbis_parse_set_header_on_caps), (vorbis_parse_chain), (vorbis_parse_change_state): * ext/vorbis/vorbisparse.h: * gst/audioconvert/gstaudioconvert.h: * gst/tcp/gsttcpserversink.h: * gst/videotestsrc/gstvideotestsrc.c: * gst/videotestsrc/gstvideotestsrc.h: * gst/volume/gstvolume.c: * gst/volume/gstvolume.h: Fix some more docs. Added docs for vorbisdec and vorbisparse. Fix vorbisparse. --- diff --git a/ChangeLog b/ChangeLog index 443b101..39a4c63 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,30 @@ * docs/plugins/Makefile.am: * docs/plugins/gst-plugins-base-plugins-docs.sgml: * docs/plugins/gst-plugins-base-plugins-sections.txt: + * ext/gnomevfs/gstgnomevfssink.h: + * ext/gnomevfs/gstgnomevfssrc.h: + * ext/vorbis/vorbisdec.c: (vorbis_handle_data_packet): + * ext/vorbis/vorbisdec.h: + * ext/vorbis/vorbisenc.c: (gst_vorbisenc_convert_sink): + * ext/vorbis/vorbisenc.h: + * ext/vorbis/vorbisparse.c: (vorbis_parse_set_header_on_caps), + (vorbis_parse_chain), (vorbis_parse_change_state): + * ext/vorbis/vorbisparse.h: + * gst/audioconvert/gstaudioconvert.h: + * gst/tcp/gsttcpserversink.h: + * gst/videotestsrc/gstvideotestsrc.c: + * gst/videotestsrc/gstvideotestsrc.h: + * gst/volume/gstvolume.c: + * gst/volume/gstvolume.h: + Fix some more docs. + Added docs for vorbisdec and vorbisparse. + Fix vorbisparse. + +2006-03-01 Wim Taymans + + * docs/plugins/Makefile.am: + * docs/plugins/gst-plugins-base-plugins-docs.sgml: + * docs/plugins/gst-plugins-base-plugins-sections.txt: * ext/pango/gstclockoverlay.h: * ext/pango/gsttextoverlay.h: * ext/pango/gsttextrender.h: diff --git a/docs/plugins/Makefile.am b/docs/plugins/Makefile.am index a502a24..a061056 100644 --- a/docs/plugins/Makefile.am +++ b/docs/plugins/Makefile.am @@ -82,7 +82,9 @@ EXTRA_HFILES = \ $(top_srcdir)/ext/pango/gsttimeoverlay.h \ $(top_srcdir)/ext/theora/gsttheoradec.h \ $(top_srcdir)/ext/theora/gsttheoraenc.h \ + $(top_srcdir)/ext/vorbis/vorbisdec.h \ $(top_srcdir)/ext/vorbis/vorbisenc.h \ + $(top_srcdir)/ext/vorbis/vorbisparse.h \ $(top_srcdir)/gst/audioconvert/gstaudioconvert.h \ $(top_srcdir)/gst/audiotestsrc/gstaudiotestsrc.h \ $(top_srcdir)/gst/ffmpegcolorspace/gstffmpegcolorspace.h \ diff --git a/docs/plugins/gst-plugins-base-plugins-docs.sgml b/docs/plugins/gst-plugins-base-plugins-docs.sgml index 1592563..5bd80e3 100644 --- a/docs/plugins/gst-plugins-base-plugins-docs.sgml +++ b/docs/plugins/gst-plugins-base-plugins-docs.sgml @@ -27,7 +27,9 @@ + + diff --git a/docs/plugins/gst-plugins-base-plugins-sections.txt b/docs/plugins/gst-plugins-base-plugins-sections.txt index 3c5cbcf..6d823df 100644 --- a/docs/plugins/gst-plugins-base-plugins-sections.txt +++ b/docs/plugins/gst-plugins-base-plugins-sections.txt @@ -223,6 +223,7 @@ gst_video_test_src_get_type volume GstVolume +GstVolumeFormat GST_VOLUME GST_VOLUME_CLASS GST_IS_VOLUME @@ -233,6 +234,20 @@ gst_volume_get_type
+element-vorbisdec +GstVorbisDec +vorbisdec + +GstVorbisDecClass +GST_VORBIS_DEC +GST_IS_VORBIS_DEC +GST_TYPE_VORBIS_DEC +gst_vorbis_dec_get_type +GST_VORBIS_DEC_CLASS +GST_IS_VORBIS_DEC_CLASS +
+ +
element-vorbisenc vorbisenc GstVorbisEnc @@ -248,6 +263,20 @@ GST_IS_VORBISENC_CLASS
+element-vorbisparse +vorbisparse +GstVorbisParse + +GstVorbisParseClass +GST_VORBIS_PARSE +GST_IS_VORBIS_PARSE +GST_TYPE_VORBIS_PARSE +gst_vorbis_parse_get_type +GST_VORBIS_PARSE_CLASS +GST_IS_VORBIS_PARSE_CLASS +
+ +
element-ximagesink ximagesink GstXImageSink diff --git a/ext/gnomevfs/gstgnomevfssink.h b/ext/gnomevfs/gstgnomevfssink.h index 2712cb0..8e460d6 100644 --- a/ext/gnomevfs/gstgnomevfssink.h +++ b/ext/gnomevfs/gstgnomevfssink.h @@ -44,6 +44,11 @@ G_BEGIN_DECLS typedef struct _GstGnomeVFSSink GstGnomeVFSSink; typedef struct _GstGnomeVFSSinkClass GstGnomeVFSSinkClass; +/** + * GstGnomeVFSSink: + * + * Opaque data structure. + */ struct _GstGnomeVFSSink { GstBaseSink basesink; diff --git a/ext/gnomevfs/gstgnomevfssrc.h b/ext/gnomevfs/gstgnomevfssrc.h index 2a8853b..ac216a1 100644 --- a/ext/gnomevfs/gstgnomevfssrc.h +++ b/ext/gnomevfs/gstgnomevfssrc.h @@ -46,6 +46,11 @@ G_BEGIN_DECLS typedef struct _GstGnomeVFSSrc GstGnomeVFSSrc; typedef struct _GstGnomeVFSSrcClass GstGnomeVFSSrcClass; +/** + * GstGnomeVFSSrc: + * + * Opaque data structure. + */ struct _GstGnomeVFSSrc { GstBaseSrc basesrc; diff --git a/ext/vorbis/vorbisdec.c b/ext/vorbis/vorbisdec.c index 48c4f47..f644e8e 100644 --- a/ext/vorbis/vorbisdec.c +++ b/ext/vorbis/vorbisdec.c @@ -17,6 +17,30 @@ * Boston, MA 02111-1307, USA. */ +/** + * SECTION:element-vorbisdec + * @short_description: a decoder that decodes Vorbis to raw audio + * @see_also: vorbisenc, oggdemux + * + * + * + * This element decodes a Vorbis stream to raw float audio. + * Vorbis is a royalty-free + * audio codec maintained by the Xiph.org + * Foundation. + * + * Example pipelines + * + * + * gst-launch -v filesrc location=sine.ogg ! oggdemux ! vorbisdec ! audioconvert ! alsasink + * + * Decode an Ogg/Vorbis. To create an Ogg/Vorbis file refer to the documentation of vorbisenc. + * + * + * + * Last reviewed on 2006-03-01 (0.10.4) + */ + #ifdef HAVE_CONFIG_H # include "config.h" #endif @@ -798,6 +822,7 @@ vorbis_handle_data_packet (GstVorbisDec * vd, ogg_packet * packet) } else { GST_BUFFER_TIMESTAMP (out) = -1; } + /* this should not overflow */ GST_BUFFER_DURATION (out) = sample_count * GST_SECOND / vd->vi.rate; if (vd->cur_timestamp != GST_CLOCK_TIME_NONE) { diff --git a/ext/vorbis/vorbisdec.h b/ext/vorbis/vorbisdec.h index 2663496..7879393 100644 --- a/ext/vorbis/vorbisdec.h +++ b/ext/vorbis/vorbisdec.h @@ -42,6 +42,11 @@ G_BEGIN_DECLS typedef struct _GstVorbisDec GstVorbisDec; typedef struct _GstVorbisDecClass GstVorbisDecClass; +/** + * GstVorbisDec: + * + * Opaque data structure. + */ struct _GstVorbisDec { GstElement element; diff --git a/ext/vorbis/vorbisenc.c b/ext/vorbis/vorbisenc.c index 4928d4d..4def908 100644 --- a/ext/vorbis/vorbisenc.c +++ b/ext/vorbis/vorbisenc.c @@ -19,6 +19,7 @@ /** * SECTION:element-vorbisenc + * @short_description: an encoder that encodes audio to Vorbis * @see_also: vorbisdec, oggmux * * @@ -42,17 +43,11 @@ * * gst-launch -v alsasrc ! audioconvert ! vorbisenc ! oggmux ! filesink location=alsasrc.ogg * - * - */ - -/** - * SECTION:vorbisenc - * @short_description: an encoder that encodes to Ogg/Vorbis - * @see_also: oggdemux + * * + * Last reviewed on 2006-03-01 (0.10.4) */ - #ifdef HAVE_CONFIG_H #include "config.h" #endif diff --git a/ext/vorbis/vorbisenc.h b/ext/vorbis/vorbisenc.h index b8e41d2..32cb0f0 100644 --- a/ext/vorbis/vorbisenc.h +++ b/ext/vorbis/vorbisenc.h @@ -26,9 +26,7 @@ #include -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ +G_BEGIN_DECLS #define GST_TYPE_VORBISENC \ (vorbisenc_get_type()) @@ -44,6 +42,11 @@ extern "C" { typedef struct _GstVorbisEnc GstVorbisEnc; typedef struct _GstVorbisEncClass GstVorbisEncClass; +/** + * GstVorbisEnc: + * + * Opaque data structure. + */ struct _GstVorbisEnc { GstElement element; @@ -86,10 +89,6 @@ struct _GstVorbisEncClass { GType vorbisenc_get_type(void); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - +G_END_DECLS #endif /* __VORBISENC_H__ */ diff --git a/ext/vorbis/vorbisparse.c b/ext/vorbis/vorbisparse.c index 1d30a05..9fd53ef 100644 --- a/ext/vorbis/vorbisparse.c +++ b/ext/vorbis/vorbisparse.c @@ -17,6 +17,31 @@ * Boston, MA 02111-1307, USA. */ +/** + * SECTION:element-vorbisparse + * @short_description: parses vorbis streams + * @see_also: vorbisdec, oggdemux + * + * + * + * The vorbisparse element will parse the header packets of the Vorbis + * stream and put them as the streamheader in the caps. This is used in the + * multifdsink case where you want to stream live vorbis streams to multiple + * clients, each client has to receive the streamheaders first before they can + * consume the vorbis packets. + * + * Example pipelines + * + * + * gst-launch -v filesrc location=sine.ogg ! oggdemux ! vorbisparse ! fakesink + * + * This pipeline shows that the streamheader is set in the caps. + * + * + * + * Last reviewed on 2006-03-01 (0.10.4) + */ + #ifdef HAVE_CONFIG_H # include "config.h" #endif @@ -128,15 +153,15 @@ vorbis_parse_set_header_on_caps (GstVorbisParse * parse, GstCaps * caps) /* put buffers in a fixed list */ g_value_init (&array, GST_TYPE_ARRAY); g_value_init (&value, GST_TYPE_BUFFER); - g_value_set_boxed (&value, buf1); + gst_value_set_buffer (&value, buf1); gst_value_array_append_value (&array, &value); g_value_unset (&value); g_value_init (&value, GST_TYPE_BUFFER); - g_value_set_boxed (&value, buf2); + gst_value_set_buffer (&value, buf2); gst_value_array_append_value (&array, &value); g_value_unset (&value); g_value_init (&value, GST_TYPE_BUFFER); - g_value_set_boxed (&value, buf3); + gst_value_set_buffer (&value, buf3); gst_value_array_append_value (&array, &value); gst_structure_set_value (structure, "streamheader", &array); g_value_unset (&value); @@ -146,6 +171,7 @@ vorbis_parse_set_header_on_caps (GstVorbisParse * parse, GstCaps * caps) static GstFlowReturn vorbis_parse_chain (GstPad * pad, GstBuffer * buffer) { + GstFlowReturn ret; GstBuffer *buf; GstVorbisParse *parse; @@ -165,39 +191,58 @@ vorbis_parse_chain (GstPad * pad, GstBuffer * buffer) * set caps again, and send out the streamheader buffers */ if (!parse->streamheader_sent) { /* mark and put on caps */ - GstCaps *caps = gst_pad_get_caps (parse->srcpad); + GstCaps *padcaps, *caps; + GstBuffer *outbuf; + + padcaps = gst_pad_get_caps (parse->srcpad); + caps = gst_caps_make_writable (padcaps); + gst_caps_unref (padcaps); vorbis_parse_set_header_on_caps (parse, caps); /* negotiate with these caps */ - GST_DEBUG ("here are the caps: %" GST_PTR_FORMAT, caps); + GST_DEBUG_OBJECT (parse, "here are the caps: %" GST_PTR_FORMAT, caps); gst_pad_set_caps (parse->srcpad, caps); - - /* push out buffers */ - gst_pad_push (parse->srcpad, parse->streamheader->data); - gst_pad_push (parse->srcpad, parse->streamheader->next->data); - gst_pad_push (parse->srcpad, parse->streamheader->next->next->data); + gst_caps_unref (caps); + + /* push out buffers, ignoring return value... */ + outbuf = GST_BUFFER_CAST (parse->streamheader->data); + gst_buffer_set_caps (outbuf, GST_PAD_CAPS (parse->srcpad)); + gst_pad_push (parse->srcpad, outbuf); + outbuf = GST_BUFFER_CAST (parse->streamheader->next->data); + gst_buffer_set_caps (outbuf, GST_PAD_CAPS (parse->srcpad)); + gst_pad_push (parse->srcpad, outbuf); + outbuf = GST_BUFFER_CAST (parse->streamheader->next->next->data); + gst_buffer_set_caps (outbuf, GST_PAD_CAPS (parse->srcpad)); + gst_pad_push (parse->srcpad, outbuf); + + g_list_free (parse->streamheader); + parse->streamheader = NULL; parse->streamheader_sent = TRUE; } /* just send on buffer by default */ - gst_pad_push (parse->srcpad, buf); + gst_buffer_set_caps (buf, GST_PAD_CAPS (parse->srcpad)); + ret = gst_pad_push (parse->srcpad, buf); - return GST_FLOW_OK; + return ret; } static GstStateChangeReturn vorbis_parse_change_state (GstElement * element, GstStateChange transition) { GstVorbisParse *parse = GST_VORBIS_PARSE (element); + GstStateChangeReturn ret; switch (transition) { - case GST_STATE_CHANGE_PAUSED_TO_READY: + case GST_STATE_CHANGE_READY_TO_PAUSED: parse->packetno = 0; + parse->streamheader_sent = FALSE; break; default: break; } + ret = parent_class->change_state (element, transition); - return parent_class->change_state (element, transition); + return ret; } diff --git a/ext/vorbis/vorbisparse.h b/ext/vorbis/vorbisparse.h index d77bb7b..32d8727 100644 --- a/ext/vorbis/vorbisparse.h +++ b/ext/vorbis/vorbisparse.h @@ -25,10 +25,7 @@ #include -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - +G_BEGIN_DECLS #define GST_TYPE_VORBIS_PARSE \ (gst_vorbis_parse_get_type()) @@ -44,6 +41,11 @@ extern "C" { typedef struct _GstVorbisParse GstVorbisParse; typedef struct _GstVorbisParseClass GstVorbisParseClass; +/** + * GstVorbisParse: + * + * Opaque data structure. + */ struct _GstVorbisParse { GstElement element; @@ -61,9 +63,6 @@ struct _GstVorbisParseClass { GType gst_vorbis_parse_get_type(void); -#ifdef __cplusplus -} -#endif /* __cplusplus */ - +G_END_DECLS #endif /* __GST_VORBIS_PARSE_H__ */ diff --git a/gst/audioconvert/gstaudioconvert.h b/gst/audioconvert/gstaudioconvert.h index a833891..bf4eb85 100644 --- a/gst/audioconvert/gstaudioconvert.h +++ b/gst/audioconvert/gstaudioconvert.h @@ -38,7 +38,7 @@ typedef struct _GstAudioConvert GstAudioConvert; typedef struct _GstAudioConvertClass GstAudioConvertClass; /** - * GstAudioConvert + * GstAudioConvert: * * The audioconvert object structure. */ diff --git a/gst/tcp/gsttcpserversink.h b/gst/tcp/gsttcpserversink.h index 9b25398..da4117f 100644 --- a/gst/tcp/gsttcpserversink.h +++ b/gst/tcp/gsttcpserversink.h @@ -62,6 +62,11 @@ typedef enum { GST_TCP_SERVER_SINK_FLAG_LAST = (GST_ELEMENT_FLAG_LAST << 2) } GstTCPServerSinkFlags; +/** + * GstTCPServerSink: + * + * Opaque data structure. + */ struct _GstTCPServerSink { GstMultiFdSink element; diff --git a/gst/videotestsrc/gstvideotestsrc.c b/gst/videotestsrc/gstvideotestsrc.c index 6213f34..68d00ff 100644 --- a/gst/videotestsrc/gstvideotestsrc.c +++ b/gst/videotestsrc/gstvideotestsrc.c @@ -24,9 +24,15 @@ * * Example launch line * + * The videotestsrc element is used to produce test video data in a wide variaty + * of formats. The video test data produced can be controlled with the "pattern" + * property. + * + * * * gst-launch -v videotestsrc pattern=snow ! ximagesink * + * Shows random noise in an X window. * * */ diff --git a/gst/videotestsrc/gstvideotestsrc.h b/gst/videotestsrc/gstvideotestsrc.h index d18eab3..28003f1 100644 --- a/gst/videotestsrc/gstvideotestsrc.h +++ b/gst/videotestsrc/gstvideotestsrc.h @@ -37,6 +37,14 @@ G_BEGIN_DECLS #define GST_IS_VIDEO_TEST_SRC_CLASS(obj) \ (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_VIDEO_TEST_SRC)) +/** + * GstVideoTestSrcPattern: + * @GST_VIDEO_TEST_SRC_SMPTE: A standard SMPTE test pattern + * @GST_VIDEO_TEST_SRC_SNOW: Random noise + * @GST_VIDEO_TEST_SRC_BLACK: A black image + * + * The test pattern to produce. + */ typedef enum { GST_VIDEO_TEST_SRC_SMPTE, GST_VIDEO_TEST_SRC_SNOW, @@ -46,6 +54,11 @@ typedef enum { typedef struct _GstVideoTestSrc GstVideoTestSrc; typedef struct _GstVideoTestSrcClass GstVideoTestSrcClass; +/** + * GstVideoTestSrc: + * + * Opaque data structure. + */ struct _GstVideoTestSrc { GstPushSrc element; diff --git a/gst/volume/gstvolume.c b/gst/volume/gstvolume.c index 3982901..8b86b07 100644 --- a/gst/volume/gstvolume.c +++ b/gst/volume/gstvolume.c @@ -27,6 +27,9 @@ * * Example launch line * + * The volume element changes the volume of the audio data. + * + * * * gst-launch -v -m audiotestsrc ! volume volume=0.5 ! level ! fakesink silent=TRUE * diff --git a/gst/volume/gstvolume.h b/gst/volume/gstvolume.h index b2ac993..7cdfaa8 100644 --- a/gst/volume/gstvolume.h +++ b/gst/volume/gstvolume.h @@ -47,6 +47,11 @@ typedef enum { GST_VOLUME_FORMAT_FLOAT } GstVolumeFormat; +/** + * GstVolume: + * + * Opaque data structure. + */ struct _GstVolume { GstBaseTransform element;