summaryrefslogtreecommitdiff
path: root/ges/generated/GES/Pipeline.cs
blob: 64cea89e90d26a3a8eb9f957230c8acac338d6b8 (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
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.

namespace GES {

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

#region Autogenerated code
	public partial class Pipeline : Gst.Pipeline, Gst.Video.IVideoOverlay {

		public Pipeline (IntPtr raw) : base(raw) {}

		[DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)]
		static extern IntPtr ges_pipeline_new();

		public Pipeline () : base (IntPtr.Zero)
		{
			if (GetType () != typeof (Pipeline)) {
				CreateNativeObject (new string [0], new GLib.Value[0]);
				return;
			}
			Raw = ges_pipeline_new();
		}

		[GLib.Property ("audio-filter")]
		public Gst.Element AudioFilter {
			get {
				GLib.Value val = GetProperty ("audio-filter");
				Gst.Element ret = (Gst.Element) val;
				val.Dispose ();
				return ret;
			}
			set {
				GLib.Value val = new GLib.Value(value);
				SetProperty("audio-filter", val);
				val.Dispose ();
			}
		}

		[GLib.Property ("audio-sink")]
		public Gst.Element AudioSink {
			get {
				GLib.Value val = GetProperty ("audio-sink");
				Gst.Element ret = (Gst.Element) val;
				val.Dispose ();
				return ret;
			}
			set {
				GLib.Value val = new GLib.Value(value);
				SetProperty("audio-sink", val);
				val.Dispose ();
			}
		}

		[DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)]
		static extern int ges_pipeline_get_mode(IntPtr raw);

		[GLib.Property ("mode")]
		public GES.PipelineFlags Mode {
			get  {
				int raw_ret = ges_pipeline_get_mode(Handle);
				GES.PipelineFlags ret = (GES.PipelineFlags) raw_ret;
				return ret;
			}
			set {
				GLib.Value val = new GLib.Value((Enum) value);
				SetProperty("mode", val);
				val.Dispose ();
			}
		}

		[GLib.Property ("timeline")]
		public GES.Timeline Timeline {
			get {
				GLib.Value val = GetProperty ("timeline");
				GES.Timeline ret = (GES.Timeline) val;
				val.Dispose ();
				return ret;
			}
			set {
				GLib.Value val = new GLib.Value(value);
				SetProperty("timeline", val);
				val.Dispose ();
			}
		}

		[GLib.Property ("video-filter")]
		public Gst.Element VideoFilter {
			get {
				GLib.Value val = GetProperty ("video-filter");
				Gst.Element ret = (Gst.Element) val;
				val.Dispose ();
				return ret;
			}
			set {
				GLib.Value val = new GLib.Value(value);
				SetProperty("video-filter", val);
				val.Dispose ();
			}
		}

		[GLib.Property ("video-sink")]
		public Gst.Element VideoSink {
			get {
				GLib.Value val = GetProperty ("video-sink");
				Gst.Element ret = (Gst.Element) val;
				val.Dispose ();
				return ret;
			}
			set {
				GLib.Value val = new GLib.Value(value);
				SetProperty("video-sink", val);
				val.Dispose ();
			}
		}


		// Internal representation of the wrapped structure ABI.
		static GLib.AbiStruct _class_abi = null;
		static public new GLib.AbiStruct class_abi {
			get {
				if (_class_abi == null)
					_class_abi = new GLib.AbiStruct (new List<GLib.AbiField>{ 
						new GLib.AbiField("_ges_reserved"
							, Gst.Pipeline.class_abi.Fields
							, (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _ges_reserved
							, null
							, null
							, (uint) Marshal.SizeOf(typeof(IntPtr))
							, 0
							),
					});

				return _class_abi;
			}
		}


		// End of the ABI representation.

		[DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)]
		static extern IntPtr ges_pipeline_get_type();

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

		[DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)]
		static extern IntPtr ges_pipeline_get_thumbnail(IntPtr raw, IntPtr caps);

		public Gst.Sample GetThumbnail(Gst.Caps caps) {
			IntPtr raw_ret = ges_pipeline_get_thumbnail(Handle, caps == null ? IntPtr.Zero : caps.Handle);
			Gst.Sample ret = raw_ret == IntPtr.Zero ? null : (Gst.Sample) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Sample), true);
			return ret;
		}

		[DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)]
		static extern IntPtr ges_pipeline_get_thumbnail_rgb24(IntPtr raw, int width, int height);

		public Gst.Sample GetThumbnailRgb24(int width, int height) {
			IntPtr raw_ret = ges_pipeline_get_thumbnail_rgb24(Handle, width, height);
			Gst.Sample ret = raw_ret == IntPtr.Zero ? null : (Gst.Sample) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Sample), true);
			return ret;
		}

		[DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)]
		static extern IntPtr ges_pipeline_preview_get_audio_sink(IntPtr raw);

		public Gst.Element PreviewGetAudioSink() {
			IntPtr raw_ret = ges_pipeline_preview_get_audio_sink(Handle);
			Gst.Element ret = GLib.Object.GetObject(raw_ret, true) as Gst.Element;
			return ret;
		}

		[DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)]
		static extern IntPtr ges_pipeline_preview_get_video_sink(IntPtr raw);

		public Gst.Element PreviewGetVideoSink() {
			IntPtr raw_ret = ges_pipeline_preview_get_video_sink(Handle);
			Gst.Element ret = GLib.Object.GetObject(raw_ret, true) as Gst.Element;
			return ret;
		}

		[DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)]
		static extern void ges_pipeline_preview_set_audio_sink(IntPtr raw, IntPtr sink);

		public void PreviewSetAudioSink(Gst.Element sink) {
			ges_pipeline_preview_set_audio_sink(Handle, sink == null ? IntPtr.Zero : sink.Handle);
		}

		[DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)]
		static extern void ges_pipeline_preview_set_video_sink(IntPtr raw, IntPtr sink);

		public void PreviewSetVideoSink(Gst.Element sink) {
			ges_pipeline_preview_set_video_sink(Handle, sink == null ? IntPtr.Zero : sink.Handle);
		}

		[DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)]
		static extern unsafe bool ges_pipeline_save_thumbnail(IntPtr raw, int width, int height, IntPtr format, IntPtr location, out IntPtr error);

		public unsafe bool SaveThumbnail(int width, int height, string format, string location) {
			IntPtr native_format = GLib.Marshaller.StringToPtrGStrdup (format);
			IntPtr native_location = GLib.Marshaller.StringToPtrGStrdup (location);
			IntPtr error = IntPtr.Zero;
			bool raw_ret = ges_pipeline_save_thumbnail(Handle, width, height, native_format, native_location, out error);
			bool ret = raw_ret;
			GLib.Marshaller.Free (native_format);
			GLib.Marshaller.Free (native_location);
			if (error != IntPtr.Zero) throw new GLib.GException (error);
			return ret;
		}

		[DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)]
		static extern bool ges_pipeline_set_mode(IntPtr raw, int mode);

		public bool SetMode(GES.PipelineFlags mode) {
			bool raw_ret = ges_pipeline_set_mode(Handle, (int) mode);
			bool ret = raw_ret;
			return ret;
		}

		[DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)]
		static extern bool ges_pipeline_set_render_settings(IntPtr raw, IntPtr output_uri, IntPtr profile);

		public bool SetRenderSettings(string output_uri, Gst.PbUtils.EncodingProfile profile) {
			IntPtr native_output_uri = GLib.Marshaller.StringToPtrGStrdup (output_uri);
			bool raw_ret = ges_pipeline_set_render_settings(Handle, native_output_uri, profile == null ? IntPtr.Zero : profile.Handle);
			bool ret = raw_ret;
			GLib.Marshaller.Free (native_output_uri);
			return ret;
		}

		[DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)]
		static extern bool ges_pipeline_set_timeline(IntPtr raw, IntPtr timeline);

		public bool SetTimeline(GES.Timeline timeline) {
			bool raw_ret = ges_pipeline_set_timeline(Handle, timeline == null ? IntPtr.Zero : timeline.OwnedHandle);
			bool ret = raw_ret;
			return ret;
		}

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

		public void Expose() {
			gst_video_overlay_expose(Handle);
		}

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

		public void GotWindowHandle(IntPtr handle) {
			gst_video_overlay_got_window_handle(Handle, handle);
		}

		[DllImport("libgstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern void gst_video_overlay_handle_events(IntPtr raw, bool handle_events);

		public void HandleEvents(bool handle_events) {
			gst_video_overlay_handle_events(Handle, handle_events);
		}

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

		public void PrepareWindowHandle() {
			gst_video_overlay_prepare_window_handle(Handle);
		}

		[DllImport("libgstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern bool gst_video_overlay_set_render_rectangle(IntPtr raw, int x, int y, int width, int height);

		public bool SetRenderRectangle(int x, int y, int width, int height) {
			bool raw_ret = gst_video_overlay_set_render_rectangle(Handle, x, y, width, height);
			bool ret = raw_ret;
			return ret;
		}

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

		public IntPtr WindowHandle { 
			set {
				gst_video_overlay_set_window_handle(Handle, value);
			}
		}


		static Pipeline ()
		{
			GtkSharp.GstEditingServices.ObjectManager.Initialize ();
		}

		// Internal representation of the wrapped structure ABI.
		static GLib.AbiStruct _abi_info = null;
		static public new GLib.AbiStruct abi_info {
			get {
				if (_abi_info == null)
					_abi_info = new GLib.AbiStruct (new List<GLib.AbiField>{ 
						new GLib.AbiField("priv"
							, Gst.Pipeline.abi_info.Fields
							, (uint) Marshal.SizeOf(typeof(IntPtr)) // priv
							, null
							, "_ges_reserved"
							, (uint) Marshal.SizeOf(typeof(IntPtr))
							, 0
							),
						new GLib.AbiField("_ges_reserved"
							, -1
							, (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _ges_reserved
							, "priv"
							, null
							, (uint) Marshal.SizeOf(typeof(IntPtr))
							, 0
							),
					});

				return _abi_info;
			}
		}


		// End of the ABI representation.

#endregion
	}
}