00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef EXPORT_H
00024 #define EXPORT_H
00025
00026 #include <QThread>
00027 #include <QString>
00028 #include <QMap>
00029
00030 #include <samplerate.h>
00031
00032 #include "defines.h"
00033 #include "gdither.h"
00034
00035 class Project;
00036 class ExportThread;
00037
00038 struct ExportSpecification
00039 {
00040 ExportSpecification();
00041
00042 int is_valid();
00043
00044 enum RenderPass {
00045 CALC_NORM_FACTOR,
00046 WRITE_TO_HARDDISK,
00047 CREATE_CDRDAO_TOC
00048 };
00049
00050 int sample_rate;
00051 int src_quality;
00052 int channels;
00053 TimeRef startLocation;
00054 TimeRef endLocation;
00055 GDitherType dither_type;
00056
00057
00058
00059 QString writerType;
00060 float* dataF;
00061 int blocksize;
00062 int data_width;
00063
00064 TimeRef totalTime;
00065 TimeRef pos;
00066 QMap<QString, QString> extraFormat;
00067
00068
00069
00070 int progress;
00071 bool stop;
00072 bool breakout;
00073 bool running;
00074
00075 int status;
00076 bool allSheets;
00077 int isRecording;
00078 QString exportdir;
00079 QString basename;
00080 QString name;
00081 QString tocFileName;
00082 QString cdrdaoToc;
00083 bool writeToc;
00084 bool normalize;
00085 int renderpass;
00086 float peakvalue;
00087 float normvalue;
00088 bool resumeTransport;
00089 TimeRef resumeTransportLocation;
00090 bool renderfinished;
00091 bool isCdExport;
00092
00093 ExportThread* thread;
00094 };
00095
00096
00097 class ExportThread : public QThread
00098 {
00099 Q_OBJECT
00100
00101 public:
00102 ExportThread(Project* project);
00103 ~ExportThread()
00104 {}
00105
00106 void run();
00107 void sleep_for(uint msecs) {
00108 msleep(msecs);
00109 }
00110 void set_specification(ExportSpecification* spec);
00111
00112 private:
00113 Project* m_project;
00114 ExportSpecification* m_spec;
00115 };
00116
00117
00118 #endif