| 534 | } |
| 535 | |
| 536 | bool decoderDav1d::checkLibraryFile(QString libFilePath, QString &error) |
| 537 | { |
| 538 | decoderDav1d testDecoder; |
| 539 | |
| 540 | // Try to load the library file |
| 541 | testDecoder.library.setFileName(libFilePath); |
| 542 | if (!testDecoder.library.load()) |
| 543 | { |
| 544 | error = "Error opening QLibrary."; |
| 545 | return false; |
| 546 | } |
| 547 | |
| 548 | // Now let's see if we can retrive all the function pointers that we will need. |
| 549 | // If this works, we can be fairly certain that this is a valid libdav1d library. |
| 550 | testDecoder.resolveLibraryFunctionPointers(); |
| 551 | |
| 552 | error = testDecoder.decoderErrorString(); |
| 553 | return testDecoder.state() != DecoderState::Error; |
| 554 | } |
| 555 | |
| 556 | QString decoderDav1d::getDecoderName() const |
| 557 | { |
nothing calls this directly
no test coverage detected