diff --git a/doc/en/Gst/HasPadCreatedArgs.xml b/doc/en/Gst/PadCreatedArgs.xml similarity index 63% rename from doc/en/Gst/HasPadCreatedArgs.xml rename to doc/en/Gst/PadCreatedArgs.xml index a4bbfa1eab..e398a2bf8d 100644 --- a/doc/en/Gst/HasPadCreatedArgs.xml +++ b/doc/en/Gst/PadCreatedArgs.xml @@ -1,5 +1,5 @@ - - + + gstreamer-sharp 0.9.5.99 @@ -15,15 +15,21 @@ - + Constructor + + 0.9.5.99 + To be added.To be added. - 0.9.5.99 + Property + + 0.9.5.99 + Gst.Pad To be added.To be added.To be added. - 0.9.5.99 + diff --git a/doc/en/Gst/HasPadCreatedHandler.xml b/doc/en/Gst/PadCreatedHandler.xml similarity index 68% rename from doc/en/Gst/HasPadCreatedHandler.xml rename to doc/en/Gst/PadCreatedHandler.xml index 76385b60af..c4a0e18108 100644 --- a/doc/en/Gst/HasPadCreatedHandler.xml +++ b/doc/en/Gst/PadCreatedHandler.xml @@ -1,5 +1,5 @@ - - + + gstreamer-sharp 0.9.5.99 @@ -9,7 +9,7 @@ - + System.Void diff --git a/doc/en/Gst/PadTemplate.xml b/doc/en/Gst/PadTemplate.xml index 324baa97fb..a89d1639e0 100644 --- a/doc/en/Gst/PadTemplate.xml +++ b/doc/en/Gst/PadTemplate.xml @@ -42,28 +42,10 @@ Property Gst.Caps To be added.To be added.To be added. - 0.9.5.99GLib.Property("caps")Property0.9.5.99GLib.Property("direction")Gst.PadDirectionTo be added.To be added.To be added. + 0.9.5.99GLib.Property("caps")Property0.9.5.99GLib.Property("direction")Gst.PadDirectionTo be added.To be added.To be added.Method0.9.5.99System.VoidTo be added.To be added.To be added. Property GLib.GType To be added.To be added.To be added. - 0.9.5.99 - - Event - GLib.Signal("pad-created") - Gst.HasPadCreatedHandler - To be added.To be added. - 0.9.5.99Property0.9.5.99GLib.Property("name-template")System.StringTo be added.To be added.To be added. - - Method - System.Void - - To be added.To be added.To be added. - 0.9.5.99GLib.DefaultSignalHandler(Type=typeof(Gst.PadTemplate), ConnectionMethod="OverrideHasPadCreated") - - Method - System.Void - - To be added.To be added.To be added. - 0.9.5.99Property0.9.5.99GLib.Property("presence")Gst.PadPresenceTo be added.To be added.To be added. + 0.9.5.99Property0.9.5.99GLib.Property("name-template")System.StringTo be added.To be added.To be added.Method0.9.5.99GLib.DefaultSignalHandler(Type=typeof(Gst.PadTemplate), ConnectionMethod="OverridePadCreated")System.VoidTo be added.To be added.To be added.Event0.9.5.99GLib.Signal("pad-created")Gst.PadCreatedHandlerTo be added.To be added.Property0.9.5.99GLib.Property("presence")Gst.PadPresenceTo be added.To be added.To be added. diff --git a/doc/en/index.xml b/doc/en/index.xml index 91b6ada638..b79dc0e7fa 100644 --- a/doc/en/index.xml +++ b/doc/en/index.xml @@ -69,8 +69,6 @@ - - @@ -113,6 +111,8 @@ + + diff --git a/gstreamer-sharp/Gstreamer.metadata b/gstreamer-sharp/Gstreamer.metadata index 654dc406f6..8905d9509e 100644 --- a/gstreamer-sharp/Gstreamer.metadata +++ b/gstreamer-sharp/Gstreamer.metadata @@ -275,7 +275,9 @@ ObjectFlags.Last << 4 ObjectFlags.Last << 8 - HasPadCreated + 1 + 1 + EmitPadCreated Last ObjectFlags.Last << 0 diff --git a/gstreamer-sharp/Makefile.am b/gstreamer-sharp/Makefile.am index 5c7db40f36..923485b50e 100644 --- a/gstreamer-sharp/Makefile.am +++ b/gstreamer-sharp/Makefile.am @@ -63,6 +63,7 @@ customs = \ Pad.custom \ Parse.custom \ Object.custom \ + PadTemplate.custom \ MiniObject.custom \ Registry.custom \ Structure.custom diff --git a/gstreamer-sharp/PadTemplate.custom b/gstreamer-sharp/PadTemplate.custom new file mode 100644 index 0000000000..370bb9abab --- /dev/null +++ b/gstreamer-sharp/PadTemplate.custom @@ -0,0 +1,32 @@ + [DllImport("gstreamer-0.10.dll")] + static extern IntPtr gst_pad_template_new(IntPtr name_template, int direction, int presence, IntPtr caps); + + [DllImport("gstreamer-0.10.dll")] + static extern IntPtr gst_caps_ref (IntPtr handle); + + public PadTemplate (string name_template, Gst.PadDirection direction, Gst.PadPresence presence, Gst.Caps caps) : base (IntPtr.Zero) + { + if (GetType () != typeof (PadTemplate)) { + ArrayList vals = new ArrayList(); + ArrayList names = new ArrayList(); + names.Add ("name_template"); + vals.Add (new GLib.Value (name_template)); + names.Add ("direction"); + vals.Add (new GLib.Value (direction)); + names.Add ("presence"); + vals.Add (new GLib.Value (presence)); + if (caps != null) { + names.Add ("caps"); + vals.Add (new GLib.Value (caps)); + } + CreateNativeObject ((string[])names.ToArray (typeof (string)), (GLib.Value[])vals.ToArray (typeof (GLib.Value))); + return; + } + IntPtr native_name_template = GLib.Marshaller.StringToPtrGStrdup (name_template); + if (caps != null) + gst_caps_ref (caps.Handle); + + Raw = gst_pad_template_new(native_name_template, (int) direction, (int) presence, caps == null ? IntPtr.Zero : caps.Handle); + GLib.Marshaller.Free (native_name_template); + } +