MCPcopy Create free account
hub / github.com/awawa-dev/HyperHDR / setInputImage

Method setInputImage

sources/base/HyperHdrInstance.cpp:501–537  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

499}
500
501void 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
539bool HyperHdrInstance::setInputInactive(quint8 priority)
540{

Callers 2

handleUsbImageMethod · 0.80
handleSysImageMethod · 0.80

Calls 8

channelClearedMethod · 0.80
getCurrentPriorityMethod · 0.80
processFrameMethod · 0.80
hasPriorityMethod · 0.45
widthMethod · 0.45
heightMethod · 0.45
setInputMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected