[banshee] GStreamerSharp: use Hyena for platform detection
- From: Andrés Aragoneses <aaragoneses src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [banshee] GStreamerSharp: use Hyena for platform detection
- Date: Tue, 26 May 2015 11:52:56 +0000 (UTC)
commit 2fc01d78326d41c97b15b72002c1a3328c670150
Author: Andrés G. Aragoneses <knocte gmail com>
Date: Tue May 26 13:52:01 2015 +0200
GStreamerSharp: use Hyena for platform detection
This way we avoid the horrible System.Environment.OSVersion API.
.../Banshee.GStreamerSharp/VideoManager.cs | 17 +++++------------
1 files changed, 5 insertions(+), 12 deletions(-)
---
diff --git a/src/Backends/Banshee.GStreamerSharp/Banshee.GStreamerSharp/VideoManager.cs
b/src/Backends/Banshee.GStreamerSharp/Banshee.GStreamerSharp/VideoManager.cs
index c0f2c1c..b710c44 100644
--- a/src/Backends/Banshee.GStreamerSharp/Banshee.GStreamerSharp/VideoManager.cs
+++ b/src/Backends/Banshee.GStreamerSharp/Banshee.GStreamerSharp/VideoManager.cs
@@ -4,7 +4,7 @@
// Authors:
// Olivier Dufour <olivier duff gmail com>
// Andrés G. Aragoneses <knocte gmail com>
-// Stephan Sundermann <stephansundermann gmail com>
+// Stephan Sundermann <stephansundermann gmail com>
//
// Copyright (C) 2011 Olivier Dufour
// Copyright (C) 2013 Andrés G. Aragoneses
@@ -294,21 +294,14 @@ namespace Banshee.GStreamerSharp
public void WindowRealize (IntPtr window)
{
- switch (System.Environment.OSVersion.Platform) {
- case PlatformID.Unix:
+ if (PlatformDetection.IsWindows) {
+ video_window_xid = (ulong)gdk_win32_drawable_get_handle (window);
+ } else if (PlatformDetection.IsUnix) {
//FIXME: we should maybe stop relying on x11
http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-libs/html/gst-plugins-base-libs-gstvideooverlay.html#GstVideoOverlay
- video_window_xid = (ulong)gdk_x11_window_get_xid (window);
- break;
- case PlatformID.Win32NT:
- case PlatformID.Win32S:
- case PlatformID.Win32Windows:
- case PlatformID.WinCE:
- video_window_xid = (ulong)gdk_win32_drawable_get_handle (window);
- break;
+ video_window_xid = (ulong)gdk_x11_window_get_xid (window);
}
}
-
[DllImport ("libgdk-3-0.dll")]
private static extern IntPtr gdk_x11_window_get_xid (IntPtr drawable);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]