File indexing completed on 2024-04-28 04:50:20

0001 /*
0002     SPDX-FileCopyrightText: 2011 Michal Malek <michalm@jabster.pl>
0003     SPDX-FileCopyrightText: 1998-2008 Sebastian Trueg <trueg@k3b.org>
0004 
0005     SPDX-License-Identifier: GPL-2.0-or-later
0006 */
0007 
0008 
0009 #ifndef K3B_AUDIO_RIP_JOB_H
0010 #define K3B_AUDIO_RIP_JOB_H
0011 
0012 #include "k3bmassaudioencodingjob.h"
0013 #include <QScopedPointer>
0014 
0015 
0016 namespace K3b {
0017 
0018     namespace Device {
0019         class Device;
0020     }
0021 
0022     class AudioRipJob : public MassAudioEncodingJob
0023     {
0024         Q_OBJECT
0025         
0026     public:
0027         AudioRipJob( JobHandler* hdl, QObject* parent );
0028         ~AudioRipJob() override;
0029 
0030         // paranoia settings
0031         void setParanoiaMode( int mode );
0032         void setMaxRetries( int retries );
0033         void setNeverSkip( bool b );
0034         void setUseIndex0( bool b );
0035 
0036         void setDevice( Device::Device* device );
0037 
0038         QString jobDescription() const override;
0039         QString jobSource() const override;
0040 
0041         class Private;
0042 
0043     public Q_SLOTS:
0044         void start() override;
0045 
0046     private:
0047         void jobFinished( bool ) override;
0048 
0049         bool init() override;
0050 
0051         void cleanup() override;
0052 
0053         Msf trackLength( int trackIndex ) const override;
0054 
0055         QIODevice* createReader( int trackIndex ) const override;
0056 
0057         void trackStarted( int trackIndex ) override;
0058 
0059         void trackFinished( int trackIndex, const QString& filename ) override;
0060 
0061     private:
0062         QScopedPointer<Private> d;
0063     };
0064 
0065 } // namespace K3b
0066 
0067 #endif