File indexing completed on 2024-04-28 04:50:01
0001 /* 0002 SPDX-FileCopyrightText: 1998-2008 Sebastian Trueg <trueg@k3b.org> 0003 0004 SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #ifndef _K3B_<name>_DECODER_H_ 0008 #define _K3B_<name>_DECODER_H_ 0009 0010 #include "k3baudiodecoder.h" 0011 0012 0013 class K3b<name>DecoderFactory : public K3b::AudioDecoderFactory 0014 { 0015 Q_OBJECT 0016 0017 public: 0018 K3b<name>DecoderFactory( QObject* parent, const QVariantList& ); 0019 ~K3b<name>DecoderFactory(); 0020 0021 bool canDecode( const QUrl& filename ); 0022 0023 int pluginSystemVersion() const { return K3B_PLUGIN_SYSTEM_VERSION; } 0024 0025 K3b::AudioDecoder* createDecoder( QObject* parent = 0 ) const; 0026 }; 0027 0028 0029 class K3b<name>Decoder : public K3b::AudioDecoder 0030 { 0031 Q_OBJECT 0032 0033 public: 0034 K3b<name>Decoder( QObject* parent = 0, ); 0035 ~K3b<name>Decoder(); 0036 0037 QString fileType() const; 0038 0039 protected: 0040 bool analyseFileInternal( K3b::Msf& frames, int& samplerate, int& ch ); 0041 bool initDecoderInternal(); 0042 bool seekInternal( const K3b::Msf& ); 0043 0044 int decodeInternal( char* _data, int maxLen ); 0045 }; 0046 0047 #endif