+2006-03-24 Stefan Kost <ensonic@users.sf.net>
+
+ * docs/plugins/Makefile.am:
+ * docs/plugins/gst-plugins-base-plugins-docs.sgml:
+ * docs/plugins/gst-plugins-base-plugins-sections.txt:
+ * ext/cdparanoia/gstcdparanoiasrc.c:
+ * ext/gnomevfs/gstgnomevfssink.c: (gst_gnome_vfs_sink_base_init),
+ (gst_gnome_vfs_sink_class_init):
+ * ext/gnomevfs/gstgnomevfssrc.c: (gst_gnome_vfs_src_base_init):
+ * ext/ogg/gstoggdemux.c: (gst_ogg_demux_base_init):
+ * ext/ogg/gstoggmux.c:
+ * ext/ogg/gstoggparse.c: (gst_ogg_parse_base_init):
+ * ext/ogg/gstogmparse.c: (gst_ogm_audio_parse_base_init),
+ (gst_ogm_video_parse_base_init), (gst_ogm_text_parse_base_init):
+ * ext/pango/gsttextoverlay.c:
+ * ext/pango/gsttextrender.c:
+ * ext/theora/theoradec.c:
+ * ext/theora/theoraenc.c:
+ * ext/vorbis/vorbisdec.c:
+ * ext/vorbis/vorbisenc.c:
+ * gst-libs/gst/audio/gstaudiofilter.c:
+ (gst_audio_filter_base_init):
+ * gst-libs/gst/audio/gstaudiofiltertemplate.c:
+ (gst_audio_filter_template_base_init):
+ * gst/adder/gstadder.c: (gst_adder_get_type):
+ * gst/adder/gstadder.h:
+ * gst/audioconvert/gstaudioconvert.c:
+ * gst/audiotestsrc/gstaudiotestsrc.c:
+ (gst_audiostestsrc_wave_get_type), (gst_audio_test_src_class_init),
+ (gst_audio_test_src_create):
+ * gst/ffmpegcolorspace/gstffmpegcolorspace.c:
+ * gst/playback/gstdecodebin.c:
+ * gst/playback/gstplaybin.c:
+ * gst/playback/gststreamselector.c:
+ (gst_stream_selector_base_init):
+ * gst/subparse/gstsubparse.c: (gst_sub_parse_base_init):
+ * gst/volume/gstvolume.c:
+ * sys/v4l/gstv4lmjpegsink.c:
+ * sys/v4l/gstv4lmjpegsrc.c:
+ * tests/check/libs/cddabasesrc.c:
+ * tests/old/examples/gob/gst-identity2.gob:
+ Add docs for adder, use GST_ELEMENT_DETAILS macro,
+ define GstElementDetails at the top
+
2006-03-23 Sebastien Moutte <sebastien@moutte.net>
* win32/common/libgstinterfaces.def:
# the registry won't have the element
EXTRA_HFILES = \
- $(top_srcdir)/ext/cdparanoia/gstcdparanoiasrc.h \
$(top_srcdir)/ext/alsa/gstalsamixerelement.h \
$(top_srcdir)/ext/alsa/gstalsasink.h \
$(top_srcdir)/ext/alsa/gstalsasrc.h \
+ $(top_srcdir)/ext/cdparanoia/gstcdparanoiasrc.h \
$(top_srcdir)/ext/gnomevfs/gstgnomevfssink.h \
$(top_srcdir)/ext/gnomevfs/gstgnomevfssrc.h \
$(top_srcdir)/ext/pango/gstclockoverlay.h \
$(top_srcdir)/ext/vorbis/vorbisdec.h \
$(top_srcdir)/ext/vorbis/vorbisenc.h \
$(top_srcdir)/ext/vorbis/vorbisparse.h \
+ $(top_srcdir)/gst/adder/gstadder.h \
$(top_srcdir)/gst/audioconvert/gstaudioconvert.h \
$(top_srcdir)/gst/audioresample/gstaudioresample.h \
$(top_srcdir)/gst/audiotestsrc/gstaudiotestsrc.h \
<chapter>
<title>gst-plugins-base Elements</title>
+ <xi:include href="xml/element-adder.xml" />
<xi:include href="xml/element-alsamixer.xml" />
<xi:include href="xml/element-alsasink.xml" />
<xi:include href="xml/element-alsasrc.xml" />
+<SECTION>
+<FILE>element-adder</FILE>
+<TITLE>adder</TITLE>
+GstAdder
+<SUBSECTION Standard>
+GST_ADDER
+GST_IS_ADDER
+GST_TYPE_ADDER
+gst_adder_factory_init
+gst_adder_get_type
+GST_ADDER_CLASS
+GST_IS_ADDER_CLASS
+GstAdderClass
+GstAdderFormat
+</SECTION>
+
<SECTION>
<FILE>element-alsamixer</FILE>
GstAlsaMixerElement
/* GStreamer
* Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
* <2005> Wim Taymans <wim@fluendo.com>
- * <2005> Tim-Philipp Müller <tim centricular net>
+ * <2005> Tim-Philipp M??ller <tim centricular net>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
const gchar * device);
static void gst_cd_paranoia_src_close (GstCddaBaseSrc * src);
-static GstElementDetails cdparanoia_details = {
- "CD Audio (cdda) Source, Paranoia IV",
- "Source/File",
- "Read audio from CD in paranoid mode",
- "Erik Walthinsen <omega@cse.ogi.edu>, " "Wim Taymans <wim@fluendo.com>"
-};
+static GstElementDetails cdparanoia_details =
+GST_ELEMENT_DETAILS ("CD Audio (cdda) Source, Paranoia IV",
+ "Source/File",
+ "Read audio from CD in paranoid mode",
+ "Erik Walthinsen <omega@cse.ogi.edu>, " "Wim Taymans <wim@fluendo.com>");
/* We use these to serialize calls to paranoia_read() among several
* cdparanoiasrc instances. We do this because it's the only reasonably
* 2000 Wim Taymans <wtay@chello.be>
* 2001 Bastien Nocera <hadess@hadess.net>
* 2003 Colin Walters <walters@verbum.org>
- * 2005 Tim-Philipp Müller <tim centricular net>
+ * 2005 Tim-Philipp M??ller <tim centricular net>
*
* gstgnomevfssink.c:
*
#include <string.h>
#include <errno.h>
+static GstElementDetails gst_gnome_vfs_sink_details =
+GST_ELEMENT_DETAILS ("GnomeVFS Sink",
+ "Sink/File",
+ "Write a stream to a GnomeVFS URI",
+ "Bastien Nocera <hadess@hadess.net>");
+
enum
{
SIGNAL_ERASE_ASK,
gst_gnome_vfs_sink_base_init (gpointer g_class)
{
GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
- static GstElementDetails gst_gnome_vfs_sink_details =
- GST_ELEMENT_DETAILS ("GnomeVFS Sink",
- "Sink/File",
- "Write a stream to a GnomeVFS URI",
- "Bastien Nocera <hadess@hadess.net>");
gst_element_class_add_pad_template (element_class,
gst_static_pad_template_get (&sinktemplate));
GST_DEBUG_CATEGORY_STATIC (gnomevfssrc_debug);
#define GST_CAT_DEFAULT gnomevfssrc_debug
+static GstElementDetails gst_gnome_vfs_src_details =
+GST_ELEMENT_DETAILS ("GnomeVFS Source",
+ "Source/File",
+ "Read from any GnomeVFS-supported file",
+ "Bastien Nocera <hadess@hadess.net>\n"
+ "Ronald S. Bultje <rbultje@ronald.bitfreak.net>");
static GStaticMutex count_lock = G_STATIC_MUTEX_INIT;
static gint ref_count = 0;
gst_gnome_vfs_src_base_init (gpointer g_class)
{
GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
- static GstElementDetails gst_gnome_vfs_src_details =
- GST_ELEMENT_DETAILS ("GnomeVFS Source",
- "Source/File",
- "Read from any GnomeVFS-supported file",
- "Bastien Nocera <hadess@hadess.net>\n"
- "Ronald S. Bultje <rbultje@ronald.bitfreak.net>");
gst_element_class_add_pad_template (element_class,
gst_static_pad_template_get (&srctemplate));
#include <string.h>
#include <gst/gst-i18n-plugin.h>
+static GstElementDetails gst_ogg_demux_details =
+GST_ELEMENT_DETAILS ("ogg demuxer",
+ "Codec/Demuxer",
+ "demux ogg streams (info about ogg: http://xiph.org)",
+ "Wim Taymand <wim@fluendo.com>");
+
#define CHUNKSIZE (8500) /* this is out of vorbisfile */
#define SKELETON_FISHEAD_SIZE 64
#define SKELETON_FISBONE_MIN_SIZE 52
gst_ogg_demux_base_init (gpointer g_class)
{
GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
- static GstElementDetails gst_ogg_demux_details =
- GST_ELEMENT_DETAILS ("ogg demuxer",
- "Codec/Demuxer",
- "demux ogg streams (info about ogg: http://xiph.org)",
- "Wim Taymand <wim@fluendo.com>");
gst_element_class_set_details (element_class, &gst_ogg_demux_details);
#include <ogg/ogg.h>
#include <string.h>
+static GstElementDetails gst_ogg_parse_details =
+GST_ELEMENT_DETAILS ("ogg parser",
+ "Codec/Parser",
+ "parse ogg streams into pages (info about ogg: http://xiph.org)",
+ "Michael Smith <msmith@fluendo.com>");
+
GST_DEBUG_CATEGORY_STATIC (gst_ogg_parse_debug);
#define GST_CAT_DEFAULT gst_ogg_parse_debug
gst_ogg_parse_base_init (gpointer g_class)
{
GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
- static GstElementDetails gst_ogg_parse_details =
- GST_ELEMENT_DETAILS ("ogg parser",
- "Codec/Parser",
- "parse ogg streams into pages (info about ogg: http://xiph.org)",
- "Michael Smith <msmith@fluendo.com>");
gst_element_class_set_details (element_class, &gst_ogg_parse_details);
#define GST_OGM_PARSE_GET_CLASS(obj) \
(G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_OGM_PARSE, GstOgmParseClass))
+static GstElementDetails gst_ogm_audio_parse_details =
+GST_ELEMENT_DETAILS ("OGM audio stream parser",
+ "Codec/Decoder/Audio",
+ "parse an OGM audio header and stream",
+ "Ronald Bultje <rbultje@ronald.bitfreak.net>");
+
+static GstElementDetails gst_ogm_video_parse_details =
+GST_ELEMENT_DETAILS ("OGM video stream parser",
+ "Codec/Decoder/Video",
+ "parse an OGM video header and stream",
+ "Ronald Bultje <rbultje@ronald.bitfreak.net>");
+
+static GstElementDetails gst_ogm_text_parse_details =
+GST_ELEMENT_DETAILS ("OGM text stream parser",
+ "Codec/Decoder/Subtitle",
+ "parse an OGM text header and stream",
+ "Ronald Bultje <rbultje@ronald.bitfreak.net>");
+
typedef struct _stream_header_video
{
gint32 width;
gst_ogm_audio_parse_base_init (GstOgmParseClass * klass)
{
GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
- static GstElementDetails gst_ogm_audio_parse_details =
- GST_ELEMENT_DETAILS ("OGM audio stream parser",
- "Codec/Decoder/Audio",
- "parse an OGM audio header and stream",
- "Ronald Bultje <rbultje@ronald.bitfreak.net>");
GstCaps *caps = gst_riff_create_audio_template_caps ();
gst_element_class_set_details (element_class, &gst_ogm_audio_parse_details);
gst_ogm_video_parse_base_init (GstOgmParseClass * klass)
{
GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
- static GstElementDetails gst_ogm_video_parse_details =
- GST_ELEMENT_DETAILS ("OGM video stream parser",
- "Codec/Decoder/Video",
- "parse an OGM video header and stream",
- "Ronald Bultje <rbultje@ronald.bitfreak.net>");
GstCaps *caps = gst_riff_create_video_template_caps ();
gst_element_class_set_details (element_class, &gst_ogm_video_parse_details);
gst_ogm_text_parse_base_init (GstOgmParseClass * klass)
{
GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
- static GstElementDetails gst_ogm_text_parse_details =
- GST_ELEMENT_DETAILS ("OGM text stream parser",
- "Codec/Decoder/Subtitle",
- "parse an OGM text header and stream",
- "Ronald Bultje <rbultje@ronald.bitfreak.net>");
GstCaps *caps = gst_caps_new_simple ("text/plain", NULL, NULL);
gst_element_class_set_details (element_class, &gst_ogm_text_parse_details);
* If you do not have such a subtitle file, create one looking like this
* in a text editor:
* <programlisting>
- * 1\r
- * 00:00:03,000 --> 00:00:05,000\r
- * Hello? (3-5s)\r
- * \r
- * 2\r
- * 00:00:08,000 --> 00:00:13,000\r
+ * 1
+ * 00:00:03,000 --> 00:00:05,000
+ * Hello? (3-5s)
+ *
+ * 2
+ * 00:00:08,000 --> 00:00:13,000
* Yes, this is a subtitle. Don't
- * you like it? (8-13s)\r
- * \r
- * 3\r
- * 00:00:18,826 --> 00:01:02,886\r
- * Uh? What are you talking about?\r
+ * you like it? (8-13s)
+ *
+ * 3
+ * 00:00:18,826 --> 00:01:02,886
+ * Uh? What are you talking about?
* I don't understand (18-62s)
* </programlisting>
* </para>
GST_DEBUG_CATEGORY (pango_debug);
#define GST_CAT_DEFAULT pango_debug
-static GstElementDetails text_overlay_details = {
- "Text Overlay",
- "Filter/Editor/Video",
- "Adds text strings on top of a video buffer",
- "David Schleef <ds@schleef.org>"
-};
+static GstElementDetails text_overlay_details =
+GST_ELEMENT_DETAILS ("Text Overlay",
+ "Filter/Editor/Video",
+ "Adds text strings on top of a video buffer",
+ "David Schleef <ds@schleef.org>");
#define DEFAULT_PROP_TEXT ""
GST_DEBUG_CATEGORY_EXTERN (pango_debug);
#define GST_CAT_DEFAULT pango_debug
-static GstElementDetails text_render_details = {
- "Text Render",
- "Filter/Editor/Video",
- "Renders a text string to an image bitmap",
- "David Schleef <ds@schleef.org>, "
- "Ronald S. Bultje <rbultje@ronald.bitfreak.net>"
-};
+static GstElementDetails text_render_details =
+GST_ELEMENT_DETAILS ("Text Render",
+ "Filter/Editor/Video",
+ "Renders a text string to an image bitmap",
+ "David Schleef <ds@schleef.org>, "
+ "Ronald S. Bultje <rbultje@ronald.bitfreak.net>");
enum
{
ARG_CROP
};
-static GstElementDetails theora_dec_details = {
- "TheoraDec",
- "Codec/Decoder/Video",
- "decode raw theora streams to raw YUV video",
- "Benjamin Otte <in7y118@public.uni-hamburg.de>, "
- "Wim Taymans <wim@fluendo.com>",
-};
+static GstElementDetails theora_dec_details = GST_ELEMENT_DETAILS ("TheoraDec",
+ "Codec/Decoder/Video",
+ "decode raw theora streams to raw YUV video",
+ "Benjamin Otte <in7y118@public.uni-hamburg.de>, "
+ "Wim Taymans <wim@fluendo.com>");
static GstStaticPadTemplate theora_dec_src_factory =
GST_STATIC_PAD_TEMPLATE ("src",
theoraenc->info.fps_numerator);
}
-static GstElementDetails theora_enc_details = {
- "TheoraEnc",
- "Codec/Encoder/Video",
- "encode raw YUV video to a theora stream",
- "Wim Taymans <wim@fluendo.com>",
-};
+static GstElementDetails theora_enc_details = GST_ELEMENT_DETAILS ("TheoraEnc",
+ "Codec/Encoder/Video",
+ "encode raw YUV video to a theora stream",
+ "Wim Taymans <wim@fluendo.com>");
static GstStaticPadTemplate theora_enc_sink_factory =
GST_STATIC_PAD_TEMPLATE ("sink",
GST_DEBUG_CATEGORY_EXTERN (vorbisdec_debug);
#define GST_CAT_DEFAULT vorbisdec_debug
-static GstElementDetails vorbis_dec_details = {
- "VorbisDec",
- "Codec/Decoder/Audio",
- "decode raw vorbis streams to float audio",
- "Benjamin Otte <in7y118@public.uni-hamburg.de>",
-};
+static GstElementDetails vorbis_dec_details = GST_ELEMENT_DETAILS ("VorbisDec",
+ "Codec/Decoder/Audio",
+ "decode raw vorbis streams to float audio",
+ "Benjamin Otte <in7y118@public.uni-hamburg.de>");
/* Filter signals and args */
enum
static GstPadTemplate *gst_vorbisenc_src_template, *gst_vorbisenc_sink_template;
/* elementfactory information */
-GstElementDetails vorbisenc_details = {
- "Vorbis encoder",
- "Codec/Encoder/Audio",
- "Encodes audio in Vorbis format",
- "Monty <monty@xiph.org>, " "Wim Taymans <wim@fluendo.com>",
-};
+GstElementDetails vorbisenc_details = GST_ELEMENT_DETAILS ("Vorbis encoder",
+ "Codec/Encoder/Audio",
+ "Encodes audio in Vorbis format",
+ "Monty <monty@xiph.org>, " "Wim Taymans <wim@fluendo.com>");
/* GstVorbisEnc signals and args */
enum
#include <string.h>
+static GstElementDetails audio_filter_details =
+GST_ELEMENT_DETAILS ("Audio filter base class",
+ "Filter/Effect/Audio",
+ "Filters audio",
+ "David Schleef <ds@schleef.org>");
/* GstAudioFilter signals and args */
enum
static void
gst_audio_filter_base_init (gpointer g_class)
{
- static GstElementDetails audio_filter_details = {
- "Audio filter base class",
- "Filter/Effect/Audio",
- "Filters audio",
- "David Schleef <ds@schleef.org>"
- };
GstAudioFilterClass *klass = (GstAudioFilterClass *) g_class;
GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
#include <gst/audio/gstaudiofilter.h>
#include <string.h>
+static GstElementDetails audio_filter_template_details =
+GST_ELEMENT_DETAILS ("Audio filter template",
+ "Filter/Effect/Audio",
+ "Filters audio",
+ "David Schleef <ds@schleef.org>");
+
typedef struct _GstAudioFilterTemplate GstAudioFilterTemplate;
typedef struct _GstAudioFilterTemplateClass GstAudioFilterTemplateClass;
static void
gst_audio_filter_template_base_init (gpointer g_class)
{
- static GstElementDetails audio_filter_template_details = {
- "Audio filter template",
- "Filter/Effect/Audio",
- "Filters audio",
- "David Schleef <ds@schleef.org>"
- };
GstAudioFilterTemplateClass *klass = (GstAudioFilterTemplateClass *) g_class;
GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
+/**
+ * SECTION:element-adder
+ *
+ * <refsect2>
+ * The Adder allows to mix several streams into one by adding the data.
+ * Mixed data is clamped to the min/max values of the data format.
+ * <title>Example launch line</title>
+ * <para>
+ * <programlisting>
+ * gst-launch audiotestsrc freq=100 ! adder name=mix ! audioconvert ! alsasink audiotestsrc freq=500 ! mix.
+ * </programlisting>
+ * This pipeline produces two sine waves mixed together.
+ * </para>
+ * </refsect2>
+ */
/* Element-Checklist-Version: 5 */
#ifdef HAVE_CONFIG_H
{
static GType adder_type = 0;
- if (!adder_type) {
+ if (G_UNLIKELY (adder_type == 0)) {
static const GTypeInfo adder_info = {
sizeof (GstAdderClass), NULL, NULL,
(GClassInitFunc) gst_adder_class_init, NULL, NULL,
G_BEGIN_DECLS
-extern GstElementDetails gst_adder_details;
-
#define GST_TYPE_ADDER \
(gst_adder_get_type())
#define GST_ADDER(obj) \
/*** DEFINITIONS **************************************************************/
-static GstElementDetails audio_convert_details = {
- "Audio Conversion",
- "Filter/Converter/Audio",
- "Convert audio to different formats",
- "Benjamin Otte <in7y118@public.uni-hamburg.de>",
-};
+static GstElementDetails audio_convert_details =
+GST_ELEMENT_DETAILS ("Audio Conversion",
+ "Filter/Converter/Audio",
+ "Convert audio to different formats",
+ "Benjamin Otte <in7y118@public.uni-hamburg.de>");
/* type functions */
static void gst_audio_convert_dispose (GObject * obj);
#define M_PI_M2 ( M_PI + M_PI )
-GstElementDetails gst_audio_test_src_details = {
- "Audio test source",
- "Source/Audio",
- "Creates audio test signals of given frequency and volume",
- "Stefan Kost <ensonic@users.sf.net>"
-};
+static GstElementDetails gst_audio_test_src_details =
+GST_ELEMENT_DETAILS ("Audio test source",
+ "Source/Audio",
+ "Creates audio test signals of given frequency and volume",
+ "Stefan Kost <ensonic@users.sf.net>");
enum
{0, NULL, NULL},
};
- if (!audiostestsrc_wave_type) {
+ if (G_UNLIKELY (audiostestsrc_wave_type == 0)) {
audiostestsrc_wave_type = g_enum_register_static ("GstAudioTestSrcWave",
audiostestsrc_waves);
}
static void gst_audio_test_src_change_wave (GstAudioTestSrc * src);
+/*
static void gst_audio_test_src_get_times (GstBaseSrc * basesrc,
GstBuffer * buffer, GstClockTime * start, GstClockTime * end);
+*/
static GstFlowReturn gst_audio_test_src_create (GstBaseSrc * basesrc,
guint64 offset, guint length, GstBuffer ** buffer);
GST_DEBUG_FUNCPTR (gst_audio_test_src_is_seekable);
gstbasesrc_class->do_seek = GST_DEBUG_FUNCPTR (gst_audio_test_src_do_seek);
gstbasesrc_class->query = GST_DEBUG_FUNCPTR (gst_audio_test_src_query);
- gstbasesrc_class->get_times =
- GST_DEBUG_FUNCPTR (gst_audio_test_src_get_times);
+ /*
+ gstbasesrc_class->get_times =
+ GST_DEBUG_FUNCPTR (gst_audio_test_src_get_times);
+ */
gstbasesrc_class->create = GST_DEBUG_FUNCPTR (gst_audio_test_src_create);
}
}
}
+#ifdef __DISABLE_NO_LIVE__
static void
gst_audio_test_src_get_times (GstBaseSrc * basesrc, GstBuffer * buffer,
GstClockTime * start, GstClockTime * end)
*end = -1;
}
}
+#endif
static gboolean
gst_audio_test_src_do_seek (GstBaseSrc * basesrc, GstSegment * segment)
gst_audio_test_src_create (GstBaseSrc * basesrc, guint64 offset,
guint length, GstBuffer ** buffer)
{
+ GstFlowReturn res;
GstAudioTestSrc *src;
GstBuffer *buf;
GstClockTime next_time;
if (src->eos_reached)
return GST_FLOW_UNEXPECTED;
+ /* example for tagging generated data */
if (!src->tags_pushed) {
GstTagList *taglist;
GstEvent *event;
src->tags_pushed = TRUE;
}
+ /* check for eos */
if (src->check_seek_stop &&
(src->n_samples_stop > src->n_samples) &&
(src->n_samples_stop < src->n_samples + src->samples_per_buffer)
src->generate_samples_per_buffer = src->samples_per_buffer;
n_samples = src->n_samples + src->samples_per_buffer;
}
- next_time = n_samples * GST_SECOND / src->samplerate;
-
- buf =
- gst_buffer_new_and_alloc (src->generate_samples_per_buffer *
- sizeof (gint16));
- gst_buffer_set_caps (buf, GST_PAD_CAPS (basesrc->srcpad));
+ next_time = gst_util_uint64_scale (n_samples, GST_SECOND,
+ (guint64) src->samplerate);
+
+ /* allocate a new buffer suitable for this pad */
+ if ((res = gst_pad_alloc_buffer (basesrc->srcpad, src->n_samples,
+ src->generate_samples_per_buffer * sizeof (gint16),
+ GST_PAD_CAPS (basesrc->srcpad), &buf)) != GST_FLOW_OK) {
+ return res;
+ }
GST_BUFFER_TIMESTAMP (buf) = src->timestamp_offset + src->running_time;
- GST_BUFFER_OFFSET (buf) = src->n_samples;
GST_BUFFER_OFFSET_END (buf) = n_samples;
GST_BUFFER_DURATION (buf) = next_time - src->running_time;
#define GST_CAT_DEFAULT ffmpegcolorspace_debug
/* elementfactory information */
-static GstElementDetails ffmpegcsp_details = {
- "FFMPEG Colorspace converter",
- "Filter/Converter/Video",
- "Converts video from one colorspace to another",
- "Ronald Bultje <rbultje@ronald.bitfreak.net>",
-};
+static GstElementDetails ffmpegcsp_details =
+GST_ELEMENT_DETAILS ("FFMPEG Colorspace converter",
+ "Filter/Converter/Video",
+ "Converts video from one colorspace to another",
+ "Ronald Bultje <rbultje@ronald.bitfreak.net>");
/* Stereo signals and args */
static GstElementClass *parent_class;
static guint gst_decode_bin_signals[LAST_SIGNAL] = { 0 };
-static GstElementDetails gst_decode_bin_details = {
- "Decoder Bin",
- "Generic/Bin/Decoder",
- "Autoplug and decode to raw media",
- "Wim Taymans <wim@fluendo.com>"
-};
+static GstElementDetails gst_decode_bin_details =
+GST_ELEMENT_DETAILS ("Decoder Bin",
+ "Generic/Bin/Decoder",
+ "Autoplug and decode to raw media",
+ "Wim Taymans <wim@fluendo.com>");
static GType
//static guint gst_play_bin_signals[LAST_SIGNAL] = { 0 };
-static GstElementDetails gst_play_bin_details = {
- "Player Bin",
- "Generic/Bin/Player",
- "Autoplug and play media from an uri",
- "Wim Taymans <wim@fluendo.com>"
-};
+static GstElementDetails gst_play_bin_details =
+GST_ELEMENT_DETAILS ("Player Bin",
+ "Generic/Bin/Player",
+ "Autoplug and play media from an uri",
+ "Wim Taymans <wim@fluendo.com>");
static GType
gst_play_bin_get_type (void)
GST_DEBUG_CATEGORY_STATIC (stream_selector_debug);
#define GST_CAT_DEFAULT stream_selector_debug
+static GstElementDetails gst_stream_selector_details =
+GST_ELEMENT_DETAILS ("StreamSelector",
+ "Generic",
+ "N-to-1 input stream_selectoring",
+ "Julien Moutte <julien@moutte.net>\n"
+ "Ronald S. Bultje <rbultje@ronald.bitfreak.net>\n"
+ "Jan Schmidt <thaytan@mad.scientist.com>");
+
static GstStaticPadTemplate gst_stream_selector_sink_factory =
GST_STATIC_PAD_TEMPLATE ("sink%d",
GST_PAD_SINK,
gst_stream_selector_base_init (GstStreamSelectorClass * klass)
{
GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
- static GstElementDetails gst_stream_selector_details =
- GST_ELEMENT_DETAILS ("StreamSelector",
- "Generic",
- "N-to-1 input stream_selectoring",
- "Julien Moutte <julien@moutte.net>\n"
- "Ronald S. Bultje <rbultje@ronald.bitfreak.net>\n"
- "Jan Schmidt <thaytan@mad.scientist.com>");
gst_element_class_set_details (element_class, &gst_stream_selector_details);
GST_DEBUG_CATEGORY_STATIC (sub_parse_debug);
#define GST_CAT_DEFAULT sub_parse_debug
+static GstElementDetails sub_parse_details =
+GST_ELEMENT_DETAILS ("Subtitle parsers",
+ "Codec/Parser/Subtitle",
+ "Parses subtitle (.sub) files into text streams",
+ "Gustavo J. A. M. Carneiro <gjc@inescporto.pt>\n"
+ "Ronald S. Bultje <rbultje@ronald.bitfreak.net>");
+
static GstStaticPadTemplate sink_templ = GST_STATIC_PAD_TEMPLATE ("sink",
GST_PAD_SINK,
GST_PAD_ALWAYS,
gst_sub_parse_base_init (GstSubParseClass * klass)
{
GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
- static GstElementDetails sub_parse_details = {
- "Subtitle parsers",
- "Codec/Parser/Subtitle",
- "Parses subtitle (.sub) files into text streams",
- "Gustavo J. A. M. Carneiro <gjc@inescporto.pt>\n"
- "Ronald S. Bultje <rbultje@ronald.bitfreak.net>"
- };
gst_element_class_add_pad_template (element_class,
gst_static_pad_template_get (&sink_templ));
/* number of steps we use for the mixer interface to go from 0.0 to 1.0 */
# define VOLUME_STEPS 100
-static GstElementDetails volume_details = {
- "Volume",
- "Filter/Effect/Audio",
- "Set volume on audio/raw streams",
- "Andy Wingo <wingo@pobox.com>",
-};
+static GstElementDetails volume_details = GST_ELEMENT_DETAILS ("Volume",
+ "Filter/Effect/Audio",
+ "Set volume on audio/raw streams",
+ "Andy Wingo <wingo@pobox.com>");
/* Filter signals and args */
enum
#define GST_CAT_DEFAULT v4lmjpegsink_debug
/* elementfactory information */
-static GstElementDetails gst_v4lmjpegsink_details = {
- "Video (video4linux/MJPEG) sink",
- "Sink/Video",
- "Writes MJPEG-encoded frames to a zoran MJPEG/video4linux device",
- "Ronald Bultje <rbultje@ronald.bitfreak.net>"
-};
+static GstElementDetails gst_v4lmjpegsink_details =
+GST_ELEMENT_DETAILS ("Video (video4linux/MJPEG) sink",
+ "Sink/Video",
+ "Writes MJPEG-encoded frames to a zoran MJPEG/video4linux device",
+ "Ronald Bultje <rbultje@ronald.bitfreak.net>");
/* v4lmjpegsink signals and args */
enum
#define GST_CAT_DEFAULT v4lmjpegsrc_debug
/* elementfactory information */
-static GstElementDetails gst_v4lmjpegsrc_details = {
- "Video (video4linux/MJPEG) Source",
- "Source/Video",
- "Reads MJPEG-encoded frames from a zoran MJPEG/video4linux device",
- "Ronald Bultje <rbultje@ronald.bitfreak.net>"
-};
+static GstElementDetails gst_v4lmjpegsrc_details =
+GST_ELEMENT_DETAILS ("Video (video4linux/MJPEG) Source",
+ "Source/Video",
+ "Reads MJPEG-encoded frames from a zoran MJPEG/video4linux device",
+ "Ronald Bultje <rbultje@ronald.bitfreak.net>");
/* V4lMjpegSrc signals and args */
enum
*
* unit test for cddabasesrc
*
- * Copyright (C) <2005> Tim-Philipp Müller <tim centricular net>
+ * Copyright (C) <2005> Tim-Philipp M??ller <tim centricular net>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
const gchar * device);
static void gst_cd_foo_src_close (GstCddaBaseSrc * src);
-static GstElementDetails cdfoo_details = {
- "CD Audio (cdda) Source, FooBar",
- "Source/File",
- "Read audio from CD",
- "Foo Bar <foo@bar.com>"
-};
+static GstElementDetails cdfoo_details =
+GST_ELEMENT_DETAILS ("CD Audio (cdda) Source, FooBar",
+ "Source/File",
+ "Read audio from CD",
+ "Foo Bar <foo@bar.com>");
static void
gst_cd_foo_src_base_init (gpointer g_class)
private gboolean
plugin_init (GModule *module, GstPlugin *plugin)
{
- static GstElementDetails identity2_details = {
+ static GstElementDetails identity2_details =
+ GST_ELEMENT_DETAILS (
"GOB Identity",
"Filter/Effect",
"Does nothing",
- "1.0",
- "Wim Taymans <wim.taymans@chello.be>",
- "(C) 2001",
- };
+ "Wim Taymans <wim.taymans@chello.be>");
GstElementFactory *factory;
factory = gst_elementfactory_new ("identity2", TYPE_SELF,