mirror of
https://gitlab.com/kelteseth/ScreenPlay.git
synced 2024-11-07 03:22:33 +01:00
Fix updating ffmpeg version string to use the correct version string now via a variable. This is like the most beginner error ever -.-
This commit is contained in:
parent
9e0bece2a7
commit
176742fb0d
@ -214,16 +214,17 @@ void Util::Util::requestAllLDataProtection()
|
|||||||
void Util::downloadFFMPEG()
|
void Util::downloadFFMPEG()
|
||||||
{
|
{
|
||||||
QNetworkRequest req;
|
QNetworkRequest req;
|
||||||
|
QString ffmpegVersion {"ffmpeg-4.2.1"};
|
||||||
|
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
req.setUrl(QUrl("https://ffmpeg.zeranoe.com/builds/win64/static/ffmpeg-4.2.1-win64-static.zip"));
|
req.setUrl(QUrl("https://ffmpeg.zeranoe.com/builds/win64/static/"+ffmpegVersion+"-win64-static.zip"));
|
||||||
#elif defined(Q_OS_OSX)
|
#elif defined(Q_OS_OSX)
|
||||||
req.setUrl(QUrl("https://ffmpeg.zeranoe.com/builds/macos64/static/ffmpeg-4.2.1-macos64-static.zip"));
|
req.setUrl(QUrl("https://ffmpeg.zeranoe.com/builds/macos64/static/"+ffmpegVersion+"-win64-static.zip"));
|
||||||
#endif
|
#endif
|
||||||
setAquireFFMPEGStatus(AquireFFMPEGStatus::Download);
|
setAquireFFMPEGStatus(AquireFFMPEGStatus::Download);
|
||||||
|
|
||||||
QNetworkReply* reply = m_networkAccessManager->get(req);
|
QNetworkReply* reply = m_networkAccessManager->get(req);
|
||||||
QObject::connect(reply, &QNetworkReply::finished, this, [this, reply]() {
|
QObject::connect(reply, &QNetworkReply::finished, this, [this, reply, ffmpegVersion]() {
|
||||||
using namespace libzippp;
|
using namespace libzippp;
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
@ -240,16 +241,20 @@ void Util::downloadFFMPEG()
|
|||||||
|
|
||||||
string path = QGuiApplication::instance()->applicationDirPath().toStdString() + "/";
|
string path = QGuiApplication::instance()->applicationDirPath().toStdString() + "/";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
ZipEntry entryFFMPEG = archive->getEntry("ffmpeg-4.1.4-win64-static/bin/ffmpeg.exe");
|
ZipEntry entryFFMPEG = archive->getEntry(ffmpegVersion.toStdString() +"-win64-static/bin/ffmpeg.exe");
|
||||||
std::string entryFFMPEGPath = path + "ffmpeg.exe";
|
std::string entryFFMPEGPath = path + "ffmpeg.exe";
|
||||||
#elif defined(Q_OS_OSX)
|
#elif defined(Q_OS_OSX)
|
||||||
ZipEntry entryFFMPEG = archive->getEntry("ffmpeg-4.1.4-macos64-static/bin/ffmpeg");
|
ZipEntry entryFFMPEG = archive->getEntry(ffmpegVersion.toStdString() +"-macos64-static/bin/ffmpeg");
|
||||||
std::string entryFFMPEGPath = path + "ffmpeg";
|
std::string entryFFMPEGPath = path + "ffmpeg";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (entryFFMPEG.isNull()) {
|
if (entryFFMPEG.isNull()) {
|
||||||
qDebug() << "null";
|
qDebug() << "entryFFMPEG is null. No more entry is available.";
|
||||||
|
qDebug() << "Download size was: " << download.size() << "bytes";
|
||||||
|
|
||||||
|
|
||||||
setAquireFFMPEGStatus(AquireFFMPEGStatus::ExtractingFailedFFMPEG);
|
setAquireFFMPEGStatus(AquireFFMPEGStatus::ExtractingFailedFFMPEG);
|
||||||
return;
|
return;
|
||||||
@ -262,10 +267,10 @@ void Util::downloadFFMPEG()
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
ZipEntry entryFFPROBE = archive->getEntry("ffmpeg-4.1.4-win64-static/bin/ffprobe.exe");
|
ZipEntry entryFFPROBE = archive->getEntry(ffmpegVersion.toStdString() +"-win64-static/bin/ffprobe.exe");
|
||||||
std::string entryFFPROBEPath = path + "ffprobe.exe";
|
std::string entryFFPROBEPath = path + "ffprobe.exe";
|
||||||
#elif defined(Q_OS_OSX)
|
#elif defined(Q_OS_OSX)
|
||||||
ZipEntry entryFFPROBE = archive->getEntry("ffmpeg-4.1.4-macos64-static/bin/ffprobe");
|
ZipEntry entryFFPROBE = archive->getEntry(ffmpegVersion.toStdString() +"-macos64-static/bin/ffprobe");
|
||||||
std::string entryFFPROBEPath = path + "ffprobe";
|
std::string entryFFPROBEPath = path + "ffprobe";
|
||||||
#endif
|
#endif
|
||||||
if (entryFFPROBE.isNull()) {
|
if (entryFFPROBE.isNull()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user