File indexing completed on 2024-05-12 04:51:01
0001 /* 0002 SPDX-FileCopyrightText: 1998-2008 Sebastian Trueg <trueg@k3b.org> 0003 SPDX-License-Identifier: GPL-2.0-or-later 0004 */ 0005 0006 #ifndef _K3B_AUDIO_IMAGER_H_ 0007 #define _K3B_AUDIO_IMAGER_H_ 0008 0009 #include "k3bthreadjob.h" 0010 0011 class QIODevice; 0012 0013 namespace K3b { 0014 class AudioDoc; 0015 class AudioJobTempData; 0016 0017 class AudioImager : public ThreadJob 0018 { 0019 Q_OBJECT 0020 0021 public: 0022 AudioImager( AudioDoc* doc, AudioJobTempData* tempData, JobHandler* jh, QObject* parent = 0 ); 0023 ~AudioImager() override; 0024 0025 /** 0026 * The data gets written directly into fd instead of the imagefiles. 0027 * Be aware that this only makes sense before starting the job. 0028 * To disable just set dev to 0 0029 */ 0030 void writeTo( QIODevice* dev ); 0031 0032 enum ErrorType { 0033 ERROR_FD_WRITE, 0034 ERROR_DECODING_TRACK, 0035 ERROR_UNKNOWN 0036 }; 0037 0038 ErrorType lastErrorType() const; 0039 0040 private: 0041 bool run() override; 0042 0043 class Private; 0044 Private* const d; 0045 }; 0046 } 0047 0048 #endif