summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--ext/audiofile/gstafsink.c4
-rw-r--r--ext/audiofile/gstafsrc.c4
-rw-r--r--ext/divx/gstdivxdec.c8
-rw-r--r--ext/divx/gstdivxenc.c4
-rw-r--r--ext/faac/gstfaac.c8
-rw-r--r--ext/faad/gstfaad.c6
-rw-r--r--ext/ivorbis/vorbisfile.c4
-rw-r--r--ext/lcs/gstcolorspace.c2
-rw-r--r--ext/mpeg2enc/gstmpeg2enc.cc4
-rw-r--r--ext/mpeg2enc/gstmpeg2encpicturereader.cc2
-rw-r--r--ext/mplex/gstmplex.cc2
-rw-r--r--ext/mplex/gstmplexibitstream.cc2
-rw-r--r--ext/sdl/sdlvideosink.c12
-rw-r--r--ext/sndfile/gstsf.c16
-rw-r--r--ext/swfdec/gstswfdec.c2
-rw-r--r--ext/tarkin/gsttarkindec.c4
-rw-r--r--ext/tarkin/gsttarkinenc.c2
-rw-r--r--ext/xvid/gstxviddec.c6
-rw-r--r--ext/xvid/gstxvidenc.c4
-rw-r--r--gst-libs/gst/riff/riff-read.c16
-rw-r--r--gst/flx/gstflxdec.c2
-rw-r--r--gst/modplug/gstmodplug.cc2
-rw-r--r--gst/smpte/gstsmpte.c2
-rw-r--r--gst/speed/gstspeed.c2
-rw-r--r--sys/dxr3/dxr3audiosink.c14
-rw-r--r--sys/dxr3/dxr3spusink.c8
-rw-r--r--sys/dxr3/dxr3videosink.c10
-rw-r--r--sys/v4l2/gstv4l2src.c2
-rw-r--r--sys/v4l2/v4l2-overlay_calls.c8
-rw-r--r--sys/v4l2/v4l2_calls.c40
-rw-r--r--sys/v4l2/v4l2_calls.h10
-rw-r--r--sys/v4l2/v4l2src_calls.c22
-rw-r--r--sys/vcd/vcdsrc.c2
34 files changed, 123 insertions, 118 deletions
diff --git a/ChangeLog b/ChangeLog
index 9132bbab..faabab48 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2004-01-30 Thomas Vander Stichele <thomas at apestaart dot org>
+
+ * just about every source file:
+ gst_element_error -> GST_ELEMENT_ERROR
+
2004-01-29 Julien MOUTTE <julien@moutte.net>
* ext/gnomevfs/gstgnomevfssrc.c: (gst_gnomevfssrc_get): Fixing seeking
diff --git a/ext/audiofile/gstafsink.c b/ext/audiofile/gstafsink.c
index 9cd134e5..afef5f69 100644
--- a/ext/audiofile/gstafsink.c
+++ b/ext/audiofile/gstafsink.c
@@ -346,7 +346,7 @@ gst_afsink_open_file (GstAFSink *sink)
sink->file = afOpenFile (sink->filename, "w", outfilesetup);
if (sink->file == AF_NULL_FILEHANDLE)
{
- gst_element_error (sink, RESOURCE, OPEN_WRITE,
+ GST_ELEMENT_ERROR (sink, RESOURCE, OPEN_WRITE,
(_("Could not open file \"%s\" for writing"), sink->filename),
("system error: %s", strerror (errno)));
return FALSE;
@@ -369,7 +369,7 @@ gst_afsink_close_file (GstAFSink *sink)
/* if (fclose (sink->file) != 0) */
if (afCloseFile (sink->file) != 0)
{
- gst_element_error (sink, RESOURCE, CLOSE,
+ GST_ELEMENT_ERROR (sink, RESOURCE, CLOSE,
(_("Error closing file \"%s\""), sink->filename),
GST_ERROR_SYSTEM);
}
diff --git a/ext/audiofile/gstafsrc.c b/ext/audiofile/gstafsrc.c
index bffff45a..e2bdf3f6 100644
--- a/ext/audiofile/gstafsrc.c
+++ b/ext/audiofile/gstafsrc.c
@@ -316,7 +316,7 @@ gst_afsrc_open_file (GstAFSrc *src)
src->file = afOpenFile (src->filename, "r", AF_NULL_FILESETUP);
if (src->file == AF_NULL_FILEHANDLE)
{
- gst_element_error (src, RESOURCE, OPEN_READ,
+ GST_ELEMENT_ERROR (src, RESOURCE, OPEN_READ,
(_("Could not open file \"%s\" for reading"), src->filename),
("system error: %s", strerror (errno)));
return FALSE;
@@ -374,7 +374,7 @@ gst_afsrc_close_file (GstAFSrc *src)
/* if (fclose (src->file) != 0) */
if (afCloseFile (src->file) != 0)
{
- gst_element_error (src, RESOURCE, CLOSE,
+ GST_ELEMENT_ERROR (src, RESOURCE, CLOSE,
(_("Error closing file \"%s\""), src->filename),
GST_ERROR_SYSTEM);
} else {
diff --git a/ext/divx/gstdivxdec.c b/ext/divx/gstdivxdec.c
index 192c655e..15aecaa1 100644
--- a/ext/divx/gstdivxdec.c
+++ b/ext/divx/gstdivxdec.c
@@ -229,7 +229,7 @@ gst_divxdec_setup (GstDivxDec *divxdec)
break;
}
if ((ret = decore(&handle, DEC_OPT_INIT, &xinit, NULL)) != 0) {
- gst_element_error (divxdec, LIBRARY, INIT, NULL,
+ GST_ELEMENT_ERROR (divxdec, LIBRARY, INIT, NULL,
("divx library error: %s (%d)", gst_divxdec_error (ret), ret));
return FALSE;
}
@@ -247,7 +247,7 @@ gst_divxdec_setup (GstDivxDec *divxdec)
if ((ret = decore(divxdec->handle, DEC_OPT_SETOUT,
&output, NULL)) != 0) {
- gst_element_error (divxdec, LIBRARY, SETTINGS, NULL,
+ GST_ELEMENT_ERROR (divxdec, LIBRARY, SETTINGS, NULL,
("error setting output: %s (%d)",
gst_divxdec_error (ret), ret));
gst_divxdec_unset(divxdec);
@@ -285,7 +285,7 @@ gst_divxdec_chain (GstPad *pad,
if (!divxdec->handle) {
if (gst_divxdec_negotiate(divxdec) <= 0) {
- gst_element_error (divxdec, CORE, TOO_LAZY, NULL,
+ GST_ELEMENT_ERROR (divxdec, CORE, TOO_LAZY, NULL,
("No format set - aborting"));
gst_buffer_unref(buf);
return;
@@ -309,7 +309,7 @@ gst_divxdec_chain (GstPad *pad,
if ((ret = decore(divxdec->handle, DEC_OPT_FRAME,
&xframe, NULL))) {
- gst_element_error (divxdec, STREAM, DECODE, NULL,
+ GST_ELEMENT_ERROR (divxdec, STREAM, DECODE, NULL,
("Error decoding divx frame: %s (%d)",
gst_divxdec_error(ret), ret));
gst_buffer_unref(buf);
diff --git a/ext/divx/gstdivxenc.c b/ext/divx/gstdivxenc.c
index 1eaaebe1..a0b4e89a 100644
--- a/ext/divx/gstdivxenc.c
+++ b/ext/divx/gstdivxenc.c
@@ -295,7 +295,7 @@ gst_divxenc_setup (GstDivxEnc *divxenc)
output.temporal_level = 1.0;
if ((ret = encore(&handle, ENC_OPT_INIT, &input, &output))) {
- gst_element_error (divxenc, LIBRARY, SETTINGS, NULL,
+ GST_ELEMENT_ERROR (divxenc, LIBRARY, SETTINGS, NULL,
("Error setting up divx encoder: %s (%d)",
gst_divxenc_error(ret), ret));
return FALSE;
@@ -357,7 +357,7 @@ gst_divxenc_chain (GstPad *pad,
if ((ret = encore(divxenc->handle, ENC_OPT_ENCODE,
&xframe, &xres))) {
- gst_element_error (divxenc, LIBRARY, ENCODE, NULL,
+ GST_ELEMENT_ERROR (divxenc, LIBRARY, ENCODE, NULL,
("Error encoding divx frame: %s (%d)",
gst_divxenc_error(ret), ret));
gst_buffer_unref(buf);
diff --git a/ext/faac/gstfaac.c b/ext/faac/gstfaac.c
index f84acb6f..218d9bba 100644
--- a/ext/faac/gstfaac.c
+++ b/ext/faac/gstfaac.c
@@ -417,7 +417,7 @@ gst_faac_chain (GstPad *pad,
NULL, 0,
GST_BUFFER_DATA (outbuf),
faac->bytes)) < 0) {
- gst_element_error (faac, LIBRARY, ENCODE, NULL, NULL);
+ GST_ELEMENT_ERROR (faac, LIBRARY, ENCODE, NULL, NULL);
gst_event_unref (event);
gst_buffer_unref (outbuf);
return;
@@ -445,7 +445,7 @@ gst_faac_chain (GstPad *pad,
inbuf = GST_BUFFER (data);
if (!faac->handle) {
- gst_element_error (faac, CORE, NEGOTIATION, NULL,
+ GST_ELEMENT_ERROR (faac, CORE, NEGOTIATION, NULL,
("format wasn't negotiated before chain function"));
gst_buffer_unref (inbuf);
return;
@@ -454,7 +454,7 @@ gst_faac_chain (GstPad *pad,
if (!GST_PAD_CAPS (faac->srcpad)) {
if (gst_faac_srcconnect (faac->srcpad,
gst_pad_get_allowed_caps (faac->srcpad)) <= 0) {
- gst_element_error (faac, CORE, NEGOTIATION, NULL,
+ GST_ELEMENT_ERROR (faac, CORE, NEGOTIATION, NULL,
("failed to negotiate MPEG/AAC format with next element"));
gst_buffer_unref (inbuf);
return;
@@ -516,7 +516,7 @@ gst_faac_chain (GstPad *pad,
GST_BUFFER_SIZE (subbuf) / faac->bps,
GST_BUFFER_DATA (outbuf),
faac->bytes)) < 0) {
- gst_element_error (faac, LIBRARY, ENCODE, NULL, NULL);
+ GST_ELEMENT_ERROR (faac, LIBRARY, ENCODE, NULL, NULL);
gst_buffer_unref (inbuf);
gst_buffer_unref (subbuf);
return;
diff --git a/ext/faad/gstfaad.c b/ext/faad/gstfaad.c
index 67bcdddb..7f3a8c16 100644
--- a/ext/faad/gstfaad.c
+++ b/ext/faad/gstfaad.c
@@ -359,7 +359,7 @@ gst_faad_chain (GstPad *pad,
faad->channels = channels;
if (gst_faad_srcconnect (faad->srcpad,
gst_pad_get_allowed_caps (faad->srcpad)) <= 0) {
- gst_element_error (faad, CORE, NEGOTIATION, NULL, NULL);
+ GST_ELEMENT_ERROR (faad, CORE, NEGOTIATION, NULL, NULL);
gst_buffer_unref (buf);
return;
}
@@ -368,7 +368,7 @@ gst_faad_chain (GstPad *pad,
out = faacDecDecode (faad->handle, &info,
GST_BUFFER_DATA (buf), GST_BUFFER_SIZE (buf));
if (info.error) {
- gst_element_error (faad, STREAM, DECODE, NULL,
+ GST_ELEMENT_ERROR (faad, STREAM, DECODE, NULL,
("Failed to decode buffer: %s",
faacDecGetErrorMessage (info.error)));
gst_buffer_unref (buf);
@@ -381,7 +381,7 @@ gst_faad_chain (GstPad *pad,
faad->channels = info.channels;
if (gst_faad_srcconnect (faad->srcpad,
gst_pad_get_allowed_caps (faad->srcpad)) <= 0) {
- gst_element_error (faad, CORE, NEGOTIATION, NULL, NULL);
+ GST_ELEMENT_ERROR (faad, CORE, NEGOTIATION, NULL, NULL);
gst_buffer_unref (buf);
return;
}
diff --git a/ext/ivorbis/vorbisfile.c b/ext/ivorbis/vorbisfile.c
index 4f708aa0..182cdbb0 100644
--- a/ext/ivorbis/vorbisfile.c
+++ b/ext/ivorbis/vorbisfile.c
@@ -569,7 +569,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_error (element, STREAM, DECODE, NULL, NULL);
+ GST_ELEMENT_ERROR (element, STREAM, DECODE, NULL, NULL);
return;
}
ivorbisfile->need_discont = TRUE;
@@ -633,7 +633,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_error (ivorbisfile, CORE, NEGOTIATION, NULL, NULL);
+ GST_ELEMENT_ERROR (ivorbisfile, CORE, NEGOTIATION, NULL, NULL);
}
return;
}
diff --git a/ext/lcs/gstcolorspace.c b/ext/lcs/gstcolorspace.c
index 20edef6f..4658745c 100644
--- a/ext/lcs/gstcolorspace.c
+++ b/ext/lcs/gstcolorspace.c
@@ -316,7 +316,7 @@ gst_colorspace_srcconnect_func (GstPad *pad, GstCaps *caps, gboolean newcaps)
peercaps = peercaps->next;
}
- gst_element_error (space, CORE, NEGOTIATION, NULL, NULL);
+ GST_ELEMENT_ERROR (space, CORE, NEGOTIATION, NULL, NULL);
/* we disable ourself here */
space->disabled = TRUE;
diff --git a/ext/mpeg2enc/gstmpeg2enc.cc b/ext/mpeg2enc/gstmpeg2enc.cc
index 952affaa..5bf0ba15 100644
--- a/ext/mpeg2enc/gstmpeg2enc.cc
+++ b/ext/mpeg2enc/gstmpeg2enc.cc
@@ -239,7 +239,7 @@ gst_mpeg2enc_loop (GstElement *element)
gst_pad_set_element_private (enc->sinkpad, data);
if (!(caps = GST_PAD_CAPS (enc->sinkpad))) {
- gst_element_error (element, CORE, NEGOTIATION, (""),
+ GST_ELEMENT_ERROR (element, CORE, NEGOTIATION, (""),
("format wasn't negotiated before loop function"));
return;
}
@@ -251,7 +251,7 @@ gst_mpeg2enc_loop (GstElement *element)
/* and set caps on other side */
othercaps = enc->encoder->getFormat ();
if (gst_pad_set_explicit_caps (enc->srcpad, othercaps) <= 0) {
- gst_element_error (element, CORE, NEGOTIATION, (""), (""));
+ GST_ELEMENT_ERROR (element, CORE, NEGOTIATION, (""), (""));
delete enc->encoder;
enc->encoder = NULL;
return;
diff --git a/ext/mpeg2enc/gstmpeg2encpicturereader.cc b/ext/mpeg2enc/gstmpeg2encpicturereader.cc
index 0d9ae80b..439f4f10 100644
--- a/ext/mpeg2enc/gstmpeg2encpicturereader.cc
+++ b/ext/mpeg2enc/gstmpeg2encpicturereader.cc
@@ -98,7 +98,7 @@ GstMpeg2EncPictureReader::LoadFrame ()
if ((data = (GstData *) gst_pad_get_element_private (pad))) {
gst_pad_set_element_private (pad, NULL);
} else if (!(data = gst_pad_pull (pad))) {
- gst_element_error (gst_pad_get_parent (pad), RESOURCE, READ,
+ GST_ELEMENT_ERROR (gst_pad_get_parent (pad), RESOURCE, READ,
(NULL), (NULL));
return true;
}
diff --git a/ext/mplex/gstmplex.cc b/ext/mplex/gstmplex.cc
index ded48922..060e5d04 100644
--- a/ext/mplex/gstmplex.cc
+++ b/ext/mplex/gstmplex.cc
@@ -279,7 +279,7 @@ gst_mplex_loop (GstElement *element)
}
if (!mplex->job->video_tracks && !mplex->job->audio_tracks) {
- gst_element_error (element, CORE, NEGOTIATION, (""),
+ GST_ELEMENT_ERROR (element, CORE, NEGOTIATION, (""),
("no input video or audio tracks set up before loop function"));
return;
}
diff --git a/ext/mplex/gstmplexibitstream.cc b/ext/mplex/gstmplexibitstream.cc
index b47c074a..1867c657 100644
--- a/ext/mplex/gstmplexibitstream.cc
+++ b/ext/mplex/gstmplexibitstream.cc
@@ -53,7 +53,7 @@ GstMplexIBitStream::GstMplexIBitStream (GstPad *_pad,
gst_bytestream_peek_bytes (bs, &data, 1);
if (!ReadIntoBuffer () && buffered == 0) {
- gst_element_error (gst_pad_get_parent (_pad), RESOURCE, READ, (""),
+ GST_ELEMENT_ERROR (gst_pad_get_parent (_pad), RESOURCE, READ, (""),
("Failed to read from input pad %s",
gst_pad_get_name (pad)));
}
diff --git a/ext/sdl/sdlvideosink.c b/ext/sdl/sdlvideosink.c
index 040d9ed1..36d7c63f 100644
--- a/ext/sdl/sdlvideosink.c
+++ b/ext/sdl/sdlvideosink.c
@@ -366,7 +366,7 @@ gst_sdlvideosink_lock (GstSDLVideoSink *sdlvideosink)
{
/* assure that we've got a screen */
if (!sdlvideosink->screen || !sdlvideosink->overlay) {
- gst_element_error (sdlvideosink, LIBRARY, TOO_LAZY, NULL,
+ GST_ELEMENT_ERROR (sdlvideosink, LIBRARY, TOO_LAZY, NULL,
("Tried to lock screen without being set-up"));
return FALSE;
}
@@ -376,14 +376,14 @@ gst_sdlvideosink_lock (GstSDLVideoSink *sdlvideosink)
{
if (SDL_LockSurface(sdlvideosink->screen) < 0)
{
- gst_element_error (sdlvideosink, LIBRARY, TOO_LAZY, NULL,
+ GST_ELEMENT_ERROR (sdlvideosink, LIBRARY, TOO_LAZY, NULL,
("SDL: couldn't lock the SDL video window: %s", SDL_GetError()));
return FALSE;
}
}
if (SDL_LockYUVOverlay(sdlvideosink->overlay) < 0)
{
- gst_element_error (sdlvideosink, LIBRARY, TOO_LAZY, NULL,
+ GST_ELEMENT_ERROR (sdlvideosink, LIBRARY, TOO_LAZY, NULL,
("SDL: couldn\'t lock the SDL YUV overlay: %s", SDL_GetError()));
return FALSE;
}
@@ -427,7 +427,7 @@ gst_sdlvideosink_initsdl (GstSDLVideoSink *sdlvideosink)
/* Initialize the SDL library */
if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_NOPARACHUTE) < 0 ) {
- gst_element_error (sdlvideosink, LIBRARY, INIT, NULL,
+ GST_ELEMENT_ERROR (sdlvideosink, LIBRARY, INIT, NULL,
("Couldn't initialize SDL: %s", SDL_GetError()));
return FALSE;
}
@@ -464,7 +464,7 @@ gst_sdlvideosink_create (GstSDLVideoSink *sdlvideosink)
GST_VIDEOSINK_HEIGHT (sdlvideosink), 0, SDL_HWSURFACE | SDL_RESIZABLE);
if (sdlvideosink->screen == NULL)
{
- gst_element_error (sdlvideosink, LIBRARY, TOO_LAZY, NULL,
+ GST_ELEMENT_ERROR (sdlvideosink, LIBRARY, TOO_LAZY, NULL,
("SDL: Couldn't set %dx%d: %s", GST_VIDEOSINK_WIDTH (sdlvideosink),
GST_VIDEOSINK_HEIGHT (sdlvideosink), SDL_GetError()));
return FALSE;
@@ -475,7 +475,7 @@ gst_sdlvideosink_create (GstSDLVideoSink *sdlvideosink)
sdlvideosink->height, sdlvideosink->format, sdlvideosink->screen);
if ( sdlvideosink->overlay == NULL )
{
- gst_element_error (sdlvideosink, LIBRARY, TOO_LAZY, NULL,
+ GST_ELEMENT_ERROR (sdlvideosink, LIBRARY, TOO_LAZY, NULL,
("SDL: Couldn't create SDL YUV overlay (%dx%d \'" GST_FOURCC_FORMAT "\'): %s",
sdlvideosink->width, sdlvideosink->height,
GST_FOURCC_ARGS(sdlvideosink->format), SDL_GetError()));
diff --git a/ext/sndfile/gstsf.c b/ext/sndfile/gstsf.c
index 18100d8c..c7bc2c12 100644
--- a/ext/sndfile/gstsf.c
+++ b/ext/sndfile/gstsf.c
@@ -559,7 +559,7 @@ gst_sf_open_file (GstSF *this)
this->time = 0;
if (!this->filename) {
- gst_element_error (this, RESOURCE, NOT_FOUND,
+ GST_ELEMENT_ERROR (this, RESOURCE, NOT_FOUND,
(_("No filename specified")),
NULL);
return FALSE;
@@ -587,7 +587,7 @@ gst_sf_open_file (GstSF *this)
this->filename, info.samplerate, info.channels, info.format);
if (!sf_format_check (&info)) {
- gst_element_error (this, STREAM, ENCODE, NULL,
+ GST_ELEMENT_ERROR (this, STREAM, ENCODE, NULL,
("Input parameters (rate:%d, channels:%d, format:0x%x) invalid",
info.samplerate, info.channels, info.format));
return FALSE;
@@ -597,7 +597,7 @@ gst_sf_open_file (GstSF *this)
this->file = sf_open (this->filename, mode, &info);
if (!this->file) {
- gst_element_error (this, RESOURCE, OPEN_WRITE,
+ GST_ELEMENT_ERROR (this, RESOURCE, OPEN_WRITE,
(_("Could not open file \"%s\" for writing"), this->filename),
("soundfile error: %s", sf_strerror (NULL)));
return FALSE;
@@ -636,7 +636,7 @@ gst_sf_close_file (GstSF *this)
INFO_OBJ (this, "Closing file %s", this->filename);
if ((err = sf_close (this->file)))
- gst_element_error (this, RESOURCE, CLOSE,
+ GST_ELEMENT_ERROR (this, RESOURCE, CLOSE,
("Could not close file file \"%s\"", this->filename),
("soundfile error: %s", strerror (err)));
else
@@ -657,7 +657,7 @@ gst_sf_loop (GstElement *element)
this = (GstSF*)element;
if (this->channels == NULL) {
- gst_element_error (element, CORE, PAD, NULL, ("You must connect at least one pad to sndfile elements."));
+ GST_ELEMENT_ERROR (element, CORE, PAD, NULL, ("You must connect at least one pad to sndfile elements."));
return;
}
@@ -707,7 +707,7 @@ gst_sf_loop (GstElement *element)
"buffer-frames", G_TYPE_INT, this->buffer_frames,
NULL);
if (!gst_pad_try_set_caps (GST_SF_CHANNEL (l)->pad, caps)) {
- gst_element_error (this, CORE, NEGOTIATION, NULL,
+ GST_ELEMENT_ERROR (this, CORE, NEGOTIATION, NULL,
("Opened file with sample rate %d, but could not set caps", this->rate));
gst_sf_close_file (this);
return;
@@ -763,7 +763,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_error (element, CORE, NEGOTIATION, NULL,
+ GST_ELEMENT_ERROR (element, CORE, NEGOTIATION, NULL,
("format wasn't negotiated before chain function"));
return;
}
@@ -789,7 +789,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_error (element, RESOURCE, WRITE,
+ GST_ELEMENT_ERROR (element, RESOURCE, WRITE,
(_("Could not write to file \"%s\""), this->filename),
("soundfile error: %s", sf_strerror (this->file)));
}
diff --git a/ext/swfdec/gstswfdec.c b/ext/swfdec/gstswfdec.c
index c4714ad3..515374f4 100644
--- a/ext/swfdec/gstswfdec.c
+++ b/ext/swfdec/gstswfdec.c
@@ -288,7 +288,7 @@ gst_swfdec_loop(GstElement *element)
if (GST_PAD_LINK_SUCCESSFUL (link_ret)){
/* good */
} else {
- gst_element_error (swfdec, CORE, NEGOTIATION, NULL, NULL);
+ GST_ELEMENT_ERROR (swfdec, CORE, NEGOTIATION, NULL, NULL);
return;
}
swfdec->have_format = TRUE;
diff --git a/ext/tarkin/gsttarkindec.c b/ext/tarkin/gsttarkindec.c
index a2c27e9f..0121b840 100644
--- a/ext/tarkin/gsttarkindec.c
+++ b/ext/tarkin/gsttarkindec.c
@@ -209,7 +209,7 @@ gst_tarkindec_chain (GstPad *pad, GstData *_data)
tarkindec = GST_TARKINDEC (gst_pad_get_parent (pad));
if (!tarkindec->setup) {
- gst_element_error (tarkindec, CORE, NEGOTATION, NULL, ("decoder not initialized (input is not tarkin?)"));
+ GST_ELEMENT_ERROR (tarkindec, CORE, NEGOTATION, NULL, ("decoder not initialized (input is not tarkin?)"));
if (GST_IS_BUFFER (buf))
gst_buffer_unref (buf);
else
@@ -278,7 +278,7 @@ gst_tarkindec_chain (GstPad *pad, GstData *_data)
"framerate", GST_PROPS_FLOAT (0.) /* FIXME!!! */
)) <= 0)
{
- gst_element_error (tarkindec, CORE, NEGOTATION, NULL, ("could not output format"));
+ GST_ELEMENT_ERROR (tarkindec, CORE, NEGOTATION, NULL, ("could not output format"));
gst_buffer_unref (buf);
return;
}
diff --git a/ext/tarkin/gsttarkinenc.c b/ext/tarkin/gsttarkinenc.c
index b58e1ab6..c12abb3c 100644
--- a/ext/tarkin/gsttarkinenc.c
+++ b/ext/tarkin/gsttarkinenc.c
@@ -319,7 +319,7 @@ gst_tarkinenc_chain (GstPad *pad, GstData *_data)
tarkinenc = GST_TARKINENC (gst_pad_get_parent (pad));
if (!tarkinenc->setup) {
- gst_element_error (tarkinenc, CORE, NEGOTIATION, NULL, ("encoder not initialized (input is not tarkin?)"));
+ GST_ELEMENT_ERROR (tarkinenc, CORE, NEGOTIATION, NULL, ("encoder not initialized (input is not tarkin?)"));
if (GST_IS_BUFFER (buf))
gst_buffer_unref (buf);
else
diff --git a/ext/xvid/gstxviddec.c b/ext/xvid/gstxviddec.c
index 68b21d7d..06afc14b 100644
--- a/ext/xvid/gstxviddec.c
+++ b/ext/xvid/gstxviddec.c
@@ -201,7 +201,7 @@ gst_xviddec_setup (GstXvidDec *xviddec)
if ((ret = xvid_decore(NULL, XVID_DEC_CREATE,
&xdec, NULL)) < 0) {
- gst_element_error (xviddec, LIBRARY, SETTINGS, NULL,
+ GST_ELEMENT_ERROR (xviddec, LIBRARY, SETTINGS, NULL,
("Setting parameters %dx%d@%d failed: %s (%d)",
xviddec->width, xviddec->height, xviddec->csp,
gst_xvid_error(ret), ret));
@@ -228,7 +228,7 @@ gst_xviddec_chain (GstPad *pad,
g_return_if_fail(GST_IS_PAD(pad));
if (!xviddec->handle) {
- gst_element_error (xviddec, CORE, NEGOTIATION, NULL,
+ GST_ELEMENT_ERROR (xviddec, CORE, NEGOTIATION, NULL,
("format wasn't negotiated before chain function"));
gst_buffer_unref(buf);
return;
@@ -263,7 +263,7 @@ gst_xviddec_chain (GstPad *pad,
if ((ret = xvid_decore(xviddec->handle, XVID_DEC_DECODE,
&xframe, NULL)) < 0) {
- gst_element_error (xviddec, STREAM, DECODE, NULL,
+ GST_ELEMENT_ERROR (xviddec, STREAM, DECODE, NULL,
("Error decoding xvid frame: %s (%d)\n",
gst_xvid_error(ret), ret));
gst_buffer_unref(buf);
diff --git a/ext/xvid/gstxvidenc.c b/ext/xvid/gstxvidenc.c
index 1b9de2f5..02785b9d 100644
--- a/ext/xvid/gstxvidenc.c
+++ b/ext/xvid/gstxvidenc.c
@@ -299,7 +299,7 @@ gst_xvidenc_setup (GstXvidEnc *xvidenc)
if ((ret = xvid_encore(NULL, XVID_ENC_CREATE,
&xenc, NULL)) < 0) {
- gst_element_error (xvidenc, LIBRARY, INIT, NULL,
+ GST_ELEMENT_ERROR (xvidenc, LIBRARY, INIT, NULL,
("Error setting up xvid encoder: %s (%d)",
gst_xvid_error(ret), ret));
return FALSE;
@@ -355,7 +355,7 @@ gst_xvidenc_chain (GstPad *pad,
if ((ret = xvid_encore(xvidenc->handle, XVID_ENC_ENCODE,
&xframe, &xstats)) < 0) {
- gst_element_error (xvidenc, LIBRARY, ENCODE, NULL,
+ GST_ELEMENT_ERROR (xvidenc, LIBRARY, ENCODE, NULL,
("Error encoding xvid frame: %s (%d)",
gst_xvid_error(ret), ret));
gst_buffer_unref(buf);
diff --git a/gst-libs/gst/riff/riff-read.c b/gst-libs/gst/riff/riff-read.c
index 870f7782..4948db38 100644
--- a/gst-libs/gst/riff/riff-read.c
+++ b/gst-libs/gst/riff/riff-read.c
@@ -168,7 +168,7 @@ gst_riff_peek_head (GstRiffRead *riff,
gst_pad_event_default (riff->sinkpad, event);
} else {
gst_event_unref (event);
- gst_element_error (riff, RESOURCE, READ, NULL, NULL);
+ GST_ELEMENT_ERROR (riff, RESOURCE, READ, NULL, NULL);
}
return FALSE;
}
@@ -197,7 +197,7 @@ gst_riff_read_element_data (GstRiffRead *riff,
GstBuffer *buf = NULL;
if (gst_bytestream_peek (riff->bs, &buf, length) != length) {
- gst_element_error (riff, RESOURCE, READ, NULL, NULL);
+ GST_ELEMENT_ERROR (riff, RESOURCE, READ, NULL, NULL);
if (buf)
gst_buffer_unref (buf);
return NULL;
@@ -240,7 +240,7 @@ gst_riff_read_seek (GstRiffRead *riff,
/* now seek */
if (!gst_bytestream_seek (riff->bs, offset, GST_SEEK_METHOD_SET)) {
- gst_element_error (riff, RESOURCE, SEEK, NULL, NULL);
+ GST_ELEMENT_ERROR (riff, RESOURCE, SEEK, NULL, NULL);
return NULL;
}
@@ -252,7 +252,7 @@ gst_riff_read_seek (GstRiffRead *riff,
/* get the discont event and return */
gst_bytestream_get_status (riff->bs, &remaining, &event);
if (!event || GST_EVENT_TYPE (event) != GST_EVENT_DISCONTINUOUS) {
- gst_element_error (riff, CORE, EVENT, NULL,
+ GST_ELEMENT_ERROR (riff, CORE, EVENT, NULL,
("No discontinuity event after seek"));
if (event)
gst_event_unref (event);
@@ -296,7 +296,7 @@ gst_riff_peek_list (GstRiffRead *riff)
}
if (gst_bytestream_peek_bytes (riff->bs, &data, 12) != 12) {
- gst_element_error (riff, RESOURCE, READ, NULL, NULL);
+ GST_ELEMENT_ERROR (riff, RESOURCE, READ, NULL, NULL);
return 0;
}
@@ -656,7 +656,7 @@ gst_riff_read_list (GstRiffRead *riff,
}
gst_bytestream_flush_fast (riff->bs, 8);
if (gst_bytestream_peek_bytes (riff->bs, &data, 4) != 4) {
- gst_element_error (riff, RESOURCE, READ, NULL, NULL);
+ GST_ELEMENT_ERROR (riff, RESOURCE, READ, NULL, NULL);
return FALSE;
}
gst_bytestream_flush_fast (riff->bs, 4);
@@ -844,14 +844,14 @@ gst_riff_read_header (GstRiffRead *riff,
if (!gst_riff_peek_head (riff, &tag, &length, NULL))
return FALSE;
if (tag != GST_RIFF_TAG_RIFF) {
- gst_element_error (riff, STREAM, WRONG_TYPE, NULL, NULL);
+ GST_ELEMENT_ERROR (riff, STREAM, WRONG_TYPE, NULL, NULL);
return FALSE;
}
gst_bytestream_flush_fast (riff->bs, 8);
/* doctype */
if (gst_bytestream_peek_bytes (riff->bs, &data, 4) != 4) {
- gst_element_error (riff, RESOURCE, READ, NULL, NULL);
+ GST_ELEMENT_ERROR (riff, RESOURCE, READ, NULL, NULL);
return FALSE;
}
gst_bytestream_flush_fast (riff->bs, 4);
diff --git a/gst/flx/gstflxdec.c b/gst/flx/gstflxdec.c
index c861a1f4..a88b1a74 100644
--- a/gst/flx/gstflxdec.c
+++ b/gst/flx/gstflxdec.c
@@ -463,7 +463,7 @@ gst_flxdec_loop (GstElement *element)
if (flxh->type != FLX_MAGICHDR_FLI &&
flxh->type != FLX_MAGICHDR_FLC &&
flxh->type != FLX_MAGICHDR_FLX) {
- gst_element_error (element, STREAM, WRONG_TYPE, NULL, ("not a flx file (type %d)\n", flxh->type));
+ GST_ELEMENT_ERROR (element, STREAM, WRONG_TYPE, NULL, ("not a flx file (type %d)\n", flxh->type));
return;
}
diff --git a/gst/modplug/gstmodplug.cc b/gst/modplug/gstmodplug.cc
index 035557f4..12151afb 100644
--- a/gst/modplug/gstmodplug.cc
+++ b/gst/modplug/gstmodplug.cc
@@ -575,7 +575,7 @@ gst_modplug_loop (GstElement *element)
if (!GST_PAD_CAPS (modplug->srcpad) &&
modplug_negotiate (modplug) <= 0) {
- gst_element_error (modplug, CORE, NEGOTIATION, (NULL), (NULL));
+ GST_ELEMENT_ERROR (modplug, CORE, NEGOTIATION, (NULL), (NULL));
return;
}
diff --git a/gst/smpte/gstsmpte.c b/gst/smpte/gstsmpte.c
index 5cfbcc0b..9aef470c 100644
--- a/gst/smpte/gstsmpte.c
+++ b/gst/smpte/gstsmpte.c
@@ -371,7 +371,7 @@ gst_smpte_loop (GstElement *element)
"framerate", G_TYPE_DOUBLE, smpte->fps, NULL);
if (!gst_pad_try_set_caps (smpte->srcpad, caps)) {
- gst_element_error (smpte, CORE, NEGOTIATION, NULL, NULL);
+ GST_ELEMENT_ERROR (smpte, CORE, NEGOTIATION, NULL, NULL);
return;
}
}
diff --git a/gst/speed/gstspeed.c b/gst/speed/gstspeed.c
index 6a058d48..366c2bec 100644
--- a/gst/speed/gstspeed.c
+++ b/gst/speed/gstspeed.c
@@ -245,7 +245,7 @@ speed_loop (GstElement *element)
#include "filter.func"
#undef _FORMAT
} else {
- gst_element_error (filter, CORE, NEGOTIATION, NULL,
+ GST_ELEMENT_ERROR (filter, CORE, NEGOTIATION, NULL,
("format wasn't negotiated before chain function"));
gst_element_yield (element);
}
diff --git a/sys/dxr3/dxr3audiosink.c b/sys/dxr3/dxr3audiosink.c
index 5e986e21..362ed17a 100644
--- a/sys/dxr3/dxr3audiosink.c
+++ b/sys/dxr3/dxr3audiosink.c
@@ -310,7 +310,7 @@ dxr3audiosink_open (Dxr3AudioSink *sink)
sink->audio_fd = open (sink->audio_filename, O_WRONLY);
if (sink->audio_fd < 0) {
- gst_element_error (sink, RESOURCE, OPEN_WRITE,
+ GST_ELEMENT_ERROR (sink, RESOURCE, OPEN_WRITE,
(_("Could not open audio device \"%s\" for writing"), sink->audio_filename),
GST_ERROR_SYSTEM);
return FALSE;
@@ -322,7 +322,7 @@ dxr3audiosink_open (Dxr3AudioSink *sink)
sink->control_fd = open (sink->control_filename, O_WRONLY);
if (sink->control_fd < 0) {
- gst_element_error (sink, RESOURCE, OPEN_WRITE,
+ GST_ELEMENT_ERROR (sink, RESOURCE, OPEN_WRITE,
(_("Could not open control device \"%s\" for writing"), sink->control_filename),
GST_ERROR_SYSTEM);
return FALSE;
@@ -356,7 +356,7 @@ dxr3audiosink_set_mode_pcm (Dxr3AudioSink *sink)
tmp = oss_mode;
if (ioctl (sink->audio_fd, SNDCTL_DSP_SETFMT, &tmp) < 0 ||
tmp != oss_mode) {
- gst_element_error (sink, RESOURCE, SETTINGS,
+ GST_ELEMENT_ERROR (sink, RESOURCE, SETTINGS,
(_("Could not configure audio device \"%s\""), sink->audio_filename),
GST_ERROR_SYSTEM);
return FALSE;
@@ -370,7 +370,7 @@ dxr3audiosink_set_mode_pcm (Dxr3AudioSink *sink)
/* Set the sampling rate. */
tmp = sink->rate;
if (ioctl (sink->audio_fd, SNDCTL_DSP_SPEED, &tmp) < 0) {
- gst_element_error (sink, RESOURCE, SETTINGS,
+ GST_ELEMENT_ERROR (sink, RESOURCE, SETTINGS,
(_("Could not set audio device \"%s\" to %d Hz"), sink->audio_filename, sink->rate),
GST_ERROR_SYSTEM);
return FALSE;
@@ -407,7 +407,7 @@ dxr3audiosink_set_mode_ac3 (Dxr3AudioSink *sink)
tmp = AC3_BYTE_RATE;
if (ioctl (sink->audio_fd, SNDCTL_DSP_SPEED, &tmp) < 0 ||
tmp != AC3_BYTE_RATE) {
- gst_element_error (sink, RESOURCE, SETTINGS,
+ GST_ELEMENT_ERROR (sink, RESOURCE, SETTINGS,
(_("Could not set audio device \"%s\" to %d Hz"), sink->audio_filename, AC3_BYTE_RATE),
GST_ERROR_SYSTEM);
return FALSE;
@@ -435,14 +435,14 @@ dxr3audiosink_close (Dxr3AudioSink *sink)
g_return_if_fail (GST_FLAG_IS_SET (sink, DXR3AUDIOSINK_OPEN));
if (close (sink->audio_fd) != 0) {
- gst_element_error (sink, RESOURCE, CLOSE,
+ GST_ELEMENT_ERROR (sink, RESOURCE, CLOSE,
(_("Could not close audio device \"%s\""), sink->audio_filename),
GST_ERROR_SYSTEM);
return;
}
if (close (sink->control_fd) != 0) {
- gst_element_error (sink, RESOURCE, CLOSE,
+ GST_ELEMENT_ERROR (sink, RESOURCE, CLOSE,
(_("Could not close control device \"%s\""), sink->audio_filename),
GST_ERROR_SYSTEM);
return;
diff --git a/sys/dxr3/dxr3spusink.c b/sys/dxr3/dxr3spusink.c
index d66ea949..e34e56e9 100644
--- a/sys/dxr3/dxr3spusink.c
+++ b/sys/dxr3/dxr3spusink.c
@@ -281,7 +281,7 @@ dxr3spusink_open (Dxr3SpuSink *sink)
sink->spu_fd = open (sink->spu_filename, O_WRONLY);
if (sink->spu_fd < 0) {
- gst_element_error (sink, RESOURCE, OPEN_WRITE,
+ GST_ELEMENT_ERROR (sink, RESOURCE, OPEN_WRITE,
(_("Could not open spu device \"%s\" for writing"), sink->spu_filename), GST_ERROR_SYSTEM);
return FALSE;
}
@@ -292,7 +292,7 @@ dxr3spusink_open (Dxr3SpuSink *sink)
sink->control_fd = open (sink->control_filename, O_WRONLY);
if (sink->control_fd < 0) {
- gst_element_error (sink, RESOURCE, OPEN_WRITE,
+ GST_ELEMENT_ERROR (sink, RESOURCE, OPEN_WRITE,
(_("Could not open control device \"%s\" for writing"), sink->control_filename), GST_ERROR_SYSTEM);
return FALSE;
}
@@ -309,7 +309,7 @@ dxr3spusink_close (Dxr3SpuSink *sink)
g_return_if_fail (GST_FLAG_IS_SET (sink, DXR3SPUSINK_OPEN));
if (close (sink->spu_fd) != 0) {
- gst_element_error (sink, RESOURCE, CLOSE,
+ GST_ELEMENT_ERROR (sink, RESOURCE, CLOSE,
(_("Could not close spu device \"%s\""), sink->spu_filename),
GST_ERROR_SYSTEM);
return;
@@ -317,7 +317,7 @@ dxr3spusink_close (Dxr3SpuSink *sink)
if (close (sink->control_fd) != 0)
{
- gst_element_error (sink, RESOURCE, CLOSE,
+ GST_ELEMENT_ERROR (sink, RESOURCE, CLOSE,
(_("Could not close control device \"%s\""), sink->control_filename),
GST_ERROR_SYSTEM);
return;
diff --git a/sys/dxr3/dxr3videosink.c b/sys/dxr3/dxr3videosink.c
index 84816a51..36ce36dd 100644
--- a/sys/dxr3/dxr3videosink.c
+++ b/sys/dxr3/dxr3videosink.c
@@ -277,7 +277,7 @@ dxr3videosink_open (Dxr3VideoSink *sink)
sink->video_fd = open (sink->video_filename, O_WRONLY);
if (sink->video_fd < 0) {
- gst_element_error (sink, RESOURCE, OPEN_WRITE,
+ GST_ELEMENT_ERROR (sink, RESOURCE, OPEN_WRITE,
(_("Could not open video device \"%s\" for writing"), sink->video_filename),
GST_ERROR_SYSTEM);
return FALSE;
@@ -289,7 +289,7 @@ dxr3videosink_open (Dxr3VideoSink *sink)
sink->control_fd = open (sink->control_filename, O_WRONLY);
if (sink->control_fd < 0) {
- gst_element_error (sink, RESOURCE, OPEN_WRITE,
+ GST_ELEMENT_ERROR (sink, RESOURCE, OPEN_WRITE,
(_("Could not open control device \"%s\" for writing"), sink->control_filename),
GST_ERROR_SYSTEM);
return FALSE;
@@ -308,7 +308,7 @@ dxr3videosink_close (Dxr3VideoSink *sink)
if (close (sink->video_fd) != 0)
{
- gst_element_error (sink, RESOURCE, CLOSE,
+ GST_ELEMENT_ERROR (sink, RESOURCE, CLOSE,
(_("Could not close video device \"%s\""), sink->video_filename),
GST_ERROR_SYSTEM);
return;
@@ -316,7 +316,7 @@ dxr3videosink_close (Dxr3VideoSink *sink)
if (close (sink->control_fd) != 0)
{
- gst_element_error (sink, RESOURCE, CLOSE,
+ GST_ELEMENT_ERROR (sink, RESOURCE, CLOSE,
(_("Could not close control device \"%s\""), sink->control_filename),
GST_ERROR_SYSTEM);
return;
@@ -464,7 +464,7 @@ dxr3videosink_write_data (Dxr3VideoSink *sink, guint cut)
while (size > 0) {
written = write (sink->video_fd, data, size);
if (written < 0) {
- gst_element_error (sink, RESOURCE, WRITE,
+ GST_ELEMENT_ERROR (sink, RESOURCE, WRITE,
(_("Could not write to device \"%s\""), sink->video_filename),
GST_ERROR_SYSTEM);
break;
diff --git a/sys/v4l2/gstv4l2src.c b/sys/v4l2/gstv4l2src.c
index d0b480f9..697fe421 100644
--- a/sys/v4l2/gstv4l2src.c
+++ b/sys/v4l2/gstv4l2src.c
@@ -817,7 +817,7 @@ gst_v4l2src_get (GstPad *pad)
if (v4l2src->use_fixed_fps &&
(fps = gst_v4l2src_get_fps(v4l2src)) == 0) {
- gst_element_error (v4l2src, RESOURCE, SETTINGS, NULL, ("could not get frame rate for element"));
+ GST_ELEMENT_ERROR (v4l2src, RESOURCE, SETTINGS, NULL, ("could not get frame rate for element"));
return NULL;
}
diff --git a/sys/v4l2/v4l2-overlay_calls.c b/sys/v4l2/v4l2-overlay_calls.c
index b455ba3c..4e5fb9f0 100644
--- a/sys/v4l2/v4l2-overlay_calls.c
+++ b/sys/v4l2/v4l2-overlay_calls.c
@@ -59,7 +59,7 @@ gst_v4l2_set_display (GstV4l2Element *v4l2element)
switch (system(buff)) {
case -1:
- gst_element_error (v4l2element, RESOURCE, FAILED,
+ GST_ELEMENT_ERROR (v4l2element, RESOURCE, FAILED,
(_("Could not start v4l-conf")),
GST_ERROR_SYSTEM);
g_free(buff);
@@ -67,7 +67,7 @@ gst_v4l2_set_display (GstV4l2Element *v4l2element)
case 0:
break;
default:
- gst_element_error (v4l2element, RESOURCE, FAILED,
+ GST_ELEMENT_ERROR (v4l2element, RESOURCE, FAILED,
(_("Executing v4l-conf failed")),
GST_ERROR_SYSTEM);
g_free(buff);
@@ -112,7 +112,7 @@ gst_v4l2_set_window (GstElement *element,
fmt.fmt.win.bitmap = NULL;
if (ioctl(v4l2element->video_fd, VIDIOC_S_FMT, &fmt) < 0) {
- gst_element_error (v4l2element, RESOURCE, TOO_LAZY, NULL,
+ GST_ELEMENT_ERROR (v4l2element, RESOURCE, TOO_LAZY, NULL,
("Failed to set the video window: %s", g_strerror (errno)));
return FALSE;
}
@@ -138,7 +138,7 @@ gst_v4l2_enable_overlay (GstV4l2Element *v4l2element,
GST_V4L2_CHECK_OVERLAY(v4l2element);
if (ioctl(v4l2element->video_fd, VIDIOC_OVERLAY, &doit) < 0) {
- gst_element_error (v4l2element, RESOURCE, TOO_LAZY, NULL,
+ GST_ELEMENT_ERROR (v4l2element, RESOURCE, TOO_LAZY, NULL,
("Failed to %s overlay display: %s",
enable?"enable":"disable", g_strerror (errno)));
return FALSE;
diff --git a/sys/v4l2/v4l2_calls.c b/sys/v4l2/v4l2_calls.c
index 1ef03f91..c206d987 100644
--- a/sys/v4l2/v4l2_calls.c
+++ b/sys/v4l2/v4l2_calls.c
@@ -55,7 +55,7 @@ gst_v4l2_get_capabilities (GstV4l2Element *v4l2element)
GST_V4L2_CHECK_OPEN(v4l2element);
if (ioctl(v4l2element->video_fd, VIDIOC_QUERYCAP, &(v4l2element->vcap)) < 0) {
- gst_element_error (v4l2element, RESOURCE, SETTINGS, (""),
+ GST_ELEMENT_ERROR (v4l2element, RESOURCE, SETTINGS, (""),
("Error getting %s capabilities: %s",
v4l2element->device, g_strerror(errno)));
return FALSE;
@@ -99,7 +99,7 @@ gst_v4l2_fill_lists (GstV4l2Element *v4l2element)
if (errno == EINVAL)
break; /* end of enumeration */
else {
- gst_element_error (v4l2element, RESOURCE, SETTINGS, (""),
+ GST_ELEMENT_ERROR (v4l2element, RESOURCE, SETTINGS, (""),
("Failed to get %d in input enumeration for %s: %s",
n, v4l2element->device,
g_strerror (errno)));
@@ -122,7 +122,7 @@ gst_v4l2_fill_lists (GstV4l2Element *v4l2element)
vtun.index = input.tuner;
if (ioctl(v4l2element->video_fd, VIDIOC_G_TUNER,
&vtun) < 0) {
- gst_element_error (v4l2element, RESOURCE, SETTINGS, (""),
+ GST_ELEMENT_ERROR (v4l2element, RESOURCE, SETTINGS, (""),
("Failed to get tuner %d settings on %s: %s",
input.tuner,
v4l2element->device,
@@ -161,7 +161,7 @@ gst_v4l2_fill_lists (GstV4l2Element *v4l2element)
if (errno == EINVAL)
break; /* end of enumeration */
else {
- gst_element_error (v4l2element, RESOURCE, SETTINGS, (""),
+ GST_ELEMENT_ERROR (v4l2element, RESOURCE, SETTINGS, (""),
("Failed to get %d in output enumeration for %s: %s",
n, v4l2element->device,
g_strerror (errno)));
@@ -200,7 +200,7 @@ gst_v4l2_fill_lists (GstV4l2Element *v4l2element)
if (errno == EINVAL)
break; /* end of enumeration */
else {
- gst_element_error (v4l2element, RESOURCE, SETTINGS, (""),
+ GST_ELEMENT_ERROR (v4l2element, RESOURCE, SETTINGS, (""),
("Failed to get %d in norm enumeration for %s: %s",
n, v4l2element->device,
g_strerror (errno)));
@@ -237,7 +237,7 @@ gst_v4l2_fill_lists (GstV4l2Element *v4l2element)
else
break;
} else {
- gst_element_error (v4l2element, RESOURCE, SETTINGS, (""),
+ GST_ELEMENT_ERROR (v4l2element, RESOURCE, SETTINGS, (""),
("Failed to get %d in control enumeration for %s: %s",
n, v4l2element->device,
g_strerror (errno)));
@@ -289,7 +289,7 @@ gst_v4l2_fill_lists (GstV4l2Element *v4l2element)
if (errno == EINVAL)
break; /* end of enumeration */
else {
- gst_element_error (v4l2element, RESOURCE, SETTINGS, (""),
+ GST_ELEMENT_ERROR (v4l2element, RESOURCE, SETTINGS, (""),
("Failed to get %d in menu enumeration for %s: %s",
n, v4l2element->device,
g_strerror (errno)));
@@ -409,7 +409,7 @@ gst_v4l2_open (GstV4l2Element *v4l2element)
/* open the device */
v4l2element->video_fd = open(v4l2element->device, O_RDWR);
if (!GST_V4L2_IS_OPEN(v4l2element)) {
- gst_element_error (v4l2element, RESOURCE, OPEN_READ_WRITE,
+ GST_ELEMENT_ERROR (v4l2element, RESOURCE, OPEN_READ_WRITE,
(_("Could not open device \"%s\" for reading and writing"), v4l2element->device),
GST_ERROR_SYSTEM);
goto error;
@@ -423,7 +423,7 @@ gst_v4l2_open (GstV4l2Element *v4l2element)
/* do we need to be a capture device? */
if (GST_IS_V4L2SRC(v4l2element) &&
!(v4l2element->vcap.capabilities & V4L2_CAP_VIDEO_CAPTURE)) {
- gst_element_error (v4l2element, RESOURCE, NOT_FOUND,
+ GST_ELEMENT_ERROR (v4l2element, RESOURCE, NOT_FOUND,
(_("Device \"%s\" is not a capture device"), v4l2element->device),
("Capabilities: 0x%x", v4l2element->vcap.capabilities));
goto error;
@@ -492,7 +492,7 @@ gst_v4l2_get_norm (GstV4l2Element *v4l2element,
GST_V4L2_CHECK_OPEN(v4l2element);
if (ioctl(v4l2element->video_fd, VIDIOC_G_STD, norm) < 0) {
- gst_element_error (v4l2element, RESOURCE, SETTINGS, (""),
+ GST_ELEMENT_ERROR (v4l2element, RESOURCE, SETTINGS, (""),
("Failed to get the current norm for device %s: %s",
v4l2element->device, g_strerror(errno)));
return FALSE;
@@ -517,7 +517,7 @@ gst_v4l2_set_norm (GstV4l2Element *v4l2element,
GST_V4L2_CHECK_NOT_ACTIVE(v4l2element);
if (ioctl(v4l2element->video_fd, VIDIOC_S_STD, &norm) < 0) {
- gst_element_error (v4l2element, RESOURCE, SETTINGS, (""),
+ GST_ELEMENT_ERROR (v4l2element, RESOURCE, SETTINGS, (""),
("Failed to set norm 0x%llx for device %s: %s",
norm, v4l2element->device, g_strerror(errno)));
return FALSE;
@@ -543,7 +543,7 @@ gst_v4l2_get_input (GstV4l2Element *v4l2element,
GST_V4L2_CHECK_OPEN(v4l2element);
if (ioctl(v4l2element->video_fd, VIDIOC_G_INPUT, &n) < 0) {
- gst_element_error (v4l2element, RESOURCE, SETTINGS, (""),
+ GST_ELEMENT_ERROR (v4l2element, RESOURCE, SETTINGS, (""),
("Failed to get current input on device %s: %s",
v4l2element->device, g_strerror(errno)));
return FALSE;
@@ -570,7 +570,7 @@ gst_v4l2_set_input (GstV4l2Element *v4l2element,
GST_V4L2_CHECK_NOT_ACTIVE(v4l2element);
if (ioctl(v4l2element->video_fd, VIDIOC_S_INPUT, &input) < 0) {
- gst_element_error (v4l2element, RESOURCE, SETTINGS, (""),
+ GST_ELEMENT_ERROR (v4l2element, RESOURCE, SETTINGS, (""),
("Failed to set input %d on device %s: %s",
input, v4l2element->device, g_strerror(errno)));
return FALSE;
@@ -596,7 +596,7 @@ gst_v4l2_get_output (GstV4l2Element *v4l2element,
GST_V4L2_CHECK_OPEN(v4l2element);
if (ioctl(v4l2element->video_fd, VIDIOC_G_OUTPUT, &n) < 0) {
- gst_element_error (v4l2element, RESOURCE, SETTINGS, (""),
+ GST_ELEMENT_ERROR (v4l2element, RESOURCE, SETTINGS, (""),
("Failed to get current output on device %s: %s",
v4l2element->device, g_strerror(errno)));
return FALSE;
@@ -623,7 +623,7 @@ gst_v4l2_set_output (GstV4l2Element *v4l2element,
GST_V4L2_CHECK_NOT_ACTIVE(v4l2element);
if (ioctl(v4l2element->video_fd, VIDIOC_S_OUTPUT, &output) < 0) {
- gst_element_error (v4l2element, RESOURCE, SETTINGS, (""),
+ GST_ELEMENT_ERROR (v4l2element, RESOURCE, SETTINGS, (""),
("Failed to set output %d on device %s: %s",
output, v4l2element->device, g_strerror(errno)));
return FALSE;
@@ -651,7 +651,7 @@ gst_v4l2_get_frequency (GstV4l2Element *v4l2element,
freq.tuner = tunernum;
if (ioctl(v4l2element->video_fd, VIDIOC_G_FREQUENCY, &freq) < 0) {
- gst_element_error (v4l2element, RESOURCE, SETTINGS, (""),
+ GST_ELEMENT_ERROR (v4l2element, RESOURCE, SETTINGS, (""),
("Failed to get current tuner frequency for device %s: %s",
v4l2element->device, g_strerror(errno)));
return FALSE;
@@ -686,7 +686,7 @@ gst_v4l2_set_frequency (GstV4l2Element *v4l2element,
freq.frequency = frequency;
if (ioctl(v4l2element->video_fd, VIDIOC_S_FREQUENCY, &freq) < 0) {
- gst_element_error (v4l2element, RESOURCE, SETTINGS, (""),
+ GST_ELEMENT_ERROR (v4l2element, RESOURCE, SETTINGS, (""),
("Failed to set tuner frequency to %lu for device %s: %s",
frequency, v4l2element->device, g_strerror(errno)));
return FALSE;
@@ -714,7 +714,7 @@ gst_v4l2_signal_strength (GstV4l2Element *v4l2element,
tuner.index = tunernum;
if (ioctl(v4l2element->video_fd, VIDIOC_G_TUNER, &tuner) < 0) {
- gst_element_error (v4l2element, RESOURCE, SETTINGS, (""),
+ GST_ELEMENT_ERROR (v4l2element, RESOURCE, SETTINGS, (""),
("Failed to get signal strength for device %s: %s",
v4l2element->device, g_strerror(errno)));
return FALSE;
@@ -746,7 +746,7 @@ gst_v4l2_get_attribute (GstV4l2Element *v4l2element,
control.id = attribute_num;
if (ioctl(v4l2element->video_fd, VIDIOC_G_CTRL, &control) < 0) {
- gst_element_error (v4l2element, RESOURCE, SETTINGS, (""),
+ GST_ELEMENT_ERROR (v4l2element, RESOURCE, SETTINGS, (""),
("Failed to get value for control %d on device %s: %s",
attribute_num, v4l2element->device, g_strerror(errno)));
return FALSE;
@@ -779,7 +779,7 @@ gst_v4l2_set_attribute (GstV4l2Element *v4l2element,
control.value = value;
if (ioctl(v4l2element->video_fd, VIDIOC_S_CTRL, &control) < 0) {
- gst_element_error (v4l2element, RESOURCE, SETTINGS, (""),
+ GST_ELEMENT_ERROR (v4l2element, RESOURCE, SETTINGS, (""),
("Failed to set value %d for control %d on device %s: %s",
value, attribute_num, v4l2element->device, g_strerror(errno)));
return FALSE;
diff --git a/sys/v4l2/v4l2_calls.h b/sys/v4l2/v4l2_calls.h
index c40100d9..fecfa93f 100644
--- a/sys/v4l2/v4l2_calls.h
+++ b/sys/v4l2/v4l2_calls.h
@@ -39,7 +39,7 @@
#define GST_V4L2_CHECK_OPEN(element) \
if (!GST_V4L2_IS_OPEN(element)) \
{ \
- gst_element_error (element, RESOURCE, TOO_LAZY, \
+ GST_ELEMENT_ERROR (element, RESOURCE, TOO_LAZY, \
(_("Device is not open")), NULL); \
return FALSE; \
}
@@ -48,7 +48,7 @@
#define GST_V4L2_CHECK_NOT_OPEN(element) \
if (GST_V4L2_IS_OPEN(element)) \
{ \
- gst_element_error (element, RESOURCE, TOO_LAZY, \
+ GST_ELEMENT_ERROR (element, RESOURCE, TOO_LAZY, \
(_("Device is open")), NULL); \
return FALSE; \
}
@@ -57,7 +57,7 @@
#define GST_V4L2_CHECK_OVERLAY(element) \
if (!GST_V4L2_IS_OVERLAY(element)) \
{ \
- gst_element_error (element, RESOURCE, TOO_LAZY, \
+ GST_ELEMENT_ERROR (element, RESOURCE, TOO_LAZY, \
NULL, ("Device cannot handle overlay")); \
return FALSE; \
}
@@ -66,7 +66,7 @@
#define GST_V4L2_CHECK_ACTIVE(element) \
if (!GST_V4L2_IS_ACTIVE(element)) \
{ \
- gst_element_error (element, RESOURCE, SETTINGS, \
+ GST_ELEMENT_ERROR (element, RESOURCE, SETTINGS, \
NULL, ("Device is not in streaming mode")); \
return FALSE; \
}
@@ -75,7 +75,7 @@
#define GST_V4L2_CHECK_NOT_ACTIVE(element) \
if (GST_V4L2_IS_ACTIVE(element)) \
{ \
- gst_element_error (element, RESOURCE, SETTINGS, \
+ GST_ELEMENT_ERROR (element, RESOURCE, SETTINGS, \
NULL, ("Device is in streaming mode")); \
return FALSE; \
}
diff --git a/sys/v4l2/v4l2src_calls.c b/sys/v4l2/v4l2src_calls.c
index a329bd5e..082e000f 100644
--- a/sys/v4l2/v4l2src_calls.c
+++ b/sys/v4l2/v4l2src_calls.c
@@ -72,7 +72,7 @@ gst_v4l2src_fill_format_list (GstV4l2Src *v4l2src)
if (errno == EINVAL) {
break; /* end of enumeration */
} else {
- gst_element_error (v4l2src, RESOURCE, SETTINGS, NULL,
+ GST_ELEMENT_ERROR (v4l2src, RESOURCE, SETTINGS, NULL,
("failed to get number %d in pixelformat enumeration for %s: %s",
n, GST_V4L2ELEMENT(v4l2src)->device, g_strerror (errno)));
g_free (format);
@@ -117,7 +117,7 @@ gst_v4l2src_queue_frame (GstV4l2Src *v4l2src,
GST_LOG_OBJECT (v4l2src, "queueing frame %u", i);
if (ioctl(GST_V4L2ELEMENT(v4l2src)->video_fd, VIDIOC_QBUF, &v4l2src->pool->buffers[i].buffer) < 0) {
- gst_element_error (v4l2src, RESOURCE, WRITE,
+ GST_ELEMENT_ERROR (v4l2src, RESOURCE, WRITE,
(_("Could not write to device \"%s\""), GST_V4L2ELEMENT(v4l2src)->device),
("Error queueing buffer %u on device %s", i, g_strerror(errno)));
return FALSE;
@@ -142,7 +142,7 @@ gst_v4l2src_grab_frame (GstV4l2Src *v4l2src)
while (ioctl(GST_V4L2ELEMENT(v4l2src)->video_fd, VIDIOC_DQBUF, &buffer) < 0) {
/* if the sync() got interrupted, we can retry */
if (errno != EINTR) {
- gst_element_error (v4l2src, RESOURCE, SYNC, NULL, ("could not sync on a buffer on device %s: %s",
+ GST_ELEMENT_ERROR (v4l2src, RESOURCE, SYNC, NULL, ("could not sync on a buffer on device %s: %s",
GST_V4L2ELEMENT(v4l2src)->device, g_strerror (errno)));
return -1;
}
@@ -170,7 +170,7 @@ gst_v4l2src_get_capture (GstV4l2Src *v4l2src)
v4l2src->format.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
if (ioctl(GST_V4L2ELEMENT(v4l2src)->video_fd, VIDIOC_G_FMT, &v4l2src->format) < 0) {
- gst_element_error (v4l2src, RESOURCE, SETTINGS, NULL,
+ GST_ELEMENT_ERROR (v4l2src, RESOURCE, SETTINGS, NULL,
("failed to get pixelformat for device %s: %s",
GST_V4L2ELEMENT(v4l2src)->device, g_strerror (errno)));
return FALSE;
@@ -206,7 +206,7 @@ gst_v4l2src_set_capture (GstV4l2Src *v4l2src,
v4l2src->format.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
if (ioctl(GST_V4L2ELEMENT(v4l2src)->video_fd, VIDIOC_S_FMT, &v4l2src->format) < 0) {
- gst_element_error (v4l2src, RESOURCE, SETTINGS, NULL,
+ GST_ELEMENT_ERROR (v4l2src, RESOURCE, SETTINGS, NULL,
("failed to set pixelformat to %s @ %dx%d for device %s: %s",
fmt->description, width, height, GST_V4L2ELEMENT(v4l2src)->device, g_strerror (errno)));
return FALSE;
@@ -245,14 +245,14 @@ gst_v4l2src_capture_init (GstV4l2Src *v4l2src)
v4l2src->breq.type = v4l2src->format.type;
v4l2src->breq.memory = V4L2_MEMORY_MMAP;
if (ioctl(GST_V4L2ELEMENT(v4l2src)->video_fd, VIDIOC_REQBUFS, &v4l2src->breq) < 0) {
- gst_element_error (v4l2src, RESOURCE, READ,
+ GST_ELEMENT_ERROR (v4l2src, RESOURCE, READ,
(_("Could not get buffers from device \"%s\""), GST_V4L2ELEMENT(v4l2src)->device),
("error requesting %d buffers: %s", v4l2src->breq.count, g_strerror (errno)));
return FALSE;
}
if (v4l2src->breq.count < GST_V4L2_MIN_BUFFERS) {
- gst_element_error (v4l2src, RESOURCE, READ,
+ GST_ELEMENT_ERROR (v4l2src, RESOURCE, READ,
(_("Could not get enough buffers from device \"%s\""), GST_V4L2ELEMENT(v4l2src)->device),
("we received %d, we want at least %d", v4l2src->breq.count, GST_V4L2_MIN_BUFFERS));
v4l2src->breq.count = buffers;
@@ -280,7 +280,7 @@ gst_v4l2src_capture_init (GstV4l2Src *v4l2src)
buffer->buffer.index = n;
buffer->buffer.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
if (ioctl(GST_V4L2ELEMENT(v4l2src)->video_fd, VIDIOC_QUERYBUF, &buffer->buffer) < 0) {
- gst_element_error (v4l2src, RESOURCE, READ, NULL,
+ GST_ELEMENT_ERROR (v4l2src, RESOURCE, READ, NULL,
("Could not get buffer properties of buffer %d: %s", n, g_strerror (errno)));
gst_v4l2src_capture_deinit(v4l2src);
return FALSE;
@@ -288,7 +288,7 @@ gst_v4l2src_capture_init (GstV4l2Src *v4l2src)
buffer->start = mmap (0, buffer->buffer.length, PROT_READ|PROT_WRITE, MAP_SHARED,
GST_V4L2ELEMENT(v4l2src)->video_fd, buffer->buffer.m.offset);
if (buffer->start == MAP_FAILED) {
- gst_element_error (v4l2src, RESOURCE, READ, NULL,
+ GST_ELEMENT_ERROR (v4l2src, RESOURCE, READ, NULL,
("Could not mmap video buffer %d: %s", n, g_strerror (errno)));
buffer->start = 0;
gst_v4l2src_capture_deinit (v4l2src);
@@ -328,7 +328,7 @@ gst_v4l2src_capture_start (GstV4l2Src *v4l2src)
v4l2src->quit = FALSE;
if (ioctl(GST_V4L2ELEMENT(v4l2src)->video_fd, VIDIOC_STREAMON, &type) < 0) {
- gst_element_error (v4l2src, RESOURCE, OPEN_READ, NULL,
+ GST_ELEMENT_ERROR (v4l2src, RESOURCE, OPEN_READ, NULL,
("Error starting streaming capture from device %s: %s",
GST_V4L2ELEMENT(v4l2src)->device, g_strerror(errno)));
return FALSE;
@@ -356,7 +356,7 @@ gst_v4l2src_capture_stop (GstV4l2Src *v4l2src)
/* we actually need to sync on all queued buffers but not
* on the non-queued ones */
if (ioctl(GST_V4L2ELEMENT(v4l2src)->video_fd, VIDIOC_STREAMOFF, &type) < 0) {
- gst_element_error (v4l2src, RESOURCE, CLOSE, NULL,
+ GST_ELEMENT_ERROR (v4l2src, RESOURCE, CLOSE, NULL,
("Error stopping streaming capture from device %s: %s",
GST_V4L2ELEMENT(v4l2src)->device, g_strerror (errno)));
return FALSE;
diff --git a/sys/vcd/vcdsrc.c b/sys/vcd/vcdsrc.c
index 3a3d13a8..b5d6a777 100644
--- a/sys/vcd/vcdsrc.c
+++ b/sys/vcd/vcdsrc.c
@@ -303,7 +303,7 @@ vcdsrc_open_file(VCDSrc *src)
/* open the device */
src->fd = open(src->device,O_RDONLY);
if (src->fd < 0) {
- gst_element_error (src, RESOURCE, OPEN_READ, NULL, GST_ERROR_SYSTEM);
+ GST_ELEMENT_ERROR (src, RESOURCE, OPEN_READ, NULL, GST_ERROR_SYSTEM);
return FALSE;
}