OSDN Git Service

Updated documents.
[lamexp/LameXP.git] / src / Registry_Decoder.cpp
index ae70a58..160d37a 100644 (file)
@@ -1,6 +1,6 @@
 ///////////////////////////////////////////////////////////////////////////////
 // LameXP - Audio Encoder Front-End
-// Copyright (C) 2004-2011 LoRd_MuldeR <MuldeR2@GMX.de>
+// Copyright (C) 2004-2012 LoRd_MuldeR <MuldeR2@GMX.de>
 //
 // This program is free software; you can redistribute it and/or modify
 // it under the terms of the GNU General Public License as published by
 #include "Decoder_AC3.h"
 #include "Decoder_ADPCM.h"
 #include "Decoder_ALAC.h"
+#include "Decoder_Avisynth.h"
 #include "Decoder_FLAC.h"
 #include "Decoder_MAC.h"
 #include "Decoder_MP3.h"
 #include "Decoder_Musepack.h"
 #include "Decoder_Shorten.h"
+#include "Decoder_Speex.h"
 #include "Decoder_TTA.h"
 #include "Decoder_Vorbis.h"
 #include "Decoder_Wave.h"
 #include "Decoder_WavPack.h"
+#include "Decoder_Opus.h"
 #include "Decoder_WMA.h"
+#include "PlaylistImporter.h"
 
 #include <QString>
 #include <QStringList>
@@ -55,10 +59,13 @@ AbstractDecoder *DecoderRegistry::lookup(const QString &containerType, const QSt
        PROBE_DECODER(ShortenDecoder);
        PROBE_DECODER(MACDecoder);
        PROBE_DECODER(TTADecoder);
+       PROBE_DECODER(SpeexDecoder);
        PROBE_DECODER(ALACDecoder);
        PROBE_DECODER(WMADecoder);
        PROBE_DECODER(ADPCMDecoder);
        PROBE_DECODER(WaveDecoder);
+       PROBE_DECODER(OpusDecoder);
+       PROBE_DECODER(AvisynthDecoder);
        
        return NULL;
 }
@@ -78,11 +85,15 @@ QStringList DecoderRegistry::getSupportedTypes(void)
        types << GET_FILETYPES(ShortenDecoder);
        types << GET_FILETYPES(MACDecoder);
        types << GET_FILETYPES(TTADecoder);
+       types << GET_FILETYPES(SpeexDecoder);
        types << GET_FILETYPES(ALACDecoder);
        types << GET_FILETYPES(WMADecoder);
        types << GET_FILETYPES(ADPCMDecoder);
+       types << GET_FILETYPES(OpusDecoder);
+       types << GET_FILETYPES(AvisynthDecoder);
 
        QStringList extensions;
+       extensions << QString(PlaylistImporter::supportedExtensions).split(" ", QString::SkipEmptyParts);
        QRegExp regExp("\\((.+)\\)", Qt::CaseInsensitive);
 
        for(int i = 0; i < types.count(); i++)
@@ -92,7 +103,7 @@ QStringList DecoderRegistry::getSupportedTypes(void)
                        extensions << regExp.cap(1).split(" ", QString::SkipEmptyParts);
                }
        }
-       
+
        if(!extensions.empty())
        {
                extensions.removeDuplicates();
@@ -100,6 +111,8 @@ QStringList DecoderRegistry::getSupportedTypes(void)
                types.prepend(QString("%1 (%2)").arg(tr("All supported types"), extensions.join(" ")));
        }
        
+       types << QString("%1 (%2)").arg(tr("Playlists"), PlaylistImporter::supportedExtensions);
        types << QString("%1 (*.*)").arg(tr("All files"));
+
        return types;
 }