Release 1.22.7
[platform/upstream/gstreamer.git] / subprojects / gstreamer-sharp / sources / generated / Gst.Audio / AudioBaseSink.cs
1 // This file was generated by the Gtk# code generator.
2 // Any changes made will be lost if regenerated.
3
4 namespace Gst.Audio {
5
6         using System;
7         using System.Collections;
8         using System.Collections.Generic;
9         using System.Runtime.InteropServices;
10
11 #region Autogenerated code
12         public partial class AudioBaseSink : Gst.Base.BaseSink {
13
14                 public AudioBaseSink (IntPtr raw) : base(raw) {}
15
16                 protected AudioBaseSink() : base(IntPtr.Zero)
17                 {
18                         CreateNativeObject (new string [0], new GLib.Value [0]);
19                 }
20
21                 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
22                 static extern ulong gst_audio_base_sink_get_alignment_threshold(IntPtr raw);
23
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);
26
27                 [GLib.Property ("alignment-threshold")]
28                 public ulong AlignmentThreshold {
29                         get  {
30                                 ulong raw_ret = gst_audio_base_sink_get_alignment_threshold(Handle);
31                                 ulong ret = raw_ret;
32                                 return ret;
33                         }
34                         set  {
35                                 gst_audio_base_sink_set_alignment_threshold(Handle, value);
36                         }
37                 }
38
39                 [GLib.Property ("buffer-time")]
40                 public long BufferTime {
41                         get {
42                                 GLib.Value val = GetProperty ("buffer-time");
43                                 long ret = (long) val;
44                                 val.Dispose ();
45                                 return ret;
46                         }
47                         set {
48                                 GLib.Value val = new GLib.Value(value);
49                                 SetProperty("buffer-time", val);
50                                 val.Dispose ();
51                         }
52                 }
53
54                 [GLib.Property ("can-activate-pull")]
55                 public bool CanActivatePull {
56                         get {
57                                 GLib.Value val = GetProperty ("can-activate-pull");
58                                 bool ret = (bool) val;
59                                 val.Dispose ();
60                                 return ret;
61                         }
62                         set {
63                                 GLib.Value val = new GLib.Value(value);
64                                 SetProperty("can-activate-pull", val);
65                                 val.Dispose ();
66                         }
67                 }
68
69                 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
70                 static extern ulong gst_audio_base_sink_get_discont_wait(IntPtr raw);
71
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);
74
75                 [GLib.Property ("discont-wait")]
76                 public ulong DiscontWait {
77                         get  {
78                                 ulong raw_ret = gst_audio_base_sink_get_discont_wait(Handle);
79                                 ulong ret = raw_ret;
80                                 return ret;
81                         }
82                         set  {
83                                 gst_audio_base_sink_set_discont_wait(Handle, value);
84                         }
85                 }
86
87                 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
88                 static extern long gst_audio_base_sink_get_drift_tolerance(IntPtr raw);
89
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);
92
93                 [GLib.Property ("drift-tolerance")]
94                 public long DriftTolerance {
95                         get  {
96                                 long raw_ret = gst_audio_base_sink_get_drift_tolerance(Handle);
97                                 long ret = raw_ret;
98                                 return ret;
99                         }
100                         set  {
101                                 gst_audio_base_sink_set_drift_tolerance(Handle, value);
102                         }
103                 }
104
105                 [GLib.Property ("latency-time")]
106                 public long LatencyTime {
107                         get {
108                                 GLib.Value val = GetProperty ("latency-time");
109                                 long ret = (long) val;
110                                 val.Dispose ();
111                                 return ret;
112                         }
113                         set {
114                                 GLib.Value val = new GLib.Value(value);
115                                 SetProperty("latency-time", val);
116                                 val.Dispose ();
117                         }
118                 }
119
120                 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
121                 static extern bool gst_audio_base_sink_get_provide_clock(IntPtr raw);
122
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);
125
126                 [GLib.Property ("provide-clock")]
127                 public bool ProvideClock {
128                         get  {
129                                 bool raw_ret = gst_audio_base_sink_get_provide_clock(Handle);
130                                 bool ret = raw_ret;
131                                 return ret;
132                         }
133                         set  {
134                                 gst_audio_base_sink_set_provide_clock(Handle, value);
135                         }
136                 }
137
138                 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
139                 static extern int gst_audio_base_sink_get_slave_method(IntPtr raw);
140
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);
143
144                 [GLib.Property ("slave-method")]
145                 public Gst.Audio.AudioBaseSinkSlaveMethod SlaveMethod {
146                         get  {
147                                 int raw_ret = gst_audio_base_sink_get_slave_method(Handle);
148                                 Gst.Audio.AudioBaseSinkSlaveMethod ret = (Gst.Audio.AudioBaseSinkSlaveMethod) raw_ret;
149                                 return ret;
150                         }
151                         set  {
152                                 gst_audio_base_sink_set_slave_method(Handle, (int) value);
153                         }
154                 }
155
156                 public Gst.Audio.AudioRingBuffer Ringbuffer {
157                         get {
158                                 unsafe {
159                                         IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("ringbuffer"));
160                                         return GLib.Object.GetObject((*raw_ptr)) as Gst.Audio.AudioRingBuffer;
161                                 }
162                         }
163                 }
164
165                 public ulong BufferTimeField {
166                         get {
167                                 unsafe {
168                                         ulong* raw_ptr = (ulong*)(((byte*)Handle) + abi_info.GetFieldOffset("buffer_time"));
169                                         return (*raw_ptr);
170                                 }
171                         }
172                 }
173
174                 public ulong LatencyTimeField {
175                         get {
176                                 unsafe {
177                                         ulong* raw_ptr = (ulong*)(((byte*)Handle) + abi_info.GetFieldOffset("latency_time"));
178                                         return (*raw_ptr);
179                                 }
180                         }
181                 }
182
183                 public ulong NextSample {
184                         get {
185                                 unsafe {
186                                         ulong* raw_ptr = (ulong*)(((byte*)Handle) + abi_info.GetFieldOffset("next_sample"));
187                                         return (*raw_ptr);
188                                 }
189                         }
190                 }
191
192                 public Gst.Clock ProvidedClock {
193                         get {
194                                 unsafe {
195                                         IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("provided_clock"));
196                                         return GLib.Object.GetObject((*raw_ptr)) as Gst.Clock;
197                                 }
198                         }
199                 }
200
201                 public bool EosRendering {
202                         get {
203                                 unsafe {
204                                         bool* raw_ptr = (bool*)(((byte*)Handle) + abi_info.GetFieldOffset("eos_rendering"));
205                                         return (*raw_ptr);
206                                 }
207                         }
208                 }
209
210                 static CreateRingbufferNativeDelegate CreateRingbuffer_cb_delegate;
211                 static CreateRingbufferNativeDelegate CreateRingbufferVMCallback {
212                         get {
213                                 if (CreateRingbuffer_cb_delegate == null)
214                                         CreateRingbuffer_cb_delegate = new CreateRingbufferNativeDelegate (CreateRingbuffer_cb);
215                                 return CreateRingbuffer_cb_delegate;
216                         }
217                 }
218
219                 static void OverrideCreateRingbuffer (GLib.GType gtype)
220                 {
221                         OverrideCreateRingbuffer (gtype, CreateRingbufferVMCallback);
222                 }
223
224                 static void OverrideCreateRingbuffer (GLib.GType gtype, CreateRingbufferNativeDelegate callback)
225                 {
226                         unsafe {
227                                 IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("create_ringbuffer"));
228                                 *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
229                         }
230                 }
231
232                 [UnmanagedFunctionPointer (CallingConvention.Cdecl)]
233                 delegate IntPtr CreateRingbufferNativeDelegate (IntPtr inst);
234
235                 static IntPtr CreateRingbuffer_cb (IntPtr inst)
236                 {
237                         try {
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.
245                                 throw e;
246                         }
247                 }
248
249                 [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioBaseSink), ConnectionMethod="OverrideCreateRingbuffer")]
250                 protected virtual Gst.Audio.AudioRingBuffer OnCreateRingbuffer ()
251                 {
252                         return InternalCreateRingbuffer ();
253                 }
254
255                 private Gst.Audio.AudioRingBuffer InternalCreateRingbuffer ()
256                 {
257                         CreateRingbufferNativeDelegate unmanaged = null;
258                         unsafe {
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));
261                         }
262                         if (unmanaged == null) return null;
263
264                         IntPtr __result = unmanaged (this.Handle);
265                         return GLib.Object.GetObject(__result) as Gst.Audio.AudioRingBuffer;
266                 }
267
268                 static PayloadNativeDelegate Payload_cb_delegate;
269                 static PayloadNativeDelegate PayloadVMCallback {
270                         get {
271                                 if (Payload_cb_delegate == null)
272                                         Payload_cb_delegate = new PayloadNativeDelegate (Payload_cb);
273                                 return Payload_cb_delegate;
274                         }
275                 }
276
277                 static void OverridePayload (GLib.GType gtype)
278                 {
279                         OverridePayload (gtype, PayloadVMCallback);
280                 }
281
282                 static void OverridePayload (GLib.GType gtype, PayloadNativeDelegate callback)
283                 {
284                         unsafe {
285                                 IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("payload"));
286                                 *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
287                         }
288                 }
289
290                 [UnmanagedFunctionPointer (CallingConvention.Cdecl)]
291                 delegate IntPtr PayloadNativeDelegate (IntPtr inst, IntPtr buffer);
292
293                 static IntPtr Payload_cb (IntPtr inst, IntPtr buffer)
294                 {
295                         try {
296                                 AudioBaseSink __obj = GLib.Object.GetObject (inst, false) as AudioBaseSink;
297                                 Gst.Buffer __result;
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.
303                                 throw e;
304                         }
305                 }
306
307                 [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioBaseSink), ConnectionMethod="OverridePayload")]
308                 protected virtual Gst.Buffer OnPayload (Gst.Buffer buffer)
309                 {
310                         return InternalPayload (buffer);
311                 }
312
313                 private Gst.Buffer InternalPayload (Gst.Buffer buffer)
314                 {
315                         PayloadNativeDelegate unmanaged = null;
316                         unsafe {
317                                 IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("payload"));
318                                 unmanaged = (PayloadNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(PayloadNativeDelegate));
319                         }
320                         if (unmanaged == null) return null;
321
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);
324                 }
325
326
327                 // Internal representation of the wrapped structure ABI.
328                 static GLib.AbiStruct _class_abi = null;
329                 static public new GLib.AbiStruct class_abi {
330                         get {
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
336                                                         , null
337                                                         , "payload"
338                                                         , (uint) Marshal.SizeOf(typeof(IntPtr))
339                                                         , 0
340                                                         ),
341                                                 new GLib.AbiField("payload"
342                                                         , -1
343                                                         , (uint) Marshal.SizeOf(typeof(IntPtr)) // payload
344                                                         , "create_ringbuffer"
345                                                         , "_gst_reserved"
346                                                         , (uint) Marshal.SizeOf(typeof(IntPtr))
347                                                         , 0
348                                                         ),
349                                                 new GLib.AbiField("_gst_reserved"
350                                                         , -1
351                                                         , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved
352                                                         , "payload"
353                                                         , null
354                                                         , (uint) Marshal.SizeOf(typeof(IntPtr))
355                                                         , 0
356                                                         ),
357                                         });
358
359                                 return _class_abi;
360                         }
361                 }
362
363
364                 // End of the ABI representation.
365
366                 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
367                 static extern IntPtr gst_audio_base_sink_get_type();
368
369                 public static new GLib.GType GType { 
370                         get {
371                                 IntPtr raw_ret = gst_audio_base_sink_get_type();
372                                 GLib.GType ret = new GLib.GType(raw_ret);
373                                 return ret;
374                         }
375                 }
376
377                 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
378                 static extern IntPtr gst_audio_base_sink_create_ringbuffer(IntPtr raw);
379
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;
383                         return ret;
384                 }
385
386                 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
387                 static extern void gst_audio_base_sink_report_device_failure(IntPtr raw);
388
389                 public void ReportDeviceFailure() {
390                         gst_audio_base_sink_report_device_failure(Handle);
391                 }
392
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);
395
396                 public Gst.Audio.AudioBaseSinkCustomSlavingCallback CustomSlavingCallback { 
397                         set {
398                                 Gst.AudioSharp.AudioBaseSinkCustomSlavingCallbackWrapper value_wrapper = new Gst.AudioSharp.AudioBaseSinkCustomSlavingCallbackWrapper (value);
399                                 IntPtr user_data;
400                                 GLib.DestroyNotify notify;
401                                 if (value == null) {
402                                         user_data = IntPtr.Zero;
403                                         notify = null;
404                                 } else {
405                                         user_data = (IntPtr) GCHandle.Alloc (value_wrapper);
406                                         notify = GLib.DestroyHelper.NotifyHandler;
407                                 }
408                                 gst_audio_base_sink_set_custom_slaving_callback(Handle, value_wrapper.NativeDelegate, user_data, notify);
409                         }
410                 }
411
412
413                 static AudioBaseSink ()
414                 {
415                         GtkSharp.GstreamerSharp.ObjectManager.Initialize ();
416                 }
417
418                 // Internal representation of the wrapped structure ABI.
419                 static GLib.AbiStruct _abi_info = null;
420                 static public new GLib.AbiStruct abi_info {
421                         get {
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
427                                                         , null
428                                                         , "buffer_time"
429                                                         , (uint) Marshal.SizeOf(typeof(IntPtr))
430                                                         , 0
431                                                         ),
432                                                 new GLib.AbiField("buffer_time"
433                                                         , -1
434                                                         , (uint) Marshal.SizeOf(typeof(ulong)) // buffer_time
435                                                         , "ringbuffer"
436                                                         , "latency_time"
437                                                         , (long) Marshal.OffsetOf(typeof(GstAudioBaseSink_buffer_timeAlign), "buffer_time")
438                                                         , 0
439                                                         ),
440                                                 new GLib.AbiField("latency_time"
441                                                         , -1
442                                                         , (uint) Marshal.SizeOf(typeof(ulong)) // latency_time
443                                                         , "buffer_time"
444                                                         , "next_sample"
445                                                         , (long) Marshal.OffsetOf(typeof(GstAudioBaseSink_latency_timeAlign), "latency_time")
446                                                         , 0
447                                                         ),
448                                                 new GLib.AbiField("next_sample"
449                                                         , -1
450                                                         , (uint) Marshal.SizeOf(typeof(ulong)) // next_sample
451                                                         , "latency_time"
452                                                         , "provided_clock"
453                                                         , (long) Marshal.OffsetOf(typeof(GstAudioBaseSink_next_sampleAlign), "next_sample")
454                                                         , 0
455                                                         ),
456                                                 new GLib.AbiField("provided_clock"
457                                                         , -1
458                                                         , (uint) Marshal.SizeOf(typeof(IntPtr)) // provided_clock
459                                                         , "next_sample"
460                                                         , "eos_rendering"
461                                                         , (uint) Marshal.SizeOf(typeof(IntPtr))
462                                                         , 0
463                                                         ),
464                                                 new GLib.AbiField("eos_rendering"
465                                                         , -1
466                                                         , (uint) Marshal.SizeOf(typeof(bool)) // eos_rendering
467                                                         , "provided_clock"
468                                                         , "priv"
469                                                         , (long) Marshal.OffsetOf(typeof(GstAudioBaseSink_eos_renderingAlign), "eos_rendering")
470                                                         , 0
471                                                         ),
472                                                 new GLib.AbiField("priv"
473                                                         , -1
474                                                         , (uint) Marshal.SizeOf(typeof(IntPtr)) // priv
475                                                         , "eos_rendering"
476                                                         , "_gst_reserved"
477                                                         , (uint) Marshal.SizeOf(typeof(IntPtr))
478                                                         , 0
479                                                         ),
480                                                 new GLib.AbiField("_gst_reserved"
481                                                         , -1
482                                                         , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved
483                                                         , "priv"
484                                                         , null
485                                                         , (uint) Marshal.SizeOf(typeof(IntPtr))
486                                                         , 0
487                                                         ),
488                                         });
489
490                                 return _abi_info;
491                         }
492                 }
493
494                 [StructLayout(LayoutKind.Sequential)]
495                 public struct GstAudioBaseSink_buffer_timeAlign
496                 {
497                         sbyte f1;
498                         private ulong buffer_time;
499                 }
500
501                 [StructLayout(LayoutKind.Sequential)]
502                 public struct GstAudioBaseSink_latency_timeAlign
503                 {
504                         sbyte f1;
505                         private ulong latency_time;
506                 }
507
508                 [StructLayout(LayoutKind.Sequential)]
509                 public struct GstAudioBaseSink_next_sampleAlign
510                 {
511                         sbyte f1;
512                         private ulong next_sample;
513                 }
514
515                 [StructLayout(LayoutKind.Sequential)]
516                 public struct GstAudioBaseSink_eos_renderingAlign
517                 {
518                         sbyte f1;
519                         private bool eos_rendering;
520                 }
521
522
523                 // End of the ABI representation.
524
525 #endregion
526         }
527 }