1 // This file was generated by the Gtk# code generator.
2 // Any changes made will be lost if regenerated.
7 using System.Collections;
8 using System.Collections.Generic;
9 using System.Runtime.InteropServices;
11 #region Autogenerated code
12 public partial class Bin : Gst.Element, Gst.IChildProxy {
14 public Bin (IntPtr raw) : base(raw) {}
16 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
17 static extern IntPtr gst_bin_new(IntPtr name);
19 public Bin (string name) : base (IntPtr.Zero)
21 if (GetType () != typeof (Bin)) {
22 var vals = new List<GLib.Value> ();
23 var names = new List<string> ();
25 vals.Add (new GLib.Value (name));
26 CreateNativeObject (names.ToArray (), vals.ToArray ());
29 IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name);
30 Raw = gst_bin_new(native_name);
31 GLib.Marshaller.Free (native_name);
34 [GLib.Property ("async-handling")]
35 public bool AsyncHandling {
37 GLib.Value val = GetProperty ("async-handling");
38 bool ret = (bool) val;
43 GLib.Value val = new GLib.Value(value);
44 SetProperty("async-handling", val);
49 [GLib.Property ("message-forward")]
50 public bool MessageForward {
52 GLib.Value val = GetProperty ("message-forward");
53 bool ret = (bool) val;
58 GLib.Value val = new GLib.Value(value);
59 SetProperty("message-forward", val);
64 public int Numchildren {
67 int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("numchildren"));
73 public GLib.List Children {
76 IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("children"));
77 return new GLib.List((*raw_ptr));
82 public uint ChildrenCookie {
85 uint* raw_ptr = (uint*)(((byte*)Handle) + abi_info.GetFieldOffset("children_cookie"));
91 public Gst.Bus ChildBus {
94 IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("child_bus"));
95 return GLib.Object.GetObject((*raw_ptr)) as Gst.Bus;
100 public GLib.List Messages {
103 IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("messages"));
104 return new GLib.List((*raw_ptr));
109 public bool Polling {
112 bool* raw_ptr = (bool*)(((byte*)Handle) + abi_info.GetFieldOffset("polling"));
118 public bool StateDirty {
121 bool* raw_ptr = (bool*)(((byte*)Handle) + abi_info.GetFieldOffset("state_dirty"));
127 public bool ClockDirty {
130 bool* raw_ptr = (bool*)(((byte*)Handle) + abi_info.GetFieldOffset("clock_dirty"));
136 public Gst.Clock ProvidedClock {
139 IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("provided_clock"));
140 return GLib.Object.GetObject((*raw_ptr)) as Gst.Clock;
145 public Gst.Element ClockProvider {
148 IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("clock_provider"));
149 return GLib.Object.GetObject((*raw_ptr)) as Gst.Element;
154 [GLib.Signal("deep-element-added")]
155 public event Gst.DeepElementAddedHandler DeepElementAdded {
157 this.AddSignalHandler ("deep-element-added", value, typeof (Gst.DeepElementAddedArgs));
160 this.RemoveSignalHandler ("deep-element-added", value);
164 [GLib.Signal("deep-element-removed")]
165 public event Gst.DeepElementRemovedHandler DeepElementRemoved {
167 this.AddSignalHandler ("deep-element-removed", value, typeof (Gst.DeepElementRemovedArgs));
170 this.RemoveSignalHandler ("deep-element-removed", value);
174 [GLib.Signal("do-latency")]
175 public event Gst.DoLatencyHandler DoLatency {
177 this.AddSignalHandler ("do-latency", value, typeof (Gst.DoLatencyArgs));
180 this.RemoveSignalHandler ("do-latency", value);
184 [GLib.Signal("element-added")]
185 public event Gst.ElementAddedHandler ElementAdded {
187 this.AddSignalHandler ("element-added", value, typeof (Gst.ElementAddedArgs));
190 this.RemoveSignalHandler ("element-added", value);
194 [GLib.Signal("element-removed")]
195 public event Gst.ElementRemovedHandler ElementRemoved {
197 this.AddSignalHandler ("element-removed", value, typeof (Gst.ElementRemovedArgs));
200 this.RemoveSignalHandler ("element-removed", value);
204 static ElementAddedNativeDelegate ElementAdded_cb_delegate;
205 static ElementAddedNativeDelegate ElementAddedVMCallback {
207 if (ElementAdded_cb_delegate == null)
208 ElementAdded_cb_delegate = new ElementAddedNativeDelegate (ElementAdded_cb);
209 return ElementAdded_cb_delegate;
213 static void OverrideElementAdded (GLib.GType gtype)
215 OverrideElementAdded (gtype, ElementAddedVMCallback);
218 static void OverrideElementAdded (GLib.GType gtype, ElementAddedNativeDelegate callback)
221 IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("element_added"));
222 *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
226 [UnmanagedFunctionPointer (CallingConvention.Cdecl)]
227 delegate void ElementAddedNativeDelegate (IntPtr inst, IntPtr element);
229 static void ElementAdded_cb (IntPtr inst, IntPtr element)
232 Bin __obj = GLib.Object.GetObject (inst, false) as Bin;
233 __obj.OnElementAdded (GLib.Object.GetObject(element) as Gst.Element);
234 } catch (Exception e) {
235 GLib.ExceptionManager.RaiseUnhandledException (e, false);
239 [GLib.DefaultSignalHandler(Type=typeof(Gst.Bin), ConnectionMethod="OverrideElementAdded")]
240 protected virtual void OnElementAdded (Gst.Element element)
242 InternalElementAdded (element);
245 private void InternalElementAdded (Gst.Element element)
247 ElementAddedNativeDelegate unmanaged = null;
249 IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("element_added"));
250 unmanaged = (ElementAddedNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(ElementAddedNativeDelegate));
252 if (unmanaged == null) return;
254 unmanaged (this.Handle, element == null ? IntPtr.Zero : element.Handle);
257 static ElementRemovedNativeDelegate ElementRemoved_cb_delegate;
258 static ElementRemovedNativeDelegate ElementRemovedVMCallback {
260 if (ElementRemoved_cb_delegate == null)
261 ElementRemoved_cb_delegate = new ElementRemovedNativeDelegate (ElementRemoved_cb);
262 return ElementRemoved_cb_delegate;
266 static void OverrideElementRemoved (GLib.GType gtype)
268 OverrideElementRemoved (gtype, ElementRemovedVMCallback);
271 static void OverrideElementRemoved (GLib.GType gtype, ElementRemovedNativeDelegate callback)
274 IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("element_removed"));
275 *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
279 [UnmanagedFunctionPointer (CallingConvention.Cdecl)]
280 delegate void ElementRemovedNativeDelegate (IntPtr inst, IntPtr element);
282 static void ElementRemoved_cb (IntPtr inst, IntPtr element)
285 Bin __obj = GLib.Object.GetObject (inst, false) as Bin;
286 __obj.OnElementRemoved (GLib.Object.GetObject(element) as Gst.Element);
287 } catch (Exception e) {
288 GLib.ExceptionManager.RaiseUnhandledException (e, false);
292 [GLib.DefaultSignalHandler(Type=typeof(Gst.Bin), ConnectionMethod="OverrideElementRemoved")]
293 protected virtual void OnElementRemoved (Gst.Element element)
295 InternalElementRemoved (element);
298 private void InternalElementRemoved (Gst.Element element)
300 ElementRemovedNativeDelegate unmanaged = null;
302 IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("element_removed"));
303 unmanaged = (ElementRemovedNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(ElementRemovedNativeDelegate));
305 if (unmanaged == null) return;
307 unmanaged (this.Handle, element == null ? IntPtr.Zero : element.Handle);
310 static AddElementNativeDelegate AddElement_cb_delegate;
311 static AddElementNativeDelegate AddElementVMCallback {
313 if (AddElement_cb_delegate == null)
314 AddElement_cb_delegate = new AddElementNativeDelegate (AddElement_cb);
315 return AddElement_cb_delegate;
319 static void OverrideAddElement (GLib.GType gtype)
321 OverrideAddElement (gtype, AddElementVMCallback);
324 static void OverrideAddElement (GLib.GType gtype, AddElementNativeDelegate callback)
327 IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("add_element"));
328 *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
332 [UnmanagedFunctionPointer (CallingConvention.Cdecl)]
333 delegate bool AddElementNativeDelegate (IntPtr inst, IntPtr element);
335 static bool AddElement_cb (IntPtr inst, IntPtr element)
338 Bin __obj = GLib.Object.GetObject (inst, false) as Bin;
340 __result = __obj.OnAddElement (GLib.Object.GetObject(element) as Gst.Element);
342 } catch (Exception e) {
343 GLib.ExceptionManager.RaiseUnhandledException (e, true);
344 // NOTREACHED: above call does not return.
349 [GLib.DefaultSignalHandler(Type=typeof(Gst.Bin), ConnectionMethod="OverrideAddElement")]
350 protected virtual bool OnAddElement (Gst.Element element)
352 return InternalAddElement (element);
355 private bool InternalAddElement (Gst.Element element)
357 AddElementNativeDelegate unmanaged = null;
359 IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("add_element"));
360 unmanaged = (AddElementNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(AddElementNativeDelegate));
362 if (unmanaged == null) return false;
364 bool __result = unmanaged (this.Handle, element == null ? IntPtr.Zero : element.Handle);
368 static RemoveElementNativeDelegate RemoveElement_cb_delegate;
369 static RemoveElementNativeDelegate RemoveElementVMCallback {
371 if (RemoveElement_cb_delegate == null)
372 RemoveElement_cb_delegate = new RemoveElementNativeDelegate (RemoveElement_cb);
373 return RemoveElement_cb_delegate;
377 static void OverrideRemoveElement (GLib.GType gtype)
379 OverrideRemoveElement (gtype, RemoveElementVMCallback);
382 static void OverrideRemoveElement (GLib.GType gtype, RemoveElementNativeDelegate callback)
385 IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("remove_element"));
386 *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
390 [UnmanagedFunctionPointer (CallingConvention.Cdecl)]
391 delegate bool RemoveElementNativeDelegate (IntPtr inst, IntPtr element);
393 static bool RemoveElement_cb (IntPtr inst, IntPtr element)
396 Bin __obj = GLib.Object.GetObject (inst, false) as Bin;
398 __result = __obj.OnRemoveElement (GLib.Object.GetObject(element) as Gst.Element);
400 } catch (Exception e) {
401 GLib.ExceptionManager.RaiseUnhandledException (e, true);
402 // NOTREACHED: above call does not return.
407 [GLib.DefaultSignalHandler(Type=typeof(Gst.Bin), ConnectionMethod="OverrideRemoveElement")]
408 protected virtual bool OnRemoveElement (Gst.Element element)
410 return InternalRemoveElement (element);
413 private bool InternalRemoveElement (Gst.Element element)
415 RemoveElementNativeDelegate unmanaged = null;
417 IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("remove_element"));
418 unmanaged = (RemoveElementNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(RemoveElementNativeDelegate));
420 if (unmanaged == null) return false;
422 bool __result = unmanaged (this.Handle, element == null ? IntPtr.Zero : element.Handle);
426 static HandleMessageNativeDelegate HandleMessage_cb_delegate;
427 static HandleMessageNativeDelegate HandleMessageVMCallback {
429 if (HandleMessage_cb_delegate == null)
430 HandleMessage_cb_delegate = new HandleMessageNativeDelegate (HandleMessage_cb);
431 return HandleMessage_cb_delegate;
435 static void OverrideHandleMessage (GLib.GType gtype)
437 OverrideHandleMessage (gtype, HandleMessageVMCallback);
440 static void OverrideHandleMessage (GLib.GType gtype, HandleMessageNativeDelegate callback)
443 IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("handle_message"));
444 *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
448 [UnmanagedFunctionPointer (CallingConvention.Cdecl)]
449 delegate void HandleMessageNativeDelegate (IntPtr inst, IntPtr message);
451 static void HandleMessage_cb (IntPtr inst, IntPtr message)
454 Bin __obj = GLib.Object.GetObject (inst, false) as Bin;
455 __obj.OnHandleMessage (message == IntPtr.Zero ? null : (Gst.Message) GLib.Opaque.GetOpaque (message, typeof (Gst.Message), false));
456 } catch (Exception e) {
457 GLib.ExceptionManager.RaiseUnhandledException (e, false);
461 [GLib.DefaultSignalHandler(Type=typeof(Gst.Bin), ConnectionMethod="OverrideHandleMessage")]
462 protected virtual void OnHandleMessage (Gst.Message message)
464 InternalHandleMessage (message);
467 private void InternalHandleMessage (Gst.Message message)
469 HandleMessageNativeDelegate unmanaged = null;
471 IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("handle_message"));
472 unmanaged = (HandleMessageNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(HandleMessageNativeDelegate));
474 if (unmanaged == null) return;
476 unmanaged (this.Handle, message == null ? IntPtr.Zero : message.Handle);
479 static DoLatencyNativeDelegate DoLatency_cb_delegate;
480 static DoLatencyNativeDelegate DoLatencyVMCallback {
482 if (DoLatency_cb_delegate == null)
483 DoLatency_cb_delegate = new DoLatencyNativeDelegate (DoLatency_cb);
484 return DoLatency_cb_delegate;
488 static void OverrideDoLatency (GLib.GType gtype)
490 OverrideDoLatency (gtype, DoLatencyVMCallback);
493 static void OverrideDoLatency (GLib.GType gtype, DoLatencyNativeDelegate callback)
496 IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("do_latency"));
497 *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
501 [UnmanagedFunctionPointer (CallingConvention.Cdecl)]
502 delegate bool DoLatencyNativeDelegate (IntPtr inst);
504 static bool DoLatency_cb (IntPtr inst)
507 Bin __obj = GLib.Object.GetObject (inst, false) as Bin;
509 __result = __obj.OnDoLatency ();
511 } catch (Exception e) {
512 GLib.ExceptionManager.RaiseUnhandledException (e, true);
513 // NOTREACHED: above call does not return.
518 [GLib.DefaultSignalHandler(Type=typeof(Gst.Bin), ConnectionMethod="OverrideDoLatency")]
519 protected virtual bool OnDoLatency ()
521 return InternalDoLatency ();
524 private bool InternalDoLatency ()
526 DoLatencyNativeDelegate unmanaged = null;
528 IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("do_latency"));
529 unmanaged = (DoLatencyNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(DoLatencyNativeDelegate));
531 if (unmanaged == null) return false;
533 bool __result = unmanaged (this.Handle);
537 static DeepElementAddedNativeDelegate DeepElementAdded_cb_delegate;
538 static DeepElementAddedNativeDelegate DeepElementAddedVMCallback {
540 if (DeepElementAdded_cb_delegate == null)
541 DeepElementAdded_cb_delegate = new DeepElementAddedNativeDelegate (DeepElementAdded_cb);
542 return DeepElementAdded_cb_delegate;
546 static void OverrideDeepElementAdded (GLib.GType gtype)
548 OverrideDeepElementAdded (gtype, DeepElementAddedVMCallback);
551 static void OverrideDeepElementAdded (GLib.GType gtype, DeepElementAddedNativeDelegate callback)
554 IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("deep_element_added"));
555 *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
559 [UnmanagedFunctionPointer (CallingConvention.Cdecl)]
560 delegate void DeepElementAddedNativeDelegate (IntPtr inst, IntPtr sub_bin, IntPtr element);
562 static void DeepElementAdded_cb (IntPtr inst, IntPtr sub_bin, IntPtr element)
565 Bin __obj = GLib.Object.GetObject (inst, false) as Bin;
566 __obj.OnDeepElementAdded (GLib.Object.GetObject(sub_bin) as Gst.Bin, GLib.Object.GetObject(element) as Gst.Element);
567 } catch (Exception e) {
568 GLib.ExceptionManager.RaiseUnhandledException (e, false);
572 [GLib.DefaultSignalHandler(Type=typeof(Gst.Bin), ConnectionMethod="OverrideDeepElementAdded")]
573 protected virtual void OnDeepElementAdded (Gst.Bin sub_bin, Gst.Element element)
575 InternalDeepElementAdded (sub_bin, element);
578 private void InternalDeepElementAdded (Gst.Bin sub_bin, Gst.Element element)
580 DeepElementAddedNativeDelegate unmanaged = null;
582 IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("deep_element_added"));
583 unmanaged = (DeepElementAddedNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(DeepElementAddedNativeDelegate));
585 if (unmanaged == null) return;
587 unmanaged (this.Handle, sub_bin == null ? IntPtr.Zero : sub_bin.Handle, element == null ? IntPtr.Zero : element.Handle);
590 static DeepElementRemovedNativeDelegate DeepElementRemoved_cb_delegate;
591 static DeepElementRemovedNativeDelegate DeepElementRemovedVMCallback {
593 if (DeepElementRemoved_cb_delegate == null)
594 DeepElementRemoved_cb_delegate = new DeepElementRemovedNativeDelegate (DeepElementRemoved_cb);
595 return DeepElementRemoved_cb_delegate;
599 static void OverrideDeepElementRemoved (GLib.GType gtype)
601 OverrideDeepElementRemoved (gtype, DeepElementRemovedVMCallback);
604 static void OverrideDeepElementRemoved (GLib.GType gtype, DeepElementRemovedNativeDelegate callback)
607 IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("deep_element_removed"));
608 *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
612 [UnmanagedFunctionPointer (CallingConvention.Cdecl)]
613 delegate void DeepElementRemovedNativeDelegate (IntPtr inst, IntPtr sub_bin, IntPtr element);
615 static void DeepElementRemoved_cb (IntPtr inst, IntPtr sub_bin, IntPtr element)
618 Bin __obj = GLib.Object.GetObject (inst, false) as Bin;
619 __obj.OnDeepElementRemoved (GLib.Object.GetObject(sub_bin) as Gst.Bin, GLib.Object.GetObject(element) as Gst.Element);
620 } catch (Exception e) {
621 GLib.ExceptionManager.RaiseUnhandledException (e, false);
625 [GLib.DefaultSignalHandler(Type=typeof(Gst.Bin), ConnectionMethod="OverrideDeepElementRemoved")]
626 protected virtual void OnDeepElementRemoved (Gst.Bin sub_bin, Gst.Element element)
628 InternalDeepElementRemoved (sub_bin, element);
631 private void InternalDeepElementRemoved (Gst.Bin sub_bin, Gst.Element element)
633 DeepElementRemovedNativeDelegate unmanaged = null;
635 IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("deep_element_removed"));
636 unmanaged = (DeepElementRemovedNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(DeepElementRemovedNativeDelegate));
638 if (unmanaged == null) return;
640 unmanaged (this.Handle, sub_bin == null ? IntPtr.Zero : sub_bin.Handle, element == null ? IntPtr.Zero : element.Handle);
644 // Internal representation of the wrapped structure ABI.
645 static GLib.AbiStruct _class_abi = null;
646 static public new GLib.AbiStruct class_abi {
648 if (_class_abi == null)
649 _class_abi = new GLib.AbiStruct (new List<GLib.AbiField>{
650 new GLib.AbiField("pool"
651 , Gst.Element.class_abi.Fields
652 , (uint) Marshal.SizeOf(typeof(IntPtr)) // pool
655 , (uint) Marshal.SizeOf(typeof(IntPtr))
658 new GLib.AbiField("element_added"
660 , (uint) Marshal.SizeOf(typeof(IntPtr)) // element_added
663 , (uint) Marshal.SizeOf(typeof(IntPtr))
666 new GLib.AbiField("element_removed"
668 , (uint) Marshal.SizeOf(typeof(IntPtr)) // element_removed
671 , (uint) Marshal.SizeOf(typeof(IntPtr))
674 new GLib.AbiField("add_element"
676 , (uint) Marshal.SizeOf(typeof(IntPtr)) // add_element
679 , (uint) Marshal.SizeOf(typeof(IntPtr))
682 new GLib.AbiField("remove_element"
684 , (uint) Marshal.SizeOf(typeof(IntPtr)) // remove_element
687 , (uint) Marshal.SizeOf(typeof(IntPtr))
690 new GLib.AbiField("handle_message"
692 , (uint) Marshal.SizeOf(typeof(IntPtr)) // handle_message
695 , (uint) Marshal.SizeOf(typeof(IntPtr))
698 new GLib.AbiField("do_latency"
700 , (uint) Marshal.SizeOf(typeof(IntPtr)) // do_latency
702 , "deep_element_added"
703 , (uint) Marshal.SizeOf(typeof(IntPtr))
706 new GLib.AbiField("deep_element_added"
708 , (uint) Marshal.SizeOf(typeof(IntPtr)) // deep_element_added
710 , "deep_element_removed"
711 , (uint) Marshal.SizeOf(typeof(IntPtr))
714 new GLib.AbiField("deep_element_removed"
716 , (uint) Marshal.SizeOf(typeof(IntPtr)) // deep_element_removed
717 , "deep_element_added"
719 , (uint) Marshal.SizeOf(typeof(IntPtr))
722 new GLib.AbiField("_gst_reserved"
724 , (uint) Marshal.SizeOf(typeof(IntPtr)) * 2 // _gst_reserved
725 , "deep_element_removed"
727 , (uint) Marshal.SizeOf(typeof(IntPtr))
737 // End of the ABI representation.
739 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
740 static extern IntPtr gst_bin_get_type();
742 public static new GLib.GType GType {
744 IntPtr raw_ret = gst_bin_get_type();
745 GLib.GType ret = new GLib.GType(raw_ret);
750 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
751 static extern bool gst_bin_add(IntPtr raw, IntPtr element);
753 public bool Add(Gst.Element element) {
754 bool raw_ret = gst_bin_add(Handle, element == null ? IntPtr.Zero : element.Handle);
759 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
760 static extern IntPtr gst_bin_find_unlinked_pad(IntPtr raw, int direction);
762 public Gst.Pad FindUnlinkedPad(Gst.PadDirection direction) {
763 IntPtr raw_ret = gst_bin_find_unlinked_pad(Handle, (int) direction);
764 Gst.Pad ret = GLib.Object.GetObject(raw_ret, true) as Gst.Pad;
768 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
769 static extern IntPtr gst_bin_get_by_interface(IntPtr raw, IntPtr iface);
771 public Gst.Element GetByInterface(GLib.GType iface) {
772 IntPtr raw_ret = gst_bin_get_by_interface(Handle, iface.Val);
773 Gst.Element ret = GLib.Object.GetObject(raw_ret, true) as Gst.Element;
777 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
778 static extern IntPtr gst_bin_get_by_name(IntPtr raw, IntPtr name);
780 public Gst.Element GetByName(string name) {
781 IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name);
782 IntPtr raw_ret = gst_bin_get_by_name(Handle, native_name);
783 Gst.Element ret = GLib.Object.GetObject(raw_ret, true) as Gst.Element;
784 GLib.Marshaller.Free (native_name);
788 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
789 static extern IntPtr gst_bin_get_by_name_recurse_up(IntPtr raw, IntPtr name);
791 public Gst.Element GetByNameRecurseUp(string name) {
792 IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name);
793 IntPtr raw_ret = gst_bin_get_by_name_recurse_up(Handle, native_name);
794 Gst.Element ret = GLib.Object.GetObject(raw_ret, true) as Gst.Element;
795 GLib.Marshaller.Free (native_name);
799 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
800 static extern int gst_bin_get_suppressed_flags(IntPtr raw);
802 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
803 static extern void gst_bin_set_suppressed_flags(IntPtr raw, int flags);
805 public Gst.ElementFlags SuppressedFlags {
807 int raw_ret = gst_bin_get_suppressed_flags(Handle);
808 Gst.ElementFlags ret = (Gst.ElementFlags) raw_ret;
812 gst_bin_set_suppressed_flags(Handle, (int) value);
816 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
817 static extern IntPtr gst_bin_iterate_all_by_element_factory_name(IntPtr raw, IntPtr factory_name);
819 public Gst.Iterator IterateAllByElementFactoryName(string factory_name) {
820 IntPtr native_factory_name = GLib.Marshaller.StringToPtrGStrdup (factory_name);
821 IntPtr raw_ret = gst_bin_iterate_all_by_element_factory_name(Handle, native_factory_name);
822 Gst.Iterator ret = raw_ret == IntPtr.Zero ? null : (Gst.Iterator) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Iterator), true);
823 GLib.Marshaller.Free (native_factory_name);
827 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
828 static extern IntPtr gst_bin_iterate_all_by_interface(IntPtr raw, IntPtr iface);
830 public Gst.Iterator IterateAllByInterface(GLib.GType iface) {
831 IntPtr raw_ret = gst_bin_iterate_all_by_interface(Handle, iface.Val);
832 Gst.Iterator ret = raw_ret == IntPtr.Zero ? null : (Gst.Iterator) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Iterator), true);
836 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
837 static extern IntPtr gst_bin_iterate_elements(IntPtr raw);
839 public Gst.Iterator IterateElements() {
840 IntPtr raw_ret = gst_bin_iterate_elements(Handle);
841 Gst.Iterator ret = raw_ret == IntPtr.Zero ? null : (Gst.Iterator) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Iterator), true);
845 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
846 static extern IntPtr gst_bin_iterate_recurse(IntPtr raw);
848 public Gst.Iterator IterateRecurse() {
849 IntPtr raw_ret = gst_bin_iterate_recurse(Handle);
850 Gst.Iterator ret = raw_ret == IntPtr.Zero ? null : (Gst.Iterator) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Iterator), true);
854 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
855 static extern IntPtr gst_bin_iterate_sinks(IntPtr raw);
857 public Gst.Iterator IterateSinks() {
858 IntPtr raw_ret = gst_bin_iterate_sinks(Handle);
859 Gst.Iterator ret = raw_ret == IntPtr.Zero ? null : (Gst.Iterator) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Iterator), true);
863 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
864 static extern IntPtr gst_bin_iterate_sorted(IntPtr raw);
866 public Gst.Iterator IterateSorted() {
867 IntPtr raw_ret = gst_bin_iterate_sorted(Handle);
868 Gst.Iterator ret = raw_ret == IntPtr.Zero ? null : (Gst.Iterator) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Iterator), true);
872 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
873 static extern IntPtr gst_bin_iterate_sources(IntPtr raw);
875 public Gst.Iterator IterateSources() {
876 IntPtr raw_ret = gst_bin_iterate_sources(Handle);
877 Gst.Iterator ret = raw_ret == IntPtr.Zero ? null : (Gst.Iterator) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Iterator), true);
881 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
882 static extern bool gst_bin_recalculate_latency(IntPtr raw);
884 public bool RecalculateLatency() {
885 bool raw_ret = gst_bin_recalculate_latency(Handle);
890 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
891 static extern bool gst_bin_remove(IntPtr raw, IntPtr element);
893 public bool Remove(Gst.Element element) {
894 bool raw_ret = gst_bin_remove(Handle, element == null ? IntPtr.Zero : element.Handle);
899 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
900 static extern bool gst_bin_sync_children_states(IntPtr raw);
902 public bool SyncChildrenStates() {
903 bool raw_ret = gst_bin_sync_children_states(Handle);
908 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
909 static extern void gst_child_proxy_child_added(IntPtr raw, IntPtr child, IntPtr name);
911 public void ChildAdded(GLib.Object child, string name) {
912 IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name);
913 gst_child_proxy_child_added(Handle, child == null ? IntPtr.Zero : child.Handle, native_name);
914 GLib.Marshaller.Free (native_name);
917 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
918 static extern void gst_child_proxy_child_removed(IntPtr raw, IntPtr child, IntPtr name);
920 public void ChildRemoved(GLib.Object child, string name) {
921 IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name);
922 gst_child_proxy_child_removed(Handle, child == null ? IntPtr.Zero : child.Handle, native_name);
923 GLib.Marshaller.Free (native_name);
926 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
927 static extern IntPtr gst_child_proxy_get_child_by_index(IntPtr raw, uint index);
929 public GLib.Object GetChildByIndex(uint index) {
930 IntPtr raw_ret = gst_child_proxy_get_child_by_index(Handle, index);
931 GLib.Object ret = GLib.Object.GetObject (raw_ret);
935 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
936 static extern IntPtr gst_child_proxy_get_child_by_name(IntPtr raw, IntPtr name);
938 public GLib.Object GetChildByName(string name) {
939 IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name);
940 IntPtr raw_ret = gst_child_proxy_get_child_by_name(Handle, native_name);
941 GLib.Object ret = GLib.Object.GetObject (raw_ret);
942 GLib.Marshaller.Free (native_name);
946 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
947 static extern uint gst_child_proxy_get_children_count(IntPtr raw);
949 public uint ChildrenCount {
951 uint raw_ret = gst_child_proxy_get_children_count(Handle);
957 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
958 static extern bool gst_child_proxy_lookup(IntPtr raw, IntPtr name, out IntPtr target, out IntPtr pspec);
960 public bool Lookup(string name, out GLib.Object target, out IntPtr pspec) {
961 IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name);
962 IntPtr native_target;
963 bool raw_ret = gst_child_proxy_lookup(Handle, native_name, out native_target, out pspec);
965 GLib.Marshaller.Free (native_name);
966 target = GLib.Object.GetObject (native_target);
970 [GLib.Signal("child-removed")]
971 public event Gst.ChildRemovedEventHandler ChildRemovedEvent {
973 this.AddSignalHandler ("child-removed", value, typeof (Gst.ChildRemovedEventArgs));
976 this.RemoveSignalHandler ("child-removed", value);
980 [GLib.Signal("child-added")]
981 public event Gst.ChildAddedEventHandler ChildAddedEvent {
983 this.AddSignalHandler ("child-added", value, typeof (Gst.ChildAddedEventArgs));
986 this.RemoveSignalHandler ("child-added", value);
990 static ChildAddedEventNativeDelegate ChildAddedEvent_cb_delegate;
991 static ChildAddedEventNativeDelegate ChildAddedEventVMCallback {
993 if (ChildAddedEvent_cb_delegate == null)
994 ChildAddedEvent_cb_delegate = new ChildAddedEventNativeDelegate (ChildAddedEvent_cb);
995 return ChildAddedEvent_cb_delegate;
999 static void OverrideChildAddedEvent (GLib.GType gtype)
1001 OverrideChildAddedEvent (gtype, ChildAddedEventVMCallback);
1004 static void OverrideChildAddedEvent (GLib.GType gtype, ChildAddedEventNativeDelegate callback)
1006 OverrideVirtualMethod (gtype, "child-added", callback);
1008 [UnmanagedFunctionPointer (CallingConvention.Cdecl)]
1009 delegate void ChildAddedEventNativeDelegate (IntPtr inst, IntPtr _object, IntPtr name);
1011 static void ChildAddedEvent_cb (IntPtr inst, IntPtr _object, IntPtr name)
1014 Gst.Bin __obj = GLib.Object.GetObject (inst, false) as Gst.Bin;
1015 __obj.OnChildAddedEvent (GLib.Object.GetObject (_object), GLib.Marshaller.Utf8PtrToString (name));
1016 } catch (Exception e) {
1017 GLib.ExceptionManager.RaiseUnhandledException (e, false);
1021 [GLib.DefaultSignalHandler(Type=typeof(Gst.Bin), ConnectionMethod="OverrideChildAddedEvent")]
1022 protected virtual void OnChildAddedEvent (GLib.Object _object, string name)
1024 InternalChildAddedEvent (_object, name);
1027 private void InternalChildAddedEvent (GLib.Object _object, string name)
1029 GLib.Value ret = GLib.Value.Empty;
1030 GLib.ValueArray inst_and_params = new GLib.ValueArray (3);
1031 GLib.Value[] vals = new GLib.Value [3];
1032 vals [0] = new GLib.Value (this);
1033 inst_and_params.Append (vals [0]);
1034 vals [1] = new GLib.Value (_object);
1035 inst_and_params.Append (vals [1]);
1036 vals [2] = new GLib.Value (name);
1037 inst_and_params.Append (vals [2]);
1038 g_signal_chain_from_overridden (inst_and_params.ArrayPtr, ref ret);
1039 foreach (GLib.Value v in vals)
1043 static ChildRemovedEventNativeDelegate ChildRemovedEvent_cb_delegate;
1044 static ChildRemovedEventNativeDelegate ChildRemovedEventVMCallback {
1046 if (ChildRemovedEvent_cb_delegate == null)
1047 ChildRemovedEvent_cb_delegate = new ChildRemovedEventNativeDelegate (ChildRemovedEvent_cb);
1048 return ChildRemovedEvent_cb_delegate;
1052 static void OverrideChildRemovedEvent (GLib.GType gtype)
1054 OverrideChildRemovedEvent (gtype, ChildRemovedEventVMCallback);
1057 static void OverrideChildRemovedEvent (GLib.GType gtype, ChildRemovedEventNativeDelegate callback)
1059 OverrideVirtualMethod (gtype, "child-removed", callback);
1061 [UnmanagedFunctionPointer (CallingConvention.Cdecl)]
1062 delegate void ChildRemovedEventNativeDelegate (IntPtr inst, IntPtr _object, IntPtr name);
1064 static void ChildRemovedEvent_cb (IntPtr inst, IntPtr _object, IntPtr name)
1067 Gst.Bin __obj = GLib.Object.GetObject (inst, false) as Gst.Bin;
1068 __obj.OnChildRemovedEvent (GLib.Object.GetObject (_object), GLib.Marshaller.Utf8PtrToString (name));
1069 } catch (Exception e) {
1070 GLib.ExceptionManager.RaiseUnhandledException (e, false);
1074 [GLib.DefaultSignalHandler(Type=typeof(Gst.Bin), ConnectionMethod="OverrideChildRemovedEvent")]
1075 protected virtual void OnChildRemovedEvent (GLib.Object _object, string name)
1077 InternalChildRemovedEvent (_object, name);
1080 private void InternalChildRemovedEvent (GLib.Object _object, string name)
1082 GLib.Value ret = GLib.Value.Empty;
1083 GLib.ValueArray inst_and_params = new GLib.ValueArray (3);
1084 GLib.Value[] vals = new GLib.Value [3];
1085 vals [0] = new GLib.Value (this);
1086 inst_and_params.Append (vals [0]);
1087 vals [1] = new GLib.Value (_object);
1088 inst_and_params.Append (vals [1]);
1089 vals [2] = new GLib.Value (name);
1090 inst_and_params.Append (vals [2]);
1091 g_signal_chain_from_overridden (inst_and_params.ArrayPtr, ref ret);
1092 foreach (GLib.Value v in vals)
1097 // Internal representation of the wrapped structure ABI.
1098 static GLib.AbiStruct _abi_info = null;
1099 static public new GLib.AbiStruct abi_info {
1101 if (_abi_info == null)
1102 _abi_info = new GLib.AbiStruct (new List<GLib.AbiField>{
1103 new GLib.AbiField("numchildren"
1104 , Gst.Element.abi_info.Fields
1105 , (uint) Marshal.SizeOf(typeof(int)) // numchildren
1108 , (long) Marshal.OffsetOf(typeof(GstBin_numchildrenAlign), "numchildren")
1111 new GLib.AbiField("children"
1113 , (uint) Marshal.SizeOf(typeof(IntPtr)) // children
1116 , (uint) Marshal.SizeOf(typeof(IntPtr))
1119 new GLib.AbiField("children_cookie"
1121 , (uint) Marshal.SizeOf(typeof(uint)) // children_cookie
1124 , (long) Marshal.OffsetOf(typeof(GstBin_children_cookieAlign), "children_cookie")
1127 new GLib.AbiField("child_bus"
1129 , (uint) Marshal.SizeOf(typeof(IntPtr)) // child_bus
1132 , (uint) Marshal.SizeOf(typeof(IntPtr))
1135 new GLib.AbiField("messages"
1137 , (uint) Marshal.SizeOf(typeof(IntPtr)) // messages
1140 , (uint) Marshal.SizeOf(typeof(IntPtr))
1143 new GLib.AbiField("polling"
1145 , (uint) Marshal.SizeOf(typeof(bool)) // polling
1148 , (long) Marshal.OffsetOf(typeof(GstBin_pollingAlign), "polling")
1151 new GLib.AbiField("state_dirty"
1153 , (uint) Marshal.SizeOf(typeof(bool)) // state_dirty
1156 , (long) Marshal.OffsetOf(typeof(GstBin_state_dirtyAlign), "state_dirty")
1159 new GLib.AbiField("clock_dirty"
1161 , (uint) Marshal.SizeOf(typeof(bool)) // clock_dirty
1164 , (long) Marshal.OffsetOf(typeof(GstBin_clock_dirtyAlign), "clock_dirty")
1167 new GLib.AbiField("provided_clock"
1169 , (uint) Marshal.SizeOf(typeof(IntPtr)) // provided_clock
1172 , (uint) Marshal.SizeOf(typeof(IntPtr))
1175 new GLib.AbiField("clock_provider"
1177 , (uint) Marshal.SizeOf(typeof(IntPtr)) // clock_provider
1180 , (uint) Marshal.SizeOf(typeof(IntPtr))
1183 new GLib.AbiField("priv"
1185 , (uint) Marshal.SizeOf(typeof(IntPtr)) // priv
1188 , (uint) Marshal.SizeOf(typeof(IntPtr))
1191 new GLib.AbiField("_gst_reserved"
1193 , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved
1196 , (uint) Marshal.SizeOf(typeof(IntPtr))
1205 [StructLayout(LayoutKind.Sequential)]
1206 public struct GstBin_numchildrenAlign
1209 private int numchildren;
1212 [StructLayout(LayoutKind.Sequential)]
1213 public struct GstBin_children_cookieAlign
1216 private uint children_cookie;
1219 [StructLayout(LayoutKind.Sequential)]
1220 public struct GstBin_pollingAlign
1223 private bool polling;
1226 [StructLayout(LayoutKind.Sequential)]
1227 public struct GstBin_state_dirtyAlign
1230 private bool state_dirty;
1233 [StructLayout(LayoutKind.Sequential)]
1234 public struct GstBin_clock_dirtyAlign
1237 private bool clock_dirty;
1241 // End of the ABI representation.