summaryrefslogtreecommitdiff
path: root/sources/generated/Gst/MetaInfo.cs
blob: b55e79ac153f7f7ebb593ce841f85485bd3c4c0d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.

namespace Gst {

	using System;
	using System.Collections;
	using System.Collections.Generic;
	using System.Runtime.InteropServices;

#region Autogenerated code
	[StructLayout(LayoutKind.Sequential)]
	public partial struct MetaInfo : IEquatable<MetaInfo> {

		public GLib.GType Api;
		public GLib.GType Type;
		private UIntPtr size;
		public ulong Size {
			get {
				return (ulong) size;
			}
			set {
				size = new UIntPtr (value);
			}
		}
		private GstSharp.MetaInitFunctionNative _init_func;
		public Gst.MetaInitFunction InitFunc {
			get {
				return GstSharp.MetaInitFunctionWrapper.GetManagedDelegate (_init_func);
			}
		}
		private GstSharp.MetaFreeFunctionNative _free_func;
		public Gst.MetaFreeFunction FreeFunc {
			get {
				return GstSharp.MetaFreeFunctionWrapper.GetManagedDelegate (_free_func);
			}
		}
		private GstSharp.MetaTransformFunctionNative _transform_func;
		public Gst.MetaTransformFunction TransformFunc {
			get {
				return GstSharp.MetaTransformFunctionWrapper.GetManagedDelegate (_transform_func);
			}
		}

		public static Gst.MetaInfo Zero = new Gst.MetaInfo ();

		public static Gst.MetaInfo New(IntPtr raw) {
			if (raw == IntPtr.Zero)
				return Gst.MetaInfo.Zero;
			return (Gst.MetaInfo) Marshal.PtrToStructure (raw, typeof (Gst.MetaInfo));
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern bool gst_meta_info_is_custom(IntPtr raw);

		public bool IsCustom { 
			get {
				IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
				System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
				bool raw_ret = gst_meta_info_is_custom(this_as_native);
				bool ret = raw_ret;
				ReadNative (this_as_native, ref this);
				System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
				return ret;
			}
		}

		static void ReadNative (IntPtr native, ref Gst.MetaInfo target)
		{
			target = New (native);
		}

		public bool Equals (MetaInfo other)
		{
			return true && Api.Equals (other.Api) && Type.Equals (other.Type) && Size.Equals (other.Size) && InitFunc.Equals (other.InitFunc) && FreeFunc.Equals (other.FreeFunc) && TransformFunc.Equals (other.TransformFunc);
		}

		public override bool Equals (object other)
		{
			return other is MetaInfo && Equals ((MetaInfo) other);
		}

		public override int GetHashCode ()
		{
			return this.GetType ().FullName.GetHashCode () ^ Api.GetHashCode () ^ Type.GetHashCode () ^ Size.GetHashCode () ^ InitFunc.GetHashCode () ^ FreeFunc.GetHashCode () ^ TransformFunc.GetHashCode ();
		}

		private static GLib.GType GType {
			get { return GLib.GType.Pointer; }
		}
#endregion
	}
}