summaryrefslogtreecommitdiff
path: root/sources/generated/Gst.Video/VideoTimeCode.cs
blob: 6751bb08aef52ceead1bc40c08d60c85ff74da62 (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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
// 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 VideoTimeCode : IEquatable<VideoTimeCode> {

		public Gst.Video.VideoTimeCodeConfig Config;
		public uint Hours;
		public uint Minutes;
		public uint Seconds;
		public uint Frames;
		public uint FieldCount;

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

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

		[DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern IntPtr gst_video_time_code_new(uint fps_n, uint fps_d, IntPtr latest_daily_jam, int flags, uint hours, uint minutes, uint seconds, uint frames, uint field_count);

		public static VideoTimeCode New(uint fps_n, uint fps_d, GLib.DateTime latest_daily_jam, Gst.Video.VideoTimeCodeFlags flags, uint hours, uint minutes, uint seconds, uint frames, uint field_count)
		{
			VideoTimeCode result = VideoTimeCode.New (gst_video_time_code_new(fps_n, fps_d, latest_daily_jam == null ? IntPtr.Zero : latest_daily_jam.Handle, (int) flags, hours, minutes, seconds, frames, field_count));
			return result;
		}

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

		public static VideoTimeCode NewEmpty()
		{
			VideoTimeCode result = VideoTimeCode.New (gst_video_time_code_new_empty());
			return result;
		}

		[DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern IntPtr gst_video_time_code_new_from_date_time(uint fps_n, uint fps_d, IntPtr dt, int flags, uint field_count);

		public static VideoTimeCode NewFromDateTime(uint fps_n, uint fps_d, GLib.DateTime dt, Gst.Video.VideoTimeCodeFlags flags, uint field_count)
		{
			VideoTimeCode result = VideoTimeCode.New (gst_video_time_code_new_from_date_time(fps_n, fps_d, dt == null ? IntPtr.Zero : dt.Handle, (int) flags, field_count));
			return result;
		}

		[DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern IntPtr gst_video_time_code_new_from_date_time_full(uint fps_n, uint fps_d, IntPtr dt, int flags, uint field_count);

		public static VideoTimeCode NewFromDateTimeFull(uint fps_n, uint fps_d, GLib.DateTime dt, Gst.Video.VideoTimeCodeFlags flags, uint field_count)
		{
			VideoTimeCode result = VideoTimeCode.New (gst_video_time_code_new_from_date_time_full(fps_n, fps_d, dt == null ? IntPtr.Zero : dt.Handle, (int) flags, field_count));
			return result;
		}

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

		public static VideoTimeCode NewFromString(string tc_str)
		{
			IntPtr native_tc_str = GLib.Marshaller.StringToPtrGStrdup (tc_str);
			VideoTimeCode result = VideoTimeCode.New (gst_video_time_code_new_from_string(native_tc_str));
			GLib.Marshaller.Free (native_tc_str);
			return result;
		}

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

		public static GLib.GType GType { 
			get {
				IntPtr raw_ret = gst_video_time_code_get_type();
				GLib.GType ret = new GLib.GType(raw_ret);
				return ret;
			}
		}

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

		public void AddFrames(long frames) {
			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_time_code_add_frames(this_as_native, frames);
			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 IntPtr gst_video_time_code_add_interval(IntPtr raw, IntPtr tc_inter);

		public Gst.Video.VideoTimeCode AddInterval(Gst.Video.VideoTimeCodeInterval tc_inter) {
			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_tc_inter = GLib.Marshaller.StructureToPtrAlloc (tc_inter);
			IntPtr raw_ret = gst_video_time_code_add_interval(this_as_native, native_tc_inter);
			Gst.Video.VideoTimeCode ret = Gst.Video.VideoTimeCode.New (raw_ret);
			ReadNative (this_as_native, ref this);
			System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
			Marshal.FreeHGlobal (native_tc_inter);
			return ret;
		}

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

		public void Clear() {
			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_time_code_clear(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 int gst_video_time_code_compare(IntPtr raw, IntPtr tc2);

		public int Compare(Gst.Video.VideoTimeCode tc2) {
			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_tc2 = GLib.Marshaller.StructureToPtrAlloc (tc2);
			int raw_ret = gst_video_time_code_compare(this_as_native, native_tc2);
			int ret = raw_ret;
			ReadNative (this_as_native, ref this);
			System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
			Marshal.FreeHGlobal (native_tc2);
			return ret;
		}

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

		public ulong FramesSinceDailyJam() {
			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);
			ulong raw_ret = gst_video_time_code_frames_since_daily_jam(this_as_native);
			ulong 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_time_code_increment_frame(IntPtr raw);

		public void IncrementFrame() {
			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_time_code_increment_frame(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 void gst_video_time_code_init(IntPtr raw, uint fps_n, uint fps_d, IntPtr latest_daily_jam, int flags, uint hours, uint minutes, uint seconds, uint frames, uint field_count);

		public void Init(uint fps_n, uint fps_d, GLib.DateTime latest_daily_jam, Gst.Video.VideoTimeCodeFlags flags, uint hours, uint minutes, uint seconds, uint frames, uint field_count) {
			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_time_code_init(this_as_native, fps_n, fps_d, latest_daily_jam == null ? IntPtr.Zero : latest_daily_jam.Handle, (int) flags, hours, minutes, seconds, frames, field_count);
			ReadNative (this_as_native, ref this);
			System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
		}

		public void Init(uint fps_n, uint fps_d, Gst.Video.VideoTimeCodeFlags flags, uint hours, uint minutes, uint seconds, uint frames, uint field_count) {
			Init (fps_n, fps_d, null, flags, hours, minutes, seconds, frames, field_count);
		}

		[DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern void gst_video_time_code_init_from_date_time(IntPtr raw, uint fps_n, uint fps_d, IntPtr dt, int flags, uint field_count);

		public void InitFromDateTime(uint fps_n, uint fps_d, GLib.DateTime dt, Gst.Video.VideoTimeCodeFlags flags, uint field_count) {
			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_time_code_init_from_date_time(this_as_native, fps_n, fps_d, dt == null ? IntPtr.Zero : dt.Handle, (int) flags, field_count);
			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_time_code_init_from_date_time_full(IntPtr raw, uint fps_n, uint fps_d, IntPtr dt, int flags, uint field_count);

		public bool InitFromDateTimeFull(uint fps_n, uint fps_d, GLib.DateTime dt, Gst.Video.VideoTimeCodeFlags flags, uint field_count) {
			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_time_code_init_from_date_time_full(this_as_native, fps_n, fps_d, dt == null ? IntPtr.Zero : dt.Handle, (int) flags, field_count);
			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_time_code_is_valid(IntPtr raw);

		public bool IsValid { 
			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_video_time_code_is_valid(this_as_native);
				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 ulong gst_video_time_code_nsec_since_daily_jam(IntPtr raw);

		public ulong NsecSinceDailyJam() {
			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);
			ulong raw_ret = gst_video_time_code_nsec_since_daily_jam(this_as_native);
			ulong 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 IntPtr gst_video_time_code_to_date_time(IntPtr raw);

		public GLib.DateTime ToDateTime() {
			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_time_code_to_date_time(this_as_native);
			GLib.DateTime ret = new GLib.DateTime(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 IntPtr gst_video_time_code_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_time_code_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;
		}

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

		public bool Equals (VideoTimeCode other)
		{
			return true && Config.Equals (other.Config) && Hours.Equals (other.Hours) && Minutes.Equals (other.Minutes) && Seconds.Equals (other.Seconds) && Frames.Equals (other.Frames) && FieldCount.Equals (other.FieldCount);
		}

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

		public override int GetHashCode ()
		{
			return this.GetType ().FullName.GetHashCode () ^ Config.GetHashCode () ^ Hours.GetHashCode () ^ Minutes.GetHashCode () ^ Seconds.GetHashCode () ^ Frames.GetHashCode () ^ FieldCount.GetHashCode ();
		}

		public static explicit operator GLib.Value (Gst.Video.VideoTimeCode boxed)
		{
			GLib.Value val = GLib.Value.Empty;
			val.Init (Gst.Video.VideoTimeCode.GType);
			val.Val = boxed;
			return val;
		}

		public static explicit operator Gst.Video.VideoTimeCode (GLib.Value val)
		{
			return (Gst.Video.VideoTimeCode) val.Val;
		}
#endregion
	}
}