diff options
author | Thomas Vander Stichele <thomas@apestaart.org> | 2004-01-18 21:46:58 +0000 |
---|---|---|
committer | Thomas Vander Stichele <thomas@apestaart.org> | 2004-01-18 21:46:58 +0000 |
commit | 3b0cf935f687c359319104d7b0dd7d73c90da6a9 (patch) | |
tree | fc4cb9722017426795998bce5cb783e6eaae0365 /ext | |
parent | 272db0c22e45b45e88f11a52b793bab588a02534 (diff) |
use new error signal and classification
Original commit message from CVS:
use new error signal and classification
Diffstat (limited to 'ext')
-rw-r--r-- | ext/aalib/gstaasink.c | 4 | ||||
-rw-r--r-- | ext/dv/gstdvdec.c | 2 | ||||
-rw-r--r-- | ext/esd/esdmon.c | 2 | ||||
-rw-r--r-- | ext/esd/esdsink.c | 3 | ||||
-rw-r--r-- | ext/flac/gstflacdec.c | 7 | ||||
-rw-r--r-- | ext/flac/gstflacenc.c | 11 | ||||
-rw-r--r-- | ext/flac/gstflactag.c | 10 | ||||
-rw-r--r-- | ext/gdk_pixbuf/gstgdkpixbuf.c | 9 | ||||
-rw-r--r-- | ext/mikmod/gstmikmod.c | 3 | ||||
-rw-r--r-- | ext/raw1394/gstdv1394src.c | 4 | ||||
-rw-r--r-- | ext/speex/gstspeexenc.c | 2 |
11 files changed, 27 insertions, 30 deletions
diff --git a/ext/aalib/gstaasink.c b/ext/aalib/gstaasink.c index 521bb713..fae02455 100644 --- a/ext/aalib/gstaasink.c +++ b/ext/aalib/gstaasink.c @@ -490,8 +490,8 @@ gst_aasink_open (GstAASink *aasink) aasink->context = aa_autoinit (&aasink->ascii_surf); if (aasink->context == NULL) { - gst_element_error (GST_ELEMENT (aasink), - g_strdup("opening aalib context")); + gst_element_error (GST_ELEMENT (aasink), LIBRARY, TOO_LAZY, NULL, + ("error opening aalib context")); return FALSE; } aa_autoinitkbd(aasink->context, 0); diff --git a/ext/dv/gstdvdec.c b/ext/dv/gstdvdec.c index dfd48c13..20b2bf8a 100644 --- a/ext/dv/gstdvdec.c +++ b/ext/dv/gstdvdec.c @@ -783,7 +783,7 @@ gst_dvdec_loop (GstElement *element) dvdec->bpp = 2; } } else { - gst_element_error (element, "could not negotiate"); + gst_element_error (element, CORE, NEGOTIATION, NULL, NULL); return; } } diff --git a/ext/esd/esdmon.c b/ext/esd/esdmon.c index 394220e4..d728a885 100644 --- a/ext/esd/esdmon.c +++ b/ext/esd/esdmon.c @@ -267,7 +267,7 @@ gst_esdmon_get (GstPad *pad) "channels", G_TYPE_INT, esdmon->channels )) <= 0) { - gst_element_error (GST_ELEMENT (esdmon), "could not set caps"); + gst_element_error (esdmon, CORE, NEGOTIATION, NULL, NULL); return NULL; } } diff --git a/ext/esd/esdsink.c b/ext/esd/esdsink.c index f02d3875..a66be1a8 100644 --- a/ext/esd/esdsink.c +++ b/ext/esd/esdsink.c @@ -265,7 +265,8 @@ gst_esdsink_chain (GstPad *pad, GstData *_data) esdsink = GST_ESDSINK (gst_pad_get_parent (pad)); if (!esdsink->negotiated) { - gst_element_error (GST_ELEMENT (esdsink), "not negotiated"); + gst_element_error (esdsink, CORE, NEGOTIATION, NULL, + ("element wasn't negotiated before chain function")); goto done; } diff --git a/ext/flac/gstflacdec.c b/ext/flac/gstflacdec.c index 9b0fb5e7..17a4dda6 100644 --- a/ext/flac/gstflacdec.c +++ b/ext/flac/gstflacdec.c @@ -305,9 +305,7 @@ gst_flacdec_error_callback (const FLAC__SeekableStreamDecoder *decoder, break; } - GST_DEBUG (error); - - gst_element_error (GST_ELEMENT (flacdec), error); + gst_element_error (flacdec, STREAM, DECODE, NULL, (error)); } static FLAC__SeekableStreamDecoderSeekStatus @@ -537,7 +535,8 @@ gst_flacdec_loop (GstElement *element) GST_DEBUG ("flacdec: initializing decoder"); res = FLAC__seekable_stream_decoder_init (flacdec->decoder); if (res != FLAC__SEEKABLE_STREAM_DECODER_OK) { - gst_element_error (GST_ELEMENT (flacdec), FLAC__SeekableStreamDecoderStateString[res]); + gst_element_error (flacdec, LIBRARY, INIT, NULL, + (FLAC__SeekableStreamDecoderStateString[res])); return; } /* FLAC__seekable_stream_decoder_process_metadata (flacdec->decoder);*/ diff --git a/ext/flac/gstflacenc.c b/ext/flac/gstflacenc.c index 4d5e19a5..d8bfe509 100644 --- a/ext/flac/gstflacenc.c +++ b/ext/flac/gstflacenc.c @@ -549,8 +549,8 @@ gst_flacenc_chain (GstPad *pad, GstData *_data) } if (!flacenc->negotiated) { - gst_element_error (GST_ELEMENT (flacenc), - "format not negotiated"); + gst_element_error (flacenc, CORE, NEGOTIATION, NULL, + ("format wasn't negotiated before chain function")); return; } @@ -575,8 +575,8 @@ gst_flacenc_chain (GstPad *pad, GstData *_data) gst_flacenc_set_metadata (flacenc); state = FLAC__seekable_stream_encoder_init (flacenc->encoder); if (state != FLAC__STREAM_ENCODER_OK) { - gst_element_error (GST_ELEMENT (flacenc), - "could not initialize encoder (wrong parameters?)"); + gst_element_error (flacenc, LIBRARY, INIT, NULL, + ("could not initialize encoder (wrong parameters?)")); return; } } @@ -610,8 +610,7 @@ gst_flacenc_chain (GstPad *pad, GstData *_data) flacenc->data = NULL; if (!res) { - gst_element_error (GST_ELEMENT (flacenc), - "encoding error"); + gst_element_error (flacenc, STREAM, ENCODE, NULL, NULL); } } diff --git a/ext/flac/gstflactag.c b/ext/flac/gstflactag.c index 5a155f24..ac0704b8 100644 --- a/ext/flac/gstflactag.c +++ b/ext/flac/gstflactag.c @@ -295,7 +295,7 @@ gst_flac_tag_chain (GstPad *pad, GstData *data) gst_buffer_unref (sub); } else { /* FIXME: does that work well with FLAC files containing ID3v2 tags ? */ - gst_element_error (GST_ELEMENT (tag), "Not a flac stream\n"); + gst_element_error (tag, STREAM, WRONG_TYPE, NULL, NULL); } } @@ -464,8 +464,8 @@ gst_flac_tag_chain (GstPad *pad, GstData *data) g_warning ("No tags found\n"); buffer = gst_buffer_new_and_alloc (12); if (buffer == NULL) { - gst_element_error (GST_ELEMENT (tag), - "Error creating padding block\n"); + gst_element_error (tag, CORE, TOO_LAZY, NULL, + ("Error creating 12-byte buffer for padding block")); } bzero (GST_BUFFER_DATA (buffer), GST_BUFFER_SIZE (buffer)); GST_BUFFER_DATA (buffer)[0] = 0x81; /* 0x80 = Last metadata block, @@ -481,7 +481,7 @@ gst_flac_tag_chain (GstPad *pad, GstData *data) sizeof (header), NULL); gst_tag_list_free (merged_tags); if (buffer == NULL) { - gst_element_error (GST_ELEMENT (tag), "Error filling vorbis comments\n"); + gst_element_error (tag, CORE, TAG, NULL, ("Error converting tag list to vorbiscomment buffer")); return; } size = GST_BUFFER_SIZE (buffer) - 4; @@ -490,7 +490,7 @@ gst_flac_tag_chain (GstPad *pad, GstData *data) * while the vorbis specs allow more than that. Shouldn't * be a real world problem though */ - gst_element_error (GST_ELEMENT (tag), "Vorbis comment too long\n"); + gst_element_error (tag, CORE, TAG, NULL, ("Vorbis comment of size %d too long", size)); return; } } diff --git a/ext/gdk_pixbuf/gstgdkpixbuf.c b/ext/gdk_pixbuf/gstgdkpixbuf.c index 05821887..48ba463f 100644 --- a/ext/gdk_pixbuf/gstgdkpixbuf.c +++ b/ext/gdk_pixbuf/gstgdkpixbuf.c @@ -285,14 +285,13 @@ gst_gdk_pixbuf_chain (GstPad *pad, GstData *_data) if (filter->pixbuf_loader != NULL) { GstBuffer *outbuf; GdkPixbuf *pixbuf; + GError *error; - gdk_pixbuf_loader_close (filter->pixbuf_loader, NULL); -#if 0 - if (gdk_pixbuf_loader_close (filter->pixbuf_loader, NULL)) { - gst_element_error (GST_ELEMENT(filter), "error"); + if (gdk_pixbuf_loader_close (filter->pixbuf_loader, &error)) { + gst_element_error (filter, LIBRARY, SHUTDOWN, NULL, (error->message)); + g_error_free (error); return; } -#endif pixbuf = gdk_pixbuf_loader_get_pixbuf (filter->pixbuf_loader); diff --git a/ext/mikmod/gstmikmod.c b/ext/mikmod/gstmikmod.c index 7720fbee..73eee2e4 100644 --- a/ext/mikmod/gstmikmod.c +++ b/ext/mikmod/gstmikmod.c @@ -294,8 +294,7 @@ gst_mikmod_loop (GstElement *element) if (!GST_PAD_CAPS (mikmod->srcpad)) { if (gst_mikmod_negotiate (mikmod) <= 0) { - gst_element_error (GST_ELEMENT (mikmod), - "Failed to negotiate with next element in mikmod"); + gst_element_error (mikmod, CORE, NEGOTIATION, NULL, NULL); return; } } diff --git a/ext/raw1394/gstdv1394src.c b/ext/raw1394/gstdv1394src.c index 0bf5c83b..1d8a58cb 100644 --- a/ext/raw1394/gstdv1394src.c +++ b/ext/raw1394/gstdv1394src.c @@ -250,7 +250,7 @@ int gst_dv1394src_iso_receive(raw1394handle_t handle,int channel,size_t len,quad if (gst_pad_try_set_caps (dv1394src->srcpad, gst_caps_new_simple ("video/dv", "format", G_TYPE_STRING, "PAL", NULL)) <= 0) { - gst_element_error (GST_ELEMENT(dv1394src), "Could not set source caps for PAL"); + gst_element_error (dv1394src, CORE, NEGOTIATION, NULL, ("Could not set source caps for PAL")); return 0; } } else { @@ -260,7 +260,7 @@ int gst_dv1394src_iso_receive(raw1394handle_t handle,int channel,size_t len,quad if (gst_pad_try_set_caps (dv1394src->srcpad, gst_caps_new_simple ("video/dv", "format", G_TYPE_STRING, "NTSC", NULL)) <= 0) { - gst_element_error (GST_ELEMENT(dv1394src), "Could not set source caps for NTSC"); + gst_element_error (dv1394src, CORE, NEGOTIATION, NULL, ("Could not set source caps for NTSC")); return 0; } } diff --git a/ext/speex/gstspeexenc.c b/ext/speex/gstspeexenc.c index 14cee352..fac2fcc2 100644 --- a/ext/speex/gstspeexenc.c +++ b/ext/speex/gstspeexenc.c @@ -210,7 +210,7 @@ gst_speexenc_chain (GstPad *pad, GstData *_data) "channels", G_TYPE_INT, 1, NULL))) { - gst_element_error (GST_ELEMENT (speexenc), "could not negotiate"); + gst_element_error (speexenc, CORE, NEGOTIATION, NULL, NULL); return; } } |