]> iEval git - audio-opusfile.git/blame - lib/Audio/Opusfile/Tags.pm
Implement PictureTag and (partially) Head
[audio-opusfile.git] / lib / Audio / Opusfile / Tags.pm
CommitLineData
a3f1cbda
MG
1package Audio::Opusfile::Tags;
2# Don't load this module directly, load Audio::Opusfile instead
3
4use 5.014000;
5use strict;
6use warnings;
7use subs qw/query query_count/;
8
9sub query_all {
10 my ($tags, $tag) = @_;
11 my $count = $tags->query_count($tag);
12 map { $tags->query($tag, $_ - 1) } 1 .. $count
13}
14
151;
16__END__
17
18=encoding utf-8
19
20=head1 NAME
21
22Audio::Opusfile::Tags - The tags of an Ogg Opus file
23
24=head1 SYNOPSIS
25
26 use Audio::Opusfile;
27 my $of = Audio::Opusfile->new_from_file('file.opus');
28 my $tags = $of->tags;
29 say $tags->query("COMPOSER"); # Composer 1
30 say $tags->query_count("COMPOSER"); # 3
31 say join ", ", $tags->query_all("COMPOSER");
32 # Composer 1, Composer 2, Composer 3
33
34=head1 DESCRIPTION
35
36This module represents the tags of an Ogg Opus file. See the
37documentation of L<Audio::Opusfile> for more information.
38
39=head1 METHODS
40
41=over
42
43=item $tags->B<query_count>(I<$tag>)
44
45Returns the number of values of a tag.
46
47=item $tags->B<query>(I<$tag>[, I<$index>])
48
49Returns the I<$index>th value of a tag. If I<$index> is not provided,
50the first value is returned.
51
52=item $tags->B<query_all>(I<$tag>)
53
54Returns a list of all values of a tag, in order.
55
56=back
57
58=head1 SEE ALSO
59
60L<Audio::Opusfile>,
61L<http://opus-codec.org/>,
62L<http://opus-codec.org/docs/opusfile_api-0.7/index.html>
63
64=head1 AUTHOR
65
66Marius Gavrilescu, E<lt>marius@ieval.roE<gt>
67
68=head1 COPYRIGHT AND LICENSE
69
70Copyright (C) 2016 by Marius Gavrilescu
71
72This library is free software; you can redistribute it and/or modify
73it under the same terms as Perl itself, either Perl version 5.24.0 or,
74at your option, any later version of Perl 5 you may have available.
75
76
77=cut
This page took 0.028308 seconds and 4 git commands to generate.