From 658c39e785b0074f964417879ef7d3548a8e7aab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Mon, 27 Apr 2009 12:08:40 +0200 Subject: [PATCH] Finish/fix the Gst.Plugin bindings and re-indent --- doc/en/Gst/Plugin.xml | 30 +--------- doc/en/Gst/PluginDesc.xml | 96 ------------------------------ doc/en/index.xml | 1 - gstreamer-sharp/Clock.custom | 2 +- gstreamer-sharp/Element.custom | 2 +- gstreamer-sharp/Event.custom | 6 +- gstreamer-sharp/Gstreamer.metadata | 15 ++++- gstreamer-sharp/Makefile.am | 1 + gstreamer-sharp/Message.custom | 4 +- gstreamer-sharp/Plugin.custom | 13 ++++ gstreamer-sharp/Value.cs | 8 +-- 11 files changed, 41 insertions(+), 137 deletions(-) delete mode 100644 doc/en/Gst/PluginDesc.xml create mode 100644 gstreamer-sharp/Plugin.custom diff --git a/doc/en/Gst/Plugin.xml b/doc/en/Gst/Plugin.xml index 66db07f985..e4162f194c 100644 --- a/doc/en/Gst/Plugin.xml +++ b/doc/en/Gst/Plugin.xml @@ -37,17 +37,11 @@ Constructor To be added.To be added.To be added. - 0.9.5.99Method0.9.5.99System.VoidTo be added.To be added.To be added.To be added.To be added.To be added.Method0.9.5.99System.VoidTo be added.To be added.To be added.To be added.To be added.To be added. + 0.9.5.99Method0.9.5.99System.VoidTo be added.To be added.To be added.To be added.To be added.To be added.Method0.9.5.99System.VoidTo be added.To be added.To be added.To be added.To be added.To be added. Property System.String To be added.To be added.To be added. - 0.9.5.99 - - Method - System.Int32 - - To be added.To be added.To be added. 0.9.5.99Property0.9.5.99System.StringTo be added.To be added.To be added. Property @@ -63,31 +57,13 @@ Property System.String To be added.To be added.To be added. - 0.9.5.99 - - Method - System.Void - - To be added.To be added.To be added. 0.9.5.99 Method Gst.Plugin To be added.To be added.To be added. - 0.9.5.99 - - Method - Gst.Plugin - - To be added.To be added.To be added.To be added. - 0.9.5.99 - - Method - System.Boolean - - To be added.To be added.To be added.To be added. - 0.9.5.99 + 0.9.5.99Method0.9.5.99Gst.PluginTo be added.To be added.To be added.To be added.Method0.9.5.99Gst.PluginTo be added.To be added.To be added.To be added. Property System.String @@ -97,7 +73,7 @@ Property System.String To be added.To be added.To be added. - 0.9.5.99Method0.9.5.99System.BooleanTo be added.To be added.To be added.To be added.To be added.To be added.To be added.To be added.To be added.To be added.To be added.To be added.To be added. + 0.9.5.99Property0.9.5.99System.StringTo be added.To be added.To be added.Method0.9.5.99System.BooleanTo be added.To be added.To be added.To be added.To be added.To be added.To be added.To be added.To be added.To be added.To be added.To be added.To be added. Property System.String diff --git a/doc/en/Gst/PluginDesc.xml b/doc/en/Gst/PluginDesc.xml deleted file mode 100644 index 5a18d9980b..0000000000 --- a/doc/en/Gst/PluginDesc.xml +++ /dev/null @@ -1,96 +0,0 @@ - - - - gstreamer-sharp - 0.9.5.99 - - - System.ValueType - - - - To be added. - To be added. - - - - - - - - - - - - - - - Field - System.String - To be added.To be added. - 0.9.5.99 - - Field - System.IntPtr[] - To be added.To be added. - 0.9.5.99 - - Field - System.String - To be added.To be added. - 0.9.5.99 - - Field - System.Int32 - To be added.To be added. - 0.9.5.99 - - Field - System.Int32 - To be added.To be added. - 0.9.5.99 - - Field - System.String - To be added.To be added. - 0.9.5.99 - - Method - Gst.PluginDesc - - To be added.To be added.To be added.To be added. - 0.9.5.99 - - Field - System.String - To be added.To be added. - 0.9.5.99 - - Field - System.String - To be added.To be added. - 0.9.5.99 - - Property - Gst.PluginInitFunc - To be added.To be added.To be added. - 0.9.5.99 - - Field - System.String - To be added.To be added. - 0.9.5.99 - - Field - System.String - To be added.To be added. - 0.9.5.99 - - Field - Gst.PluginDesc - To be added.To be added. - 0.9.5.99 - - - - diff --git a/doc/en/index.xml b/doc/en/index.xml index 0e8090c971..16c63fd696 100644 --- a/doc/en/index.xml +++ b/doc/en/index.xml @@ -146,7 +146,6 @@ - diff --git a/gstreamer-sharp/Clock.custom b/gstreamer-sharp/Clock.custom index 493946ec91..5c9c027c89 100644 --- a/gstreamer-sharp/Clock.custom +++ b/gstreamer-sharp/Clock.custom @@ -123,7 +123,7 @@ private IntPtr EntriesPtr { protected Gst.ClockEntry[] Entries { get { - return (Gst.ClockEntry[]) GLib.Marshaller.ListPtrToArray (EntriesPtr, typeof(GLib.List), false, false, typeof(Gst.ClockEntry)); + return (Gst.ClockEntry[]) GLib.Marshaller.ListPtrToArray (EntriesPtr, typeof (GLib.List), false, false, typeof (Gst.ClockEntry)); } } diff --git a/gstreamer-sharp/Element.custom b/gstreamer-sharp/Element.custom index c39fcf8895..8a0e7c007a 100644 --- a/gstreamer-sharp/Element.custom +++ b/gstreamer-sharp/Element.custom @@ -58,7 +58,7 @@ public object Emit (string signal, params object[] parameters) { return DynamicSignal.Emit (this, signal, parameters); } -[DllImport ("gobject-2.0-0.dll")] +[DllImport ("gobject-2.0-0.dll") ] static extern IntPtr g_object_ref (IntPtr raw); public bool AddPad (Pad p) { diff --git a/gstreamer-sharp/Event.custom b/gstreamer-sharp/Event.custom index 62e7c4503d..ff5fb09d6d 100644 --- a/gstreamer-sharp/Event.custom +++ b/gstreamer-sharp/Event.custom @@ -27,10 +27,10 @@ public ulong Timestamp { [DllImport ("gstreamersharpglue-0.10") ] extern static uint gstsharp_gst_event_get_src_offset (); -[DllImport ("gobject-2.0.dll")] +[DllImport ("gobject-2.0.dll") ] extern static IntPtr g_object_ref (IntPtr handle); -[DllImport ("gobject-2.0.dll")] +[DllImport ("gobject-2.0.dll") ] extern static void g_object_unref (IntPtr handle); static uint src_offset = gstsharp_gst_event_get_src_offset (); @@ -136,7 +136,7 @@ public static Gst.EventType MakeType (uint num, Gst.EventTypeFlags flags) { } public static uint GetTypeNumber (Gst.EventType type) { - return ((uint) type) >> 4; + return ( (uint) type) >> 4; } [DllImport ("gstreamer-0.10.dll") ] diff --git a/gstreamer-sharp/Gstreamer.metadata b/gstreamer-sharp/Gstreamer.metadata index c893602675..c80d68cea8 100644 --- a/gstreamer-sharp/Gstreamer.metadata +++ b/gstreamer-sharp/Gstreamer.metadata @@ -494,9 +494,20 @@ BinFlags.Last << 0 BinFlags.Last << 4 - 1 - 1 + 1 + 1 + GetPluginName + true + AddDependency + 1 + 1 + 1 + true + true + Load + + 1 SetFeatureName GetFeatureName diff --git a/gstreamer-sharp/Makefile.am b/gstreamer-sharp/Makefile.am index 5f5f96734d..299978328e 100644 --- a/gstreamer-sharp/Makefile.am +++ b/gstreamer-sharp/Makefile.am @@ -65,6 +65,7 @@ customs = \ Parse.custom \ Object.custom \ PadTemplate.custom \ + Plugin.custom \ MiniObject.custom \ Registry.custom \ Query.custom \ diff --git a/gstreamer-sharp/Message.custom b/gstreamer-sharp/Message.custom index c0b21d0fb6..584bb86dc6 100644 --- a/gstreamer-sharp/Message.custom +++ b/gstreamer-sharp/Message.custom @@ -27,10 +27,10 @@ public ulong Timestamp { [DllImport ("gstreamersharpglue-0.10") ] extern static uint gstsharp_gst_message_get_src_offset (); -[DllImport ("gobject-2.0.dll")] +[DllImport ("gobject-2.0.dll") ] extern static IntPtr g_object_ref (IntPtr handle); -[DllImport ("gobject-2.0.dll")] +[DllImport ("gobject-2.0.dll") ] extern static void g_object_unref (IntPtr handle); static uint src_offset = gstsharp_gst_message_get_src_offset (); diff --git a/gstreamer-sharp/Plugin.custom b/gstreamer-sharp/Plugin.custom new file mode 100644 index 0000000000..a992650c3a --- /dev/null +++ b/gstreamer-sharp/Plugin.custom @@ -0,0 +1,13 @@ +[DllImport ("gstreamer-0.10.dll") ] +static extern IntPtr gst_plugin_load_file (IntPtr filename, out IntPtr gerror); + +public static Gst.Plugin LoadFile (string filename) { + IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (filename); + IntPtr gerror; + IntPtr raw_ret = gst_plugin_load_file (native_name, out gerror); + Gst.Plugin ret = GLib.Object.GetObject (raw_ret, true) as Gst.Plugin; + GLib.Marshaller.Free (native_name); + if (gerror != IntPtr.Zero) + throw new GLib.GException (gerror); + return ret; +} diff --git a/gstreamer-sharp/Value.cs b/gstreamer-sharp/Value.cs index bd888bd7b1..9d44328250 100644 --- a/gstreamer-sharp/Value.cs +++ b/gstreamer-sharp/Value.cs @@ -473,7 +473,7 @@ namespace Gst { foreach (object o in content) { GLib.Value v = new GLib.Value (o); gst_value_list_append_value (ref val, ref v); - v.Dispose (); + v.Dispose (); } } @@ -497,7 +497,7 @@ namespace Gst { foreach (object o in l.content) { GLib.Value v = new GLib.Value (o); gst_value_list_append_value (ref val, ref v); - v.Dispose (); + v.Dispose (); } return val; @@ -558,7 +558,7 @@ namespace Gst { foreach (object o in content) { GLib.Value v = new GLib.Value (o); gst_value_array_append_value (ref val, ref v); - v.Dispose (); + v.Dispose (); } } @@ -568,7 +568,7 @@ namespace Gst { foreach (object o in a.content) { GLib.Value v = new GLib.Value (o); gst_value_array_append_value (ref val, ref v); - v.Dispose (); + v.Dispose (); } return val;