2014-01-11 04:32:08 +01:00
|
|
|
/* This file is part of Clementine.
|
|
|
|
Copyright 2014, Andre Siviero <altsiviero@gmail.com>
|
|
|
|
|
|
|
|
Clementine is free software: you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
Clementine is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with Clementine. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
2013-12-27 06:38:43 +01:00
|
|
|
|
|
|
|
#ifndef RIPCD_H
|
|
|
|
#define RIPCD_H
|
|
|
|
|
|
|
|
#include <QDialog>
|
2014-01-11 06:02:11 +01:00
|
|
|
#include <QCheckBox>
|
2014-01-08 04:39:28 +01:00
|
|
|
#include <QThread>
|
|
|
|
#include <cdio/cdio.h>
|
2013-12-27 06:38:43 +01:00
|
|
|
#include "ui_ripcd.h"
|
2014-01-11 04:26:13 +01:00
|
|
|
|
|
|
|
class Transcoder;
|
2013-12-27 06:38:43 +01:00
|
|
|
|
|
|
|
class RipCD : public QDialog
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
2014-01-08 04:39:28 +01:00
|
|
|
// QThread thread;
|
2013-12-27 06:38:43 +01:00
|
|
|
|
2014-01-08 04:39:28 +01:00
|
|
|
public:
|
2013-12-27 06:38:43 +01:00
|
|
|
RipCD(QWidget* parent = 0);
|
2014-01-08 04:39:28 +01:00
|
|
|
|
|
|
|
private:
|
2014-01-09 05:47:33 +01:00
|
|
|
Transcoder* transcoder_;
|
|
|
|
int queued_;
|
|
|
|
int finished_success_;
|
|
|
|
int finished_failed_;
|
2014-01-11 06:02:11 +01:00
|
|
|
track_t i_tracks;
|
2014-01-08 04:39:28 +01:00
|
|
|
Ui::RipCD ui_;
|
|
|
|
CdIo_t *p_cdio;
|
|
|
|
void write_WAV_header(FILE *stream,int32_t i_bytecount);
|
|
|
|
void put_num(long int num, FILE *stream, int bytes);
|
2014-01-11 04:26:13 +01:00
|
|
|
void toThreadClickedRipButton();
|
|
|
|
|
2014-01-11 06:02:11 +01:00
|
|
|
QList<QCheckBox*> checkboxes_;
|
|
|
|
QList<QString> generated_files_;
|
|
|
|
|
2014-01-11 04:26:13 +01:00
|
|
|
signals:
|
|
|
|
void RippingComplete();
|
2014-01-08 04:39:28 +01:00
|
|
|
private slots:
|
2014-01-11 04:26:13 +01:00
|
|
|
void threadedTranscoding();
|
2014-01-08 04:39:28 +01:00
|
|
|
void clickedRipButton();
|
2014-01-11 04:26:13 +01:00
|
|
|
void JobComplete(const QString& filename, bool success);
|
2014-01-09 05:47:33 +01:00
|
|
|
void AllJobsComplete();
|
2014-01-11 06:02:11 +01:00
|
|
|
void AppendOutput(const QString &filename);
|
2013-12-27 06:38:43 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // RIPCD_H
|