| 499 | } |
| 500 | |
| 501 | void HyperHdrInstance::setInputImage(int priority, const Image<ColorRgb>& image, int64_t timeout_ms, bool clearEffect) |
| 502 | { |
| 503 | if (!_muxer->hasPriority(priority)) |
| 504 | { |
| 505 | return; |
| 506 | } |
| 507 | |
| 508 | bool isImage = image.width() > 1 && image.height() > 1; |
| 509 | |
| 510 | if (_muxer->setInput(priority, timeout_ms)) |
| 511 | { |
| 512 | // clear effect if this call does not come from an effect |
| 513 | if (clearEffect) |
| 514 | { |
| 515 | _effectEngine->channelCleared(priority); |
| 516 | } |
| 517 | |
| 518 | // if this priority is visible, update immediately |
| 519 | if (priority == _muxer->getCurrentPriority()) |
| 520 | { |
| 521 | if (isImage) |
| 522 | { |
| 523 | std::vector<ColorRgb> colors; |
| 524 | |
| 525 | _imageProcessor->processFrame(colors, image); |
| 526 | |
| 527 | if (colors.size() > 0) |
| 528 | { |
| 529 | updateResult(colors); |
| 530 | emit SignalInstanceImageUpdated(image); |
| 531 | } |
| 532 | } |
| 533 | else |
| 534 | update(); |
| 535 | } |
| 536 | } |
| 537 | } |
| 538 | |
| 539 | bool HyperHdrInstance::setInputInactive(quint8 priority) |
| 540 | { |
no test coverage detected