[banshee] GStreamerSharp: port to GTK3
- From: Andrés Aragoneses <aaragoneses src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [banshee] GStreamerSharp: port to GTK3
- Date: Tue, 29 Oct 2013 17:48:07 +0000 (UTC)
commit ab940aacb3e2eb53513199dbf8c6052b39dc0413
Author: Stephan Sundermann <stephansundermann gmail com>
Date: Tue Oct 29 18:33:59 2013 +0100
GStreamerSharp: port to GTK3
Even though GStreamerSharp backend doesn't strictly depend on GTK at
compile time, it uses GDK at runtime to get the handle of a Window
in order to tell GStreamer where to render a video. To do this,
it uses a P/Invoke to an unmanaged library which was still pointing
to GTKv2.0 instead of GTKv3.0. This was causing the following errors:
(Nereid:16860): GLib-GObject-WARNING **: cannot register existing type `GdkWindow'
(Nereid:16860): Gdk-WARNING **: /build/buildd/gtk+2.0-2.24.17/gdk/x11/gdkdrawable-x11.c:952 drawable is
not a pixmap or window
We leave a couple of FIXMEs for Windows/Mac platforms.
Signed-off-by: Andrés G. Aragoneses <knocte gmail com>
.../Banshee.GStreamerSharp/VideoManager.cs | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/src/Backends/Banshee.GStreamerSharp/Banshee.GStreamerSharp/VideoManager.cs
b/src/Backends/Banshee.GStreamerSharp/Banshee.GStreamerSharp/VideoManager.cs
index f9c2678..f0db326 100644
--- a/src/Backends/Banshee.GStreamerSharp/Banshee.GStreamerSharp/VideoManager.cs
+++ b/src/Backends/Banshee.GStreamerSharp/Banshee.GStreamerSharp/VideoManager.cs
@@ -251,7 +251,7 @@ namespace Banshee.GStreamerSharp
{
switch (System.Environment.OSVersion.Platform) {
case PlatformID.Unix:
- video_window_xid = (ulong)gdk_x11_drawable_get_xid (window);
+ video_window_xid = (ulong)gdk_x11_window_get_xid (window);
break;
case PlatformID.Win32NT:
case PlatformID.Win32S:
@@ -262,8 +262,11 @@ namespace Banshee.GStreamerSharp
}
}
- [DllImport ("libgdk-x11-2.0.so.0")]
- private static extern IntPtr gdk_x11_drawable_get_xid (IntPtr drawable);
+ //FIXME: map this, to allow running in MacOS?
+ [DllImport ("libgdk-3.so.0") /* willfully unmapped */]
+ private static extern IntPtr gdk_x11_window_get_xid (IntPtr drawable);
+
+ //FIXME: find the new 3.0 GDK library name in Windows
[DllImport ("libgdk-win32-2.0-0.dll")]
private static extern IntPtr gdk_win32_drawable_get_handle (IntPtr drawable);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]