diff --git a/ChangeLog b/ChangeLog index 8d54e02808..20870064e2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,32 @@ +2007-07-03 Stefan Kost + + * docs/plugins/Makefile.am: + * docs/plugins/gst-plugins-ugly-plugins-docs.sgml: + * docs/plugins/gst-plugins-ugly-plugins-sections.txt: + * docs/plugins/inspect/plugin-a52dec.xml: + * docs/plugins/inspect/plugin-amrnb.xml: + * docs/plugins/inspect/plugin-asf.xml: + * docs/plugins/inspect/plugin-dvdlpcmdec.xml: + * docs/plugins/inspect/plugin-dvdsub.xml: + * docs/plugins/inspect/plugin-iec958.xml: + * docs/plugins/inspect/plugin-lame.xml: + * docs/plugins/inspect/plugin-mad.xml: + * docs/plugins/inspect/plugin-mpeg2dec.xml: + * docs/plugins/inspect/plugin-mpegaudioparse.xml: + * docs/plugins/inspect/plugin-mpegstream.xml: + Add new docs. Scan c++ files too. + + * ext/amrnb/amrnbdec.c: (gst_amrnbdec_base_init), + (gst_amrnbdec_event): + * ext/amrnb/amrnbenc.c: (gst_amrnbenc_base_init): + * ext/amrnb/amrnbparse.c: (gst_amrnbparse_base_init), + (gst_amrnbparse_loop): + Add documentation headers. + + * ext/mad/gstmad.c: + * ext/mad/gstmad.h: + Refactor for docs. + 2007-07-01 Sebastian Dröge * gst/mpegaudioparse/gstmpegaudioparse.c: (gst_mp3parse_base_init), diff --git a/common b/common index e6a9941c66..5167bced49 160000 --- a/common +++ b/common @@ -1 +1 @@ -Subproject commit e6a9941c662289c0743e5d8f4150458a664226f2 +Subproject commit 5167bced491ffe62251c62d6c5e7b9a7541e97e5 diff --git a/docs/plugins/Makefile.am b/docs/plugins/Makefile.am index 8dc1d3c16c..25e53a8b1a 100644 --- a/docs/plugins/Makefile.am +++ b/docs/plugins/Makefile.am @@ -50,7 +50,7 @@ SCAN_OPTIONS= #EXTRA_DIST = gstreamer.types.in gstreamer.hierarchy $(DOC_MODULE)-sections.txt gstreamer-sections.txt $(DOC_MAIN_SGML_FILE) # Extra options to supply to gtkdoc-mkdb. -MKDB_OPTIONS=--sgml-mode +MKDB_OPTIONS=--sgml-mode --source-suffixes=c,h,cc,m # Extra options to supply to gtkdoc-fixref. FIXXREF_OPTIONS=--extra-dir=$(GLIB_PREFIX)/share/gtk-doc/html/gobject \ @@ -61,7 +61,7 @@ FIXXREF_OPTIONS=--extra-dir=$(GLIB_PREFIX)/share/gtk-doc/html/gobject \ # Used for dependencies. HFILE_GLOB=$(DOC_SOURCE_DIR)/*/*/*.h -CFILE_GLOB=$(DOC_SOURCE_DIR)/*/*/*.c +CFILE_GLOB=$(DOC_SOURCE_DIR)/*/*/*.c $(DOC_SOURCE_DIR)/*/*/*.cc # this is a wingo addition # thomasvs: another nice wingo addition would be an explanation on why @@ -85,8 +85,11 @@ IGNORE_CFILES = # $(top_srcdir)/ext/gnomevfs/gstgnomevfssink.c EXTRA_HFILES = \ + $(top_srcdir)/ext/amrnb/amrnbdec.h \ + $(top_srcdir)/ext/amrnb/amrnbenc.h \ + $(top_srcdir)/ext/amrnb/amrnbparse.h \ $(top_srcdir)/ext/lame/gstlame.h \ - $(top_srcdir)/ext/mad/gstmad.h \ + $(top_srcdir)/ext/mad/gstmad.h \ $(top_srcdir)/ext/sidplay/gstsiddec.h # Images to copy into HTML directory. diff --git a/docs/plugins/gst-plugins-ugly-plugins-docs.sgml b/docs/plugins/gst-plugins-ugly-plugins-docs.sgml index 620c936129..b22422a03b 100644 --- a/docs/plugins/gst-plugins-ugly-plugins-docs.sgml +++ b/docs/plugins/gst-plugins-ugly-plugins-docs.sgml @@ -12,6 +12,9 @@ gst-plugins-ugly Elements + + + @@ -19,7 +22,7 @@ gst-plugins-ugly Plugins - + diff --git a/docs/plugins/gst-plugins-ugly-plugins-sections.txt b/docs/plugins/gst-plugins-ugly-plugins-sections.txt index b9ef38ce53..ae75041973 100644 --- a/docs/plugins/gst-plugins-ugly-plugins-sections.txt +++ b/docs/plugins/gst-plugins-ugly-plugins-sections.txt @@ -1,24 +1,86 @@ +
+element-amrnbdec +amrnbdec +GstAmrnbDec + +GstAmrnbDecClass +GST_AMRNBDEC +GST_AMRNBDEC_CLASS +GST_IS_AMRNBDEC +GST_IS_AMRNBDEC_CLASS +GST_TYPE_AMRNBDEC +gst_amrnbdec_get_type +
+ +
+element-amrnbenc +amrnbenc +GstAmrnbEnc + +GstAmrnbEncClass +GST_AMRNBENC +GST_AMRNBENC_CLASS +GST_IS_AMRNBENC +GST_IS_AMRNBENC_CLASS +GST_TYPE_AMRNBENC +gst_amrnbenc_get_type +
+ +
+element-amrnbparse +amrnbparse +GstAmrnbParse + +GstAmrnbParseClass +GST_AMRNBPARSE +GST_AMRNBPARSE_CLASS +GST_IS_AMRNBPARSE +GST_IS_AMRNBPARSE_CLASS +GST_TYPE_AMRNBPARSE +gst_amrnbparse_get_type +
+
element-mad -GstMad mad +GstMad GstMadClass +GST_MAD +GST_MAD_CLASS +GST_IS_MAD +GST_IS_MAD_CLASS +GST_TYPE_MAD +gst_mad_get_type +gst_id3_tag_get_type +gst_mad_id3_to_tag_list
element-lame -GstLame lame +GstLame GstLameClass +GST_LAME +GST_LAME_CLASS +GST_IS_LAME +GST_IS_LAME_CLASS +GST_TYPE_LAME +gst_lame_get_type
element-siddec -GstSidDec siddec +GstSidDec GstSidDecClass +GST_SIDDEC +GST_SIDDEC_CLASS +GST_IS_SIDDEC +GST_IS_SIDDEC_CLASS +GST_TYPE_SIDDEC +gst_siddec_get_type
diff --git a/docs/plugins/inspect/plugin-a52dec.xml b/docs/plugins/inspect/plugin-a52dec.xml index d852ceb379..6d5804fe3e 100644 --- a/docs/plugins/inspect/plugin-a52dec.xml +++ b/docs/plugins/inspect/plugin-a52dec.xml @@ -16,18 +16,18 @@ Decodes ATSC A/52 encoded audio streams David I. Lehn <dlehn@users.sourceforge.net> - - sink - sink - always -
audio/x-ac3; audio/ac3; audio/x-private1-ac3
-
src source always
audio/x-raw-float, endianness=(int)1234, width=(int)32, rate=(int)[ 4000, 96000 ], channels=(int)[ 1, 6 ]
+ + sink + sink + always +
audio/x-ac3; audio/ac3; audio/x-private1-ac3
+
diff --git a/docs/plugins/inspect/plugin-amrnb.xml b/docs/plugins/inspect/plugin-amrnb.xml index 46356b576a..fc2f1013fa 100644 --- a/docs/plugins/inspect/plugin-amrnb.xml +++ b/docs/plugins/inspect/plugin-amrnb.xml @@ -16,18 +16,18 @@ Adaptive Multi-Rate Narrow-Band audio decoder Ronald Bultje <rbultje@ronald.bitfreak.net> - - sink - sink - always -
audio/AMR, rate=(int)8000, channels=(int)1
-
src source always
audio/x-raw-int, width=(int)16, depth=(int)16, signed=(boolean)true, endianness=(int)1234, rate=(int)8000, channels=(int)1
+ + sink + sink + always +
audio/AMR, rate=(int)8000, channels=(int)1
+
@@ -37,18 +37,18 @@ Adaptive Multi-Rate Narrow-Band audio encoder Ronald Bultje <rbultje@ronald.bitfreak.net>, Wim Taymans <wim@fluendo.com> - - sink - sink - always -
audio/x-raw-int, width=(int)16, depth=(int)16, signed=(boolean)true, endianness=(int)1234, rate=(int)8000, channels=(int)1
-
src source always
audio/AMR, rate=(int)8000, channels=(int)1
+ + sink + sink + always +
audio/x-raw-int, width=(int)16, depth=(int)16, signed=(boolean)true, endianness=(int)1234, rate=(int)8000, channels=(int)1
+
@@ -58,18 +58,18 @@ Adaptive Multi-Rate Narrow-Band audio parser Ronald Bultje <rbultje@ronald.bitfreak.net> - - sink - sink - always -
audio/x-amr-nb-sh
-
src source always
audio/AMR, rate=(int)8000, channels=(int)1
+ + sink + sink + always +
audio/x-amr-nb-sh
+
diff --git a/docs/plugins/inspect/plugin-asf.xml b/docs/plugins/inspect/plugin-asf.xml index ee960ad62e..08b9bb9fbe 100644 --- a/docs/plugins/inspect/plugin-asf.xml +++ b/docs/plugins/inspect/plugin-asf.xml @@ -17,10 +17,10 @@ Owen Fraser-Green <owen@discobabe.net> - audio_%02d - source - sometimes -
ANY
+ sink + sink + always +
video/x-ms-asf
video_%02d @@ -29,10 +29,10 @@
ANY
- sink - sink - always -
video/x-ms-asf
+ audio_%02d + source + sometimes +
ANY
diff --git a/docs/plugins/inspect/plugin-dvdlpcmdec.xml b/docs/plugins/inspect/plugin-dvdlpcmdec.xml index 7bb0c5d75d..0d0aa2ac49 100644 --- a/docs/plugins/inspect/plugin-dvdlpcmdec.xml +++ b/docs/plugins/inspect/plugin-dvdlpcmdec.xml @@ -17,18 +17,18 @@ Jan Schmidt <jan@noraisin.net> Michael Smith <msmith@fluendo.com> - - sink - sink - always -
audio/x-private1-lpcm; audio/x-lpcm, width=(int){ 16, 20, 24 }, rate=(int){ 48000, 96000 }, channels=(int)[ 1, 8 ], dynamic_range=(int)[ 0, 255 ], emphasis=(boolean){ true, false }, mute=(boolean){ true, false }
-
src source always
audio/x-raw-int, width=(int){ 16, 24 }, rate=(int){ 48000, 96000 }, channels=(int)[ 1, 8 ], endianness=(int){ 4321 }, depth=(int){ 16, 24 }, signed=(boolean){ true }
+ + sink + sink + always +
audio/x-private1-lpcm; audio/x-lpcm, width=(int){ 16, 20, 24 }, rate=(int){ 48000, 96000 }, channels=(int)[ 1, 8 ], dynamic_range=(int)[ 0, 255 ], emphasis=(boolean){ true, false }, mute=(boolean){ true, false }
+
diff --git a/docs/plugins/inspect/plugin-dvdsub.xml b/docs/plugins/inspect/plugin-dvdsub.xml index dee3cdbd88..54faf7461f 100644 --- a/docs/plugins/inspect/plugin-dvdsub.xml +++ b/docs/plugins/inspect/plugin-dvdsub.xml @@ -16,18 +16,18 @@ Decodes DVD subtitles into AYUV video frames Wim Taymans <wim.taymans@chello.be>, Jan Schmidt <thaytan@mad.scientist.com> - - src - source - always -
video/x-raw-yuv, format=(fourcc)AYUV, width=(int)720, height=(int)576, framerate=(fraction)0/1
-
sink sink always
video/x-dvd-subpicture
+ + src + source + always +
video/x-raw-yuv, format=(fourcc)AYUV, width=(int)720, height=(int)576, framerate=(fraction)0/1
+
diff --git a/docs/plugins/inspect/plugin-iec958.xml b/docs/plugins/inspect/plugin-iec958.xml index a7b27f7855..1aedfed2ed 100644 --- a/docs/plugins/inspect/plugin-iec958.xml +++ b/docs/plugins/inspect/plugin-iec958.xml @@ -16,18 +16,18 @@ Pads AC3 frames into IEC958 frames suitable for a raw S/PDIF interface Martin Soto <martinsoto@users.sourceforge.net> - - sink - sink - always -
audio/x-private1-ac3; audio/x-ac3; audio/ac3
-
src source always
audio/x-iec958, rate=(int){ 32000, 44100, 48000 }; audio/x-raw-int, endianness=(int)4321, signed=(boolean)true, width=(int)16, depth=(int)16, rate=(int){ 32000, 44100, 48000 }, channels=(int)2
+ + sink + sink + always +
audio/x-private1-ac3; audio/x-ac3; audio/ac3
+
diff --git a/docs/plugins/inspect/plugin-lame.xml b/docs/plugins/inspect/plugin-lame.xml index 3ba086c73c..762713b205 100644 --- a/docs/plugins/inspect/plugin-lame.xml +++ b/docs/plugins/inspect/plugin-lame.xml @@ -16,18 +16,18 @@ High-quality free MP3 encoder Erik Walthinsen <omega@cse.ogi.edu>, Wim Taymans <wim@fluendo.com> - - src - source - always -
audio/mpeg, mpegversion=(int)1, layer=(int)3, rate=(int){ 8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000 }, channels=(int)[ 1, 2 ]
-
sink sink always
audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)16, depth=(int)16, rate=(int){ 8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000 }, channels=(int)[ 1, 2 ]
+ + src + source + always +
audio/mpeg, mpegversion=(int)1, layer=(int)3, rate=(int){ 8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000 }, channels=(int)[ 1, 2 ]
+
diff --git a/docs/plugins/inspect/plugin-mad.xml b/docs/plugins/inspect/plugin-mad.xml index 1d4978022c..2a8a1949ee 100644 --- a/docs/plugins/inspect/plugin-mad.xml +++ b/docs/plugins/inspect/plugin-mad.xml @@ -16,18 +16,18 @@ Add ID3 tagging information Benjamin Otte <otte@gnome.org> - - src - source - always -
application/x-id3
-
sink sink always
audio/mpeg, mpegversion=(int)1; audio/x-flac
+ + src + source + always +
application/x-id3
+
@@ -37,18 +37,18 @@ Uses mad code to decode mp3 streams Wim Taymans <wim@fluendo.com> - - sink - sink - always -
audio/mpeg, mpegversion=(int)1, layer=(int)[ 1, 3 ], rate=(int){ 8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000 }, channels=(int)[ 1, 2 ]
-
src source always
audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)32, depth=(int)32, rate=(int){ 8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000 }, channels=(int)[ 1, 2 ]
+ + sink + sink + always +
audio/mpeg, mpegversion=(int)1, layer=(int)[ 1, 3 ], rate=(int){ 8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000 }, channels=(int)[ 1, 2 ]
+
diff --git a/docs/plugins/inspect/plugin-mpeg2dec.xml b/docs/plugins/inspect/plugin-mpeg2dec.xml index 0c8efe50a8..045209f881 100644 --- a/docs/plugins/inspect/plugin-mpeg2dec.xml +++ b/docs/plugins/inspect/plugin-mpeg2dec.xml @@ -16,18 +16,18 @@ Uses libmpeg2 to decode MPEG video streams Wim Taymans <wim.taymans@chello.be> - - src - source - always -
video/x-raw-yuv, format=(fourcc){ YV12, I420, Y42B }, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(fraction)[ 0/1, 2147483647/1 ]
-
sink sink always
video/mpeg, mpegversion=(int)[ 1, 2 ], systemstream=(boolean)false
+ + src + source + always +
video/x-raw-yuv, format=(fourcc){ YV12, I420, Y42B }, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(fraction)[ 0/1, 2147483647/1 ]
+
diff --git a/docs/plugins/inspect/plugin-mpegaudioparse.xml b/docs/plugins/inspect/plugin-mpegaudioparse.xml index a95abf1c2c..43ce9d6313 100644 --- a/docs/plugins/inspect/plugin-mpegaudioparse.xml +++ b/docs/plugins/inspect/plugin-mpegaudioparse.xml @@ -17,18 +17,18 @@ Jan Schmidt <thaytan@mad.scientist.com> Erik Walthinsen <omega@cse.ogi.edu> - - sink - sink - always -
audio/mpeg, mpegversion=(int)1, parsed=(boolean)false
-
src source always
audio/mpeg, mpegversion=(int)1, layer=(int)[ 1, 3 ], rate=(int)[ 8000, 48000 ], channels=(int)[ 1, 2 ], parsed=(boolean)true
+ + sink + sink + always +
audio/mpeg, mpegversion=(int)1, parsed=(boolean)false
+
diff --git a/docs/plugins/inspect/plugin-mpegstream.xml b/docs/plugins/inspect/plugin-mpegstream.xml index 0cdef66584..59b2a3901a 100644 --- a/docs/plugins/inspect/plugin-mpegstream.xml +++ b/docs/plugins/inspect/plugin-mpegstream.xml @@ -17,33 +17,21 @@ Martin Soto <martinsoto@users.sourceforge.net> - video_%02d + current_subpicture source - sometimes -
video/mpeg, mpegversion=(int){ 1, 2 }, systemstream=(boolean)false
-
- - audio_%02d - source - sometimes -
audio/mpeg, mpegversion=(int)1
-
- - private_%d - source - sometimes -
ANY
-
- - sink - sink always -
video/mpeg, mpegversion=(int)2, systemstream=(boolean)true
+
video/x-dvd-subpicture
- dvd_audio_%02d + subpicture_%d source sometimes +
video/x-dvd-subpicture
+
+ + current_audio + source + always
audio/mpeg, mpegversion=(int)1; audio/x-lpcm, width=(int){ 16, 20, 24 }, rate=(int){ 48000, 96000 }, channels=(int)[ 1, 8 ], dynamic_range=(int)[ 0, 255 ], emphasis=(boolean){ false, true }, mute=(boolean){ false, true }; audio/x-ac3; audio/x-dts
@@ -53,22 +41,34 @@
video/mpeg, mpegversion=(int){ 1, 2 }, systemstream=(boolean)false
- current_audio + dvd_audio_%02d source - always + sometimes
audio/mpeg, mpegversion=(int)1; audio/x-lpcm, width=(int){ 16, 20, 24 }, rate=(int){ 48000, 96000 }, channels=(int)[ 1, 8 ], dynamic_range=(int)[ 0, 255 ], emphasis=(boolean){ false, true }, mute=(boolean){ false, true }; audio/x-ac3; audio/x-dts
- subpicture_%d - source - sometimes -
video/x-dvd-subpicture
+ sink + sink + always +
video/mpeg, mpegversion=(int)2, systemstream=(boolean)true
- current_subpicture + private_%d source - always -
video/x-dvd-subpicture
+ sometimes +
ANY
+
+ + audio_%02d + source + sometimes +
audio/mpeg, mpegversion=(int)1
+
+ + video_%02d + source + sometimes +
video/mpeg, mpegversion=(int){ 1, 2 }, systemstream=(boolean)false
@@ -81,16 +81,10 @@ Wim Taymans <wim.taymans@chello.be> - video_%02d - source - sometimes -
video/mpeg, mpegversion=(int){ 1, 2 }, systemstream=(boolean)false
-
- - audio_%02d - source - sometimes -
audio/mpeg, mpegversion=(int)1
+ sink + sink + always +
video/mpeg, mpegversion=(int){ 1, 2 }, systemstream=(boolean)true
private_%d @@ -99,10 +93,16 @@
ANY
- sink - sink - always -
video/mpeg, mpegversion=(int){ 1, 2 }, systemstream=(boolean)true
+ audio_%02d + source + sometimes +
audio/mpeg, mpegversion=(int)1
+
+ + video_%02d + source + sometimes +
video/mpeg, mpegversion=(int){ 1, 2 }, systemstream=(boolean)false
@@ -115,14 +115,14 @@ Wim Taymans <wim.taymans@chello.be> - src - source + sink + sink always
video/mpeg, mpegversion=(int)[ 1, 2 ], systemstream=(boolean)true
- sink - sink + src + source always
video/mpeg, mpegversion=(int)[ 1, 2 ], systemstream=(boolean)true
diff --git a/ext/amrnb/amrnbdec.c b/ext/amrnb/amrnbdec.c index b91a907cef..e8ae86bb46 100644 --- a/ext/amrnb/amrnbdec.c +++ b/ext/amrnb/amrnbdec.c @@ -17,9 +17,22 @@ * Boston, MA 02111-1307, USA. */ -/* - * library can be found at http://www.penguin.cz/~utx/amr - * gst-launch filesrc location=./bugdata/Bug24403/Ganga9_21_nb.amr ! amrnbparse ! amrnbdec ! audioresample ! audioconvert ! alsasink +/** + * SECTION:element-amrnbdec + * @see_also: #GstAmrnbEnc, #GstAmrnbParse + * + * + * + * This is an AMR narrowband decoder based on the + * reference codec implementation. + * + * Example launch line + * + * + * gst-launch filesrc location=abc.amr ! amrnbparse ! amrnbdec ! audioresample ! audioconvert ! alsasink + * + * + * */ #ifdef HAVE_CONFIG_H diff --git a/ext/amrnb/amrnbenc.c b/ext/amrnb/amrnbenc.c index 160cba9cc8..42fc4c4dbd 100644 --- a/ext/amrnb/amrnbenc.c +++ b/ext/amrnb/amrnbenc.c @@ -17,6 +17,26 @@ * Boston, MA 02111-1307, USA. */ +/** + * SECTION:element-amrnbenc + * @see_also: #GstAmrnbDec, #GstAmrnbParse + * + * + * + * This is an AMR narrowband encoder based on the + * reference codec implementation. + * + * Example launch line + * + * + * gst-launch filesrc location=abc.wav ! wavparse ! audioresample ! audioconvert ! amrnbenc ! filesink location=abc.amr + * + * + * Please not that the above stream misses the header, that is needed to play + * the stream. + * + */ + #ifdef HAVE_CONFIG_H #include "config.h" #endif diff --git a/ext/amrnb/amrnbparse.c b/ext/amrnb/amrnbparse.c index a47396c2a5..fbae346e65 100644 --- a/ext/amrnb/amrnbparse.c +++ b/ext/amrnb/amrnbparse.c @@ -17,6 +17,23 @@ * Boston, MA 02111-1307, USA. */ +/** + * SECTION:element-amrnbparse + * @see_also: #GstAmrnbDec, #GstAmrnbEnc + * + * + * + * This is an AMR narrowband parser. + * + * Example launch line + * + * + * gst-launch filesrc location=abc.amr ! amrnbparse ! amrnbdec ! audioresample ! audioconvert ! alsasink + * + * + * + */ + #ifdef HAVE_CONFIG_H #include "config.h" #endif diff --git a/ext/mad/gstmad.c b/ext/mad/gstmad.c index f3b5804a3e..6c5082099e 100644 --- a/ext/mad/gstmad.c +++ b/ext/mad/gstmad.c @@ -24,75 +24,6 @@ #include #include "gstmad.h" -#define GST_TYPE_MAD \ - (gst_mad_get_type()) -#define GST_MAD(obj) \ - (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_MAD,GstMad)) -#define GST_MAD_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_MAD,GstMadClass)) -#define GST_IS_MAD(obj) \ - (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_MAD)) -#define GST_IS_MAD_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_MAD)) - - -typedef struct _GstMad GstMad; -typedef struct _GstMadClass GstMadClass; - -struct _GstMad -{ - GstElement element; - - /* pads */ - GstPad *sinkpad, *srcpad; - - /* state */ - struct mad_stream stream; - struct mad_frame frame; - struct mad_synth synth; - guchar *tempbuffer; /* temporary buffer to serve to mad */ - glong tempsize; /* running count of temp buffer size */ - GstClockTime last_ts; - guint64 base_byte_offset; - guint64 bytes_consumed; /* since the base_byte_offset */ - guint64 total_samples; /* the number of samples since the sync point */ - - gboolean in_error; /* set when mad's in an error state */ - gboolean restart; - guint64 segment_start; - gboolean need_newsegment; - - /* info */ - struct mad_header header; - gboolean new_header; - guint framecount; - gint vbr_average; /* average bitrate */ - guint64 vbr_rate; /* average * framecount */ - - gboolean half; - gboolean ignore_crc; - - GstTagList *tags; - - /* negotiated format */ - gint rate, pending_rate; - gint channels, pending_channels; - gint times_pending; - - gboolean caps_set; /* used to keep track of whether to change/update caps */ - GstIndex *index; - gint index_id; - - gboolean check_for_xing; - gboolean xing_found; - - gboolean framed; /* whether there is a demuxer in front of us */ -}; - -struct _GstMadClass -{ - GstElementClass parent_class; -}; /* elementfactory information */ static const GstElementDetails gst_mad_details = diff --git a/ext/mad/gstmad.h b/ext/mad/gstmad.h index 83a59b4291..74479a2b21 100644 --- a/ext/mad/gstmad.h +++ b/ext/mad/gstmad.h @@ -28,6 +28,76 @@ G_BEGIN_DECLS +#define GST_TYPE_MAD \ + (gst_mad_get_type()) +#define GST_MAD(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_MAD,GstMad)) +#define GST_MAD_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_MAD,GstMadClass)) +#define GST_IS_MAD(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_MAD)) +#define GST_IS_MAD_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_MAD)) + + +typedef struct _GstMad GstMad; +typedef struct _GstMadClass GstMadClass; + +struct _GstMad +{ + GstElement element; + + /* pads */ + GstPad *sinkpad, *srcpad; + + /* state */ + struct mad_stream stream; + struct mad_frame frame; + struct mad_synth synth; + guchar *tempbuffer; /* temporary buffer to serve to mad */ + glong tempsize; /* running count of temp buffer size */ + GstClockTime last_ts; + guint64 base_byte_offset; + guint64 bytes_consumed; /* since the base_byte_offset */ + guint64 total_samples; /* the number of samples since the sync point */ + + gboolean in_error; /* set when mad's in an error state */ + gboolean restart; + guint64 segment_start; + gboolean need_newsegment; + + /* info */ + struct mad_header header; + gboolean new_header; + guint framecount; + gint vbr_average; /* average bitrate */ + guint64 vbr_rate; /* average * framecount */ + + gboolean half; + gboolean ignore_crc; + + GstTagList *tags; + + /* negotiated format */ + gint rate, pending_rate; + gint channels, pending_channels; + gint times_pending; + + gboolean caps_set; /* used to keep track of whether to change/update caps */ + GstIndex *index; + gint index_id; + + gboolean check_for_xing; + gboolean xing_found; + + gboolean framed; /* whether there is a demuxer in front of us */ +}; + +struct _GstMadClass +{ + GstElementClass parent_class; +}; + GType gst_mad_get_type (void); GType gst_id3_tag_get_type (guint type);