Deprecation warning

Please note that this is outdated documentation for an older release of the Scandit Barcode Scanner SDK.

We are deprecating the 5.x API on all platforms (except Linux). Release 5.19 in April 2021 will be our final. Applications running 5.x will continue to work, and we will continue to release critical bug fixes and security patches only, for one year. We encourage you to migrate to 6.x and take advantage of our latest / advanced features and improved performance.

You'll find the updated documentation at: Data Capture SDK Documentation for Android

ScBarcodeScanner Struct Reference

Public Member Functions

ScBarcodeScannersc_barcode_scanner_new_with_settings (ScRecognitionContext *context, const ScBarcodeScannerSettings *settings)
 
void sc_barcode_scanner_retain (ScBarcodeScanner *scanner)
 
void sc_barcode_scanner_release (ScBarcodeScanner *scanner)
 
ScBarcodeScannerSessionsc_barcode_scanner_get_session (ScBarcodeScanner *scanner)
 
void sc_barcode_scanner_apply_settings (ScBarcodeScanner *scanner, const ScBarcodeScannerSettings *settings)
 
ScBool sc_barcode_scanner_is_setup_complete (const ScBarcodeScanner *scanner)
 
ScBool sc_barcode_scanner_wait_for_setup_completed (ScBarcodeScanner *scanner)
 

Detailed Description

Scans barcodes in images.

The barcode scanner is the main interface for decoding barcodes in images. After constructing a barcode scanner, barcodes are decoded when a frame is processed with sc_recognition_context_process_frame().

Barcode scanner results (decoded and localized barcodes) are available in the "scan session" that can be retrieved by calling sc_barcode_scanner_get_session().

Since
4.6.0
Examples:
ScanditNativeBarcodeScannerCameraDemo.c, and ScanditNativeBarcodeScannerDemo.c.

Member Function Documentation

ScBarcodeScanner * sc_barcode_scanner_new_with_settings ( ScRecognitionContext context,
const ScBarcodeScannerSettings settings 
)

Create a new barcode scanner instance with the given settings.

Parameters
contextThe recognition context. Must not be null.
settingsThe barcode scanner settings. Must not be null.
Returns
a new barcode scanner instance. After use, the instance must be freed with sc_barcode_scanner_release(). NULL is returned, if there is already another barcode scanner associated with this context.
Since
4.6.0
Examples:
ScanditNativeBarcodeScannerCameraDemo.c, and ScanditNativeBarcodeScannerDemo.c.
void sc_barcode_scanner_retain ( ScBarcodeScanner scanner)

Increase reference count of barcode scanner object by one.

Parameters
scannerThe barcode scanner object. Must not be null.
Since
4.6.0
void sc_barcode_scanner_release ( ScBarcodeScanner scanner)

Decrease reference count of barcode scanner by one.

When the reference count drops to zero, the barcode scanner is deallocated.

Parameters
scannerThe barcode scanner to release. May be null.
Since
4.6.0
Examples:
ScanditNativeBarcodeScannerCameraDemo.c, and ScanditNativeBarcodeScannerDemo.c.
ScBarcodeScannerSession * sc_barcode_scanner_get_session ( ScBarcodeScanner scanner)

Get the current scanning session.

The scanning session contains the current state of the barcode decoding process, such as the codes that were decoded in the last frame.

Parameters
scannerThe barcode scanner object. Must not be null
Returns
The session object. The session object is owned by the barcode scanner and is freed automatically when the barcode scanner is released. The returned session object is guaranteed to be non-null.
Since
4.6.0
Examples:
ScanditNativeBarcodeScannerCameraDemo.c, and ScanditNativeBarcodeScannerDemo.c.
void sc_barcode_scanner_apply_settings ( ScBarcodeScanner scanner,
const ScBarcodeScannerSettings settings 
)

Apply new settings.

Parameters
scannerThe barcode scanner object. Must not be null.
settingsThe barcode scanner settings object. Must not be null.
Since
4.6.0
ScBool sc_barcode_scanner_is_setup_complete ( const ScBarcodeScanner scanner)

Checks whether the barcode scanner has completed initialization.

Parameters
scannerThe barcode scanner object. Must not be null.
Returns
True if setup has completed, false otherwise.
Since
4.6.0
ScBool sc_barcode_scanner_wait_for_setup_completed ( ScBarcodeScanner scanner)

Block execution until the barcode scanner has completed setup.

Parameters
scannerThe barcode scanner object. Must not be null.
Returns
True on success, false otherwise.
Since
4.6.0
Examples:
ScanditNativeBarcodeScannerDemo.c.

The documentation for this struct was generated from the following file: