diff options
author | Andoni Morales Alastruey <ylatuya@gmail.com> | 2010-02-05 23:39:12 +0100 |
---|---|---|
committer | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2010-02-06 10:20:15 +0100 |
commit | b689dd7e7bfefbeb3fc2913946b6ba53b6ea3de2 (patch) | |
tree | ae34d8ddc5f313894ab66547bb2ef4811414fdd9 | |
parent | fa8800ba56a491002072f0f6f2cc5277de7715b2 (diff) |
Fix the way file uri is set in win32
-rw-r--r-- | samples/GtkVideoPlayer.cs | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/samples/GtkVideoPlayer.cs b/samples/GtkVideoPlayer.cs index dcc2ecc..14560f0 100644 --- a/samples/GtkVideoPlayer.cs +++ b/samples/GtkVideoPlayer.cs @@ -1,5 +1,6 @@ -// Authors +// Authors // Copyright (C) 2008 Paul Burton <paulburton89@gmail.com> +// Copyright (C) 2010 Andoni Morales <ylatuya@gmail.com> using System; using System.Runtime.InteropServices; @@ -162,7 +163,17 @@ public class MainWindow : Gtk.Window { } }; - _playbin["uri"] = "file://" + dialog.Filename; + switch (System.Environment.OSVersion.Platform) { + case PlatformID.Unix: + _playbin["uri"] = "file://" + dialog.Filename; + break; + case PlatformID.Win32NT: + case PlatformID.Win32S: + case PlatformID.Win32Windows: + case PlatformID.WinCE: + _playbin["uri"] = "file:///" + dialog.Filename.Replace("\\","/"); + break; + } StateChangeReturn sret = _playbin.SetState (Gst.State.Playing); |