GNOME Bugzilla – Bug 674296
Problem with ges-launch and W32 filenames
Last modified: 2012-05-02 07:49:06 UTC
ges-launch does the following for its filename arguments: 1) calls check_path(), which does fopen() 2) if that succeeds, it ensures that path is an URI, by calling ensure_uri() Problems are: 1) fopen() doesn't understand URIs on W32. Thus the path MUST NOT be an uri, it must be a DOS-style path (either X:/foo/bar or X:\foo\bar). 2) however, gst_uri_is_valid() (which is what ensure_uri() initially calls) thinks that a DOS style path is a valid URI (X is the uri type, followed by :, followed by a path - looks perfectly valid), and ensure_uri() does not change the path into an URI, which is why GStreamer later fails to use it. I'm still looking for a correct way of fixing this, without #ifdef G_OS_WIN32
Created attachment 212302 [details] [review] Fix check_file() to use glib Should, in theory, work on all platforms.
URI-detection was fixed in core ( http://cgit.freedesktop.org/gstreamer/gstreamer/commit/?id=d35487e50c185a7198944ef89adcd0a7348d474f ).
I've just removed the check now ;) commit 8542d18d4372a8e2ace07321001b7c5d5aaa2a5e Author: Tim-Philipp Müller <tim.muller@collabora.co.uk> Date: Wed May 2 08:44:25 2012 +0100 ges-launch: replace home-grown version of gst_filename_to_uri() and remove superfluous check if file is readable with fopen. Code appears to also want to accept URIs, so this doesn't work so well, and should probably be done differently anyway if required. https://bugzilla.gnome.org/show_bug.cgi?id=674296