File indexing completed on 2024-06-09 04:47:53

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>_ENCODER_H_
0008 #define _K3B_<name>_ENCODER_H_
0009 
0010 
0011 #include "k3baudioencoder.h"
0012 #include "k3bpluginconfigwidget.h"
0013 
0014 
0015 class K3b<name>Encoder : public K3b::AudioEncoder
0016 {
0017     Q_OBJECT
0018 
0019 public:
0020     K3b<name>Encoder( QObject* parent, const QVariantList& );
0021     ~K3b<name>Encoder();
0022 
0023     QStringList extensions() const;
0024   
0025     QString fileTypeComment( const QString& ) const;
0026 
0027     long long fileSize( const QString&, const K3b::Msf& msf ) const;
0028 
0029     int pluginSystemVersion() const { return K3B_PLUGIN_SYSTEM_VERSION; }
0030 
0031 private:
0032     void finishEncoderInternal();
0033     bool initEncoderInternal( const QString& extension, const Msf& length, const MetaData& metaData );
0034     long encodeInternal( const char* data, Q_ULONG len );
0035 };
0036 
0037 
0038 class K3b<name>EncoderConfigWidget : public K3b::PluginConfigWidget
0039 {
0040     Q_OBJECT
0041 
0042 public:
0043     explicit K3b<name>EncoderConfigWidget( QWidget* parent = 0 );
0044     ~K3b<name>EncoderConfigWidget();
0045 
0046     public Q_SLOTS:
0047     virtual void load();
0048     virtual void save();
0049     virtual void defaults();
0050 };
0051 
0052 #endif