From: Stefan Kost Date: Fri, 24 Mar 2006 10:42:11 +0000 (+0000) Subject: Add docs for adder, use GST_ELEMENT_DETAILS macro, define GstElementDetails at the top X-Git-Tag: 1.19.3~511^2~12054 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2d826700faac96db4b36706571433c91c90a1219;p=platform%2Fupstream%2Fgstreamer.git Add docs for adder, use GST_ELEMENT_DETAILS macro, define GstElementDetails at the top 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/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 --- diff --git a/ChangeLog b/ChangeLog index 3928abd..2416a45 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,47 @@ +2006-03-24 Stefan Kost + + * 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 * win32/common/libgstinterfaces.def: diff --git a/docs/plugins/Makefile.am b/docs/plugins/Makefile.am index c39b8a1..ed7ce59 100644 --- a/docs/plugins/Makefile.am +++ b/docs/plugins/Makefile.am @@ -74,10 +74,10 @@ IGNORE_CFILES = utils.c mem.c imgconvert.c # 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 \ @@ -89,6 +89,7 @@ EXTRA_HFILES = \ $(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 \ diff --git a/docs/plugins/gst-plugins-base-plugins-docs.sgml b/docs/plugins/gst-plugins-base-plugins-docs.sgml index 5b4a520..199e726 100644 --- a/docs/plugins/gst-plugins-base-plugins-docs.sgml +++ b/docs/plugins/gst-plugins-base-plugins-docs.sgml @@ -12,6 +12,7 @@ gst-plugins-base Elements + diff --git a/docs/plugins/gst-plugins-base-plugins-sections.txt b/docs/plugins/gst-plugins-base-plugins-sections.txt index 55cb9ea..e86dbc3 100644 --- a/docs/plugins/gst-plugins-base-plugins-sections.txt +++ b/docs/plugins/gst-plugins-base-plugins-sections.txt @@ -1,4 +1,20 @@
+element-adder +adder +GstAdder + +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 +
+ +
element-alsamixer GstAlsaMixerElement alsamixer diff --git a/ext/cdparanoia/gstcdparanoiasrc.c b/ext/cdparanoia/gstcdparanoiasrc.c index a8571d0..c408d4d 100644 --- a/ext/cdparanoia/gstcdparanoiasrc.c +++ b/ext/cdparanoia/gstcdparanoiasrc.c @@ -2,7 +2,7 @@ /* GStreamer * Copyright (C) <1999> Erik Walthinsen * <2005> Wim Taymans - * <2005> Tim-Philipp Müller + * <2005> Tim-Philipp M??ller * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public @@ -68,12 +68,11 @@ static gboolean gst_cd_paranoia_src_open (GstCddaBaseSrc * src, 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 , " "Wim Taymans " -}; +static GstElementDetails cdparanoia_details = +GST_ELEMENT_DETAILS ("CD Audio (cdda) Source, Paranoia IV", + "Source/File", + "Read audio from CD in paranoid mode", + "Erik Walthinsen , " "Wim Taymans "); /* We use these to serialize calls to paranoia_read() among several * cdparanoiasrc instances. We do this because it's the only reasonably diff --git a/ext/gnomevfs/gstgnomevfssink.c b/ext/gnomevfs/gstgnomevfssink.c index 61fe636..f6dbb3d 100644 --- a/ext/gnomevfs/gstgnomevfssink.c +++ b/ext/gnomevfs/gstgnomevfssink.c @@ -3,7 +3,7 @@ * 2000 Wim Taymans * 2001 Bastien Nocera * 2003 Colin Walters - * 2005 Tim-Philipp Müller + * 2005 Tim-Philipp M??ller * * gstgnomevfssink.c: * @@ -73,6 +73,12 @@ #include #include +static GstElementDetails gst_gnome_vfs_sink_details = +GST_ELEMENT_DETAILS ("GnomeVFS Sink", + "Sink/File", + "Write a stream to a GnomeVFS URI", + "Bastien Nocera "); + enum { SIGNAL_ERASE_ASK, @@ -139,11 +145,6 @@ static void 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 "); gst_element_class_add_pad_template (element_class, gst_static_pad_template_get (&sinktemplate)); diff --git a/ext/gnomevfs/gstgnomevfssrc.c b/ext/gnomevfs/gstgnomevfssrc.c index 274fff1..bae262d 100644 --- a/ext/gnomevfs/gstgnomevfssrc.c +++ b/ext/gnomevfs/gstgnomevfssrc.c @@ -96,6 +96,12 @@ 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 \n" + "Ronald S. Bultje "); static GStaticMutex count_lock = G_STATIC_MUTEX_INIT; static gint ref_count = 0; @@ -183,12 +189,6 @@ static void 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 \n" - "Ronald S. Bultje "); gst_element_class_add_pad_template (element_class, gst_static_pad_template_get (&srctemplate)); diff --git a/ext/ogg/gstoggdemux.c b/ext/ogg/gstoggdemux.c index 43ca679..f881f9a 100644 --- a/ext/ogg/gstoggdemux.c +++ b/ext/ogg/gstoggdemux.c @@ -27,6 +27,12 @@ #include #include +static GstElementDetails gst_ogg_demux_details = +GST_ELEMENT_DETAILS ("ogg demuxer", + "Codec/Demuxer", + "demux ogg streams (info about ogg: http://xiph.org)", + "Wim Taymand "); + #define CHUNKSIZE (8500) /* this is out of vorbisfile */ #define SKELETON_FISHEAD_SIZE 64 #define SKELETON_FISBONE_MIN_SIZE 52 @@ -1277,11 +1283,6 @@ static void 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 "); gst_element_class_set_details (element_class, &gst_ogg_demux_details); diff --git a/ext/ogg/gstoggparse.c b/ext/ogg/gstoggparse.c index abb4bb7..025defd 100644 --- a/ext/ogg/gstoggparse.c +++ b/ext/ogg/gstoggparse.c @@ -36,6 +36,12 @@ #include #include +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 "); + GST_DEBUG_CATEGORY_STATIC (gst_ogg_parse_debug); #define GST_CAT_DEFAULT gst_ogg_parse_debug @@ -211,11 +217,6 @@ static void 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 "); gst_element_class_set_details (element_class, &gst_ogg_parse_details); diff --git a/ext/ogg/gstogmparse.c b/ext/ogg/gstogmparse.c index 8780015..b75a51f 100644 --- a/ext/ogg/gstogmparse.c +++ b/ext/ogg/gstogmparse.c @@ -55,6 +55,24 @@ GST_DEBUG_CATEGORY_STATIC (gst_ogm_parse_debug); #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 "); + +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 "); + +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 "); + typedef struct _stream_header_video { gint32 width; @@ -260,11 +278,6 @@ static void 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 "); GstCaps *caps = gst_riff_create_audio_template_caps (); gst_element_class_set_details (element_class, &gst_ogm_audio_parse_details); @@ -280,11 +293,6 @@ static void 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 "); GstCaps *caps = gst_riff_create_video_template_caps (); gst_element_class_set_details (element_class, &gst_ogm_video_parse_details); @@ -300,11 +308,6 @@ static void 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 "); GstCaps *caps = gst_caps_new_simple ("text/plain", NULL, NULL); gst_element_class_set_details (element_class, &gst_ogm_text_parse_details); diff --git a/ext/pango/gsttextoverlay.c b/ext/pango/gsttextoverlay.c index 65f811b..30912e8 100644 --- a/ext/pango/gsttextoverlay.c +++ b/ext/pango/gsttextoverlay.c @@ -53,18 +53,18 @@ * If you do not have such a subtitle file, create one looking like this * in a text editor: * - * 1 - * 00:00:03,000 --> 00:00:05,000 - * Hello? (3-5s) - * - * 2 - * 00:00:08,000 --> 00:00:13,000 + * 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) - * - * 3 - * 00:00:18,826 --> 00:01:02,886 - * Uh? What are you talking about? + * 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) * * @@ -93,12 +93,11 @@ 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 " -}; +static GstElementDetails text_overlay_details = +GST_ELEMENT_DETAILS ("Text Overlay", + "Filter/Editor/Video", + "Adds text strings on top of a video buffer", + "David Schleef "); #define DEFAULT_PROP_TEXT "" diff --git a/ext/pango/gsttextrender.c b/ext/pango/gsttextrender.c index e9a165b..62740ba 100644 --- a/ext/pango/gsttextrender.c +++ b/ext/pango/gsttextrender.c @@ -54,13 +54,12 @@ 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 , " - "Ronald S. Bultje " -}; +static GstElementDetails text_render_details = +GST_ELEMENT_DETAILS ("Text Render", + "Filter/Editor/Video", + "Renders a text string to an image bitmap", + "David Schleef , " + "Ronald S. Bultje "); enum { diff --git a/ext/theora/theoradec.c b/ext/theora/theoradec.c index 4a31aa6..210d0d7 100644 --- a/ext/theora/theoradec.c +++ b/ext/theora/theoradec.c @@ -58,13 +58,11 @@ enum ARG_CROP }; -static GstElementDetails theora_dec_details = { - "TheoraDec", - "Codec/Decoder/Video", - "decode raw theora streams to raw YUV video", - "Benjamin Otte , " - "Wim Taymans ", -}; +static GstElementDetails theora_dec_details = GST_ELEMENT_DETAILS ("TheoraDec", + "Codec/Decoder/Video", + "decode raw theora streams to raw YUV video", + "Benjamin Otte , " + "Wim Taymans "); static GstStaticPadTemplate theora_dec_src_factory = GST_STATIC_PAD_TEMPLATE ("src", diff --git a/ext/theora/theoraenc.c b/ext/theora/theoraenc.c index a54a02b..d13c7d6 100644 --- a/ext/theora/theoraenc.c +++ b/ext/theora/theoraenc.c @@ -149,12 +149,10 @@ granulepos_to_timestamp (GstTheoraEnc * theoraenc, ogg_int64_t granulepos) theoraenc->info.fps_numerator); } -static GstElementDetails theora_enc_details = { - "TheoraEnc", - "Codec/Encoder/Video", - "encode raw YUV video to a theora stream", - "Wim Taymans ", -}; +static GstElementDetails theora_enc_details = GST_ELEMENT_DETAILS ("TheoraEnc", + "Codec/Encoder/Video", + "encode raw YUV video to a theora stream", + "Wim Taymans "); static GstStaticPadTemplate theora_enc_sink_factory = GST_STATIC_PAD_TEMPLATE ("sink", diff --git a/ext/vorbis/vorbisdec.c b/ext/vorbis/vorbisdec.c index f644e8e..500d7c6 100644 --- a/ext/vorbis/vorbisdec.c +++ b/ext/vorbis/vorbisdec.c @@ -54,12 +54,10 @@ 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 ", -}; +static GstElementDetails vorbis_dec_details = GST_ELEMENT_DETAILS ("VorbisDec", + "Codec/Decoder/Audio", + "decode raw vorbis streams to float audio", + "Benjamin Otte "); /* Filter signals and args */ enum diff --git a/ext/vorbis/vorbisenc.c b/ext/vorbis/vorbisenc.c index a3cd158..57c1e0a 100644 --- a/ext/vorbis/vorbisenc.c +++ b/ext/vorbis/vorbisenc.c @@ -66,12 +66,10 @@ GST_DEBUG_CATEGORY_EXTERN (vorbisenc_debug); 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 , " "Wim Taymans ", -}; +GstElementDetails vorbisenc_details = GST_ELEMENT_DETAILS ("Vorbis encoder", + "Codec/Encoder/Audio", + "Encodes audio in Vorbis format", + "Monty , " "Wim Taymans "); /* GstVorbisEnc signals and args */ enum diff --git a/gst-libs/gst/audio/gstaudiofilter.c b/gst-libs/gst/audio/gstaudiofilter.c index 2964b4d..750413b 100644 --- a/gst-libs/gst/audio/gstaudiofilter.c +++ b/gst-libs/gst/audio/gstaudiofilter.c @@ -27,6 +27,11 @@ #include +static GstElementDetails audio_filter_details = +GST_ELEMENT_DETAILS ("Audio filter base class", + "Filter/Effect/Audio", + "Filters audio", + "David Schleef "); /* GstAudioFilter signals and args */ enum @@ -83,12 +88,6 @@ gst_audio_filter_get_type (void) 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 " - }; GstAudioFilterClass *klass = (GstAudioFilterClass *) g_class; GstElementClass *element_class = GST_ELEMENT_CLASS (klass); diff --git a/gst-libs/gst/audio/gstaudiofiltertemplate.c b/gst-libs/gst/audio/gstaudiofiltertemplate.c index 1eb1621..1c63522 100644 --- a/gst-libs/gst/audio/gstaudiofiltertemplate.c +++ b/gst-libs/gst/audio/gstaudiofiltertemplate.c @@ -34,6 +34,12 @@ #include #include +static GstElementDetails audio_filter_template_details = +GST_ELEMENT_DETAILS ("Audio filter template", + "Filter/Effect/Audio", + "Filters audio", + "David Schleef "); + typedef struct _GstAudioFilterTemplate GstAudioFilterTemplate; typedef struct _GstAudioFilterTemplateClass GstAudioFilterTemplateClass; @@ -117,12 +123,6 @@ gst_audio_filter_template_get_type (void) 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 " - }; GstAudioFilterTemplateClass *klass = (GstAudioFilterTemplateClass *) g_class; GstElementClass *element_class = GST_ELEMENT_CLASS (klass); diff --git a/gst/adder/gstadder.c b/gst/adder/gstadder.c index 026a3f4..5ac28d8 100644 --- a/gst/adder/gstadder.c +++ b/gst/adder/gstadder.c @@ -20,6 +20,21 @@ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ +/** + * SECTION:element-adder + * + * + * 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. + * Example launch line + * + * + * gst-launch audiotestsrc freq=100 ! adder name=mix ! audioconvert ! alsasink audiotestsrc freq=500 ! mix. + * + * This pipeline produces two sine waves mixed together. + * + * + */ /* Element-Checklist-Version: 5 */ #ifdef HAVE_CONFIG_H @@ -90,7 +105,7 @@ gst_adder_get_type (void) { 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, diff --git a/gst/adder/gstadder.h b/gst/adder/gstadder.h index 8d06fc1..81b6af9 100644 --- a/gst/adder/gstadder.h +++ b/gst/adder/gstadder.h @@ -28,8 +28,6 @@ G_BEGIN_DECLS -extern GstElementDetails gst_adder_details; - #define GST_TYPE_ADDER \ (gst_adder_get_type()) #define GST_ADDER(obj) \ diff --git a/gst/audioconvert/gstaudioconvert.c b/gst/audioconvert/gstaudioconvert.c index 04d1bb8..5beb63d 100644 --- a/gst/audioconvert/gstaudioconvert.c +++ b/gst/audioconvert/gstaudioconvert.c @@ -74,12 +74,11 @@ GST_DEBUG_CATEGORY (audio_convert_debug); /*** DEFINITIONS **************************************************************/ -static GstElementDetails audio_convert_details = { - "Audio Conversion", - "Filter/Converter/Audio", - "Convert audio to different formats", - "Benjamin Otte ", -}; +static GstElementDetails audio_convert_details = +GST_ELEMENT_DETAILS ("Audio Conversion", + "Filter/Converter/Audio", + "Convert audio to different formats", + "Benjamin Otte "); /* type functions */ static void gst_audio_convert_dispose (GObject * obj); diff --git a/gst/audiotestsrc/gstaudiotestsrc.c b/gst/audiotestsrc/gstaudiotestsrc.c index 77463fb..fc3f644 100644 --- a/gst/audiotestsrc/gstaudiotestsrc.c +++ b/gst/audiotestsrc/gstaudiotestsrc.c @@ -64,12 +64,11 @@ #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 " -}; +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 "); enum @@ -116,7 +115,7 @@ gst_audiostestsrc_wave_get_type (void) {0, NULL, NULL}, }; - if (!audiostestsrc_wave_type) { + if (G_UNLIKELY (audiostestsrc_wave_type == 0)) { audiostestsrc_wave_type = g_enum_register_static ("GstAudioTestSrcWave", audiostestsrc_waves); } @@ -140,8 +139,10 @@ static gboolean gst_audio_test_src_query (GstBaseSrc * basesrc, 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); @@ -195,8 +196,10 @@ gst_audio_test_src_class_init (GstAudioTestSrcClass * klass) 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); } @@ -576,6 +579,7 @@ gst_audio_test_src_change_volume (GstAudioTestSrc * src) } } +#ifdef __DISABLE_NO_LIVE__ static void gst_audio_test_src_get_times (GstBaseSrc * basesrc, GstBuffer * buffer, GstClockTime * start, GstClockTime * end) @@ -598,6 +602,7 @@ gst_audio_test_src_get_times (GstBaseSrc * basesrc, GstBuffer * buffer, *end = -1; } } +#endif static gboolean gst_audio_test_src_do_seek (GstBaseSrc * basesrc, GstSegment * segment) @@ -636,6 +641,7 @@ static GstFlowReturn gst_audio_test_src_create (GstBaseSrc * basesrc, guint64 offset, guint length, GstBuffer ** buffer) { + GstFlowReturn res; GstAudioTestSrc *src; GstBuffer *buf; GstClockTime next_time; @@ -646,6 +652,7 @@ gst_audio_test_src_create (GstBaseSrc * basesrc, guint64 offset, if (src->eos_reached) return GST_FLOW_UNEXPECTED; + /* example for tagging generated data */ if (!src->tags_pushed) { GstTagList *taglist; GstEvent *event; @@ -660,6 +667,7 @@ gst_audio_test_src_create (GstBaseSrc * basesrc, guint64 offset, 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) @@ -673,15 +681,17 @@ gst_audio_test_src_create (GstBaseSrc * basesrc, guint64 offset, 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; diff --git a/gst/ffmpegcolorspace/gstffmpegcolorspace.c b/gst/ffmpegcolorspace/gstffmpegcolorspace.c index 7fcc798..13f5642 100644 --- a/gst/ffmpegcolorspace/gstffmpegcolorspace.c +++ b/gst/ffmpegcolorspace/gstffmpegcolorspace.c @@ -43,12 +43,11 @@ GST_DEBUG_CATEGORY (ffmpegcolorspace_debug); #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 ", -}; +static GstElementDetails ffmpegcsp_details = +GST_ELEMENT_DETAILS ("FFMPEG Colorspace converter", + "Filter/Converter/Video", + "Converts video from one colorspace to another", + "Ronald Bultje "); /* Stereo signals and args */ diff --git a/gst/playback/gstdecodebin.c b/gst/playback/gstdecodebin.c index b134762..c86b98a 100644 --- a/gst/playback/gstdecodebin.c +++ b/gst/playback/gstdecodebin.c @@ -142,12 +142,11 @@ static void queue_filled_cb (GstElement * queue, GstDecodeBin * decode_bin); 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 " -}; +static GstElementDetails gst_decode_bin_details = +GST_ELEMENT_DETAILS ("Decoder Bin", + "Generic/Bin/Decoder", + "Autoplug and decode to raw media", + "Wim Taymans "); static GType diff --git a/gst/playback/gstplaybin.c b/gst/playback/gstplaybin.c index 53f8af0..fea9811 100644 --- a/gst/playback/gstplaybin.c +++ b/gst/playback/gstplaybin.c @@ -128,12 +128,11 @@ static GstElementClass *parent_class; //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 " -}; +static GstElementDetails gst_play_bin_details = +GST_ELEMENT_DETAILS ("Player Bin", + "Generic/Bin/Player", + "Autoplug and play media from an uri", + "Wim Taymans "); static GType gst_play_bin_get_type (void) diff --git a/gst/playback/gststreamselector.c b/gst/playback/gststreamselector.c index 3923e6d..9397226 100644 --- a/gst/playback/gststreamselector.c +++ b/gst/playback/gststreamselector.c @@ -37,6 +37,14 @@ 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 \n" + "Ronald S. Bultje \n" + "Jan Schmidt "); + static GstStaticPadTemplate gst_stream_selector_sink_factory = GST_STATIC_PAD_TEMPLATE ("sink%d", GST_PAD_SINK, @@ -106,13 +114,6 @@ static void 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 \n" - "Ronald S. Bultje \n" - "Jan Schmidt "); gst_element_class_set_details (element_class, &gst_stream_selector_details); diff --git a/gst/subparse/gstsubparse.c b/gst/subparse/gstsubparse.c index df66006..9dd1acc 100644 --- a/gst/subparse/gstsubparse.c +++ b/gst/subparse/gstsubparse.c @@ -33,6 +33,13 @@ 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 \n" + "Ronald S. Bultje "); + static GstStaticPadTemplate sink_templ = GST_STATIC_PAD_TEMPLATE ("sink", GST_PAD_SINK, GST_PAD_ALWAYS, @@ -88,13 +95,6 @@ static void 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 \n" - "Ronald S. Bultje " - }; gst_element_class_add_pad_template (element_class, gst_static_pad_template_get (&sink_templ)); diff --git a/gst/volume/gstvolume.c b/gst/volume/gstvolume.c index fdaaa38..5beb4a4 100644 --- a/gst/volume/gstvolume.c +++ b/gst/volume/gstvolume.c @@ -66,12 +66,10 @@ /* 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 ", -}; +static GstElementDetails volume_details = GST_ELEMENT_DETAILS ("Volume", + "Filter/Effect/Audio", + "Set volume on audio/raw streams", + "Andy Wingo "); /* Filter signals and args */ enum diff --git a/sys/v4l/gstv4lmjpegsink.c b/sys/v4l/gstv4lmjpegsink.c index 6e49234..38e33a4 100644 --- a/sys/v4l/gstv4lmjpegsink.c +++ b/sys/v4l/gstv4lmjpegsink.c @@ -31,12 +31,11 @@ GST_DEBUG_CATEGORY (v4lmjpegsink_debug); #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 " -}; +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 "); /* v4lmjpegsink signals and args */ enum diff --git a/sys/v4l/gstv4lmjpegsrc.c b/sys/v4l/gstv4lmjpegsrc.c index 288be3d..661f30b 100644 --- a/sys/v4l/gstv4lmjpegsrc.c +++ b/sys/v4l/gstv4lmjpegsrc.c @@ -31,12 +31,11 @@ GST_DEBUG_CATEGORY (v4lmjpegsrc_debug); #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 " -}; +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 "); /* V4lMjpegSrc signals and args */ enum diff --git a/tests/check/libs/cddabasesrc.c b/tests/check/libs/cddabasesrc.c index e5c4bb1..8dde561 100644 --- a/tests/check/libs/cddabasesrc.c +++ b/tests/check/libs/cddabasesrc.c @@ -2,7 +2,7 @@ * * unit test for cddabasesrc * - * Copyright (C) <2005> Tim-Philipp Müller + * Copyright (C) <2005> Tim-Philipp M??ller * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public @@ -184,12 +184,11 @@ static gboolean gst_cd_foo_src_open (GstCddaBaseSrc * src, 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 " -}; +static GstElementDetails cdfoo_details = +GST_ELEMENT_DETAILS ("CD Audio (cdda) Source, FooBar", + "Source/File", + "Read audio from CD", + "Foo Bar "); static void gst_cd_foo_src_base_init (gpointer g_class) diff --git a/tests/old/examples/gob/gst-identity2.gob b/tests/old/examples/gob/gst-identity2.gob index 9c34cb5..2c58f06 100644 --- a/tests/old/examples/gob/gst-identity2.gob +++ b/tests/old/examples/gob/gst-identity2.gob @@ -11,14 +11,12 @@ class Gst:Identity2 from Gst:Element { 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 ", - "(C) 2001", - }; + "Wim Taymans "); GstElementFactory *factory; factory = gst_elementfactory_new ("identity2", TYPE_SELF,