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 AudioBaseSrc : Gst.Base.PushSrc {
14 public AudioBaseSrc (IntPtr raw) : base(raw) {}
16 protected AudioBaseSrc() : base(IntPtr.Zero)
18 CreateNativeObject (new string [0], new GLib.Value [0]);
21 [GLib.Property ("actual-buffer-time")]
22 public long ActualBufferTime {
24 GLib.Value val = GetProperty ("actual-buffer-time");
25 long ret = (long) val;
31 [GLib.Property ("actual-latency-time")]
32 public long ActualLatencyTime {
34 GLib.Value val = GetProperty ("actual-latency-time");
35 long ret = (long) val;
41 [GLib.Property ("buffer-time")]
42 public long BufferTime {
44 GLib.Value val = GetProperty ("buffer-time");
45 long ret = (long) val;
50 GLib.Value val = new GLib.Value(value);
51 SetProperty("buffer-time", val);
56 [GLib.Property ("latency-time")]
57 public long LatencyTime {
59 GLib.Value val = GetProperty ("latency-time");
60 long ret = (long) val;
65 GLib.Value val = new GLib.Value(value);
66 SetProperty("latency-time", val);
71 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
72 static extern bool gst_audio_base_src_get_provide_clock(IntPtr raw);
74 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
75 static extern void gst_audio_base_src_set_provide_clock(IntPtr raw, bool provide);
77 [GLib.Property ("provide-clock")]
78 public bool ProvideClock {
80 bool raw_ret = gst_audio_base_src_get_provide_clock(Handle);
85 gst_audio_base_src_set_provide_clock(Handle, value);
89 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
90 static extern int gst_audio_base_src_get_slave_method(IntPtr raw);
92 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
93 static extern void gst_audio_base_src_set_slave_method(IntPtr raw, int method);
95 [GLib.Property ("slave-method")]
96 public Gst.Audio.AudioBaseSrcSlaveMethod SlaveMethod {
98 int raw_ret = gst_audio_base_src_get_slave_method(Handle);
99 Gst.Audio.AudioBaseSrcSlaveMethod ret = (Gst.Audio.AudioBaseSrcSlaveMethod) raw_ret;
103 gst_audio_base_src_set_slave_method(Handle, (int) value);
107 public Gst.Audio.AudioRingBuffer Ringbuffer {
110 IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("ringbuffer"));
111 return GLib.Object.GetObject((*raw_ptr)) as Gst.Audio.AudioRingBuffer;
116 public ulong BufferTimeField {
119 ulong* raw_ptr = (ulong*)(((byte*)Handle) + abi_info.GetFieldOffset("buffer_time"));
125 public ulong LatencyTimeField {
128 ulong* raw_ptr = (ulong*)(((byte*)Handle) + abi_info.GetFieldOffset("latency_time"));
134 public ulong NextSample {
137 ulong* raw_ptr = (ulong*)(((byte*)Handle) + abi_info.GetFieldOffset("next_sample"));
143 public Gst.Clock Clock {
146 IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("clock"));
147 return GLib.Object.GetObject((*raw_ptr)) as Gst.Clock;
152 static CreateRingbufferNativeDelegate CreateRingbuffer_cb_delegate;
153 static CreateRingbufferNativeDelegate CreateRingbufferVMCallback {
155 if (CreateRingbuffer_cb_delegate == null)
156 CreateRingbuffer_cb_delegate = new CreateRingbufferNativeDelegate (CreateRingbuffer_cb);
157 return CreateRingbuffer_cb_delegate;
161 static void OverrideCreateRingbuffer (GLib.GType gtype)
163 OverrideCreateRingbuffer (gtype, CreateRingbufferVMCallback);
166 static void OverrideCreateRingbuffer (GLib.GType gtype, CreateRingbufferNativeDelegate callback)
169 IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("create_ringbuffer"));
170 *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
174 [UnmanagedFunctionPointer (CallingConvention.Cdecl)]
175 delegate IntPtr CreateRingbufferNativeDelegate (IntPtr inst);
177 static IntPtr CreateRingbuffer_cb (IntPtr inst)
180 AudioBaseSrc __obj = GLib.Object.GetObject (inst, false) as AudioBaseSrc;
181 Gst.Audio.AudioRingBuffer __result;
182 __result = __obj.OnCreateRingbuffer ();
183 return __result == null ? IntPtr.Zero : __result.Handle;
184 } catch (Exception e) {
185 GLib.ExceptionManager.RaiseUnhandledException (e, true);
186 // NOTREACHED: above call does not return.
191 [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioBaseSrc), ConnectionMethod="OverrideCreateRingbuffer")]
192 protected virtual Gst.Audio.AudioRingBuffer OnCreateRingbuffer ()
194 return InternalCreateRingbuffer ();
197 private Gst.Audio.AudioRingBuffer InternalCreateRingbuffer ()
199 CreateRingbufferNativeDelegate unmanaged = null;
201 IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("create_ringbuffer"));
202 unmanaged = (CreateRingbufferNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(CreateRingbufferNativeDelegate));
204 if (unmanaged == null) return null;
206 IntPtr __result = unmanaged (this.Handle);
207 return GLib.Object.GetObject(__result) as Gst.Audio.AudioRingBuffer;
211 // Internal representation of the wrapped structure ABI.
212 static GLib.AbiStruct _class_abi = null;
213 static public new GLib.AbiStruct class_abi {
215 if (_class_abi == null)
216 _class_abi = new GLib.AbiStruct (new List<GLib.AbiField>{
217 new GLib.AbiField("create_ringbuffer"
218 , Gst.Base.PushSrc.class_abi.Fields
219 , (uint) Marshal.SizeOf(typeof(IntPtr)) // create_ringbuffer
222 , (uint) Marshal.SizeOf(typeof(IntPtr))
225 new GLib.AbiField("_gst_reserved"
227 , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved
228 , "create_ringbuffer"
230 , (uint) Marshal.SizeOf(typeof(IntPtr))
240 // End of the ABI representation.
242 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
243 static extern IntPtr gst_audio_base_src_get_type();
245 public static new GLib.GType GType {
247 IntPtr raw_ret = gst_audio_base_src_get_type();
248 GLib.GType ret = new GLib.GType(raw_ret);
253 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
254 static extern IntPtr gst_audio_base_src_create_ringbuffer(IntPtr raw);
256 public Gst.Audio.AudioRingBuffer CreateRingbuffer() {
257 IntPtr raw_ret = gst_audio_base_src_create_ringbuffer(Handle);
258 Gst.Audio.AudioRingBuffer ret = GLib.Object.GetObject(raw_ret) as Gst.Audio.AudioRingBuffer;
263 static AudioBaseSrc ()
265 GtkSharp.GstreamerSharp.ObjectManager.Initialize ();
268 // Internal representation of the wrapped structure ABI.
269 static GLib.AbiStruct _abi_info = null;
270 static public new GLib.AbiStruct abi_info {
272 if (_abi_info == null)
273 _abi_info = new GLib.AbiStruct (new List<GLib.AbiField>{
274 new GLib.AbiField("ringbuffer"
275 , Gst.Base.PushSrc.abi_info.Fields
276 , (uint) Marshal.SizeOf(typeof(IntPtr)) // ringbuffer
279 , (uint) Marshal.SizeOf(typeof(IntPtr))
282 new GLib.AbiField("buffer_time"
284 , (uint) Marshal.SizeOf(typeof(ulong)) // buffer_time
287 , (long) Marshal.OffsetOf(typeof(GstAudioBaseSrc_buffer_timeAlign), "buffer_time")
290 new GLib.AbiField("latency_time"
292 , (uint) Marshal.SizeOf(typeof(ulong)) // latency_time
295 , (long) Marshal.OffsetOf(typeof(GstAudioBaseSrc_latency_timeAlign), "latency_time")
298 new GLib.AbiField("next_sample"
300 , (uint) Marshal.SizeOf(typeof(ulong)) // next_sample
303 , (long) Marshal.OffsetOf(typeof(GstAudioBaseSrc_next_sampleAlign), "next_sample")
306 new GLib.AbiField("clock"
308 , (uint) Marshal.SizeOf(typeof(IntPtr)) // clock
311 , (uint) Marshal.SizeOf(typeof(IntPtr))
314 new GLib.AbiField("priv"
316 , (uint) Marshal.SizeOf(typeof(IntPtr)) // priv
319 , (uint) Marshal.SizeOf(typeof(IntPtr))
322 new GLib.AbiField("_gst_reserved"
324 , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved
327 , (uint) Marshal.SizeOf(typeof(IntPtr))
336 [StructLayout(LayoutKind.Sequential)]
337 public struct GstAudioBaseSrc_buffer_timeAlign
340 private ulong buffer_time;
343 [StructLayout(LayoutKind.Sequential)]
344 public struct GstAudioBaseSrc_latency_timeAlign
347 private ulong latency_time;
350 [StructLayout(LayoutKind.Sequential)]
351 public struct GstAudioBaseSrc_next_sampleAlign
354 private ulong next_sample;
358 // End of the ABI representation.