From b689dd7e7bfefbeb3fc2913946b6ba53b6ea3de2 Mon Sep 17 00:00:00 2001 From: Andoni Morales Alastruey Date: Fri, 5 Feb 2010 23:39:12 +0100 Subject: [PATCH] Fix the way file uri is set in win32 --- samples/GtkVideoPlayer.cs | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/samples/GtkVideoPlayer.cs b/samples/GtkVideoPlayer.cs index dcc2ecc007..14560f0263 100644 --- a/samples/GtkVideoPlayer.cs +++ b/samples/GtkVideoPlayer.cs @@ -1,5 +1,6 @@ -// Authors +// Authors // Copyright (C) 2008 Paul Burton +// Copyright (C) 2010 Andoni Morales 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);