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 AudioBaseSink : Gst.Base.BaseSink {
14 public AudioBaseSink (IntPtr raw) : base(raw) {}
16 protected AudioBaseSink() : base(IntPtr.Zero)
18 CreateNativeObject (new string [0], new GLib.Value [0]);
21 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
22 static extern ulong gst_audio_base_sink_get_alignment_threshold(IntPtr raw);
24 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
25 static extern void gst_audio_base_sink_set_alignment_threshold(IntPtr raw, ulong alignment_threshold);
27 [GLib.Property ("alignment-threshold")]
28 public ulong AlignmentThreshold {
30 ulong raw_ret = gst_audio_base_sink_get_alignment_threshold(Handle);
35 gst_audio_base_sink_set_alignment_threshold(Handle, value);
39 [GLib.Property ("buffer-time")]
40 public long BufferTime {
42 GLib.Value val = GetProperty ("buffer-time");
43 long ret = (long) val;
48 GLib.Value val = new GLib.Value(value);
49 SetProperty("buffer-time", val);
54 [GLib.Property ("can-activate-pull")]
55 public bool CanActivatePull {
57 GLib.Value val = GetProperty ("can-activate-pull");
58 bool ret = (bool) val;
63 GLib.Value val = new GLib.Value(value);
64 SetProperty("can-activate-pull", val);
69 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
70 static extern ulong gst_audio_base_sink_get_discont_wait(IntPtr raw);
72 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
73 static extern void gst_audio_base_sink_set_discont_wait(IntPtr raw, ulong discont_wait);
75 [GLib.Property ("discont-wait")]
76 public ulong DiscontWait {
78 ulong raw_ret = gst_audio_base_sink_get_discont_wait(Handle);
83 gst_audio_base_sink_set_discont_wait(Handle, value);
87 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
88 static extern long gst_audio_base_sink_get_drift_tolerance(IntPtr raw);
90 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
91 static extern void gst_audio_base_sink_set_drift_tolerance(IntPtr raw, long drift_tolerance);
93 [GLib.Property ("drift-tolerance")]
94 public long DriftTolerance {
96 long raw_ret = gst_audio_base_sink_get_drift_tolerance(Handle);
101 gst_audio_base_sink_set_drift_tolerance(Handle, value);
105 [GLib.Property ("latency-time")]
106 public long LatencyTime {
108 GLib.Value val = GetProperty ("latency-time");
109 long ret = (long) val;
114 GLib.Value val = new GLib.Value(value);
115 SetProperty("latency-time", val);
120 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
121 static extern bool gst_audio_base_sink_get_provide_clock(IntPtr raw);
123 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
124 static extern void gst_audio_base_sink_set_provide_clock(IntPtr raw, bool provide);
126 [GLib.Property ("provide-clock")]
127 public bool ProvideClock {
129 bool raw_ret = gst_audio_base_sink_get_provide_clock(Handle);
134 gst_audio_base_sink_set_provide_clock(Handle, value);
138 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
139 static extern int gst_audio_base_sink_get_slave_method(IntPtr raw);
141 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
142 static extern void gst_audio_base_sink_set_slave_method(IntPtr raw, int method);
144 [GLib.Property ("slave-method")]
145 public Gst.Audio.AudioBaseSinkSlaveMethod SlaveMethod {
147 int raw_ret = gst_audio_base_sink_get_slave_method(Handle);
148 Gst.Audio.AudioBaseSinkSlaveMethod ret = (Gst.Audio.AudioBaseSinkSlaveMethod) raw_ret;
152 gst_audio_base_sink_set_slave_method(Handle, (int) value);
156 public Gst.Audio.AudioRingBuffer Ringbuffer {
159 IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("ringbuffer"));
160 return GLib.Object.GetObject((*raw_ptr)) as Gst.Audio.AudioRingBuffer;
165 public ulong BufferTimeField {
168 ulong* raw_ptr = (ulong*)(((byte*)Handle) + abi_info.GetFieldOffset("buffer_time"));
174 public ulong LatencyTimeField {
177 ulong* raw_ptr = (ulong*)(((byte*)Handle) + abi_info.GetFieldOffset("latency_time"));
183 public ulong NextSample {
186 ulong* raw_ptr = (ulong*)(((byte*)Handle) + abi_info.GetFieldOffset("next_sample"));
192 public Gst.Clock ProvidedClock {
195 IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("provided_clock"));
196 return GLib.Object.GetObject((*raw_ptr)) as Gst.Clock;
201 public bool EosRendering {
204 bool* raw_ptr = (bool*)(((byte*)Handle) + abi_info.GetFieldOffset("eos_rendering"));
210 static CreateRingbufferNativeDelegate CreateRingbuffer_cb_delegate;
211 static CreateRingbufferNativeDelegate CreateRingbufferVMCallback {
213 if (CreateRingbuffer_cb_delegate == null)
214 CreateRingbuffer_cb_delegate = new CreateRingbufferNativeDelegate (CreateRingbuffer_cb);
215 return CreateRingbuffer_cb_delegate;
219 static void OverrideCreateRingbuffer (GLib.GType gtype)
221 OverrideCreateRingbuffer (gtype, CreateRingbufferVMCallback);
224 static void OverrideCreateRingbuffer (GLib.GType gtype, CreateRingbufferNativeDelegate callback)
227 IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("create_ringbuffer"));
228 *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
232 [UnmanagedFunctionPointer (CallingConvention.Cdecl)]
233 delegate IntPtr CreateRingbufferNativeDelegate (IntPtr inst);
235 static IntPtr CreateRingbuffer_cb (IntPtr inst)
238 AudioBaseSink __obj = GLib.Object.GetObject (inst, false) as AudioBaseSink;
239 Gst.Audio.AudioRingBuffer __result;
240 __result = __obj.OnCreateRingbuffer ();
241 return __result == null ? IntPtr.Zero : __result.Handle;
242 } catch (Exception e) {
243 GLib.ExceptionManager.RaiseUnhandledException (e, true);
244 // NOTREACHED: above call does not return.
249 [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioBaseSink), ConnectionMethod="OverrideCreateRingbuffer")]
250 protected virtual Gst.Audio.AudioRingBuffer OnCreateRingbuffer ()
252 return InternalCreateRingbuffer ();
255 private Gst.Audio.AudioRingBuffer InternalCreateRingbuffer ()
257 CreateRingbufferNativeDelegate unmanaged = null;
259 IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("create_ringbuffer"));
260 unmanaged = (CreateRingbufferNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(CreateRingbufferNativeDelegate));
262 if (unmanaged == null) return null;
264 IntPtr __result = unmanaged (this.Handle);
265 return GLib.Object.GetObject(__result) as Gst.Audio.AudioRingBuffer;
268 static PayloadNativeDelegate Payload_cb_delegate;
269 static PayloadNativeDelegate PayloadVMCallback {
271 if (Payload_cb_delegate == null)
272 Payload_cb_delegate = new PayloadNativeDelegate (Payload_cb);
273 return Payload_cb_delegate;
277 static void OverridePayload (GLib.GType gtype)
279 OverridePayload (gtype, PayloadVMCallback);
282 static void OverridePayload (GLib.GType gtype, PayloadNativeDelegate callback)
285 IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("payload"));
286 *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
290 [UnmanagedFunctionPointer (CallingConvention.Cdecl)]
291 delegate IntPtr PayloadNativeDelegate (IntPtr inst, IntPtr buffer);
293 static IntPtr Payload_cb (IntPtr inst, IntPtr buffer)
296 AudioBaseSink __obj = GLib.Object.GetObject (inst, false) as AudioBaseSink;
298 __result = __obj.OnPayload (buffer == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (buffer, typeof (Gst.Buffer), false));
299 return __result == null ? IntPtr.Zero : __result.OwnedCopy;
300 } catch (Exception e) {
301 GLib.ExceptionManager.RaiseUnhandledException (e, true);
302 // NOTREACHED: above call does not return.
307 [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioBaseSink), ConnectionMethod="OverridePayload")]
308 protected virtual Gst.Buffer OnPayload (Gst.Buffer buffer)
310 return InternalPayload (buffer);
313 private Gst.Buffer InternalPayload (Gst.Buffer buffer)
315 PayloadNativeDelegate unmanaged = null;
317 IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("payload"));
318 unmanaged = (PayloadNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(PayloadNativeDelegate));
320 if (unmanaged == null) return null;
322 IntPtr __result = unmanaged (this.Handle, buffer == null ? IntPtr.Zero : buffer.Handle);
323 return __result == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (__result, typeof (Gst.Buffer), true);
327 // Internal representation of the wrapped structure ABI.
328 static GLib.AbiStruct _class_abi = null;
329 static public new GLib.AbiStruct class_abi {
331 if (_class_abi == null)
332 _class_abi = new GLib.AbiStruct (new List<GLib.AbiField>{
333 new GLib.AbiField("create_ringbuffer"
334 , Gst.Base.BaseSink.class_abi.Fields
335 , (uint) Marshal.SizeOf(typeof(IntPtr)) // create_ringbuffer
338 , (uint) Marshal.SizeOf(typeof(IntPtr))
341 new GLib.AbiField("payload"
343 , (uint) Marshal.SizeOf(typeof(IntPtr)) // payload
344 , "create_ringbuffer"
346 , (uint) Marshal.SizeOf(typeof(IntPtr))
349 new GLib.AbiField("_gst_reserved"
351 , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved
354 , (uint) Marshal.SizeOf(typeof(IntPtr))
364 // End of the ABI representation.
366 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
367 static extern IntPtr gst_audio_base_sink_get_type();
369 public static new GLib.GType GType {
371 IntPtr raw_ret = gst_audio_base_sink_get_type();
372 GLib.GType ret = new GLib.GType(raw_ret);
377 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
378 static extern IntPtr gst_audio_base_sink_create_ringbuffer(IntPtr raw);
380 public Gst.Audio.AudioRingBuffer CreateRingbuffer() {
381 IntPtr raw_ret = gst_audio_base_sink_create_ringbuffer(Handle);
382 Gst.Audio.AudioRingBuffer ret = GLib.Object.GetObject(raw_ret) as Gst.Audio.AudioRingBuffer;
386 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
387 static extern void gst_audio_base_sink_report_device_failure(IntPtr raw);
389 public void ReportDeviceFailure() {
390 gst_audio_base_sink_report_device_failure(Handle);
393 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
394 static extern void gst_audio_base_sink_set_custom_slaving_callback(IntPtr raw, Gst.AudioSharp.AudioBaseSinkCustomSlavingCallbackNative cb, IntPtr user_data, GLib.DestroyNotify notify);
396 public Gst.Audio.AudioBaseSinkCustomSlavingCallback CustomSlavingCallback {
398 Gst.AudioSharp.AudioBaseSinkCustomSlavingCallbackWrapper value_wrapper = new Gst.AudioSharp.AudioBaseSinkCustomSlavingCallbackWrapper (value);
400 GLib.DestroyNotify notify;
402 user_data = IntPtr.Zero;
405 user_data = (IntPtr) GCHandle.Alloc (value_wrapper);
406 notify = GLib.DestroyHelper.NotifyHandler;
408 gst_audio_base_sink_set_custom_slaving_callback(Handle, value_wrapper.NativeDelegate, user_data, notify);
413 static AudioBaseSink ()
415 GtkSharp.GstreamerSharp.ObjectManager.Initialize ();
418 // Internal representation of the wrapped structure ABI.
419 static GLib.AbiStruct _abi_info = null;
420 static public new GLib.AbiStruct abi_info {
422 if (_abi_info == null)
423 _abi_info = new GLib.AbiStruct (new List<GLib.AbiField>{
424 new GLib.AbiField("ringbuffer"
425 , Gst.Base.BaseSink.abi_info.Fields
426 , (uint) Marshal.SizeOf(typeof(IntPtr)) // ringbuffer
429 , (uint) Marshal.SizeOf(typeof(IntPtr))
432 new GLib.AbiField("buffer_time"
434 , (uint) Marshal.SizeOf(typeof(ulong)) // buffer_time
437 , (long) Marshal.OffsetOf(typeof(GstAudioBaseSink_buffer_timeAlign), "buffer_time")
440 new GLib.AbiField("latency_time"
442 , (uint) Marshal.SizeOf(typeof(ulong)) // latency_time
445 , (long) Marshal.OffsetOf(typeof(GstAudioBaseSink_latency_timeAlign), "latency_time")
448 new GLib.AbiField("next_sample"
450 , (uint) Marshal.SizeOf(typeof(ulong)) // next_sample
453 , (long) Marshal.OffsetOf(typeof(GstAudioBaseSink_next_sampleAlign), "next_sample")
456 new GLib.AbiField("provided_clock"
458 , (uint) Marshal.SizeOf(typeof(IntPtr)) // provided_clock
461 , (uint) Marshal.SizeOf(typeof(IntPtr))
464 new GLib.AbiField("eos_rendering"
466 , (uint) Marshal.SizeOf(typeof(bool)) // eos_rendering
469 , (long) Marshal.OffsetOf(typeof(GstAudioBaseSink_eos_renderingAlign), "eos_rendering")
472 new GLib.AbiField("priv"
474 , (uint) Marshal.SizeOf(typeof(IntPtr)) // priv
477 , (uint) Marshal.SizeOf(typeof(IntPtr))
480 new GLib.AbiField("_gst_reserved"
482 , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved
485 , (uint) Marshal.SizeOf(typeof(IntPtr))
494 [StructLayout(LayoutKind.Sequential)]
495 public struct GstAudioBaseSink_buffer_timeAlign
498 private ulong buffer_time;
501 [StructLayout(LayoutKind.Sequential)]
502 public struct GstAudioBaseSink_latency_timeAlign
505 private ulong latency_time;
508 [StructLayout(LayoutKind.Sequential)]
509 public struct GstAudioBaseSink_next_sampleAlign
512 private ulong next_sample;
515 [StructLayout(LayoutKind.Sequential)]
516 public struct GstAudioBaseSink_eos_renderingAlign
519 private bool eos_rendering;
523 // End of the ABI representation.