[vlc-commits] taglib: read and wirte APE tags for .ape files.
Rémi Duraffort
git at videolan.org
Sat May 14 18:37:53 CEST 2011
vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Sat May 14 18:36:37 2011 +0200| [c405205e9a82ad0b1b63556f718580ef8ccd0205] | committer: Rémi Duraffort
taglib: read and wirte APE tags for .ape files.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c405205e9a82ad0b1b63556f718580ef8ccd0205
---
modules/meta_engine/taglib.cpp | 15 +++++++++++++--
1 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/modules/meta_engine/taglib.cpp b/modules/meta_engine/taglib.cpp
index 13f23c7..f8978ad 100644
--- a/modules/meta_engine/taglib.cpp
+++ b/modules/meta_engine/taglib.cpp
@@ -53,6 +53,7 @@
#include <id3v2tag.h>
#include <xiphcomment.h>
+#include <apefile.h>
#include <flacfile.h>
#include <mpcfile.h>
#include <mpegfile.h>
@@ -435,7 +436,12 @@ static int ReadMeta( vlc_object_t* p_this)
// Try now to read special tags
- if( FLAC::File* flac = dynamic_cast<FLAC::File*>(f.file()) )
+ if( APE::File* ape = dynamic_cast<APE::File*>(f.file()) )
+ {
+ if( ape->APETag() )
+ ReadMetaFromAPE( ape->APETag(), p_demux_meta, p_meta );
+ }
+ else if( FLAC::File* flac = dynamic_cast<FLAC::File*>(f.file()) )
{
if( flac->ID3v2Tag() )
ReadMetaFromId3v2( flac->ID3v2Tag(), p_demux_meta, p_meta );
@@ -653,7 +659,12 @@ static int WriteMeta( vlc_object_t *p_this )
// Try now to write special tags
- if( FLAC::File* flac = dynamic_cast<FLAC::File*>(f.file()) )
+ if( APE::File* ape = dynamic_cast<APE::File*>(f.file()) )
+ {
+ if( ape->APETag() )
+ WriteMetaToAPE( ape->APETag(), p_item );
+ }
+ else if( FLAC::File* flac = dynamic_cast<FLAC::File*>(f.file()) )
{
if( flac->ID3v2Tag() )
WriteMetaToId3v2( flac->ID3v2Tag(), p_item );
More information about the vlc-commits
mailing list