| 41 | |
| 42 | template <typename T> |
| 43 | bool resolveFunction(QLibrary & lib, |
| 44 | std::function<T> &function, |
| 45 | const char * symbolName, |
| 46 | QStringList * logList) |
| 47 | { |
| 48 | auto ptr = lib.resolve(symbolName); |
| 49 | if (!ptr) |
| 50 | { |
| 51 | if (logList) |
| 52 | logList->append(QString("Function %1 not found.").arg(symbolName)); |
| 53 | return false; |
| 54 | } |
| 55 | |
| 56 | function = reinterpret_cast<T *>(ptr); |
| 57 | return true; |
| 58 | } |
| 59 | |
| 60 | bool bindLibraryFunctions(QLibrary & lib, |
| 61 | FFmpegLibraryFunctions::AvFormatFunctions &functions, |
no test coverage detected