PrisonScanner 5.109.0
Properties | Signals | Public Member Functions | List of all members
Prison::VideoScanner

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.
 

Detailed Description

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.

Since
5.94

Member Function Documentation

◆ formats()

Format::BarcodeFormats Prison::VideoScanner::formats ( ) const

The barcode formats the scanner should look for.

By default all supported formats are enabled.

◆ result()

ScanResult Prison::VideoScanner::result ( ) const

The latest result of the barcode scan.

◆ resultChanged

void Prison::VideoScanner::resultChanged ( const Prison::ScanResult scanResult)
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.

See also
resultContentChanged

◆ resultContentChanged

void Prison::VideoScanner::resultContentChanged ( const Prison::ScanResult scanResult)
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.

See also
resultChanged

◆ setFormats()

void Prison::VideoScanner::setFormats ( Format::BarcodeFormats  formats)

Sets the barcode formats to detect.

Parameters
formatscan be OR'ed values from Format::BarcodeFormats.

◆ setVideoSink()

void Prison::VideoScanner::setVideoSink ( QVideoSink *  sink)

Sets the video sink to scan for barcodes.

◆ videoSink()

QVideoSink * Prison::VideoScanner::videoSink ( ) const

The video sink being scanned for barcodes.