[gst-cvs] gstreamer: filesrc/sink: improve warning message a bit (wrong state)

Stefan Kost ensonic at kemper.freedesktop.org
Thu Jun 11 08:21:34 PDT 2009


Module: gstreamer
Branch: master
Commit: e938861cb89b13c74541973c9a432adbcb69ad06
URL:    http://cgit.freedesktop.org/gstreamer/gstreamer/commit/?id=e938861cb89b13c74541973c9a432adbcb69ad06

Author: Stefan Kost <ensonic at users.sf.net>
Date:   Thu Jun 11 17:03:04 2009 +0300

filesrc/sink: improve warning message a bit (wrong state)

Unify and turn those into element warnings.

---

 plugins/elements/gstfilesink.c |    6 ++++--
 plugins/elements/gstfilesrc.c  |    5 ++++-
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/plugins/elements/gstfilesink.c b/plugins/elements/gstfilesink.c
index b540940..61216df 100644
--- a/plugins/elements/gstfilesink.c
+++ b/plugins/elements/gstfilesink.c
@@ -251,8 +251,10 @@ gst_file_sink_set_location (GstFileSink * sink, const gchar * location)
   /* ERRORS */
 was_open:
   {
-    g_warning ("Changing the `location' property on filesink when "
-        "a file is open not supported.");
+    GST_ELEMENT_WARNING (sink, RESOURCE, BUSY,
+        ("Changing the `location' property on filesink when a file is open is "
+            "not supported."),
+        ("setting the 'location' property in wrong state"));
     return FALSE;
   }
 }
diff --git a/plugins/elements/gstfilesrc.c b/plugins/elements/gstfilesrc.c
index 84219f2..e8b3261 100644
--- a/plugins/elements/gstfilesrc.c
+++ b/plugins/elements/gstfilesrc.c
@@ -373,7 +373,10 @@ gst_file_src_set_location (GstFileSrc * src, const gchar * location)
   /* ERROR */
 wrong_state:
   {
-    GST_DEBUG_OBJECT (src, "setting location in wrong state");
+    GST_ELEMENT_WARNING (src, RESOURCE, BUSY,
+        ("Changing the `location' property on filesrc when a file is open is "
+            "not supported."),
+        ("setting the 'location' property in wrong state"));
     GST_OBJECT_UNLOCK (src);
     return FALSE;
   }





More information about the Gstreamer-commits mailing list