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 TagList : Gst.MiniObject {
14 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
15 static extern IntPtr gst_tag_list_get_type();
17 public static GLib.GType GType {
19 IntPtr raw_ret = gst_tag_list_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_tag_list_add_value(IntPtr raw, int mode, IntPtr tag, IntPtr value);
28 public void AddValue(Gst.TagMergeMode mode, string tag, GLib.Value value) {
29 IntPtr native_tag = GLib.Marshaller.StringToPtrGStrdup (tag);
30 IntPtr native_value = GLib.Marshaller.StructureToPtrAlloc (value);
31 gst_tag_list_add_value(Handle, (int) mode, native_tag, native_value);
32 GLib.Marshaller.Free (native_tag);
33 Marshal.FreeHGlobal (native_value);
36 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
37 static extern IntPtr gst_tag_list_copy(IntPtr raw);
39 public Gst.TagList Copy() {
40 IntPtr raw_ret = gst_tag_list_copy(Handle);
41 Gst.TagList ret = raw_ret == IntPtr.Zero ? null : (Gst.TagList) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.TagList), true);
45 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
46 static extern void gst_tag_list_foreach(IntPtr raw, GstSharp.TagForeachFuncNative func, IntPtr user_data);
48 public void Foreach(Gst.TagForeachFunc func) {
49 GstSharp.TagForeachFuncWrapper func_wrapper = new GstSharp.TagForeachFuncWrapper (func);
50 gst_tag_list_foreach(Handle, func_wrapper.NativeDelegate, IntPtr.Zero);
53 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
54 static extern bool gst_tag_list_get_boolean(IntPtr raw, IntPtr tag, out bool value);
56 public bool GetBoolean(string tag, out bool value) {
57 IntPtr native_tag = GLib.Marshaller.StringToPtrGStrdup (tag);
58 bool raw_ret = gst_tag_list_get_boolean(Handle, native_tag, out value);
60 GLib.Marshaller.Free (native_tag);
64 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
65 static extern bool gst_tag_list_get_boolean_index(IntPtr raw, IntPtr tag, uint index, out bool value);
67 public bool GetBooleanIndex(string tag, uint index, out bool value) {
68 IntPtr native_tag = GLib.Marshaller.StringToPtrGStrdup (tag);
69 bool raw_ret = gst_tag_list_get_boolean_index(Handle, native_tag, index, out value);
71 GLib.Marshaller.Free (native_tag);
75 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
76 static extern bool gst_tag_list_get_date(IntPtr raw, IntPtr tag, out IntPtr value);
78 public bool GetDate(string tag, out GLib.Date value) {
79 IntPtr native_tag = GLib.Marshaller.StringToPtrGStrdup (tag);
81 bool raw_ret = gst_tag_list_get_date(Handle, native_tag, out native_value);
83 GLib.Marshaller.Free (native_tag);
84 value = new GLib.Date(native_value);
88 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
89 static extern bool gst_tag_list_get_date_index(IntPtr raw, IntPtr tag, uint index, out IntPtr value);
91 public bool GetDateIndex(string tag, uint index, out GLib.Date value) {
92 IntPtr native_tag = GLib.Marshaller.StringToPtrGStrdup (tag);
94 bool raw_ret = gst_tag_list_get_date_index(Handle, native_tag, index, out native_value);
96 GLib.Marshaller.Free (native_tag);
97 value = new GLib.Date(native_value);
101 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
102 static extern bool gst_tag_list_get_date_time(IntPtr raw, IntPtr tag, out IntPtr value);
104 public bool GetDateTime(string tag, out Gst.DateTime value) {
105 IntPtr native_tag = GLib.Marshaller.StringToPtrGStrdup (tag);
107 bool raw_ret = gst_tag_list_get_date_time(Handle, native_tag, out native_value);
109 GLib.Marshaller.Free (native_tag);
110 value = native_value == IntPtr.Zero ? null : (Gst.DateTime) GLib.Opaque.GetOpaque (native_value, typeof (Gst.DateTime), true);
114 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
115 static extern bool gst_tag_list_get_date_time_index(IntPtr raw, IntPtr tag, uint index, out IntPtr value);
117 public bool GetDateTimeIndex(string tag, uint index, out Gst.DateTime value) {
118 IntPtr native_tag = GLib.Marshaller.StringToPtrGStrdup (tag);
120 bool raw_ret = gst_tag_list_get_date_time_index(Handle, native_tag, index, out native_value);
122 GLib.Marshaller.Free (native_tag);
123 value = native_value == IntPtr.Zero ? null : (Gst.DateTime) GLib.Opaque.GetOpaque (native_value, typeof (Gst.DateTime), true);
127 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
128 static extern bool gst_tag_list_get_double(IntPtr raw, IntPtr tag, out double value);
130 public bool GetDouble(string tag, out double value) {
131 IntPtr native_tag = GLib.Marshaller.StringToPtrGStrdup (tag);
132 bool raw_ret = gst_tag_list_get_double(Handle, native_tag, out value);
134 GLib.Marshaller.Free (native_tag);
138 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
139 static extern bool gst_tag_list_get_double_index(IntPtr raw, IntPtr tag, uint index, out double value);
141 public bool GetDoubleIndex(string tag, uint index, out double value) {
142 IntPtr native_tag = GLib.Marshaller.StringToPtrGStrdup (tag);
143 bool raw_ret = gst_tag_list_get_double_index(Handle, native_tag, index, out value);
145 GLib.Marshaller.Free (native_tag);
149 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
150 static extern bool gst_tag_list_get_float(IntPtr raw, IntPtr tag, out float value);
152 public bool GetFloat(string tag, out float value) {
153 IntPtr native_tag = GLib.Marshaller.StringToPtrGStrdup (tag);
154 bool raw_ret = gst_tag_list_get_float(Handle, native_tag, out value);
156 GLib.Marshaller.Free (native_tag);
160 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
161 static extern bool gst_tag_list_get_float_index(IntPtr raw, IntPtr tag, uint index, out float value);
163 public bool GetFloatIndex(string tag, uint index, out float value) {
164 IntPtr native_tag = GLib.Marshaller.StringToPtrGStrdup (tag);
165 bool raw_ret = gst_tag_list_get_float_index(Handle, native_tag, index, out value);
167 GLib.Marshaller.Free (native_tag);
171 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
172 static extern bool gst_tag_list_get_int(IntPtr raw, IntPtr tag, out int value);
174 public bool GetInt(string tag, out int value) {
175 IntPtr native_tag = GLib.Marshaller.StringToPtrGStrdup (tag);
176 bool raw_ret = gst_tag_list_get_int(Handle, native_tag, out value);
178 GLib.Marshaller.Free (native_tag);
182 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
183 static extern bool gst_tag_list_get_int64(IntPtr raw, IntPtr tag, out long value);
185 public bool GetInt64(string tag, out long value) {
186 IntPtr native_tag = GLib.Marshaller.StringToPtrGStrdup (tag);
187 bool raw_ret = gst_tag_list_get_int64(Handle, native_tag, out value);
189 GLib.Marshaller.Free (native_tag);
193 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
194 static extern bool gst_tag_list_get_int64_index(IntPtr raw, IntPtr tag, uint index, out long value);
196 public bool GetInt64Index(string tag, uint index, out long value) {
197 IntPtr native_tag = GLib.Marshaller.StringToPtrGStrdup (tag);
198 bool raw_ret = gst_tag_list_get_int64_index(Handle, native_tag, index, out value);
200 GLib.Marshaller.Free (native_tag);
204 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
205 static extern bool gst_tag_list_get_int_index(IntPtr raw, IntPtr tag, uint index, out int value);
207 public bool GetIntIndex(string tag, uint index, out int value) {
208 IntPtr native_tag = GLib.Marshaller.StringToPtrGStrdup (tag);
209 bool raw_ret = gst_tag_list_get_int_index(Handle, native_tag, index, out value);
211 GLib.Marshaller.Free (native_tag);
215 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
216 static extern bool gst_tag_list_get_pointer(IntPtr raw, IntPtr tag, out IntPtr value);
218 public bool GetPointer(string tag, out IntPtr value) {
219 IntPtr native_tag = GLib.Marshaller.StringToPtrGStrdup (tag);
220 bool raw_ret = gst_tag_list_get_pointer(Handle, native_tag, out value);
222 GLib.Marshaller.Free (native_tag);
226 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
227 static extern bool gst_tag_list_get_pointer_index(IntPtr raw, IntPtr tag, uint index, out IntPtr value);
229 public bool GetPointerIndex(string tag, uint index, out IntPtr value) {
230 IntPtr native_tag = GLib.Marshaller.StringToPtrGStrdup (tag);
231 bool raw_ret = gst_tag_list_get_pointer_index(Handle, native_tag, index, out value);
233 GLib.Marshaller.Free (native_tag);
237 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
238 static extern bool gst_tag_list_get_sample(IntPtr raw, IntPtr tag, out IntPtr sample);
240 public bool GetSample(string tag, out Gst.Sample sample) {
241 IntPtr native_tag = GLib.Marshaller.StringToPtrGStrdup (tag);
242 IntPtr native_sample;
243 bool raw_ret = gst_tag_list_get_sample(Handle, native_tag, out native_sample);
245 GLib.Marshaller.Free (native_tag);
246 sample = native_sample == IntPtr.Zero ? null : (Gst.Sample) GLib.Opaque.GetOpaque (native_sample, typeof (Gst.Sample), true);
250 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
251 static extern bool gst_tag_list_get_sample_index(IntPtr raw, IntPtr tag, uint index, out IntPtr sample);
253 public bool GetSampleIndex(string tag, uint index, out Gst.Sample sample) {
254 IntPtr native_tag = GLib.Marshaller.StringToPtrGStrdup (tag);
255 IntPtr native_sample;
256 bool raw_ret = gst_tag_list_get_sample_index(Handle, native_tag, index, out native_sample);
258 GLib.Marshaller.Free (native_tag);
259 sample = native_sample == IntPtr.Zero ? null : (Gst.Sample) GLib.Opaque.GetOpaque (native_sample, typeof (Gst.Sample), true);
263 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
264 static extern int gst_tag_list_get_scope(IntPtr raw);
266 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
267 static extern void gst_tag_list_set_scope(IntPtr raw, int scope);
269 public Gst.TagScope Scope {
271 int raw_ret = gst_tag_list_get_scope(Handle);
272 Gst.TagScope ret = (Gst.TagScope) raw_ret;
276 gst_tag_list_set_scope(Handle, (int) value);
280 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
281 static extern bool gst_tag_list_get_string(IntPtr raw, IntPtr tag, out IntPtr value);
283 public bool GetString(string tag, out string value) {
284 IntPtr native_tag = GLib.Marshaller.StringToPtrGStrdup (tag);
286 bool raw_ret = gst_tag_list_get_string(Handle, native_tag, out native_value);
288 GLib.Marshaller.Free (native_tag);
289 value = GLib.Marshaller.PtrToStringGFree(native_value);
293 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
294 static extern bool gst_tag_list_get_string_index(IntPtr raw, IntPtr tag, uint index, out IntPtr value);
296 public bool GetStringIndex(string tag, uint index, out string value) {
297 IntPtr native_tag = GLib.Marshaller.StringToPtrGStrdup (tag);
299 bool raw_ret = gst_tag_list_get_string_index(Handle, native_tag, index, out native_value);
301 GLib.Marshaller.Free (native_tag);
302 value = GLib.Marshaller.PtrToStringGFree(native_value);
306 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
307 static extern uint gst_tag_list_get_tag_size(IntPtr raw, IntPtr tag);
309 public uint GetTagSize(string tag) {
310 IntPtr native_tag = GLib.Marshaller.StringToPtrGStrdup (tag);
311 uint raw_ret = gst_tag_list_get_tag_size(Handle, native_tag);
313 GLib.Marshaller.Free (native_tag);
317 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
318 static extern bool gst_tag_list_get_uint(IntPtr raw, IntPtr tag, out uint value);
320 public bool GetUint(string tag, out uint value) {
321 IntPtr native_tag = GLib.Marshaller.StringToPtrGStrdup (tag);
322 bool raw_ret = gst_tag_list_get_uint(Handle, native_tag, out value);
324 GLib.Marshaller.Free (native_tag);
328 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
329 static extern bool gst_tag_list_get_uint64(IntPtr raw, IntPtr tag, out ulong value);
331 public bool GetUint64(string tag, out ulong value) {
332 IntPtr native_tag = GLib.Marshaller.StringToPtrGStrdup (tag);
333 bool raw_ret = gst_tag_list_get_uint64(Handle, native_tag, out value);
335 GLib.Marshaller.Free (native_tag);
339 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
340 static extern bool gst_tag_list_get_uint64_index(IntPtr raw, IntPtr tag, uint index, out ulong value);
342 public bool GetUint64Index(string tag, uint index, out ulong value) {
343 IntPtr native_tag = GLib.Marshaller.StringToPtrGStrdup (tag);
344 bool raw_ret = gst_tag_list_get_uint64_index(Handle, native_tag, index, out value);
346 GLib.Marshaller.Free (native_tag);
350 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
351 static extern bool gst_tag_list_get_uint_index(IntPtr raw, IntPtr tag, uint index, out uint value);
353 public bool GetUintIndex(string tag, uint index, out uint value) {
354 IntPtr native_tag = GLib.Marshaller.StringToPtrGStrdup (tag);
355 bool raw_ret = gst_tag_list_get_uint_index(Handle, native_tag, index, out value);
357 GLib.Marshaller.Free (native_tag);
361 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
362 static extern IntPtr gst_tag_list_get_value_index(IntPtr raw, IntPtr tag, uint index);
364 public GLib.Value GetValueIndex(string tag, uint index) {
365 IntPtr native_tag = GLib.Marshaller.StringToPtrGStrdup (tag);
366 IntPtr raw_ret = gst_tag_list_get_value_index(Handle, native_tag, index);
367 GLib.Value ret = (GLib.Value) Marshal.PtrToStructure (raw_ret, typeof (GLib.Value));
368 GLib.Marshaller.Free (native_tag);
372 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
373 static extern void gst_tag_list_insert(IntPtr raw, IntPtr from, int mode);
375 public void Insert(Gst.TagList from, Gst.TagMergeMode mode) {
376 gst_tag_list_insert(Handle, from == null ? IntPtr.Zero : from.Handle, (int) mode);
379 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
380 static extern bool gst_tag_list_is_empty(IntPtr raw);
382 public bool IsEmpty {
384 bool raw_ret = gst_tag_list_is_empty(Handle);
390 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
391 static extern bool gst_tag_list_is_equal(IntPtr raw, IntPtr list2);
393 public bool IsEqual(Gst.TagList list2) {
394 bool raw_ret = gst_tag_list_is_equal(Handle, list2 == null ? IntPtr.Zero : list2.Handle);
399 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
400 static extern IntPtr gst_tag_list_merge(IntPtr raw, IntPtr list2, int mode);
402 public Gst.TagList Merge(Gst.TagList list2, Gst.TagMergeMode mode) {
403 IntPtr raw_ret = gst_tag_list_merge(Handle, list2 == null ? IntPtr.Zero : list2.Handle, (int) mode);
404 Gst.TagList ret = raw_ret == IntPtr.Zero ? null : (Gst.TagList) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.TagList), true);
408 public Gst.TagList Merge(Gst.TagMergeMode mode) {
409 return Merge (null, mode);
412 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
413 static extern int gst_tag_list_n_tags(IntPtr raw);
416 int raw_ret = gst_tag_list_n_tags(Handle);
421 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
422 static extern IntPtr gst_tag_list_nth_tag_name(IntPtr raw, uint index);
424 public string NthTagName(uint index) {
425 IntPtr raw_ret = gst_tag_list_nth_tag_name(Handle, index);
426 string ret = GLib.Marshaller.Utf8PtrToString (raw_ret);
430 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
431 static extern bool gst_tag_list_peek_string_index(IntPtr raw, IntPtr tag, uint index, out IntPtr value);
433 public bool PeekStringIndex(string tag, uint index, out string value) {
434 IntPtr native_tag = GLib.Marshaller.StringToPtrGStrdup (tag);
436 bool raw_ret = gst_tag_list_peek_string_index(Handle, native_tag, index, out native_value);
438 GLib.Marshaller.Free (native_tag);
439 value = GLib.Marshaller.Utf8PtrToString (native_value);
443 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
444 static extern void gst_tag_list_remove_tag(IntPtr raw, IntPtr tag);
446 public void RemoveTag(string tag) {
447 IntPtr native_tag = GLib.Marshaller.StringToPtrGStrdup (tag);
448 gst_tag_list_remove_tag(Handle, native_tag);
449 GLib.Marshaller.Free (native_tag);
452 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
453 static extern IntPtr gst_tag_list_to_string(IntPtr raw);
455 public override string ToString() {
456 IntPtr raw_ret = gst_tag_list_to_string(Handle);
457 string ret = GLib.Marshaller.PtrToStringGFree(raw_ret);
461 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
462 static extern bool gst_tag_list_copy_value(IntPtr dest, IntPtr list, IntPtr tag);
464 public static bool CopyValue(ref GLib.Value dest, Gst.TagList list, string tag) {
465 IntPtr native_dest = GLib.Marshaller.StructureToPtrAlloc (dest);
466 IntPtr native_tag = GLib.Marshaller.StringToPtrGStrdup (tag);
467 bool raw_ret = gst_tag_list_copy_value(native_dest, list == null ? IntPtr.Zero : list.Handle, native_tag);
469 dest = (GLib.Value) Marshal.PtrToStructure (native_dest, typeof (GLib.Value));
470 Marshal.FreeHGlobal (native_dest);
471 GLib.Marshaller.Free (native_tag);
475 public TagList(IntPtr raw) : base(raw) {}
477 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
478 static extern IntPtr gst_tag_list_new_empty();
482 Raw = gst_tag_list_new_empty();
485 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
486 static extern IntPtr gst_tag_list_new_from_string(IntPtr str);
488 public TagList (string str)
490 IntPtr native_str = GLib.Marshaller.StringToPtrGStrdup (str);
491 Raw = gst_tag_list_new_from_string(native_str);
492 GLib.Marshaller.Free (native_str);
495 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
496 static extern IntPtr gst_tag_list_ref(IntPtr raw);
498 protected override void Ref (IntPtr raw)
501 gst_tag_list_ref (raw);
506 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
507 static extern void gst_tag_list_unref(IntPtr raw);
509 protected override void Unref (IntPtr raw)
512 gst_tag_list_unref (raw);
517 protected override Action<IntPtr> DisposeUnmanagedFunc {
519 return gst_tag_list_unref;
524 // Internal representation of the wrapped structure ABI.
525 static GLib.AbiStruct _abi_info = null;
526 static public new GLib.AbiStruct abi_info {
528 if (_abi_info == null)
529 _abi_info = new GLib.AbiStruct (Gst.MiniObject.abi_info.Fields);
536 // End of the ABI representation.