| 261 | } |
| 262 | |
| 263 | bool FFmpegLibraryFunctions::loadFFMpegLibrarySpecific(QString avFormatLib, |
| 264 | QString avCodecLib, |
| 265 | QString avUtilLib, |
| 266 | QString swResampleLib) |
| 267 | { |
| 268 | this->unloadAllLibraries(); |
| 269 | |
| 270 | auto loadLibrary = [this](QLibrary &lib, QString libPath) { |
| 271 | lib.setFileName(libPath); |
| 272 | auto success = lib.load(); |
| 273 | this->log("Loading library " + libPath + (success ? " succeded" : " failed")); |
| 274 | return success; |
| 275 | }; |
| 276 | |
| 277 | auto success = (loadLibrary(this->libAvutil, avUtilLib) && // |
| 278 | loadLibrary(this->libSwresample, swResampleLib) && // |
| 279 | loadLibrary(this->libAvcodec, avCodecLib) && // |
| 280 | loadLibrary(this->libAvformat, avFormatLib)); |
| 281 | |
| 282 | if (!success) |
| 283 | { |
| 284 | this->unloadAllLibraries(); |
| 285 | return false; |
| 286 | } |
| 287 | |
| 288 | success = (bindLibraryFunctions(this->libAvformat, this->avformat, this->logList) && |
| 289 | bindLibraryFunctions(this->libAvcodec, this->avcodec, this->logList) && |
| 290 | bindLibraryFunctions(this->libAvutil, this->avutil, this->logList) && |
| 291 | bindLibraryFunctions(this->libSwresample, this->swresample, this->logList)); |
| 292 | this->log(QString("Binding functions ") + (success ? "successfull" : "failed")); |
| 293 | |
| 294 | return success; |
| 295 | } |
| 296 | |
| 297 | void FFmpegLibraryFunctions::addLibNamesToList(QString libName, |
| 298 | QStringList & l, |
nothing calls this directly
no test coverage detected