summaryrefslogtreecommitdiff
path: root/sources/generated/Gst.Video/VideoMasteringDisplayInfo.cs
blob: 3349fe873cd27d761edf5e10b0cd3fb54a1c587f (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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.

namespace Gst.Video {

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

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

		[MarshalAs (UnmanagedType.ByValArray, SizeConst=3)]
		public Gst.Video.VideoMasteringDisplayInfoCoordinates[] DisplayPrimaries;
		public Gst.Video.VideoMasteringDisplayInfoCoordinates WhitePoint;
		public uint MaxDisplayMasteringLuminance;
		public uint MinDisplayMasteringLuminance;
		[MarshalAs (UnmanagedType.ByValArray, SizeConst=4)]
		private IntPtr[] _gstGstReserved;

		public static Gst.Video.VideoMasteringDisplayInfo Zero = new Gst.Video.VideoMasteringDisplayInfo ();

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

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

		public bool AddToCaps(Gst.Caps caps) {
			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_video_mastering_display_info_add_to_caps(this_as_native, caps == null ? IntPtr.Zero : caps.Handle);
			bool ret = raw_ret;
			ReadNative (this_as_native, ref this);
			System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
			return ret;
		}

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

		public bool FromCaps(Gst.Caps caps) {
			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_video_mastering_display_info_from_caps(this_as_native, caps == null ? IntPtr.Zero : caps.Handle);
			bool ret = raw_ret;
			ReadNative (this_as_native, ref this);
			System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
			return ret;
		}

		[DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern void gst_video_mastering_display_info_init(IntPtr raw);

		public void Init() {
			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);
			gst_video_mastering_display_info_init(this_as_native);
			ReadNative (this_as_native, ref this);
			System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
		}

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

		public bool IsEqual(Gst.Video.VideoMasteringDisplayInfo other) {
			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);
			IntPtr native_other = GLib.Marshaller.StructureToPtrAlloc (other);
			bool raw_ret = gst_video_mastering_display_info_is_equal(this_as_native, native_other);
			bool ret = raw_ret;
			ReadNative (this_as_native, ref this);
			System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
			Marshal.FreeHGlobal (native_other);
			return ret;
		}

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

		public override string ToString() {
			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);
			IntPtr raw_ret = gst_video_mastering_display_info_to_string(this_as_native);
			string ret = GLib.Marshaller.PtrToStringGFree(raw_ret);
			ReadNative (this_as_native, ref this);
			System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
			return ret;
		}

		[DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern bool gst_video_mastering_display_info_from_string(IntPtr minfo, IntPtr mastering);

		public static bool FromString(out Gst.Video.VideoMasteringDisplayInfo minfo, string mastering) {
			IntPtr native_minfo = Marshal.AllocHGlobal (Marshal.SizeOf (typeof (Gst.Video.VideoMasteringDisplayInfo)));
			IntPtr native_mastering = GLib.Marshaller.StringToPtrGStrdup (mastering);
			bool raw_ret = gst_video_mastering_display_info_from_string(native_minfo, native_mastering);
			bool ret = raw_ret;
			minfo = Gst.Video.VideoMasteringDisplayInfo.New (native_minfo);
			Marshal.FreeHGlobal (native_minfo);
			GLib.Marshaller.Free (native_mastering);
			return ret;
		}

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

		public bool Equals (VideoMasteringDisplayInfo other)
		{
			return true && DisplayPrimaries.Equals (other.DisplayPrimaries) && WhitePoint.Equals (other.WhitePoint) && MaxDisplayMasteringLuminance.Equals (other.MaxDisplayMasteringLuminance) && MinDisplayMasteringLuminance.Equals (other.MinDisplayMasteringLuminance);
		}

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

		public override int GetHashCode ()
		{
			return this.GetType ().FullName.GetHashCode () ^ DisplayPrimaries.GetHashCode () ^ WhitePoint.GetHashCode () ^ MaxDisplayMasteringLuminance.GetHashCode () ^ MinDisplayMasteringLuminance.GetHashCode ();
		}

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