1 /* 2 * This file is part of gtkD. 3 * 4 * gtkD is free software; you can redistribute it and/or modify 5 * it under the terms of the GNU Lesser General Public License 6 * as published by the Free Software Foundation; either version 3 7 * of the License, or (at your option) any later version, with 8 * some exceptions, please read the COPYING file. 9 * 10 * gtkD is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * GNU Lesser General Public License for more details. 14 * 15 * You should have received a copy of the GNU Lesser General Public License 16 * along with gtkD; if not, write to the Free Software 17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA 18 */ 19 20 // generated automatically - do not change 21 // find conversion definition on APILookup.txt 22 // implement new conversion functionalities on the wrap.utils pakage 23 24 /* 25 * Conversion parameters: 26 * inFile = gstreamer-GstTagList.html 27 * outPack = gstreamer 28 * outFile = TagList 29 * strct = GstTagList 30 * realStrct= 31 * ctorStrct= 32 * clss = TagList 33 * interf = 34 * class Code: No 35 * interface Code: No 36 * template for: 37 * extend = 38 * implements: 39 * prefixes: 40 * - gst_tag_list_ 41 * - gst_tag_ 42 * omit structs: 43 * omit prefixes: 44 * omit code: 45 * omit signals: 46 * imports: 47 * - glib.Str 48 * - glib.Date 49 * - gobject.Value 50 * - gstreamer.DateTime 51 * - gstreamer.Sample 52 * structWrap: 53 * - GDate* -> Date 54 * - GValue* -> Value 55 * - GstDateTime* -> DateTime 56 * - GstSample* -> Sample 57 * - GstTagList* -> TagList 58 * module aliases: 59 * local aliases: 60 * overrides: 61 * - toString 62 */ 63 64 module gstreamer.TagList; 65 66 public import gstreamerc.gstreamertypes; 67 68 private import gstreamerc.gstreamer; 69 private import glib.ConstructionException; 70 private import gobject.ObjectG; 71 72 private import glib.Str; 73 private import glib.Date; 74 private import gobject.Value; 75 private import gstreamer.DateTime; 76 private import gstreamer.Sample; 77 78 79 80 /** 81 * List of tags and values used to describe media metadata. 82 * 83 * Strings must be in ASCII or UTF-8 encoding. No other encodings are allowed. 84 * 85 * Last reviewed on 2009-06-09 (0.10.23) 86 */ 87 public class TagList 88 { 89 90 /** the main Gtk struct */ 91 protected GstTagList* gstTagList; 92 93 94 /** Get the main Gtk struct */ 95 public GstTagList* getTagListStruct() 96 { 97 return gstTagList; 98 } 99 100 101 /** the main Gtk struct as a void* */ 102 protected void* getStruct() 103 { 104 return cast(void*)gstTagList; 105 } 106 107 /** 108 * Sets our main struct and passes it to the parent class 109 */ 110 public this (GstTagList* gstTagList) 111 { 112 this.gstTagList = gstTagList; 113 } 114 115 /** 116 */ 117 118 /** 119 * Registers a new tag type for the use with GStreamer's type system. If a type 120 * with that name is already registered, that one is used. 121 * The old registration may have used a different type however. So don't rely 122 * on your supplied values. 123 * Important: if you do not supply a merge function the implication will be 124 * that there can only be one single value for this tag in a tag list and 125 * any additional values will silenty be discarded when being added (unless 126 * GST_TAG_MERGE_REPLACE, GST_TAG_MERGE_REPLACE_ALL, or 127 * GST_TAG_MERGE_PREPEND is used as merge mode, in which case the new 128 * value will replace the old one in the list). 129 * The merge function will be called from gst_tag_list_copy_value() when 130 * it is required that one or more values for a tag be condensed into 131 * one single value. This may happen from gst_tag_list_get_string(), 132 * gst_tag_list_get_int(), gst_tag_list_get_double() etc. What will happen 133 * exactly in that case depends on how the tag was registered and if a 134 * merge function was supplied and if so which one. 135 * Two default merge functions are provided: gst_tag_merge_use_first() and 136 * gst_tag_merge_strings_with_comma(). 137 * Params: 138 * name = the name or identifier string 139 * flag = a flag describing the type of tag info 140 * type = the type this data is in 141 * nick = human-readable name 142 * blurb = a human-readable description about this tag 143 * func = function for merging multiple values of this tag, or NULL. [allow-none] 144 */ 145 public static void register(string name, GstTagFlag flag, GType type, string nick, string blurb, GstTagMergeFunc func) 146 { 147 // void gst_tag_register (const gchar *name, GstTagFlag flag, GType type, const gchar *nick, const gchar *blurb, GstTagMergeFunc func); 148 gst_tag_register(Str.toStringz(name), flag, type, Str.toStringz(nick), Str.toStringz(blurb), func); 149 } 150 151 /** 152 * Registers a new tag type for the use with GStreamer's type system. 153 * Same as gst_tag_register(), but name, nick, and blurb must be 154 * static strings or inlined strings, as they will not be copied. (GStreamer 155 * plugins will be made resident once loaded, so this function can be used 156 * even from dynamically loaded plugins.) 157 * Params: 158 * name = the name or identifier string (string constant) 159 * flag = a flag describing the type of tag info 160 * type = the type this data is in 161 * nick = human-readable name or short description (string constant) 162 * blurb = a human-readable description for this tag (string constant) 163 * func = function for merging multiple values of this tag, or NULL. [allow-none] 164 */ 165 public static void registerStatic(string name, GstTagFlag flag, GType type, string nick, string blurb, GstTagMergeFunc func) 166 { 167 // void gst_tag_register_static (const gchar *name, GstTagFlag flag, GType type, const gchar *nick, const gchar *blurb, GstTagMergeFunc func); 168 gst_tag_register_static(Str.toStringz(name), flag, type, Str.toStringz(nick), Str.toStringz(blurb), func); 169 } 170 171 /** 172 * This is a convenience function for the func argument of gst_tag_register(). 173 * It creates a copy of the first value from the list. 174 * Params: 175 * dest = uninitialized GValue to store result in. [out caller-allocates] 176 * src = GValue to copy from 177 */ 178 public static void mergeUseFirst(Value dest, Value src) 179 { 180 // void gst_tag_merge_use_first (GValue *dest, const GValue *src); 181 gst_tag_merge_use_first((dest is null) ? null : dest.getValueStruct(), (src is null) ? null : src.getValueStruct()); 182 } 183 184 /** 185 * This is a convenience function for the func argument of gst_tag_register(). 186 * It concatenates all given strings using a comma. The tag must be registered 187 * as a G_TYPE_STRING or this function will fail. 188 * Params: 189 * dest = uninitialized GValue to store result in. [out caller-allocates] 190 * src = GValue to copy from 191 */ 192 public static void mergeStringsWithComma(Value dest, Value src) 193 { 194 // void gst_tag_merge_strings_with_comma (GValue *dest, const GValue *src); 195 gst_tag_merge_strings_with_comma((dest is null) ? null : dest.getValueStruct(), (src is null) ? null : src.getValueStruct()); 196 } 197 198 /** 199 * Checks if the given type is already registered. 200 * Params: 201 * tag = name of the tag 202 * Returns: TRUE if the type is already registered 203 */ 204 public static int exists(string tag) 205 { 206 // gboolean gst_tag_exists (const gchar *tag); 207 return gst_tag_exists(Str.toStringz(tag)); 208 } 209 210 /** 211 * Gets the GType used for this tag. 212 * Params: 213 * tag = the tag 214 * Returns: the GType of this tag 215 */ 216 public static GType getType(string tag) 217 { 218 // GType gst_tag_get_type (const gchar *tag); 219 return gst_tag_get_type(Str.toStringz(tag)); 220 } 221 222 /** 223 * Returns the human-readable name of this tag, You must not change or free 224 * this string. 225 * Params: 226 * tag = the tag 227 * Returns: the human-readable name of this tag 228 */ 229 public static string getNick(string tag) 230 { 231 // const gchar * gst_tag_get_nick (const gchar *tag); 232 return Str.toString(gst_tag_get_nick(Str.toStringz(tag))); 233 } 234 235 /** 236 * Returns the human-readable description of this tag, You must not change or 237 * free this string. 238 * Params: 239 * tag = the tag 240 * Returns: the human-readable description of this tag 241 */ 242 public static string getDescription(string tag) 243 { 244 // const gchar * gst_tag_get_description (const gchar *tag); 245 return Str.toString(gst_tag_get_description(Str.toStringz(tag))); 246 } 247 248 /** 249 * Gets the flag of tag. 250 * Params: 251 * tag = the tag 252 * Returns: the flag of this tag. 253 */ 254 public static GstTagFlag getFlag(string tag) 255 { 256 // GstTagFlag gst_tag_get_flag (const gchar *tag); 257 return gst_tag_get_flag(Str.toStringz(tag)); 258 } 259 260 /** 261 * Checks if the given tag is fixed. A fixed tag can only contain one value. 262 * Unfixed tags can contain lists of values. 263 * Params: 264 * tag = tag to check 265 * Returns: TRUE, if the given tag is fixed. 266 */ 267 public static int isFixed(string tag) 268 { 269 // gboolean gst_tag_is_fixed (const gchar *tag); 270 return gst_tag_is_fixed(Str.toStringz(tag)); 271 } 272 273 /** 274 * Creates a new empty GstTagList. 275 * Free-function: gst_tag_list_unref 276 * Throws: ConstructionException GTK+ fails to create the object. 277 */ 278 public this () 279 { 280 // GstTagList * gst_tag_list_new_empty (void); 281 auto p = gst_tag_list_new_empty(); 282 if(p is null) 283 { 284 throw new ConstructionException("null returned by gst_tag_list_new_empty()"); 285 } 286 this(cast(GstTagList*) p); 287 } 288 289 /** 290 * Just like gst_tag_list_new(), only that it takes a va_list argument. 291 * Useful mostly for language bindings. 292 * Free-function: gst_tag_list_unref 293 * Params: 294 * varArgs = tag / value pairs to set 295 * Throws: ConstructionException GTK+ fails to create the object. 296 */ 297 public this (void* varArgs) 298 { 299 // GstTagList * gst_tag_list_new_valist (va_list var_args); 300 auto p = gst_tag_list_new_valist(varArgs); 301 if(p is null) 302 { 303 throw new ConstructionException("null returned by gst_tag_list_new_valist(varArgs)"); 304 } 305 this(cast(GstTagList*) p); 306 } 307 308 /** 309 * Deserializes a tag list. 310 * Params: 311 * str = a string created with gst_tag_list_to_string() 312 * Throws: ConstructionException GTK+ fails to create the object. 313 */ 314 public this (string str) 315 { 316 // GstTagList * gst_tag_list_new_from_string (const gchar *str); 317 auto p = gst_tag_list_new_from_string(Str.toStringz(str)); 318 if(p is null) 319 { 320 throw new ConstructionException("null returned by gst_tag_list_new_from_string(Str.toStringz(str))"); 321 } 322 this(cast(GstTagList*) p); 323 } 324 325 /** 326 * Gets the scope of list. 327 * Returns: The scope of list 328 */ 329 public GstTagScope getScope() 330 { 331 // GstTagScope gst_tag_list_get_scope (const GstTagList *list); 332 return gst_tag_list_get_scope(gstTagList); 333 } 334 335 /** 336 * Sets the scope of list to scope. By default the scope 337 * of a taglist is stream scope. 338 */ 339 public void setScope(GstTagScope scop) 340 { 341 // void gst_tag_list_set_scope (GstTagList *list, GstTagScope scope); 342 gst_tag_list_set_scope(gstTagList, scop); 343 } 344 345 /** 346 * Serializes a tag list to a string. 347 * Returns: a newly-allocated string, or NULL in case of an error. The string must be freed with g_free() when no longer needed. 348 */ 349 public override string toString() 350 { 351 // gchar * gst_tag_list_to_string (const GstTagList *list); 352 return Str.toString(gst_tag_list_to_string(gstTagList)); 353 } 354 355 /** 356 * Checks if the given taglist is empty. 357 * Returns: TRUE if the taglist is empty, otherwise FALSE. 358 */ 359 public int isEmpty() 360 { 361 // gboolean gst_tag_list_is_empty (const GstTagList *list); 362 return gst_tag_list_is_empty(gstTagList); 363 } 364 365 /** 366 * Checks if the two given taglists are equal. 367 * Params: 368 * list2 = a GstTagList. 369 * Returns: TRUE if the taglists are equal, otherwise FALSE 370 */ 371 public int isEqual(TagList list2) 372 { 373 // gboolean gst_tag_list_is_equal (const GstTagList *list1, const GstTagList *list2); 374 return gst_tag_list_is_equal(gstTagList, (list2 is null) ? null : list2.getTagListStruct()); 375 } 376 377 /** 378 * Creates a new GstTagList as a copy of the old taglist. The new taglist 379 * will have a refcount of 1, owned by the caller, and will be writable as 380 * a result. 381 * Note that this function is the semantic equivalent of a gst_tag_list_ref() 382 * followed by a gst_tag_list_make_writable(). If you only want to hold on to a 383 * reference to the data, you should use gst_tag_list_ref(). 384 * When you are finished with the taglist, call gst_tag_list_unref() on it. 385 * Returns: the new GstTagList 386 */ 387 public TagList copy() 388 { 389 // GstTagList * gst_tag_list_copy (const GstTagList *taglist); 390 auto p = gst_tag_list_copy(gstTagList); 391 392 if(p is null) 393 { 394 return null; 395 } 396 397 return ObjectG.getDObject!(TagList)(cast(GstTagList*) p); 398 } 399 400 /** 401 * Add a reference to a GstTagList mini object. 402 * From this point on, until the caller calls gst_tag_list_unref() or 403 * gst_tag_list_make_writable(), it is guaranteed that the taglist object will 404 * not change. To use a GstTagList object, you must always have a refcount on 405 * it -- either the one made implicitly by e.g. gst_tag_list_new(), or via 406 * taking one explicitly with this function. 407 * Returns: the same GstTagList mini object. 408 */ 409 public TagList doref() 410 { 411 // GstTagList * gst_tag_list_ref (GstTagList *taglist); 412 auto p = gst_tag_list_ref(gstTagList); 413 414 if(p is null) 415 { 416 return null; 417 } 418 419 return ObjectG.getDObject!(TagList)(cast(GstTagList*) p); 420 } 421 422 /** 423 * Unref a GstTagList, and and free all its memory when the refcount reaches 0. 424 */ 425 public void unref() 426 { 427 // void gst_tag_list_unref (GstTagList *taglist); 428 gst_tag_list_unref(gstTagList); 429 } 430 431 /** 432 * Inserts the tags of the from list into the first list using the given mode. 433 * Params: 434 * from = list to merge from 435 * mode = the mode to use 436 */ 437 public void insert(TagList from, GstTagMergeMode mode) 438 { 439 // void gst_tag_list_insert (GstTagList *into, const GstTagList *from, GstTagMergeMode mode); 440 gst_tag_list_insert(gstTagList, (from is null) ? null : from.getTagListStruct(), mode); 441 } 442 443 /** 444 * Merges the two given lists into a new list. If one of the lists is NULL, a 445 * copy of the other is returned. If both lists are NULL, NULL is returned. 446 * Free-function: gst_tag_list_unref 447 * Params: 448 * list2 = second list to merge 449 * mode = the mode to use 450 * Returns: the new list. [transfer full] 451 */ 452 public TagList merge(TagList list2, GstTagMergeMode mode) 453 { 454 // GstTagList * gst_tag_list_merge (const GstTagList *list1, const GstTagList *list2, GstTagMergeMode mode); 455 auto p = gst_tag_list_merge(gstTagList, (list2 is null) ? null : list2.getTagListStruct(), mode); 456 457 if(p is null) 458 { 459 return null; 460 } 461 462 return ObjectG.getDObject!(TagList)(cast(GstTagList*) p); 463 } 464 465 /** 466 * Checks how many value are stored in this tag list for the given tag. 467 * Params: 468 * tag = the tag to query 469 * Returns: The number of tags stored 470 */ 471 public uint getTagSize(string tag) 472 { 473 // guint gst_tag_list_get_tag_size (const GstTagList *list, const gchar *tag); 474 return gst_tag_list_get_tag_size(gstTagList, Str.toStringz(tag)); 475 } 476 477 /** 478 * Get the number of tags in list. 479 * Returns: The number of tags in list. 480 */ 481 public int nTags() 482 { 483 // gint gst_tag_list_n_tags (const GstTagList *list); 484 return gst_tag_list_n_tags(gstTagList); 485 } 486 487 /** 488 * Get the name of the tag in list at index. 489 * Params: 490 * index = the index 491 * Returns: The name of the tag at index. 492 */ 493 public string nthTagName(uint index) 494 { 495 // const gchar * gst_tag_list_nth_tag_name (const GstTagList *list, guint index); 496 return Str.toString(gst_tag_list_nth_tag_name(gstTagList, index)); 497 } 498 499 /** 500 * Sets the GValue for a given tag using the specified mode. 501 * Params: 502 * mode = the mode to use 503 * tag = tag 504 * value = GValue for this tag 505 */ 506 public void addValue(GstTagMergeMode mode, string tag, Value value) 507 { 508 // void gst_tag_list_add_value (GstTagList *list, GstTagMergeMode mode, const gchar *tag, const GValue *value); 509 gst_tag_list_add_value(gstTagList, mode, Str.toStringz(tag), (value is null) ? null : value.getValueStruct()); 510 } 511 512 /** 513 * Sets the values for the given tags using the specified mode. 514 * Params: 515 * list = list to set tags in 516 * mode = the mode to use 517 * tag = tag 518 * varArgs = tag / value pairs to set 519 */ 520 public void addValist(GstTagMergeMode mode, string tag, void* varArgs) 521 { 522 // void gst_tag_list_add_valist (GstTagList *list, GstTagMergeMode mode, const gchar *tag, va_list var_args); 523 gst_tag_list_add_valist(gstTagList, mode, Str.toStringz(tag), varArgs); 524 } 525 526 /** 527 * Sets the GValues for the given tags using the specified mode. 528 * Params: 529 * list = list to set tags in 530 * mode = the mode to use 531 * tag = tag 532 * varArgs = tag / GValue pairs to set 533 */ 534 public void addValistValues(GstTagMergeMode mode, string tag, void* varArgs) 535 { 536 // void gst_tag_list_add_valist_values (GstTagList *list, GstTagMergeMode mode, const gchar *tag, va_list var_args); 537 gst_tag_list_add_valist_values(gstTagList, mode, Str.toStringz(tag), varArgs); 538 } 539 540 /** 541 * Removes the given tag from the taglist. 542 * Params: 543 * tag = tag to remove 544 */ 545 public void removeTag(string tag) 546 { 547 // void gst_tag_list_remove_tag (GstTagList *list, const gchar *tag); 548 gst_tag_list_remove_tag(gstTagList, Str.toStringz(tag)); 549 } 550 551 /** 552 * Calls the given function for each tag inside the tag list. Note that if there 553 * is no tag, the function won't be called at all. 554 * Params: 555 * func = function to be called for each tag. [scope call] 556 * userData = user specified data. [closure] 557 */ 558 public void foreac(GstTagForeachFunc func, void* userData) 559 { 560 // void gst_tag_list_foreach (const GstTagList *list, GstTagForeachFunc func, gpointer user_data); 561 gst_tag_list_foreach(gstTagList, func, userData); 562 } 563 564 /** 565 * Gets the value that is at the given index for the given tag in the given 566 * list. 567 * Params: 568 * tag = tag to read out 569 * index = number of entry to read out 570 * Returns: The GValue for the specified entry or NULL if the tag wasn't available or the tag doesn't have as many entries. [transfer none] 571 */ 572 public Value getValueIndex(string tag, uint index) 573 { 574 // const GValue * gst_tag_list_get_value_index (const GstTagList *list, const gchar *tag, guint index); 575 auto p = gst_tag_list_get_value_index(gstTagList, Str.toStringz(tag), index); 576 577 if(p is null) 578 { 579 return null; 580 } 581 582 return ObjectG.getDObject!(Value)(cast(GValue*) p); 583 } 584 585 /** 586 * Copies the contents for the given tag into the value, 587 * merging multiple values into one if multiple values are associated 588 * with the tag. 589 * You must g_value_unset() the value after use. 590 * Params: 591 * dest = uninitialized GValue to copy into. [out caller-allocates] 592 * list = list to get the tag from 593 * tag = tag to read out 594 * Returns: TRUE, if a value was copied, FALSE if the tag didn't exist in the given list. 595 */ 596 public static int copyValue(Value dest, TagList list, string tag) 597 { 598 // gboolean gst_tag_list_copy_value (GValue *dest, const GstTagList *list, const gchar *tag); 599 return gst_tag_list_copy_value((dest is null) ? null : dest.getValueStruct(), (list is null) ? null : list.getTagListStruct(), Str.toStringz(tag)); 600 } 601 602 /** 603 * Copies the contents for the given tag into the value, merging multiple values 604 * into one if multiple values are associated with the tag. 605 * Params: 606 * tag = tag to read out 607 * value = location for the result. [out] 608 * Returns: TRUE, if a value was copied, FALSE if the tag didn't exist in the given list. 609 */ 610 public int getBoolean(string tag, out int value) 611 { 612 // gboolean gst_tag_list_get_boolean (const GstTagList *list, const gchar *tag, gboolean *value); 613 return gst_tag_list_get_boolean(gstTagList, Str.toStringz(tag), &value); 614 } 615 616 /** 617 * Gets the value that is at the given index for the given tag in the given 618 * list. 619 * Params: 620 * tag = tag to read out 621 * index = number of entry to read out 622 * value = location for the result. [out] 623 * Returns: TRUE, if a value was copied, FALSE if the tag didn't exist in the given list. 624 */ 625 public int getBooleanIndex(string tag, uint index, out int value) 626 { 627 // gboolean gst_tag_list_get_boolean_index (const GstTagList *list, const gchar *tag, guint index, gboolean *value); 628 return gst_tag_list_get_boolean_index(gstTagList, Str.toStringz(tag), index, &value); 629 } 630 631 /** 632 * Copies the contents for the given tag into the value, merging multiple values 633 * into one if multiple values are associated with the tag. 634 * Params: 635 * tag = tag to read out 636 * value = location for the result. [out] 637 * Returns: TRUE, if a value was copied, FALSE if the tag didn't exist in the given list. 638 */ 639 public int getInt(string tag, out int value) 640 { 641 // gboolean gst_tag_list_get_int (const GstTagList *list, const gchar *tag, gint *value); 642 return gst_tag_list_get_int(gstTagList, Str.toStringz(tag), &value); 643 } 644 645 /** 646 * Gets the value that is at the given index for the given tag in the given 647 * list. 648 * Params: 649 * tag = tag to read out 650 * index = number of entry to read out 651 * value = location for the result. [out] 652 * Returns: TRUE, if a value was copied, FALSE if the tag didn't exist in the given list. 653 */ 654 public int getIntIndex(string tag, uint index, out int value) 655 { 656 // gboolean gst_tag_list_get_int_index (const GstTagList *list, const gchar *tag, guint index, gint *value); 657 return gst_tag_list_get_int_index(gstTagList, Str.toStringz(tag), index, &value); 658 } 659 660 /** 661 * Copies the contents for the given tag into the value, merging multiple values 662 * into one if multiple values are associated with the tag. 663 * Params: 664 * tag = tag to read out 665 * value = location for the result. [out] 666 * Returns: TRUE, if a value was copied, FALSE if the tag didn't exist in the given list. 667 */ 668 public int getUint(string tag, out uint value) 669 { 670 // gboolean gst_tag_list_get_uint (const GstTagList *list, const gchar *tag, guint *value); 671 return gst_tag_list_get_uint(gstTagList, Str.toStringz(tag), &value); 672 } 673 674 /** 675 * Gets the value that is at the given index for the given tag in the given 676 * list. 677 * Params: 678 * tag = tag to read out 679 * index = number of entry to read out 680 * value = location for the result. [out] 681 * Returns: TRUE, if a value was copied, FALSE if the tag didn't exist in the given list. 682 */ 683 public int getUintIndex(string tag, uint index, out uint value) 684 { 685 // gboolean gst_tag_list_get_uint_index (const GstTagList *list, const gchar *tag, guint index, guint *value); 686 return gst_tag_list_get_uint_index(gstTagList, Str.toStringz(tag), index, &value); 687 } 688 689 /** 690 */ 691 public int getInt64(string tag, out long value) 692 { 693 // gboolean gst_tag_list_get_int64 (const GstTagList *list, const gchar *tag, gint64 *value); 694 return gst_tag_list_get_int64(gstTagList, Str.toStringz(tag), &value); 695 } 696 697 /** 698 * Gets the value that is at the given index for the given tag in the given 699 * list. 700 * Params: 701 * tag = tag to read out 702 * index = number of entry to read out 703 * value = location for the result. [out] 704 * Returns: TRUE, if a value was copied, FALSE if the tag didn't exist in the given list. 705 */ 706 public int getInt64_Index(string tag, uint index, out long value) 707 { 708 // gboolean gst_tag_list_get_int64_index (const GstTagList *list, const gchar *tag, guint index, gint64 *value); 709 return gst_tag_list_get_int64_index(gstTagList, Str.toStringz(tag), index, &value); 710 } 711 712 /** 713 * Copies the contents for the given tag into the value, merging multiple values 714 * into one if multiple values are associated with the tag. 715 * Params: 716 * tag = tag to read out 717 * value = location for the result. [out] 718 * Returns: TRUE, if a value was copied, FALSE if the tag didn't exist in the given list. 719 */ 720 public int getUint64(string tag, out ulong value) 721 { 722 // gboolean gst_tag_list_get_uint64 (const GstTagList *list, const gchar *tag, guint64 *value); 723 return gst_tag_list_get_uint64(gstTagList, Str.toStringz(tag), &value); 724 } 725 726 /** 727 * Gets the value that is at the given index for the given tag in the given 728 * list. 729 * Params: 730 * tag = tag to read out 731 * index = number of entry to read out 732 * value = location for the result. [out] 733 * Returns: TRUE, if a value was copied, FALSE if the tag didn't exist in the given list. 734 */ 735 public int getUint64_Index(string tag, uint index, out ulong value) 736 { 737 // gboolean gst_tag_list_get_uint64_index (const GstTagList *list, const gchar *tag, guint index, guint64 *value); 738 return gst_tag_list_get_uint64_index(gstTagList, Str.toStringz(tag), index, &value); 739 } 740 741 /** 742 * Copies the contents for the given tag into the value, merging multiple values 743 * into one if multiple values are associated with the tag. 744 * Params: 745 * tag = tag to read out 746 * value = location for the result. [out] 747 * Returns: TRUE, if a value was copied, FALSE if the tag didn't exist in the given list. 748 */ 749 public int getFloat(string tag, out float value) 750 { 751 // gboolean gst_tag_list_get_float (const GstTagList *list, const gchar *tag, gfloat *value); 752 return gst_tag_list_get_float(gstTagList, Str.toStringz(tag), &value); 753 } 754 755 /** 756 * Gets the value that is at the given index for the given tag in the given 757 * list. 758 * Params: 759 * tag = tag to read out 760 * index = number of entry to read out 761 * value = location for the result. [out] 762 * Returns: TRUE, if a value was copied, FALSE if the tag didn't exist in the given list. 763 */ 764 public int getFloatIndex(string tag, uint index, out float value) 765 { 766 // gboolean gst_tag_list_get_float_index (const GstTagList *list, const gchar *tag, guint index, gfloat *value); 767 return gst_tag_list_get_float_index(gstTagList, Str.toStringz(tag), index, &value); 768 } 769 770 /** 771 * Copies the contents for the given tag into the value, merging multiple values 772 * into one if multiple values are associated with the tag. 773 * Params: 774 * tag = tag to read out 775 * value = location for the result. [out] 776 * Returns: TRUE, if a value was copied, FALSE if the tag didn't exist in the given list. 777 */ 778 public int getDouble(string tag, out double value) 779 { 780 // gboolean gst_tag_list_get_double (const GstTagList *list, const gchar *tag, gdouble *value); 781 return gst_tag_list_get_double(gstTagList, Str.toStringz(tag), &value); 782 } 783 784 /** 785 * Gets the value that is at the given index for the given tag in the given 786 * list. 787 * Params: 788 * tag = tag to read out 789 * index = number of entry to read out 790 * value = location for the result. [out] 791 * Returns: TRUE, if a value was copied, FALSE if the tag didn't exist in the given list. 792 */ 793 public int getDoubleIndex(string tag, uint index, out double value) 794 { 795 // gboolean gst_tag_list_get_double_index (const GstTagList *list, const gchar *tag, guint index, gdouble *value); 796 return gst_tag_list_get_double_index(gstTagList, Str.toStringz(tag), index, &value); 797 } 798 799 /** 800 * Copies the contents for the given tag into the value, possibly merging 801 * multiple values into one if multiple values are associated with the tag. 802 * Use gst_tag_list_get_string_index (list, tag, 0, value) if you want 803 * to retrieve the first string associated with this tag unmodified. 804 * The resulting string in value will be in UTF-8 encoding and should be 805 * freed by the caller using g_free when no longer needed. The 806 * returned string is also guaranteed to be non-NULL and non-empty. 807 * Free-function: g_free 808 * Params: 809 * tag = tag to read out 810 * value = location for the result. [out callee-allocates][transfer full] 811 * Returns: TRUE, if a value was copied, FALSE if the tag didn't exist in the given list. 812 */ 813 public int getString(string tag, out string value) 814 { 815 // gboolean gst_tag_list_get_string (const GstTagList *list, const gchar *tag, gchar **value); 816 char* outvalue = null; 817 818 auto p = gst_tag_list_get_string(gstTagList, Str.toStringz(tag), &outvalue); 819 820 value = Str.toString(outvalue); 821 return p; 822 } 823 824 /** 825 * Gets the value that is at the given index for the given tag in the given 826 * list. 827 * The resulting string in value will be in UTF-8 encoding and should be 828 * freed by the caller using g_free when no longer needed. The 829 * returned string is also guaranteed to be non-NULL and non-empty. 830 * Free-function: g_free 831 * Params: 832 * tag = tag to read out 833 * index = number of entry to read out 834 * value = location for the result. [out callee-allocates][transfer full] 835 * Returns: TRUE, if a value was copied, FALSE if the tag didn't exist in the given list. 836 */ 837 public int getStringIndex(string tag, uint index, out string value) 838 { 839 // gboolean gst_tag_list_get_string_index (const GstTagList *list, const gchar *tag, guint index, gchar **value); 840 char* outvalue = null; 841 842 auto p = gst_tag_list_get_string_index(gstTagList, Str.toStringz(tag), index, &outvalue); 843 844 value = Str.toString(outvalue); 845 return p; 846 } 847 848 /** 849 * Peeks at the value that is at the given index for the given tag in the given 850 * list. 851 * The resulting string in value will be in UTF-8 encoding and doesn't need 852 * to be freed by the caller. The returned string is also guaranteed to 853 * be non-NULL and non-empty. 854 * Params: 855 * tag = tag to read out 856 * index = number of entry to read out 857 * value = location for the result. [out][transfer none] 858 * Returns: TRUE, if a value was set, FALSE if the tag didn't exist in the given list. 859 */ 860 public int peekStringIndex(string tag, uint index, out string value) 861 { 862 // gboolean gst_tag_list_peek_string_index (const GstTagList *list, const gchar *tag, guint index, const gchar **value); 863 char* outvalue = null; 864 865 auto p = gst_tag_list_peek_string_index(gstTagList, Str.toStringz(tag), index, &outvalue); 866 867 value = Str.toString(outvalue); 868 return p; 869 } 870 871 /** 872 * Copies the contents for the given tag into the value, merging multiple values 873 * into one if multiple values are associated with the tag. 874 * Params: 875 * tag = tag to read out 876 * value = location for the result. [out][transfer none] 877 * Returns: TRUE, if a value was copied, FALSE if the tag didn't exist in the given list. 878 */ 879 public int getPointer(string tag, out void* value) 880 { 881 // gboolean gst_tag_list_get_pointer (const GstTagList *list, const gchar *tag, gpointer *value); 882 return gst_tag_list_get_pointer(gstTagList, Str.toStringz(tag), &value); 883 } 884 885 /** 886 * Gets the value that is at the given index for the given tag in the given 887 * list. 888 * Params: 889 * tag = tag to read out 890 * index = number of entry to read out 891 * value = location for the result. [out][transfer none] 892 * Returns: TRUE, if a value was copied, FALSE if the tag didn't exist in the given list. 893 */ 894 public int getPointerIndex(string tag, uint index, out void* value) 895 { 896 // gboolean gst_tag_list_get_pointer_index (const GstTagList *list, const gchar *tag, guint index, gpointer *value); 897 return gst_tag_list_get_pointer_index(gstTagList, Str.toStringz(tag), index, &value); 898 } 899 900 /** 901 * Copies the first date for the given tag in the taglist into the variable 902 * pointed to by value. Free the date with g_date_free() when it is no longer 903 * needed. 904 * Free-function: g_date_free 905 * Params: 906 * tag = tag to read out 907 * value = address of a GDate pointer 908 * variable to store the result into. [out callee-allocates][transfer full] 909 * Returns: TRUE, if a date was copied, FALSE if the tag didn't exist in the given list or if it was NULL. 910 */ 911 public int getDate(string tag, out Date value) 912 { 913 // gboolean gst_tag_list_get_date (const GstTagList *list, const gchar *tag, GDate **value); 914 GDate* outvalue = null; 915 916 auto p = gst_tag_list_get_date(gstTagList, Str.toStringz(tag), &outvalue); 917 918 value = ObjectG.getDObject!(Date)(outvalue); 919 return p; 920 } 921 922 /** 923 * Gets the date that is at the given index for the given tag in the given 924 * list and copies it into the variable pointed to by value. Free the date 925 * with g_date_free() when it is no longer needed. 926 * Free-function: g_date_free 927 * Params: 928 * tag = tag to read out 929 * index = number of entry to read out 930 * value = location for the result. [out callee-allocates][transfer full] 931 * Returns: TRUE, if a value was copied, FALSE if the tag didn't exist in the given list or if it was NULL. 932 */ 933 public int getDateIndex(string tag, uint index, out Date value) 934 { 935 // gboolean gst_tag_list_get_date_index (const GstTagList *list, const gchar *tag, guint index, GDate **value); 936 GDate* outvalue = null; 937 938 auto p = gst_tag_list_get_date_index(gstTagList, Str.toStringz(tag), index, &outvalue); 939 940 value = ObjectG.getDObject!(Date)(outvalue); 941 return p; 942 } 943 944 /** 945 * Copies the first datetime for the given tag in the taglist into the variable 946 * pointed to by value. Unref the date with gst_date_time_unref() when 947 * it is no longer needed. 948 * Free-function: gst_date_time_unref 949 * Params: 950 * tag = tag to read out 951 * value = address of a GstDateTime 952 * pointer variable to store the result into. [out callee-allocates][transfer full] 953 * Returns: TRUE, if a datetime was copied, FALSE if the tag didn't exist in thegiven list or if it was NULL. 954 */ 955 public int getDateTime(string tag, out DateTime value) 956 { 957 // gboolean gst_tag_list_get_date_time (const GstTagList *list, const gchar *tag, GstDateTime **value); 958 GstDateTime* outvalue = null; 959 960 auto p = gst_tag_list_get_date_time(gstTagList, Str.toStringz(tag), &outvalue); 961 962 value = ObjectG.getDObject!(DateTime)(outvalue); 963 return p; 964 } 965 966 /** 967 * Gets the datetime that is at the given index for the given tag in the given 968 * list and copies it into the variable pointed to by value. Unref the datetime 969 * with gst_date_time_unref() when it is no longer needed. 970 * Free-function: gst_date_time_unref 971 * Params: 972 * tag = tag to read out 973 * index = number of entry to read out 974 * value = location for the result. [out callee-allocates][transfer full] 975 * Returns: TRUE, if a value was copied, FALSE if the tag didn't exist in the given list or if it was NULL. 976 */ 977 public int getDateTimeIndex(string tag, uint index, out DateTime value) 978 { 979 // gboolean gst_tag_list_get_date_time_index (const GstTagList *list, const gchar *tag, guint index, GstDateTime **value); 980 GstDateTime* outvalue = null; 981 982 auto p = gst_tag_list_get_date_time_index(gstTagList, Str.toStringz(tag), index, &outvalue); 983 984 value = ObjectG.getDObject!(DateTime)(outvalue); 985 return p; 986 } 987 988 /** 989 * Copies the first sample for the given tag in the taglist into the variable 990 * pointed to by sample. Free the sample with gst_sample_unref() when it is 991 * no longer needed. You can retrieve the buffer from the sample using 992 * gst_sample_get_buffer() and the associated caps (if any) with 993 * gst_sample_get_caps(). 994 * Free-function: gst_sample_unref 995 * Params: 996 * tag = tag to read out 997 * sample = address of a GstSample 998 * pointer variable to store the result into. [out callee-allocates][transfer full] 999 * Returns: TRUE, if a sample was returned, FALSE if the tag didn't exist in the given list or if it was NULL. 1000 */ 1001 public int getSample(string tag, out Sample sample) 1002 { 1003 // gboolean gst_tag_list_get_sample (const GstTagList *list, const gchar *tag, GstSample **sample); 1004 GstSample* outsample = null; 1005 1006 auto p = gst_tag_list_get_sample(gstTagList, Str.toStringz(tag), &outsample); 1007 1008 sample = ObjectG.getDObject!(Sample)(outsample); 1009 return p; 1010 } 1011 1012 /** 1013 * Gets the sample that is at the given index for the given tag in the given 1014 * list and copies it into the variable pointed to by smple. Free the sample 1015 * with gst_sample_unref() when it is no longer needed. You can retrieve the 1016 * buffer from the sample using gst_sample_get_buffer() and the associated 1017 * caps (if any) with gst_sample_get_caps(). 1018 * Free-function: gst_sample_unref 1019 * Params: 1020 * tag = tag to read out 1021 * index = number of entry to read out 1022 * sample = address of a GstSample 1023 * pointer variable to store the result into. [out callee-allocates][transfer full] 1024 * Returns: TRUE, if a sample was copied, FALSE if the tag didn't exist in the given list or if it was NULL. 1025 */ 1026 public int getSampleIndex(string tag, uint index, out Sample sample) 1027 { 1028 // gboolean gst_tag_list_get_sample_index (const GstTagList *list, const gchar *tag, guint index, GstSample **sample); 1029 GstSample* outsample = null; 1030 1031 auto p = gst_tag_list_get_sample_index(gstTagList, Str.toStringz(tag), index, &outsample); 1032 1033 sample = ObjectG.getDObject!(Sample)(outsample); 1034 return p; 1035 } 1036 }