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 Element : Gst.Object {
14 protected Element (IntPtr raw) : base(raw) {}
16 protected Element() : base(IntPtr.Zero)
18 CreateNativeObject (new string [0], new GLib.Value [0]);
21 public GLib.RecMutex StateLock {
24 IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("state_lock"));
25 return new GLib.RecMutex((*raw_ptr));
30 public GLib.Cond StateCond {
33 IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("state_cond"));
34 return new GLib.Cond((*raw_ptr));
39 public uint StateCookie {
42 uint* raw_ptr = (uint*)(((byte*)Handle) + abi_info.GetFieldOffset("state_cookie"));
48 public Gst.State TargetState {
51 int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("target_state"));
52 return (Gst.State) (*raw_ptr);
57 public Gst.State CurrentState {
60 int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("current_state"));
61 return (Gst.State) (*raw_ptr);
66 public Gst.State NextState {
69 int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("next_state"));
70 return (Gst.State) (*raw_ptr);
75 public Gst.State PendingState {
78 int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("pending_state"));
79 return (Gst.State) (*raw_ptr);
84 public Gst.StateChangeReturn LastReturn {
87 int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("last_return"));
88 return (Gst.StateChangeReturn) (*raw_ptr);
93 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
94 static extern IntPtr gst_element_get_bus(IntPtr raw);
96 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
97 static extern void gst_element_set_bus(IntPtr raw, IntPtr bus);
101 IntPtr raw_ret = gst_element_get_bus(Handle);
102 Gst.Bus ret = GLib.Object.GetObject(raw_ret, true) as Gst.Bus;
106 gst_element_set_bus(Handle, value == null ? IntPtr.Zero : value.Handle);
110 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
111 static extern IntPtr gst_element_get_clock(IntPtr raw);
113 public Gst.Clock Clock {
115 IntPtr raw_ret = gst_element_get_clock(Handle);
116 Gst.Clock ret = GLib.Object.GetObject(raw_ret, true) as Gst.Clock;
121 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
122 static extern ulong gst_element_get_base_time(IntPtr raw);
124 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
125 static extern void gst_element_set_base_time(IntPtr raw, ulong time);
127 public ulong BaseTime {
129 ulong raw_ret = gst_element_get_base_time(Handle);
134 gst_element_set_base_time(Handle, value);
138 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
139 static extern ulong gst_element_get_start_time(IntPtr raw);
141 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
142 static extern void gst_element_set_start_time(IntPtr raw, ulong time);
144 public ulong StartTime {
146 ulong raw_ret = gst_element_get_start_time(Handle);
151 gst_element_set_start_time(Handle, value);
155 public ushort Numpads {
158 ushort* raw_ptr = (ushort*)(((byte*)Handle) + abi_info.GetFieldOffset("numpads"));
164 public GLib.List Pads {
167 IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("pads"));
168 return new GLib.List((*raw_ptr));
173 public ushort Numsrcpads {
176 ushort* raw_ptr = (ushort*)(((byte*)Handle) + abi_info.GetFieldOffset("numsrcpads"));
182 public GLib.List Srcpads {
185 IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("srcpads"));
186 return new GLib.List((*raw_ptr));
191 public ushort Numsinkpads {
194 ushort* raw_ptr = (ushort*)(((byte*)Handle) + abi_info.GetFieldOffset("numsinkpads"));
200 public GLib.List Sinkpads {
203 IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("sinkpads"));
204 return new GLib.List((*raw_ptr));
209 public uint PadsCookie {
212 uint* raw_ptr = (uint*)(((byte*)Handle) + abi_info.GetFieldOffset("pads_cookie"));
218 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
219 static extern IntPtr gst_element_get_contexts(IntPtr raw);
221 public GLib.List[] Contexts {
223 IntPtr raw_ret = gst_element_get_contexts(Handle);
224 GLib.List[] ret = (GLib.List[]) GLib.Marshaller.ListPtrToArray (raw_ret, typeof(GLib.List), true, true, typeof(GLib.List));
229 [GLib.Signal("no-more-pads")]
230 public event System.EventHandler NoMorePadsEvent {
232 this.AddSignalHandler ("no-more-pads", value);
235 this.RemoveSignalHandler ("no-more-pads", value);
239 [GLib.Signal("pad-removed")]
240 public event Gst.PadRemovedHandler PadRemoved {
242 this.AddSignalHandler ("pad-removed", value, typeof (Gst.PadRemovedArgs));
245 this.RemoveSignalHandler ("pad-removed", value);
249 [GLib.Signal("pad-added")]
250 public event Gst.PadAddedHandler PadAdded {
252 this.AddSignalHandler ("pad-added", value, typeof (Gst.PadAddedArgs));
255 this.RemoveSignalHandler ("pad-added", value);
259 static PadAddedNativeDelegate PadAdded_cb_delegate;
260 static PadAddedNativeDelegate PadAddedVMCallback {
262 if (PadAdded_cb_delegate == null)
263 PadAdded_cb_delegate = new PadAddedNativeDelegate (PadAdded_cb);
264 return PadAdded_cb_delegate;
268 static void OverridePadAdded (GLib.GType gtype)
270 OverridePadAdded (gtype, PadAddedVMCallback);
273 static void OverridePadAdded (GLib.GType gtype, PadAddedNativeDelegate callback)
276 IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("pad_added"));
277 *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
281 [UnmanagedFunctionPointer (CallingConvention.Cdecl)]
282 delegate void PadAddedNativeDelegate (IntPtr inst, IntPtr new_pad);
284 static void PadAdded_cb (IntPtr inst, IntPtr new_pad)
287 Element __obj = GLib.Object.GetObject (inst, false) as Element;
288 __obj.OnPadAdded (GLib.Object.GetObject(new_pad) as Gst.Pad);
289 } catch (Exception e) {
290 GLib.ExceptionManager.RaiseUnhandledException (e, false);
294 [GLib.DefaultSignalHandler(Type=typeof(Gst.Element), ConnectionMethod="OverridePadAdded")]
295 protected virtual void OnPadAdded (Gst.Pad new_pad)
297 InternalPadAdded (new_pad);
300 private void InternalPadAdded (Gst.Pad new_pad)
302 PadAddedNativeDelegate unmanaged = null;
304 IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("pad_added"));
305 unmanaged = (PadAddedNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(PadAddedNativeDelegate));
307 if (unmanaged == null) return;
309 unmanaged (this.Handle, new_pad == null ? IntPtr.Zero : new_pad.Handle);
312 static PadRemovedNativeDelegate PadRemoved_cb_delegate;
313 static PadRemovedNativeDelegate PadRemovedVMCallback {
315 if (PadRemoved_cb_delegate == null)
316 PadRemoved_cb_delegate = new PadRemovedNativeDelegate (PadRemoved_cb);
317 return PadRemoved_cb_delegate;
321 static void OverridePadRemoved (GLib.GType gtype)
323 OverridePadRemoved (gtype, PadRemovedVMCallback);
326 static void OverridePadRemoved (GLib.GType gtype, PadRemovedNativeDelegate callback)
329 IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("pad_removed"));
330 *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
334 [UnmanagedFunctionPointer (CallingConvention.Cdecl)]
335 delegate void PadRemovedNativeDelegate (IntPtr inst, IntPtr old_pad);
337 static void PadRemoved_cb (IntPtr inst, IntPtr old_pad)
340 Element __obj = GLib.Object.GetObject (inst, false) as Element;
341 __obj.OnPadRemoved (GLib.Object.GetObject(old_pad) as Gst.Pad);
342 } catch (Exception e) {
343 GLib.ExceptionManager.RaiseUnhandledException (e, false);
347 [GLib.DefaultSignalHandler(Type=typeof(Gst.Element), ConnectionMethod="OverridePadRemoved")]
348 protected virtual void OnPadRemoved (Gst.Pad old_pad)
350 InternalPadRemoved (old_pad);
353 private void InternalPadRemoved (Gst.Pad old_pad)
355 PadRemovedNativeDelegate unmanaged = null;
357 IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("pad_removed"));
358 unmanaged = (PadRemovedNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(PadRemovedNativeDelegate));
360 if (unmanaged == null) return;
362 unmanaged (this.Handle, old_pad == null ? IntPtr.Zero : old_pad.Handle);
365 static NoMorePadsEventNativeDelegate NoMorePadsEvent_cb_delegate;
366 static NoMorePadsEventNativeDelegate NoMorePadsEventVMCallback {
368 if (NoMorePadsEvent_cb_delegate == null)
369 NoMorePadsEvent_cb_delegate = new NoMorePadsEventNativeDelegate (NoMorePadsEvent_cb);
370 return NoMorePadsEvent_cb_delegate;
374 static void OverrideNoMorePadsEvent (GLib.GType gtype)
376 OverrideNoMorePadsEvent (gtype, NoMorePadsEventVMCallback);
379 static void OverrideNoMorePadsEvent (GLib.GType gtype, NoMorePadsEventNativeDelegate callback)
382 IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("no_more_pads"));
383 *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
387 [UnmanagedFunctionPointer (CallingConvention.Cdecl)]
388 delegate void NoMorePadsEventNativeDelegate (IntPtr inst);
390 static void NoMorePadsEvent_cb (IntPtr inst)
393 Element __obj = GLib.Object.GetObject (inst, false) as Element;
394 __obj.OnNoMorePadsEvent ();
395 } catch (Exception e) {
396 GLib.ExceptionManager.RaiseUnhandledException (e, false);
400 [GLib.DefaultSignalHandler(Type=typeof(Gst.Element), ConnectionMethod="OverrideNoMorePadsEvent")]
401 protected virtual void OnNoMorePadsEvent ()
403 InternalNoMorePadsEvent ();
406 private void InternalNoMorePadsEvent ()
408 NoMorePadsEventNativeDelegate unmanaged = null;
410 IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("no_more_pads"));
411 unmanaged = (NoMorePadsEventNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(NoMorePadsEventNativeDelegate));
413 if (unmanaged == null) return;
415 unmanaged (this.Handle);
418 static RequestNewPadNativeDelegate RequestNewPad_cb_delegate;
419 static RequestNewPadNativeDelegate RequestNewPadVMCallback {
421 if (RequestNewPad_cb_delegate == null)
422 RequestNewPad_cb_delegate = new RequestNewPadNativeDelegate (RequestNewPad_cb);
423 return RequestNewPad_cb_delegate;
427 static void OverrideRequestNewPad (GLib.GType gtype)
429 OverrideRequestNewPad (gtype, RequestNewPadVMCallback);
432 static void OverrideRequestNewPad (GLib.GType gtype, RequestNewPadNativeDelegate callback)
435 IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("request_new_pad"));
436 *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
440 [UnmanagedFunctionPointer (CallingConvention.Cdecl)]
441 delegate IntPtr RequestNewPadNativeDelegate (IntPtr inst, IntPtr templ, IntPtr name, IntPtr caps);
443 static IntPtr RequestNewPad_cb (IntPtr inst, IntPtr templ, IntPtr name, IntPtr caps)
446 Element __obj = GLib.Object.GetObject (inst, false) as Element;
448 __result = __obj.OnRequestNewPad (GLib.Object.GetObject(templ) as Gst.PadTemplate, GLib.Marshaller.Utf8PtrToString (name), caps == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (caps, typeof (Gst.Caps), false));
449 return __result == null ? IntPtr.Zero : __result.OwnedHandle;
450 } catch (Exception e) {
451 GLib.ExceptionManager.RaiseUnhandledException (e, true);
452 // NOTREACHED: above call does not return.
457 [GLib.DefaultSignalHandler(Type=typeof(Gst.Element), ConnectionMethod="OverrideRequestNewPad")]
458 protected virtual Gst.Pad OnRequestNewPad (Gst.PadTemplate templ, string name, Gst.Caps caps)
460 return InternalRequestNewPad (templ, name, caps);
463 private Gst.Pad InternalRequestNewPad (Gst.PadTemplate templ, string name, Gst.Caps caps)
465 RequestNewPadNativeDelegate unmanaged = null;
467 IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("request_new_pad"));
468 unmanaged = (RequestNewPadNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(RequestNewPadNativeDelegate));
470 if (unmanaged == null) return null;
472 IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name);
473 IntPtr __result = unmanaged (this.Handle, templ == null ? IntPtr.Zero : templ.Handle, native_name, caps == null ? IntPtr.Zero : caps.Handle);
474 GLib.Marshaller.Free (native_name);
475 return GLib.Object.GetObject(__result, true) as Gst.Pad;
478 static ReleasePadNativeDelegate ReleasePad_cb_delegate;
479 static ReleasePadNativeDelegate ReleasePadVMCallback {
481 if (ReleasePad_cb_delegate == null)
482 ReleasePad_cb_delegate = new ReleasePadNativeDelegate (ReleasePad_cb);
483 return ReleasePad_cb_delegate;
487 static void OverrideReleasePad (GLib.GType gtype)
489 OverrideReleasePad (gtype, ReleasePadVMCallback);
492 static void OverrideReleasePad (GLib.GType gtype, ReleasePadNativeDelegate callback)
495 IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("release_pad"));
496 *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
500 [UnmanagedFunctionPointer (CallingConvention.Cdecl)]
501 delegate void ReleasePadNativeDelegate (IntPtr inst, IntPtr pad);
503 static void ReleasePad_cb (IntPtr inst, IntPtr pad)
506 Element __obj = GLib.Object.GetObject (inst, false) as Element;
507 __obj.OnReleasePad (GLib.Object.GetObject(pad) as Gst.Pad);
508 } catch (Exception e) {
509 GLib.ExceptionManager.RaiseUnhandledException (e, false);
513 [GLib.DefaultSignalHandler(Type=typeof(Gst.Element), ConnectionMethod="OverrideReleasePad")]
514 protected virtual void OnReleasePad (Gst.Pad pad)
516 InternalReleasePad (pad);
519 private void InternalReleasePad (Gst.Pad pad)
521 ReleasePadNativeDelegate unmanaged = null;
523 IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("release_pad"));
524 unmanaged = (ReleasePadNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(ReleasePadNativeDelegate));
526 if (unmanaged == null) return;
528 unmanaged (this.Handle, pad == null ? IntPtr.Zero : pad.Handle);
531 static GetStateNativeDelegate GetState_cb_delegate;
532 static GetStateNativeDelegate GetStateVMCallback {
534 if (GetState_cb_delegate == null)
535 GetState_cb_delegate = new GetStateNativeDelegate (GetState_cb);
536 return GetState_cb_delegate;
540 static void OverrideGetState (GLib.GType gtype)
542 OverrideGetState (gtype, GetStateVMCallback);
545 static void OverrideGetState (GLib.GType gtype, GetStateNativeDelegate callback)
548 IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("get_state"));
549 *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
553 [UnmanagedFunctionPointer (CallingConvention.Cdecl)]
554 delegate int GetStateNativeDelegate (IntPtr inst, out int state, out int pending, ulong timeout);
556 static int GetState_cb (IntPtr inst, out int state, out int pending, ulong timeout)
559 Element __obj = GLib.Object.GetObject (inst, false) as Element;
560 Gst.StateChangeReturn __result;
563 __result = __obj.OnGetState (out mystate, out mypending, timeout);
564 state = (int) mystate;
565 pending = (int) mypending;
566 return (int) __result;
567 } catch (Exception e) {
568 GLib.ExceptionManager.RaiseUnhandledException (e, true);
569 // NOTREACHED: above call does not return.
574 [GLib.DefaultSignalHandler(Type=typeof(Gst.Element), ConnectionMethod="OverrideGetState")]
575 protected virtual Gst.StateChangeReturn OnGetState (out Gst.State state, out Gst.State pending, ulong timeout)
577 return InternalGetState (out state, out pending, timeout);
580 private Gst.StateChangeReturn InternalGetState (out Gst.State state, out Gst.State pending, ulong timeout)
582 GetStateNativeDelegate unmanaged = null;
584 IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("get_state"));
585 unmanaged = (GetStateNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(GetStateNativeDelegate));
587 if (unmanaged == null) throw new InvalidOperationException ("No base method to invoke");
591 int __result = unmanaged (this.Handle, out native_state, out native_pending, timeout);
592 state = (Gst.State) native_state;
593 pending = (Gst.State) native_pending;
594 return (Gst.StateChangeReturn) __result;
597 static SetStateNativeDelegate SetState_cb_delegate;
598 static SetStateNativeDelegate SetStateVMCallback {
600 if (SetState_cb_delegate == null)
601 SetState_cb_delegate = new SetStateNativeDelegate (SetState_cb);
602 return SetState_cb_delegate;
606 static void OverrideSetState (GLib.GType gtype)
608 OverrideSetState (gtype, SetStateVMCallback);
611 static void OverrideSetState (GLib.GType gtype, SetStateNativeDelegate callback)
614 IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("set_state"));
615 *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
619 [UnmanagedFunctionPointer (CallingConvention.Cdecl)]
620 delegate int SetStateNativeDelegate (IntPtr inst, int state);
622 static int SetState_cb (IntPtr inst, int state)
625 Element __obj = GLib.Object.GetObject (inst, false) as Element;
626 Gst.StateChangeReturn __result;
627 __result = __obj.OnSetState ((Gst.State) state);
628 return (int) __result;
629 } catch (Exception e) {
630 GLib.ExceptionManager.RaiseUnhandledException (e, true);
631 // NOTREACHED: above call does not return.
636 [GLib.DefaultSignalHandler(Type=typeof(Gst.Element), ConnectionMethod="OverrideSetState")]
637 protected virtual Gst.StateChangeReturn OnSetState (Gst.State state)
639 return InternalSetState (state);
642 private Gst.StateChangeReturn InternalSetState (Gst.State state)
644 SetStateNativeDelegate unmanaged = null;
646 IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("set_state"));
647 unmanaged = (SetStateNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(SetStateNativeDelegate));
649 if (unmanaged == null) return (Gst.StateChangeReturn) 0;
651 int __result = unmanaged (this.Handle, (int) state);
652 return (Gst.StateChangeReturn) __result;
655 static ChangeStateNativeDelegate ChangeState_cb_delegate;
656 static ChangeStateNativeDelegate ChangeStateVMCallback {
658 if (ChangeState_cb_delegate == null)
659 ChangeState_cb_delegate = new ChangeStateNativeDelegate (ChangeState_cb);
660 return ChangeState_cb_delegate;
664 static void OverrideChangeState (GLib.GType gtype)
666 OverrideChangeState (gtype, ChangeStateVMCallback);
669 static void OverrideChangeState (GLib.GType gtype, ChangeStateNativeDelegate callback)
672 IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("change_state"));
673 *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
677 [UnmanagedFunctionPointer (CallingConvention.Cdecl)]
678 delegate int ChangeStateNativeDelegate (IntPtr inst, int transition);
680 static int ChangeState_cb (IntPtr inst, int transition)
683 Element __obj = GLib.Object.GetObject (inst, false) as Element;
684 Gst.StateChangeReturn __result;
685 __result = __obj.OnChangeState ((Gst.StateChange) transition);
686 return (int) __result;
687 } catch (Exception e) {
688 GLib.ExceptionManager.RaiseUnhandledException (e, true);
689 // NOTREACHED: above call does not return.
694 [GLib.DefaultSignalHandler(Type=typeof(Gst.Element), ConnectionMethod="OverrideChangeState")]
695 protected virtual Gst.StateChangeReturn OnChangeState (Gst.StateChange transition)
697 return InternalChangeState (transition);
700 private Gst.StateChangeReturn InternalChangeState (Gst.StateChange transition)
702 ChangeStateNativeDelegate unmanaged = null;
704 IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("change_state"));
705 unmanaged = (ChangeStateNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(ChangeStateNativeDelegate));
707 if (unmanaged == null) return (Gst.StateChangeReturn) 0;
709 int __result = unmanaged (this.Handle, (int) transition);
710 return (Gst.StateChangeReturn) __result;
713 static StateChangedNativeDelegate StateChanged_cb_delegate;
714 static StateChangedNativeDelegate StateChangedVMCallback {
716 if (StateChanged_cb_delegate == null)
717 StateChanged_cb_delegate = new StateChangedNativeDelegate (StateChanged_cb);
718 return StateChanged_cb_delegate;
722 static void OverrideStateChanged (GLib.GType gtype)
724 OverrideStateChanged (gtype, StateChangedVMCallback);
727 static void OverrideStateChanged (GLib.GType gtype, StateChangedNativeDelegate callback)
730 IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("state_changed"));
731 *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
735 [UnmanagedFunctionPointer (CallingConvention.Cdecl)]
736 delegate void StateChangedNativeDelegate (IntPtr inst, int oldstate, int newstate, int pending);
738 static void StateChanged_cb (IntPtr inst, int oldstate, int newstate, int pending)
741 Element __obj = GLib.Object.GetObject (inst, false) as Element;
742 __obj.OnStateChanged ((Gst.State) oldstate, (Gst.State) newstate, (Gst.State) pending);
743 } catch (Exception e) {
744 GLib.ExceptionManager.RaiseUnhandledException (e, false);
748 [GLib.DefaultSignalHandler(Type=typeof(Gst.Element), ConnectionMethod="OverrideStateChanged")]
749 protected virtual void OnStateChanged (Gst.State oldstate, Gst.State newstate, Gst.State pending)
751 InternalStateChanged (oldstate, newstate, pending);
754 private void InternalStateChanged (Gst.State oldstate, Gst.State newstate, Gst.State pending)
756 StateChangedNativeDelegate unmanaged = null;
758 IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("state_changed"));
759 unmanaged = (StateChangedNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(StateChangedNativeDelegate));
761 if (unmanaged == null) return;
763 unmanaged (this.Handle, (int) oldstate, (int) newstate, (int) pending);
766 static SetBusNativeDelegate SetBus_cb_delegate;
767 static SetBusNativeDelegate SetBusVMCallback {
769 if (SetBus_cb_delegate == null)
770 SetBus_cb_delegate = new SetBusNativeDelegate (SetBus_cb);
771 return SetBus_cb_delegate;
775 static void OverrideSetBus (GLib.GType gtype)
777 OverrideSetBus (gtype, SetBusVMCallback);
780 static void OverrideSetBus (GLib.GType gtype, SetBusNativeDelegate callback)
783 IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("set_bus"));
784 *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
788 [UnmanagedFunctionPointer (CallingConvention.Cdecl)]
789 delegate void SetBusNativeDelegate (IntPtr inst, IntPtr bus);
791 static void SetBus_cb (IntPtr inst, IntPtr bus)
794 Element __obj = GLib.Object.GetObject (inst, false) as Element;
795 __obj.OnSetBus (GLib.Object.GetObject(bus) as Gst.Bus);
796 } catch (Exception e) {
797 GLib.ExceptionManager.RaiseUnhandledException (e, false);
801 [GLib.DefaultSignalHandler(Type=typeof(Gst.Element), ConnectionMethod="OverrideSetBus")]
802 protected virtual void OnSetBus (Gst.Bus bus)
804 InternalSetBus (bus);
807 private void InternalSetBus (Gst.Bus bus)
809 SetBusNativeDelegate unmanaged = null;
811 IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("set_bus"));
812 unmanaged = (SetBusNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(SetBusNativeDelegate));
814 if (unmanaged == null) return;
816 unmanaged (this.Handle, bus == null ? IntPtr.Zero : bus.Handle);
819 static ProvideClockNativeDelegate ProvideClock_cb_delegate;
820 static ProvideClockNativeDelegate ProvideClockVMCallback {
822 if (ProvideClock_cb_delegate == null)
823 ProvideClock_cb_delegate = new ProvideClockNativeDelegate (ProvideClock_cb);
824 return ProvideClock_cb_delegate;
828 static void OverrideProvideClock (GLib.GType gtype)
830 OverrideProvideClock (gtype, ProvideClockVMCallback);
833 static void OverrideProvideClock (GLib.GType gtype, ProvideClockNativeDelegate callback)
836 IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("provide_clock"));
837 *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
841 [UnmanagedFunctionPointer (CallingConvention.Cdecl)]
842 delegate IntPtr ProvideClockNativeDelegate (IntPtr inst);
844 static IntPtr ProvideClock_cb (IntPtr inst)
847 Element __obj = GLib.Object.GetObject (inst, false) as Element;
849 __result = __obj.OnProvideClock ();
850 return __result == null ? IntPtr.Zero : __result.OwnedHandle;
851 } catch (Exception e) {
852 GLib.ExceptionManager.RaiseUnhandledException (e, true);
853 // NOTREACHED: above call does not return.
858 [GLib.DefaultSignalHandler(Type=typeof(Gst.Element), ConnectionMethod="OverrideProvideClock")]
859 protected virtual Gst.Clock OnProvideClock ()
861 return InternalProvideClock ();
864 private Gst.Clock InternalProvideClock ()
866 ProvideClockNativeDelegate unmanaged = null;
868 IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("provide_clock"));
869 unmanaged = (ProvideClockNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(ProvideClockNativeDelegate));
871 if (unmanaged == null) return null;
873 IntPtr __result = unmanaged (this.Handle);
874 return GLib.Object.GetObject(__result, true) as Gst.Clock;
877 static SetClockNativeDelegate SetClock_cb_delegate;
878 static SetClockNativeDelegate SetClockVMCallback {
880 if (SetClock_cb_delegate == null)
881 SetClock_cb_delegate = new SetClockNativeDelegate (SetClock_cb);
882 return SetClock_cb_delegate;
886 static void OverrideSetClock (GLib.GType gtype)
888 OverrideSetClock (gtype, SetClockVMCallback);
891 static void OverrideSetClock (GLib.GType gtype, SetClockNativeDelegate callback)
894 IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("set_clock"));
895 *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
899 [UnmanagedFunctionPointer (CallingConvention.Cdecl)]
900 delegate bool SetClockNativeDelegate (IntPtr inst, IntPtr clock);
902 static bool SetClock_cb (IntPtr inst, IntPtr clock)
905 Element __obj = GLib.Object.GetObject (inst, false) as Element;
907 __result = __obj.OnSetClock (GLib.Object.GetObject(clock) as Gst.Clock);
909 } catch (Exception e) {
910 GLib.ExceptionManager.RaiseUnhandledException (e, true);
911 // NOTREACHED: above call does not return.
916 [GLib.DefaultSignalHandler(Type=typeof(Gst.Element), ConnectionMethod="OverrideSetClock")]
917 protected virtual bool OnSetClock (Gst.Clock clock)
919 return InternalSetClock (clock);
922 private bool InternalSetClock (Gst.Clock clock)
924 SetClockNativeDelegate unmanaged = null;
926 IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("set_clock"));
927 unmanaged = (SetClockNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(SetClockNativeDelegate));
929 if (unmanaged == null) return false;
931 bool __result = unmanaged (this.Handle, clock == null ? IntPtr.Zero : clock.Handle);
935 static SendEventNativeDelegate SendEvent_cb_delegate;
936 static SendEventNativeDelegate SendEventVMCallback {
938 if (SendEvent_cb_delegate == null)
939 SendEvent_cb_delegate = new SendEventNativeDelegate (SendEvent_cb);
940 return SendEvent_cb_delegate;
944 static void OverrideSendEvent (GLib.GType gtype)
946 OverrideSendEvent (gtype, SendEventVMCallback);
949 static void OverrideSendEvent (GLib.GType gtype, SendEventNativeDelegate callback)
952 IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("send_event"));
953 *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
957 [UnmanagedFunctionPointer (CallingConvention.Cdecl)]
958 delegate bool SendEventNativeDelegate (IntPtr inst, IntPtr evnt);
960 static bool SendEvent_cb (IntPtr inst, IntPtr evnt)
963 Element __obj = GLib.Object.GetObject (inst, false) as Element;
965 __result = __obj.OnSendEvent (evnt == IntPtr.Zero ? null : (Gst.Event) GLib.Opaque.GetOpaque (evnt, typeof (Gst.Event), true));
967 } catch (Exception e) {
968 GLib.ExceptionManager.RaiseUnhandledException (e, true);
969 // NOTREACHED: above call does not return.
974 [GLib.DefaultSignalHandler(Type=typeof(Gst.Element), ConnectionMethod="OverrideSendEvent")]
975 protected virtual bool OnSendEvent (Gst.Event evnt)
977 return InternalSendEvent (evnt);
980 private bool InternalSendEvent (Gst.Event evnt)
982 SendEventNativeDelegate unmanaged = null;
984 IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("send_event"));
985 unmanaged = (SendEventNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(SendEventNativeDelegate));
987 if (unmanaged == null) return false;
990 bool __result = unmanaged (this.Handle, evnt == null ? IntPtr.Zero : evnt.Handle);
994 static QueryNativeDelegate Query_cb_delegate;
995 static QueryNativeDelegate QueryVMCallback {
997 if (Query_cb_delegate == null)
998 Query_cb_delegate = new QueryNativeDelegate (Query_cb);
999 return Query_cb_delegate;
1003 static void OverrideQuery (GLib.GType gtype)
1005 OverrideQuery (gtype, QueryVMCallback);
1008 static void OverrideQuery (GLib.GType gtype, QueryNativeDelegate callback)
1011 IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("query"));
1012 *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
1016 [UnmanagedFunctionPointer (CallingConvention.Cdecl)]
1017 delegate bool QueryNativeDelegate (IntPtr inst, IntPtr query);
1019 static bool Query_cb (IntPtr inst, IntPtr query)
1022 Element __obj = GLib.Object.GetObject (inst, false) as Element;
1024 __result = __obj.OnQuery (query == IntPtr.Zero ? null : (Gst.Query) GLib.Opaque.GetOpaque (query, typeof (Gst.Query), false));
1026 } catch (Exception e) {
1027 GLib.ExceptionManager.RaiseUnhandledException (e, true);
1028 // NOTREACHED: above call does not return.
1033 [GLib.DefaultSignalHandler(Type=typeof(Gst.Element), ConnectionMethod="OverrideQuery")]
1034 protected virtual bool OnQuery (Gst.Query query)
1036 return InternalQuery (query);
1039 private bool InternalQuery (Gst.Query query)
1041 QueryNativeDelegate unmanaged = null;
1043 IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("query"));
1044 unmanaged = (QueryNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(QueryNativeDelegate));
1046 if (unmanaged == null) return false;
1048 bool __result = unmanaged (this.Handle, query == null ? IntPtr.Zero : query.Handle);
1052 static PostMessageNativeDelegate PostMessage_cb_delegate;
1053 static PostMessageNativeDelegate PostMessageVMCallback {
1055 if (PostMessage_cb_delegate == null)
1056 PostMessage_cb_delegate = new PostMessageNativeDelegate (PostMessage_cb);
1057 return PostMessage_cb_delegate;
1061 static void OverridePostMessage (GLib.GType gtype)
1063 OverridePostMessage (gtype, PostMessageVMCallback);
1066 static void OverridePostMessage (GLib.GType gtype, PostMessageNativeDelegate callback)
1069 IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("post_message"));
1070 *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
1074 [UnmanagedFunctionPointer (CallingConvention.Cdecl)]
1075 delegate bool PostMessageNativeDelegate (IntPtr inst, IntPtr message);
1077 static bool PostMessage_cb (IntPtr inst, IntPtr message)
1080 Element __obj = GLib.Object.GetObject (inst, false) as Element;
1082 __result = __obj.OnPostMessage (message == IntPtr.Zero ? null : (Gst.Message) GLib.Opaque.GetOpaque (message, typeof (Gst.Message), true));
1084 } catch (Exception e) {
1085 GLib.ExceptionManager.RaiseUnhandledException (e, true);
1086 // NOTREACHED: above call does not return.
1091 [GLib.DefaultSignalHandler(Type=typeof(Gst.Element), ConnectionMethod="OverridePostMessage")]
1092 protected virtual bool OnPostMessage (Gst.Message message)
1094 return InternalPostMessage (message);
1097 private bool InternalPostMessage (Gst.Message message)
1099 PostMessageNativeDelegate unmanaged = null;
1101 IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("post_message"));
1102 unmanaged = (PostMessageNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(PostMessageNativeDelegate));
1104 if (unmanaged == null) return false;
1106 message.Owned = false;
1107 bool __result = unmanaged (this.Handle, message == null ? IntPtr.Zero : message.Handle);
1111 static SetContextNativeDelegate SetContext_cb_delegate;
1112 static SetContextNativeDelegate SetContextVMCallback {
1114 if (SetContext_cb_delegate == null)
1115 SetContext_cb_delegate = new SetContextNativeDelegate (SetContext_cb);
1116 return SetContext_cb_delegate;
1120 static void OverrideSetContext (GLib.GType gtype)
1122 OverrideSetContext (gtype, SetContextVMCallback);
1125 static void OverrideSetContext (GLib.GType gtype, SetContextNativeDelegate callback)
1128 IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("set_context"));
1129 *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
1133 [UnmanagedFunctionPointer (CallingConvention.Cdecl)]
1134 delegate void SetContextNativeDelegate (IntPtr inst, IntPtr context);
1136 static void SetContext_cb (IntPtr inst, IntPtr context)
1139 Element __obj = GLib.Object.GetObject (inst, false) as Element;
1140 __obj.OnSetContext (Gst.Context.New (context));
1141 } catch (Exception e) {
1142 GLib.ExceptionManager.RaiseUnhandledException (e, false);
1146 [GLib.DefaultSignalHandler(Type=typeof(Gst.Element), ConnectionMethod="OverrideSetContext")]
1147 protected virtual void OnSetContext (Gst.Context context)
1149 InternalSetContext (context);
1152 private void InternalSetContext (Gst.Context context)
1154 SetContextNativeDelegate unmanaged = null;
1156 IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("set_context"));
1157 unmanaged = (SetContextNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(SetContextNativeDelegate));
1159 if (unmanaged == null) return;
1161 IntPtr native_context = GLib.Marshaller.StructureToPtrAlloc (context);
1162 unmanaged (this.Handle, native_context);
1163 Marshal.FreeHGlobal (native_context);
1167 // Internal representation of the wrapped structure ABI.
1168 static GLib.AbiStruct _class_abi = null;
1169 static public new GLib.AbiStruct class_abi {
1171 if (_class_abi == null)
1172 _class_abi = new GLib.AbiStruct (new List<GLib.AbiField>{
1173 new GLib.AbiField("metadata"
1174 , Gst.Object.class_abi.Fields
1175 , (uint) Marshal.SizeOf(typeof(IntPtr)) // metadata
1178 , (uint) Marshal.SizeOf(typeof(IntPtr))
1181 new GLib.AbiField("elementfactory"
1183 , (uint) Marshal.SizeOf(typeof(IntPtr)) // elementfactory
1186 , (uint) Marshal.SizeOf(typeof(IntPtr))
1189 new GLib.AbiField("padtemplates"
1191 , (uint) Marshal.SizeOf(typeof(IntPtr)) // padtemplates
1194 , (uint) Marshal.SizeOf(typeof(IntPtr))
1197 new GLib.AbiField("numpadtemplates"
1199 , (uint) Marshal.SizeOf(typeof(int)) // numpadtemplates
1201 , "pad_templ_cookie"
1202 , (long) Marshal.OffsetOf(typeof(GstElement_numpadtemplatesAlign), "numpadtemplates")
1205 new GLib.AbiField("pad_templ_cookie"
1207 , (uint) Marshal.SizeOf(typeof(uint)) // pad_templ_cookie
1210 , (long) Marshal.OffsetOf(typeof(GstElement_pad_templ_cookieAlign), "pad_templ_cookie")
1213 new GLib.AbiField("pad_added"
1215 , (uint) Marshal.SizeOf(typeof(IntPtr)) // pad_added
1216 , "pad_templ_cookie"
1218 , (uint) Marshal.SizeOf(typeof(IntPtr))
1221 new GLib.AbiField("pad_removed"
1223 , (uint) Marshal.SizeOf(typeof(IntPtr)) // pad_removed
1226 , (uint) Marshal.SizeOf(typeof(IntPtr))
1229 new GLib.AbiField("no_more_pads"
1231 , (uint) Marshal.SizeOf(typeof(IntPtr)) // no_more_pads
1234 , (uint) Marshal.SizeOf(typeof(IntPtr))
1237 new GLib.AbiField("request_new_pad"
1239 , (uint) Marshal.SizeOf(typeof(IntPtr)) // request_new_pad
1242 , (uint) Marshal.SizeOf(typeof(IntPtr))
1245 new GLib.AbiField("release_pad"
1247 , (uint) Marshal.SizeOf(typeof(IntPtr)) // release_pad
1250 , (uint) Marshal.SizeOf(typeof(IntPtr))
1253 new GLib.AbiField("get_state"
1255 , (uint) Marshal.SizeOf(typeof(IntPtr)) // get_state
1258 , (uint) Marshal.SizeOf(typeof(IntPtr))
1261 new GLib.AbiField("set_state"
1263 , (uint) Marshal.SizeOf(typeof(IntPtr)) // set_state
1266 , (uint) Marshal.SizeOf(typeof(IntPtr))
1269 new GLib.AbiField("change_state"
1271 , (uint) Marshal.SizeOf(typeof(IntPtr)) // change_state
1274 , (uint) Marshal.SizeOf(typeof(IntPtr))
1277 new GLib.AbiField("state_changed"
1279 , (uint) Marshal.SizeOf(typeof(IntPtr)) // state_changed
1282 , (uint) Marshal.SizeOf(typeof(IntPtr))
1285 new GLib.AbiField("set_bus"
1287 , (uint) Marshal.SizeOf(typeof(IntPtr)) // set_bus
1290 , (uint) Marshal.SizeOf(typeof(IntPtr))
1293 new GLib.AbiField("provide_clock"
1295 , (uint) Marshal.SizeOf(typeof(IntPtr)) // provide_clock
1298 , (uint) Marshal.SizeOf(typeof(IntPtr))
1301 new GLib.AbiField("set_clock"
1303 , (uint) Marshal.SizeOf(typeof(IntPtr)) // set_clock
1306 , (uint) Marshal.SizeOf(typeof(IntPtr))
1309 new GLib.AbiField("send_event"
1311 , (uint) Marshal.SizeOf(typeof(IntPtr)) // send_event
1314 , (uint) Marshal.SizeOf(typeof(IntPtr))
1317 new GLib.AbiField("query"
1319 , (uint) Marshal.SizeOf(typeof(IntPtr)) // query
1322 , (uint) Marshal.SizeOf(typeof(IntPtr))
1325 new GLib.AbiField("post_message"
1327 , (uint) Marshal.SizeOf(typeof(IntPtr)) // post_message
1330 , (uint) Marshal.SizeOf(typeof(IntPtr))
1333 new GLib.AbiField("set_context"
1335 , (uint) Marshal.SizeOf(typeof(IntPtr)) // set_context
1338 , (uint) Marshal.SizeOf(typeof(IntPtr))
1341 new GLib.AbiField("_gst_reserved"
1343 , (uint) Marshal.SizeOf(typeof(IntPtr)) * 18 // _gst_reserved
1346 , (uint) Marshal.SizeOf(typeof(IntPtr))
1355 [StructLayout(LayoutKind.Sequential)]
1356 public struct GstElement_numpadtemplatesAlign
1359 private int numpadtemplates;
1362 [StructLayout(LayoutKind.Sequential)]
1363 public struct GstElement_pad_templ_cookieAlign
1366 private uint pad_templ_cookie;
1370 // End of the ABI representation.
1372 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
1373 static extern IntPtr gst_element_get_type();
1375 public static new GLib.GType GType {
1377 IntPtr raw_ret = gst_element_get_type();
1378 GLib.GType ret = new GLib.GType(raw_ret);
1383 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
1384 static extern unsafe IntPtr gst_element_make_from_uri(int type, IntPtr uri, IntPtr elementname, out IntPtr error);
1386 public static unsafe Gst.Element MakeFromUri(Gst.URIType type, string uri, string elementname) {
1387 IntPtr native_uri = GLib.Marshaller.StringToPtrGStrdup (uri);
1388 IntPtr native_elementname = GLib.Marshaller.StringToPtrGStrdup (elementname);
1389 IntPtr error = IntPtr.Zero;
1390 IntPtr raw_ret = gst_element_make_from_uri((int) type, native_uri, native_elementname, out error);
1391 Gst.Element ret = GLib.Object.GetObject(raw_ret) as Gst.Element;
1392 GLib.Marshaller.Free (native_uri);
1393 GLib.Marshaller.Free (native_elementname);
1394 if (error != IntPtr.Zero) throw new GLib.GException (error);
1398 public static Gst.Element MakeFromUri(Gst.URIType type, string uri) {
1399 return MakeFromUri (type, uri, null);
1402 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
1403 static extern bool gst_element_register(IntPtr plugin, IntPtr name, uint rank, IntPtr type);
1405 public static bool Register(Gst.Plugin plugin, string name, uint rank, GLib.GType type) {
1406 IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name);
1407 bool raw_ret = gst_element_register(plugin == null ? IntPtr.Zero : plugin.Handle, native_name, rank, type.Val);
1409 GLib.Marshaller.Free (native_name);
1413 public static bool Register(string name, uint rank, GLib.GType type) {
1414 return Register (null, name, rank, type);
1417 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
1418 static extern IntPtr gst_element_state_change_return_get_name(int state_ret);
1420 public static string StateChangeReturnGetName(Gst.StateChangeReturn state_ret) {
1421 IntPtr raw_ret = gst_element_state_change_return_get_name((int) state_ret);
1422 string ret = GLib.Marshaller.Utf8PtrToString (raw_ret);
1426 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
1427 static extern IntPtr gst_element_state_get_name(int state);
1429 public static string StateGetName(Gst.State state) {
1430 IntPtr raw_ret = gst_element_state_get_name((int) state);
1431 string ret = GLib.Marshaller.Utf8PtrToString (raw_ret);
1435 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
1436 static extern void gst_element_abort_state(IntPtr raw);
1438 public void AbortState() {
1439 gst_element_abort_state(Handle);
1442 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
1443 static extern bool gst_element_add_pad(IntPtr raw, IntPtr pad);
1445 public bool AddPad(Gst.Pad pad) {
1446 bool raw_ret = gst_element_add_pad(Handle, pad == null ? IntPtr.Zero : pad.Handle);
1451 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
1452 static extern UIntPtr gst_element_add_property_deep_notify_watch(IntPtr raw, IntPtr property_name, bool include_value);
1454 public ulong AddPropertyDeepNotifyWatch(string property_name, bool include_value) {
1455 IntPtr native_property_name = GLib.Marshaller.StringToPtrGStrdup (property_name);
1456 UIntPtr raw_ret = gst_element_add_property_deep_notify_watch(Handle, native_property_name, include_value);
1457 ulong ret = (ulong) raw_ret;
1458 GLib.Marshaller.Free (native_property_name);
1462 public ulong AddPropertyDeepNotifyWatch(bool include_value) {
1463 return AddPropertyDeepNotifyWatch (null, include_value);
1466 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
1467 static extern UIntPtr gst_element_add_property_notify_watch(IntPtr raw, IntPtr property_name, bool include_value);
1469 public ulong AddPropertyNotifyWatch(string property_name, bool include_value) {
1470 IntPtr native_property_name = GLib.Marshaller.StringToPtrGStrdup (property_name);
1471 UIntPtr raw_ret = gst_element_add_property_notify_watch(Handle, native_property_name, include_value);
1472 ulong ret = (ulong) raw_ret;
1473 GLib.Marshaller.Free (native_property_name);
1477 public ulong AddPropertyNotifyWatch(bool include_value) {
1478 return AddPropertyNotifyWatch (null, include_value);
1481 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
1482 static extern void gst_element_call_async(IntPtr raw, GstSharp.ElementCallAsyncFuncNative func, IntPtr user_data, GLib.DestroyNotify destroy_notify);
1484 public void CallAsync(Gst.ElementCallAsyncFunc func) {
1485 GstSharp.ElementCallAsyncFuncWrapper func_wrapper = new GstSharp.ElementCallAsyncFuncWrapper (func);
1487 GLib.DestroyNotify destroy_notify;
1489 user_data = IntPtr.Zero;
1490 destroy_notify = null;
1492 user_data = (IntPtr) GCHandle.Alloc (func_wrapper);
1493 destroy_notify = GLib.DestroyHelper.NotifyHandler;
1495 gst_element_call_async(Handle, func_wrapper.NativeDelegate, user_data, destroy_notify);
1498 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
1499 static extern int gst_element_change_state(IntPtr raw, int transition);
1501 public Gst.StateChangeReturn ChangeState(Gst.StateChange transition) {
1502 int raw_ret = gst_element_change_state(Handle, (int) transition);
1503 Gst.StateChangeReturn ret = (Gst.StateChangeReturn) raw_ret;
1507 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
1508 static extern int gst_element_continue_state(IntPtr raw, int _ret);
1510 public Gst.StateChangeReturn ContinueState(Gst.StateChangeReturn _ret) {
1511 int raw_ret = gst_element_continue_state(Handle, (int) _ret);
1512 Gst.StateChangeReturn ret = (Gst.StateChangeReturn) raw_ret;
1516 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
1517 static extern void gst_element_create_all_pads(IntPtr raw);
1519 public void CreateAllPads() {
1520 gst_element_create_all_pads(Handle);
1523 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
1524 static extern bool gst_element_foreach_pad(IntPtr raw, GstSharp.ElementForeachPadFuncNative func, IntPtr user_data);
1526 public bool ForeachPad(Gst.ElementForeachPadFunc func) {
1527 GstSharp.ElementForeachPadFuncWrapper func_wrapper = new GstSharp.ElementForeachPadFuncWrapper (func);
1528 bool raw_ret = gst_element_foreach_pad(Handle, func_wrapper.NativeDelegate, IntPtr.Zero);
1533 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
1534 static extern bool gst_element_foreach_sink_pad(IntPtr raw, GstSharp.ElementForeachPadFuncNative func, IntPtr user_data);
1536 public bool ForeachSinkPad(Gst.ElementForeachPadFunc func) {
1537 GstSharp.ElementForeachPadFuncWrapper func_wrapper = new GstSharp.ElementForeachPadFuncWrapper (func);
1538 bool raw_ret = gst_element_foreach_sink_pad(Handle, func_wrapper.NativeDelegate, IntPtr.Zero);
1543 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
1544 static extern bool gst_element_foreach_src_pad(IntPtr raw, GstSharp.ElementForeachPadFuncNative func, IntPtr user_data);
1546 public bool ForeachSrcPad(Gst.ElementForeachPadFunc func) {
1547 GstSharp.ElementForeachPadFuncWrapper func_wrapper = new GstSharp.ElementForeachPadFuncWrapper (func);
1548 bool raw_ret = gst_element_foreach_src_pad(Handle, func_wrapper.NativeDelegate, IntPtr.Zero);
1553 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
1554 static extern IntPtr gst_element_get_compatible_pad(IntPtr raw, IntPtr pad, IntPtr caps);
1556 public Gst.Pad GetCompatiblePad(Gst.Pad pad, Gst.Caps caps) {
1557 IntPtr raw_ret = gst_element_get_compatible_pad(Handle, pad == null ? IntPtr.Zero : pad.Handle, caps == null ? IntPtr.Zero : caps.Handle);
1558 Gst.Pad ret = GLib.Object.GetObject(raw_ret, true) as Gst.Pad;
1562 public Gst.Pad GetCompatiblePad(Gst.Pad pad) {
1563 return GetCompatiblePad (pad, null);
1566 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
1567 static extern IntPtr gst_element_get_compatible_pad_template(IntPtr raw, IntPtr compattempl);
1569 public Gst.PadTemplate GetCompatiblePadTemplate(Gst.PadTemplate compattempl) {
1570 IntPtr raw_ret = gst_element_get_compatible_pad_template(Handle, compattempl == null ? IntPtr.Zero : compattempl.Handle);
1571 Gst.PadTemplate ret = GLib.Object.GetObject(raw_ret) as Gst.PadTemplate;
1575 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
1576 static extern IntPtr gst_element_get_context(IntPtr raw, IntPtr context_type);
1578 public Gst.Context GetContext(string context_type) {
1579 IntPtr native_context_type = GLib.Marshaller.StringToPtrGStrdup (context_type);
1580 IntPtr raw_ret = gst_element_get_context(Handle, native_context_type);
1581 Gst.Context ret = Gst.Context.New (raw_ret);
1582 GLib.Marshaller.Free (native_context_type);
1586 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
1587 static extern IntPtr gst_element_get_context_unlocked(IntPtr raw, IntPtr context_type);
1589 public Gst.Context GetContextUnlocked(string context_type) {
1590 IntPtr native_context_type = GLib.Marshaller.StringToPtrGStrdup (context_type);
1591 IntPtr raw_ret = gst_element_get_context_unlocked(Handle, native_context_type);
1592 Gst.Context ret = Gst.Context.New (raw_ret);
1593 GLib.Marshaller.Free (native_context_type);
1597 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
1598 static extern ulong gst_element_get_current_clock_time(IntPtr raw);
1600 public ulong CurrentClockTime {
1602 ulong raw_ret = gst_element_get_current_clock_time(Handle);
1603 ulong ret = raw_ret;
1608 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
1609 static extern ulong gst_element_get_current_running_time(IntPtr raw);
1611 public ulong CurrentRunningTime {
1613 ulong raw_ret = gst_element_get_current_running_time(Handle);
1614 ulong ret = raw_ret;
1619 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
1620 static extern IntPtr gst_element_get_factory(IntPtr raw);
1622 public Gst.ElementFactory Factory {
1624 IntPtr raw_ret = gst_element_get_factory(Handle);
1625 Gst.ElementFactory ret = GLib.Object.GetObject(raw_ret) as Gst.ElementFactory;
1630 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
1631 static extern IntPtr gst_element_get_metadata(IntPtr raw, IntPtr key);
1633 public string GetMetadata(string key) {
1634 IntPtr native_key = GLib.Marshaller.StringToPtrGStrdup (key);
1635 IntPtr raw_ret = gst_element_get_metadata(Handle, native_key);
1636 string ret = GLib.Marshaller.Utf8PtrToString (raw_ret);
1637 GLib.Marshaller.Free (native_key);
1641 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
1642 static extern IntPtr gst_element_get_pad_template(IntPtr raw, IntPtr name);
1644 public Gst.PadTemplate GetPadTemplate(string name) {
1645 IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name);
1646 IntPtr raw_ret = gst_element_get_pad_template(Handle, native_name);
1647 Gst.PadTemplate ret = GLib.Object.GetObject(raw_ret) as Gst.PadTemplate;
1648 GLib.Marshaller.Free (native_name);
1652 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
1653 static extern IntPtr gst_element_get_pad_template_list(IntPtr raw);
1655 public Gst.PadTemplate[] PadTemplateList {
1657 IntPtr raw_ret = gst_element_get_pad_template_list(Handle);
1658 Gst.PadTemplate[] ret = (Gst.PadTemplate[]) GLib.Marshaller.ListPtrToArray (raw_ret, typeof(GLib.List), false, false, typeof(Gst.PadTemplate));
1663 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
1664 static extern IntPtr gst_element_get_request_pad(IntPtr raw, IntPtr name);
1666 public Gst.Pad GetRequestPad(string name) {
1667 IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name);
1668 IntPtr raw_ret = gst_element_get_request_pad(Handle, native_name);
1669 Gst.Pad ret = GLib.Object.GetObject(raw_ret, true) as Gst.Pad;
1670 GLib.Marshaller.Free (native_name);
1674 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
1675 static extern int gst_element_get_state(IntPtr raw, out int state, out int pending, ulong timeout);
1677 public Gst.StateChangeReturn GetState(out Gst.State state, out Gst.State pending, ulong timeout) {
1680 int raw_ret = gst_element_get_state(Handle, out native_state, out native_pending, timeout);
1681 Gst.StateChangeReturn ret = (Gst.StateChangeReturn) raw_ret;
1682 state = (Gst.State) native_state;
1683 pending = (Gst.State) native_pending;
1687 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
1688 static extern IntPtr gst_element_get_static_pad(IntPtr raw, IntPtr name);
1690 public Gst.Pad GetStaticPad(string name) {
1691 IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name);
1692 IntPtr raw_ret = gst_element_get_static_pad(Handle, native_name);
1693 Gst.Pad ret = GLib.Object.GetObject(raw_ret, true) as Gst.Pad;
1694 GLib.Marshaller.Free (native_name);
1698 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
1699 static extern bool gst_element_is_locked_state(IntPtr raw);
1701 public bool IsLockedState {
1703 bool raw_ret = gst_element_is_locked_state(Handle);
1709 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
1710 static extern IntPtr gst_element_iterate_pads(IntPtr raw);
1712 public Gst.Iterator IteratePads() {
1713 IntPtr raw_ret = gst_element_iterate_pads(Handle);
1714 Gst.Iterator ret = raw_ret == IntPtr.Zero ? null : (Gst.Iterator) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Iterator), true);
1718 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
1719 static extern IntPtr gst_element_iterate_sink_pads(IntPtr raw);
1721 public Gst.Iterator IterateSinkPads() {
1722 IntPtr raw_ret = gst_element_iterate_sink_pads(Handle);
1723 Gst.Iterator ret = raw_ret == IntPtr.Zero ? null : (Gst.Iterator) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Iterator), true);
1727 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
1728 static extern IntPtr gst_element_iterate_src_pads(IntPtr raw);
1730 public Gst.Iterator IterateSrcPads() {
1731 IntPtr raw_ret = gst_element_iterate_src_pads(Handle);
1732 Gst.Iterator ret = raw_ret == IntPtr.Zero ? null : (Gst.Iterator) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Iterator), true);
1736 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
1737 static extern bool gst_element_link(IntPtr raw, IntPtr dest);
1739 public bool Link(Gst.Element dest) {
1740 bool raw_ret = gst_element_link(Handle, dest == null ? IntPtr.Zero : dest.Handle);
1745 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
1746 static extern bool gst_element_link_filtered(IntPtr raw, IntPtr dest, IntPtr filter);
1748 public bool LinkFiltered(Gst.Element dest, Gst.Caps filter) {
1749 bool raw_ret = gst_element_link_filtered(Handle, dest == null ? IntPtr.Zero : dest.Handle, filter == null ? IntPtr.Zero : filter.Handle);
1754 public bool LinkFiltered(Gst.Element dest) {
1755 return LinkFiltered (dest, null);
1758 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
1759 static extern bool gst_element_link_pads(IntPtr raw, IntPtr srcpadname, IntPtr dest, IntPtr destpadname);
1761 public bool LinkPads(string srcpadname, Gst.Element dest, string destpadname) {
1762 IntPtr native_srcpadname = GLib.Marshaller.StringToPtrGStrdup (srcpadname);
1763 IntPtr native_destpadname = GLib.Marshaller.StringToPtrGStrdup (destpadname);
1764 bool raw_ret = gst_element_link_pads(Handle, native_srcpadname, dest == null ? IntPtr.Zero : dest.Handle, native_destpadname);
1766 GLib.Marshaller.Free (native_srcpadname);
1767 GLib.Marshaller.Free (native_destpadname);
1771 public bool LinkPads(Gst.Element dest) {
1772 return LinkPads (null, dest, null);
1775 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
1776 static extern bool gst_element_link_pads_filtered(IntPtr raw, IntPtr srcpadname, IntPtr dest, IntPtr destpadname, IntPtr filter);
1778 public bool LinkPadsFiltered(string srcpadname, Gst.Element dest, string destpadname, Gst.Caps filter) {
1779 IntPtr native_srcpadname = GLib.Marshaller.StringToPtrGStrdup (srcpadname);
1780 IntPtr native_destpadname = GLib.Marshaller.StringToPtrGStrdup (destpadname);
1781 bool raw_ret = gst_element_link_pads_filtered(Handle, native_srcpadname, dest == null ? IntPtr.Zero : dest.Handle, native_destpadname, filter == null ? IntPtr.Zero : filter.Handle);
1783 GLib.Marshaller.Free (native_srcpadname);
1784 GLib.Marshaller.Free (native_destpadname);
1788 public bool LinkPadsFiltered(Gst.Element dest) {
1789 return LinkPadsFiltered (null, dest, null, null);
1792 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
1793 static extern bool gst_element_link_pads_full(IntPtr raw, IntPtr srcpadname, IntPtr dest, IntPtr destpadname, int flags);
1795 public bool LinkPadsFull(string srcpadname, Gst.Element dest, string destpadname, Gst.PadLinkCheck flags) {
1796 IntPtr native_srcpadname = GLib.Marshaller.StringToPtrGStrdup (srcpadname);
1797 IntPtr native_destpadname = GLib.Marshaller.StringToPtrGStrdup (destpadname);
1798 bool raw_ret = gst_element_link_pads_full(Handle, native_srcpadname, dest == null ? IntPtr.Zero : dest.Handle, native_destpadname, (int) flags);
1800 GLib.Marshaller.Free (native_srcpadname);
1801 GLib.Marshaller.Free (native_destpadname);
1805 public bool LinkPadsFull(Gst.Element dest, Gst.PadLinkCheck flags) {
1806 return LinkPadsFull (null, dest, null, flags);
1809 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
1810 static extern void gst_element_lost_state(IntPtr raw);
1812 public void LostState() {
1813 gst_element_lost_state(Handle);
1816 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
1817 static extern void gst_element_message_full(IntPtr raw, int type, uint domain, int code, IntPtr text, IntPtr debug, IntPtr file, IntPtr function, int line);
1819 public void MessageFull(Gst.MessageType type, uint domain, int code, string text, string debug, string file, string function, int line) {
1820 IntPtr native_file = GLib.Marshaller.StringToPtrGStrdup (file);
1821 IntPtr native_function = GLib.Marshaller.StringToPtrGStrdup (function);
1822 gst_element_message_full(Handle, (int) type, domain, code, GLib.Marshaller.StringToPtrGStrdup(text), GLib.Marshaller.StringToPtrGStrdup(debug), native_file, native_function, line);
1823 GLib.Marshaller.Free (native_file);
1824 GLib.Marshaller.Free (native_function);
1827 public void MessageFull(Gst.MessageType type, uint domain, int code, string file, string function, int line) {
1828 MessageFull (type, domain, code, null, null, file, function, line);
1831 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
1832 static extern void gst_element_message_full_with_details(IntPtr raw, int type, uint domain, int code, IntPtr text, IntPtr debug, IntPtr file, IntPtr function, int line, IntPtr structure);
1834 public void MessageFullWithDetails(Gst.MessageType type, uint domain, int code, string text, string debug, string file, string function, int line, Gst.Structure structure) {
1835 IntPtr native_file = GLib.Marshaller.StringToPtrGStrdup (file);
1836 IntPtr native_function = GLib.Marshaller.StringToPtrGStrdup (function);
1837 structure.Owned = false;
1838 gst_element_message_full_with_details(Handle, (int) type, domain, code, GLib.Marshaller.StringToPtrGStrdup(text), GLib.Marshaller.StringToPtrGStrdup(debug), native_file, native_function, line, structure == null ? IntPtr.Zero : structure.Handle);
1839 GLib.Marshaller.Free (native_file);
1840 GLib.Marshaller.Free (native_function);
1843 public void MessageFullWithDetails(Gst.MessageType type, uint domain, int code, string file, string function, int line, Gst.Structure structure) {
1844 MessageFullWithDetails (type, domain, code, null, null, file, function, line, structure);
1847 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
1848 static extern void gst_element_no_more_pads(IntPtr raw);
1850 public void NoMorePads() {
1851 gst_element_no_more_pads(Handle);
1854 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
1855 static extern bool gst_element_post_message(IntPtr raw, IntPtr message);
1857 public bool PostMessage(Gst.Message message) {
1858 message.Owned = false;
1859 bool raw_ret = gst_element_post_message(Handle, message == null ? IntPtr.Zero : message.Handle);
1864 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
1865 static extern IntPtr gst_element_provide_clock(IntPtr raw);
1867 public Gst.Clock ProvideClock() {
1868 IntPtr raw_ret = gst_element_provide_clock(Handle);
1869 Gst.Clock ret = GLib.Object.GetObject(raw_ret, true) as Gst.Clock;
1873 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
1874 static extern bool gst_element_query(IntPtr raw, IntPtr query);
1876 public bool Query(Gst.Query query) {
1877 bool raw_ret = gst_element_query(Handle, query == null ? IntPtr.Zero : query.Handle);
1882 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
1883 static extern bool gst_element_query_convert(IntPtr raw, int src_format, long src_val, int dest_format, out long dest_val);
1885 public bool QueryConvert(Gst.Format src_format, long src_val, Gst.Format dest_format, out long dest_val) {
1886 bool raw_ret = gst_element_query_convert(Handle, (int) src_format, src_val, (int) dest_format, out dest_val);
1891 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
1892 static extern bool gst_element_query_duration(IntPtr raw, int format, out long duration);
1894 public bool QueryDuration(Gst.Format format, out long duration) {
1895 bool raw_ret = gst_element_query_duration(Handle, (int) format, out duration);
1900 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
1901 static extern bool gst_element_query_position(IntPtr raw, int format, out long cur);
1903 public bool QueryPosition(Gst.Format format, out long cur) {
1904 bool raw_ret = gst_element_query_position(Handle, (int) format, out cur);
1909 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
1910 static extern void gst_element_release_request_pad(IntPtr raw, IntPtr pad);
1912 public void ReleaseRequestPad(Gst.Pad pad) {
1913 gst_element_release_request_pad(Handle, pad == null ? IntPtr.Zero : pad.Handle);
1916 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
1917 static extern bool gst_element_remove_pad(IntPtr raw, IntPtr pad);
1919 public bool RemovePad(Gst.Pad pad) {
1920 bool raw_ret = gst_element_remove_pad(Handle, pad == null ? IntPtr.Zero : pad.Handle);
1925 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
1926 static extern void gst_element_remove_property_notify_watch(IntPtr raw, UIntPtr watch_id);
1928 public void RemovePropertyNotifyWatch(ulong watch_id) {
1929 gst_element_remove_property_notify_watch(Handle, new UIntPtr (watch_id));
1932 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
1933 static extern IntPtr gst_element_request_pad(IntPtr raw, IntPtr templ, IntPtr name, IntPtr caps);
1935 public Gst.Pad RequestPad(Gst.PadTemplate templ, string name, Gst.Caps caps) {
1936 IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name);
1937 IntPtr raw_ret = gst_element_request_pad(Handle, templ == null ? IntPtr.Zero : templ.Handle, native_name, caps == null ? IntPtr.Zero : caps.Handle);
1938 Gst.Pad ret = GLib.Object.GetObject(raw_ret, true) as Gst.Pad;
1939 GLib.Marshaller.Free (native_name);
1943 public Gst.Pad RequestPad(Gst.PadTemplate templ) {
1944 return RequestPad (templ, null, null);
1947 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
1948 static extern bool gst_element_seek(IntPtr raw, double rate, int format, int flags, int start_type, long start, int stop_type, long stop);
1950 public bool Seek(double rate, Gst.Format format, Gst.SeekFlags flags, Gst.SeekType start_type, long start, Gst.SeekType stop_type, long stop) {
1951 bool raw_ret = gst_element_seek(Handle, rate, (int) format, (int) flags, (int) start_type, start, (int) stop_type, stop);
1956 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
1957 static extern bool gst_element_seek_simple(IntPtr raw, int format, int seek_flags, long seek_pos);
1959 public bool SeekSimple(Gst.Format format, Gst.SeekFlags seek_flags, long seek_pos) {
1960 bool raw_ret = gst_element_seek_simple(Handle, (int) format, (int) seek_flags, seek_pos);
1965 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
1966 static extern bool gst_element_send_event(IntPtr raw, IntPtr evnt);
1968 public bool SendEvent(Gst.Event evnt) {
1970 bool raw_ret = gst_element_send_event(Handle, evnt == null ? IntPtr.Zero : evnt.Handle);
1975 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
1976 static extern bool gst_element_set_clock(IntPtr raw, IntPtr clock);
1978 public bool SetClock(Gst.Clock clock) {
1979 bool raw_ret = gst_element_set_clock(Handle, clock == null ? IntPtr.Zero : clock.Handle);
1984 public bool SetClock() {
1985 return SetClock (null);
1988 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
1989 static extern bool gst_element_set_locked_state(IntPtr raw, bool locked_state);
1991 public bool SetLockedState(bool locked_state) {
1992 bool raw_ret = gst_element_set_locked_state(Handle, locked_state);
1997 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
1998 static extern int gst_element_set_state(IntPtr raw, int state);
2000 public Gst.StateChangeReturn SetState(Gst.State state) {
2001 int raw_ret = gst_element_set_state(Handle, (int) state);
2002 Gst.StateChangeReturn ret = (Gst.StateChangeReturn) raw_ret;
2006 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
2007 static extern bool gst_element_sync_state_with_parent(IntPtr raw);
2009 public bool SyncStateWithParent() {
2010 bool raw_ret = gst_element_sync_state_with_parent(Handle);
2015 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
2016 static extern void gst_element_unlink(IntPtr raw, IntPtr dest);
2018 public void Unlink(Gst.Element dest) {
2019 gst_element_unlink(Handle, dest == null ? IntPtr.Zero : dest.Handle);
2022 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
2023 static extern void gst_element_unlink_pads(IntPtr raw, IntPtr srcpadname, IntPtr dest, IntPtr destpadname);
2025 public void UnlinkPads(string srcpadname, Gst.Element dest, string destpadname) {
2026 IntPtr native_srcpadname = GLib.Marshaller.StringToPtrGStrdup (srcpadname);
2027 IntPtr native_destpadname = GLib.Marshaller.StringToPtrGStrdup (destpadname);
2028 gst_element_unlink_pads(Handle, native_srcpadname, dest == null ? IntPtr.Zero : dest.Handle, native_destpadname);
2029 GLib.Marshaller.Free (native_srcpadname);
2030 GLib.Marshaller.Free (native_destpadname);
2034 // Internal representation of the wrapped structure ABI.
2035 static GLib.AbiStruct _abi_info = null;
2036 static public new GLib.AbiStruct abi_info {
2038 if (_abi_info == null)
2039 _abi_info = new GLib.AbiStruct (new List<GLib.AbiField>{
2040 new GLib.AbiField("state_lock"
2041 , Gst.Object.abi_info.Fields
2042 , (uint) Marshal.SizeOf(typeof(GLib.RecMutex.ABI)) // state_lock
2045 , (long) Marshal.OffsetOf(typeof(GstElement_state_lockAlign), "state_lock")
2048 new GLib.AbiField("state_cond"
2050 , (uint) Marshal.SizeOf(typeof(GLib.Cond.ABI)) // state_cond
2053 , (long) Marshal.OffsetOf(typeof(GstElement_state_condAlign), "state_cond")
2056 new GLib.AbiField("state_cookie"
2058 , (uint) Marshal.SizeOf(typeof(uint)) // state_cookie
2061 , (long) Marshal.OffsetOf(typeof(GstElement_state_cookieAlign), "state_cookie")
2064 new GLib.AbiField("target_state"
2066 , (uint) Marshal.SizeOf(System.Enum.GetUnderlyingType(typeof(Gst.State))) // target_state
2069 , (long) Marshal.OffsetOf(typeof(GstElement_target_stateAlign), "target_state")
2072 new GLib.AbiField("current_state"
2074 , (uint) Marshal.SizeOf(System.Enum.GetUnderlyingType(typeof(Gst.State))) // current_state
2077 , (long) Marshal.OffsetOf(typeof(GstElement_current_stateAlign), "current_state")
2080 new GLib.AbiField("next_state"
2082 , (uint) Marshal.SizeOf(System.Enum.GetUnderlyingType(typeof(Gst.State))) // next_state
2085 , (long) Marshal.OffsetOf(typeof(GstElement_next_stateAlign), "next_state")
2088 new GLib.AbiField("pending_state"
2090 , (uint) Marshal.SizeOf(System.Enum.GetUnderlyingType(typeof(Gst.State))) // pending_state
2093 , (long) Marshal.OffsetOf(typeof(GstElement_pending_stateAlign), "pending_state")
2096 new GLib.AbiField("last_return"
2098 , (uint) Marshal.SizeOf(System.Enum.GetUnderlyingType(typeof(Gst.StateChangeReturn))) // last_return
2101 , (long) Marshal.OffsetOf(typeof(GstElement_last_returnAlign), "last_return")
2104 new GLib.AbiField("bus"
2106 , (uint) Marshal.SizeOf(typeof(IntPtr)) // bus
2109 , (uint) Marshal.SizeOf(typeof(IntPtr))
2112 new GLib.AbiField("clock"
2114 , (uint) Marshal.SizeOf(typeof(IntPtr)) // clock
2117 , (uint) Marshal.SizeOf(typeof(IntPtr))
2120 new GLib.AbiField("base_time"
2122 , (uint) Marshal.SizeOf(typeof(long)) // base_time
2125 , (long) Marshal.OffsetOf(typeof(GstElement_base_timeAlign), "base_time")
2128 new GLib.AbiField("start_time"
2130 , (uint) Marshal.SizeOf(typeof(ulong)) // start_time
2133 , (long) Marshal.OffsetOf(typeof(GstElement_start_timeAlign), "start_time")
2136 new GLib.AbiField("numpads"
2138 , (uint) Marshal.SizeOf(typeof(ushort)) // numpads
2141 , (long) Marshal.OffsetOf(typeof(GstElement_numpadsAlign), "numpads")
2144 new GLib.AbiField("pads"
2146 , (uint) Marshal.SizeOf(typeof(IntPtr)) // pads
2149 , (uint) Marshal.SizeOf(typeof(IntPtr))
2152 new GLib.AbiField("numsrcpads"
2154 , (uint) Marshal.SizeOf(typeof(ushort)) // numsrcpads
2157 , (long) Marshal.OffsetOf(typeof(GstElement_numsrcpadsAlign), "numsrcpads")
2160 new GLib.AbiField("srcpads"
2162 , (uint) Marshal.SizeOf(typeof(IntPtr)) // srcpads
2165 , (uint) Marshal.SizeOf(typeof(IntPtr))
2168 new GLib.AbiField("numsinkpads"
2170 , (uint) Marshal.SizeOf(typeof(ushort)) // numsinkpads
2173 , (long) Marshal.OffsetOf(typeof(GstElement_numsinkpadsAlign), "numsinkpads")
2176 new GLib.AbiField("sinkpads"
2178 , (uint) Marshal.SizeOf(typeof(IntPtr)) // sinkpads
2181 , (uint) Marshal.SizeOf(typeof(IntPtr))
2184 new GLib.AbiField("pads_cookie"
2186 , (uint) Marshal.SizeOf(typeof(uint)) // pads_cookie
2189 , (long) Marshal.OffsetOf(typeof(GstElement_pads_cookieAlign), "pads_cookie")
2192 new GLib.AbiField("contexts"
2194 , (uint) Marshal.SizeOf(typeof(IntPtr)) // contexts
2197 , (uint) Marshal.SizeOf(typeof(IntPtr))
2200 new GLib.AbiField("_gst_reserved"
2202 , (uint) Marshal.SizeOf(typeof(IntPtr)) * 3 // _gst_reserved
2205 , (uint) Marshal.SizeOf(typeof(IntPtr))
2214 [StructLayout(LayoutKind.Sequential)]
2215 public struct GstElement_state_lockAlign
2218 private GLib.RecMutex.ABI state_lock;
2221 [StructLayout(LayoutKind.Sequential)]
2222 public struct GstElement_state_condAlign
2225 private GLib.Cond.ABI state_cond;
2228 [StructLayout(LayoutKind.Sequential)]
2229 public struct GstElement_state_cookieAlign
2232 private uint state_cookie;
2235 [StructLayout(LayoutKind.Sequential)]
2236 public struct GstElement_target_stateAlign
2239 private Gst.State target_state;
2242 [StructLayout(LayoutKind.Sequential)]
2243 public struct GstElement_current_stateAlign
2246 private Gst.State current_state;
2249 [StructLayout(LayoutKind.Sequential)]
2250 public struct GstElement_next_stateAlign
2253 private Gst.State next_state;
2256 [StructLayout(LayoutKind.Sequential)]
2257 public struct GstElement_pending_stateAlign
2260 private Gst.State pending_state;
2263 [StructLayout(LayoutKind.Sequential)]
2264 public struct GstElement_last_returnAlign
2267 private Gst.StateChangeReturn last_return;
2270 [StructLayout(LayoutKind.Sequential)]
2271 public struct GstElement_base_timeAlign
2274 private ulong base_time;
2277 [StructLayout(LayoutKind.Sequential)]
2278 public struct GstElement_start_timeAlign
2281 private ulong start_time;
2284 [StructLayout(LayoutKind.Sequential)]
2285 public struct GstElement_numpadsAlign
2288 private ushort numpads;
2291 [StructLayout(LayoutKind.Sequential)]
2292 public struct GstElement_numsrcpadsAlign
2295 private ushort numsrcpads;
2298 [StructLayout(LayoutKind.Sequential)]
2299 public struct GstElement_numsinkpadsAlign
2302 private ushort numsinkpads;
2305 [StructLayout(LayoutKind.Sequential)]
2306 public struct GstElement_pads_cookieAlign
2309 private uint pads_cookie;
2313 // End of the ABI representation.