[gst-cvs] gstreamer-sharp: Fix the way file uri is set in win32

Sebastian Dröge slomo at kemper.freedesktop.org
Sat Feb 6 01:20:52 PST 2010


Module: gstreamer-sharp
Branch: master
Commit: b689dd7e7bfefbeb3fc2913946b6ba53b6ea3de2
URL:    http://cgit.freedesktop.org/gstreamer/gstreamer-sharp/commit/?id=b689dd7e7bfefbeb3fc2913946b6ba53b6ea3de2

Author: Andoni Morales Alastruey <ylatuya at gmail.com>
Date:   Fri Feb  5 23:39:12 2010 +0100

Fix the way file uri is set in win32

---

 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 at gmail.com>
+//   Copyright (C) 2010 Andoni Morales <ylatuya at 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);
 





More information about the Gstreamer-commits mailing list