Back to development
[platform/upstream/gstreamer.git] / subprojects / gstreamer-sharp / sources / generated / Gst / Tag.cs
1 // This file was generated by the Gtk# code generator.
2 // Any changes made will be lost if regenerated.
3
4 namespace Gst {
5
6         using System;
7         using System.Runtime.InteropServices;
8
9 #region Autogenerated code
10         public partial class Tag {
11
12                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
13                 static extern bool gst_tag_exists(IntPtr tag);
14
15                 public static bool Exists(string tag) {
16                         IntPtr native_tag = GLib.Marshaller.StringToPtrGStrdup (tag);
17                         bool raw_ret = gst_tag_exists(native_tag);
18                         bool ret = raw_ret;
19                         GLib.Marshaller.Free (native_tag);
20                         return ret;
21                 }
22
23                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
24                 static extern IntPtr gst_tag_get_description(IntPtr tag);
25
26                 public static string GetDescription(string tag) {
27                         IntPtr native_tag = GLib.Marshaller.StringToPtrGStrdup (tag);
28                         IntPtr raw_ret = gst_tag_get_description(native_tag);
29                         string ret = GLib.Marshaller.Utf8PtrToString (raw_ret);
30                         GLib.Marshaller.Free (native_tag);
31                         return ret;
32                 }
33
34                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
35                 static extern int gst_tag_get_flag(IntPtr tag);
36
37                 public static Gst.TagFlag GetFlag(string tag) {
38                         IntPtr native_tag = GLib.Marshaller.StringToPtrGStrdup (tag);
39                         int raw_ret = gst_tag_get_flag(native_tag);
40                         Gst.TagFlag ret = (Gst.TagFlag) raw_ret;
41                         GLib.Marshaller.Free (native_tag);
42                         return ret;
43                 }
44
45                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
46                 static extern IntPtr gst_tag_get_nick(IntPtr tag);
47
48                 public static string GetNick(string tag) {
49                         IntPtr native_tag = GLib.Marshaller.StringToPtrGStrdup (tag);
50                         IntPtr raw_ret = gst_tag_get_nick(native_tag);
51                         string ret = GLib.Marshaller.Utf8PtrToString (raw_ret);
52                         GLib.Marshaller.Free (native_tag);
53                         return ret;
54                 }
55
56                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
57                 static extern IntPtr gst_tag_get_type(IntPtr tag);
58
59                 public static GLib.GType GetType(string tag) {
60                         IntPtr native_tag = GLib.Marshaller.StringToPtrGStrdup (tag);
61                         IntPtr raw_ret = gst_tag_get_type(native_tag);
62                         GLib.GType ret = new GLib.GType(raw_ret);
63                         GLib.Marshaller.Free (native_tag);
64                         return ret;
65                 }
66
67                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
68                 static extern bool gst_tag_is_fixed(IntPtr tag);
69
70                 public static bool IsFixed(string tag) {
71                         IntPtr native_tag = GLib.Marshaller.StringToPtrGStrdup (tag);
72                         bool raw_ret = gst_tag_is_fixed(native_tag);
73                         bool ret = raw_ret;
74                         GLib.Marshaller.Free (native_tag);
75                         return ret;
76                 }
77
78                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
79                 static extern bool gst_tag_list_copy_value(IntPtr dest, IntPtr list, IntPtr tag);
80
81                 public static bool ListCopyValue(ref GLib.Value dest, Gst.TagList list, string tag) {
82                         IntPtr native_dest = GLib.Marshaller.StructureToPtrAlloc (dest);
83                         IntPtr native_tag = GLib.Marshaller.StringToPtrGStrdup (tag);
84                         bool raw_ret = gst_tag_list_copy_value(native_dest, list == null ? IntPtr.Zero : list.Handle, native_tag);
85                         bool ret = raw_ret;
86                         dest = (GLib.Value) Marshal.PtrToStructure (native_dest, typeof (GLib.Value));
87                         Marshal.FreeHGlobal (native_dest);
88                         GLib.Marshaller.Free (native_tag);
89                         return ret;
90                 }
91
92                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
93                 static extern void gst_tag_merge_strings_with_comma(IntPtr dest, IntPtr src);
94
95                 public static GLib.Value MergeStringsWithComma(GLib.Value src) {
96                         GLib.Value dest;
97                         IntPtr native_dest = Marshal.AllocHGlobal (Marshal.SizeOf (typeof (GLib.Value)));
98                         IntPtr native_src = GLib.Marshaller.StructureToPtrAlloc (src);
99                         gst_tag_merge_strings_with_comma(native_dest, native_src);
100                         dest = (GLib.Value) Marshal.PtrToStructure (native_dest, typeof (GLib.Value));
101                         Marshal.FreeHGlobal (native_dest);
102                         Marshal.FreeHGlobal (native_src);
103                         return dest;
104                 }
105
106                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
107                 static extern void gst_tag_merge_use_first(IntPtr dest, IntPtr src);
108
109                 public static GLib.Value MergeUseFirst(GLib.Value src) {
110                         GLib.Value dest;
111                         IntPtr native_dest = Marshal.AllocHGlobal (Marshal.SizeOf (typeof (GLib.Value)));
112                         IntPtr native_src = GLib.Marshaller.StructureToPtrAlloc (src);
113                         gst_tag_merge_use_first(native_dest, native_src);
114                         dest = (GLib.Value) Marshal.PtrToStructure (native_dest, typeof (GLib.Value));
115                         Marshal.FreeHGlobal (native_dest);
116                         Marshal.FreeHGlobal (native_src);
117                         return dest;
118                 }
119
120                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
121                 static extern bool gst_tag_check_language_code(IntPtr lang_code);
122
123                 public static bool CheckLanguageCode(string lang_code) {
124                         IntPtr native_lang_code = GLib.Marshaller.StringToPtrGStrdup (lang_code);
125                         bool raw_ret = gst_tag_check_language_code(native_lang_code);
126                         bool ret = raw_ret;
127                         GLib.Marshaller.Free (native_lang_code);
128                         return ret;
129                 }
130
131                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
132                 static extern IntPtr gst_tag_freeform_string_to_utf8(IntPtr[] data, int size, IntPtr[] env_vars);
133
134                 public static string FreeformStringToUtf8(string[] data, int size, string[] env_vars) {
135                         int cnt_data = data == null ? 0 : data.Length;
136                         IntPtr[] native_data = new IntPtr [cnt_data];
137                         for (int i = 0; i < cnt_data; i++)
138                                 native_data [i] = GLib.Marshaller.StringToPtrGStrdup(data[i]);
139                         int cnt_env_vars = env_vars == null ? 0 : env_vars.Length;
140                         IntPtr[] native_env_vars = new IntPtr [cnt_env_vars + 1];
141                         for (int i = 0; i < cnt_env_vars; i++)
142                                 native_env_vars [i] = GLib.Marshaller.StringToPtrGStrdup(env_vars[i]);
143                         native_env_vars [cnt_env_vars] = IntPtr.Zero;
144                         IntPtr raw_ret = gst_tag_freeform_string_to_utf8(native_data, size, native_env_vars);
145                         string ret = GLib.Marshaller.PtrToStringGFree(raw_ret);
146                         return ret;
147                 }
148
149                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
150                 static extern IntPtr gst_tag_from_id3_tag(IntPtr id3_tag);
151
152                 public static string FromId3Tag(string id3_tag) {
153                         IntPtr native_id3_tag = GLib.Marshaller.StringToPtrGStrdup (id3_tag);
154                         IntPtr raw_ret = gst_tag_from_id3_tag(native_id3_tag);
155                         string ret = GLib.Marshaller.Utf8PtrToString (raw_ret);
156                         GLib.Marshaller.Free (native_id3_tag);
157                         return ret;
158                 }
159
160                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
161                 static extern IntPtr gst_tag_from_id3_user_tag(IntPtr type, IntPtr id3_user_tag);
162
163                 public static string FromId3UserTag(string type, string id3_user_tag) {
164                         IntPtr native_type = GLib.Marshaller.StringToPtrGStrdup (type);
165                         IntPtr native_id3_user_tag = GLib.Marshaller.StringToPtrGStrdup (id3_user_tag);
166                         IntPtr raw_ret = gst_tag_from_id3_user_tag(native_type, native_id3_user_tag);
167                         string ret = GLib.Marshaller.Utf8PtrToString (raw_ret);
168                         GLib.Marshaller.Free (native_type);
169                         GLib.Marshaller.Free (native_id3_user_tag);
170                         return ret;
171                 }
172
173                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
174                 static extern IntPtr gst_tag_from_vorbis_tag(IntPtr vorbis_tag);
175
176                 public static string FromVorbisTag(string vorbis_tag) {
177                         IntPtr native_vorbis_tag = GLib.Marshaller.StringToPtrGStrdup (vorbis_tag);
178                         IntPtr raw_ret = gst_tag_from_vorbis_tag(native_vorbis_tag);
179                         string ret = GLib.Marshaller.Utf8PtrToString (raw_ret);
180                         GLib.Marshaller.Free (native_vorbis_tag);
181                         return ret;
182                 }
183
184                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
185                 static extern uint gst_tag_get_id3v2_tag_size(IntPtr buffer);
186
187                 public static uint GetId3v2TagSize(Gst.Buffer buffer) {
188                         uint raw_ret = gst_tag_get_id3v2_tag_size(buffer == null ? IntPtr.Zero : buffer.Handle);
189                         uint ret = raw_ret;
190                         return ret;
191                 }
192
193                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
194                 static extern IntPtr gst_tag_get_language_code_iso_639_1(IntPtr lang_code);
195
196                 public static string GetLanguageCodeIso6391(string lang_code) {
197                         IntPtr native_lang_code = GLib.Marshaller.StringToPtrGStrdup (lang_code);
198                         IntPtr raw_ret = gst_tag_get_language_code_iso_639_1(native_lang_code);
199                         string ret = GLib.Marshaller.Utf8PtrToString (raw_ret);
200                         GLib.Marshaller.Free (native_lang_code);
201                         return ret;
202                 }
203
204                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
205                 static extern IntPtr gst_tag_get_language_code_iso_639_2B(IntPtr lang_code);
206
207                 public static string GetLanguageCodeIso6392B(string lang_code) {
208                         IntPtr native_lang_code = GLib.Marshaller.StringToPtrGStrdup (lang_code);
209                         IntPtr raw_ret = gst_tag_get_language_code_iso_639_2B(native_lang_code);
210                         string ret = GLib.Marshaller.Utf8PtrToString (raw_ret);
211                         GLib.Marshaller.Free (native_lang_code);
212                         return ret;
213                 }
214
215                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
216                 static extern IntPtr gst_tag_get_language_code_iso_639_2T(IntPtr lang_code);
217
218                 public static string GetLanguageCodeIso6392T(string lang_code) {
219                         IntPtr native_lang_code = GLib.Marshaller.StringToPtrGStrdup (lang_code);
220                         IntPtr raw_ret = gst_tag_get_language_code_iso_639_2T(native_lang_code);
221                         string ret = GLib.Marshaller.Utf8PtrToString (raw_ret);
222                         GLib.Marshaller.Free (native_lang_code);
223                         return ret;
224                 }
225
226                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
227                 static extern IntPtr gst_tag_get_language_codes();
228
229                 public static string[] GetLanguageCodes() {
230                         IntPtr raw_ret = gst_tag_get_language_codes();
231                         string[] ret = GLib.Marshaller.NullTermPtrToStringArray (raw_ret, true);
232                         return ret;
233                 }
234
235                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
236                 static extern IntPtr gst_tag_get_language_name(IntPtr language_code);
237
238                 public static string GetLanguageName(string language_code) {
239                         IntPtr native_language_code = GLib.Marshaller.StringToPtrGStrdup (language_code);
240                         IntPtr raw_ret = gst_tag_get_language_name(native_language_code);
241                         string ret = GLib.Marshaller.Utf8PtrToString (raw_ret);
242                         GLib.Marshaller.Free (native_language_code);
243                         return ret;
244                 }
245
246                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
247                 static extern IntPtr gst_tag_get_license_description(IntPtr license_ref);
248
249                 public static string GetLicenseDescription(string license_ref) {
250                         IntPtr native_license_ref = GLib.Marshaller.StringToPtrGStrdup (license_ref);
251                         IntPtr raw_ret = gst_tag_get_license_description(native_license_ref);
252                         string ret = GLib.Marshaller.Utf8PtrToString (raw_ret);
253                         GLib.Marshaller.Free (native_license_ref);
254                         return ret;
255                 }
256
257                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
258                 static extern int gst_tag_get_license_flags(IntPtr license_ref);
259
260                 public static Gst.Tags.TagLicenseFlags GetLicenseFlags(string license_ref) {
261                         IntPtr native_license_ref = GLib.Marshaller.StringToPtrGStrdup (license_ref);
262                         int raw_ret = gst_tag_get_license_flags(native_license_ref);
263                         Gst.Tags.TagLicenseFlags ret = (Gst.Tags.TagLicenseFlags) raw_ret;
264                         GLib.Marshaller.Free (native_license_ref);
265                         return ret;
266                 }
267
268                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
269                 static extern IntPtr gst_tag_get_license_jurisdiction(IntPtr license_ref);
270
271                 public static string GetLicenseJurisdiction(string license_ref) {
272                         IntPtr native_license_ref = GLib.Marshaller.StringToPtrGStrdup (license_ref);
273                         IntPtr raw_ret = gst_tag_get_license_jurisdiction(native_license_ref);
274                         string ret = GLib.Marshaller.Utf8PtrToString (raw_ret);
275                         GLib.Marshaller.Free (native_license_ref);
276                         return ret;
277                 }
278
279                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
280                 static extern IntPtr gst_tag_get_license_nick(IntPtr license_ref);
281
282                 public static string GetLicenseNick(string license_ref) {
283                         IntPtr native_license_ref = GLib.Marshaller.StringToPtrGStrdup (license_ref);
284                         IntPtr raw_ret = gst_tag_get_license_nick(native_license_ref);
285                         string ret = GLib.Marshaller.Utf8PtrToString (raw_ret);
286                         GLib.Marshaller.Free (native_license_ref);
287                         return ret;
288                 }
289
290                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
291                 static extern IntPtr gst_tag_get_license_title(IntPtr license_ref);
292
293                 public static string GetLicenseTitle(string license_ref) {
294                         IntPtr native_license_ref = GLib.Marshaller.StringToPtrGStrdup (license_ref);
295                         IntPtr raw_ret = gst_tag_get_license_title(native_license_ref);
296                         string ret = GLib.Marshaller.Utf8PtrToString (raw_ret);
297                         GLib.Marshaller.Free (native_license_ref);
298                         return ret;
299                 }
300
301                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
302                 static extern IntPtr gst_tag_get_license_version(IntPtr license_ref);
303
304                 public static string GetLicenseVersion(string license_ref) {
305                         IntPtr native_license_ref = GLib.Marshaller.StringToPtrGStrdup (license_ref);
306                         IntPtr raw_ret = gst_tag_get_license_version(native_license_ref);
307                         string ret = GLib.Marshaller.Utf8PtrToString (raw_ret);
308                         GLib.Marshaller.Free (native_license_ref);
309                         return ret;
310                 }
311
312                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
313                 static extern IntPtr gst_tag_get_licenses();
314
315                 public static string[] GetLicenses() {
316                         IntPtr raw_ret = gst_tag_get_licenses();
317                         string[] ret = GLib.Marshaller.NullTermPtrToStringArray (raw_ret, true);
318                         return ret;
319                 }
320
321                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
322                 static extern uint gst_tag_id3_genre_count();
323
324                 public static uint Id3GenreCount() {
325                         uint raw_ret = gst_tag_id3_genre_count();
326                         uint ret = raw_ret;
327                         return ret;
328                 }
329
330                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
331                 static extern IntPtr gst_tag_id3_genre_get(uint id);
332
333                 public static string Id3GenreGet(uint id) {
334                         IntPtr raw_ret = gst_tag_id3_genre_get(id);
335                         string ret = GLib.Marshaller.Utf8PtrToString (raw_ret);
336                         return ret;
337                 }
338
339                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
340                 static extern IntPtr gst_tag_image_data_to_image_sample(byte[] image_data, uint image_data_len, int image_type);
341
342                 public static Gst.Sample ImageDataToImageSample(byte[] image_data, uint image_data_len, Gst.Tags.TagImageType image_type) {
343                         IntPtr raw_ret = gst_tag_image_data_to_image_sample(image_data, image_data_len, (int) image_type);
344                         Gst.Sample ret = raw_ret == IntPtr.Zero ? null : (Gst.Sample) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Sample), true);
345                         return ret;
346                 }
347
348                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
349                 static extern bool gst_tag_list_add_id3_image(IntPtr tag_list, byte[] image_data, uint image_data_len, uint id3_picture_type);
350
351                 public static bool ListAddId3Image(Gst.TagList tag_list, byte[] image_data, uint image_data_len, uint id3_picture_type) {
352                         bool raw_ret = gst_tag_list_add_id3_image(tag_list == null ? IntPtr.Zero : tag_list.Handle, image_data, image_data_len, id3_picture_type);
353                         bool ret = raw_ret;
354                         return ret;
355                 }
356
357                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
358                 static extern IntPtr gst_tag_list_from_exif_buffer(IntPtr buffer, int byte_order, uint base_offset);
359
360                 public static Gst.TagList ListFromExifBuffer(Gst.Buffer buffer, int byte_order, uint base_offset) {
361                         IntPtr raw_ret = gst_tag_list_from_exif_buffer(buffer == null ? IntPtr.Zero : buffer.Handle, byte_order, base_offset);
362                         Gst.TagList ret = raw_ret == IntPtr.Zero ? null : (Gst.TagList) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.TagList), true);
363                         return ret;
364                 }
365
366                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
367                 static extern IntPtr gst_tag_list_from_exif_buffer_with_tiff_header(IntPtr buffer);
368
369                 public static Gst.TagList ListFromExifBufferWithTiffHeader(Gst.Buffer buffer) {
370                         IntPtr raw_ret = gst_tag_list_from_exif_buffer_with_tiff_header(buffer == null ? IntPtr.Zero : buffer.Handle);
371                         Gst.TagList ret = raw_ret == IntPtr.Zero ? null : (Gst.TagList) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.TagList), true);
372                         return ret;
373                 }
374
375                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
376                 static extern IntPtr gst_tag_list_from_id3v2_tag(IntPtr buffer);
377
378                 public static Gst.TagList ListFromId3v2Tag(Gst.Buffer buffer) {
379                         IntPtr raw_ret = gst_tag_list_from_id3v2_tag(buffer == null ? IntPtr.Zero : buffer.Handle);
380                         Gst.TagList ret = raw_ret == IntPtr.Zero ? null : (Gst.TagList) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.TagList), true);
381                         return ret;
382                 }
383
384                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
385                 static extern IntPtr gst_tag_list_from_vorbiscomment(byte[] data, UIntPtr size, byte[] id_data, uint id_data_length, out IntPtr vendor_string);
386
387                 public static Gst.TagList ListFromVorbiscomment(byte[] data, ulong size, byte[] id_data, uint id_data_length, out string vendor_string) {
388                         IntPtr native_vendor_string;
389                         IntPtr raw_ret = gst_tag_list_from_vorbiscomment(data, new UIntPtr (size), id_data, id_data_length, out native_vendor_string);
390                         Gst.TagList ret = raw_ret == IntPtr.Zero ? null : (Gst.TagList) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.TagList), true);
391                         vendor_string = GLib.Marshaller.PtrToStringGFree(native_vendor_string);
392                         return ret;
393                 }
394
395                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
396                 static extern IntPtr gst_tag_list_from_vorbiscomment_buffer(IntPtr buffer, byte[] id_data, uint id_data_length, out IntPtr vendor_string);
397
398                 public static Gst.TagList ListFromVorbiscommentBuffer(Gst.Buffer buffer, byte[] id_data, uint id_data_length, out string vendor_string) {
399                         IntPtr native_vendor_string;
400                         IntPtr raw_ret = gst_tag_list_from_vorbiscomment_buffer(buffer == null ? IntPtr.Zero : buffer.Handle, id_data, id_data_length, out native_vendor_string);
401                         Gst.TagList ret = raw_ret == IntPtr.Zero ? null : (Gst.TagList) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.TagList), true);
402                         vendor_string = GLib.Marshaller.PtrToStringGFree(native_vendor_string);
403                         return ret;
404                 }
405
406                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
407                 static extern IntPtr gst_tag_list_from_xmp_buffer(IntPtr buffer);
408
409                 public static Gst.TagList ListFromXmpBuffer(Gst.Buffer buffer) {
410                         IntPtr raw_ret = gst_tag_list_from_xmp_buffer(buffer == null ? IntPtr.Zero : buffer.Handle);
411                         Gst.TagList ret = raw_ret == IntPtr.Zero ? null : (Gst.TagList) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.TagList), true);
412                         return ret;
413                 }
414
415                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
416                 static extern IntPtr gst_tag_list_new_from_id3v1(byte[] data);
417
418                 public static Gst.TagList ListNewFromId3v1(byte[] data) {
419                         data = new byte[128];
420                         IntPtr raw_ret = gst_tag_list_new_from_id3v1(data);
421                         Gst.TagList ret = raw_ret == IntPtr.Zero ? null : (Gst.TagList) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.TagList), true);
422                         return ret;
423                 }
424
425                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
426                 static extern IntPtr gst_tag_list_to_exif_buffer(IntPtr taglist, int byte_order, uint base_offset);
427
428                 public static Gst.Buffer ListToExifBuffer(Gst.TagList taglist, int byte_order, uint base_offset) {
429                         IntPtr raw_ret = gst_tag_list_to_exif_buffer(taglist == null ? IntPtr.Zero : taglist.Handle, byte_order, base_offset);
430                         Gst.Buffer ret = raw_ret == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Buffer), true);
431                         return ret;
432                 }
433
434                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
435                 static extern IntPtr gst_tag_list_to_exif_buffer_with_tiff_header(IntPtr taglist);
436
437                 public static Gst.Buffer ListToExifBufferWithTiffHeader(Gst.TagList taglist) {
438                         IntPtr raw_ret = gst_tag_list_to_exif_buffer_with_tiff_header(taglist == null ? IntPtr.Zero : taglist.Handle);
439                         Gst.Buffer ret = raw_ret == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Buffer), true);
440                         return ret;
441                 }
442
443                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
444                 static extern IntPtr gst_tag_list_to_vorbiscomment_buffer(IntPtr list, byte[] id_data, uint id_data_length, IntPtr vendor_string);
445
446                 public static Gst.Buffer ListToVorbiscommentBuffer(Gst.TagList list, byte[] id_data, uint id_data_length, string vendor_string) {
447                         IntPtr native_vendor_string = GLib.Marshaller.StringToPtrGStrdup (vendor_string);
448                         IntPtr raw_ret = gst_tag_list_to_vorbiscomment_buffer(list == null ? IntPtr.Zero : list.Handle, id_data, id_data_length, native_vendor_string);
449                         Gst.Buffer ret = raw_ret == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Buffer), true);
450                         GLib.Marshaller.Free (native_vendor_string);
451                         return ret;
452                 }
453
454                 public static Gst.Buffer ListToVorbiscommentBuffer(Gst.TagList list, byte[] id_data, uint id_data_length) {
455                         return ListToVorbiscommentBuffer (list, id_data, id_data_length, null);
456                 }
457
458                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
459                 static extern IntPtr gst_tag_list_to_xmp_buffer(IntPtr list, bool read_only, IntPtr[] schemas);
460
461                 public static Gst.Buffer ListToXmpBuffer(Gst.TagList list, bool read_only, string[] schemas) {
462                         int cnt_schemas = schemas == null ? 0 : schemas.Length;
463                         IntPtr[] native_schemas = new IntPtr [cnt_schemas + 1];
464                         for (int i = 0; i < cnt_schemas; i++)
465                                 native_schemas [i] = GLib.Marshaller.StringToPtrGStrdup(schemas[i]);
466                         native_schemas [cnt_schemas] = IntPtr.Zero;
467                         IntPtr raw_ret = gst_tag_list_to_xmp_buffer(list == null ? IntPtr.Zero : list.Handle, read_only, native_schemas);
468                         Gst.Buffer ret = raw_ret == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Buffer), true);
469                         return ret;
470                 }
471
472                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
473                 static extern bool gst_tag_parse_extended_comment(IntPtr ext_comment, out IntPtr key, out IntPtr lang, out IntPtr value, bool fail_if_no_key);
474
475                 public static bool ParseExtendedComment(string ext_comment, out string key, out string lang, out string value, bool fail_if_no_key) {
476                         IntPtr native_ext_comment = GLib.Marshaller.StringToPtrGStrdup (ext_comment);
477                         IntPtr native_key;
478                         IntPtr native_lang;
479                         IntPtr native_value;
480                         bool raw_ret = gst_tag_parse_extended_comment(native_ext_comment, out native_key, out native_lang, out native_value, fail_if_no_key);
481                         bool ret = raw_ret;
482                         GLib.Marshaller.Free (native_ext_comment);
483                         key = GLib.Marshaller.PtrToStringGFree(native_key);
484                         lang = GLib.Marshaller.PtrToStringGFree(native_lang);
485                         value = GLib.Marshaller.PtrToStringGFree(native_value);
486                         return ret;
487                 }
488
489                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
490                 static extern void gst_tag_register_musicbrainz_tags();
491
492                 public static void RegisterMusicbrainzTags() {
493                         gst_tag_register_musicbrainz_tags();
494                 }
495
496                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
497                 static extern IntPtr gst_tag_to_id3_tag(IntPtr gst_tag);
498
499                 public static string ToId3Tag(string gst_tag) {
500                         IntPtr native_gst_tag = GLib.Marshaller.StringToPtrGStrdup (gst_tag);
501                         IntPtr raw_ret = gst_tag_to_id3_tag(native_gst_tag);
502                         string ret = GLib.Marshaller.Utf8PtrToString (raw_ret);
503                         GLib.Marshaller.Free (native_gst_tag);
504                         return ret;
505                 }
506
507                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
508                 static extern IntPtr gst_tag_to_vorbis_comments(IntPtr list, IntPtr tag);
509
510                 public static string[] ToVorbisComments(Gst.TagList list, string tag) {
511                         IntPtr native_tag = GLib.Marshaller.StringToPtrGStrdup (tag);
512                         IntPtr raw_ret = gst_tag_to_vorbis_comments(list == null ? IntPtr.Zero : list.Handle, native_tag);
513                         string[] ret = (string[]) GLib.Marshaller.ListPtrToArray (raw_ret, typeof(GLib.List), true, true, typeof(string));
514                         GLib.Marshaller.Free (native_tag);
515                         return ret;
516                 }
517
518                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
519                 static extern IntPtr gst_tag_to_vorbis_tag(IntPtr gst_tag);
520
521                 public static string ToVorbisTag(string gst_tag) {
522                         IntPtr native_gst_tag = GLib.Marshaller.StringToPtrGStrdup (gst_tag);
523                         IntPtr raw_ret = gst_tag_to_vorbis_tag(native_gst_tag);
524                         string ret = GLib.Marshaller.Utf8PtrToString (raw_ret);
525                         GLib.Marshaller.Free (native_gst_tag);
526                         return ret;
527                 }
528
529                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
530                 static extern IntPtr gst_tag_xmp_list_schemas();
531
532                 public static string[] XmpListSchemas() {
533                         IntPtr raw_ret = gst_tag_xmp_list_schemas();
534                         string[] ret = GLib.Marshaller.NullTermPtrToStringArray (raw_ret, false);
535                         return ret;
536                 }
537
538 #endregion
539         }
540 }