Don't require Gtk# patch from bug #501685
authorSebastian Dröge <sebastian.droege@collabora.co.uk>
Wed, 13 May 2009 12:42:04 +0000 (14:42 +0200)
committerSebastian Dröge <sebastian.droege@collabora.co.uk>
Wed, 13 May 2009 12:42:04 +0000 (14:42 +0200)
README
gstreamer-sharp/override/ColorBalanceAdapter.cs
gstreamer-sharp/override/MixerAdapter.cs

diff --git a/README b/README
index ba66d604405c3c8dc54a47cc4537ae46ef530af8..a5a2a97378f85a6a8df05a04ea3d2c59cba7ec1e 100644 (file)
--- a/README
+++ b/README
@@ -1,7 +1,6 @@
 To build this Gtk# from trunk is required and the following patches:
 
 http://bugzilla.novell.com/show_bug.cgi?id=323372
-http://bugzilla.novell.com/show_bug.cgi?id=501685
 http://bugzilla.novell.com/show_bug.cgi?id=497667
 http://bugzilla.novell.com/show_bug.cgi?id=503048
 http://bugzilla.novell.com/show_bug.cgi?id=503060
index bfabfe21deb2dada331d6dd2f34c3f1758903c62..685b3a01de95132f645ab20b68aadf0237880db6 100644 (file)
@@ -89,9 +89,12 @@ namespace Gst.Interfaces {
                        GCHandle gch = (GCHandle) data;
                        ColorBalanceAdapter adapter = gch.Target as ColorBalanceAdapter;
 
-                       PropertyInfo pi = adapter.Type.GetProperty ("BalanceType", BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.FlattenHierarchy);
-                       if (pi != null && pi.PropertyType == typeof (Gst.Interfaces.ColorBalanceType))
-                         native_iface.BalanceType = (Gst.Interfaces.ColorBalanceType) pi.GetValue (null, null);
+                       ColorBalanceImplementor implementor = adapter.Implementor;
+                       if (implementor != null) {
+                         PropertyInfo pi = implementor.GetType().GetProperty ("BalanceType", BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.FlattenHierarchy);
+                         if (pi != null && pi.PropertyType == typeof (Gst.Interfaces.ColorBalanceType))
+                           native_iface.BalanceType = (Gst.Interfaces.ColorBalanceType) pi.GetValue (null, null);
+                       }
 
                        Marshal.StructureToPtr (native_iface, ifaceptr, false);
                        gch.Free ();
index 68a70251ff3f6962c0dc552e1151da67de1fc6ff..5510479552a628649f2fbb479e3d60f70cb2f069 100644 (file)
@@ -189,9 +189,13 @@ namespace Gst.Interfaces {
 
                        GCHandle gch = (GCHandle) data;
                         MixerAdapter adapter = gch.Target as MixerAdapter;
-                       PropertyInfo pi = adapter.Type.GetProperty ("MixerType", BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.FlattenHierarchy);
-                        if (pi != null && pi.PropertyType == typeof (Gst.Interfaces.MixerType))
-                          native_iface.MixerType = (Gst.Interfaces.MixerType) pi.GetValue (null, null);
+                        MixerImplementor implementor = adapter.Implementor;
+
+                       if (implementor != null) {
+                         PropertyInfo pi = implementor.GetType().GetProperty ("MixerType", BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.FlattenHierarchy);
+                          if (pi != null && pi.PropertyType == typeof (Gst.Interfaces.MixerType))
+                            native_iface.MixerType = (Gst.Interfaces.MixerType) pi.GetValue (null, null);
+                       }
 
                        Marshal.StructureToPtr (native_iface, ifaceptr, false);
                        gch.Free ();