summaryrefslogtreecommitdiff
path: root/samples
diff options
context:
space:
mode:
authorAndoni Morales Alastruey <ylatuya@gmail.com>2010-02-05 23:39:12 +0100
committerSebastian Dröge <sebastian.droege@collabora.co.uk>2010-02-06 10:20:15 +0100
commitb689dd7e7bfefbeb3fc2913946b6ba53b6ea3de2 (patch)
treeae34d8ddc5f313894ab66547bb2ef4811414fdd9 /samples
parentfa8800ba56a491002072f0f6f2cc5277de7715b2 (diff)
Fix the way file uri is set in win32
Diffstat (limited to 'samples')
-rw-r--r--samples/GtkVideoPlayer.cs15
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);