recturn the input format in pixel units (we use a RectD in case the input format is the RoD)
| 324 | |
| 325 | // recturn the input format in pixel units (we use a RectD in case the input format is the RoD) |
| 326 | void |
| 327 | ReformatPlugin::getInputFormat(const double time, |
| 328 | double* par, |
| 329 | OfxRectD* rect) const |
| 330 | { |
| 331 | *par = _srcClip->getPixelAspectRatio(); |
| 332 | #ifdef OFX_EXTENSIONS_NATRON |
| 333 | if (gHostSupportsFormat && !_useRoD->getValueAtTime(time)) { |
| 334 | OfxRectI format; |
| 335 | _srcClip->getFormat(format); |
| 336 | if ( !Coords::rectIsEmpty(format) ) { |
| 337 | // host returned a non-empty format |
| 338 | rect->x1 = format.x1; |
| 339 | rect->y1 = format.y1; |
| 340 | rect->x2 = format.x2; |
| 341 | rect->y2 = format.y2; |
| 342 | return; |
| 343 | } |
| 344 | } |
| 345 | // host does not support format |
| 346 | #endif |
| 347 | OfxRectD srcRod = _srcClip->getRegionOfDefinition(time); |
| 348 | const OfxPointD rsOne = {1., 1.}; // format is with respect to unit renderscale |
| 349 | Coords::toPixelSub(srcRod, rsOne, *par, rect); |
| 350 | } |
| 351 | |
| 352 | void |
| 353 | ReformatPlugin::getOutputFormat(const double time, |
nothing calls this directly
no test coverage detected