diff --git a/sys/oss/gstosselement.c b/sys/oss/gstosselement.c index f43799868d..6ad1c21ca9 100644 --- a/sys/oss/gstosselement.c +++ b/sys/oss/gstosselement.c @@ -429,37 +429,43 @@ gst_osselement_open_audio (GstOssElement *oss) if (oss->fd < 0) { switch (errno) { case EBUSY: - gst_element_error (GST_ELEMENT (oss), - "osselement: Unable to open %s (in use ?)", - oss->device); + gst_element_gerror(GST_ELEMENT (oss), GST_ERROR_UNKNOWN, + g_strdup ("unconverted error, file a bug"), + g_strdup_printf("osselement: Unable to open %s (in use ?)", + oss->device)); break; case EISDIR: - gst_element_error (GST_ELEMENT (oss), - "osselement: Device %s is a directory", - oss->device); + gst_element_gerror(GST_ELEMENT (oss), GST_ERROR_UNKNOWN, + g_strdup ("unconverted error, file a bug"), + g_strdup_printf("osselement: Device %s is a directory", + oss->device)); break; case EACCES: case ETXTBSY: - gst_element_error (GST_ELEMENT (oss), - "osselement: Cannot access %s, check permissions", - oss->device); + gst_element_gerror(GST_ELEMENT (oss), GST_ERROR_UNKNOWN, + g_strdup ("unconverted error, file a bug"), + g_strdup_printf("osselement: Cannot access %s, check permissions", + oss->device)); break; case ENXIO: case ENODEV: case ENOENT: - gst_element_error (GST_ELEMENT (oss), - "osselement: Cannot access %s, does it exist ?", - oss->device); + gst_element_gerror(GST_ELEMENT (oss), GST_ERROR_UNKNOWN, + g_strdup ("unconverted error, file a bug"), + g_strdup_printf("osselement: Cannot access %s, does it exist ?", + oss->device)); break; case EROFS: - gst_element_error (GST_ELEMENT (oss), - "osselement: Cannot access %s, read-only filesystem ?", - oss->device); + gst_element_gerror(GST_ELEMENT (oss), GST_ERROR_UNKNOWN, + g_strdup ("unconverted error, file a bug"), + g_strdup_printf("osselement: Cannot access %s, read-only filesystem ?", + oss->device)); default: /* FIXME: strerror is not threadsafe */ - gst_element_error (GST_ELEMENT (oss), - "osselement: Cannot open %s, generic error: %s", - oss->device, strerror (errno)); + gst_element_gerror(GST_ELEMENT (oss), GST_ERROR_UNKNOWN, + g_strdup ("unconverted error, file a bug"), + g_strdup_printf("osselement: Cannot open %s, generic error: %s", + oss->device, strerror (errno))); break; } return FALSE; diff --git a/sys/oss/gstossgst.c b/sys/oss/gstossgst.c index 070c693aa6..a680518c3e 100644 --- a/sys/oss/gstossgst.c +++ b/sys/oss/gstossgst.c @@ -382,7 +382,9 @@ gst_ossgst_spawn_process (GstOssGst *ossgst) if((ossgst->childpid = fork()) == -1) { perror("fork"); - gst_element_error(GST_ELEMENT(ossgst),"forking"); + gst_element_gerror(GST_ELEMENT(ossgst), GST_ERROR_UNKNOWN, + g_strdup ("unconverted error, file a bug"), + g_strdup_printf("forking")); return FALSE; } GST_DEBUG ("forked %d", ossgst->childpid); @@ -415,7 +417,9 @@ gst_ossgst_spawn_process (GstOssGst *ossgst) /* will only reach if error */ perror("exec"); - gst_element_error(GST_ELEMENT(ossgst),"starting child process"); + gst_element_gerror(GST_ELEMENT(ossgst), GST_ERROR_UNKNOWN, + g_strdup ("unconverted error, file a bug"), + g_strdup_printf("starting child process")); return FALSE; } diff --git a/sys/oss/gstosssink.c b/sys/oss/gstosssink.c index 067f69cebe..eb5203bc12 100644 --- a/sys/oss/gstosssink.c +++ b/sys/oss/gstosssink.c @@ -356,7 +356,9 @@ gst_osssink_chain (GstPad *pad, GstBuffer *buf) if (!GST_OSSELEMENT (osssink)->bps) { gst_buffer_unref (buf); - gst_element_error (GST_ELEMENT (osssink), "capsnego was never performed, unknown data type"); + gst_element_gerror(GST_ELEMENT (osssink), GST_ERROR_UNKNOWN, + g_strdup ("unconverted error, file a bug"), + g_strdup_printf("capsnego was never performed, unknown data type")); return; } diff --git a/sys/oss/gstosssrc.c b/sys/oss/gstosssrc.c index c2ff002596..8a5e0bb3ae 100644 --- a/sys/oss/gstosssrc.c +++ b/sys/oss/gstosssrc.c @@ -315,13 +315,17 @@ gst_osssrc_get (GstPad *pad) /* nothing was negotiated, we can decide on a format */ if (!gst_osssrc_negotiate (pad)) { gst_buffer_unref (buf); - gst_element_error (GST_ELEMENT (src), "could not negotiate format"); + gst_element_gerror(GST_ELEMENT (src), GST_ERROR_UNKNOWN, + g_strdup ("unconverted error, file a bug"), + g_strdup_printf("could not negotiate format")); return GST_BUFFER (gst_event_new (GST_EVENT_INTERRUPT)); } } if (GST_OSSELEMENT (src)->bps == 0) { gst_buffer_unref (buf); - gst_element_error (GST_ELEMENT (src), "no format negotiated"); + gst_element_gerror(GST_ELEMENT (src), GST_ERROR_UNKNOWN, + g_strdup ("unconverted error, file a bug"), + g_strdup_printf("no format negotiated")); return GST_BUFFER (gst_event_new (GST_EVENT_INTERRUPT)); } @@ -329,8 +333,10 @@ gst_osssrc_get (GstPad *pad) src->buffersize); if (readbytes < 0) { gst_buffer_unref (buf); - gst_element_error (GST_ELEMENT (src), "error reading data (%s)", - strerror (errno)); + gst_element_gerror(GST_ELEMENT (src), GST_ERROR_UNKNOWN, + g_strdup ("unconverted error, file a bug"), + g_strdup_printf("error reading data (%s)", + strerror (errno))); return GST_BUFFER (gst_event_new (GST_EVENT_INTERRUPT)); }