[0.10] gst-plugins-good: multifilesink: post better error message when we run out of disk space

Tim Müller tpm at kemper.freedesktop.org
Wed Jan 4 08:32:46 PST 2012


Module: gst-plugins-good
Branch: 0.10
Commit: f58c5727294fe8bcbfbfed6fa0769a9b345d9c80
URL:    http://cgit.freedesktop.org/gstreamer/gst-plugins-good/commit/?id=f58c5727294fe8bcbfbfed6fa0769a9b345d9c80

Author: Peter Seiderer <ps.report at gmx.net>
Date:   Wed Dec 14 10:14:20 2011 +0100

multifilesink: post better error message when we run out of disk space

Map write errno ENOSPC to GST_RESOURCE_ERROR_NO_SPACE_LEFT.

---

 gst/multifile/gstmultifilesink.c |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/gst/multifile/gstmultifilesink.c b/gst/multifile/gstmultifilesink.c
index 984e223..2be3b56 100644
--- a/gst/multifile/gstmultifilesink.c
+++ b/gst/multifile/gstmultifilesink.c
@@ -656,8 +656,15 @@ write_error:
     return GST_FLOW_ERROR;
   }
 stdio_write_error:
-  GST_ELEMENT_ERROR (multifilesink, RESOURCE, WRITE,
-      ("Error while writing to file."), (NULL));
+  switch (errno) {
+    case ENOSPC:
+      GST_ELEMENT_ERROR (multifilesink, RESOURCE, NO_SPACE_LEFT,
+          ("Error while writing to file."), ("%s", g_strerror (errno)));
+      break;
+    default:
+      GST_ELEMENT_ERROR (multifilesink, RESOURCE, WRITE,
+          ("Error while writing to file."), ("%s", g_strerror (errno)));
+  }
   return GST_FLOW_ERROR;
 }
 



More information about the gstreamer-commits mailing list