| 1 |
/* |
| 2 |
Copyright (C) 2000 Rik Hemsley (rikkus) <[email protected]> |
| 3 |
Copyright (C) 2000, 2001, 2002 Michael Matz <[email protected]> |
| 4 |
Copyright (C) 2001 Carsten Duvenhorst <[email protected]> |
| 5 |
Copyright (C) 2001 Adrian Schroeter <[email protected]> |
| 6 |
Copyright (C) 2003 Richard Lärkäng <[email protected]> |
| 7 |
Copyright (C) 2003 Scott Wheeler <[email protected]> |
| 8 |
Copyright (C) 2004, 2005 Benjamin Meyer <ben at meyerhome dot net> |
| 9 |
|
| 10 |
This program is free software; you can redistribute it and/or modify |
| 11 |
it under the terms of the GNU General Public License as published by |
| 12 |
the Free Software Foundation; either version 2 of the License, or |
| 13 |
(at your option) any later version. |
| 14 |
|
| 15 |
This program is distributed in the hope that it will be useful, |
| 16 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 17 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 18 |
GNU General Public License for more details. |
| 19 |
|
| 20 |
You should have received a copy of the GNU General Public License |
| 21 |
along with this program; if not, write to the Free Software |
| 22 |
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, |
| 23 |
USA. |
| 24 |
*/ |
| 25 |
|
| 26 |
#ifndef ENCODER_CDA_H |
| 27 |
#define ENCODER_CDA_H |
| 28 |
|
| 29 |
#include "audiocdencoder.h" |
| 30 |
#include <cstdlib> |
| 31 |
#include <sys/stat.h> |
| 32 |
#include <unistd.h> |
| 33 |
|
| 34 |
/** |
| 35 |
* Raw cd "encoder" |
| 36 |
* Does little more than copy the data and make sure it is in the right |
| 37 |
* endian. |
| 38 |
*/ |
| 39 |
class EncoderCda : public AudioCDEncoder |
| 40 |
{ |
| 41 |
public: |
| 42 |
explicit EncoderCda(KIO::WorkerBase *worker) |
| 43 |
: AudioCDEncoder(worker) |
| 44 |
{ |
| 45 |
} |
| 46 |
~EncoderCda() override |
| 47 |
{ |
| 48 |
} |
| 49 |
bool init() override |
| 50 |
{ |
| 51 |
return true; |
| 52 |
} |
| 53 |
void loadSettings() override |
| 54 |
{ |
| 55 |
} |
| 56 |
unsigned long size(long time_secs) const override; |
| 57 |
QString type() const override |
| 58 |
{ |
| 59 |
return QLatin1String("CDA"); |
| 60 |
} |
| 61 |
const char *mimeType() const override; |
| 62 |
const char *fileType() const override |
| 63 |
{ |
| 64 |
return "cda"; |
| 65 |
} |
| 66 |
void fillSongInfo(KCDDB::CDInfo, int, const QString &) override |
| 67 |
{ |
| 68 |
} |
| 69 |
long readInit(long) override |
| 70 |
{ |
| 71 |
return 0; |
| 72 |
} |
| 73 |
long read(qint16 *buf, int frames) override; |
| 74 |
long readCleanup() override |
| 75 |
{ |
| 76 |
return 0; |
| 77 |
} |
| 78 |
}; |
| 79 |
|
| 80 |
#endif // ENCODER_CDA_H |