2 * Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
3 * Copyright (C) <2006> Tim-Philipp Müller <tim centricular net>
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Library General Public License for more details.
15 * You should have received a copy of the GNU Library General Public
16 * License along with this library; if not, write to the
17 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 * Boston, MA 02111-1307, USA.
22 * SECTION:element-auparse
24 * Parses .au files mostly originating from sun os based computers.
34 #include "gstauparse.h"
35 #include <gst/audio/audio.h>
37 GST_DEBUG_CATEGORY_STATIC (auparse_debug);
38 #define GST_CAT_DEFAULT (auparse_debug)
40 static GstStaticPadTemplate sink_template = GST_STATIC_PAD_TEMPLATE ("sink",
43 GST_STATIC_CAPS ("audio/x-au")
46 #define GST_AU_PARSE_ALAW_PAD_TEMPLATE_CAPS \
48 "rate = (int) [ 8000, 192000 ], " \
49 "channels = (int) [ 1, 2 ]"
51 #define GST_AU_PARSE_MULAW_PAD_TEMPLATE_CAPS \
53 "rate = (int) [ 8000, 192000 ], " \
54 "channels = (int) [ 1, 2 ]"
56 /* Nothing to decode those ADPCM streams for now */
57 #define GST_AU_PARSE_ADPCM_PAD_TEMPLATE_CAPS \
59 "layout = (string) { g721, g722, g723_3, g723_5 }"
61 static GstStaticPadTemplate src_template = GST_STATIC_PAD_TEMPLATE ("src",
64 GST_STATIC_CAPS (GST_AUDIO_INT_PAD_TEMPLATE_CAPS "; "
65 GST_AUDIO_FLOAT_PAD_TEMPLATE_CAPS ";"
66 GST_AU_PARSE_ALAW_PAD_TEMPLATE_CAPS ";"
67 GST_AU_PARSE_MULAW_PAD_TEMPLATE_CAPS ";"
68 GST_AU_PARSE_ADPCM_PAD_TEMPLATE_CAPS));
71 static void gst_au_parse_dispose (GObject * object);
72 static GstFlowReturn gst_au_parse_chain (GstPad * pad, GstBuffer * buf);
73 static GstStateChangeReturn gst_au_parse_change_state (GstElement * element,
74 GstStateChange transition);
75 static void gst_au_parse_reset (GstAuParse * auparse);
76 static gboolean gst_au_parse_remove_srcpad (GstAuParse * auparse);
77 static gboolean gst_au_parse_add_srcpad (GstAuParse * auparse, GstCaps * caps);
78 static gboolean gst_au_parse_src_query (GstPad * pad, GstQuery * query);
79 static gboolean gst_au_parse_src_event (GstPad * pad, GstEvent * event);
80 static gboolean gst_au_parse_sink_event (GstPad * pad, GstEvent * event);
81 static gboolean gst_au_parse_src_convert (GstAuParse * auparse,
82 GstFormat src_format, gint64 srcval, GstFormat dest_format,
85 #define gst_au_parse_parent_class parent_class
86 G_DEFINE_TYPE (GstAuParse, gst_au_parse, GST_TYPE_ELEMENT);
89 gst_au_parse_class_init (GstAuParseClass * klass)
91 GObjectClass *gobject_class;
92 GstElementClass *gstelement_class;
94 GST_DEBUG_CATEGORY_INIT (auparse_debug, "auparse", 0, ".au parser");
96 gobject_class = (GObjectClass *) klass;
97 gstelement_class = (GstElementClass *) klass;
99 gobject_class->dispose = gst_au_parse_dispose;
101 gstelement_class->change_state =
102 GST_DEBUG_FUNCPTR (gst_au_parse_change_state);
103 gst_element_class_add_pad_template (gstelement_class,
104 gst_static_pad_template_get (&sink_template));
105 gst_element_class_add_pad_template (gstelement_class,
106 gst_static_pad_template_get (&src_template));
107 gst_element_class_set_details_simple (gstelement_class,
109 "Codec/Demuxer/Audio",
110 "Parse an .au file into raw audio",
111 "Erik Walthinsen <omega@cse.ogi.edu>");
115 gst_au_parse_init (GstAuParse * auparse)
117 auparse->sinkpad = gst_pad_new_from_static_template (&sink_template, "sink");
118 gst_pad_set_chain_function (auparse->sinkpad,
119 GST_DEBUG_FUNCPTR (gst_au_parse_chain));
120 gst_pad_set_event_function (auparse->sinkpad,
121 GST_DEBUG_FUNCPTR (gst_au_parse_sink_event));
122 gst_element_add_pad (GST_ELEMENT (auparse), auparse->sinkpad);
124 auparse->srcpad = NULL;
125 auparse->adapter = gst_adapter_new ();
126 gst_au_parse_reset (auparse);
130 gst_au_parse_dispose (GObject * object)
132 GstAuParse *au = GST_AU_PARSE (object);
134 if (au->adapter != NULL) {
135 g_object_unref (au->adapter);
138 G_OBJECT_CLASS (parent_class)->dispose (object);
142 gst_au_parse_reset (GstAuParse * auparse)
144 gst_au_parse_remove_srcpad (auparse);
147 auparse->buffer_offset = 0;
148 auparse->encoding = 0;
149 auparse->samplerate = 0;
150 auparse->channels = 0;
152 gst_adapter_clear (auparse->adapter);
154 /* gst_segment_init (&auparse->segment, GST_FORMAT_TIME); */
158 gst_au_parse_add_srcpad (GstAuParse * auparse, GstCaps * new_caps)
160 if (auparse->src_caps && gst_caps_is_equal (new_caps, auparse->src_caps)) {
161 GST_LOG_OBJECT (auparse, "same caps, nothing to do");
165 gst_caps_replace (&auparse->src_caps, new_caps);
166 if (auparse->srcpad != NULL) {
167 GST_DEBUG_OBJECT (auparse, "Changing src pad caps to %" GST_PTR_FORMAT,
169 gst_pad_set_caps (auparse->srcpad, auparse->src_caps);
172 if (auparse->srcpad == NULL) {
173 auparse->srcpad = gst_pad_new_from_static_template (&src_template, "src");
174 g_return_val_if_fail (auparse->srcpad != NULL, FALSE);
177 gst_pad_set_query_type_function (auparse->srcpad,
178 GST_DEBUG_FUNCPTR (gst_au_parse_src_get_query_types));
180 gst_pad_set_query_function (auparse->srcpad,
181 GST_DEBUG_FUNCPTR (gst_au_parse_src_query));
182 gst_pad_set_event_function (auparse->srcpad,
183 GST_DEBUG_FUNCPTR (gst_au_parse_src_event));
185 gst_pad_use_fixed_caps (auparse->srcpad);
186 gst_pad_set_active (auparse->srcpad, TRUE);
188 if (auparse->src_caps)
189 gst_pad_set_caps (auparse->srcpad, auparse->src_caps);
191 GST_DEBUG_OBJECT (auparse, "Adding src pad with caps %" GST_PTR_FORMAT,
194 gst_object_ref (auparse->srcpad);
195 if (!gst_element_add_pad (GST_ELEMENT (auparse), auparse->srcpad))
197 gst_element_no_more_pads (GST_ELEMENT (auparse));
204 gst_au_parse_remove_srcpad (GstAuParse * auparse)
208 if (auparse->srcpad != NULL) {
209 GST_DEBUG_OBJECT (auparse, "Removing src pad");
210 res = gst_element_remove_pad (GST_ELEMENT (auparse), auparse->srcpad);
211 g_return_val_if_fail (res != FALSE, FALSE);
212 gst_object_unref (auparse->srcpad);
213 auparse->srcpad = NULL;
220 gst_au_parse_parse_header (GstAuParse * auparse)
225 gchar layout[7] = { 0, };
226 gint law = 0, depth = 0, ieee = 0;
228 head = (guint8 *) gst_adapter_peek (auparse->adapter, 24);
229 g_assert (head != NULL);
231 GST_DEBUG_OBJECT (auparse, "[%c%c%c%c]", head[0], head[1], head[2], head[3]);
233 switch (GST_READ_UINT32_BE (head)) {
234 /* normal format is big endian (au is a Sparc format) */
235 case 0x2e736e64:{ /* ".snd" */
236 auparse->endianness = G_BIG_ENDIAN;
239 /* and of course, someone had to invent a little endian
240 * version. Used by DEC systems. */
241 case 0x646e732e: /* dns. */
242 case 0x0064732e:{ /* other source say it is "dns." */
243 auparse->endianness = G_LITTLE_ENDIAN;
251 auparse->offset = GST_READ_UINT32_BE (head + 4);
252 /* Do not trust size, could be set to -1 : unknown
253 * otherwise: filesize = size + auparse->offset
255 size = GST_READ_UINT32_BE (head + 8);
256 auparse->encoding = GST_READ_UINT32_BE (head + 12);
257 auparse->samplerate = GST_READ_UINT32_BE (head + 16);
258 auparse->channels = GST_READ_UINT32_BE (head + 20);
260 if (auparse->samplerate < 8000 || auparse->samplerate > 192000)
261 goto unsupported_sample_rate;
263 if (auparse->channels < 1 || auparse->channels > 2)
264 goto unsupported_number_of_channels;
266 GST_DEBUG_OBJECT (auparse, "offset %" G_GINT64_FORMAT ", size %u, "
267 "encoding %u, frequency %u, channels %u", auparse->offset, size,
268 auparse->encoding, auparse->samplerate, auparse->channels);
271 * http://www.opengroup.org/public/pubs/external/auformat.html
272 * http://astronomy.swin.edu.au/~pbourke/dataformats/au/
273 * Solaris headers : /usr/include/audio/au.h
274 * libsndfile : src/au.c
277 * http://www.tsp.ece.mcgill.ca/MMSP/Documents/AudioFormats/AU/Samples.html
280 switch (auparse->encoding) {
281 case 1: /* 8-bit ISDN mu-law G.711 */
285 case 27: /* 8-bit ISDN A-law G.711 */
290 case 2: /* 8-bit linear PCM */
293 case 3: /* 16-bit linear PCM */
296 case 4: /* 24-bit linear PCM */
299 case 5: /* 32-bit linear PCM */
303 case 6: /* 32-bit IEEE floating point */
307 case 7: /* 64-bit IEEE floating point */
312 case 23: /* 4-bit CCITT G.721 ADPCM 32kbps -> modplug/libsndfile (compressed 8-bit mu-law) */
313 strcpy (layout, "g721");
315 case 24: /* 8-bit CCITT G.722 ADPCM -> rtp */
316 strcpy (layout, "g722");
318 case 25: /* 3-bit CCITT G.723.3 ADPCM 24kbps -> rtp/xine/modplug/libsndfile */
319 strcpy (layout, "g723_3");
321 case 26: /* 5-bit CCITT G.723.5 ADPCM 40kbps -> rtp/xine/modplug/libsndfile */
322 strcpy (layout, "g723_5");
325 case 8: /* Fragmented sample data */
326 case 9: /* AU_ENCODING_NESTED */
328 case 10: /* DSP program */
329 case 11: /* DSP 8-bit fixed point */
330 case 12: /* DSP 16-bit fixed point */
331 case 13: /* DSP 24-bit fixed point */
332 case 14: /* DSP 32-bit fixed point */
334 case 16: /* AU_ENCODING_DISPLAY : non-audio display data */
335 case 17: /* AU_ENCODING_MULAW_SQUELCH */
337 case 18: /* 16-bit linear with emphasis */
338 case 19: /* 16-bit linear compressed (NeXT) */
339 case 20: /* 16-bit linear with emphasis and compression */
341 case 21: /* Music kit DSP commands */
342 case 22: /* Music kit DSP commands samples */
350 gst_caps_new_simple ((law == 1) ? "audio/x-mulaw" : "audio/x-alaw",
351 "rate", G_TYPE_INT, auparse->samplerate,
352 "channels", G_TYPE_INT, auparse->channels, NULL);
353 auparse->sample_size = auparse->channels;
355 tempcaps = gst_caps_new_simple ("audio/x-raw-float",
356 "rate", G_TYPE_INT, auparse->samplerate,
357 "channels", G_TYPE_INT, auparse->channels,
358 "endianness", G_TYPE_INT, auparse->endianness,
359 "width", G_TYPE_INT, depth, NULL);
360 auparse->sample_size = auparse->channels * depth / 8;
361 } else if (layout[0]) {
362 tempcaps = gst_caps_new_simple ("audio/x-adpcm",
363 "layout", G_TYPE_STRING, layout, NULL);
364 auparse->sample_size = 0;
366 tempcaps = gst_caps_new_simple ("audio/x-raw-int",
367 "rate", G_TYPE_INT, auparse->samplerate,
368 "channels", G_TYPE_INT, auparse->channels,
369 "endianness", G_TYPE_INT, auparse->endianness,
370 "depth", G_TYPE_INT, depth, "width", G_TYPE_INT, depth,
371 /* FIXME: signed TRUE even for 8-bit PCM? */
372 "signed", G_TYPE_BOOLEAN, TRUE, NULL);
373 auparse->sample_size = auparse->channels * depth / 8;
376 GST_DEBUG_OBJECT (auparse, "sample_size=%d", auparse->sample_size);
378 if (!gst_au_parse_add_srcpad (auparse, tempcaps))
381 GST_DEBUG_OBJECT (auparse, "offset=%" G_GINT64_FORMAT, auparse->offset);
382 gst_adapter_flush (auparse->adapter, auparse->offset);
384 gst_caps_unref (tempcaps);
390 GST_ELEMENT_ERROR (auparse, STREAM, WRONG_TYPE, (NULL), (NULL));
391 return GST_FLOW_ERROR;
393 unsupported_sample_rate:
395 GST_ELEMENT_ERROR (auparse, STREAM, FORMAT, (NULL),
396 ("Unsupported samplerate: %u", auparse->samplerate));
397 return GST_FLOW_ERROR;
399 unsupported_number_of_channels:
401 GST_ELEMENT_ERROR (auparse, STREAM, FORMAT, (NULL),
402 ("Unsupported number of channels: %u", auparse->channels));
403 return GST_FLOW_ERROR;
407 GST_ELEMENT_ERROR (auparse, STREAM, FORMAT, (NULL),
408 ("Unsupported encoding: %u", auparse->encoding));
409 return GST_FLOW_ERROR;
413 GST_ELEMENT_ERROR (auparse, STREAM, FAILED, (NULL),
414 ("Failed to add srcpad"));
415 gst_caps_unref (tempcaps);
416 return GST_FLOW_ERROR;
420 #define AU_HEADER_SIZE 24
423 gst_au_parse_chain (GstPad * pad, GstBuffer * buf)
425 GstFlowReturn ret = GST_FLOW_OK;
427 gint avail, sendnow = 0;
432 auparse = GST_AU_PARSE (gst_pad_get_parent (pad));
434 GST_LOG_OBJECT (auparse, "got buffer of size %u", GST_BUFFER_SIZE (buf));
436 gst_adapter_push (auparse->adapter, buf);
439 /* if we haven't seen any data yet... */
440 if (auparse->srcpad == NULL) {
441 if (gst_adapter_available (auparse->adapter) < AU_HEADER_SIZE) {
442 GST_DEBUG_OBJECT (auparse, "need more data to parse header");
447 ret = gst_au_parse_parse_header (auparse);
448 if (ret != GST_FLOW_OK)
451 gst_pad_push_event (auparse->srcpad,
452 gst_event_new_new_segment (FALSE, 1.0, GST_FORMAT_TIME,
453 0, GST_CLOCK_TIME_NONE, 0));
456 avail = gst_adapter_available (auparse->adapter);
458 if (auparse->sample_size > 0) {
459 /* Ensure we push a buffer that's a multiple of the frame size downstream */
460 sendnow = avail - (avail % auparse->sample_size);
462 /* It's something non-trivial (such as ADPCM), we don't understand it, so
463 * just push downstream and assume it will know what to do with it */
472 ret = gst_pad_alloc_buffer_and_set_caps (auparse->srcpad,
473 auparse->buffer_offset, sendnow, GST_PAD_CAPS (auparse->srcpad),
476 if (ret != GST_FLOW_OK) {
477 GST_DEBUG_OBJECT (auparse, "pad alloc flow: %s", gst_flow_get_name (ret));
481 data = gst_adapter_peek (auparse->adapter, sendnow);
482 memcpy (GST_BUFFER_DATA (outbuf), data, sendnow);
483 gst_adapter_flush (auparse->adapter, sendnow);
485 pos = auparse->buffer_offset - auparse->offset;
488 if (auparse->sample_size > 0 && auparse->samplerate > 0) {
489 gst_au_parse_src_convert (auparse, GST_FORMAT_BYTES, pos,
490 GST_FORMAT_DEFAULT, &offset);
491 gst_au_parse_src_convert (auparse, GST_FORMAT_BYTES, pos,
492 GST_FORMAT_TIME, ×tamp);
493 gst_au_parse_src_convert (auparse, GST_FORMAT_BYTES,
494 sendnow, GST_FORMAT_TIME, &duration);
496 GST_BUFFER_OFFSET (outbuf) = offset;
497 GST_BUFFER_TIMESTAMP (outbuf) = timestamp;
498 GST_BUFFER_DURATION (outbuf) = duration;
501 auparse->buffer_offset += sendnow;
503 ret = gst_pad_push (auparse->srcpad, outbuf);
508 gst_object_unref (auparse);
513 gst_au_parse_src_convert (GstAuParse * auparse, GstFormat src_format,
514 gint64 srcval, GstFormat dest_format, gint64 * destval)
517 guint samplesize, rate;
519 if (dest_format == src_format) {
524 GST_OBJECT_LOCK (auparse);
525 samplesize = auparse->sample_size;
526 rate = auparse->samplerate;
527 GST_OBJECT_UNLOCK (auparse);
529 if (samplesize == 0 || rate == 0) {
530 GST_LOG_OBJECT (auparse, "cannot convert, sample_size or rate unknown");
534 switch (src_format) {
535 case GST_FORMAT_BYTES:
536 srcval /= samplesize;
538 case GST_FORMAT_DEFAULT:{
539 switch (dest_format) {
540 case GST_FORMAT_DEFAULT:
543 case GST_FORMAT_BYTES:
544 *destval = srcval * samplesize;
546 case GST_FORMAT_TIME:
547 *destval = gst_util_uint64_scale_int (srcval, GST_SECOND, rate);
555 case GST_FORMAT_TIME:{
556 switch (dest_format) {
557 case GST_FORMAT_BYTES:
558 *destval = samplesize *
559 gst_util_uint64_scale_int (srcval, rate, GST_SECOND);
561 case GST_FORMAT_DEFAULT:
562 *destval = gst_util_uint64_scale_int (srcval, rate, GST_SECOND);
577 GST_DEBUG_OBJECT (auparse, "could not convert from %s to %s format",
578 gst_format_get_name (src_format), gst_format_get_name (dest_format));
585 gst_au_parse_src_query (GstPad * pad, GstQuery * query)
588 gboolean ret = FALSE;
590 auparse = GST_AU_PARSE (gst_pad_get_parent (pad));
592 switch (GST_QUERY_TYPE (query)) {
593 case GST_QUERY_DURATION:{
594 GstFormat bformat = GST_FORMAT_BYTES;
598 gst_query_parse_duration (query, &format, NULL);
599 if (!gst_pad_query_peer_duration (auparse->sinkpad, &bformat, &len)) {
600 GST_DEBUG_OBJECT (auparse, "failed to query upstream length");
603 GST_OBJECT_LOCK (auparse);
604 len -= auparse->offset;
605 GST_OBJECT_UNLOCK (auparse);
607 ret = gst_au_parse_src_convert (auparse, bformat, len, format, &val);
610 gst_query_set_duration (query, format, val);
614 case GST_QUERY_POSITION:{
615 GstFormat bformat = GST_FORMAT_BYTES;
619 gst_query_parse_position (query, &format, NULL);
620 if (!gst_pad_query_peer_position (auparse->sinkpad, &bformat, &pos)) {
621 GST_DEBUG_OBJECT (auparse, "failed to query upstream position");
624 GST_OBJECT_LOCK (auparse);
625 pos -= auparse->offset;
626 GST_OBJECT_UNLOCK (auparse);
628 ret = gst_au_parse_src_convert (auparse, GST_FORMAT_BYTES, pos,
632 gst_query_set_position (query, format, val);
636 case GST_QUERY_SEEKING:{
639 gst_query_parse_seeking (query, &format, NULL, NULL, NULL);
640 /* FIXME: query duration in 'format'
641 gst_query_set_seeking (query, format, TRUE, 0, duration);
643 gst_query_set_seeking (query, format, TRUE, 0, GST_CLOCK_TIME_NONE);
648 ret = gst_pad_query_default (pad, query);
652 gst_object_unref (auparse);
657 gst_au_parse_handle_seek (GstAuParse * auparse, GstEvent * event)
659 GstSeekType start_type, stop_type;
666 gst_event_parse_seek (event, &rate, &format, &flags, &start_type, &start,
669 if (format != GST_FORMAT_TIME) {
670 GST_DEBUG_OBJECT (auparse, "only support seeks in TIME format");
674 res = gst_au_parse_src_convert (auparse, GST_FORMAT_TIME, start,
675 GST_FORMAT_BYTES, &start);
678 res = gst_au_parse_src_convert (auparse, GST_FORMAT_TIME, stop,
679 GST_FORMAT_BYTES, &stop);
682 GST_INFO_OBJECT (auparse,
683 "seeking: %" G_GINT64_FORMAT " ... %" G_GINT64_FORMAT, start, stop);
685 event = gst_event_new_seek (rate, GST_FORMAT_BYTES, flags, start_type, start,
687 res = gst_pad_push_event (auparse->sinkpad, event);
692 gst_au_parse_sink_event (GstPad * pad, GstEvent * event)
697 auparse = GST_AU_PARSE (gst_pad_get_parent (pad));
699 switch (GST_EVENT_TYPE (event)) {
700 case GST_EVENT_NEWSEGMENT:
704 gint64 start, stop, time, offset = 0;
707 GstEvent *new_event = NULL;
709 gst_segment_init (&segment, GST_FORMAT_UNDEFINED);
710 gst_event_parse_new_segment_full (event, &update, &rate, &arate, &format,
711 &start, &stop, &time);
712 gst_segment_set_newsegment_full (&segment, update, rate, arate, format,
715 if (auparse->sample_size > 0) {
718 start -= auparse->offset;
719 start = MAX (start, 0);
722 stop -= auparse->offset;
723 stop = MAX (stop, 0);
725 gst_au_parse_src_convert (auparse, GST_FORMAT_BYTES, start,
726 GST_FORMAT_TIME, &start);
727 gst_au_parse_src_convert (auparse, GST_FORMAT_BYTES, stop,
728 GST_FORMAT_TIME, &stop);
731 if (auparse->srcpad) {
732 GST_INFO_OBJECT (auparse,
733 "new segment: %" GST_TIME_FORMAT " ... %" GST_TIME_FORMAT,
734 GST_TIME_ARGS (start), GST_TIME_ARGS (stop));
736 new_event = gst_event_new_new_segment_full (update, rate, arate,
737 GST_FORMAT_TIME, start, stop, start);
739 ret = gst_pad_push_event (auparse->srcpad, new_event);
742 auparse->buffer_offset = offset;
744 gst_event_unref (event);
748 ret = gst_pad_event_default (pad, event);
752 gst_object_unref (auparse);
757 gst_au_parse_src_event (GstPad * pad, GstEvent * event)
762 auparse = GST_AU_PARSE (gst_pad_get_parent (pad));
764 switch (GST_EVENT_TYPE (event)) {
766 ret = gst_au_parse_handle_seek (auparse, event);
769 ret = gst_pad_event_default (pad, event);
773 gst_object_unref (auparse);
777 static GstStateChangeReturn
778 gst_au_parse_change_state (GstElement * element, GstStateChange transition)
780 GstAuParse *auparse = GST_AU_PARSE (element);
781 GstStateChangeReturn ret = GST_STATE_CHANGE_SUCCESS;
783 ret = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition);
784 if (ret == GST_STATE_CHANGE_FAILURE)
787 switch (transition) {
788 case GST_STATE_CHANGE_PAUSED_TO_READY:
789 gst_au_parse_reset (auparse);
798 plugin_init (GstPlugin * plugin)
800 if (!gst_element_register (plugin, "auparse", GST_RANK_SECONDARY,
801 GST_TYPE_AU_PARSE)) {
808 GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
811 "parses au streams", plugin_init, VERSION, "LGPL", GST_PACKAGE_NAME,