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

0001 /*
0002     SPDX-FileCopyrightText: 2003 Christian Kvasny <chris@k3b.org>
0003     SPDX-FileCopyrightText: 1998-2007 Sebastian Trueg <trueg@k3b.org>
0004 
0005     SPDX-License-Identifier: GPL-2.0-or-later
0006 */
0007 
0008 #ifndef K3BVIDEOCDRIP_H
0009 #define K3BVIDEOCDRIP_H
0010 
0011 #include "k3bjob.h"
0012 #include "k3bdiskinfo.h"
0013 #include "k3bvideocdrippingoptions.h"
0014 
0015 #include <QProcess>
0016 
0017 class QString;
0018 class KProcess;
0019 
0020 namespace K3b {
0021 class VideoCdRip : public Job
0022 {
0023         Q_OBJECT
0024 
0025     public:
0026         VideoCdRip( JobHandler*, VideoCdRippingOptions* options, QObject* parent = 0 );
0027         ~VideoCdRip() override;
0028 
0029         enum { CDROM, BIN_IMAGE, NRG_IMAGE };
0030 
0031         QString jobDescription() const override;
0032         QString jobDetails() const override;
0033 
0034     public Q_SLOTS:
0035         void start() override;
0036         void cancel() override;
0037 
0038     private Q_SLOTS:
0039         void cancelAll();
0040 
0041     protected Q_SLOTS:
0042         void slotVcdXRipFinished( int, QProcess::ExitStatus );
0043         void slotParseVcdXRipOutput();
0044 
0045     private:
0046         void vcdxRip();
0047         void parseInformation( QString );
0048 
0049         enum { stageUnknown, stageScan, stageFinished, _stage_max };
0050 
0051         int m_stage;
0052         int m_bytesFinished;
0053         int m_ripsourceType;
0054         int m_oldpercent;
0055 
0056         long m_subPosition;
0057 
0058         QString m_collectedOutput;
0059 
0060         VideoCdRippingOptions * m_videooptions;
0061 
0062         bool m_canceled;
0063 
0064         KProcess* m_process;
0065 
0066 };
0067 }
0068 
0069 #endif