1 // This file was generated by the Gtk# code generator.
2 // Any changes made will be lost if regenerated.
7 using System.Runtime.InteropServices;
9 #region Autogenerated code
10 public partial class Tag {
12 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
13 static extern bool gst_tag_exists(IntPtr tag);
15 public static bool Exists(string tag) {
16 IntPtr native_tag = GLib.Marshaller.StringToPtrGStrdup (tag);
17 bool raw_ret = gst_tag_exists(native_tag);
19 GLib.Marshaller.Free (native_tag);
23 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
24 static extern IntPtr gst_tag_get_description(IntPtr tag);
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);
34 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
35 static extern int gst_tag_get_flag(IntPtr tag);
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);
45 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
46 static extern IntPtr gst_tag_get_nick(IntPtr tag);
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);
56 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
57 static extern IntPtr gst_tag_get_type(IntPtr tag);
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);
67 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
68 static extern bool gst_tag_is_fixed(IntPtr tag);
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);
74 GLib.Marshaller.Free (native_tag);
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);
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);
86 dest = (GLib.Value) Marshal.PtrToStructure (native_dest, typeof (GLib.Value));
87 Marshal.FreeHGlobal (native_dest);
88 GLib.Marshaller.Free (native_tag);
92 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
93 static extern void gst_tag_merge_strings_with_comma(IntPtr dest, IntPtr src);
95 public static GLib.Value MergeStringsWithComma(GLib.Value src) {
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);
106 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
107 static extern void gst_tag_merge_use_first(IntPtr dest, IntPtr src);
109 public static GLib.Value MergeUseFirst(GLib.Value src) {
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);
120 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
121 static extern bool gst_tag_check_language_code(IntPtr lang_code);
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);
127 GLib.Marshaller.Free (native_lang_code);
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);
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);
149 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
150 static extern IntPtr gst_tag_from_id3_tag(IntPtr id3_tag);
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);
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);
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);
173 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
174 static extern IntPtr gst_tag_from_vorbis_tag(IntPtr vorbis_tag);
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);
184 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
185 static extern uint gst_tag_get_id3v2_tag_size(IntPtr buffer);
187 public static uint GetId3v2TagSize(Gst.Buffer buffer) {
188 uint raw_ret = gst_tag_get_id3v2_tag_size(buffer == null ? IntPtr.Zero : buffer.Handle);
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);
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);
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);
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);
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);
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);
226 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
227 static extern IntPtr gst_tag_get_language_codes();
229 public static string[] GetLanguageCodes() {
230 IntPtr raw_ret = gst_tag_get_language_codes();
231 string[] ret = GLib.Marshaller.NullTermPtrToStringArray (raw_ret, true);
235 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
236 static extern IntPtr gst_tag_get_language_name(IntPtr language_code);
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);
246 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
247 static extern IntPtr gst_tag_get_license_description(IntPtr license_ref);
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);
257 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
258 static extern int gst_tag_get_license_flags(IntPtr license_ref);
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);
268 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
269 static extern IntPtr gst_tag_get_license_jurisdiction(IntPtr license_ref);
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);
279 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
280 static extern IntPtr gst_tag_get_license_nick(IntPtr license_ref);
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);
290 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
291 static extern IntPtr gst_tag_get_license_title(IntPtr license_ref);
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);
301 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
302 static extern IntPtr gst_tag_get_license_version(IntPtr license_ref);
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);
312 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
313 static extern IntPtr gst_tag_get_licenses();
315 public static string[] GetLicenses() {
316 IntPtr raw_ret = gst_tag_get_licenses();
317 string[] ret = GLib.Marshaller.NullTermPtrToStringArray (raw_ret, true);
321 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
322 static extern uint gst_tag_id3_genre_count();
324 public static uint Id3GenreCount() {
325 uint raw_ret = gst_tag_id3_genre_count();
330 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
331 static extern IntPtr gst_tag_id3_genre_get(uint id);
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);
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);
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);
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);
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);
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);
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);
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);
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);
375 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
376 static extern IntPtr gst_tag_list_from_id3v2_tag(IntPtr buffer);
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);
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);
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);
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);
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);
406 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
407 static extern IntPtr gst_tag_list_from_xmp_buffer(IntPtr buffer);
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);
415 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
416 static extern IntPtr gst_tag_list_new_from_id3v1(byte[] data);
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
489 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
490 static extern void gst_tag_register_musicbrainz_tags();
492 public static void RegisterMusicbrainzTags() {
493 gst_tag_register_musicbrainz_tags();
496 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
497 static extern IntPtr gst_tag_to_id3_tag(IntPtr gst_tag);
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);
507 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
508 static extern IntPtr gst_tag_to_vorbis_comments(IntPtr list, IntPtr tag);
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);
518 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
519 static extern IntPtr gst_tag_to_vorbis_tag(IntPtr gst_tag);
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);
529 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
530 static extern IntPtr gst_tag_xmp_list_schemas();
532 public static string[] XmpListSchemas() {
533 IntPtr raw_ret = gst_tag_xmp_list_schemas();
534 string[] ret = GLib.Marshaller.NullTermPtrToStringArray (raw_ret, false);