summaryrefslogtreecommitdiff
path: root/sources/generated/Gst/Plugin.cs
blob: 2488590d17ce9bebce6ce6932efbf5fab7d27e2f (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
// 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
	public partial class Plugin : Gst.Object {

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

		protected Plugin() : base(IntPtr.Zero)
		{
			CreateNativeObject (new string [0], new GLib.Value [0]);
		}


		// 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 (Gst.Object.class_abi.Fields);

				return _class_abi;
			}
		}


		// End of the ABI representation.

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

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

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern void gst_plugin_list_free(IntPtr list);

		public static void ListFree(GLib.List list) {
			gst_plugin_list_free(list == null ? IntPtr.Zero : list.Handle);
		}

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

		public static Gst.Plugin LoadByName(string name) {
			IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name);
			IntPtr raw_ret = gst_plugin_load_by_name(native_name);
			Gst.Plugin ret = GLib.Object.GetObject(raw_ret, true) as Gst.Plugin;
			GLib.Marshaller.Free (native_name);
			return ret;
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern unsafe IntPtr gst_plugin_load_file(IntPtr filename, out IntPtr error);

		public static unsafe Gst.Plugin LoadFile(string filename) {
			IntPtr native_filename = GLib.Marshaller.StringToFilenamePtr (filename);
			IntPtr error = IntPtr.Zero;
			IntPtr raw_ret = gst_plugin_load_file(native_filename, out error);
			Gst.Plugin ret = GLib.Object.GetObject(raw_ret, true) as Gst.Plugin;
			GLib.Marshaller.Free (native_filename);
			if (error != IntPtr.Zero) throw new GLib.GException (error);
			return ret;
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern bool gst_plugin_register_static(int major_version, int minor_version, IntPtr name, IntPtr description, GstSharp.PluginInitFuncNative init_func, IntPtr version, IntPtr license, IntPtr source, IntPtr package, IntPtr origin);

		public static bool RegisterStatic(int major_version, int minor_version, string name, string description, Gst.PluginInitFunc init_func, string version, string license, string source, string package, string origin) {
			IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name);
			IntPtr native_description = GLib.Marshaller.StringToPtrGStrdup (description);
			GstSharp.PluginInitFuncWrapper init_func_wrapper = new GstSharp.PluginInitFuncWrapper (init_func);
			IntPtr native_version = GLib.Marshaller.StringToPtrGStrdup (version);
			IntPtr native_license = GLib.Marshaller.StringToPtrGStrdup (license);
			IntPtr native_source = GLib.Marshaller.StringToPtrGStrdup (source);
			IntPtr native_package = GLib.Marshaller.StringToPtrGStrdup (package);
			IntPtr native_origin = GLib.Marshaller.StringToPtrGStrdup (origin);
			bool raw_ret = gst_plugin_register_static(major_version, minor_version, native_name, native_description, init_func_wrapper.NativeDelegate, native_version, native_license, native_source, native_package, native_origin);
			bool ret = raw_ret;
			GLib.Marshaller.Free (native_name);
			GLib.Marshaller.Free (native_description);
			GLib.Marshaller.Free (native_version);
			GLib.Marshaller.Free (native_license);
			GLib.Marshaller.Free (native_source);
			GLib.Marshaller.Free (native_package);
			GLib.Marshaller.Free (native_origin);
			return ret;
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern bool gst_plugin_register_static_full(int major_version, int minor_version, IntPtr name, IntPtr description, GstSharp.PluginInitFullFuncNative init_full_func, IntPtr version, IntPtr license, IntPtr source, IntPtr package, IntPtr origin, IntPtr user_data);

		public static bool RegisterStaticFull(int major_version, int minor_version, string name, string description, Gst.PluginInitFullFunc init_full_func, string version, string license, string source, string package, string origin) {
			IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name);
			IntPtr native_description = GLib.Marshaller.StringToPtrGStrdup (description);
			GstSharp.PluginInitFullFuncWrapper init_full_func_wrapper = new GstSharp.PluginInitFullFuncWrapper (init_full_func);
			IntPtr native_version = GLib.Marshaller.StringToPtrGStrdup (version);
			IntPtr native_license = GLib.Marshaller.StringToPtrGStrdup (license);
			IntPtr native_source = GLib.Marshaller.StringToPtrGStrdup (source);
			IntPtr native_package = GLib.Marshaller.StringToPtrGStrdup (package);
			IntPtr native_origin = GLib.Marshaller.StringToPtrGStrdup (origin);
			bool raw_ret = gst_plugin_register_static_full(major_version, minor_version, native_name, native_description, init_full_func_wrapper.NativeDelegate, native_version, native_license, native_source, native_package, native_origin, IntPtr.Zero);
			bool ret = raw_ret;
			GLib.Marshaller.Free (native_name);
			GLib.Marshaller.Free (native_description);
			GLib.Marshaller.Free (native_version);
			GLib.Marshaller.Free (native_license);
			GLib.Marshaller.Free (native_source);
			GLib.Marshaller.Free (native_package);
			GLib.Marshaller.Free (native_origin);
			return ret;
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern void gst_plugin_add_dependency(IntPtr raw, IntPtr[] env_vars, IntPtr[] paths, IntPtr[] names, int flags);

		public void AddDependency(string[] env_vars, string[] paths, string[] names, Gst.PluginDependencyFlags flags) {
			int cnt_env_vars = env_vars == null ? 0 : env_vars.Length;
			IntPtr[] native_env_vars = new IntPtr [cnt_env_vars + 1];
			for (int i = 0; i < cnt_env_vars; i++)
				native_env_vars [i] = GLib.Marshaller.StringToPtrGStrdup(env_vars[i]);
			native_env_vars [cnt_env_vars] = IntPtr.Zero;
			int cnt_paths = paths == null ? 0 : paths.Length;
			IntPtr[] native_paths = new IntPtr [cnt_paths + 1];
			for (int i = 0; i < cnt_paths; i++)
				native_paths [i] = GLib.Marshaller.StringToPtrGStrdup(paths[i]);
			native_paths [cnt_paths] = IntPtr.Zero;
			int cnt_names = names == null ? 0 : names.Length;
			IntPtr[] native_names = new IntPtr [cnt_names + 1];
			for (int i = 0; i < cnt_names; i++)
				native_names [i] = GLib.Marshaller.StringToPtrGStrdup(names[i]);
			native_names [cnt_names] = IntPtr.Zero;
			gst_plugin_add_dependency(Handle, native_env_vars, native_paths, native_names, (int) flags);
		}

		public void AddDependency(Gst.PluginDependencyFlags flags) {
			AddDependency (null, null, null, flags);
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern void gst_plugin_add_dependency_simple(IntPtr raw, IntPtr env_vars, IntPtr paths, IntPtr names, int flags);

		public void AddDependencySimple(string env_vars, string paths, string names, Gst.PluginDependencyFlags flags) {
			IntPtr native_env_vars = GLib.Marshaller.StringToPtrGStrdup (env_vars);
			IntPtr native_paths = GLib.Marshaller.StringToPtrGStrdup (paths);
			IntPtr native_names = GLib.Marshaller.StringToPtrGStrdup (names);
			gst_plugin_add_dependency_simple(Handle, native_env_vars, native_paths, native_names, (int) flags);
			GLib.Marshaller.Free (native_env_vars);
			GLib.Marshaller.Free (native_paths);
			GLib.Marshaller.Free (native_names);
		}

		public void AddDependencySimple(Gst.PluginDependencyFlags flags) {
			AddDependencySimple (null, null, null, flags);
		}

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

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

		public Gst.Structure CacheData { 
			get {
				IntPtr raw_ret = gst_plugin_get_cache_data(Handle);
				Gst.Structure ret = raw_ret == IntPtr.Zero ? null : (Gst.Structure) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Structure), false);
				return ret;
			}
			set {
				value.Owned = false;
				gst_plugin_set_cache_data(Handle, value == null ? IntPtr.Zero : value.Handle);
			}
		}

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

		public string Description { 
			get {
				IntPtr raw_ret = gst_plugin_get_description(Handle);
				string ret = GLib.Marshaller.Utf8PtrToString (raw_ret);
				return ret;
			}
		}

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

		public string Filename { 
			get {
				IntPtr raw_ret = gst_plugin_get_filename(Handle);
				string ret = GLib.Marshaller.FilenamePtrToString (raw_ret);
				return ret;
			}
		}

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

		public string License { 
			get {
				IntPtr raw_ret = gst_plugin_get_license(Handle);
				string ret = GLib.Marshaller.Utf8PtrToString (raw_ret);
				return ret;
			}
		}

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

		public string Origin { 
			get {
				IntPtr raw_ret = gst_plugin_get_origin(Handle);
				string ret = GLib.Marshaller.Utf8PtrToString (raw_ret);
				return ret;
			}
		}

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

		public string Package { 
			get {
				IntPtr raw_ret = gst_plugin_get_package(Handle);
				string ret = GLib.Marshaller.Utf8PtrToString (raw_ret);
				return ret;
			}
		}

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

		public string ReleaseDateString { 
			get {
				IntPtr raw_ret = gst_plugin_get_release_date_string(Handle);
				string ret = GLib.Marshaller.Utf8PtrToString (raw_ret);
				return ret;
			}
		}

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

		public string Source { 
			get {
				IntPtr raw_ret = gst_plugin_get_source(Handle);
				string ret = GLib.Marshaller.Utf8PtrToString (raw_ret);
				return ret;
			}
		}

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

		public string Version { 
			get {
				IntPtr raw_ret = gst_plugin_get_version(Handle);
				string ret = GLib.Marshaller.Utf8PtrToString (raw_ret);
				return ret;
			}
		}

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

		public bool IsLoaded { 
			get {
				bool raw_ret = gst_plugin_is_loaded(Handle);
				bool ret = raw_ret;
				return ret;
			}
		}

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

		public Gst.Plugin Load() {
			IntPtr raw_ret = gst_plugin_load(Handle);
			Gst.Plugin ret = GLib.Object.GetObject(raw_ret, true) as Gst.Plugin;
			return ret;
		}


		// 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 (Gst.Object.abi_info.Fields);

				return _abi_info;
			}
		}


		// End of the ABI representation.

#endregion
	}
}