summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ext/audiofile/gstafsink.c12
-rw-r--r--ext/audiofile/gstafsrc.c15
-rw-r--r--ext/divx/gstdivxdec.c26
-rw-r--r--ext/divx/gstdivxenc.c14
-rw-r--r--ext/ivorbis/vorbisfile.c8
-rw-r--r--ext/ladspa/gstladspa.c8
-rw-r--r--ext/lcs/gstcolorspace.c4
-rw-r--r--ext/sdl/sdlvideosink.c35
-rw-r--r--ext/sndfile/gstsf.c42
-rw-r--r--ext/tarkin/gsttarkindec.c8
-rw-r--r--ext/tarkin/gsttarkinenc.c4
-rw-r--r--ext/xvid/gstxviddec.c19
-rw-r--r--ext/xvid/gstxvidenc.c14
-rw-r--r--gst/chart/gstchart.c5
-rw-r--r--gst/flx/gstflxdec.c4
-rw-r--r--gst/modplug/gstmodplug.cc4
-rw-r--r--gst/mpeg1videoparse/gstmp1videoparse.c5
-rw-r--r--gst/mpegaudioparse/gstmpegaudioparse.c5
-rw-r--r--gst/overlay/gstoverlay.c4
-rw-r--r--gst/smpte/gstsmpte.c4
-rw-r--r--gst/speed/gstspeed.c4
-rw-r--r--gst/videocrop/gstvideocrop.c4
22 files changed, 90 insertions, 158 deletions
diff --git a/ext/audiofile/gstafsink.c b/ext/audiofile/gstafsink.c
index 3e27adbf..3392717c 100644
--- a/ext/audiofile/gstafsink.c
+++ b/ext/audiofile/gstafsink.c
@@ -294,9 +294,7 @@ gst_afsink_open_file (GstAFSink *sink)
sink->file = fopen (sink->filename, "w");
if (sink->file == NULL) {
perror ("open");
- gst_element_gerror(GST_ELEMENT (sink), g_strconcat("opening file \"", sink->filename, "\"", GST_ERROR_UNKNOWN,
- g_strdup ("unconverted error, file a bug"),
- g_strdup_printf(NULL)));
+ gst_element_error (GST_ELEMENT (sink), g_strconcat("opening file \"", sink->filename, "\"", NULL));
return FALSE;
}
*/
@@ -353,9 +351,7 @@ gst_afsink_open_file (GstAFSink *sink)
if (sink->file == AF_NULL_FILEHANDLE)
{
perror ("open");
- gst_element_gerror(GST_ELEMENT (sink), GST_ERROR_UNKNOWN,
- g_strdup ("unconverted error, file a bug"),
- g_strdup_printf("error openning file %s", sink->filename));
+ gst_element_error (GST_ELEMENT (sink), g_strconcat("opening file \"", sink->filename, "\"", NULL));
return FALSE;
}
@@ -378,9 +374,7 @@ gst_afsink_close_file (GstAFSink *sink)
{
g_print ("WARNING: afsink: oops, error closing !\n");
perror ("close");
- gst_element_gerror(GST_ELEMENT (sink), GST_ERROR_UNKNOWN,
- g_strdup ("unconverted error, file a bug"),
- g_strdup_printf("error closing file %s", sink->filename));
+ gst_element_error (GST_ELEMENT (sink), g_strconcat("closing file \"", sink->filename, "\"", NULL));
}
else {
GST_FLAG_UNSET (sink, GST_AFSINK_OPEN);
diff --git a/ext/audiofile/gstafsrc.c b/ext/audiofile/gstafsrc.c
index 71b85294..2b817310 100644
--- a/ext/audiofile/gstafsrc.c
+++ b/ext/audiofile/gstafsrc.c
@@ -306,9 +306,8 @@ gst_afsrc_open_file (GstAFSrc *src)
{
g_print ("ERROR: gstafsrc: Could not open file %s for reading\n",
src->filename);
- gst_element_gerror(GST_ELEMENT (src), GST_ERROR_UNKNOWN,
- g_strdup ("unconverted error, file a bug"),
- g_strdup_printf ("error opening file %s", src->filename));
+ gst_element_error (GST_ELEMENT (src), g_strconcat ("opening file \"",
+ src->filename, "\"", NULL));
return FALSE;
}
@@ -328,11 +327,13 @@ gst_afsrc_open_file (GstAFSrc *src)
break;
case AF_SAMPFMT_FLOAT:
case AF_SAMPFMT_DOUBLE:
- GST_DEBUG ("ERROR: float data not supported yet !\n");
+ GST_DEBUG (
+ "ERROR: float data not supported yet !\n");
}
src->rate = (guint) afGetRate (src->file, AF_DEFAULT_TRACK);
src->width = sampleWidth;
- GST_DEBUG ("input file: %d channels, %d width, %d rate, signed %s\n",
+ GST_DEBUG (
+ "input file: %d channels, %d width, %d rate, signed %s\n",
src->channels, src->width, src->rate,
src->is_signed ? "yes" : "no");
}
@@ -368,9 +369,7 @@ gst_afsrc_close_file (GstAFSrc *src)
{
g_print ("WARNING: afsrc: oops, error closing !\n");
perror ("close");
- gst_element_gerror(GST_ELEMENT (src), GST_ERROR_UNKNOWN,
- g_strdup ("unconverted error, file a bug"),
- g_strdup_printf("error closing file %s", src->filename));
+ gst_element_error (GST_ELEMENT (src), g_strconcat("closing file \"", src->filename, "\"", NULL));
}
else {
GST_FLAG_UNSET (src, GST_AFSRC_OPEN);
diff --git a/ext/divx/gstdivxdec.c b/ext/divx/gstdivxdec.c
index 173ee75c..011836f9 100644
--- a/ext/divx/gstdivxdec.c
+++ b/ext/divx/gstdivxdec.c
@@ -221,10 +221,9 @@ gst_divxdec_setup (GstDivxDec *divxdec)
/* initialize the handle */
memset(&xinit, 0, sizeof(DEC_INIT));
if ((ret = decore(&handle, DEC_OPT_INIT, &xinit, NULL)) != 0) {
- gst_element_gerror(GST_ELEMENT(divxdec), GST_ERROR_UNKNOWN,
- g_strdup ("unconverted error, file a bug"),
- g_strdup_printf("Error initializing divx decoding library: %s (%d)",
- gst_divxdec_error(ret), ret));
+ gst_element_error(GST_ELEMENT(divxdec),
+ "Error initializing divx decoding library: %s (%d)",
+ gst_divxdec_error(ret), ret);
return FALSE;
}
@@ -241,10 +240,9 @@ gst_divxdec_setup (GstDivxDec *divxdec)
if ((ret = decore(divxdec->handle, DEC_OPT_SETOUT,
&output, NULL)) != 0) {
- gst_element_gerror(GST_ELEMENT(divxdec), GST_ERROR_UNKNOWN,
- g_strdup ("unconverted error, file a bug"),
- g_strdup_printf("Error setting output format: %s (%d)",
- gst_divxdec_error(ret), ret));
+ gst_element_error(GST_ELEMENT(divxdec),
+ "Error setting output format: %s (%d)",
+ gst_divxdec_error(ret), ret);
gst_divxdec_unset(divxdec);
return FALSE;
}
@@ -279,9 +277,8 @@ gst_divxdec_chain (GstPad *pad,
if (!divxdec->handle) {
if (gst_divxdec_negotiate(divxdec) <= 0) {
- gst_element_gerror(GST_ELEMENT(divxdec), GST_ERROR_UNKNOWN,
- g_strdup ("unconverted error, file a bug"),
- g_strdup_printf("No format set - aborting"));
+ gst_element_error(GST_ELEMENT(divxdec),
+ "No format set - aborting");
gst_buffer_unref(buf);
return;
}
@@ -304,10 +301,9 @@ gst_divxdec_chain (GstPad *pad,
if ((ret = decore(divxdec->handle, DEC_OPT_FRAME,
&xframe, NULL))) {
- gst_element_gerror(GST_ELEMENT(divxdec), GST_ERROR_UNKNOWN,
- g_strdup ("unconverted error, file a bug"),
- g_strdup_printf("Error decoding divx frame: %s (%d)",
- gst_divxdec_error(ret), ret));
+ gst_element_error(GST_ELEMENT(divxdec),
+ "Error decoding divx frame: %s (%d)",
+ gst_divxdec_error(ret), ret);
gst_buffer_unref(buf);
return;
}
diff --git a/ext/divx/gstdivxenc.c b/ext/divx/gstdivxenc.c
index cbd3159e..bd7547a1 100644
--- a/ext/divx/gstdivxenc.c
+++ b/ext/divx/gstdivxenc.c
@@ -302,10 +302,9 @@ gst_divxenc_setup (GstDivxEnc *divxenc)
output.spatial_passes = 0;
if ((ret = encore(&handle, ENC_OPT_INIT, &input, &output))) {
- gst_element_gerror(GST_ELEMENT(divxenc), GST_ERROR_UNKNOWN,
- g_strdup ("unconverted error, file a bug"),
- g_strdup_printf("Error setting up divx encoder: %s (%d)",
- gst_divxenc_error(ret), ret));
+ gst_element_error(GST_ELEMENT(divxenc),
+ "Error setting up divx encoder: %s (%d)",
+ gst_divxenc_error(ret), ret);
return FALSE;
}
@@ -364,10 +363,9 @@ gst_divxenc_chain (GstPad *pad,
if ((ret = encore(divxenc->handle, ENC_OPT_ENCODE,
&xframe, &xres))) {
- gst_element_gerror(GST_ELEMENT(divxenc), GST_ERROR_UNKNOWN,
- g_strdup ("unconverted error, file a bug"),
- g_strdup_printf("Error encoding divx frame: %s (%d)",
- gst_divxenc_error(ret), ret));
+ gst_element_error(GST_ELEMENT(divxenc),
+ "Error encoding divx frame: %s (%d)",
+ gst_divxenc_error(ret), ret);
gst_buffer_unref(buf);
return;
}
diff --git a/ext/ivorbis/vorbisfile.c b/ext/ivorbis/vorbisfile.c
index 125c44c9..86c7baf2 100644
--- a/ext/ivorbis/vorbisfile.c
+++ b/ext/ivorbis/vorbisfile.c
@@ -496,9 +496,7 @@ gst_ivorbisfile_loop (GstElement *element)
/* open our custom ivorbisfile data object with the callbacks we provide */
if (ov_open_callbacks (ivorbisfile, &ivorbisfile->vf, NULL, 0,
ivorbisfile_ov_callbacks) < 0) {
- gst_element_gerror(element, GST_ERROR_UNKNOWN,
- g_strdup ("unconverted error, file a bug"),
- g_strdup_printf("this is not a vorbis file"));
+ gst_element_error (element, "this is not a vorbis file");
return;
}
ivorbisfile->need_discont = TRUE;
@@ -562,9 +560,7 @@ gst_ivorbisfile_loop (GstElement *element)
/* we update the caps for each logical stream */
if (ivorbisfile->vf.current_link != ivorbisfile->current_link) {
if (!gst_ivorbisfile_new_link (ivorbisfile, ivorbisfile->vf.current_link)) {
- gst_element_gerror(GST_ELEMENT (ivorbisfile), GST_ERROR_UNKNOWN,
- g_strdup ("unconverted error, file a bug"),
- g_strdup_printf("could not negotiate format"));
+ gst_element_error (GST_ELEMENT (ivorbisfile), "could not negotiate format");
}
return;
}
diff --git a/ext/ladspa/gstladspa.c b/ext/ladspa/gstladspa.c
index 2611603f..460bdf12 100644
--- a/ext/ladspa/gstladspa.c
+++ b/ext/ladspa/gstladspa.c
@@ -701,9 +701,7 @@ gst_ladspa_loop (GstElement *element)
}
if (!ladspa->bufpool) {
- gst_element_gerror(element, "Caps were never set, GST_ERROR_UNKNOWN,
- g_strdup ("unconverted error, file a bug"),
- g_strdup_printf(bailing..."));
+ gst_element_error (element, "Caps were never set, bailing...");
return;
}
@@ -793,9 +791,7 @@ gst_ladspa_chain (GstPad *pad, GstBuffer *buffer_in)
g_return_if_fail (GST_IS_BUFFER (buffer_in));
if (!ladspa->bufpool) {
- gst_element_gerror((GstElement*)ladspa, "Caps were never set, GST_ERROR_UNKNOWN,
- g_strdup ("unconverted error, file a bug"),
- g_strdup_printf(bailing..."));
+ gst_element_error ((GstElement*)ladspa, "Caps were never set, bailing...");
return;
}
diff --git a/ext/lcs/gstcolorspace.c b/ext/lcs/gstcolorspace.c
index 00f61e43..0ed3b278 100644
--- a/ext/lcs/gstcolorspace.c
+++ b/ext/lcs/gstcolorspace.c
@@ -318,9 +318,7 @@ gst_colorspace_srcconnect_func (GstPad *pad, GstCaps *caps, gboolean newcaps)
peercaps = peercaps->next;
}
- //gst_element_gerror(GST_ELEMENT (space), GST_ERROR_UNKNOWN,
- g_strdup ("unconverted error, file a bug"),
- g_strdup_printf("could not agree on caps with peer pads"));
+ //gst_element_error (GST_ELEMENT (space), "could not agree on caps with peer pads");
/* we disable ourself here */
space->disabled = TRUE;
diff --git a/ext/sdl/sdlvideosink.c b/ext/sdl/sdlvideosink.c
index ff77ce15..1a8abafd 100644
--- a/ext/sdl/sdlvideosink.c
+++ b/ext/sdl/sdlvideosink.c
@@ -159,10 +159,9 @@ gst_sdlvideosink_get_sdl_from_fourcc (GstSDLVideoSink *sdlvideosink,
case GST_MAKE_FOURCC('Y','V','Y','U'):
return SDL_YVYU_OVERLAY;
default: {
- gst_element_gerror(GST_ELEMENT(sdlvideosink), GST_ERROR_UNKNOWN,
- g_strdup ("unconverted error, file a bug"),
- g_strdup_printf("Unsupported format %08lx (" GST_FOURCC_FORMAT ")",
- code, GST_FOURCC_ARGS(code)));
+ gst_element_error(GST_ELEMENT(sdlvideosink),
+ "Unsupported format %08lx (" GST_FOURCC_FORMAT ")",
+ code, GST_FOURCC_ARGS(code));
return 0;
}
}
@@ -177,17 +176,15 @@ gst_sdlvideosink_lock (GstSDLVideoSink *sdlvideosink)
{
if (SDL_LockSurface(sdlvideosink->screen) < 0)
{
- gst_element_gerror(GST_ELEMENT(sdlvideosink), GST_ERROR_UNKNOWN,
- g_strdup ("unconverted error, file a bug"),
- g_strdup_printf("SDL: couldn\'t lock the SDL video window: %s", SDL_GetError()));
+ gst_element_error(GST_ELEMENT(sdlvideosink),
+ "SDL: couldn\'t lock the SDL video window: %s", SDL_GetError());
return FALSE;
}
}
if (SDL_LockYUVOverlay(sdlvideosink->yuv_overlay) < 0)
{
- gst_element_gerror(GST_ELEMENT(sdlvideosink), GST_ERROR_UNKNOWN,
- g_strdup ("unconverted error, file a bug"),
- g_strdup_printf("SDL: couldn\'t lock the SDL YUV overlay: %s", SDL_GetError()));
+ gst_element_error(GST_ELEMENT(sdlvideosink),
+ "SDL: couldn\'t lock the SDL YUV overlay: %s", SDL_GetError());
return FALSE;
}
@@ -224,10 +221,9 @@ gst_sdlvideosink_create (GstSDLVideoSink *sdlvideosink, gboolean showlogo)
GST_VIDEOSINK_HEIGHT (sdlvideosink), 0, SDL_SWSURFACE | SDL_RESIZABLE);
if ( sdlvideosink->screen == NULL)
{
- gst_element_gerror(GST_ELEMENT(sdlvideosink), GST_ERROR_UNKNOWN,
- g_strdup ("unconverted error, file a bug"),
- g_strdup_printf("SDL: Couldn't set %dx%d: %s", GST_VIDEOSINK_WIDTH (sdlvideosink),
- GST_VIDEOSINK_HEIGHT (sdlvideosink), SDL_GetError()));
+ gst_element_error(GST_ELEMENT(sdlvideosink),
+ "SDL: Couldn't set %dx%d: %s", GST_VIDEOSINK_WIDTH (sdlvideosink),
+ GST_VIDEOSINK_HEIGHT (sdlvideosink), SDL_GetError());
return FALSE;
}
@@ -238,11 +234,10 @@ gst_sdlvideosink_create (GstSDLVideoSink *sdlvideosink, gboolean showlogo)
GST_VIDEOSINK_WIDTH (sdlvideosink), sdlvideosink->format, sdlvideosink->screen);
if ( sdlvideosink->yuv_overlay == NULL )
{
- gst_element_gerror(GST_ELEMENT(sdlvideosink), GST_ERROR_UNKNOWN,
- g_strdup ("unconverted error, file a bug"),
- g_strdup_printf("SDL: Couldn't create SDL_yuv_overlay (%dx%d \'" GST_FOURCC_FORMAT "\'): %s",
+ gst_element_error(GST_ELEMENT(sdlvideosink),
+ "SDL: Couldn't create SDL_yuv_overlay (%dx%d \'" GST_FOURCC_FORMAT "\'): %s",
GST_VIDEOSINK_WIDTH (sdlvideosink), GST_VIDEOSINK_HEIGHT (sdlvideosink),
- GST_FOURCC_ARGS(sdlvideosink->format), SDL_GetError()));
+ GST_FOURCC_ARGS(sdlvideosink->format), SDL_GetError());
return FALSE;
}
else
@@ -488,9 +483,7 @@ gst_sdlvideosink_change_state (GstElement *element)
}
if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_NOPARACHUTE) < 0 )
{
- gst_element_gerror(element, GST_ERROR_UNKNOWN,
- g_strdup ("unconverted error, file a bug"),
- g_strdup_printf("Couldn't initialize SDL: %s", SDL_GetError()));
+ gst_element_error(element, "Couldn't initialize SDL: %s", SDL_GetError());
return GST_STATE_FAILURE;
}
GST_FLAG_SET (sdlvideosink, GST_SDLVIDEOSINK_OPEN);
diff --git a/ext/sndfile/gstsf.c b/ext/sndfile/gstsf.c
index a24f933f..3d75087b 100644
--- a/ext/sndfile/gstsf.c
+++ b/ext/sndfile/gstsf.c
@@ -546,9 +546,7 @@ gst_sf_open_file (GstSF *this)
this->time = 0;
if (!this->filename) {
- gst_element_gerror(GST_ELEMENT (this), GST_ERROR_UNKNOWN,
- g_strdup ("unconverted error, file a bug"),
- g_strdup_printf("sndfile: 'location' was not set"));
+ gst_element_error (GST_ELEMENT (this), "sndfile: 'location' was not set");
return FALSE;
}
@@ -574,9 +572,8 @@ gst_sf_open_file (GstSF *this)
this->filename, info.samplerate, info.channels, info.format);
if (!sf_format_check (&info)) {
- gst_element_gerror(GST_ELEMENT (this), GST_ERROR_UNKNOWN,
- g_strdup ("unconverted error, file a bug"),
- g_strdup_printf("Input parameters (rate:%d, channels:%d, format:0x%x) invalid",
+ gst_element_error (GST_ELEMENT (this),
+ g_strdup_printf ("Input parameters (rate:%d, channels:%d, format:0x%x) invalid",
info.samplerate, info.channels, info.format));
return FALSE;
}
@@ -585,10 +582,9 @@ gst_sf_open_file (GstSF *this)
this->file = sf_open (this->filename, mode, &info);
if (!this->file) {
- gst_element_gerror(GST_ELEMENT (this), GST_ERROR_UNKNOWN,
- g_strdup ("unconverted error, file a bug"),
- g_strdup_printf ("could not open file \"%s\": %s",
- this->filename, sf_strerror (NULL)));
+ gst_element_error (GST_ELEMENT (this),
+ g_strdup_printf ("could not open file \"%s\": %s",
+ this->filename, sf_strerror (NULL)));
return FALSE;
}
@@ -625,10 +621,9 @@ gst_sf_close_file (GstSF *this)
INFO_OBJ (this, "Closing file %s", this->filename);
if ((err = sf_close (this->file)))
- gst_element_gerror(GST_ELEMENT (this), GST_ERROR_UNKNOWN,
- g_strdup ("unconverted error, file a bug"),
- g_strdup_printf(g_strdup_printf ("sndfile: could not close file \"%s\": %s",
- this->filename, sf_error_number (err))));
+ gst_element_error (GST_ELEMENT (this),
+ g_strdup_printf ("sndfile: could not close file \"%s\": %s",
+ this->filename, sf_error_number (err)));
else
GST_FLAG_UNSET (this, GST_SF_OPEN);
@@ -647,9 +642,7 @@ gst_sf_loop (GstElement *element)
this = (GstSF*)element;
if (this->channels == NULL) {
- gst_element_gerror(element, GST_ERROR_UNKNOWN,
- g_strdup ("unconverted error, file a bug"),
- g_strdup_printf("You must connect at least one pad to sndfile elements."));
+ gst_element_error (element, "You must connect at least one pad to sndfile elements.");
return;
}
@@ -697,10 +690,9 @@ gst_sf_loop (GstElement *element)
gst_caps_set (caps, "rate", GST_PROPS_INT (this->rate), NULL);
gst_caps_set (caps, "buffer-frames", GST_PROPS_INT (this->buffer_frames), NULL);
if (!gst_pad_try_set_caps (GST_SF_CHANNEL (l)->pad, caps)) {
- gst_element_gerror(GST_ELEMENT (this), GST_ERROR_UNKNOWN,
- g_strdup ("unconverted error, file a bug"),
- g_strdup_printf("Opened file with sample rate %d, but could not set caps",
- this->rate));
+ gst_element_error (GST_ELEMENT (this),
+ g_strdup_printf ("Opened file with sample rate %d, but could not set caps",
+ this->rate));
gst_sf_close_file (this);
return;
}
@@ -755,9 +747,7 @@ gst_sf_loop (GstElement *element)
which then would set this->buffer_frames to a new value */
buffer_frames = this->buffer_frames;
if (buffer_frames == 0) {
- gst_element_gerror(element, "Caps were never set, GST_ERROR_UNKNOWN,
- g_strdup ("unconverted error, file a bug"),
- g_strdup_printf(bailing..."));
+ gst_element_error (element, "Caps were never set, bailing...");
return;
}
buf = this->buffer;
@@ -782,9 +772,7 @@ gst_sf_loop (GstElement *element)
if (num_to_write) {
written = sf_writef_float (this->file, buf, num_to_write);
if (written != num_to_write)
- gst_element_gerror(element, "Error writing file: %s", GST_ERROR_UNKNOWN,
- g_strdup ("unconverted error, file a bug"),
- g_strdup_printf(sf_strerror (this->file)));
+ gst_element_error (element, "Error writing file: %s", sf_strerror (this->file));
}
this->time += num_to_write * (GST_SECOND / this->rate);
diff --git a/ext/tarkin/gsttarkindec.c b/ext/tarkin/gsttarkindec.c
index d8efb616..f77e5c8f 100644
--- a/ext/tarkin/gsttarkindec.c
+++ b/ext/tarkin/gsttarkindec.c
@@ -156,9 +156,7 @@ gst_tarkindec_chain (GstPad *pad, GstBuffer *buf)
tarkindec = GST_TARKINDEC (gst_pad_get_parent (pad));
if (!tarkindec->setup) {
- gst_element_gerror(GST_ELEMENT (tarkindec), GST_ERROR_UNKNOWN,
- g_strdup ("unconverted error, file a bug"),
- g_strdup_printf("decoder not initialized (input is not audio?)"));
+ gst_element_error (GST_ELEMENT (tarkindec), "decoder not initialized (input is not audio?)");
if (GST_IS_BUFFER (buf))
gst_buffer_unref (buf);
else
@@ -227,9 +225,7 @@ gst_tarkindec_chain (GstPad *pad, GstBuffer *buf)
"framerate", GST_PROPS_FLOAT (0.) /* FIXME!!! */
)) <= 0)
{
- gst_element_gerror(GST_ELEMENT (tarkindec), GST_ERROR_UNKNOWN,
- g_strdup ("unconverted error, file a bug"),
- g_strdup_printf("could not output format"));
+ gst_element_error (GST_ELEMENT (tarkindec), "could not output format");
gst_buffer_unref (buf);
return;
}
diff --git a/ext/tarkin/gsttarkinenc.c b/ext/tarkin/gsttarkinenc.c
index 78cc6f27..ff3d295e 100644
--- a/ext/tarkin/gsttarkinenc.c
+++ b/ext/tarkin/gsttarkinenc.c
@@ -266,9 +266,7 @@ gst_tarkinenc_chain (GstPad *pad, GstBuffer *buf)
tarkinenc = GST_TARKINENC (gst_pad_get_parent (pad));
if (!tarkinenc->setup) {
- gst_element_gerror(GST_ELEMENT (tarkinenc), GST_ERROR_UNKNOWN,
- g_strdup ("unconverted error, file a bug"),
- g_strdup_printf("encoder not initialized (input is not audio?)"));
+ gst_element_error (GST_ELEMENT (tarkinenc), "encoder not initialized (input is not audio?)");
if (GST_IS_BUFFER (buf))
gst_buffer_unref (buf);
else
diff --git a/ext/xvid/gstxviddec.c b/ext/xvid/gstxviddec.c
index 5bdcea34..50e72a3c 100644
--- a/ext/xvid/gstxviddec.c
+++ b/ext/xvid/gstxviddec.c
@@ -192,11 +192,10 @@ gst_xviddec_setup (GstXvidDec *xviddec)
if ((ret = xvid_decore(NULL, XVID_DEC_CREATE,
&xdec, NULL)) != XVID_ERR_OK) {
- gst_element_gerror(GST_ELEMENT(xviddec), GST_ERROR_UNKNOWN,
- g_strdup ("unconverted error, file a bug"),
- g_strdup_printf("Setting parameters %dx%d@%d failed: %s (%d)",
+ gst_element_error(GST_ELEMENT(xviddec),
+ "Setting parameters %dx%d@%d failed: %s (%d)",
xviddec->width, xviddec->height, xviddec->csp,
- gst_xvid_error(ret), ret));
+ gst_xvid_error(ret), ret);
return FALSE;
}
@@ -232,9 +231,8 @@ gst_xviddec_chain (GstPad *pad,
if (!xviddec->handle) {
if (!gst_xviddec_negotiate(xviddec)) {
- gst_element_gerror(GST_ELEMENT(xviddec), GST_ERROR_UNKNOWN,
- g_strdup ("unconverted error, file a bug"),
- g_strdup_printf("No format set - aborting"));
+ gst_element_error(GST_ELEMENT(xviddec),
+ "No format set - aborting");
gst_buffer_unref(buf);
return;
}
@@ -257,10 +255,9 @@ gst_xviddec_chain (GstPad *pad,
if ((ret = xvid_decore(xviddec->handle, XVID_DEC_DECODE,
&xframe, NULL))) {
- gst_element_gerror(GST_ELEMENT(xviddec), GST_ERROR_UNKNOWN,
- g_strdup ("unconverted error, file a bug"),
- g_strdup_printf("Error decoding xvid frame: %s (%d)\n",
- gst_xvid_error(ret), ret));
+ gst_element_error(GST_ELEMENT(xviddec),
+ "Error decoding xvid frame: %s (%d)\n",
+ gst_xvid_error(ret), ret);
gst_buffer_unref(buf);
return;
}
diff --git a/ext/xvid/gstxvidenc.c b/ext/xvid/gstxvidenc.c
index 7561848f..b217b652 100644
--- a/ext/xvid/gstxvidenc.c
+++ b/ext/xvid/gstxvidenc.c
@@ -237,10 +237,9 @@ gst_xvidenc_setup (GstXvidEnc *xvidenc)
if ((ret = xvid_encore(NULL, XVID_ENC_CREATE,
&xenc, NULL)) != XVID_ERR_OK) {
- gst_element_gerror(GST_ELEMENT(xvidenc), GST_ERROR_UNKNOWN,
- g_strdup ("unconverted error, file a bug"),
- g_strdup_printf("Error setting up xvid encoder: %s (%d)",
- gst_xvid_error(ret), ret));
+ gst_element_error(GST_ELEMENT(xvidenc),
+ "Error setting up xvid encoder: %s (%d)",
+ gst_xvid_error(ret), ret);
return FALSE;
}
@@ -286,10 +285,9 @@ gst_xvidenc_chain (GstPad *pad,
if ((ret = xvid_encore(xvidenc->handle, XVID_ENC_ENCODE,
&xframe, NULL)) != XVID_ERR_OK) {
- gst_element_gerror(GST_ELEMENT(xvidenc), GST_ERROR_UNKNOWN,
- g_strdup ("unconverted error, file a bug"),
- g_strdup_printf("Error encoding xvid frame: %s (%d)",
- gst_xvid_error(ret), ret));
+ gst_element_error(GST_ELEMENT(xvidenc),
+ "Error encoding xvid frame: %s (%d)",
+ gst_xvid_error(ret), ret);
gst_buffer_unref(buf);
return;
}
diff --git a/gst/chart/gstchart.c b/gst/chart/gstchart.c
index 16558b4f..bc86b893 100644
--- a/gst/chart/gstchart.c
+++ b/gst/chart/gstchart.c
@@ -372,9 +372,8 @@ gst_chart_chain (GstPad *pad, GstBuffer *bufin)
"height", GST_PROPS_INT (chart->height),
"framerate", GST_PROPS_FLOAT (chart->framerate));
if (gst_pad_try_set_caps (chart->srcpad, newcaps) <= 0) {
- gst_element_gerror(GST_ELEMENT (chart), GST_ERROR_UNKNOWN,
- g_strdup ("unconverted error, file a bug"),
- g_strdup ("chart: could not negotiate format"));
+ gst_element_error (GST_ELEMENT (chart),
+ "chart: could not negotiate format");
return;
}
}
diff --git a/gst/flx/gstflxdec.c b/gst/flx/gstflxdec.c
index fe204439..c20327a7 100644
--- a/gst/flx/gstflxdec.c
+++ b/gst/flx/gstflxdec.c
@@ -499,9 +499,7 @@ gst_flxdec_loop (GstElement *element)
if (flxh->type != FLX_MAGICHDR_FLI &&
flxh->type != FLX_MAGICHDR_FLC &&
flxh->type != FLX_MAGICHDR_FLX) {
- gst_element_gerror(element, GST_ERROR_UNKNOWN,
- g_strdup ("unconverted error, file a bug"),
- g_strdup_printf("not a flx file (type %d)\n", flxh->type));
+ gst_element_error (element, "not a flx file (type %d)\n", flxh->type);
return;
}
diff --git a/gst/modplug/gstmodplug.cc b/gst/modplug/gstmodplug.cc
index b0a0bb76..2fa602f7 100644
--- a/gst/modplug/gstmodplug.cc
+++ b/gst/modplug/gstmodplug.cc
@@ -625,9 +625,7 @@ gst_modplug_loop (GstElement *element)
if (!GST_PAD_CAPS (modplug->srcpad) &&
modplug_negotiate (modplug) <= 0) {
- gst_element_gerror (GST_ELEMENT (modplug), GST_ERROR_CAPS_NEGOTIATION,
- g_strdup ("could not negotiate format"),
- g_strdup ("could not negotiate format"));
+ gst_element_error (GST_ELEMENT (modplug), "could not negotiate format");
return;
}
diff --git a/gst/mpeg1videoparse/gstmp1videoparse.c b/gst/mpeg1videoparse/gstmp1videoparse.c
index e82d7588..4af360fd 100644
--- a/gst/mpeg1videoparse/gstmp1videoparse.c
+++ b/gst/mpeg1videoparse/gstmp1videoparse.c
@@ -198,9 +198,8 @@ mp1videoparse_parse_seq (Mp1VideoParse *mp1videoparse, GstBuffer *buf)
gst_caps_debug (caps, "New mpeg1videoparse caps");
if (gst_pad_try_set_caps (mp1videoparse->srcpad, caps) <= 0) {
- gst_element_gerror(GST_ELEMENT (mp1videoparse), GST_ERROR_UNKNOWN,
- g_strdup ("unconverted error, file a bug"),
- g_strdup_printf ("mp1videoparse: failed to negotiate a new format"));
+ gst_element_error (GST_ELEMENT (mp1videoparse),
+ "mp1videoparse: failed to negotiate a new format");
return;
}
}
diff --git a/gst/mpegaudioparse/gstmpegaudioparse.c b/gst/mpegaudioparse/gstmpegaudioparse.c
index 58576a9a..ba207c0e 100644
--- a/gst/mpegaudioparse/gstmpegaudioparse.c
+++ b/gst/mpegaudioparse/gstmpegaudioparse.c
@@ -360,9 +360,8 @@ bpf_from_header (GstMPEGAudioParse *parse, unsigned long header)
"channels", GST_PROPS_INT (channels),
"rate", GST_PROPS_INT (rate));
if (gst_pad_try_set_caps(parse->srcpad, caps) <= 0) {
- gst_element_gerror(GST_ELEMENT (parse), GST_ERROR_UNKNOWN,
- g_strdup ("unconverted error, file a bug"),
- g_strdup_printf ("mp3parse: failed to negotiate format with next element"));
+ gst_element_error (GST_ELEMENT (parse),
+ "mp3parse: failed to negotiate format with next element");
}
parse->channels = channels;
diff --git a/gst/overlay/gstoverlay.c b/gst/overlay/gstoverlay.c
index 27b168c3..79c061fa 100644
--- a/gst/overlay/gstoverlay.c
+++ b/gst/overlay/gstoverlay.c
@@ -315,9 +315,7 @@ gst_overlay_loop (GstElement *element)
"framerate",GST_PROPS_FLOAT (overlay->framerate)
)))
{
- gst_element_gerror(element, GST_ERROR_UNKNOWN,
- g_strdup ("unconverted error, file a bug"),
- g_strdup_printf("cannot set caps"));
+ gst_element_error (element, "cannot set caps");
return;
}
}
diff --git a/gst/smpte/gstsmpte.c b/gst/smpte/gstsmpte.c
index 9b203fe1..bf042e4c 100644
--- a/gst/smpte/gstsmpte.c
+++ b/gst/smpte/gstsmpte.c
@@ -364,9 +364,7 @@ gst_smpte_loop (GstElement *element)
"framerate", GST_PROPS_FLOAT (smpte->fps)
)))
{
- gst_element_gerror(element, GST_ERROR_UNKNOWN,
- g_strdup ("unconverted error, file a bug"),
- g_strdup_printf("cannot set caps"));
+ gst_element_error (element, "cannot set caps");
return;
}
}
diff --git a/gst/speed/gstspeed.c b/gst/speed/gstspeed.c
index 64020f6d..07dad78c 100644
--- a/gst/speed/gstspeed.c
+++ b/gst/speed/gstspeed.c
@@ -280,9 +280,7 @@ speed_loop (GstElement *element)
#include "filter.func"
#undef _FORMAT
} else {
- gst_element_gerror(element, GST_ERROR_UNKNOWN,
- g_strdup ("unconverted error, file a bug"),
- g_strdup_printf("capsnego was never performed, bailing..."));
+ gst_element_error (element, "capsnego was never performed, bailing...");
gst_element_yield (element);
}
}
diff --git a/gst/videocrop/gstvideocrop.c b/gst/videocrop/gstvideocrop.c
index 54702e5c..d96061a0 100644
--- a/gst/videocrop/gstvideocrop.c
+++ b/gst/videocrop/gstvideocrop.c
@@ -380,9 +380,7 @@ gst_video_crop_chain (GstPad *pad, GstBuffer *buffer)
"framerate", GST_PROPS_FLOAT (video_crop->fps)
)) <= 0)
{
- gst_element_gerror(GST_ELEMENT (video_crop), GST_ERROR_UNKNOWN,
- g_strdup ("unconverted error, file a bug"),
- g_strdup_printf("could not negotiate pads"));
+ gst_element_error (GST_ELEMENT (video_crop), "could not negotiate pads");
return;
}
}