| 552 | } |
| 553 | |
| 554 | bool |
| 555 | WriteNodePrivate::checkEncoderCreated(double time, |
| 556 | ViewIdx view) |
| 557 | { |
| 558 | boost::shared_ptr<KnobOutputFile> fileKnob = outputFileKnob.lock(); |
| 559 | |
| 560 | assert(fileKnob); |
| 561 | std::string pattern = fileKnob->generateFileNameAtTime( std::floor(time + 0.5), ViewSpec( view.value() ) ).toStdString(); |
| 562 | if ( pattern.empty() ) { |
| 563 | _publicInterface->setPersistentMessage( eMessageTypeError, tr("Filename is empty.").toStdString() ); |
| 564 | |
| 565 | return false; |
| 566 | } |
| 567 | if ( !embeddedPlugin.lock() ) { |
| 568 | QString s = tr("Encoder was not created for %1. Check that the file exists and its format is supported.") |
| 569 | .arg( QString::fromUtf8( pattern.c_str() ) ); |
| 570 | _publicInterface->setPersistentMessage( eMessageTypeError, s.toStdString() ); |
| 571 | |
| 572 | return false; |
| 573 | } |
| 574 | |
| 575 | return true; |
| 576 | } |
| 577 | |
| 578 | static std::string |
| 579 | getFileNameFromSerialization(const std::list<boost::shared_ptr<KnobSerialization> >& serializations) |
nothing calls this directly
no test coverage detected