大众dsg问题是什么问题?

\Qt5.0\5.5\msvc2013_64\mkspecs\win32-msvc2013&-Fodebug\&@C:\Users\mains\AppData\Local\Temp\Scene.obj..jom
g:\dpix-master\dpix\src\Session.h(89)&:&warning&C4267:&'return'&:&conversion&from&'size_t'&to&'int',&possible&loss&of&data
g:\dpix-master\dpix\src\Session.h(89)&:&warning&C4267:&'return'&:&conversion&from&'size_t'&to&'int',&possible&loss&of&data
g:\dpix-master\dpix\src\Session.h(89)&:&warning&C4267:&'return'&:&conversion&from&'size_t'&to&'int',&possible&loss&of&data
e:\toolsoftware\qt5.0\5.5\msvc2013_64\include\qtcore\qthread.h(106)&:&error&C2059:&syntax&error&:&'('
e:\toolsoftware\qt5.0\5.5\msvc2013_64\include\qtcore\qthread.h(106)&:&error&C2143:&syntax&error&:&missing&','&before&'/'
e:\toolsoftware\qt5.0\5.5\msvc2013_64\include\qtcore\qthread.h(106)&:&error&C4430:&missing&type&specifier&-&int&assumed.&Note:&C++&does&not&support&default-int
e:\toolsoftware\qt5.0\5.5\msvc2013_64\include\qtcore\qthread.h(106)&:&error&C2059:&syntax&error&:&'/'
jom:&G:\dpix-master\build-dpix-Desktop_Qt_5_5_0_MSVC2013_64bit-Debug\Makefile.Debug&[debug\MainWindow.obj]&Error&2
cl&-c&-nologo&-Zc:wchar_t&-FS&-Zi&-MDd&-GR&-W3&-w34100&-w34189&-w44996&-EHsc&/Fddebug\dpix.pdb&-DUNICODE&-DWIN32&-DWIN64&-DQGLVIEWER_STATIC&-DQT_OPENGL_LIB&-DQT_WIDGETS_LIB&-DQT_GUI_LIB&-DQT_XML_LIB&-DQT_CORE_LIB&-I..\dpix&-I.&-I..\libnpr\include&-I..\libgq\include&-I..\libcda\include&-I..\qglviewer&-I..\dpix\src&-IE:\toolsoftware\Qt5.0\5.5\msvc2013_64\include&-IE:\toolsoftware\Qt5.0\5.5\msvc2013_64\include\QtOpenGL&-IE:\toolsoftware\Qt5.0\5.5\msvc2013_64\include\QtWidgets&-IE:\toolsoftware\Qt5.0\5.5\msvc2013_64\include\QtGui&-IE:\toolsoftware\Qt5.0\5.5\msvc2013_64\include\QtANGLE&-IE:\toolsoftware\Qt5.0\5.5\msvc2013_64\include\QtXml&-IE:\toolsoftware\Qt5.0\5.5\msvc2013_64\include\QtCore&-Idebug&-I.&-IE:\toolsoftware\Qt5.0\5.5\msvc2013_64\mkspecs\win32-msvc2013&-Fodebug\&@C:\Users\mains\AppData\Local\Temp\Session.obj..jom
Session.cc
g:\dpix-master\dpix\src\Session.h(89)&:&warning&C4267:&'return'&:&conversion&from&'size_t'&to&'int',&possible&loss&of&data
..\dpix\src\Session.cc(87)&:&warning&C4267:&'initializing'&:&conversion&from&'size_t'&to&'int',&possible&loss&of&data
..\dpix\src\Session.cc(446)&:&warning&C4267:&'initializing'&:&conversion&from&'size_t'&to&'int',&possible&loss&of&data
..\dpix\src\Session.cc(468)&:&warning&C4267:&'='&:&conversion&from&'size_t'&to&'int',&possible&loss&of&data
jom:&G:\dpix-master\build-dpix-Desktop_Qt_5_5_0_MSVC2013_64bit-Debug\Makefile&[debug]&Error&2
21:12:49:&The&process&&E:\toolsoftware\Qt5.0\Tools\QtCreator\bin\jom.exe&&exited&with&code&2.
Error&while&building/deploying&project&dpix&(kit:&Desktop&Qt&5.5.0&MSVC2013&64bit)
When&executing&step&&Make&
能解释一下上面的错误吗?
qthread.h是我的库文件啊,为什么他会出错?
大神求指导?
回复讨论(解决方案)
一定是你&继承了QThread&然后&在这个类里&有错误,贴出你的&Session&类的&代码&.h&+&.cpp
一定是你&继承了QThread&然后&在这个类里&有错误,贴出你的&Session&类的&代码&.h&+&.cpp
/*****************************************************************************\
Author:&Forrester&Cole&(fcole@cs.princeton.edu)
Copyright&(c)&2009&Forrester&Cole
Class&for&recording&and&playing&back&an&editing&session.
dpix&is&distributed&under&the&terms&of&the&GNU&General&Public&License.
See&the&COPYING&file&for&details.
\*****************************************************************************/
#ifndef&SESSION_H_
#define&SESSION_H_
#include&&QDomElement&
#include&&QString&
#include&&Vec.h&
#include&&XForm.h&
#include&&timestamp.h&
#include&&ui_Session.h&
#include&&ui_Interface.h&
#include&&vector&
using&std::
class&QGLV
class&SessionFrame
&&&&~SessionFrame();
void&load(&const&QDomElement&&element&);
void&save(&QDomDocument&&doc,&QDomElement&&element&);
xform _camera_
int&&&&&_active_
float&&&_cutaway_
float _cutaway_
bool _cutaway_
bool _cutaway_
bool _anim_
class&Session&:&public&QObject
&&&&Q_OBJECT
&&&&typedef&enum&{
&&&&&&&&PLAYBACK_NORMAL,
&&&&&&&&PLAYBACK_AS_FAST_AS_POSSIBLE,
&&&&&&&&PLAYBACK_SCREENSHOTS,
&&&&&&&&PLAYBACK_SCREENSHOTS_INTERPOLATED,
&&&&&&&&PLAYBACK_MOVIE,
&&&&&&&&NUM_PLAYBACK_MODES
&&&&}&PlaybackM
&&&&typedef&enum&{
&&&&&&&&STATE_NO_DATA,
&&&&&&&&STATE_LOADED,
&&&&&&&&STATE_PLAYING,
&&&&&&&&STATE_RECORDING,
&&&&&&&&NUM_STATES
&&&&Session();
bool&load(&const&QString&&filename&);
&&&&bool&load(&const&QDomElement&&root&);
bool&save(&const&QString&&filename&);
&&&&bool&save(&QDomDocument&&doc,&QDomElement&&root&);
void&startRecording(&QGLViewer*&viewer,&Ui::MainWindow&*ui&);
&&&&void&stopRecording();
void&startPlayback(&QGLViewer*&viewer,&Ui::MainWindow&*ui,&PlaybackMode&mode&=&PLAYBACK_NORMAL,&
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&const&QString&&filename&=&QString::null&);
&&&&void&stopPlayback();
&&&&State&getState()&const&{&return&_&}
&&&&float&length()&
&&&&int numFrames()&const&{&return&_frames.size();&}
const&SessionFrame&&frame(&int&which&)&
void&recordFrame(&const&SessionFrame&&frame&);
&&&&static&void&execSettingsDialog();
&&&&static&void&getFFMPEGFromSettings(&QString&&cmd,&QStringList&&input_options,&QStringList&&output_options,&float&&fps&);
&&&&static&float&getFPSFromSettings();
&&&&static&void&setConsole(&Console*&console&)&{&_console&=&&}
public&slots:
&&&&void&gatherAndRecordFrame();
&&&&void&advancePlaybackFrame();
&&&&void&dumpScreenshot();
&&&&void&redrawNeeded();
&&&&void&recordingStarted();
&&&&void&recordingStopped();
&&&&void&playbackStarted();
&&&&void&playbackFinished();
&&&&void&playbackStopped();
protected:
&&&&void&convertReplayFramesToMovie();
&&&&void&interpolateScreenshotFrames();
&&&&void&cleanUpPlayback();
protected:
&&&&State&&&&&&&&&&&&&&&&_
&&&&PlaybackMode&&&&&&&&&_playback_
&&&&QGLViewer*&&&&&&&&&&&_
Ui::MainWindow*
vector&SessionFrame&&_
&&&&int&&&&&&&&&&&&&&&&&&_current_
&&&&bool&&&&&&&&&&&&&&&&&_has_dumped_current_
&&&&timestamp&&&&&&&&&&&&_session_
&&&&QString&&&&&&&&&&&&&&_final_
&&&&QString&&&&&&&&&&&&&&_screenshot_file_
&&&&vector&QString&&&&&&&_screenshot_
&&&&static&Console*&&&&&&_
class&SessionSettingsDialog&:&public&QDialog
&&&&Q_OBJECT
&&&&SessionSettingsDialog();&
&&&&QString&getCommand()&{&return&_ui.commandEdit-&text();&}
&&&&float&&&getFPS()&{&return&_ui.fpsSpinBox-&value();&}
&&&&float&&&getBitrate()&{&return&_ui.bitrateSpinBox-&value();&}
&&&&QString&getInputOptionsString()&{&return&_ui.inputOptionsLineEdit-&text();&}
QString&getOutputOptionsString()&{&return&_ui.outputOptionsLineEdit-&text();&}
public&slots:
&&&&void&on_browseCommandButton_clicked();
&&&&void&on_actionUpdateInputOptionsString_triggered();
&&&&void&on_actionUpdateOutputOptionsString_triggered();
&&&&void&on_actionUpdate_Example_triggered();
protected:
&&&&Ui::SettingsDialog&_
#endif&//&SESSION_H_
/*****************************************************************************\
Session.cc
Author:&Forrester&Cole&(fcole@cs.princeton.edu)
Copyright&(c)&2009&Forrester&Cole
dpix&is&distributed&under&the&terms&of&the&GNU&General&Public&License.
See&the&COPYING&file&for&details.
\*****************************************************************************/
#include&&Session.h&
#include&&QFile&
#include&&QDomDocument&
#include&&QDomText&
#include&&QString&
#include&&QTextStream&
#include&&QFile&
#include&&QDir&
#include&&QSettings&
#include&&QFileDialog&
#include&&assert.h&
#include&&qglviewer.h&
#include&&Console.h&
#include&&timestamp.h&
#include&&QDebug&
#include&&QProgressDialog&
#include&&GQStats.h&
Console*&Session::_console&=&0;
SessionFrame::~SessionFrame()
void&SessionFrame::load(&const&QDomElement&&element&)
QDomElement&t&=&element.firstChildElement(&time&);
assert(!t.isNull());
_time&=&t.text().toFloat();
QDomElement&cam&=&element.firstChildElement(&camera_mat&);
assert(!cam.isNull());
QString&es&=&cam.text();
QTextStream&stream(&es);
stream &&&_camera_mat[0]&&&&_camera_mat[4]&&&&_camera_mat[8]&&&&_camera_mat[12]
&&&_camera_mat[1]&&&&_camera_mat[5]&&&&_camera_mat[9]&&&&_camera_mat[13]
&&&_camera_mat[2]&&&&_camera_mat[6]&&&&_camera_mat[10]&&&&_camera_mat[14]
&&&_camera_mat[3]&&&&_camera_mat[7]&&&&_camera_mat[11]&&&&_camera_mat[15];
void&SessionFrame::save(&QDomDocument&&doc,&QDomElement&&element&)
QDomElement&t&=&doc.createElement(&time&);
QDomText&ttext&=&doc.createTextNode(QString(&%1&).arg(_time)&);
element.appendChild(t);
t.appendChild(ttext);
QDomElement&cam&=&doc.createElement(&camera_mat&);
QString&cam_
QTextStream&stream(&cam_string);
stream &&&&\n&&&&&_camera_mat[0]&&&&&&&&&&&_camera_mat[4]&&&&&&&&&&&_camera_mat[8]&&&&&&&&&&&_camera_mat[12]
&&&&\n&&&&&_camera_mat[1]&&&&&&&&&&&_camera_mat[5]&&&&&&&&&&&_camera_mat[9]&&&&&&&&&&&_camera_mat[13]
&&&&\n&&&&&_camera_mat[2]&&&&&&&&&&&_camera_mat[6]&&&&&&&&&&&_camera_mat[10]&&&&&&&&&&&_camera_mat[14]
&&&&\n&&&&&_camera_mat[3]&&&&&&&&&&&_camera_mat[7]&&&&&&&&&&&_camera_mat[11]&&&&&&&&&&&_camera_mat[15]&
QDomText&camtext&=&doc.createTextNode(cam_string);
element.appendChild(cam);
cam.appendChild(camtext);
Session::Session()
&&&&_viewer&=&0;
&&&&_state&=&STATE_NO_DATA;
&&&&_playback_mode&=&PLAYBACK_NORMAL;
void&Session::recordFrame(&const&SessionFrame&&frame&)
int&i&=&_frames.size();
_frames.push_back(frame);
if&(i&&&0)
_frames[i]._time&=&now()&-&_session_&
_frames[i]._time&=&0;
&&&&QString&
&&&&QTextStream(&msg)&&&&&Recording&frame&&&&&&i&&&&&&at&time&&&&&&_frames[i]._time&&&&&\n&;
&&&&_console-&print(&msg&);
const&SessionFrame&&Session::frame(&int&which&)&const
assert(&which&&=&0&&&&which&&&(int)(_frames.size())&);
return&_frames[which];
float&Session::length()&const
if&(_frames.size()&==&0)
return&_frames[_frames.size()-1]._
const&int&CURRENT_VERSION&=&1;
bool&Session::load(&const&QString&&filename&)
QDomDocument&doc(&session&);
QFile&file(filename);
if&(!file.open(QIODevice::ReadOnly))
qWarning(&Could&not&open&%s&,&qPrintable(filename));
QString&parse_
if&(!doc.setContent(&file,&&parse_errors))
qWarning(&Parse&errors:&%s&,&qPrintable(parse_errors));
file.close();
QDomElement&root&=&doc.documentElement();
&&&&return&load(root);
bool&Session::load(&const&QDomElement&&root&)
&&&&assert(_state&==&STATE_NO_DATA&||&_state&==&STATE_LOADED&);
QDomElement&header&=&root.firstChildElement(&header&);
assert(!header.isNull());
QDomElement&version&=&header.firstChildElement(&version&);
assert(!version.isNull());
int&version_num&=&version.text().toInt();
if&(version_num&!=&CURRENT_VERSION)
qWarning(&Obsolete&file&version&%d&(current&is&%d)&,&version_num,&CURRENT_VERSION&);
_frames.clear();
QDomElement&frames&=&root.firstChildElement(&frames&);
QDomElement&frame&=&frames.firstChildElement();
while&(!frame.isNull())
SessionFrame&
sf.load(&frame&);
_frames.push_back(&sf&);
frame&=&frame.nextSiblingElement();
&&&&_state&=&STATE_LOADED;
bool&Session::save(&const&QString&&filename&)
QDomDocument&doc(&session&);
QDomElement&root&=&doc.createElement(&session&);
doc.appendChild(root);
&&&&bool&ret&=&save(doc,&root);
&&&&if&(!ret)
&&&&&&&&return&
QFile&file(filename);
if&(!file.open(QIODevice::WriteOnly))
qWarning(&Could&not&open&%s&,&qPrintable(filename));
file.write(doc.toByteArray());
file.close();
bool&Session::save(&QDomDocument&&doc,&QDomElement&&root&)
&&&&assert(&_state&==&STATE_LOADED&);
QDomElement&header&=&doc.createElement(&header&);
root.appendChild(header);
QDomElement&version&=&doc.createElement(&version&);
QDomText&versiontext&=&doc.createTextNode(&QString(&%1&).arg(CURRENT_VERSION)&);
header.appendChild(version);
version.appendChild(versiontext);
QDomElement&frames&=&doc.createElement(&frames&);
root.appendChild(frames);
for&(int&i&=&0;&i&&&(int)(_frames.size());&i++)
QDomElement&frame&=&doc.createElement(&frame&);
_frames[i].save(doc,&frame);
frames.appendChild(frame);
&&&&return&
void&Session::startRecording(&QGLViewer*&viewer,&Ui::MainWindow&*ui&)
&&&&assert(_state&==&STATE_NO_DATA&||&_state&==&STATE_LOADED&);
&&&&_frames.clear();
&&&&_viewer&=&
_ui_mainwindow&=&
&&&&_state&=&STATE_RECORDING;
&&&&_session_timer&=&now();
&&&&connect(&_viewer,&SIGNAL(&drawFinished(bool)),&this,&SLOT(gatherAndRecordFrame())&);
&&&&emit&recordingStarted();
void&Session::stopRecording()
&&&&assert(&_state&==&STATE_RECORDING&);
&&&&disconnect(&_viewer,&SIGNAL(&drawFinished(bool)),&this,&SLOT(gatherAndRecordFrame())&);
&&&&_state&=&STATE_LOADED;
&&&&_viewer&=&0;
&&&&emit&recordingStopped();
void&Session::startPlayback(&QGLViewer*&viewer,&Ui::MainWindow&*ui,&PlaybackMode&mode,&const&QString&&filename&)
&&&&assert(&_state&==&STATE_LOADED&);
&&&&_viewer&=&
_ui_mainwindow&=&
&&&&_state&=&STATE_PLAYING;
&&&&_playback_mode&=&
&&&&_current_frame&=&-1;
&&&&_has_dumped_current_frame&=&
&&&&_screenshot_file_pattern&=&&&;
&&&&_screenshot_filenames.clear();
&&&&connect(&this,&SIGNAL(&redrawNeeded()&),&_viewer,&SLOT(&forceFullRedraw()&)&);
&&&&if&(_playback_mode&==&PLAYBACK_SCREENSHOTS)
&&&&&&&&int&extindex&=&filename.lastIndexOf('.');
&&&&&&&&QTextStream(&_screenshot_file_pattern)&
&&&&&&&&&&&&&&&filename.left(extindex)&&&&&%04d&&&&&filename.right(filename.length()&-&extindex);
&&&&&&&&connect(&_viewer,&SIGNAL(&drawFinished(bool)),&this,&SLOT(dumpScreenshot())&);
&&&&else&if&(_playback_mode&==&PLAYBACK_SCREENSHOTS_INTERPOLATED&||
&&&&&&&&&&&&&_playback_mode&==&PLAYBACK_MOVIE)
&&&&&&&&_final_filename&=&
&&&&&&&&QDir&temp&=&QDir(&./temp&);
&&&&&&&&if&(!temp.exists())
&&&&&&&&&&&&QDir&work&=&QDir(&.&);
&&&&&&&&&&&&work.mkdir(&temp&);
&&&&&&&&&&&&temp&=&QDir(&./temp&);
QTextStream(&_screenshot_file_pattern)&&&&temp.filePath(&pre_interp_movie%04d.jpg&);
&&&&&&&&connect(&_viewer,&SIGNAL(&drawFinished(bool)),&this,&SLOT(dumpScreenshot())&);
&&&&QString&
&&&&QTextStream(&msg)&&&&&Replaying&session&(&&&&&length()&&&&&&s.&/&&&
&&&&&&&&&&&&&&&&&&&&&&&&&numFrames()&&&&&&frames)...\n&;
&&&&_console-&print(&msg&);
&&&&emit&playbackStarted();
&&&&_session_timer&=&now();
&&&&advancePlaybackFrame();
void&Session::cleanUpPlayback()
&&&&assert(&_state&==&STATE_PLAYING&);
&&&&disconnect(&this,&SIGNAL(&redrawNeeded()&),&_viewer,&SLOT(&forceFullRedraw()&)&);
&&&&disconnect(&_viewer,&SIGNAL(&drawFinished(bool)),&this,&SLOT(dumpScreenshot())&);
&&&&_state&=&STATE_LOADED;
&&&&_viewer&=&0;
void&Session::stopPlayback()
&&&&cleanUpPlayback();&
&&&&_console-&print(&Replay&stopped&by&user.\n&);
&&&&emit&playbackStopped();
void&Session::gatherAndRecordFrame()
&&&&SessionFrame&
&&&&GLdouble&mv[16];
&&&&_viewer-&camera()-&getModelViewMatrix(mv);
&&&&frame._camera_mat&=&xform(&mv&);
&&&&recordFrame(&frame&);
void&Session::advancePlaybackFrame()
&&&&if&(_state&!=&STATE_PLAYING)
&&&&_current_frame++;
&&&&_has_dumped_current_frame&=&
&&&&const&SessionFrame&&current_frame&=&frame(_current_frame);
&&&&_viewer-&camera()-&setFromModelViewMatrix(&current_frame._camera_mat&);
&&&&_viewer-&camera()-&loadModelViewMatrix();
&&&&emit&redrawNeeded();
&&&&float&elapsed_time&=&now()&-&_session_
&&&&if&(_current_frame&&&numFrames()&-&1)
&&&&&&&&float&time_until_next&=&frame(_current_frame+1)._time&-&elapsed_
&&&&&&&&if&(time_until_next&&&0)
&&&&&&&&&&&&time_until_next&=&0;
&&&&&&&&if&(_playback_mode&==&PLAYBACK_NORMAL)
&&&&&&&&&&&&//&realtime&playback
&&&&&&&&&&&&QTimer::singleShot(&1000&*&time_until_next,&this,&SLOT(advancePlaybackFrame()));
&&&&&&&&else&
&&&&&&&&&&&&//&playback&as&fast&as&possible
&&&&&&&&&&&&QTimer::singleShot(&0,&this,&SLOT(advancePlaybackFrame()));
&&&&&&&&cleanUpPlayback();
&&&&&&&&if&(_playback_mode&==&PLAYBACK_MOVIE)
&&&&&&&&&&&&convertReplayFramesToMovie();
&&&&&&&&else&if&(_playback_mode&==&PLAYBACK_SCREENSHOTS_INTERPOLATED)
&&&&&&&&&&&&interpolateScreenshotFrames();
&&&&&&&&_console-&print(QString(&Replay&finished.&fps:&%1\n&).arg((float)numFrames()&/&elapsed_time));
&&&&&&&&emit&playbackFinished();
void&Session::dumpScreenshot()
&&&&if&(!_has_dumped_current_frame)
&&&&&&&&QString&
&&&&&&&&filename.sprintf(qPrintable(_screenshot_file_pattern),&_current_frame);
&&&&&&&&_screenshot_filenames.push_back(filename);
&&&&&&&&_viewer-&saveSnapshot(&filename,&true&);
&&&&&&&&_console-&print(&QString(&Saved&%1\n&).arg(filename)&);
&&&&&&&&_has_dumped_current_frame&=&
void&Session::interpolateScreenshotFrames()
&&&&float&fps&=&getFPSFromSettings();
&&&&int&&&num_frames&=&int(length()&*&fps);
&&&&int&&&cur_input&=&0;&
&&&&QDir&temp&=&QDir(&./temp&);
&&&&assert(temp.exists());
&&&&QProgressDialog&progress(&Interpolating&Screenshots...&,&&Cancel&,&0,&num_frames+1,&0);
&&&&progress.setWindowModality(Qt::WindowModal);
&&&&progress.setMinimumDuration(2000);
&&&&int&extindex&=&_final_filename.lastIndexOf('.');
&&&&QString&prefix&=&_final_filename.left(extindex);
&&&&vector&QString&&
&&&&for&(int&f&=&0;&f&&&num_frames&+&1;&f++)
while&(f&&&int(frame(cur_input)._time&*&fps))
cur_input++;
QString&targetfile&=&QString(&%1%2.jpg&).arg(prefix).arg(f,&5,&10,&QLatin1Char('0'));
qDebug()&&&&_screenshot_filenames[cur_input]&&&&&-&&&&&&targetfile&&&&&for&time&&&&&frame(cur_input)._
&&&&&&&&QFile::copy(&_screenshot_filenames[cur_input],&targetfile&);
&&&&&&&&progress.setValue(f);
&&&&progress.setValue(num_frames+1);
&&&&//&Clean&up&temp&files.
&&&&for&(int&i&=&0;&i&&&(int)(_screenshot_filenames.size());&i++)
&&&&&&&&QFile::remove(_screenshot_filenames[i]);
&&&&//&rmdir&will&only&succeed&if&the&directory&is&empty.
&&&&QDir&work&=&QDir(&.&);
&&&&work.rmdir(&temp&);
void&Session::convertReplayFramesToMovie()
&&&&QString&ffmpeg_
&&&&QStringList&ffmpeg_input_
&&&&QStringList&ffmpeg_output_
&&&&float&
&&&&getFFMPEGFromSettings(&ffmpeg_cmd,&ffmpeg_input_options,&ffmpeg_output_options,&fps&);
&&&&int&&&num_frames&=&int(length()&*&fps);
&&&&int&&&cur_input&=&0;&
&&&&QDir&temp&=&QDir(&./temp&);
&&&&assert(temp.exists());
&&&&QProgressDialog&progress(&Interpolating&Frames...&,&&Cancel&,&0,&num_frames+1,&0);
&&&&int&progress_counter&=&0;
&&&&int&total_temp_files&=&3*_screenshot_filenames.size();
&&&&int&total_progress&=&num_frames+1&+&1&/*ffmpeg*/&+&total_temp_files&+&1;
&&&&progress.setWindowModality(Qt::WindowModal);
&&&&progress.setMinimumDuration(2000);
&&&&vector&QString&&
&&&&for&(int&f&=&0;&f&&&num_frames&+&1;&f++)
while&(f&&&int(frame(cur_input)._time&*&fps))
cur_input++;
&&&&&&&&QString&targetbasename&=&QString(&post_interp_movie%1.jpg&).arg(f,&5,&10,&QLatin1Char('0'));
QString&targetfile&=&temp.filePath(targetbasename);
&&&&&&&&tempfiles.push_back(targetfile);
qDebug()&&&&_screenshot_filenames[cur_input]&&&&&-&&&&&&targetfile&&&&&for&time&&&&&frame(cur_input)._
&&&&&&&&QFile::copy(&_screenshot_filenames[cur_input],&targetfile&);
&&&&&&&&progress.setValue(progress_counter++);
&&&&progress.setValue(progress_counter++);
&&&&total_temp_files&=&tempfiles.size()&+&_screenshot_filenames.size();
&&&&total_progress&=&num_frames+1&+&1&/*ffmpeg*/&+&total_temp_files&+&1;
&&&&progress.setMaximum(total_progress);
&&&&QStringList&ffmpeg_args&=&ffmpeg_input_
&&&&ffmpeg_args&&&&&-i&&&&&QString(&./temp/post_interp_movie%05d.jpg&)&&&&ffmpeg_output_options&&&&_final_
&&&&ffmpeg_cmd.replace(&/&,&&\\&);
&&&&ffmpeg_args.replaceInStrings(&/&,&&\\&);
&&&&progress.setLabelText(&Running&FFMPEG&);
&&&&_console-&print(&&Running&ffmpeg...\n&&);
&&&&_console-&print(&QString(&%1&%2\n\n&).arg(ffmpeg_cmd).arg(ffmpeg_args.join(&&===&&)));
&&&&_console-&execute(&ffmpeg_cmd,&ffmpeg_args&);
&&&&_console-&print(&&Cleaning&up...\n&);
&&&&progress.setValue(progress_counter++);
&&&&progress.setLabelText(&Cleaning&temporary&files...&);
&&&&//&Clean&up&temp&files.
&&&&for&(int&i&=&0;&i&&&(int)(tempfiles.size());&i++)
&&&&&&&&QFile::remove(tempfiles[i]);
&&&&&&&&progress.setValue(progress_counter++);
&&&&for&(int&i&=&0;&i&&&(int)(_screenshot_filenames.size());&i++)
&&&&&&&&QFile::remove(_screenshot_filenames[i]);
&&&&&&&&progress.setValue(progress_counter++);
&&&&//&rmdir&will&only&succeed&if&the&directory&is&empty.
&&&&QDir&work&=&QDir(&.&);
&&&&work.rmdir(&temp&);
&&&&progress.setValue(progress.maximum());
void&Session::getFFMPEGFromSettings(&QString&&cmd,&QStringList&&input_options,&QStringList&&output_options,&float&&fps&)
&&&&QSettings&settings(&dpix&,&&dpix&);
&&&&settings.beginGroup(&session/ffmpeg&);
&&&&cmd&=&settings.value(&cmd&,&&ffmpeg&).toString();
&&&&QString&input_options_string&=&settings.value(&input_options&,&&&).toString();
&&&&QString&output_options_string&=&settings.value(&output_options&,&&&).toString();
&&&&//&this&should&be&changed&to&read&the&fps&from&the&options&string
&&&&fps&=&settings.value(&fps&,&29.97f).toDouble();
&&&&/*float&bitrate&=&settings.value(&bitrate&,&200).toDouble();
&&&&options&&&&&-r&&&&&&QString::number(fps)&&&&&-b&&&&&QString::number(bitrate);*/
&&&&input_options&&&&input_options_string.split(&&&,&QString::SkipEmptyParts);
&&&&output_options&&&&output_options_string.split(&&&,&QString::SkipEmptyParts);
float&Session::getFPSFromSettings()
&&&&QSettings&settings(&dpix&,&&dpix&);
&&&&settings.beginGroup(&session/ffmpeg&);
&&&&return&settings.value(&fps&,&29.97f).toDouble();
void&Session::execSettingsDialog()
&&&&SessionSettingsDialog&
&&&&if&(dialog.exec()&==&QDialog::Accepted)
&&&&&&&&QSettings&settings(&dpix&,&&dpix&);
&&&&&&&&settings.beginGroup(&session/ffmpeg&);
&&&&&&&&settings.setValue(&cmd&,&dialog.getCommand());&
&&&&&&&&settings.setValue(&fps&,&dialog.getFPS());
&&&&&&&&settings.setValue(&bitrate&,&dialog.getBitrate());
&&&&&&&&settings.setValue(&input_options&,&dialog.getInputOptionsString());
&&&&&&&&settings.setValue(&output_options&,&dialog.getOutputOptionsString());
&&&&&&&&settings.sync();
SessionSettingsDialog::SessionSettingsDialog()
&&&&_ui.setupUi(this);
&&&&QSettings&settings(&dpix&,&&dpix&);
&&&&settings.beginGroup(&session/ffmpeg&);
&&&&QString&cmd&=&settings.value(&cmd&,&&ffmpeg&).toString();
&&&&float&fps&=&settings.value(&fps&,&29.97f).toDouble();
&&&&float&bitrate&=&settings.value(&bitrate&,&200).toDouble();
&&&&QString&input_options_string&=&settings.value(&input_options&,&&&).toString();
&&&&QString&output_options_string&=&settings.value(&output_options&,&&&).toString();
&&&&_ui.commandEdit-&setText(cmd);
&&&&_ui.fpsSpinBox-&setValue(fps);
&&&&_ui.bitrateSpinBox-&setValue(bitrate);
&&&&if&(input_options_string.isEmpty())
&&&&&&&&on_actionUpdateInputOptionsString_triggered();
&&&&&&&&_ui.inputOptionsLineEdit-&setText(input_options_string);
&&&&if&(output_options_string.isEmpty())
&&&&&&&&on_actionUpdateOutputOptionsString_triggered();
&&&&&&&&_ui.outputOptionsLineEdit-&setText(output_options_string);
on_actionUpdate_Example_triggered();
void&SessionSettingsDialog::on_browseCommandButton_clicked()
&&&&QString&filename&=&
&&&&&&&&QFileDialog::getOpenFileName(&this,&&Find&FFMPEG&,&&.&,&&Executable&Files&(*.exe)&&);
&&&&if&(!filename.isNull())
&&&&&&&&_ui.commandEdit-&setText(filename);
void&SessionSettingsDialog::on_actionUpdateInputOptionsString_triggered()
&&&&QString&new_input_
QTextStream(&new_input_options)&&&&&&-r&&&&&&_ui.fpsSpinBox-&value();
&&&&_ui.inputOptionsLineEdit-&setText(new_input_options);
&&&&on_actionUpdate_Example_triggered();
void&SessionSettingsDialog::on_actionUpdateOutputOptionsString_triggered()
&&&&QString&new_output_
QTextStream(&new_output_options)&&&&&&-b&&&&&&_ui.bitrateSpinBox-&value();
_ui.outputOptionsLineEdit-&setText(new_output_options);
&&&&on_actionUpdate_Example_triggered();
void&SessionSettingsDialog::on_actionUpdate_Example_triggered()
&&&&QString&example_
&&&&QTextStream(&example_cmd)&&&&_ui.commandEdit-&text()&&&&_ui.inputOptionsLineEdit-&text()&&&&&&-i&&snap%05d.jpg&&&&&&_ui.outputOptionsLineEdit-&text()&&&&&&&out.mpg&&;
&&&&example_cmd.replace(&/&,&&\\&);
&&&&_ui.exampleCommandEdit-&setText(&example_cmd&);
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
一定是你&继承了QThread&然后&在这个类里&有错误,贴出你的&Session&类的&代码&.h&+&.cpp
是我include&头文件&和&Qthread产生了冲突
但是我还有问题,就是我的头文件既然有了这样一个宏定义,那我该怎么处理呢,我是在编译老师给的代码,代码本身并不清楚
我想知道大家遇到到这种情况,是怎样的处理方式呢?
如果我直接把库文件的那个函数屏蔽应该会有问题吧?
[code=c][/cod#ifndef&TIMESTAMP_H
#define&TIMESTAMP_H
Szymon&Rusinkiewicz
Princeton&University
timestamp.h
Wrapper&around&system-specific&timestamps.
#ifdef&WIN32
#&define&WIN32_LEAN_AND_MEAN
#&include&&limits.h&
#&include&&windows.h&
#&define&usleep(x)&Sleep((x)/1000)
&&struct&timestamp&{&LARGE_INTEGER&t;&};
&&static&inline&double&LI2d(const&LARGE_INTEGER&&li)
//&Work&around&random&compiler&bugs...
double&d&=&*(unsigned&*)(&(li.HighPart));
d&*=&65536.0&*&65536.0;
d&+=&*(unsigned&*)(&(li.LowPart));
&&static&inline&float&operator&-&(const&timestamp&&t1,&const&timestamp&&t2)
static&LARGE_INTEGER&PerformanceF
static&int&status&=&QueryPerformanceFrequency(&PerformanceFrequency);
if&(status&==&0)&return&1.0f;
return&float((LI2d(t1.t)&-&LI2d(t2.t))&/&LI2d(PerformanceFrequency));
&&static&inline&timestamp&now()
timestamp&t;
QueryPerformanceCounter(&t.t);}

我要回帖

更多关于 0xc000001d是什么问题 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信