Audio::TagLib::FLAC::File - An implementation of FLAC metadata
use Audio::TagLib::FLAC::File; my $i = Audio::TagLib::FLAC::File->new("sample file.flac"); $i->ID3v2Tag(1)->setTitle(Audio::TagLib::String->new("sample title")); print $i->tag()->title()->toCString(), "\n"; # got "sample title"
This is implementation of FLAC metadata for non-Ogg FLAC files. At some point when Ogg / FLAC is more common there will be a similar implementation under the Ogg hiearchy.
This supports ID3v1, ID3v2 and Xiph style comments as well as reading stream properties from the file.
This implements and provides an interface for FLAC files to the Audio::TagLib::Tag and Audio::TagLib::AudioProperties interfaces by way of implementing the abstract Audio::TagLib::File as well as providing some additional information specific to FLAC files.
Contructs a FLAC file from $file. If $readProperties is true the file's audio properties will also be read using $propertiesStyle. If false, $propertiesStyle is ignored.
This constructor will be dropped in favor of the one below in a future version.
If this file contains and ID3v2 tag the frames will be created using $frameFactory.
Destroys this instance of the File.
Returns the Tag for this file. This will be a union of XiphComment, ID3v1 and ID3v2 tags.
see ID3v2Tag() see ID3v1Tag() see XiphComment()
Returns the FLAC::Properties for this file. If no audio properties were read then this will return undef.
Save the file. This will primarily save the XiphComment, but will also keep any old ID3-tags up to date. If the file has no XiphComment, one will be constructed from the ID3-tags.
This returns true if the save was successful.
Returns an ID3v2 tag of the file.
If $create is false (the default) this will return undef if there is no valid ID3v2 tag. If $create is true if will create an ID3v2 tag if one does not exist.
note The Tag is still owned by the FLAC::File and should not be delete by the user. It will be deleted when the file (object) is destroyed.
Returns an ID3v1 tag of the file.
If $create is false (the default) this will return undef if there is no valid ID3v1 tag. If $create is true it will create an ID3v1 tag if one does not exist.
note The Tag is still owned by the FLAC::File and should not be deleted by the user. It will be deleted when the file (object) is destroyed.
Returns a XiphComment for the file.
If $create is false (the default) this will return undef if there is no valid XiphComment. If $create is true it will create a XiphComment if one does not exist.
Set the ID3v2::FrameFactory to something other than the default. This can be used to specify the way that ID3v2 frames will be interpreted when
see ID3v2FrameFactory
Returns the block of data used by FLAC::Properties for parsing the stream properties.
This method will not be public in a future release.
Returns the length of the audio-stream, used by FLAC::Properties for calculating the bitrate.
None by default.
Audio::TagLib File
Dongxu Ma, <dongxu@cpan.org>
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.
To install Audio::TagLib, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Audio::TagLib
CPAN shell
perl -MCPAN -e shell install Audio::TagLib
For more information on module installation, please visit the detailed CPAN module installation guide.