Bump version and update Changes
[audio-opusfile.git] / lib / Audio / Opusfile / Tags.pm
1 package Audio::Opusfile::Tags;
2 # Don't load this module directly, load Audio::Opusfile instead
3
4 use 5.014000;
5 use strict;
6 use warnings;
7 use subs qw/query query_count/;
8
9 our $VERSION = '0.002';
10
11 sub query_all {
12 my ($tags, $tag) = @_;
13 my $count = $tags->query_count($tag);
14 map { $tags->query($tag, $_ - 1) } 1 .. $count
15 }
16
17 1;
18 __END__
19
20 =encoding utf-8
21
22 =head1 NAME
23
24 Audio::Opusfile::Tags - The tags of an Ogg Opus file
25
26 =head1 SYNOPSIS
27
28 use Audio::Opusfile;
29 my $of = Audio::Opusfile->new_from_file('file.opus');
30 my $tags = $of->tags;
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
35
36 =head1 DESCRIPTION
37
38 This module represents the tags of an Ogg Opus file. See the
39 documentation of L<Audio::Opusfile> for more information.
40
41 =head1 METHODS
42
43 =over
44
45 =item $tags->B<query_count>(I<$tag>)
46
47 Returns the number of values of a tag.
48
49 =item $tags->B<query>(I<$tag>[, I<$index>])
50
51 Returns the I<$index>th value of a tag. If I<$index> is not provided,
52 the first value is returned.
53
54 =item $tags->B<query_all>(I<$tag>)
55
56 Returns a list of all values of a tag, in order.
57
58 =back
59
60 =head1 SEE ALSO
61
62 L<Audio::Opusfile>,
63 L<http://opus-codec.org/>,
64 L<http://opus-codec.org/docs/opusfile_api-0.7/index.html>
65
66 =head1 AUTHOR
67
68 Marius Gavrilescu, E<lt>marius@ieval.roE<gt>
69
70 =head1 COPYRIGHT AND LICENSE
71
72 Copyright (C) 2016 by Marius Gavrilescu
73
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.
77
78
79 =cut
This page took 0.023209 seconds and 4 git commands to generate.