From 45b203105b980162549fc97106c6353a23571106 Mon Sep 17 00:00:00 2001 From: trialuser02 Date: Tue, 26 Jul 2016 08:58:59 +0000 Subject: removed function DecoderFactory::supports git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@6603 90c681e8-e032-0410-971d-27865f9a5e38 --- src/plugins/Input/mad/decodermadfactory.cpp | 20 -------------------- src/plugins/Input/mad/decodermadfactory.h | 3 +-- 2 files changed, 1 insertion(+), 22 deletions(-) (limited to 'src/plugins/Input/mad') diff --git a/src/plugins/Input/mad/decodermadfactory.cpp b/src/plugins/Input/mad/decodermadfactory.cpp index a14eb17ea..ec64c92ae 100644 --- a/src/plugins/Input/mad/decodermadfactory.cpp +++ b/src/plugins/Input/mad/decodermadfactory.cpp @@ -58,26 +58,6 @@ DecoderMADFactory::DecoderMADFactory() } } -bool DecoderMADFactory::supports(const QString &source) const -{ - QString ext = source.right(4).toLower(); - if (ext == ".mp1" || ext == ".mp2" || ext == ".mp3") - return true; - else if (ext == ".wav") //check for mp3 wav files - { - QFile file(source); - file.open(QIODevice::ReadOnly); - char buf[22]; - file.peek(buf,sizeof(buf)); - file.close(); - if (!memcmp(buf + 8, "WAVE", 4) && !memcmp(buf + 20, "U" ,1)) - { - return true; - } - } - return false; -} - bool DecoderMADFactory::canDecode(QIODevice *input) const { char buf[16 * 512]; diff --git a/src/plugins/Input/mad/decodermadfactory.h b/src/plugins/Input/mad/decodermadfactory.h index 70e827a28..9facac68a 100644 --- a/src/plugins/Input/mad/decodermadfactory.h +++ b/src/plugins/Input/mad/decodermadfactory.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2006-2015 by Ilya Kotov * + * Copyright (C) 2006-2016 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -38,7 +38,6 @@ Q_INTERFACES(DecoderFactory) public: DecoderMADFactory(); - bool supports(const QString &source) const; bool canDecode(QIODevice *input) const; const DecoderProperties properties() const; Decoder *create(const QString &path, QIODevice *input); -- cgit v1.2.3-13-gbd6f