summaryrefslogtreecommitdiffstats
path: root/sys/dxr3/dxr3spusink.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dxr3/dxr3spusink.c')
-rw-r--r--sys/dxr3/dxr3spusink.c26
1 files changed, 10 insertions, 16 deletions
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;
}