filesrc/sink: improve warning message a bit (wrong state)
authorStefan Kost <ensonic@users.sf.net>
Thu, 11 Jun 2009 14:03:04 +0000 (17:03 +0300)
committerStefan Kost <ensonic@users.sf.net>
Thu, 11 Jun 2009 15:16:05 +0000 (18:16 +0300)
Unify and turn those into element warnings.

plugins/elements/gstfilesink.c
plugins/elements/gstfilesrc.c

index b540940..61216df 100644 (file)
@@ -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;
   }
 }
index 84219f2..e8b3261 100644 (file)
@@ -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;
   }