Thanks for downloading Dynamsoft Barcode Reader Package!
Your download will start shortly. If your download does not begin, click here to retry.
Decode
Method | Description |
---|---|
startFrameDecoding |
Starts a new thread to decode barcodes from the inner frame queue. |
startFrameDecodingEx |
Starts a new thread to decode barcodes from the inner frame queue. |
appendFrame |
Appends a frame image buffer to the inner frame queue. |
stopFrameDecoding |
Stops the frame decoding thread created by StartFrameDecoding. |
Parameter
Method | Description |
---|---|
getFrameDecodingParameters |
Initialize frame decoding parameter. |
Delegate
Method | Description |
---|---|
setDBRErrorDelegate |
Set callback function to process errors generated during frame decoding. |
setDBRTextResultDelegate |
Set callback function to process text results generated during frame decoding. |
setDBRIntermediateResultDelegate |
Set callback function to process intermediate results generated during frame decoding. |
Status retrieval
Method | Description |
---|---|
getLengthOfFrameQueue |
Get length of current inner frame queue. |
Starts a new thread to decode barcodes from the inner frame queue.
-(void)startFrameDecoding:(NSInteger)maxQueueLength
maxResultQueueLength:(NSInteger)maxResultQueueLength
width:(NSInteger)width
height:(NSInteger)height
stride:(NSInteger)stride
format:(EnumImagePixelFormat)format
templateName:(NSString* _Nonnull)templateName
error:(NSError* _Nullable * _Nullable)error;
[in] maxQueueLength
The max number of frames waiting for decoding.
[in] maxResultQueueLength
The max number of frames whose results (text result/localization result) will be kept.
[in] width
The width of the frame image in pixels.
[in] height
The height of the frame image in pixels.
[in] stride
The stride (or scan width) of the frame image.
[in] format
The image pixel format used in the image byte array.
[in] templateName
The template name.
[in,out] error
Input a pointer to an error object. If an error occurs, this pointer is set to an actual error object containing the error information. You may specify nil for this parameter if you do not want the error information.
Objective-C:
DynamsoftBarcodeReader *barcodeReader;
barcodeReader = [[DynamsoftBarcodeReader alloc] initWithLicense:@"t0260NwAAAHV***************"];
NSError __autoreleasing * _Nullable error;
[barcodeReader startFrameDecoding:2 maxResultQueueLength:10 width:1024 height:720 stride:720 format:EnumImagePixelFormatBinary templateName:@"" error:&error];
Swift:
let barcodeReader = DynamsoftBarcodeReader.init(license: "t0260NwAAAHV***************")
let error: NSError? = NSError()
barcodeReader.startFrameDecoding(maxQueueLength:2, maxResultQueueLength:10, width:1024, height:720, stride:720, format:EnumImagePixelFormat.Binary, templateName:"", error:&error)
Start a new thread to decode barcodes from the inner frame queue with specific frame decoding setting defined in iFrameDecodingParameters
struct.
-(void)startFrameDecodingEx:(iFrameDecodingParameters* _Nullable) parameters
templateName:(NSString* _Nonnull)templateName
error:(NSError* _Nullable __autoreleasing* _Nullable)error;
[in] parameters
The frame decoding parameters.
[in] templateName
The template name.
[in,out] error
Input a pointer to an error object. If an error occurs, this pointer is set to an actual error object containing the error information. You may specify nil for this parameter if you do not want the error information.
Objective-C:
DynamsoftBarcodeReader *barcodeReader;
barcodeReader = [[DynamsoftBarcodeReader alloc] initWithLicense:@"t0260NwAAAHV***************"];
NSError __autoreleasing * _Nullable error;
iFrameDecodingParameters *parameters = [barcodeReader getFrameDecodingParameters:nil];
parameters.maxQueueLength = 2;
parameters.maxResultQueueLength = 10;
parameters.width = 1024;
parameters.height = 720;
parameters.stride = 720;
parameters.imagePixelFormat = EnumImagePixelFormatBinary;
[barcodeReader startFrameDecodingEx:parameters templateName:@"" error:&error];
Swift:
let barcodeReader = DynamsoftBarcodeReader.init(license: "t0260NwAAAHV***************")
let error: NSError? = NSError()
let parameters = barcodeReader.getFrameDecodingParameters
parameters?.maxQueueLength = 2
parameters?.maxResultQueueLength = 10
parameters?.width = 1024
parameters?.height = 720
parameters?.stride = 720
parameters?.imagePixelFormat = EnumImagePixelFormat.Binary
barcodeReader.StartFrameDecodingEx(parameter: parameters!, templateName: "", error: &error)
Appends a frame image buffer to the inner frame queue.
-(NSInteger)appendFrame:(NSData* _Nullable) bufferBytes;
[in] bufferBytes
The array of bytes which contain the image data.
Returns the ID of the appended frame.
Objective-C:
DynamsoftBarcodeReader *barcodeReader;
barcodeReader = [[DynamsoftBarcodeReader alloc] initWithLicense:@"t0260NwAAAHV***************"];
NSError __autoreleasing * _Nullable error;
[barcodeReader startFrameDecoding:2 maxResultQueueLength:10 width:1024 height:720 stride:720 format:EnumImagePixelFormatBinary templateName:@"" error:&error];
NSInteger frameId = [barcodeReader appendFrame:bufferBytes];
Swift:
let barcodeReader = DynamsoftBarcodeReader.init(license: "t0260NwAAAHV***************")
let error: NSError? = NSError()
barcodeReader.startFrameDecoding(maxQueueLength:2, maxResultQueueLength:10, width:1024, height:720, stride:720, format:EnumImagePixelFormat.Binary, templateName:"", error:&error)
let frameId = barcodeReader.appendFrame(bufferBytes:bufferBytes)
Stops the frame decoding thread created by startFrameDecoding
or startFrameDecodingEx
.
-(void)stopFrameDecoding:(NSError* _Nullable * _Nullable)error;
[in,out] error
Input a pointer to an error object. If an error occurs, this pointer is set to an actual error object containing the error information. You may specify nil for this parameter if you do not want the error information.
Objective-C:
DynamsoftBarcodeReader *barcodeReader;
barcodeReader = [[DynamsoftBarcodeReader alloc] initWithLicense:@"t0260NwAAAHV***************"];
NSError __autoreleasing * _Nullable error;
[barcodeReader startFrameDecoding:2 maxResultQueueLength:10 width:1024 height:720 stride:720 format:EnumImagePixelFormatBinary templateName:@"" error:&error];
[barcodeReader stopFrameDecoding:&error];
Swift:
let barcodeReader = DynamsoftBarcodeReader.init(license: "t0260NwAAAHV***************")
let error: NSError? = NSError()
barcodeReader.startFrameDecoding(maxQueueLength:2, maxResultQueueLength:10, width:1024, height:720, stride:720, format:EnumImagePixelFormat.Binary, templateName:"", error:nil)
barcodeReader.stopFrameDecoding(error:&error)
Initialize frame decoding parameters with default values.
-(iFrameDecodingParameters*_Nullable)getFrameDecodingParameters:(NSError* _Nullable * _Nullable)error;
[in,out] error
Input a pointer to an error object. If an error occurs, this pointer is set to an actual error object containing the error information. You may specify nil for this parameter if you do not want the error information.
Returns frame decoding parameters.
Objective-C:
DynamsoftBarcodeReader *barcodeReader;
barcodeReader = [[DynamsoftBarcodeReader alloc] initWithLicense:@"t0260NwAAAHV***************"];
iFrameDecodingParameters *parameters = [barcodeReader getFrameDecodingParameters:nil];
Swift:
let barcodeReader = DynamsoftBarcodeReader.init(license: "t0260NwAAAHV***************")
let parameters = barcodeReader.getFrameDecodingParameters(error: nil)
Sets callback function to process errors generated during frame decoding.
-(void)setDBRErrorDelegate:(id _Nullable)errorDelegate userData:(NSObject* _Nullable)userData;
[in] errorDelegate
Callback function.
[in] userData
Customized arguments passed to your function.
Objective-C:
DynamsoftBarcodeReader *barcodeReader;
barcodeReader = [[DynamsoftBarcodeReader alloc] initWithLicense:@"t0260NwAAAHV***************"];
[barcodeReader setDBRErrorDelegate:self userData:nil];
Swift:
let barcodeReader = DynamsoftBarcodeReader.init(license: "t0260NwAAAHV***************")
barcodeReader.setDBRErrorDelegate(errorDelegate:self, userData:nil)
Set callback function to process text results generated during frame decoding.
-(void)setDBRTextResultDelegate:(id _Nullable)textResultDelegate userData:(NSObject* _Nullable)userData;
[in] textResultDelegate
Callback function.
[in] userData
Customized arguments passed to your function.
Objective-C:
DynamsoftBarcodeReader *barcodeReader;
barcodeReader = [[DynamsoftBarcodeReader alloc] initWithLicense:@"t0260NwAAAHV***************"];
[barcodeReader setDBRTextResultDelegate:self userData:nil];
Swift:
let barcodeReader = DynamsoftBarcodeReader.init(license: "t0260NwAAAHV***************")
barcodeReader.setDBRTextResultDelegate(textResultDelegate:self, userData:nil)
Set callback function to process intermediate results generated during frame decoding.
-(void)setDBRIntermediateResultDelegate:(id _Nullable)intermediateResultDelegate userData:(NSObject* _Nullable)userData;
[in] intermediateResultDelegate
Callback function.
[in] userData
Customized arguments passed to your function.
Objective-C:
DynamsoftBarcodeReader *barcodeReader;
barcodeReader = [[DynamsoftBarcodeReader alloc] initWithLicense:@"t0260NwAAAHV***************"];
[barcodeReader setDBRIntermediateResultDelegate:self userData:nil];
Swift:
let barcodeReader = DynamsoftBarcodeReader.init(license: "t0260NwAAAHV***************")
barcodeReader.setDBRIntermediateResultDelegate(intermediateResultDelegate:self, userData:nil)
Get length of current inner frame queue.
-(NSInteger)getLengthOfFrameQueue;
Returns the length of the inner frame queue.
Objective-C:
DynamsoftBarcodeReader *barcodeReader;
barcodeReader = [[DynamsoftBarcodeReader alloc] initWithLicense:@"t0260NwAAAHV***************"];
NSInteger length = [barcodeReader getLengthOfFrameQueue];
Swift:
let barcodeReader = DynamsoftBarcodeReader.init(license: "t0260NwAAAHV***************")
let length = barcodeReader.getLengthOfFrameQueue()
latest version