| 600 | } |
| 601 | |
| 602 | bool |
| 603 | ReadNodePrivate::checkDecoderCreated(double time, |
| 604 | ViewIdx view) |
| 605 | { |
| 606 | KnobFilePtr fileKnob = inputFileKnob.lock(); |
| 607 | |
| 608 | assert(fileKnob); |
| 609 | std::string pattern = fileKnob->getFileName(std::floor(time + 0.5), view); |
| 610 | if ( pattern.empty() ) { |
| 611 | _publicInterface->setPersistentMessage( eMessageTypeError, tr("Filename empty").toStdString() ); |
| 612 | |
| 613 | return false; |
| 614 | } |
| 615 | |
| 616 | if (!_publicInterface->getEmbeddedReader()) { |
| 617 | QString s = tr("Decoder was not created for %1, check that the file exists and its format is supported.").arg( QString::fromUtf8( pattern.c_str() ) ); |
| 618 | _publicInterface->setPersistentMessage( eMessageTypeError, s.toStdString() ); |
| 619 | |
| 620 | return false; |
| 621 | } |
| 622 | |
| 623 | return true; |
| 624 | } |
| 625 | |
| 626 | static std::string |
| 627 | getFileNameFromSerialization(const std::list<KnobSerializationPtr>& serializations) |
no test coverage detected