Advertisement
Guest User

Untitled

a guest
Aug 30th, 2019
180
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 0.87 KB | None | 0 0
  1. method nth_tag_name (Int() $index) is also<nth-tag-name> {
  2.     my guint $i = $index;
  3.  
  4.     gst_tag_list_nth_tag_name($!tl, $i);
  5.   }
  6.  
  7.   proto method peek_string_index (|)
  8.       is also<peek-string-index>
  9.   { * }
  10.  
  11.   multi method peek_string_index (Str() $tag, Int() $index, :$all = False) {
  12.     samewith($tag, $index, $, :$all);
  13.   }
  14.   multi peek_string_index (
  15.     Str() $tag,
  16.     Int() $index,
  17.     $value is rw,
  18.     :$all = False
  19.   ) {
  20.     my guint $i = $index;
  21.     my $sa = CArray[Str].new;
  22.     $sa[0] = Str;
  23.     ยป my $rc = gst_tag_list_peek_string_index($!tl, $tag, $i, $sa);
  24.     ($value) = ppr($sa);
  25.     $all.not ?? $value !! ($value, $rc);
  26.   }
  27.  
  28.   method remove_tag (Str() $tag) is also<remove-tag> {
  29.     gst_tag_list_remove_tag($!tl, $tag);
  30.   }
  31.  
  32.   method to_string
  33.     is also<
  34.       to-string
  35.       Str
  36.     >
  37.   {
  38.     gst_tag_list_to_string($!tl);
  39.   }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement