summaryrefslogtreecommitdiffstats
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-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
13 files changed, 131 insertions, 78 deletions
diff --git a/ext/audiofile/gstafsink.c b/ext/audiofile/gstafsink.c
index 3392717c..3e27adbf 100644
--- a/ext/audiofile/gstafsink.c
+++ b/ext/audiofile/gstafsink.c
@@ -294,7 +294,9 @@ gst_afsink_open_file (GstAFSink *sink)
sink->file = fopen (sink->filename, "w");
if (sink->file == NULL) {
perror ("open");
- gst_element_error (GST_ELEMENT (sink), g_strconcat("opening file \"", sink->filename, "\"", NULL));
+ 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)));
return FALSE;
}
*/
@@ -351,7 +353,9 @@ gst_afsink_open_file (GstAFSink *sink)
if (sink->file == AF_NULL_FILEHANDLE)
{
perror ("open");
- gst_element_error (GST_ELEMENT (sink), g_strconcat("opening file \"", sink->filename, "\"", NULL));
+ 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));
return FALSE;
}
@@ -374,7 +378,9 @@ gst_afsink_close_file (GstAFSink *sink)
{
g_print ("WARNING: afsink: oops, error closing !\n");
perror ("close");
- gst_element_error (GST_ELEMENT (sink), g_strconcat("closing file \"", sink->filename, "\"", NULL));
+ 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));
}
else {
GST_FLAG_UNSET (sink, GST_AFSINK_OPEN);
diff --git a/ext/audiofile/gstafsrc.c b/ext/audiofile/gstafsrc.c
index 2b817310..71b85294 100644
--- a/ext/audiofile/gstafsrc.c
+++ b/ext/audiofile/gstafsrc.c
@@ -306,8 +306,9 @@ gst_afsrc_open_file (GstAFSrc *src)
{
g_print ("ERROR: gstafsrc: Could not open file %s for reading\n",
src->filename);
- gst_element_error (GST_ELEMENT (src), g_strconcat ("opening file \"",
- src->filename, "\"", NULL));
+ 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));
return FALSE;
}
@@ -327,13 +328,11 @@ 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");
}
@@ -369,7 +368,9 @@ gst_afsrc_close_file (GstAFSrc *src)
{
g_print ("WARNING: afsrc: oops, error closing !\n");
perror ("close");
- gst_element_error (GST_ELEMENT (src), g_strconcat("closing file \"", src->filename, "\"", NULL));
+ 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));
}
else {
GST_FLAG_UNSET (src, GST_AFSRC_OPEN);
diff --git a/ext/divx/gstdivxdec.c b/ext/divx/gstdivxdec.c
index 011836f9..173ee75c 100644
--- a/ext/divx/gstdivxdec.c
+++ b/ext/divx/gstdivxdec.c
@@ -221,9 +221,10 @@ 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_error(GST_ELEMENT(divxdec),
- "Error initializing divx decoding library: %s (%d)",
- gst_divxdec_error(ret), ret);
+ 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));
return FALSE;
}
@@ -240,9 +241,10 @@ gst_divxdec_setup (GstDivxDec *divxdec)
if ((ret = decore(divxdec->handle, DEC_OPT_SETOUT,
&output, NULL)) != 0) {
- gst_element_error(GST_ELEMENT(divxdec),
- "Error setting output format: %s (%d)",
- gst_divxdec_error(ret), ret);
+ 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_divxdec_unset(divxdec);
return FALSE;
}
@@ -277,8 +279,9 @@ gst_divxdec_chain (GstPad *pad,
if (!divxdec->handle) {
if (gst_divxdec_negotiate(divxdec) <= 0) {
- gst_element_error(GST_ELEMENT(divxdec),
- "No format set - aborting");
+ gst_element_gerror(GST_ELEMENT(divxdec), GST_ERROR_UNKNOWN,
+ g_strdup ("unconverted error, file a bug"),
+ g_strdup_printf("No format set - aborting"));
gst_buffer_unref(buf);
return;
}
@@ -301,9 +304,10 @@ gst_divxdec_chain (GstPad *pad,
if ((ret = decore(divxdec->handle, DEC_OPT_FRAME,
&xframe, NULL))) {
- gst_element_error(GST_ELEMENT(divxdec),
- "Error decoding divx frame: %s (%d)",
- gst_divxdec_error(ret), ret);
+ 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_buffer_unref(buf);
return;
}
diff --git a/ext/divx/gstdivxenc.c b/ext/divx/gstdivxenc.c
index bd7547a1..cbd3159e 100644
--- a/ext/divx/gstdivxenc.c
+++ b/ext/divx/gstdivxenc.c
@@ -302,9 +302,10 @@ gst_divxenc_setup (GstDivxEnc *divxenc)
output.spatial_passes = 0;
if ((ret = encore(&handle, ENC_OPT_INIT, &input, &output))) {
- gst_element_error(GST_ELEMENT(divxenc),
- "Error setting up divx encoder: %s (%d)",
- gst_divxenc_error(ret), ret);
+ 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));
return FALSE;
}
@@ -363,9 +364,10 @@ gst_divxenc_chain (GstPad *pad,
if ((ret = encore(divxenc->handle, ENC_OPT_ENCODE,
&xframe, &xres))) {
- gst_element_error(GST_ELEMENT(divxenc),
- "Error encoding divx frame: %s (%d)",
- gst_divxenc_error(ret), ret);
+ 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_buffer_unref(buf);
return;
}
diff --git a/ext/ivorbis/vorbisfile.c b/ext/ivorbis/vorbisfile.c
index 86c7baf2..125c44c9 100644
--- a/ext/ivorbis/vorbisfile.c
+++ b/ext/ivorbis/vorbisfile.c
@@ -496,7 +496,9 @@ 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_error (element, "this is not a vorbis file");
+ gst_element_gerror(element, GST_ERROR_UNKNOWN,
+ g_strdup ("unconverted error, file a bug"),
+ g_strdup_printf("this is not a vorbis file"));
return;
}
ivorbisfile->need_discont = TRUE;
@@ -560,7 +562,9 @@ 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_error (GST_ELEMENT (ivorbisfile), "could not negotiate format");
+ gst_element_gerror(GST_ELEMENT (ivorbisfile), GST_ERROR_UNKNOWN,
+ g_strdup ("unconverted error, file a bug"),
+ g_strdup_printf("could not negotiate format"));
}
return;
}
diff --git a/ext/ladspa/gstladspa.c b/ext/ladspa/gstladspa.c
index 460bdf12..2611603f 100644
--- a/ext/ladspa/gstladspa.c
+++ b/ext/ladspa/gstladspa.c
@@ -701,7 +701,9 @@ gst_ladspa_loop (GstElement *element)
}
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;
}
@@ -791,7 +793,9 @@ gst_ladspa_chain (GstPad *pad, GstBuffer *buffer_in)
g_return_if_fail (GST_IS_BUFFER (buffer_in));
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;
}
diff --git a/ext/lcs/gstcolorspace.c b/ext/lcs/gstcolorspace.c
index 0ed3b278..00f61e43 100644
--- a/ext/lcs/gstcolorspace.c
+++ b/ext/lcs/gstcolorspace.c
@@ -318,7 +318,9 @@ gst_colorspace_srcconnect_func (GstPad *pad, GstCaps *caps, gboolean newcaps)
peercaps = peercaps->next;
}
- //gst_element_error (GST_ELEMENT (space), "could not agree on caps with peer pads");
+ //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"));
/* we disable ourself here */
space->disabled = TRUE;
diff --git a/ext/sdl/sdlvideosink.c b/ext/sdl/sdlvideosink.c
index 1a8abafd..ff77ce15 100644
--- a/ext/sdl/sdlvideosink.c
+++ b/ext/sdl/sdlvideosink.c
@@ -159,9 +159,10 @@ gst_sdlvideosink_get_sdl_from_fourcc (GstSDLVideoSink *sdlvideosink,
case GST_MAKE_FOURCC('Y','V','Y','U'):
return SDL_YVYU_OVERLAY;
default: {
- gst_element_error(GST_ELEMENT(sdlvideosink),
- "Unsupported format %08lx (" GST_FOURCC_FORMAT ")",
- code, GST_FOURCC_ARGS(code));
+ 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)));
return 0;
}
}
@@ -176,15 +177,17 @@ gst_sdlvideosink_lock (GstSDLVideoSink *sdlvideosink)
{
if (SDL_LockSurface(sdlvideosink->screen) < 0)
{
- gst_element_error(GST_ELEMENT(sdlvideosink),
- "SDL: couldn\'t lock the SDL video window: %s", SDL_GetError());
+ 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()));
return FALSE;
}
}
if (SDL_LockYUVOverlay(sdlvideosink->yuv_overlay) < 0)
{
- gst_element_error(GST_ELEMENT(sdlvideosink),
- "SDL: couldn\'t lock the SDL YUV overlay: %s", SDL_GetError());
+ 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()));
return FALSE;
}
@@ -221,9 +224,10 @@ gst_sdlvideosink_create (GstSDLVideoSink *sdlvideosink, gboolean showlogo)
GST_VIDEOSINK_HEIGHT (sdlvideosink), 0, SDL_SWSURFACE | SDL_RESIZABLE);
if ( sdlvideosink->screen == NULL)
{
- gst_element_error(GST_ELEMENT(sdlvideosink),
- "SDL: Couldn't set %dx%d: %s", GST_VIDEOSINK_WIDTH (sdlvideosink),
- GST_VIDEOSINK_HEIGHT (sdlvideosink), SDL_GetError());
+ 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()));
return FALSE;
}
@@ -234,10 +238,11 @@ gst_sdlvideosink_create (GstSDLVideoSink *sdlvideosink, gboolean showlogo)
GST_VIDEOSINK_WIDTH (sdlvideosink), sdlvideosink->format, sdlvideosink->screen);
if ( sdlvideosink->yuv_overlay == NULL )
{
- gst_element_error(GST_ELEMENT(sdlvideosink),
- "SDL: Couldn't create SDL_yuv_overlay (%dx%d \'" GST_FOURCC_FORMAT "\'): %s",
+ 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_VIDEOSINK_WIDTH (sdlvideosink), GST_VIDEOSINK_HEIGHT (sdlvideosink),
- GST_FOURCC_ARGS(sdlvideosink->format), SDL_GetError());
+ GST_FOURCC_ARGS(sdlvideosink->format), SDL_GetError()));
return FALSE;
}
else
@@ -483,7 +488,9 @@ gst_sdlvideosink_change_state (GstElement *element)
}
if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_NOPARACHUTE) < 0 )
{
- gst_element_error(element, "Couldn't initialize SDL: %s", SDL_GetError());
+ gst_element_gerror(element, GST_ERROR_UNKNOWN,
+ g_strdup ("unconverted error, file a bug"),
+ g_strdup_printf("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 3d75087b..a24f933f 100644
--- a/ext/sndfile/gstsf.c
+++ b/ext/sndfile/gstsf.c
@@ -546,7 +546,9 @@ gst_sf_open_file (GstSF *this)
this->time = 0;
if (!this->filename) {
- gst_element_error (GST_ELEMENT (this), "sndfile: 'location' was not set");
+ gst_element_gerror(GST_ELEMENT (this), GST_ERROR_UNKNOWN,
+ g_strdup ("unconverted error, file a bug"),
+ g_strdup_printf("sndfile: 'location' was not set"));
return FALSE;
}
@@ -572,8 +574,9 @@ gst_sf_open_file (GstSF *this)
this->filename, info.samplerate, info.channels, info.format);
if (!sf_format_check (&info)) {
- gst_element_error (GST_ELEMENT (this),
- g_strdup_printf ("Input parameters (rate:%d, channels:%d, format:0x%x) invalid",
+ 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",
info.samplerate, info.channels, info.format));
return FALSE;
}
@@ -582,9 +585,10 @@ gst_sf_open_file (GstSF *this)
this->file = sf_open (this->filename, mode, &info);
if (!this->file) {
- gst_element_error (GST_ELEMENT (this),
- g_strdup_printf ("could not open file \"%s\": %s",
- this->filename, sf_strerror (NULL)));
+ 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)));
return FALSE;
}
@@ -621,9 +625,10 @@ gst_sf_close_file (GstSF *this)
INFO_OBJ (this, "Closing file %s", this->filename);
if ((err = sf_close (this->file)))
- gst_element_error (GST_ELEMENT (this),
- g_strdup_printf ("sndfile: could not close file \"%s\": %s",
- this->filename, sf_error_number (err)));
+ 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))));
else
GST_FLAG_UNSET (this, GST_SF_OPEN);
@@ -642,7 +647,9 @@ gst_sf_loop (GstElement *element)
this = (GstSF*)element;
if (this->channels == NULL) {
- gst_element_error (element, "You must connect at least one pad to sndfile elements.");
+ 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."));
return;
}
@@ -690,9 +697,10 @@ 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_error (GST_ELEMENT (this),
- g_strdup_printf ("Opened file with sample rate %d, but could not set caps",
- this->rate));
+ 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_sf_close_file (this);
return;
}
@@ -747,7 +755,9 @@ 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_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;
}
buf = this->buffer;
@@ -772,7 +782,9 @@ 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_error (element, "Error writing file: %s", sf_strerror (this->file));
+ 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)));
}
this->time += num_to_write * (GST_SECOND / this->rate);
diff --git a/ext/tarkin/gsttarkindec.c b/ext/tarkin/gsttarkindec.c
index f77e5c8f..d8efb616 100644
--- a/ext/tarkin/gsttarkindec.c
+++ b/ext/tarkin/gsttarkindec.c
@@ -156,7 +156,9 @@ gst_tarkindec_chain (GstPad *pad, GstBuffer *buf)
tarkindec = GST_TARKINDEC (gst_pad_get_parent (pad));
if (!tarkindec->setup) {
- gst_element_error (GST_ELEMENT (tarkindec), "decoder not initialized (input is not audio?)");
+ 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?)"));
if (GST_IS_BUFFER (buf))
gst_buffer_unref (buf);
else
@@ -225,7 +227,9 @@ gst_tarkindec_chain (GstPad *pad, GstBuffer *buf)
"framerate", GST_PROPS_FLOAT (0.) /* FIXME!!! */
)) <= 0)
{
- gst_element_error (GST_ELEMENT (tarkindec), "could not output format");
+ gst_element_gerror(GST_ELEMENT (tarkindec), GST_ERROR_UNKNOWN,
+ g_strdup ("unconverted error, file a bug"),
+ g_strdup_printf("could not output format"));
gst_buffer_unref (buf);
return;
}
diff --git a/ext/tarkin/gsttarkinenc.c b/ext/tarkin/gsttarkinenc.c
index ff3d295e..78cc6f27 100644
--- a/ext/tarkin/gsttarkinenc.c
+++ b/ext/tarkin/gsttarkinenc.c
@@ -266,7 +266,9 @@ gst_tarkinenc_chain (GstPad *pad, GstBuffer *buf)
tarkinenc = GST_TARKINENC (gst_pad_get_parent (pad));
if (!tarkinenc->setup) {
- gst_element_error (GST_ELEMENT (tarkinenc), "encoder not initialized (input is not audio?)");
+ 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?)"));
if (GST_IS_BUFFER (buf))
gst_buffer_unref (buf);
else
diff --git a/ext/xvid/gstxviddec.c b/ext/xvid/gstxviddec.c
index 50e72a3c..5bdcea34 100644
--- a/ext/xvid/gstxviddec.c
+++ b/ext/xvid/gstxviddec.c
@@ -192,10 +192,11 @@ gst_xviddec_setup (GstXvidDec *xviddec)
if ((ret = xvid_decore(NULL, XVID_DEC_CREATE,
&xdec, NULL)) != XVID_ERR_OK) {
- gst_element_error(GST_ELEMENT(xviddec),
- "Setting parameters %dx%d@%d failed: %s (%d)",
+ 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)",
xviddec->width, xviddec->height, xviddec->csp,
- gst_xvid_error(ret), ret);
+ gst_xvid_error(ret), ret));
return FALSE;
}
@@ -231,8 +232,9 @@ gst_xviddec_chain (GstPad *pad,
if (!xviddec->handle) {
if (!gst_xviddec_negotiate(xviddec)) {
- gst_element_error(GST_ELEMENT(xviddec),
- "No format set - aborting");
+ gst_element_gerror(GST_ELEMENT(xviddec), GST_ERROR_UNKNOWN,
+ g_strdup ("unconverted error, file a bug"),
+ g_strdup_printf("No format set - aborting"));
gst_buffer_unref(buf);
return;
}
@@ -255,9 +257,10 @@ gst_xviddec_chain (GstPad *pad,
if ((ret = xvid_decore(xviddec->handle, XVID_DEC_DECODE,
&xframe, NULL))) {
- gst_element_error(GST_ELEMENT(xviddec),
- "Error decoding xvid frame: %s (%d)\n",
- gst_xvid_error(ret), ret);
+ 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_buffer_unref(buf);
return;
}
diff --git a/ext/xvid/gstxvidenc.c b/ext/xvid/gstxvidenc.c
index b217b652..7561848f 100644
--- a/ext/xvid/gstxvidenc.c
+++ b/ext/xvid/gstxvidenc.c
@@ -237,9 +237,10 @@ gst_xvidenc_setup (GstXvidEnc *xvidenc)
if ((ret = xvid_encore(NULL, XVID_ENC_CREATE,
&xenc, NULL)) != XVID_ERR_OK) {
- gst_element_error(GST_ELEMENT(xvidenc),
- "Error setting up xvid encoder: %s (%d)",
- gst_xvid_error(ret), ret);
+ 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));
return FALSE;
}
@@ -285,9 +286,10 @@ gst_xvidenc_chain (GstPad *pad,
if ((ret = xvid_encore(xvidenc->handle, XVID_ENC_ENCODE,
&xframe, NULL)) != XVID_ERR_OK) {
- gst_element_error(GST_ELEMENT(xvidenc),
- "Error encoding xvid frame: %s (%d)",
- gst_xvid_error(ret), ret);
+ 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_buffer_unref(buf);
return;
}