PrisonScanner 5.109.0
|
Scans a live video feed for barcodes. More...
#include <videoscanner.h>
Properties | |
Prison::Format::BarcodeFormats | formats |
Prison::ScanResult | result |
QVideoSink * | videoSink |
Signals | |
void | formatsChanged () |
void | resultChanged (const Prison::ScanResult &scanResult) |
Emitted whenever we get a new scan result, as long as any property of the result changes. | |
void | resultContentChanged (const Prison::ScanResult &scanResult) |
Emitted when a barcode with a new content has been detected, but not when merely the position of a barcode changes in the video stream. | |
void | videoSinkChanged () |
Public Member Functions | |
VideoScanner (QObject *parent=nullptr) | |
Format::BarcodeFormats | formats () const |
The barcode formats the scanner should look for. | |
ScanResult | result () const |
The latest result of the barcode scan. | |
void | setFormats (Format::BarcodeFormats formats) |
Sets the barcode formats to detect. | |
void | setVideoSink (QVideoSink *sink) |
Sets the video sink to scan for barcodes. | |
QVideoSink * | videoSink () const |
The video sink being scanned for barcodes. | |
Scans a live video feed for barcodes.
In Qt5 this can be added as a video filter to a VideoOutput element. In Qt6 this can be connected to a QVideoSink object.
Format::BarcodeFormats Prison::VideoScanner::formats | ( | ) | const |
The barcode formats the scanner should look for.
By default all supported formats are enabled.
ScanResult Prison::VideoScanner::result | ( | ) | const |
The latest result of the barcode scan.
|
signal |
Emitted whenever we get a new scan result, as long as any property of the result changes.
On a live video feed this can be very frequently due to the changes of the position of the detected barcode. This is therefore useful e.g. for marking the position of the detected barcode.
|
signal |
Emitted when a barcode with a new content has been detected, but not when merely the position of a barcode changes in the video stream.
This is useful e.g. for continuously scanning multiple codes in one go.
void Prison::VideoScanner::setFormats | ( | Format::BarcodeFormats | formats | ) |
Sets the barcode formats to detect.
formats | can be OR'ed values from Format::BarcodeFormats. |
void Prison::VideoScanner::setVideoSink | ( | QVideoSink * | sink | ) |
Sets the video sink to scan for barcodes.
QVideoSink * Prison::VideoScanner::videoSink | ( | ) | const |
The video sink being scanned for barcodes.