Disable timeouts with 0 values
This commit is contained in:
parent
4442f02561
commit
1a97781e8c
5 changed files with 15 additions and 9 deletions
|
@ -15,7 +15,10 @@
|
||||||
Ffmpeg::Ffmpeg() {
|
Ffmpeg::Ffmpeg() {
|
||||||
m_ffmpegPath = Preferences::instance()->getFfmpegPath();
|
m_ffmpegPath = Preferences::instance()->getFfmpegPath();
|
||||||
m_ffmpegTimeout = Preferences::instance()->getFfmpegTimeout();
|
m_ffmpegTimeout = Preferences::instance()->getFfmpegTimeout();
|
||||||
if (m_ffmpegTimeout > 0) m_ffmpegTimeout * 1000;
|
if (m_ffmpegTimeout > 0)
|
||||||
|
m_ffmpegTimeout * 1000;
|
||||||
|
else
|
||||||
|
m_ffmpegTimeout = -1;
|
||||||
std::string strPath = m_ffmpegPath.toStdString();
|
std::string strPath = m_ffmpegPath.toStdString();
|
||||||
m_intermediateFormat = "png";
|
m_intermediateFormat = "png";
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,7 +46,7 @@ public:
|
||||||
private:
|
private:
|
||||||
QString m_intermediateFormat, m_ffmpegPath, m_audioPath, m_audioFormat;
|
QString m_intermediateFormat, m_ffmpegPath, m_audioPath, m_audioFormat;
|
||||||
int m_frameCount = 0, m_lx, m_ly, m_bpp, m_bitsPerSample, m_channelCount,
|
int m_frameCount = 0, m_lx, m_ly, m_bpp, m_bitsPerSample, m_channelCount,
|
||||||
m_ffmpegTimeout = 30000, m_frameNumberOffset = -1;
|
m_ffmpegTimeout = -1, m_frameNumberOffset = -1;
|
||||||
double m_frameRate = 24.0;
|
double m_frameRate = 24.0;
|
||||||
bool m_ffmpegExists = false, m_ffprobeExists = false, m_hasSoundTrack = false;
|
bool m_ffmpegExists = false, m_ffprobeExists = false, m_hasSoundTrack = false;
|
||||||
TFilePath m_path;
|
TFilePath m_path;
|
||||||
|
|
|
@ -835,7 +835,10 @@ void LipSyncPopup::onApplyButton() {
|
||||||
}
|
}
|
||||||
runRhubarb();
|
runRhubarb();
|
||||||
int rhubarbTimeout = Preferences::instance()->getRhubarbTimeout();
|
int rhubarbTimeout = Preferences::instance()->getRhubarbTimeout();
|
||||||
if (rhubarbTimeout > 0) rhubarbTimeout * 1000;
|
if (rhubarbTimeout > 0)
|
||||||
|
rhubarbTimeout * 1000;
|
||||||
|
else
|
||||||
|
rhubarbTimeout = -1;
|
||||||
m_rhubarb->waitForFinished(rhubarbTimeout);
|
m_rhubarb->waitForFinished(rhubarbTimeout);
|
||||||
m_progressDialog->hide();
|
m_progressDialog->hide();
|
||||||
QString results = m_rhubarb->readAllStandardError();
|
QString results = m_rhubarb->readAllStandardError();
|
||||||
|
|
|
@ -1043,10 +1043,10 @@ QString PreferencesPopup::getUIString(PreferencesItemId id) {
|
||||||
|
|
||||||
// Import / Export
|
// Import / Export
|
||||||
{ffmpegPath, tr("Executable Directory:")},
|
{ffmpegPath, tr("Executable Directory:")},
|
||||||
{ffmpegTimeout, tr("Import/Export Timeout (sec; -1 = no timeout):")},
|
{ffmpegTimeout, tr("Import/Export Timeout (seconds):")},
|
||||||
{fastRenderPath, tr("Fast Render Output Directory:")},
|
{fastRenderPath, tr("Fast Render Output Directory:")},
|
||||||
{rhubarbPath, tr("Executable Directory:")},
|
{rhubarbPath, tr("Executable Directory:")},
|
||||||
{rhubarbTimeout, tr("Analyze Audio Timeout (sec; -1 = no timeout):") },
|
{rhubarbTimeout, tr("Analyze Audio Timeout (seconds):")},
|
||||||
|
|
||||||
// Drawing
|
// Drawing
|
||||||
{scanLevelType, tr("Scan File Format:")},
|
{scanLevelType, tr("Scan File Format:")},
|
||||||
|
@ -1635,7 +1635,7 @@ QWidget* PreferencesPopup::createImportExportPage() {
|
||||||
|
|
||||||
QGridLayout* rhubarbOptionsLay = insertGroupBox(tr("Rhubarb Lip Sync"), lay);
|
QGridLayout* rhubarbOptionsLay = insertGroupBox(tr("Rhubarb Lip Sync"), lay);
|
||||||
{
|
{
|
||||||
insertUI(rhubarbPath, rhubarbOptionsLay);
|
insertUI(rhubarbPath, rhubarbOptionsLay);
|
||||||
insertUI(rhubarbTimeout, rhubarbOptionsLay);
|
insertUI(rhubarbTimeout, rhubarbOptionsLay);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -446,12 +446,12 @@ void Preferences::definePreferenceItems() {
|
||||||
|
|
||||||
// Import / Export
|
// Import / Export
|
||||||
define(ffmpegPath, "ffmpegPath", QMetaType::QString, "");
|
define(ffmpegPath, "ffmpegPath", QMetaType::QString, "");
|
||||||
define(ffmpegTimeout, "ffmpegTimeout", QMetaType::Int, -1, -1,
|
define(ffmpegTimeout, "ffmpegTimeout", QMetaType::Int, 0, 0,
|
||||||
std::numeric_limits<int>::max());
|
std::numeric_limits<int>::max());
|
||||||
define(fastRenderPath, "fastRenderPath", QMetaType::QString, "desktop");
|
define(fastRenderPath, "fastRenderPath", QMetaType::QString, "desktop");
|
||||||
define(rhubarbPath, "rhubarbPath", QMetaType::QString, "");
|
define(rhubarbPath, "rhubarbPath", QMetaType::QString, "");
|
||||||
define(rhubarbTimeout, "rhubarbTimeout", QMetaType::Int, -1, -1,
|
define(rhubarbTimeout, "rhubarbTimeout", QMetaType::Int, 0, 0,
|
||||||
std::numeric_limits<int>::max());
|
std::numeric_limits<int>::max());
|
||||||
|
|
||||||
// Drawing
|
// Drawing
|
||||||
define(scanLevelType, "scanLevelType", QMetaType::QString, "tif");
|
define(scanLevelType, "scanLevelType", QMetaType::QString, "tif");
|
||||||
|
|
Loading…
Reference in a new issue