Add M4A to files pattern
authorNikolay Tischenko <niktischenko@gmail.com>
Sat, 5 Mar 2011 14:52:36 +0000 (20:52 +0600)
committerNikolay Tischenko <niktischenko@gmail.com>
Sat, 5 Mar 2011 14:52:36 +0000 (20:52 +0600)
 tuned TagLib to use M4A and ASF

15 files changed:
debian/control
src/directoryview.cpp
src/mediascanner.cpp
src/taglib/asf/asfattribute.cpp
src/taglib/asf/asffile.cpp
src/taglib/asf/asfproperties.cpp
src/taglib/asf/asftag.cpp
src/taglib/fileref.cpp
src/taglib/mp4/mp4atom.cpp
src/taglib/mp4/mp4coverart.cpp
src/taglib/mp4/mp4file.cpp
src/taglib/mp4/mp4item.cpp
src/taglib/mp4/mp4properties.cpp
src/taglib/mp4/mp4tag.cpp
src/taglib/taglib_config.h.in

index 8080efb..61ca2b3 100644 (file)
@@ -11,7 +11,7 @@ Architecture: armel
 Depends: ${shlibs:Depends}, ${misc:Depends}, gstreamer0.10-plugins-good-extra
 Description: Alternate audioplayer for Maemo 5
  Qt4- and Phonon-based player with compiled in TagLib library
 Depends: ${shlibs:Depends}, ${misc:Depends}, gstreamer0.10-plugins-good-extra
 Description: Alternate audioplayer for Maemo 5
  Qt4- and Phonon-based player with compiled in TagLib library
- supports mp3, flac, ogg, wma, aac formats
+ supports mp3, flac, ogg, wma, aac, asf, ape, wav, m4a formats
 XSBC-Maemo-Display-Name: SomePlayer
 XSBC-Bugtracker: http://someplayer.some-body.ru/bt/
 XB-Maemo-Icon-26: iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAYAAACpSkzOAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHBy
 XSBC-Maemo-Display-Name: SomePlayer
 XSBC-Bugtracker: http://someplayer.some-body.ru/bt/
 XB-Maemo-Icon-26: iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAYAAACpSkzOAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHBy
index 3fe368c..8953d74 100644 (file)
@@ -36,7 +36,7 @@ DirectoryView::DirectoryView(QWidget *parent) :
        ui->setupUi(this);
        Config config;
        _icons_theme = config.getValue("ui/iconstheme").toString();
        ui->setupUi(this);
        Config config;
        _icons_theme = config.getValue("ui/iconstheme").toString();
-       REGISTERED_FILE_EXTENSIONS << "mp3" << "flac" << "wma" << "aac" << "ogg" << "asf" << "ape" << "wav";
+       REGISTERED_FILE_EXTENSIONS << "mp3" << "flac" << "wma" << "aac" << "ogg" << "asf" << "ape" << "wav" << "m4a";
        setWindowFlags(windowFlags() | Qt::Window);
        setAttribute(Qt::WA_Maemo5StackedWindow);
        _model = new QStandardItemModel(0, 2, this);
        setWindowFlags(windowFlags() | Qt::Window);
        setAttribute(Qt::WA_Maemo5StackedWindow);
        _model = new QStandardItemModel(0, 2, this);
index 4c36403..7270745 100644 (file)
@@ -27,7 +27,7 @@ using namespace SomePlayer::Storage;
 MediaScanner::MediaScanner(QObject *parent) :
                QThread(parent), _stopped(false), _initialized(false)
 {
 MediaScanner::MediaScanner(QObject *parent) :
                QThread(parent), _stopped(false), _initialized(false)
 {
-       REGISTERED_FILE_EXTENSIONS << "mp3" << "flac" << "wma" << "aac" << "ogg" << "asf" << "ape" << "wav";
+       REGISTERED_FILE_EXTENSIONS << "mp3" << "flac" << "wma" << "aac" << "ogg" << "asf" << "ape" << "wav" << "m4a";
 }
 
 void MediaScanner::run() {
 }
 
 void MediaScanner::run() {
index 85db872..3969f91 100644 (file)
@@ -27,7 +27,6 @@
 #include <config.h>
 #endif
 
 #include <config.h>
 #endif
 
-#ifdef WITH_ASF
 
 #include <taglib.h>
 #include <tdebug.h>
 
 #include <taglib.h>
 #include <tdebug.h>
@@ -338,5 +337,3 @@ ASF::Attribute::setStream(int value)
 {
   d->stream = value;
 }
 {
   d->stream = value;
 }
-
-#endif
index 012f39b..6d7e31c 100644 (file)
@@ -27,7 +27,6 @@
 #include <config.h>
 #endif
 
 #include <config.h>
 #endif
 
-#ifdef WITH_ASF
 
 #include <tdebug.h>
 #include <tbytevectorlist.h>
 
 #include <tdebug.h>
 #include <tbytevectorlist.h>
@@ -559,5 +558,3 @@ ASF::File::renderString(const String &str, bool includeLength)
   }
   return data;
 }
   }
   return data;
 }
-
-#endif
index 68e2d4c..b0552e4 100644 (file)
@@ -27,8 +27,6 @@
 #include <config.h>
 #endif
 
 #include <config.h>
 #endif
 
-#ifdef WITH_ASF
-
 #include <tdebug.h>
 #include <tstring.h>
 #include "asfproperties.h"
 #include <tdebug.h>
 #include <tstring.h>
 #include "asfproperties.h"
@@ -104,4 +102,3 @@ void ASF::Properties::setChannels(int length)
   d->channels = length;
 }
 
   d->channels = length;
 }
 
-#endif
index f910ccb..acf4fec 100644 (file)
@@ -27,8 +27,6 @@
 #include <config.h>
 #endif
 
 #include <config.h>
 #endif
 
-#ifdef WITH_ASF
-
 #include "asftag.h"
 
 using namespace TagLib;
 #include "asftag.h"
 
 using namespace TagLib;
@@ -216,4 +214,3 @@ bool ASF::Tag::isEmpty() const {
          d->attributeListMap.isEmpty();
 }
 
          d->attributeListMap.isEmpty();
 }
 
-#endif
index fec4516..fb3bbb4 100644 (file)
@@ -142,17 +142,13 @@ StringList FileRef::defaultFileExtensions()
   l.append("wv");
   l.append("spx");
   l.append("tta");
   l.append("wv");
   l.append("spx");
   l.append("tta");
-#ifdef TAGLIB_WITH_MP4
   l.append("m4a");
   l.append("m4b");
   l.append("m4p");
   l.append("3g2");
   l.append("mp4");
   l.append("m4a");
   l.append("m4b");
   l.append("m4p");
   l.append("3g2");
   l.append("mp4");
-#endif
-#ifdef TAGLIB_WITH_ASF
   l.append("wma");
   l.append("asf");
   l.append("wma");
   l.append("asf");
-#endif
   l.append("aif");
   l.append("aiff");
   l.append("wav");
   l.append("aif");
   l.append("aiff");
   l.append("wav");
@@ -240,14 +236,10 @@ File *FileRef::create(FileName fileName, bool readAudioProperties,
       return new Ogg::Speex::File(fileName, readAudioProperties, audioPropertiesStyle);
     if(ext == "TTA")
       return new TrueAudio::File(fileName, readAudioProperties, audioPropertiesStyle);
       return new Ogg::Speex::File(fileName, readAudioProperties, audioPropertiesStyle);
     if(ext == "TTA")
       return new TrueAudio::File(fileName, readAudioProperties, audioPropertiesStyle);
-#ifdef TAGLIB_WITH_MP4
     if(ext == "M4A" || ext == "M4B" || ext == "M4P" || ext == "MP4" || ext == "3G2")
       return new MP4::File(fileName, readAudioProperties, audioPropertiesStyle);
     if(ext == "M4A" || ext == "M4B" || ext == "M4P" || ext == "MP4" || ext == "3G2")
       return new MP4::File(fileName, readAudioProperties, audioPropertiesStyle);
-#endif
-#ifdef TAGLIB_WITH_ASF
     if(ext == "WMA" || ext == "ASF")
       return new ASF::File(fileName, readAudioProperties, audioPropertiesStyle);
     if(ext == "WMA" || ext == "ASF")
       return new ASF::File(fileName, readAudioProperties, audioPropertiesStyle);
-#endif
     if(ext == "AIF")
       return new RIFF::AIFF::File(fileName, readAudioProperties, audioPropertiesStyle);
     if(ext == "WAV")
     if(ext == "AIF")
       return new RIFF::AIFF::File(fileName, readAudioProperties, audioPropertiesStyle);
     if(ext == "WAV")
index 6d86a6e..7e20d25 100644 (file)
@@ -27,8 +27,6 @@
 #include <config.h>
 #endif
 
 #include <config.h>
 #endif
 
-#ifdef WITH_MP4
-
 #include <tdebug.h>
 #include <tstring.h>
 #include "mp4atom.h"
 #include <tdebug.h>
 #include <tstring.h>
 #include "mp4atom.h"
@@ -193,5 +191,3 @@ MP4::Atoms::path(const char *name1, const char *name2, const char *name3, const
   }
   return path;
 }
   }
   return path;
 }
-
-#endif
index 983df02..6de10ae 100644 (file)
@@ -27,8 +27,6 @@
 #include <config.h>
 #endif
 
 #include <config.h>
 #endif
 
-#ifdef WITH_MP4
-
 #include <taglib.h>
 #include <tdebug.h>
 #include "mp4coverart.h"
 #include <taglib.h>
 #include <tdebug.h>
 #include "mp4coverart.h"
@@ -85,5 +83,3 @@ MP4::CoverArt::data() const
 {
   return d->data;
 }
 {
   return d->data;
 }
-
-#endif
index 21a5429..d81bb44 100644 (file)
@@ -27,8 +27,6 @@
 #include <config.h>
 #endif
 
 #include <config.h>
 #endif
 
-#ifdef WITH_MP4
-
 #include <tdebug.h>
 #include <tstring.h>
 #include "mp4atom.h"
 #include <tdebug.h>
 #include <tstring.h>
 #include "mp4atom.h"
@@ -134,5 +132,3 @@ MP4::File::save()
 
   return d->tag->save();
 }
 
   return d->tag->save();
 }
-
-#endif
index 0af331f..ac1ee77 100644 (file)
@@ -27,8 +27,6 @@
 #include <config.h>
 #endif
 
 #include <config.h>
 #endif
 
-#ifdef WITH_MP4
-
 #include <taglib.h>
 #include <tdebug.h>
 #include "mp4item.h"
 #include <taglib.h>
 #include <tdebug.h>
 #include "mp4item.h"
@@ -146,4 +144,3 @@ MP4::Item::isValid() const
   return d->valid;
 }
 
   return d->valid;
 }
 
-#endif
index c973d3a..d10aec5 100644 (file)
@@ -27,8 +27,6 @@
 #include <config.h>
 #endif
 
 #include <config.h>
 #endif
 
-#ifdef WITH_MP4
-
 #include <tdebug.h>
 #include <tstring.h>
 #include "mp4file.h"
 #include <tdebug.h>
 #include <tstring.h>
 #include "mp4file.h"
@@ -166,4 +164,3 @@ MP4::Properties::bitsPerSample() const
   return d->bitsPerSample;
 }
 
   return d->bitsPerSample;
 }
 
-#endif
index f8acc87..212006d 100644 (file)
@@ -27,8 +27,6 @@
 #include <config.h>
 #endif
 
 #include <config.h>
 #endif
 
-#ifdef WITH_MP4
-
 #include <tdebug.h>
 #include <tstring.h>
 #include "mp4atom.h"
 #include <tdebug.h>
 #include <tstring.h>
 #include "mp4atom.h"
@@ -633,4 +631,3 @@ MP4::Tag::itemListMap()
   return d->items;
 }
 
   return d->items;
 }
 
-#endif
index 7be1170..e490fa1 100644 (file)
@@ -1,5 +1,5 @@
 /* With ASF support */
 /* With ASF support */
-#undef TAGLIB_WITH_ASF
+// #undef TAGLIB_WITH_ASF
 
 /* With MP4 support */
 
 /* With MP4 support */
-#undef TAGLIB_WITH_MP4
+// #undef TAGLIB_WITH_MP4