Commit 8011ea8e authored by Wim Taymans's avatar Wim Taymans
Browse files

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.
parent 81e72d14
2006-03-01 Wim Taymans <wim@fluendo.com>
* 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 <wim@fluendo.com>
 
* 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 \
......
......@@ -27,7 +27,9 @@
<xi:include href="xml/element-timeoverlay.xml" />
<xi:include href="xml/element-videotestsrc.xml" />
<xi:include href="xml/element-volume.xml" />
<xi:include href="xml/element-vorbisdec.xml" />
<xi:include href="xml/element-vorbisenc.xml" />
<xi:include href="xml/element-vorbisparse.xml" />
<xi:include href="xml/element-ximagesink.xml" />
<xi:include href="xml/element-xvimagesink.xml" />
</chapter>
......
......@@ -223,6 +223,7 @@ gst_video_test_src_get_type
<TITLE>volume</TITLE>
GstVolume
<SUBSECTION Standard>
GstVolumeFormat
GST_VOLUME
GST_VOLUME_CLASS
GST_IS_VOLUME
......@@ -232,6 +233,20 @@ GstVolumeClass
gst_volume_get_type
</SECTION>
<SECTION>
<FILE>element-vorbisdec</FILE>
GstVorbisDec
<TITLE>vorbisdec</TITLE>
<SUBSECTION Standard>
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
</SECTION>
<SECTION>
<FILE>element-vorbisenc</FILE>
<TITLE>vorbisenc</TITLE>
......@@ -247,6 +262,20 @@ GST_TYPE_VORBISENC
GST_IS_VORBISENC_CLASS
</SECTION>
<SECTION>
<FILE>element-vorbisparse</FILE>
<TITLE>vorbisparse</TITLE>
GstVorbisParse
<SUBSECTION Standard>
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
</SECTION>
<SECTION>
<FILE>element-ximagesink</FILE>
<TITLE>ximagesink</TITLE>
......
......@@ -44,6 +44,11 @@ G_BEGIN_DECLS
typedef struct _GstGnomeVFSSink GstGnomeVFSSink;
typedef struct _GstGnomeVFSSinkClass GstGnomeVFSSinkClass;
/**
* GstGnomeVFSSink:
*
* Opaque data structure.
*/
struct _GstGnomeVFSSink
{
GstBaseSink basesink;
......
......@@ -46,6 +46,11 @@ G_BEGIN_DECLS
typedef struct _GstGnomeVFSSrc GstGnomeVFSSrc;
typedef struct _GstGnomeVFSSrcClass GstGnomeVFSSrcClass;
/**
* GstGnomeVFSSrc:
*
* Opaque data structure.
*/
struct _GstGnomeVFSSrc
{
GstBaseSrc basesrc;
......
......@@ -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
*
* <refsect2>
* <para>
* This element decodes a Vorbis stream to raw float audio.
* <ulink url="http://www.vorbis.com/">Vorbis</ulink> is a royalty-free
* audio codec maintained by the <ulink url="http://www.xiph.org/">Xiph.org
* Foundation</ulink>.
* </para>
* <title>Example pipelines</title>
* <para>
* <programlisting>
* gst-launch -v filesrc location=sine.ogg ! oggdemux ! vorbisdec ! audioconvert ! alsasink
* </programlisting>
* Decode an Ogg/Vorbis. To create an Ogg/Vorbis file refer to the documentation of vorbisenc.
* </para>
* </refsect2>
*
* 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) {
......
......@@ -42,6 +42,11 @@ G_BEGIN_DECLS
typedef struct _GstVorbisDec GstVorbisDec;
typedef struct _GstVorbisDecClass GstVorbisDecClass;
/**
* GstVorbisDec:
*
* Opaque data structure.
*/
struct _GstVorbisDec {
GstElement element;
......
......@@ -19,6 +19,7 @@
/**
* SECTION:element-vorbisenc
* @short_description: an encoder that encodes audio to Vorbis
* @see_also: vorbisdec, oggmux
*
* <refsect2>
......@@ -42,17 +43,11 @@
* <programlisting>
* gst-launch -v alsasrc ! audioconvert ! vorbisenc ! oggmux ! filesink location=alsasrc.ogg
* </programlisting>
* </refsect2>
*/
/**
* SECTION:vorbisenc
* @short_description: an encoder that encodes to Ogg/Vorbis
* @see_also: oggdemux
* </refsect2>
*
* Last reviewed on 2006-03-01 (0.10.4)
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
......
......@@ -26,9 +26,7 @@
#include <vorbis/codec.h>
#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__ */
......@@ -17,6 +17,31 @@
* Boston, MA 02111-1307, USA.
*/
/**
* SECTION:element-vorbisparse
* @short_description: parses vorbis streams
* @see_also: vorbisdec, oggdemux
*
* <refsect2>
* <para>
* 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.
* </para>
* <title>Example pipelines</title>
* <para>
* <programlisting>
* gst-launch -v filesrc location=sine.ogg ! oggdemux ! vorbisparse ! fakesink
* </programlisting>
* This pipeline shows that the streamheader is set in the caps.
* </para>
* </refsect2>
*
* 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;
}
......@@ -25,10 +25,7 @@
#include <gst/gst.h>
#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__ */
......@@ -38,7 +38,7 @@ typedef struct _GstAudioConvert GstAudioConvert;
typedef struct _GstAudioConvertClass GstAudioConvertClass;
/**
* GstAudioConvert
* GstAudioConvert:
*
* The audioconvert object structure.
*/
......
......@@ -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;
......
......@@ -24,9 +24,15 @@
* <refsect2>
* <title>Example launch line</title>
* <para>
* 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.
* </para>
* <para>
* <programlisting>
* gst-launch -v videotestsrc pattern=snow ! ximagesink
* </programlisting>
* Shows random noise in an X window.
* </para>
* </refsect2>
*/
......
......@@ -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;
......
......@@ -27,6 +27,9 @@
* <refsect2>
* <title>Example launch line</title>
* <para>
* The volume element changes the volume of the audio data.
* </para>
* <para>
* <programlisting>
* gst-launch -v -m audiotestsrc ! volume volume=0.5 ! level ! fakesink silent=TRUE
* </programlisting>
......
......@@ -47,6 +47,11 @@ typedef enum {
GST_VOLUME_FORMAT_FLOAT
} GstVolumeFormat;
/**
* GstVolume:
*
* Opaque data structure.
*/
struct _GstVolume {
GstBaseTransform element;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment