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

Method handleUsbImage

sources/base/VideoControl.cpp:92–125  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

90}
91
92void VideoControl::handleUsbImage()
93{
94 Image<ColorRgb> image;
95 QString name;
96
97 if (!_usbCaptEnabled)
98 return;
99
100 incoming.mutex.lock();
101 {
102 name = incoming.name;
103 image = incoming.frame;
104 incoming.frame = Image<ColorRgb>();
105 }
106 incoming.mutex.unlock();
107
108 if (image.width() <= 1 || image.height() <=1)
109 return;
110
111 _stream = true;
112
113 if (_usbCaptName != name)
114 {
115 _usbCaptName = name;
116 _hyperhdr->registerInput(_usbCaptPrio, hyperhdr::COMP_VIDEOGRABBER, "System", _usbCaptName);
117 }
118
119 _alive = true;
120
121 if (!_usbInactiveTimer->isActive() && _usbInactiveTimer->remainingTime() < 0)
122 _usbInactiveTimer->start();
123
124 _hyperhdr->setInputImage(_usbCaptPrio, image);
125}
126
127void VideoControl::setUsbCaptureEnable(bool enable)
128{

Callers

nothing calls this directly

Calls 6

setInputImageMethod · 0.80
widthMethod · 0.45
heightMethod · 0.45
registerInputMethod · 0.45
isActiveMethod · 0.45
startMethod · 0.45

Tested by

no test coverage detected