[Geesas-Devs] SF.net SVN: geesas:[13] pencilanimation/src/external/linux/linux.cpp
Status: Abandoned
Brought to you by:
creek23
From: <cr...@us...> - 2009-02-09 17:28:50
|
Revision: 13 http://geesas.svn.sourceforge.net/geesas/?rev=13&view=rev Author: creek23 Date: 2009-02-09 17:28:24 +0000 (Mon, 09 Feb 2009) Log Message: ----------- properly made use of QProcess::waitForStarted and waitForFinished Modified Paths: -------------- pencilanimation/src/external/linux/linux.cpp Modified: pencilanimation/src/external/linux/linux.cpp =================================================================== --- pencilanimation/src/external/linux/linux.cpp 2009-02-09 16:32:27 UTC (rev 12) +++ pencilanimation/src/external/linux/linux.cpp 2009-02-09 17:28:24 UTC (rev 13) @@ -45,20 +45,25 @@ QProcess ffmpeg; - ffmpeg.start("ffmpeg -i " + tempPath + "tmp%03d.png -v 0 " + filePath + ""); - ffmpeg.waitForStarted(); - ffmpeg.waitForFinished(); - QByteArray sErr = ffmpeg.readAllStandardError(); - if (sErr == "") { + ffmpeg.start("ffmpeg -i " + tempPath + "tmp%03d.png -v 0 -r " + QString::number(fps) + " -y " + filePath + ""); + if (ffmpeg.waitForStarted() == true) { + if (ffmpeg.waitForFinished() == true) { + QByteArray sErr = ffmpeg.readAllStandardError(); + if (sErr == "") { + qDebug() << "ERROR: Could not execute FFmpeg."; + } else { + progress.setValue(100); + //qDebug() << "----------------"; + //qDebug() << sErr; + qDebug() << "----------------"; + qDebug() << "OGG export done"; + } + } else { + qDebug() << "ERROR: FFmpeg did not finish executing."; + } + } else { qDebug() << "Please install FFMPEG: sudo apt-get install ffmpeg"; - } else { - progress.setValue(100); - qDebug() << "----------------"; - qDebug() << sErr; - qDebug() << "----------------"; - qDebug() << "OGG export done"; } - // --------- Clean up temp directory --------- QDir dir(tempPath); QStringList filtername("*.*"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |