mirror of
https://github.com/taglib/taglib.git
synced 2025-07-24 16:04:29 -04:00
Add my old WMA and MP4 code. It is disabled by default, must be explicitly enabled to be compiled.
Scott: If you think this is really a bad idea, please revert. git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@883108 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
This commit is contained in:
@ -23,15 +23,21 @@
|
||||
* http://www.mozilla.org/MPL/ *
|
||||
***************************************************************************/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <tfile.h>
|
||||
#include <tstring.h>
|
||||
|
||||
#include "fileref.h"
|
||||
#include "asffile.h"
|
||||
#include "mpegfile.h"
|
||||
#include "vorbisfile.h"
|
||||
#include "flacfile.h"
|
||||
#include "oggflacfile.h"
|
||||
#include "mpcfile.h"
|
||||
#include "mp4file.h"
|
||||
#include "wavpackfile.h"
|
||||
#include "speexfile.h"
|
||||
#include "trueaudiofile.h"
|
||||
@ -123,6 +129,15 @@ StringList FileRef::defaultFileExtensions()
|
||||
l.append("wv");
|
||||
l.append("spx");
|
||||
l.append("tta");
|
||||
#ifdef WITH_MP4
|
||||
l.append("m4a");
|
||||
l.append("m4b");
|
||||
l.append("m4p");
|
||||
l.append("3g2");
|
||||
#endif
|
||||
#ifdef WITH_ASF
|
||||
l.append("wma");
|
||||
#endif
|
||||
l.append("aif");
|
||||
l.append("aiff");
|
||||
l.append("wav");
|
||||
@ -202,6 +217,17 @@ File *FileRef::create(FileName fileName, bool readAudioProperties,
|
||||
return new Ogg::Speex::File(fileName, readAudioProperties, audioPropertiesStyle);
|
||||
if(s.substr(s.size() - 4, 4).upper() == ".TTA")
|
||||
return new TrueAudio::File(fileName, readAudioProperties, audioPropertiesStyle);
|
||||
#ifdef WITH_MP4
|
||||
if(s.substr(s.size() - 4, 4).upper() == ".M4A" ||
|
||||
s.substr(s.size() - 4, 4).upper() == ".M4B" ||
|
||||
s.substr(s.size() - 4, 4).upper() == ".M4P" ||
|
||||
s.substr(s.size() - 4, 4).upper() == ".3G2")
|
||||
return new MP4::File(fileName, readAudioProperties, audioPropertiesStyle);
|
||||
#endif
|
||||
#ifdef WITH_ASF
|
||||
if(s.substr(s.size() - 4, 4).upper() == ".WMA")
|
||||
return new ASF::File(fileName, readAudioProperties, audioPropertiesStyle);
|
||||
#endif
|
||||
if(s.substr(s.size() - 4, 4).upper() == ".AIF")
|
||||
return new RIFF::AIFF::File(fileName, readAudioProperties, audioPropertiesStyle);
|
||||
if(s.substr(s.size() - 4, 4).upper() == ".WAV")
|
||||
|
Reference in New Issue
Block a user