1 // This file was generated by the Gtk# code generator.
2 // Any changes made will be lost if regenerated.
4 namespace Gst.AudioSharp {
7 using System.Runtime.InteropServices;
9 #region Autogenerated code
10 [UnmanagedFunctionPointer (CallingConvention.Cdecl)]
11 internal delegate ulong AudioClockGetTimeFuncNative(IntPtr clock, IntPtr user_data);
13 internal class AudioClockGetTimeFuncInvoker {
15 AudioClockGetTimeFuncNative native_cb;
17 GLib.DestroyNotify __notify;
19 ~AudioClockGetTimeFuncInvoker ()
26 internal AudioClockGetTimeFuncInvoker (AudioClockGetTimeFuncNative native_cb) : this (native_cb, IntPtr.Zero, null) {}
28 internal AudioClockGetTimeFuncInvoker (AudioClockGetTimeFuncNative native_cb, IntPtr data) : this (native_cb, data, null) {}
30 internal AudioClockGetTimeFuncInvoker (AudioClockGetTimeFuncNative native_cb, IntPtr data, GLib.DestroyNotify notify)
32 this.native_cb = native_cb;
37 internal Gst.Audio.AudioClockGetTimeFunc Handler {
39 return new Gst.Audio.AudioClockGetTimeFunc(InvokeNative);
43 ulong InvokeNative (Gst.Clock clock)
45 ulong __result = native_cb (clock == null ? IntPtr.Zero : clock.Handle, __data);
50 internal class AudioClockGetTimeFuncWrapper {
52 public ulong NativeCallback (IntPtr clock, IntPtr user_data)
55 ulong __ret = managed (GLib.Object.GetObject(clock) as Gst.Clock);
59 } catch (Exception e) {
60 GLib.ExceptionManager.RaiseUnhandledException (e, true);
61 // NOTREACHED: Above call does not return.
66 bool release_on_call = false;
69 public void PersistUntilCalled ()
71 release_on_call = true;
72 gch = GCHandle.Alloc (this);
75 internal AudioClockGetTimeFuncNative NativeDelegate;
76 Gst.Audio.AudioClockGetTimeFunc managed;
78 public AudioClockGetTimeFuncWrapper (Gst.Audio.AudioClockGetTimeFunc managed)
80 this.managed = managed;
82 NativeDelegate = new AudioClockGetTimeFuncNative (NativeCallback);
85 public static Gst.Audio.AudioClockGetTimeFunc GetManagedDelegate (AudioClockGetTimeFuncNative native)
89 AudioClockGetTimeFuncWrapper wrapper = (AudioClockGetTimeFuncWrapper) native.Target;
92 return wrapper.managed;