]>
iEval git - audio-opusfile.git/blob - lib/Audio/Opusfile/Tags.pm
8882baab83a307abe48767e8403fd795195a0e86
1 package Audio
::Opusfile
::Tags
;
2 # Don't load this module directly, load Audio::Opusfile instead
7 use subs qw
/query query_count/;
9 our $VERSION = '0.002001';
12 my ($tags, $tag) = @_;
13 my $count = $tags->query_count($tag);
14 map { $tags->query($tag, $_ - 1) } 1 .. $count
24 Audio::Opusfile::Tags - The tags of an Ogg Opus file
29 my $of = Audio::Opusfile->new_from_file('file.opus');
31 say $tags->query("COMPOSER"); # Composer 1
32 say $tags->query_count("COMPOSER"); # 3
33 say join ", ", $tags->query_all("COMPOSER");
34 # Composer 1, Composer 2, Composer 3
38 This module represents the tags of an Ogg Opus file. See the
39 documentation of L<Audio::Opusfile> for more information.
45 =item $tags->B<query_count>(I<$tag>)
47 Returns the number of values of a tag.
49 =item $tags->B<query>(I<$tag>[, I<$index>])
51 Returns the I<$index>th value of a tag. If I<$index> is not provided,
52 the first value is returned.
54 =item $tags->B<query_all>(I<$tag>)
56 Returns a list of all values of a tag, in order.
63 L<http://opus-codec.org/>,
64 L<http://opus-codec.org/docs/opusfile_api-0.7/index.html>
68 Marius Gavrilescu, E<lt>marius@ieval.roE<gt>
70 =head1 COPYRIGHT AND LICENSE
72 Copyright (C) 2016 by Marius Gavrilescu
74 This library is free software; you can redistribute it and/or modify
75 it under the same terms as Perl itself, either Perl version 5.24.0 or,
76 at your option, any later version of Perl 5 you may have available.
This page took 0.049708 seconds and 4 git commands to generate.