summaryrefslogtreecommitdiffstats
path: root/ext/flac
diff options
context:
space:
mode:
authorThomas Vander Stichele <thomas@apestaart.org>2004-01-18 21:46:58 +0000
committerThomas Vander Stichele <thomas@apestaart.org>2004-01-18 21:46:58 +0000
commit3b0cf935f687c359319104d7b0dd7d73c90da6a9 (patch)
treefc4cb9722017426795998bce5cb783e6eaae0365 /ext/flac
parent272db0c22e45b45e88f11a52b793bab588a02534 (diff)
use new error signal and classification
Original commit message from CVS: use new error signal and classification
Diffstat (limited to 'ext/flac')
-rw-r--r--ext/flac/gstflacdec.c7
-rw-r--r--ext/flac/gstflacenc.c11
-rw-r--r--ext/flac/gstflactag.c10
3 files changed, 13 insertions, 15 deletions
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;
}
}