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

ScBarcodeScannerSession Struct Reference

Public Member Functions

ScBarcodeArraysc_barcode_scanner_session_get_newly_recognized_codes (const ScBarcodeScannerSession *session)
 
void sc_barcode_scanner_session_retain (ScBarcodeScannerSession *session)
 
void sc_barcode_scanner_session_release (ScBarcodeScannerSession *session)
 
ScBarcodeArraysc_barcode_scanner_session_get_all_recognized_codes (const ScBarcodeScannerSession *session)
 
void sc_barcode_scanner_session_clear (ScBarcodeScannerSession *session)
 
ScBarcodeArraysc_barcode_scanner_session_get_newly_localized_codes (const ScBarcodeScannerSession *session)
 
uint32_t sc_barcode_scanner_session_get_last_processed_frame_id (const ScBarcodeScannerSession *session)
 

Detailed Description

An opaque barcode scanner session object.

The barcode scanner session keeps track of decoded and localized barcodes and handles duplicate removal.

Obtaining the barcode scanner session

The barcode scanner session can be obtained at any time from a barcode scanner object by calling sc_barcode_scanner_get_session(). The session contains the decoded as well as localized barcodes after the last call to sc_recognition_context_process_frame().

Configuring Session Behaviour

The scan session is responsible for determining the list of relevant barcodes by filtering out duplicates. Depending on your app, different duplicate removal is required. For some applications, only one barcode is required. The scanning process is stopped as soon as one code is decoded. For other applications, multiple codes are scanned after another. For example, a scanner at the cash desk may need to scan multiple products. To avoid duplicates, the same barcode should not be scanned in short succession. The same barcode (data, symbology) should not count as a duplicate if encountered again after a few seconds.

By default, if a barcode has the same symbology and data as code that was decoded less than 500ms ago, it is filtered out as a duplicate. The exact filtering behaviour can be changed by setting the "code duplicate filter", and "code caching duration" in ScBarcodeScannerSettings.

Since
4.6.0
Examples:
CommandLineBarcodeScannerCameraSample.c, and CommandLineBarcodeScannerImageProcessingSample.c.

Member Function Documentation

ScBarcodeArray * sc_barcode_scanner_session_get_newly_recognized_codes ( const ScBarcodeScannerSession session)

Get list of recognized codes in the last processed frame.

Parameters
sessionThe barcode scanner session object. Must not be null.
Returns
array of recognized barcodes. After use, the list must be released using sc_barcode_array_release().
Since
4.6.0
Examples:
CommandLineBarcodeScannerCameraSample.c, and CommandLineBarcodeScannerImageProcessingSample.c.
void sc_barcode_scanner_session_retain ( ScBarcodeScannerSession session)

Increase reference count of barcode scanner session by one.

Parameters
sessionThe barcode scanner session object. Must not be null.
Since
4.6.0
void sc_barcode_scanner_session_release ( ScBarcodeScannerSession session)

Decrease reference count of barcode scanner session by one.

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

Parameters
sessionThe barcode scanner session object. May be null
Since
4.6.0
ScBarcodeArray * sc_barcode_scanner_session_get_all_recognized_codes ( const ScBarcodeScannerSession session)

Get list of all recognized codes in the session.

This function returns a list of all recognized codes currently contained in the session. To only get codes recognized in the last frame, use sc_barcode_scanner_session_get_newly_recognized_codes()

Parameters
sessionThe barcode scanner session object. Must not be null.
Returns
array of recognized barcodes. After use, the list must be released using sc_barcode_array_release().
Since
4.6.0
void sc_barcode_scanner_session_clear ( ScBarcodeScannerSession session)

Clear the barcode scanner session.

This removes all recognized barcodes from the scanner session.

Parameters
sessionThe barcode scanner session object. Must not be null.
Since
4.6.0
ScBarcodeArray * sc_barcode_scanner_session_get_newly_localized_codes ( const ScBarcodeScannerSession session)

Get list of codes that were localized, but not recognized in the last processed frame.

Parameters
sessionThe barcode scanner session object. Must not be null.
Returns
array of localized barcodes. After use, the list must be released using sc_barcode_array_release().
Since
4.6.0
uint32_t sc_barcode_scanner_session_get_last_processed_frame_id ( const ScBarcodeScannerSession session)

Get unique ID of the last processed frame.

Parameters
sessionThe barcode scanner session object. Must not be null.
Returns
the frame id
Since
4.6.0

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