* 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:
+ * 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:
$(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 \
<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>
<TITLE>volume</TITLE>
GstVolume
<SUBSECTION Standard>
+GstVolumeFormat
GST_VOLUME
GST_VOLUME_CLASS
GST_IS_VOLUME
</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>
GstVorbisEnc
</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>
GstXImageSink
typedef struct _GstGnomeVFSSink GstGnomeVFSSink;
typedef struct _GstGnomeVFSSinkClass GstGnomeVFSSinkClass;
+/**
+ * GstGnomeVFSSink:
+ *
+ * Opaque data structure.
+ */
struct _GstGnomeVFSSink
{
GstBaseSink basesink;
typedef struct _GstGnomeVFSSrc GstGnomeVFSSrc;
typedef struct _GstGnomeVFSSrcClass GstGnomeVFSSrcClass;
+/**
+ * GstGnomeVFSSrc:
+ *
+ * Opaque data structure.
+ */
struct _GstGnomeVFSSrc
{
GstBaseSrc basesrc;
* 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
} 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) {
typedef struct _GstVorbisDec GstVorbisDec;
typedef struct _GstVorbisDecClass GstVorbisDecClass;
+/**
+ * GstVorbisDec:
+ *
+ * Opaque data structure.
+ */
struct _GstVorbisDec {
GstElement element;
/**
* SECTION:element-vorbisenc
+ * @short_description: an encoder that encodes audio to Vorbis
* @see_also: vorbisdec, oggmux
*
* <refsect2>
* <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
#include <vorbis/codec.h>
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
+G_BEGIN_DECLS
#define GST_TYPE_VORBISENC \
(vorbisenc_get_type())
typedef struct _GstVorbisEnc GstVorbisEnc;
typedef struct _GstVorbisEncClass GstVorbisEncClass;
+/**
+ * GstVorbisEnc:
+ *
+ * Opaque data structure.
+ */
struct _GstVorbisEnc {
GstElement element;
GType vorbisenc_get_type(void);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
+G_END_DECLS
#endif /* __VORBISENC_H__ */
* 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
/* 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);
static GstFlowReturn
vorbis_parse_chain (GstPad * pad, GstBuffer * buffer)
{
+ GstFlowReturn ret;
GstBuffer *buf;
GstVorbisParse *parse;
* 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;
}
#include <gst/gst.h>
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
+G_BEGIN_DECLS
#define GST_TYPE_VORBIS_PARSE \
(gst_vorbis_parse_get_type())
typedef struct _GstVorbisParse GstVorbisParse;
typedef struct _GstVorbisParseClass GstVorbisParseClass;
+/**
+ * GstVorbisParse:
+ *
+ * Opaque data structure.
+ */
struct _GstVorbisParse {
GstElement element;
GType gst_vorbis_parse_get_type(void);
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
+G_END_DECLS
#endif /* __GST_VORBIS_PARSE_H__ */
typedef struct _GstAudioConvertClass GstAudioConvertClass;
/**
- * GstAudioConvert
+ * GstAudioConvert:
*
* The audioconvert object structure.
*/
GST_TCP_SERVER_SINK_FLAG_LAST = (GST_ELEMENT_FLAG_LAST << 2)
} GstTCPServerSinkFlags;
+/**
+ * GstTCPServerSink:
+ *
+ * Opaque data structure.
+ */
struct _GstTCPServerSink {
GstMultiFdSink element;
* <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>
*/
#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,
typedef struct _GstVideoTestSrc GstVideoTestSrc;
typedef struct _GstVideoTestSrcClass GstVideoTestSrcClass;
+/**
+ * GstVideoTestSrc:
+ *
+ * Opaque data structure.
+ */
struct _GstVideoTestSrc {
GstPushSrc element;
* <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>
GST_VOLUME_FORMAT_FLOAT
} GstVolumeFormat;
+/**
+ * GstVolume:
+ *
+ * Opaque data structure.
+ */
struct _GstVolume {
GstBaseTransform element;