diff options
author | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2009-07-10 19:16:35 +0200 |
---|---|---|
committer | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2009-07-10 19:16:35 +0200 |
commit | f9494bc38b18c2b2c568a0ac1b98f7a959391583 (patch) | |
tree | 7f3a49f6343b10dedfb060bffdc659be7b8586e7 | |
parent | f98d0f88958ec772aabd089ca1647e5df73f6071 (diff) | |
download | gstreamer-plugins-base-f9494bc38b18c2b2c568a0ac1b98f7a959391583.tar.gz |
gio: Also post a "not-mounted" message from giosink
-rw-r--r-- | ext/gio/gstgiosink.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/ext/gio/gstgiosink.c b/ext/gio/gstgiosink.c index a76b4b104..69e05e50e 100644 --- a/ext/gio/gstgiosink.c +++ b/ext/gio/gstgiosink.c @@ -39,6 +39,11 @@ * gst_bus_set_flushing(bus, TRUE) after the "file-exists" message was * received and gst_bus_set_flushing(bus, FALSE) after the problem is * resolved. + * + * Similar to the "file-exist" message a "not-mounted" message is posted + * on the bus if the target location is not mounted yet and needs to be + * mounted. This message can be used by application to mount the location + * and retry after the location was mounted successfully. * * <refsect2> * <title>Example pipelines</title> @@ -287,6 +292,14 @@ gst_gio_sink_get_stream (GstGioBaseSink * bsink) GST_ELEMENT_ERROR (sink, RESOURCE, OPEN_WRITE, (NULL), ("Location %s already exists: %s", uri, err->message)); + } else if (GST_GIO_ERROR_MATCHES (err, NOT_MOUNTED)) { + gst_element_post_message (GST_ELEMENT_CAST (sink), + gst_message_new_element (GST_OBJECT_CAST (sink), + gst_structure_new ("not-mounted", "file", G_TYPE_FILE, + sink->file, "uri", G_TYPE_STRING, uri, NULL))); + + GST_ELEMENT_ERROR (sink, RESOURCE, OPEN_WRITE, (NULL), + ("Location %s not mounted: %s", uri, err->message)); } else { GST_ELEMENT_ERROR (sink, RESOURCE, OPEN_WRITE, (NULL), ("Could not open location %s for writing: %s", uri, err->message)); |