Finish/fix the Gst.Object bindings

Also update docs and fix indention
This commit is contained in:
Sebastian Dröge 2009-04-23 21:12:31 +02:00
parent 5ddc0b00d7
commit e1775ea341
16 changed files with 143 additions and 276 deletions

View file

@ -1,35 +0,0 @@
<Type Name="DeepNotifyArgs" FullName="Gst.DeepNotifyArgs">
<TypeSignature Language="C#" Value="public class DeepNotifyArgs : GLib.SignalArgs" />
<AssemblyInfo>
<AssemblyName>gstreamer-sharp</AssemblyName>
<AssemblyVersion>0.9.5.99</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>GLib.SignalArgs</BaseTypeName>
</Base>
<Interfaces />
<Docs>
<summary>To be added.</summary>
<remarks>To be added.</remarks>
</Docs>
<Members>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public DeepNotifyArgs ();" />
<MemberType>Constructor</MemberType>
<Parameters />
<Docs><summary>To be added.</summary><remarks>To be added.</remarks></Docs>
<AssemblyInfo><AssemblyVersion>0.9.5.99</AssemblyVersion></AssemblyInfo></Member><Member MemberName="Orig">
<MemberSignature Language="C#" Value="public Gst.Object Orig { get; }" />
<MemberType>Property</MemberType>
<ReturnValue><ReturnType>Gst.Object</ReturnType></ReturnValue>
<Docs><summary>To be added.</summary><value>To be added.</value><remarks>To be added.</remarks></Docs>
<AssemblyInfo><AssemblyVersion>0.9.5.99</AssemblyVersion></AssemblyInfo></Member><Member MemberName="Pspec">
<MemberSignature Language="C#" Value="public IntPtr Pspec { get; }" />
<MemberType>Property</MemberType>
<ReturnValue><ReturnType>System.IntPtr</ReturnType></ReturnValue>
<Docs><summary>To be added.</summary><value>To be added.</value><remarks>To be added.</remarks></Docs>
<AssemblyInfo><AssemblyVersion>0.9.5.99</AssemblyVersion></AssemblyInfo></Member>
</Members>
</Type>

View file

@ -1,23 +0,0 @@
<Type Name="DeepNotifyHandler" FullName="Gst.DeepNotifyHandler">
<TypeSignature Language="C#" Value="public delegate void DeepNotifyHandler(object o, DeepNotifyArgs args);" />
<AssemblyInfo>
<AssemblyName>gstreamer-sharp</AssemblyName>
<AssemblyVersion>0.9.5.99</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Delegate</BaseTypeName>
</Base>
<Parameters>
<Parameter Name="o" Type="System.Object" />
<Parameter Name="args" Type="Gst.DeepNotifyArgs" />
</Parameters>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Docs>
<param name="o">To be added.</param>
<param name="args">To be added.</param>
<summary>To be added.</summary>
<remarks>To be added.</remarks>
</Docs>
</Type>

File diff suppressed because one or more lines are too long

View file

@ -22,32 +22,12 @@
<Member MemberName="Both">
<MemberSignature Language="C#" Value="Both" />
<MemberType>Field</MemberType>
<ReturnValue><ReturnType>Gst.EventType</ReturnType></ReturnValue>
<Docs><summary>To be added.</summary></Docs>
<AssemblyInfo><AssemblyVersion>0.9.5.99</AssemblyVersion></AssemblyInfo></Member><Member MemberName="BothOob">
<MemberSignature Language="C#" Value="BothOob" />
<MemberType>Field</MemberType>
<ReturnValue><ReturnType>Gst.EventType</ReturnType></ReturnValue>
<Docs><summary>To be added.</summary></Docs>
<AssemblyInfo><AssemblyVersion>0.9.5.99</AssemblyVersion></AssemblyInfo></Member><Member MemberName="BufferSize">
<Member MemberName="BufferSize">
<MemberSignature Language="C#" Value="BufferSize" />
<MemberType>Field</MemberType>
<ReturnValue><ReturnType>Gst.EventType</ReturnType></ReturnValue>
<Docs><summary>To be added.</summary></Docs>
<AssemblyInfo><AssemblyVersion>0.9.5.99</AssemblyVersion></AssemblyInfo></Member><Member MemberName="Downstream">
<MemberSignature Language="C#" Value="Downstream" />
<MemberType>Field</MemberType>
<ReturnValue><ReturnType>Gst.EventType</ReturnType></ReturnValue>
<Docs><summary>To be added.</summary></Docs>
<AssemblyInfo><AssemblyVersion>0.9.5.99</AssemblyVersion></AssemblyInfo></Member><Member MemberName="DownstreamOob">
<MemberSignature Language="C#" Value="DownstreamOob" />
<MemberType>Field</MemberType>
<ReturnValue><ReturnType>Gst.EventType</ReturnType></ReturnValue>
<Docs><summary>To be added.</summary></Docs>
<AssemblyInfo><AssemblyVersion>0.9.5.99</AssemblyVersion></AssemblyInfo></Member><Member MemberName="Eos">
<AssemblyInfo><AssemblyVersion>0.9.5.99</AssemblyVersion></AssemblyInfo></Member><Member MemberName="CustomBoth"><MemberSignature Language="C#" Value="CustomBoth" /><MemberType>Field</MemberType><AssemblyInfo><AssemblyVersion>0.9.5.99</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>Gst.EventType</ReturnType></ReturnValue><Docs><summary>To be added.</summary></Docs></Member><Member MemberName="CustomBothOob"><MemberSignature Language="C#" Value="CustomBothOob" /><MemberType>Field</MemberType><AssemblyInfo><AssemblyVersion>0.9.5.99</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>Gst.EventType</ReturnType></ReturnValue><Docs><summary>To be added.</summary></Docs></Member><Member MemberName="CustomDownstream"><MemberSignature Language="C#" Value="CustomDownstream" /><MemberType>Field</MemberType><AssemblyInfo><AssemblyVersion>0.9.5.99</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>Gst.EventType</ReturnType></ReturnValue><Docs><summary>To be added.</summary></Docs></Member><Member MemberName="CustomDownstreamOob"><MemberSignature Language="C#" Value="CustomDownstreamOob" /><MemberType>Field</MemberType><AssemblyInfo><AssemblyVersion>0.9.5.99</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>Gst.EventType</ReturnType></ReturnValue><Docs><summary>To be added.</summary></Docs></Member><Member MemberName="CustomUpstream"><MemberSignature Language="C#" Value="CustomUpstream" /><MemberType>Field</MemberType><AssemblyInfo><AssemblyVersion>0.9.5.99</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>Gst.EventType</ReturnType></ReturnValue><Docs><summary>To be added.</summary></Docs></Member><Member MemberName="Eos">
<MemberSignature Language="C#" Value="Eos" />
<MemberType>Field</MemberType>
<ReturnValue><ReturnType>Gst.EventType</ReturnType></ReturnValue>
@ -92,11 +72,6 @@
<MemberType>Field</MemberType>
<ReturnValue><ReturnType>Gst.EventType</ReturnType></ReturnValue>
<Docs><summary>To be added.</summary></Docs>
<AssemblyInfo><AssemblyVersion>0.9.5.99</AssemblyVersion></AssemblyInfo></Member><Member MemberName="Upstream">
<MemberSignature Language="C#" Value="Upstream" />
<MemberType>Field</MemberType>
<ReturnValue><ReturnType>Gst.EventType</ReturnType></ReturnValue>
<Docs><summary>To be added.</summary></Docs>
<AssemblyInfo><AssemblyVersion>0.9.5.99</AssemblyVersion></AssemblyInfo></Member>

View file

@ -20,7 +20,7 @@
<remarks>To be added.</remarks>
</Docs>
<Members>
<Member MemberName="Downstream">
<Member MemberName="Both"><MemberSignature Language="C#" Value="Both" /><MemberType>Field</MemberType><AssemblyInfo><AssemblyVersion>0.9.5.99</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>Gst.EventTypeFlags</ReturnType></ReturnValue><Docs><summary>To be added.</summary></Docs></Member><Member MemberName="Downstream">
<MemberSignature Language="C#" Value="Downstream" />
<MemberType>Field</MemberType>
<ReturnValue><ReturnType>Gst.EventTypeFlags</ReturnType></ReturnValue>

View file

@ -1,5 +1,5 @@
<Type Name="Object" FullName="Gst.Object">
<TypeSignature Language="C#" Value="public class Object : GLib.Object" />
<TypeSignature Language="C#" Value="public abstract class Object : GLib.Object" />
<AssemblyInfo>
<AssemblyName>gstreamer-sharp</AssemblyName>
<AssemblyVersion>0.9.5.99</AssemblyVersion>
@ -39,28 +39,10 @@
<MemberType>Constructor</MemberType>
<Parameters><Parameter Name="raw" Type="System.IntPtr" /></Parameters>
<Docs><param name="raw">To be added.</param><summary>To be added.</summary><remarks>To be added.</remarks></Docs>
<AssemblyInfo><AssemblyVersion>0.9.5.99</AssemblyVersion></AssemblyInfo></Member><Member MemberName="CheckUniqueness">
<MemberSignature Language="C#" Value="public static bool CheckUniqueness (GLib.List list, string name);" />
<MemberType>Method</MemberType>
<ReturnValue><ReturnType>System.Boolean</ReturnType></ReturnValue>
<Parameters><Parameter Name="list" Type="GLib.List" /><Parameter Name="name" Type="System.String" /></Parameters>
<Docs><param name="list">To be added.</param><param name="name">To be added.</param><summary>To be added.</summary><returns>To be added.</returns><remarks>To be added.</remarks></Docs>
<AssemblyInfo><AssemblyVersion>0.9.5.99</AssemblyVersion></AssemblyInfo></Member><Member MemberName="DeepNotify">
<MemberSignature Language="C#" Value="public event Gst.DeepNotifyHandler DeepNotify;" />
<MemberType>Event</MemberType>
<Attributes><Attribute><AttributeName>GLib.Signal("deep-notify")</AttributeName></Attribute></Attributes>
<ReturnValue><ReturnType>Gst.DeepNotifyHandler</ReturnType></ReturnValue>
<Docs><summary>To be added.</summary><remarks>To be added.</remarks></Docs>
<AssemblyInfo><AssemblyVersion>0.9.5.99</AssemblyVersion></AssemblyInfo></Member><Member MemberName="DefaultDeepNotify">
<MemberSignature Language="C#" Value="public static void DefaultDeepNotify (GLib.Object objekt, Gst.Object orig, IntPtr pspec, string excluded_props);" />
<MemberType>Method</MemberType>
<ReturnValue><ReturnType>System.Void</ReturnType></ReturnValue>
<Parameters><Parameter Name="objekt" Type="GLib.Object" /><Parameter Name="orig" Type="Gst.Object" /><Parameter Name="pspec" Type="System.IntPtr" /><Parameter Name="excluded_props" Type="System.String" /></Parameters>
<Docs><param name="objekt">To be added.</param><param name="orig">To be added.</param><param name="pspec">To be added.</param><param name="excluded_props">To be added.</param><summary>To be added.</summary><remarks>To be added.</remarks></Docs>
<AssemblyInfo><AssemblyVersion>0.9.5.99</AssemblyVersion></AssemblyInfo></Member><Member MemberName="Flags">
<MemberSignature Language="C#" Value="public uint Flags { get; }" />
<AssemblyInfo><AssemblyVersion>0.9.5.99</AssemblyVersion></AssemblyInfo></Member><Member MemberName="CheckUniqueness"><MemberSignature Language="C#" Value="public static bool CheckUniqueness (Gst.Object[] objects, string name);" /><MemberType>Method</MemberType><AssemblyInfo><AssemblyVersion>0.9.5.99</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.Boolean</ReturnType></ReturnValue><Parameters><Parameter Name="objects" Type="Gst.Object[]" /><Parameter Name="name" Type="System.String" /></Parameters><Docs><param name="objects">To be added.</param><param name="name">To be added.</param><summary>To be added.</summary><returns>To be added.</returns><remarks>To be added.</remarks></Docs></Member><Member MemberName="Flags">
<MemberSignature Language="C#" Value="public Gst.ObjectFlags Flags { set; get; }" />
<MemberType>Property</MemberType>
<ReturnValue><ReturnType>System.UInt32</ReturnType></ReturnValue>
<ReturnValue><ReturnType>Gst.ObjectFlags</ReturnType></ReturnValue>
<Docs><summary>To be added.</summary><value>To be added.</value><remarks>To be added.</remarks></Docs>
<AssemblyInfo><AssemblyVersion>0.9.5.99</AssemblyVersion></AssemblyInfo></Member><Member MemberName="GType">
<MemberSignature Language="C#" Value="public static GLib.GType GType { get; }" />
@ -73,7 +55,7 @@
<ReturnValue><ReturnType>System.Boolean</ReturnType></ReturnValue>
<Parameters><Parameter Name="ancestor" Type="Gst.Object" /></Parameters>
<Docs><param name="ancestor">To be added.</param><summary>To be added.</summary><returns>To be added.</returns><remarks>To be added.</remarks></Docs>
<AssemblyInfo><AssemblyVersion>0.9.5.99</AssemblyVersion></AssemblyInfo></Member><Member MemberName="Name">
<AssemblyInfo><AssemblyVersion>0.9.5.99</AssemblyVersion></AssemblyInfo></Member><Member MemberName="Lock"><MemberSignature Language="C#" Value="public void Lock ();" /><MemberType>Method</MemberType><AssemblyInfo><AssemblyVersion>0.9.5.99</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.Void</ReturnType></ReturnValue><Parameters /><Docs><summary>To be added.</summary><remarks>To be added.</remarks></Docs></Member><Member MemberName="Name">
<MemberSignature Language="C#" Value="public string Name { set; get; }" />
<MemberType>Property</MemberType>
<Attributes><Attribute><AttributeName>GLib.Property("name")</AttributeName></Attribute></Attributes>
@ -84,13 +66,7 @@
<MemberType>Property</MemberType>
<ReturnValue><ReturnType>System.String</ReturnType></ReturnValue>
<Docs><summary>To be added.</summary><value>To be added.</value><remarks>To be added.</remarks></Docs>
<AssemblyInfo><AssemblyVersion>0.9.5.99</AssemblyVersion></AssemblyInfo></Member><Member MemberName="OnDeepNotify">
<MemberSignature Language="C#" Value="protected virtual void OnDeepNotify (Gst.Object orig, IntPtr pspec);" />
<MemberType>Method</MemberType>
<ReturnValue><ReturnType>System.Void</ReturnType></ReturnValue>
<Parameters><Parameter Name="orig" Type="Gst.Object" /><Parameter Name="pspec" Type="System.IntPtr" /></Parameters>
<Docs><param name="orig">To be added.</param><param name="pspec">To be added.</param><summary>To be added.</summary><remarks>To be added.</remarks></Docs>
<AssemblyInfo><AssemblyVersion>0.9.5.99</AssemblyVersion></AssemblyInfo><Attributes><Attribute><AttributeName>GLib.DefaultSignalHandler(Type=typeof(Gst.Object), ConnectionMethod="OverrideDeepNotify")</AttributeName></Attribute></Attributes></Member><Member MemberName="OnParentSet">
<AssemblyInfo><AssemblyVersion>0.9.5.99</AssemblyVersion></AssemblyInfo></Member><Member MemberName="OnParentSet">
<MemberSignature Language="C#" Value="protected virtual void OnParentSet (Gst.Object parent);" />
<MemberType>Method</MemberType>
<ReturnValue><ReturnType>System.Void</ReturnType></ReturnValue>
@ -103,7 +79,7 @@
<Parameters><Parameter Name="parent" Type="Gst.Object" /></Parameters>
<Docs><param name="parent">To be added.</param><summary>To be added.</summary><remarks>To be added.</remarks></Docs>
<AssemblyInfo><AssemblyVersion>0.9.5.99</AssemblyVersion></AssemblyInfo><Attributes><Attribute><AttributeName>GLib.DefaultSignalHandler(Type=typeof(Gst.Object), ConnectionMethod="OverrideParentUnset")</AttributeName></Attribute></Attributes></Member><Member MemberName="Parent">
<MemberSignature Language="C#" Value="public Gst.Object Parent { get; }" />
<MemberSignature Language="C#" Value="public Gst.Object Parent { set; get; }" />
<MemberType>Property</MemberType>
<ReturnValue><ReturnType>Gst.Object</ReturnType></ReturnValue>
<Docs><summary>To be added.</summary><value>To be added.</value><remarks>To be added.</remarks></Docs>
@ -124,53 +100,12 @@
<MemberType>Property</MemberType>
<ReturnValue><ReturnType>System.String</ReturnType></ReturnValue>
<Docs><summary>To be added.</summary><value>To be added.</value><remarks>To be added.</remarks></Docs>
<AssemblyInfo><AssemblyVersion>0.9.5.99</AssemblyVersion></AssemblyInfo></Member><Member MemberName="Ref">
<MemberSignature Language="C#" Value="public static IntPtr Ref (IntPtr objekt);" />
<MemberType>Method</MemberType>
<ReturnValue><ReturnType>System.IntPtr</ReturnType></ReturnValue>
<Parameters><Parameter Name="objekt" Type="System.IntPtr" /></Parameters>
<Docs><param name="objekt">To be added.</param><summary>To be added.</summary><returns>To be added.</returns><remarks>To be added.</remarks></Docs>
<AssemblyInfo><AssemblyVersion>0.9.5.99</AssemblyVersion></AssemblyInfo></Member><Member MemberName="Refcount">
<MemberSignature Language="C#" Value="public int Refcount { get; }" />
<MemberType>Property</MemberType>
<ReturnValue><ReturnType>System.Int32</ReturnType></ReturnValue>
<Docs><summary>To be added.</summary><value>To be added.</value><remarks>To be added.</remarks></Docs>
<AssemblyInfo><AssemblyVersion>0.9.5.99</AssemblyVersion></AssemblyInfo></Member><Member MemberName="Replace">
<MemberSignature Language="C#" Value="public void Replace (Gst.Object newobj);" />
<MemberType>Method</MemberType>
<ReturnValue><ReturnType>System.Void</ReturnType></ReturnValue>
<Parameters><Parameter Name="newobj" Type="Gst.Object" /></Parameters>
<Docs><param name="newobj">To be added.</param><summary>To be added.</summary><remarks>To be added.</remarks></Docs>
<AssemblyInfo><AssemblyVersion>0.9.5.99</AssemblyVersion></AssemblyInfo></Member><Member MemberName="SetName">
<MemberSignature Language="C#" Value="public bool SetName (string name);" />
<MemberType>Method</MemberType>
<ReturnValue><ReturnType>System.Boolean</ReturnType></ReturnValue>
<Parameters><Parameter Name="name" Type="System.String" /></Parameters>
<Docs><param name="name">To be added.</param><summary>To be added.</summary><returns>To be added.</returns><remarks>To be added.</remarks></Docs>
<AssemblyInfo><AssemblyVersion>0.9.5.99</AssemblyVersion></AssemblyInfo></Member><Member MemberName="SetParent">
<MemberSignature Language="C#" Value="public bool SetParent (Gst.Object parent);" />
<MemberType>Method</MemberType>
<ReturnValue><ReturnType>System.Boolean</ReturnType></ReturnValue>
<Parameters><Parameter Name="parent" Type="Gst.Object" /></Parameters>
<Docs><param name="parent">To be added.</param><summary>To be added.</summary><returns>To be added.</returns><remarks>To be added.</remarks></Docs>
<AssemblyInfo><AssemblyVersion>0.9.5.99</AssemblyVersion></AssemblyInfo></Member><Member MemberName="Sink">
<MemberSignature Language="C#" Value="public static void Sink (IntPtr objekt);" />
<MemberType>Method</MemberType>
<ReturnValue><ReturnType>System.Void</ReturnType></ReturnValue>
<Parameters><Parameter Name="objekt" Type="System.IntPtr" /></Parameters>
<Docs><param name="objekt">To be added.</param><summary>To be added.</summary><remarks>To be added.</remarks></Docs>
<AssemblyInfo><AssemblyVersion>0.9.5.99</AssemblyVersion></AssemblyInfo></Member><Member MemberName="Unparent">
<AssemblyInfo><AssemblyVersion>0.9.5.99</AssemblyVersion></AssemblyInfo></Member><Member MemberName="Raw"><MemberSignature Language="C#" Value="protected override IntPtr Raw { set; get; }" /><MemberType>Property</MemberType><AssemblyInfo><AssemblyVersion>0.9.5.99</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.IntPtr</ReturnType></ReturnValue><Docs><summary>To be added.</summary><value>To be added.</value><remarks>To be added.</remarks></Docs></Member><Member MemberName="TryLock"><MemberSignature Language="C#" Value="public bool TryLock ();" /><MemberType>Method</MemberType><AssemblyInfo><AssemblyVersion>0.9.5.99</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.Boolean</ReturnType></ReturnValue><Parameters /><Docs><summary>To be added.</summary><returns>To be added.</returns><remarks>To be added.</remarks></Docs></Member><Member MemberName="Unlock"><MemberSignature Language="C#" Value="public void Unlock ();" /><MemberType>Method</MemberType><AssemblyInfo><AssemblyVersion>0.9.5.99</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.Void</ReturnType></ReturnValue><Parameters /><Docs><summary>To be added.</summary><remarks>To be added.</remarks></Docs></Member><Member MemberName="Unparent">
<MemberSignature Language="C#" Value="public void Unparent ();" />
<MemberType>Method</MemberType>
<ReturnValue><ReturnType>System.Void</ReturnType></ReturnValue>
<Parameters />
<Docs><summary>To be added.</summary><remarks>To be added.</remarks></Docs>
<AssemblyInfo><AssemblyVersion>0.9.5.99</AssemblyVersion></AssemblyInfo></Member><Member MemberName="Unref">
<MemberSignature Language="C#" Value="public static void Unref (IntPtr objekt);" />
<MemberType>Method</MemberType>
<ReturnValue><ReturnType>System.Void</ReturnType></ReturnValue>
<Parameters><Parameter Name="objekt" Type="System.IntPtr" /></Parameters>
<Docs><param name="objekt">To be added.</param><summary>To be added.</summary><remarks>To be added.</remarks></Docs>
<AssemblyInfo><AssemblyVersion>0.9.5.99</AssemblyVersion></AssemblyInfo></Member>

File diff suppressed because one or more lines are too long

View file

@ -40,8 +40,6 @@
<Type Name="CoreError" Kind="Enumeration" />
<Type Name="Date" Kind="Structure" />
<Type Name="DecodeBin" Kind="Class" />
<Type Name="DeepNotifyArgs" Kind="Class" />
<Type Name="DeepNotifyHandler" Kind="Delegate" />
<Type Name="DoLatencyArgs" Kind="Class" />
<Type Name="DoLatencyHandler" Kind="Delegate" />
<Type Name="DoubleRange" Kind="Structure" />

View file

@ -26,11 +26,14 @@ public Element [] Children {
[DllImport ("gstreamer-0.10.dll") ]
static extern bool gst_bin_add (IntPtr raw, IntPtr element);
[DllImport ("gobject-2.0-0.dll") ]
static extern IntPtr g_object_ref (IntPtr raw);
public bool Add (Gst.Element element) {
bool raw_ret = gst_bin_add (Handle, element == null ? IntPtr.Zero : element.Handle);
if (raw_ret) {
// Incrmenting the refcount of the element.
Gst.Object.Ref (element.Handle);
g_object_ref (element.Handle);
}
bool ret = raw_ret;
return ret;

View file

@ -305,7 +305,7 @@ namespace Gst {
[DllImport ("gobject-2.0.dll") ]
static extern uint g_signal_lookup (IntPtr name, IntPtr itype);
[DllImport ("glib-2.0.dll") ]
[DllImport ("libglib-2.0.dll") ]
static extern uint g_quark_from_string (IntPtr str);
[DllImport ("gobject-2.0.dll") ]

View file

@ -58,10 +58,13 @@ public object Emit (string signal, params object[] parameters) {
return DynamicSignal.Emit (this, signal, parameters);
}
[DllImport ("gobject-2.0-0.dll")]
static extern IntPtr g_object_ref (IntPtr raw);
public bool AddPad (Pad p) {
bool ret = gst_element_add_pad (this.Handle, p == null ? IntPtr.Zero : p.Handle);
if (ret)
Gst.Object.Ref (p.Handle);
g_object_ref (p.Handle);
return ret;
}

View file

@ -267,8 +267,26 @@
<attr path="/api/namespace/callback[@name='MiniObjectFinalizeFunction']" name="hidden">1</attr>
<attr path="/api/namespace/object[@name='Object']" name="abstract">1</attr>
<attr path="/api/namespace/object[@name='Object']/field[@name='Refcount']" name="hidden">1</attr>
<attr path="/api/namespace/object[@name='Object']/method[@name='DefaultError']" name="hidden">1</attr>
<attr path="/api/namespace/object[@name='Object']/field[@name='Lock']" name="hidden">1</attr>
<attr path="/api/namespace/object[@name='Object']/field[@name='Name']" name="hidden">1</attr>
<attr path="/api/namespace/object[@name='Object']/field[@name='NamePrefix']" name="hidden">1</attr>
<attr path="/api/namespace/object[@name='Object']/field[@name='Parent']" name="hidden">1</attr>
<attr path="/api/namespace/object[@name='Object']/field[@name='Flags']" name="writeable">true</attr>
<attr path="/api/namespace/object[@name='Object']/field[@name='Flags']" name="type">GstObjectFlags</attr>
<attr path="/api/namespace/object[@name='Object']/method[@cname='gst_object_default_error']" name="hidden">1</attr>
<attr path="/api/namespace/object[@name='Object']/method[@cname='gst_object_default_deep_notify']" name="hidden">1</attr>
<attr path="/api/namespace/object[@name='Object']/method[@cname='gst_object_set_name']" name="hidden">1</attr>
<attr path="/api/namespace/object[@name='Object']/method[@cname='gst_object_get_name']" name="hidden">1</attr>
<attr path="/api/namespace/object[@name='Object']/method[@cname='gst_object_ref']" name="hidden">1</attr>
<attr path="/api/namespace/object[@name='Object']/method[@cname='gst_object_unref']" name="hidden">1</attr>
<attr path="/api/namespace/object[@name='Object']/method[@cname='gst_object_replace']" name="hidden">1</attr>
<attr path="/api/namespace/object[@name='Object']/method[@cname='gst_object_sink']" name="hidden">1</attr>
<attr path="/api/namespace/object[@name='Object']/method[@cname='gst_object_set_parent']" name="hidden">1</attr>
<attr path="/api/namespace/object[@name='Object']/method[@cname='gst_object_get_parent']" name="hidden">1</attr>
<attr path="/api/namespace/object[@name='Object']/method[@cname='gst_object_check_uniqueness']" name="hidden">1</attr>
<attr path="/api/namespace/object[@name='Object']/signal[@cname='deep-notify']" name="hidden">1</attr>
<attr path="/api/namespace/enum[@name='ObjectFlags']/member[@cname='GST_OBJECT_FLAG_LAST']" name="name">Last</attr>

View file

@ -1,8 +1,80 @@
[DllImport ("gstreamer-0.10.dll") ]
static extern void gst_object_sink (IntPtr raw);
[DllImport ("gstreamer-0.10.dll") ]
static extern IntPtr gst_object_ref (IntPtr raw);
public int Refcount {
protected override IntPtr Raw {
get {
return this.RefCount;
return base.Raw;
}
set {
if (value != IntPtr.Zero) {
gst_object_ref (value);
gst_object_sink (value);
}
base.Raw = value;
}
}
[DllImport ("gstreamer-0.10.dll") ]
static extern bool gst_object_set_parent (IntPtr raw, IntPtr parent);
[DllImport ("gstreamer-0.10.dll") ]
static extern IntPtr gst_object_get_parent (IntPtr raw);
public Gst.Object Parent {
set {
bool raw_ret = gst_object_set_parent (Handle, value == null ? IntPtr.Zero : value.Handle);
if (!raw_ret)
throw new ApplicationException ();
}
get {
IntPtr raw_ret = gst_object_get_parent (Handle);
Gst.Object ret = GLib.Object.GetObject (raw_ret, true) as Gst.Object;
return ret;
}
}
[DllImport ("gstreamersharpglue-0.10") ]
extern static uint gstsharp_gst_object_get_lock_offset ();
static uint lock_offset = gstsharp_gst_object_get_lock_offset ();
private IntPtr LockPtr {
get {
unsafe {
IntPtr* raw_ptr = (IntPtr*) ( ( (byte*) Handle) + lock_offset);
return (*raw_ptr);
}
}
}
[DllImport ("libglib-2.0-0.dll") ]
static extern void g_mutex_lock (IntPtr mutex);
[DllImport ("libglib-2.0-0.dll") ]
static extern void g_mutex_unlock (IntPtr mutex);
[DllImport ("libglib-2.0-0.dll") ]
static extern bool g_mutex_trylock (IntPtr mutex);
public void Lock () {
g_mutex_lock (LockPtr);
}
public void Unlock () {
g_mutex_unlock (LockPtr);
}
public bool TryLock () {
return g_mutex_trylock (LockPtr);
}
[DllImport ("gstreamer-0.10.dll") ]
static extern bool gst_object_check_uniqueness (IntPtr list, IntPtr name);
public static bool CheckUniqueness (Gst.Object[] objects, string name) {
GLib.List list = new GLib.List (objects, typeof (Gst.Object), false, false);
IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name);
bool raw_ret = gst_object_check_uniqueness (list.Handle, native_name);
bool ret = raw_ret;
GLib.Marshaller.Free (native_name);
return ret;
}

View file

@ -9,6 +9,7 @@ libgstreamersharpglue_0_10_la_SOURCES = \
bin.c \
structure.c \
taglist.c \
object.c \
gobject.c
nodist_libgstreamersharpglue_0_10_la_SOURCES = generated.c

View file

@ -0,0 +1,7 @@
#include <gst/gst.h>
guint
gstsharp_gst_object_get_lock_offset (void)
{
return (guint) G_STRUCT_OFFSET (GstObject, lock);
}

View file

@ -1,6 +1,8 @@
#include <gst/gst.h>
void
gstsharp_gst_tag_list_add_value (GstTagList *list, GstTagMergeMode mode, const gchar * tag, const GValue *v) {
gstsharp_gst_tag_list_add_value (GstTagList * list, GstTagMergeMode mode,
const gchar * tag, const GValue * v)
{
gst_tag_list_add_values (list, mode, tag, v, NULL);
}