From 629fb234a0515247c11085a0c63f6e5f57426a97 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Thu, 30 Mar 2006 15:37:05 +0000 Subject: better/unified long descriptions Original commit message from CVS: * ext/aalib/gstaasink.c: * ext/annodex/gstcmmldec.c: * ext/annodex/gstcmmlenc.c: * ext/cairo/gsttextoverlay.c: * ext/cairo/gsttimeoverlay.c: * ext/cdio/gstcdiocddasrc.c: * ext/dv/gstdvdec.c: * ext/esd/esdmon.c: * ext/esd/esdsink.c: * ext/flac/gstflacdec.c: * ext/flac/gstflacenc.c: * ext/flac/gstflactag.c: * ext/gconf/gstgconfaudiosink.c: (gst_gconf_audio_sink_base_init): * ext/gconf/gstgconfaudiosrc.c: (gst_gconf_audio_src_base_init): * ext/gconf/gstgconfvideosink.c: (gst_gconf_video_sink_base_init): * ext/gconf/gstgconfvideosrc.c: (gst_gconf_video_src_base_init): * ext/gdk_pixbuf/gstgdkpixbuf.c: * ext/gdk_pixbuf/pixbufscale.c: * ext/hal/gsthalaudiosink.c: (gst_hal_audio_sink_base_init): * ext/hal/gsthalaudiosrc.c: (gst_hal_audio_src_base_init): * ext/jpeg/gstjpegdec.c: * ext/jpeg/gstjpegenc.c: * ext/jpeg/gstsmokedec.c: * ext/jpeg/gstsmokeenc.c: * ext/libcaca/gstcacasink.c: * ext/libmng/gstmngdec.c: * ext/libmng/gstmngenc.c: * ext/libpng/gstpngdec.c: * ext/libpng/gstpngenc.c: * ext/mikmod/gstmikmod.c: * ext/raw1394/gstdv1394src.c: * ext/shout2/gstshout2.c: * ext/speex/gstspeexdec.c: * ext/speex/gstspeexenc.c: * gst/alpha/gstalpha.c: * gst/alpha/gstalphacolor.c: * gst/auparse/gstauparse.c: * gst/autodetect/gstautoaudiosink.c: (gst_auto_audio_sink_base_init): * gst/autodetect/gstautovideosink.c: (gst_auto_video_sink_base_init): * gst/avi/gstavimux.c: (gst_avimux_base_init): * gst/cutter/gstcutter.c: * gst/debug/breakmydata.c: * gst/debug/efence.c: * gst/debug/gstnavigationtest.c: * gst/debug/negotiation.c: * gst/debug/progressreport.c: * gst/debug/testplugin.c: * gst/effectv/gstaging.c: * gst/effectv/gstdice.c: * gst/effectv/gstedge.c: * gst/effectv/gstquark.c: * gst/effectv/gstrev.c: * gst/effectv/gstvertigo.c: * gst/effectv/gstwarp.c: * gst/flx/gstflxdec.c: * gst/goom/gstgoom.c: * gst/interleave/deinterleave.c: * gst/interleave/interleave.c: * gst/law/alaw-decode.c: (gst_alawdec_base_init): * gst/law/alaw-encode.c: (gst_alawenc_base_init): * gst/law/mulaw-decode.c: (gst_mulawdec_base_init): * gst/law/mulaw-encode.c: (gst_mulawenc_base_init): * gst/level/gstlevel.c: * gst/matroska/matroska-demux.c: (gst_matroska_demux_base_init): * gst/matroska/matroska-mux.c: (gst_matroska_mux_base_init): * gst/median/gstmedian.c: * gst/monoscope/gstmonoscope.c: * gst/multipart/multipartdemux.c: * gst/multipart/multipartmux.c: * gst/oldcore/gstmd5sink.c: * gst/oldcore/gstmultifilesrc.c: * gst/oldcore/gstpipefilter.c: * gst/oldcore/gstshaper.c: * gst/oldcore/gststatistics.c: * gst/rtp/gstasteriskh263.c: * gst/rtp/gstrtpL16depay.c: * gst/rtp/gstrtpL16pay.c: * gst/rtp/gstrtpamrdepay.c: * gst/rtp/gstrtpamrpay.c: * gst/rtp/gstrtpdepay.c: * gst/rtp/gstrtpgsmpay.c: * gst/rtp/gstrtph263pay.c: * gst/rtp/gstrtph263pdepay.c: * gst/rtp/gstrtph263ppay.c: * gst/rtp/gstrtpmp4gpay.c: * gst/rtp/gstrtpmp4vdepay.c: * gst/rtp/gstrtpmp4vpay.c: * gst/rtp/gstrtpmpadepay.c: * gst/rtp/gstrtpmpapay.c: * gst/rtp/gstrtppcmadepay.c: * gst/rtp/gstrtppcmapay.c: * gst/rtp/gstrtppcmudepay.c: * gst/rtp/gstrtppcmupay.c: * gst/rtp/gstrtpspeexdepay.c: * gst/rtp/gstrtpspeexpay.c: * gst/rtsp/gstrtpdec.c: * gst/smpte/gstsmpte.c: * gst/videobox/gstvideobox.c: * gst/videofilter/gstgamma.c: (gst_gamma_base_init): * gst/videofilter/gstvideobalance.c: * gst/videofilter/gstvideoflip.c: * gst/videofilter/gstvideotemplate.c: (gst_videotemplate_base_init): * gst/videomixer/videomixer.c: * gst/wavenc/gstwavenc.c: * gst/wavparse/gstwavparse.c: (gst_wavparse_base_init): better/unified long descriptions Fixed #336602 Some cleanups to auparse, don't send multiple newsegments. --- gst/auparse/gstauparse.c | 47 +++++++++++++++++++++++++++++++---------------- 1 file changed, 31 insertions(+), 16 deletions(-) (limited to 'gst/auparse') diff --git a/gst/auparse/gstauparse.c b/gst/auparse/gstauparse.c index 018ee500..ba03538f 100644 --- a/gst/auparse/gstauparse.c +++ b/gst/auparse/gstauparse.c @@ -34,7 +34,7 @@ /* elementfactory information */ static GstElementDetails gst_au_parse_details = -GST_ELEMENT_DETAILS (".au parser", +GST_ELEMENT_DETAILS ("AU audio demuxer", "Codec/Demuxer/Audio", "Parse an .au file into raw audio", "Erik Walthinsen "); @@ -113,8 +113,8 @@ gst_au_parse_init (GstAuParse * auparse, GstAuParseClass * klass) { auparse->sinkpad = gst_pad_new_from_static_template (&gst_au_parse_sink_template, "sink"); - gst_element_add_pad (GST_ELEMENT (auparse), auparse->sinkpad); gst_pad_set_chain_function (auparse->sinkpad, gst_au_parse_chain); + gst_element_add_pad (GST_ELEMENT (auparse), auparse->sinkpad); auparse->srcpad = gst_pad_new_from_static_template (&gst_au_parse_src_template, "src"); @@ -153,7 +153,6 @@ gst_au_parse_chain (GstPad * pad, GstBuffer * buf) gint law = 0, depth = 0, ieee = 0; gchar layout[7]; GstBuffer *databuf; - GstEvent *event; layout[0] = 0; @@ -168,6 +167,8 @@ gst_au_parse_chain (GstPad * pad, GstBuffer * buf) if (auparse->size == 0) { guint32 *head = (guint32 *) data; + /* FIXME, check if we have enough data (with adapter?) instead of + * crashing. */ /* normal format is big endian (au is a Sparc format) */ if (GST_READ_UINT32_BE (head) == 0x2e736e64) { /* ".snd" */ head++; @@ -202,10 +203,7 @@ gst_au_parse_chain (GstPad * pad, GstBuffer * buf) head++; } else { - GST_ELEMENT_ERROR (auparse, STREAM, WRONG_TYPE, (NULL), (NULL)); - gst_buffer_unref (buf); - gst_object_unref (auparse); - return GST_FLOW_ERROR; + goto unknown_header; } GST_DEBUG @@ -289,10 +287,7 @@ Samples : case 22: /* Music kit DSP commands samples */ default: - GST_ELEMENT_ERROR (auparse, STREAM, FORMAT, (NULL), (NULL)); - gst_buffer_unref (buf); - gst_object_unref (auparse); - return GST_FLOW_ERROR; + goto unknown_format; } if (law) { @@ -324,14 +319,18 @@ Samples : auparse->sample_size = auparse->channels * depth / 8; } - gst_pad_use_fixed_caps (auparse->srcpad); gst_pad_set_caps (auparse->srcpad, tempcaps); - gst_pad_set_active (auparse->srcpad, TRUE); - event = gst_event_new_new_segment (FALSE, 1.0, GST_FORMAT_DEFAULT, - 0, GST_CLOCK_TIME_NONE, 0); +#if 0 + { + GstEvent *event; + + event = gst_event_new_new_segment (FALSE, 1.0, GST_FORMAT_DEFAULT, + 0, GST_CLOCK_TIME_NONE, 0); - gst_pad_push_event (auparse->srcpad, event); + gst_pad_push_event (auparse->srcpad, event); + } +#endif databuf = gst_buffer_create_sub (buf, auparse->offset, size - auparse->offset); @@ -381,6 +380,22 @@ Samples : gst_object_unref (auparse); return ret; + + /* ERRORS */ +unknown_header: + { + GST_ELEMENT_ERROR (auparse, STREAM, WRONG_TYPE, (NULL), (NULL)); + gst_buffer_unref (buf); + gst_object_unref (auparse); + return GST_FLOW_ERROR; + } +unknown_format: + { + GST_ELEMENT_ERROR (auparse, STREAM, FORMAT, (NULL), (NULL)); + gst_buffer_unref (buf); + gst_object_unref (auparse); + return GST_FLOW_ERROR; + } } static GstStateChangeReturn -- cgit