From 07ed811a0983771c45faa2f6f76a9fff186db407 Mon Sep 17 00:00:00 2001 From: Thomas Vander Stichele Date: Sun, 18 Jan 2004 21:46:58 +0000 Subject: use new error signal and classification Original commit message from CVS: use new error signal and classification --- sys/dxr3/dxr3spusink.c | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) (limited to 'sys/dxr3/dxr3spusink.c') diff --git a/sys/dxr3/dxr3spusink.c b/sys/dxr3/dxr3spusink.c index 0b1ba010..6ce1bf6b 100644 --- a/sys/dxr3/dxr3spusink.c +++ b/sys/dxr3/dxr3spusink.c @@ -280,10 +280,8 @@ dxr3spusink_open (Dxr3SpuSink *sink) sink->spu_fd = open (sink->spu_filename, O_WRONLY); if (sink->spu_fd < 0) { - gst_element_error (GST_ELEMENT (sink), - g_strconcat ("Error opening device file \"", - sink->spu_filename, "\": ", - g_strerror (errno), NULL)); + gst_element_error (sink, RESOURCE, OPEN_WRITE, + (_("Could not open spu device \"%s\" for writing"), sink->spu_filename), GST_ERROR_SYSTEM); return FALSE; } @@ -293,10 +291,8 @@ dxr3spusink_open (Dxr3SpuSink *sink) sink->control_fd = open (sink->control_filename, O_WRONLY); if (sink->control_fd < 0) { - gst_element_error (GST_ELEMENT (sink), - g_strconcat ("Error opening device file \"", - sink->control_filename, "\": ", - g_strerror (errno), NULL)); + gst_element_error (sink, RESOURCE, OPEN_WRITE, + (_("Could not open control device \"%s\" for writing"), sink->control_filename), GST_ERROR_SYSTEM); return FALSE; } @@ -312,19 +308,17 @@ dxr3spusink_close (Dxr3SpuSink *sink) g_return_if_fail (GST_FLAG_IS_SET (sink, DXR3SPUSINK_OPEN)); if (close (sink->spu_fd) != 0) { - gst_element_error (GST_ELEMENT (sink), - g_strconcat ("Error closing file \"", - sink->spu_filename, "\": ", - g_strerror (errno), NULL)); + gst_element_error (sink, RESOURCE, CLOSE, + (_("Could not close spu device \"%s\""), sink->spu_filename), + GST_ERROR_SYSTEM); return; } if (close (sink->control_fd) != 0) { - gst_element_error (GST_ELEMENT (sink), - g_strconcat ("Error closing file \"", - sink->control_filename, "\": ", - g_strerror (errno), NULL)); + gst_element_error (sink, RESOURCE, CLOSE, + (_("Could not close control device \"%s\""), sink->audio_filename), + GST_ERROR_SYSTEM); return; } -- cgit v1.2.1