| 90 | } |
| 91 | |
| 92 | void 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 | |
| 127 | void VideoControl::setUsbCaptureEnable(bool enable) |
| 128 | { |
nothing calls this directly
no test coverage detected