converted gst_element_error to new format in ext/ - gettext pending

Original commit message from CVS:
converted gst_element_error to new format in ext/ - gettext pending
This commit is contained in:
Benjamin Otte 2003-09-15 01:08:39 +00:00
parent 77a4320a04
commit 8817348af7
10 changed files with 45 additions and 20 deletions

View file

@ -489,8 +489,9 @@ gst_aasink_open (GstAASink *aasink)
aasink->context = aa_autoinit (&aasink->ascii_surf); aasink->context = aa_autoinit (&aasink->ascii_surf);
if (aasink->context == NULL) { if (aasink->context == NULL) {
gst_element_error (GST_ELEMENT (aasink), gst_element_gerror(GST_ELEMENT (aasink), GST_ERROR_UNKNOWN,
g_strdup("opening aalib context")); g_strdup ("unconverted error, file a bug"),
g_strdup ("opening aalib context"));
return FALSE; return FALSE;
} }
aa_autoinitkbd(aasink->context, 0); aa_autoinitkbd(aasink->context, 0);

View file

@ -798,7 +798,9 @@ gst_dvdec_loop (GstElement *element)
} }
/* oops list exhausted an nothing was found... */ /* oops list exhausted an nothing was found... */
if (!trylist) { if (!trylist) {
gst_element_error (element, "could not negotiate"); gst_element_gerror(element, GST_ERROR_UNKNOWN,
g_strdup ("unconverted error, file a bug"),
g_strdup_printf("could not negotiate"));
return; return;
} }
} }

View file

@ -266,7 +266,9 @@ gst_esdmon_get (GstPad *pad)
"channels", GST_PROPS_INT (esdmon->channels) "channels", GST_PROPS_INT (esdmon->channels)
)) <= 0) )) <= 0)
{ {
gst_element_error (GST_ELEMENT (esdmon), "could not set caps"); gst_element_gerror(GST_ELEMENT (esdmon), GST_ERROR_UNKNOWN,
g_strdup ("unconverted error, file a bug"),
g_strdup_printf("could not set caps"));
return NULL; return NULL;
} }
} }

View file

@ -266,7 +266,9 @@ gst_esdsink_chain (GstPad *pad, GstBuffer *buf)
esdsink = GST_ESDSINK (gst_pad_get_parent (pad)); esdsink = GST_ESDSINK (gst_pad_get_parent (pad));
if (!esdsink->negotiated) { if (!esdsink->negotiated) {
gst_element_error (GST_ELEMENT (esdsink), "not negotiated"); gst_element_gerror(GST_ELEMENT (esdsink), GST_ERROR_UNKNOWN,
g_strdup ("unconverted error, file a bug"),
g_strdup_printf("not negotiated"));
goto done; goto done;
} }

View file

@ -291,7 +291,9 @@ gst_flacdec_error_callback (const FLAC__SeekableStreamDecoder *decoder,
GST_DEBUG (error); GST_DEBUG (error);
gst_element_error (GST_ELEMENT (flacdec), error); gst_element_gerror(GST_ELEMENT (flacdec), GST_ERROR_UNKNOWN,
g_strdup ("unconverted error, file a bug"),
g_strdup_printf(error));
} }
static FLAC__SeekableStreamDecoderSeekStatus static FLAC__SeekableStreamDecoderSeekStatus

View file

@ -512,8 +512,9 @@ gst_flacenc_chain (GstPad *pad, GstBuffer *buf)
} }
if (!flacenc->negotiated) { if (!flacenc->negotiated) {
gst_element_error (GST_ELEMENT (flacenc), gst_element_gerror(GST_ELEMENT (flacenc), GST_ERROR_UNKNOWN,
"format not negotiated"); g_strdup ("unconverted error, file a bug"),
g_strdup_printf("format not negotiated"));
return; return;
} }
@ -530,8 +531,9 @@ gst_flacenc_chain (GstPad *pad, GstBuffer *buf)
gst_flacenc_set_metadata (flacenc, flacenc->metadata); gst_flacenc_set_metadata (flacenc, flacenc->metadata);
state = FLAC__seekable_stream_encoder_init (flacenc->encoder); state = FLAC__seekable_stream_encoder_init (flacenc->encoder);
if (state != FLAC__STREAM_ENCODER_OK) { if (state != FLAC__STREAM_ENCODER_OK) {
gst_element_error (GST_ELEMENT (flacenc), gst_element_gerror(GST_ELEMENT (flacenc), GST_ERROR_UNKNOWN,
"could not initialize encoder (wrong parameters?)"); g_strdup ("unconverted error, file a bug"),
g_strdup_printf("could not initialize encoder (wrong parameters?)"));
return; return;
} }
} }
@ -565,8 +567,9 @@ gst_flacenc_chain (GstPad *pad, GstBuffer *buf)
flacenc->data = NULL; flacenc->data = NULL;
if (!res) { if (!res) {
gst_element_error (GST_ELEMENT (flacenc), gst_element_gerror(GST_ELEMENT (flacenc), GST_ERROR_UNKNOWN,
"encoding error"); g_strdup ("unconverted error, file a bug"),
g_strdup_printf ("encoding error"));
} }
} }

View file

@ -701,7 +701,9 @@ gst_ladspa_loop (GstElement *element)
} }
if (!ladspa->bufpool) { if (!ladspa->bufpool) {
gst_element_error (element, "Caps were never set, bailing..."); gst_element_gerror(element, "Caps were never set, GST_ERROR_UNKNOWN,
g_strdup ("unconverted error, file a bug"),
g_strdup_printf(bailing..."));
return; return;
} }
@ -791,7 +793,9 @@ gst_ladspa_chain (GstPad *pad, GstBuffer *buffer_in)
g_return_if_fail (GST_IS_BUFFER (buffer_in)); g_return_if_fail (GST_IS_BUFFER (buffer_in));
if (!ladspa->bufpool) { if (!ladspa->bufpool) {
gst_element_error ((GstElement*)ladspa, "Caps were never set, bailing..."); gst_element_gerror((GstElement*)ladspa, "Caps were never set, GST_ERROR_UNKNOWN,
g_strdup ("unconverted error, file a bug"),
g_strdup_printf(bailing..."));
return; return;
} }

View file

@ -310,8 +310,9 @@ gst_mikmod_loop (GstElement *element)
if (!GST_PAD_CAPS (mikmod->srcpad)) { if (!GST_PAD_CAPS (mikmod->srcpad)) {
if (gst_mikmod_negotiate (mikmod) <= 0) { if (gst_mikmod_negotiate (mikmod) <= 0) {
gst_element_error (GST_ELEMENT (mikmod), gst_element_gerror(GST_ELEMENT (mikmod), GST_ERROR_UNKNOWN,
"Failed to negotiate with next element in mikmod"); g_strdup ("unconverted error, file a bug"),
g_strdup_printf("Failed to negotiate with next element in mikmod"));
return; return;
} }
} }

View file

@ -232,7 +232,9 @@ int gst_dv1394src_iso_receive(raw1394handle_t handle,int channel,size_t len,quad
"format", GST_PROPS_STRING("PAL"), "format", GST_PROPS_STRING("PAL"),
NULL) NULL)
) <= 0) { ) <= 0) {
gst_element_error (GST_ELEMENT(dv1394src), "Could not set source caps for PAL"); gst_element_gerror(GST_ELEMENT(dv1394src), GST_ERROR_UNKNOWN,
g_strdup ("unconverted error, file a bug"),
g_strdup_printf("Could not set source caps for PAL"));
return 0; return 0;
} }
} else { } else {
@ -244,14 +246,18 @@ int gst_dv1394src_iso_receive(raw1394handle_t handle,int channel,size_t len,quad
"format", GST_PROPS_STRING ("NTSC"), "format", GST_PROPS_STRING ("NTSC"),
NULL) NULL)
) <= 0) { ) <= 0) {
gst_element_error (GST_ELEMENT(dv1394src), "Could not set source caps for NTSC"); gst_element_gerror(GST_ELEMENT(dv1394src), GST_ERROR_UNKNOWN,
g_strdup ("unconverted error, file a bug"),
g_strdup_printf("Could not set source caps for NTSC"));
return 0; return 0;
} }
} }
dv1394src->pool = gst_buffer_pool_get_default( dv1394src->frameSize, N_BUFFERS_IN_POOL ); dv1394src->pool = gst_buffer_pool_get_default( dv1394src->frameSize, N_BUFFERS_IN_POOL );
if (dv1394src->pool == NULL) { if (dv1394src->pool == NULL) {
gst_element_error (GST_ELEMENT(dv1394src), "gst_buffer_pool_get_default returned NULL"); gst_element_gerror(GST_ELEMENT(dv1394src), GST_ERROR_UNKNOWN,
g_strdup ("unconverted error, file a bug"),
g_strdup_printf("gst_buffer_pool_get_default returned NULL"));
} }
} }

View file

@ -176,7 +176,9 @@ gst_speexenc_chain (GstPad *pad, GstBuffer *buf)
"channels", GST_PROPS_INT (1) "channels", GST_PROPS_INT (1)
))) )))
{ {
gst_element_error (GST_ELEMENT (speexenc), "could not negotiate"); gst_element_gerror(GST_ELEMENT (speexenc), GST_ERROR_UNKNOWN,
g_strdup ("unconverted error, file a bug"),
g_strdup_printf("could not negotiate"));
return; return;
} }
} }