MCPcopy Create free account
hub / github.com/IENT/YUView / loadFFMpegLibrarySpecific

Method loadFFMpegLibrarySpecific

YUViewLib/src/ffmpeg/FFmpegLibraryFunctions.cpp:263–295  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

261}
262
263bool 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
297void FFmpegLibraryFunctions::addLibNamesToList(QString libName,
298 QStringList & l,

Callers

nothing calls this directly

Calls 3

unloadAllLibrariesMethod · 0.95
logMethod · 0.95
bindLibraryFunctionsFunction · 0.85

Tested by

no test coverage detected