package Audio::TagLib::Ogg::XiphComment; use 5.008003; use strict; use warnings; our $VERSION = '1.41'; use Audio::TagLib; our @ISA = qw(Audio::TagLib::Tag); # Preloaded methods go here. 1; __END__ # Below is stub documentation for your module. You'd better edit it! =head1 NAME Audio::TagLib::Ogg::XiphComment - Ogg Vorbis comment implementation =head1 SYNOPSIS use Audio::TagLib::Ogg::XiphComment; my $i = Audio::TagLib::Ogg::XiphComment->new(); $i->setGenre(Audio::TagLib::String->new("genre")); print $i->genre()->toCString(), "\n"; # got "genre" =head1 DESCRIPTION This class is an implementation of the Ogg Vorbis comment specification, to be found in section 5 of the Ogg Vorbis specification. Because this format is also used in other (currently unsupported) Xiph.org formats, it has been made part of a generic implementation rather than being limited to strictly Vorbis. Vorbis comments are a simple vector of keys and values, called fields. Multiple values for a given key are supported. see I =over =item I Constructs an empty Vorbis comment. =item I $data)> Constructs a Vorbis comment from $data. =item I Destroys this instance of the XiphComment. =item I title()> =item I artist()> =item I album()> =item I comment()> =item I genre()> =item I =item I =item I $s)> =item I $s)> =item I $s)> =item I $s)> =item I =item I =item I see L =item I Returns the number of fields present in the comment. =item I fieldListMap()> Returns a reference to the map of field lists. Because Xiph comments support multiple fields with the same key, a pure Map would not work. As such this is a Map of string lists, keyed on the comment field name. The standard set of Xiph/Vorbis fields (which may or may not be contained in any specific comment) is: qw(TITLE VERSION ALBUM ARTIST PERFORMER COPYRIGHT ORGRAIZATION DESCRIPTION GENRE DATE LOCATION CONTACT ISRC) For a more detailed description of these fields, please see the Ogg Vorbis specification, section 5.2.2.1. B The Ogg Vorbis comment specification does allow these key values to be either upper or lower case. However, it is conventional for them to be upper case. As such, Audio::TagLib, when parsing a Xiph/Vorbis comment, converts all fields to uppercase. When you are using this data structure, you will need to specify the field name in upper case. B You should not modify this data structure directly, instead use addField() and removeField(). =item I vendorID()> Returns the vendor ID of the Ogg Vorbis encoder. libvorbis 1.0 as the most common case always returns "Xiph.Org libVorbis I 20020717". =item I $key, L $value, BOOL $replace = TRUE)> Add the field specified by $key with the data $value. If $replace is true, then all of the other fields with the same key will be removed frist. If the field value is empty, the field will be removed. =item I $key, L $value = String::null)> Remove the field specified by $key with the data $value. If $value is null, all of the fields with the given key will be removed. =item I render()> Renders the comment to a ByteVector suitable for inserting into a file. =item I render(BOOL $addFramingBit)> Renders the comment to a ByteVector suitable for inserting into a file. If $addFramingBit is true the standard Vorbis comment framing bit will be appended. However some formats (notably FLAC) do not work with this in place. =back =head2 EXPORT None by default. =head1 SEE ALSO L L =head1 AUTHOR Dongxu Ma, Edongxu@cpan.orgE =head1 COPYRIGHT AND LICENSE Copyright (C) 2005 by Dongxu Ma This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.7 or, at your option, any later version of Perl 5 you may have available. =cut