1 // This file was generated by the Gtk# code generator.
2 // Any changes made will be lost if regenerated.
7 using System.Collections;
8 using System.Collections.Generic;
9 using System.Runtime.InteropServices;
11 #region Autogenerated code
12 public partial class Caps : Gst.MiniObject {
14 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
15 static extern IntPtr gst_caps_get_type();
17 public static GLib.GType GType {
19 IntPtr raw_ret = gst_caps_get_type();
20 GLib.GType ret = new GLib.GType(raw_ret);
25 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
26 static extern void gst_caps_append(IntPtr raw, IntPtr caps2);
28 public void Append(Gst.Caps caps2) {
30 gst_caps_append(Handle, caps2 == null ? IntPtr.Zero : caps2.Handle);
33 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
34 static extern void gst_caps_append_structure(IntPtr raw, IntPtr structure);
36 public void AppendStructure(Gst.Structure structure) {
37 structure.Owned = false;
38 gst_caps_append_structure(Handle, structure == null ? IntPtr.Zero : structure.Handle);
41 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
42 static extern void gst_caps_append_structure_full(IntPtr raw, IntPtr structure, IntPtr features);
44 public void AppendStructureFull(Gst.Structure structure, Gst.CapsFeatures features) {
45 structure.Owned = false;
46 IntPtr native_features = GLib.Marshaller.StructureToPtrAlloc (features);
47 gst_caps_append_structure_full(Handle, structure == null ? IntPtr.Zero : structure.Handle, native_features);
48 Marshal.FreeHGlobal (native_features);
51 public void AppendStructureFull(Gst.Structure structure) {
52 AppendStructureFull (structure, Gst.CapsFeatures.Zero);
55 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
56 static extern bool gst_caps_can_intersect(IntPtr raw, IntPtr caps2);
58 public bool CanIntersect(Gst.Caps caps2) {
59 bool raw_ret = gst_caps_can_intersect(Handle, caps2 == null ? IntPtr.Zero : caps2.Handle);
64 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
65 static extern IntPtr gst_caps_copy(IntPtr raw);
67 public Gst.Caps Copy() {
68 IntPtr raw_ret = gst_caps_copy(Handle);
69 Gst.Caps ret = raw_ret == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Caps), true);
73 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
74 static extern IntPtr gst_caps_copy_nth(IntPtr raw, uint nth);
76 public Gst.Caps CopyNth(uint nth) {
77 IntPtr raw_ret = gst_caps_copy_nth(Handle, nth);
78 Gst.Caps ret = raw_ret == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Caps), true);
82 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
83 static extern void gst_caps_filter_and_map_in_place(IntPtr raw, GstSharp.CapsFilterMapFuncNative func, IntPtr user_data);
85 public void FilterAndMapInPlace(Gst.CapsFilterMapFunc func) {
86 GstSharp.CapsFilterMapFuncWrapper func_wrapper = new GstSharp.CapsFilterMapFuncWrapper (func);
87 gst_caps_filter_and_map_in_place(Handle, func_wrapper.NativeDelegate, IntPtr.Zero);
90 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
91 static extern IntPtr gst_caps_fixate(IntPtr raw);
93 public Gst.Caps Fixate() {
94 IntPtr raw_ret = gst_caps_fixate(Handle);
95 Gst.Caps ret = raw_ret == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Caps), true);
99 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
100 static extern bool gst_caps_foreach(IntPtr raw, GstSharp.CapsForeachFuncNative func, IntPtr user_data);
102 public bool Foreach(Gst.CapsForeachFunc func) {
103 GstSharp.CapsForeachFuncWrapper func_wrapper = new GstSharp.CapsForeachFuncWrapper (func);
104 bool raw_ret = gst_caps_foreach(Handle, func_wrapper.NativeDelegate, IntPtr.Zero);
109 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
110 static extern IntPtr gst_caps_get_features(IntPtr raw, uint index);
112 public Gst.CapsFeatures GetFeatures(uint index) {
113 IntPtr raw_ret = gst_caps_get_features(Handle, index);
114 Gst.CapsFeatures ret = Gst.CapsFeatures.New (raw_ret);
118 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
119 static extern uint gst_caps_get_size(IntPtr raw);
123 uint raw_ret = gst_caps_get_size(Handle);
129 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
130 static extern IntPtr gst_caps_get_structure(IntPtr raw, uint index);
132 public Gst.Structure GetStructure(uint index) {
133 IntPtr raw_ret = gst_caps_get_structure(Handle, index);
134 Gst.Structure ret = raw_ret == IntPtr.Zero ? null : (Gst.Structure) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Structure), false);
138 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
139 static extern IntPtr gst_caps_intersect(IntPtr raw, IntPtr caps2);
141 public Gst.Caps Intersect(Gst.Caps caps2) {
142 IntPtr raw_ret = gst_caps_intersect(Handle, caps2 == null ? IntPtr.Zero : caps2.Handle);
143 Gst.Caps ret = raw_ret == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Caps), true);
147 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
148 static extern IntPtr gst_caps_intersect_full(IntPtr raw, IntPtr caps2, int mode);
150 public Gst.Caps IntersectFull(Gst.Caps caps2, Gst.CapsIntersectMode mode) {
151 IntPtr raw_ret = gst_caps_intersect_full(Handle, caps2 == null ? IntPtr.Zero : caps2.Handle, (int) mode);
152 Gst.Caps ret = raw_ret == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Caps), true);
156 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
157 static extern bool gst_caps_is_always_compatible(IntPtr raw, IntPtr caps2);
159 public bool IsAlwaysCompatible(Gst.Caps caps2) {
160 bool raw_ret = gst_caps_is_always_compatible(Handle, caps2 == null ? IntPtr.Zero : caps2.Handle);
165 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
166 static extern bool gst_caps_is_any(IntPtr raw);
170 bool raw_ret = gst_caps_is_any(Handle);
176 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
177 static extern bool gst_caps_is_empty(IntPtr raw);
179 public bool IsEmpty {
181 bool raw_ret = gst_caps_is_empty(Handle);
187 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
188 static extern bool gst_caps_is_equal(IntPtr raw, IntPtr caps2);
190 public bool IsEqual(Gst.Caps caps2) {
191 bool raw_ret = gst_caps_is_equal(Handle, caps2 == null ? IntPtr.Zero : caps2.Handle);
196 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
197 static extern bool gst_caps_is_equal_fixed(IntPtr raw, IntPtr caps2);
199 public bool IsEqualFixed(Gst.Caps caps2) {
200 bool raw_ret = gst_caps_is_equal_fixed(Handle, caps2 == null ? IntPtr.Zero : caps2.Handle);
205 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
206 static extern bool gst_caps_is_fixed(IntPtr raw);
208 public bool IsFixed {
210 bool raw_ret = gst_caps_is_fixed(Handle);
216 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
217 static extern bool gst_caps_is_strictly_equal(IntPtr raw, IntPtr caps2);
219 public bool IsStrictlyEqual(Gst.Caps caps2) {
220 bool raw_ret = gst_caps_is_strictly_equal(Handle, caps2 == null ? IntPtr.Zero : caps2.Handle);
225 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
226 static extern bool gst_caps_is_subset(IntPtr raw, IntPtr superset);
228 public bool IsSubset(Gst.Caps superset) {
229 bool raw_ret = gst_caps_is_subset(Handle, superset == null ? IntPtr.Zero : superset.Handle);
234 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
235 static extern bool gst_caps_is_subset_structure(IntPtr raw, IntPtr structure);
237 public bool IsSubsetStructure(Gst.Structure structure) {
238 bool raw_ret = gst_caps_is_subset_structure(Handle, structure == null ? IntPtr.Zero : structure.Handle);
243 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
244 static extern bool gst_caps_is_subset_structure_full(IntPtr raw, IntPtr structure, IntPtr features);
246 public bool IsSubsetStructureFull(Gst.Structure structure, Gst.CapsFeatures features) {
247 IntPtr native_features = GLib.Marshaller.StructureToPtrAlloc (features);
248 bool raw_ret = gst_caps_is_subset_structure_full(Handle, structure == null ? IntPtr.Zero : structure.Handle, native_features);
250 Marshal.FreeHGlobal (native_features);
254 public bool IsSubsetStructureFull(Gst.Structure structure) {
255 return IsSubsetStructureFull (structure, Gst.CapsFeatures.Zero);
258 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
259 static extern bool gst_caps_map_in_place(IntPtr raw, GstSharp.CapsMapFuncNative func, IntPtr user_data);
261 public bool MapInPlace(Gst.CapsMapFunc func) {
262 GstSharp.CapsMapFuncWrapper func_wrapper = new GstSharp.CapsMapFuncWrapper (func);
263 bool raw_ret = gst_caps_map_in_place(Handle, func_wrapper.NativeDelegate, IntPtr.Zero);
268 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
269 static extern IntPtr gst_caps_merge(IntPtr raw, IntPtr caps2);
271 public Gst.Caps Merge(Gst.Caps caps2) {
273 IntPtr raw_ret = gst_caps_merge(Handle, caps2 == null ? IntPtr.Zero : caps2.Handle);
274 Gst.Caps ret = raw_ret == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Caps), true);
278 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
279 static extern IntPtr gst_caps_merge_structure(IntPtr raw, IntPtr structure);
281 public Gst.Caps MergeStructure(Gst.Structure structure) {
282 structure.Owned = false;
283 IntPtr raw_ret = gst_caps_merge_structure(Handle, structure == null ? IntPtr.Zero : structure.Handle);
284 Gst.Caps ret = raw_ret == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Caps), true);
288 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
289 static extern IntPtr gst_caps_merge_structure_full(IntPtr raw, IntPtr structure, IntPtr features);
291 public Gst.Caps MergeStructureFull(Gst.Structure structure, Gst.CapsFeatures features) {
292 structure.Owned = false;
293 IntPtr native_features = GLib.Marshaller.StructureToPtrAlloc (features);
294 IntPtr raw_ret = gst_caps_merge_structure_full(Handle, structure == null ? IntPtr.Zero : structure.Handle, native_features);
295 Gst.Caps ret = raw_ret == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Caps), true);
296 Marshal.FreeHGlobal (native_features);
300 public Gst.Caps MergeStructureFull(Gst.Structure structure) {
301 return MergeStructureFull (structure, Gst.CapsFeatures.Zero);
304 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
305 static extern IntPtr gst_caps_normalize(IntPtr raw);
307 public Gst.Caps Normalize() {
308 IntPtr raw_ret = gst_caps_normalize(Handle);
309 Gst.Caps ret = raw_ret == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Caps), true);
313 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
314 static extern void gst_caps_remove_structure(IntPtr raw, uint idx);
316 public void RemoveStructure(uint idx) {
317 gst_caps_remove_structure(Handle, idx);
320 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
321 static extern void gst_caps_set_features(IntPtr raw, uint index, IntPtr features);
323 public void SetFeatures(uint index, Gst.CapsFeatures features) {
324 IntPtr native_features = GLib.Marshaller.StructureToPtrAlloc (features);
325 gst_caps_set_features(Handle, index, native_features);
326 Marshal.FreeHGlobal (native_features);
329 public void SetFeatures(uint index) {
330 SetFeatures (index, Gst.CapsFeatures.Zero);
333 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
334 static extern void gst_caps_set_features_simple(IntPtr raw, IntPtr value);
336 public Gst.CapsFeatures FeaturesSimple {
338 IntPtr native_value = GLib.Marshaller.StructureToPtrAlloc (value);
339 gst_caps_set_features_simple(Handle, native_value);
340 Marshal.FreeHGlobal (native_value);
344 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
345 static extern void gst_caps_set_value(IntPtr raw, IntPtr field, IntPtr value);
347 public void SetValue(string field, GLib.Value value) {
348 IntPtr native_field = GLib.Marshaller.StringToPtrGStrdup (field);
349 IntPtr native_value = GLib.Marshaller.StructureToPtrAlloc (value);
350 gst_caps_set_value(Handle, native_field, native_value);
351 GLib.Marshaller.Free (native_field);
352 Marshal.FreeHGlobal (native_value);
355 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
356 static extern IntPtr gst_caps_simplify(IntPtr raw);
358 public Gst.Caps Simplify() {
359 IntPtr raw_ret = gst_caps_simplify(Handle);
360 Gst.Caps ret = raw_ret == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Caps), true);
364 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
365 static extern IntPtr gst_caps_steal_structure(IntPtr raw, uint index);
367 public Gst.Structure StealStructure(uint index) {
368 IntPtr raw_ret = gst_caps_steal_structure(Handle, index);
369 Gst.Structure ret = raw_ret == IntPtr.Zero ? null : (Gst.Structure) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Structure), true);
373 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
374 static extern IntPtr gst_caps_subtract(IntPtr raw, IntPtr subtrahend);
376 public Gst.Caps Subtract(Gst.Caps subtrahend) {
377 IntPtr raw_ret = gst_caps_subtract(Handle, subtrahend == null ? IntPtr.Zero : subtrahend.Handle);
378 Gst.Caps ret = raw_ret == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Caps), true);
382 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
383 static extern IntPtr gst_caps_to_string(IntPtr raw);
385 public override string ToString() {
386 IntPtr raw_ret = gst_caps_to_string(Handle);
387 string ret = GLib.Marshaller.PtrToStringGFree(raw_ret);
391 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
392 static extern IntPtr gst_caps_truncate(IntPtr raw);
394 public Gst.Caps Truncate() {
395 IntPtr raw_ret = gst_caps_truncate(Handle);
396 Gst.Caps ret = raw_ret == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Caps), true);
400 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
401 static extern IntPtr gst_caps_from_string(IntPtr str1ng);
403 public static Gst.Caps FromString(string str1ng) {
404 IntPtr native_str1ng = GLib.Marshaller.StringToPtrGStrdup (str1ng);
405 IntPtr raw_ret = gst_caps_from_string(native_str1ng);
406 Gst.Caps ret = raw_ret == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Caps), true);
407 GLib.Marshaller.Free (native_str1ng);
411 public Caps(IntPtr raw) : base(raw) {}
413 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
414 static extern IntPtr gst_caps_new_empty();
418 Raw = gst_caps_new_empty();
421 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
422 static extern IntPtr gst_caps_new_empty_simple(IntPtr media_type);
424 public Caps (string media_type)
426 IntPtr native_media_type = GLib.Marshaller.StringToPtrGStrdup (media_type);
427 Raw = gst_caps_new_empty_simple(native_media_type);
428 GLib.Marshaller.Free (native_media_type);
431 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
432 static extern IntPtr gst_caps_new_any();
434 public static Caps NewAny()
436 Caps result = new Caps (gst_caps_new_any());
440 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
441 static extern IntPtr gst_caps_ref(IntPtr raw);
443 protected override void Ref (IntPtr raw)
451 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
452 static extern void gst_caps_unref(IntPtr raw);
454 protected override void Unref (IntPtr raw)
457 gst_caps_unref (raw);
462 protected override Action<IntPtr> DisposeUnmanagedFunc {
464 return gst_caps_unref;
469 // Internal representation of the wrapped structure ABI.
470 static GLib.AbiStruct _abi_info = null;
471 static public new GLib.AbiStruct abi_info {
473 if (_abi_info == null)
474 _abi_info = new GLib.AbiStruct (Gst.MiniObject.abi_info.Fields);
481 // End of the ABI representation.