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