| 539 | } |
| 540 | |
| 541 | bool FFmpegVersionHandler::loadFFMpegLibrarySpecific(QString avFormatLib, |
| 542 | QString avCodecLib, |
| 543 | QString avUtilLib, |
| 544 | QString swResampleLib) |
| 545 | { |
| 546 | bool success = false; |
| 547 | for (auto version : SupportedLibraryVersionCombinations) |
| 548 | { |
| 549 | this->log(QString("Checking versions avutil %1, swresample %2, avcodec %3, avformat %4") |
| 550 | .arg(version.avutil.major) |
| 551 | .arg(version.swresample.major) |
| 552 | .arg(version.avcodec.major) |
| 553 | .arg(version.avformat.major)); |
| 554 | if (lib.loadFFMpegLibrarySpecific(avFormatLib, avCodecLib, avUtilLib, swResampleLib)) |
| 555 | { |
| 556 | this->log("Testing versions of the library. Currently looking for:"); |
| 557 | this->log(QString("avutil: %1.xx.xx").arg(version.avutil.major)); |
| 558 | this->log(QString("swresample: %1.xx.xx").arg(version.swresample.major)); |
| 559 | this->log(QString("avcodec: %1.xx.xx").arg(version.avcodec.major)); |
| 560 | this->log(QString("avformat: %1.xx.xx").arg(version.avformat.major)); |
| 561 | |
| 562 | if ((success = checkVersionWithLib(this->lib, version, this->logList))) |
| 563 | { |
| 564 | this->libVersion = addMinorAndMicroVersion(this->lib, version); |
| 565 | this->log("checking the library versions was successful."); |
| 566 | break; |
| 567 | } |
| 568 | } |
| 569 | } |
| 570 | |
| 571 | if (success && this->libVersion.avformat.major < 59) |
| 572 | this->lib.avformat.av_register_all(); |
| 573 | |
| 574 | return success; |
| 575 | } |
| 576 | |
| 577 | bool FFmpegVersionHandler::checkLibraryFiles(QString avCodecLib, |
| 578 | QString avFormatLib, |
no test coverage detected