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 DeviceProvider : Gst.Object {
14 protected DeviceProvider (IntPtr raw) : base(raw) {}
16 protected DeviceProvider() : base(IntPtr.Zero)
18 CreateNativeObject (new string [0], new GLib.Value [0]);
21 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
22 static extern IntPtr gst_device_provider_get_devices(IntPtr raw);
24 public Gst.Device[] Devices {
26 IntPtr raw_ret = gst_device_provider_get_devices(Handle);
27 Gst.Device[] ret = (Gst.Device[]) GLib.Marshaller.ListPtrToArray (raw_ret, typeof(GLib.List), true, true, typeof(Gst.Device));
32 [GLib.Signal("provider-unhidden")]
33 public event Gst.ProviderUnhiddenHandler ProviderUnhidden {
35 this.AddSignalHandler ("provider-unhidden", value, typeof (Gst.ProviderUnhiddenArgs));
38 this.RemoveSignalHandler ("provider-unhidden", value);
42 [GLib.Signal("provider-hidden")]
43 public event Gst.ProviderHiddenHandler ProviderHidden {
45 this.AddSignalHandler ("provider-hidden", value, typeof (Gst.ProviderHiddenArgs));
48 this.RemoveSignalHandler ("provider-hidden", value);
52 static ProviderHiddenNativeDelegate ProviderHidden_cb_delegate;
53 static ProviderHiddenNativeDelegate ProviderHiddenVMCallback {
55 if (ProviderHidden_cb_delegate == null)
56 ProviderHidden_cb_delegate = new ProviderHiddenNativeDelegate (ProviderHidden_cb);
57 return ProviderHidden_cb_delegate;
61 static void OverrideProviderHidden (GLib.GType gtype)
63 OverrideProviderHidden (gtype, ProviderHiddenVMCallback);
66 static void OverrideProviderHidden (GLib.GType gtype, ProviderHiddenNativeDelegate callback)
68 OverrideVirtualMethod (gtype, "provider-hidden", callback);
70 [UnmanagedFunctionPointer (CallingConvention.Cdecl)]
71 delegate void ProviderHiddenNativeDelegate (IntPtr inst, IntPtr _object);
73 static void ProviderHidden_cb (IntPtr inst, IntPtr _object)
76 DeviceProvider __obj = GLib.Object.GetObject (inst, false) as DeviceProvider;
77 __obj.OnProviderHidden (GLib.Marshaller.Utf8PtrToString (_object));
78 } catch (Exception e) {
79 GLib.ExceptionManager.RaiseUnhandledException (e, false);
83 [GLib.DefaultSignalHandler(Type=typeof(Gst.DeviceProvider), ConnectionMethod="OverrideProviderHidden")]
84 protected virtual void OnProviderHidden (string _object)
86 InternalProviderHidden (_object);
89 private void InternalProviderHidden (string _object)
91 GLib.Value ret = GLib.Value.Empty;
92 GLib.ValueArray inst_and_params = new GLib.ValueArray (2);
93 GLib.Value[] vals = new GLib.Value [2];
94 vals [0] = new GLib.Value (this);
95 inst_and_params.Append (vals [0]);
96 vals [1] = new GLib.Value (_object);
97 inst_and_params.Append (vals [1]);
98 g_signal_chain_from_overridden (inst_and_params.ArrayPtr, ref ret);
99 foreach (GLib.Value v in vals)
103 static ProviderUnhiddenNativeDelegate ProviderUnhidden_cb_delegate;
104 static ProviderUnhiddenNativeDelegate ProviderUnhiddenVMCallback {
106 if (ProviderUnhidden_cb_delegate == null)
107 ProviderUnhidden_cb_delegate = new ProviderUnhiddenNativeDelegate (ProviderUnhidden_cb);
108 return ProviderUnhidden_cb_delegate;
112 static void OverrideProviderUnhidden (GLib.GType gtype)
114 OverrideProviderUnhidden (gtype, ProviderUnhiddenVMCallback);
117 static void OverrideProviderUnhidden (GLib.GType gtype, ProviderUnhiddenNativeDelegate callback)
119 OverrideVirtualMethod (gtype, "provider-unhidden", callback);
121 [UnmanagedFunctionPointer (CallingConvention.Cdecl)]
122 delegate void ProviderUnhiddenNativeDelegate (IntPtr inst, IntPtr _object);
124 static void ProviderUnhidden_cb (IntPtr inst, IntPtr _object)
127 DeviceProvider __obj = GLib.Object.GetObject (inst, false) as DeviceProvider;
128 __obj.OnProviderUnhidden (GLib.Marshaller.Utf8PtrToString (_object));
129 } catch (Exception e) {
130 GLib.ExceptionManager.RaiseUnhandledException (e, false);
134 [GLib.DefaultSignalHandler(Type=typeof(Gst.DeviceProvider), ConnectionMethod="OverrideProviderUnhidden")]
135 protected virtual void OnProviderUnhidden (string _object)
137 InternalProviderUnhidden (_object);
140 private void InternalProviderUnhidden (string _object)
142 GLib.Value ret = GLib.Value.Empty;
143 GLib.ValueArray inst_and_params = new GLib.ValueArray (2);
144 GLib.Value[] vals = new GLib.Value [2];
145 vals [0] = new GLib.Value (this);
146 inst_and_params.Append (vals [0]);
147 vals [1] = new GLib.Value (_object);
148 inst_and_params.Append (vals [1]);
149 g_signal_chain_from_overridden (inst_and_params.ArrayPtr, ref ret);
150 foreach (GLib.Value v in vals)
154 static StartNativeDelegate Start_cb_delegate;
155 static StartNativeDelegate StartVMCallback {
157 if (Start_cb_delegate == null)
158 Start_cb_delegate = new StartNativeDelegate (Start_cb);
159 return Start_cb_delegate;
163 static void OverrideStart (GLib.GType gtype)
165 OverrideStart (gtype, StartVMCallback);
168 static void OverrideStart (GLib.GType gtype, StartNativeDelegate callback)
171 IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("start"));
172 *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
176 [UnmanagedFunctionPointer (CallingConvention.Cdecl)]
177 delegate bool StartNativeDelegate (IntPtr inst);
179 static bool Start_cb (IntPtr inst)
182 DeviceProvider __obj = GLib.Object.GetObject (inst, false) as DeviceProvider;
184 __result = __obj.OnStart ();
186 } catch (Exception e) {
187 GLib.ExceptionManager.RaiseUnhandledException (e, true);
188 // NOTREACHED: above call does not return.
193 [GLib.DefaultSignalHandler(Type=typeof(Gst.DeviceProvider), ConnectionMethod="OverrideStart")]
194 protected virtual bool OnStart ()
196 return InternalStart ();
199 private bool InternalStart ()
201 StartNativeDelegate unmanaged = null;
203 IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("start"));
204 unmanaged = (StartNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(StartNativeDelegate));
206 if (unmanaged == null) return false;
208 bool __result = unmanaged (this.Handle);
212 static StopNativeDelegate Stop_cb_delegate;
213 static StopNativeDelegate StopVMCallback {
215 if (Stop_cb_delegate == null)
216 Stop_cb_delegate = new StopNativeDelegate (Stop_cb);
217 return Stop_cb_delegate;
221 static void OverrideStop (GLib.GType gtype)
223 OverrideStop (gtype, StopVMCallback);
226 static void OverrideStop (GLib.GType gtype, StopNativeDelegate callback)
229 IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("stop"));
230 *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
234 [UnmanagedFunctionPointer (CallingConvention.Cdecl)]
235 delegate void StopNativeDelegate (IntPtr inst);
237 static void Stop_cb (IntPtr inst)
240 DeviceProvider __obj = GLib.Object.GetObject (inst, false) as DeviceProvider;
242 } catch (Exception e) {
243 GLib.ExceptionManager.RaiseUnhandledException (e, false);
247 [GLib.DefaultSignalHandler(Type=typeof(Gst.DeviceProvider), ConnectionMethod="OverrideStop")]
248 protected virtual void OnStop ()
253 private void InternalStop ()
255 StopNativeDelegate unmanaged = null;
257 IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("stop"));
258 unmanaged = (StopNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(StopNativeDelegate));
260 if (unmanaged == null) return;
262 unmanaged (this.Handle);
266 // Internal representation of the wrapped structure ABI.
267 static GLib.AbiStruct _class_abi = null;
268 static public new GLib.AbiStruct class_abi {
270 if (_class_abi == null)
271 _class_abi = new GLib.AbiStruct (new List<GLib.AbiField>{
272 new GLib.AbiField("factory"
273 , Gst.Object.class_abi.Fields
274 , (uint) Marshal.SizeOf(typeof(IntPtr)) // factory
277 , (uint) Marshal.SizeOf(typeof(IntPtr))
280 new GLib.AbiField("probe"
282 , (uint) Marshal.SizeOf(typeof(IntPtr)) // probe
285 , (uint) Marshal.SizeOf(typeof(IntPtr))
288 new GLib.AbiField("start"
290 , (uint) Marshal.SizeOf(typeof(IntPtr)) // start
293 , (uint) Marshal.SizeOf(typeof(IntPtr))
296 new GLib.AbiField("stop"
298 , (uint) Marshal.SizeOf(typeof(IntPtr)) // stop
301 , (uint) Marshal.SizeOf(typeof(IntPtr))
304 new GLib.AbiField("metadata"
306 , (uint) Marshal.SizeOf(typeof(IntPtr)) // metadata
309 , (uint) Marshal.SizeOf(typeof(IntPtr))
312 new GLib.AbiField("_gst_reserved"
314 , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved
317 , (uint) Marshal.SizeOf(typeof(IntPtr))
327 // End of the ABI representation.
329 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
330 static extern IntPtr gst_device_provider_get_type();
332 public static new GLib.GType GType {
334 IntPtr raw_ret = gst_device_provider_get_type();
335 GLib.GType ret = new GLib.GType(raw_ret);
340 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
341 static extern bool gst_device_provider_register(IntPtr plugin, IntPtr name, uint rank, IntPtr type);
343 public static bool Register(Gst.Plugin plugin, string name, uint rank, GLib.GType type) {
344 IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name);
345 bool raw_ret = gst_device_provider_register(plugin == null ? IntPtr.Zero : plugin.Handle, native_name, rank, type.Val);
347 GLib.Marshaller.Free (native_name);
351 public static bool Register(string name, uint rank, GLib.GType type) {
352 return Register (null, name, rank, type);
355 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
356 static extern bool gst_device_provider_can_monitor(IntPtr raw);
358 public bool CanMonitor() {
359 bool raw_ret = gst_device_provider_can_monitor(Handle);
364 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
365 static extern void gst_device_provider_device_add(IntPtr raw, IntPtr device);
367 public void DeviceAdd(Gst.Device device) {
368 gst_device_provider_device_add(Handle, device == null ? IntPtr.Zero : device.Handle);
371 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
372 static extern void gst_device_provider_device_changed(IntPtr raw, IntPtr device, IntPtr changed_device);
374 public void DeviceChanged(Gst.Device device, Gst.Device changed_device) {
375 gst_device_provider_device_changed(Handle, device == null ? IntPtr.Zero : device.Handle, changed_device == null ? IntPtr.Zero : changed_device.Handle);
378 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
379 static extern void gst_device_provider_device_remove(IntPtr raw, IntPtr device);
381 public void DeviceRemove(Gst.Device device) {
382 gst_device_provider_device_remove(Handle, device == null ? IntPtr.Zero : device.Handle);
385 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
386 static extern IntPtr gst_device_provider_get_bus(IntPtr raw);
390 IntPtr raw_ret = gst_device_provider_get_bus(Handle);
391 Gst.Bus ret = GLib.Object.GetObject(raw_ret, true) as Gst.Bus;
396 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
397 static extern IntPtr gst_device_provider_get_factory(IntPtr raw);
399 public Gst.DeviceProviderFactory Factory {
401 IntPtr raw_ret = gst_device_provider_get_factory(Handle);
402 Gst.DeviceProviderFactory ret = GLib.Object.GetObject(raw_ret) as Gst.DeviceProviderFactory;
407 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
408 static extern IntPtr gst_device_provider_get_hidden_providers(IntPtr raw);
410 public string[] HiddenProviders {
412 IntPtr raw_ret = gst_device_provider_get_hidden_providers(Handle);
413 string[] ret = GLib.Marshaller.NullTermPtrToStringArray (raw_ret, true);
418 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
419 static extern IntPtr gst_device_provider_get_metadata(IntPtr raw, IntPtr key);
421 public string GetMetadata(string key) {
422 IntPtr native_key = GLib.Marshaller.StringToPtrGStrdup (key);
423 IntPtr raw_ret = gst_device_provider_get_metadata(Handle, native_key);
424 string ret = GLib.Marshaller.Utf8PtrToString (raw_ret);
425 GLib.Marshaller.Free (native_key);
429 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
430 static extern void gst_device_provider_hide_provider(IntPtr raw, IntPtr name);
432 public void HideProvider(string name) {
433 IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name);
434 gst_device_provider_hide_provider(Handle, native_name);
435 GLib.Marshaller.Free (native_name);
438 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
439 static extern bool gst_device_provider_is_started(IntPtr raw);
441 public bool IsStarted {
443 bool raw_ret = gst_device_provider_is_started(Handle);
449 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
450 static extern bool gst_device_provider_start(IntPtr raw);
452 public bool Start() {
453 bool raw_ret = gst_device_provider_start(Handle);
458 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
459 static extern void gst_device_provider_stop(IntPtr raw);
462 gst_device_provider_stop(Handle);
465 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
466 static extern void gst_device_provider_unhide_provider(IntPtr raw, IntPtr name);
468 public void UnhideProvider(string name) {
469 IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name);
470 gst_device_provider_unhide_provider(Handle, native_name);
471 GLib.Marshaller.Free (native_name);
475 // Internal representation of the wrapped structure ABI.
476 static GLib.AbiStruct _abi_info = null;
477 static public new GLib.AbiStruct abi_info {
479 if (_abi_info == null)
480 _abi_info = new GLib.AbiStruct (new List<GLib.AbiField>{
481 new GLib.AbiField("devices"
482 , Gst.Object.abi_info.Fields
483 , (uint) Marshal.SizeOf(typeof(IntPtr)) // devices
486 , (uint) Marshal.SizeOf(typeof(IntPtr))
489 new GLib.AbiField("priv"
491 , (uint) Marshal.SizeOf(typeof(IntPtr)) // priv
494 , (uint) Marshal.SizeOf(typeof(IntPtr))
497 new GLib.AbiField("_gst_reserved"
499 , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved
502 , (uint) Marshal.SizeOf(typeof(IntPtr))
512 // End of the ABI representation.