Barcode Xpress Mobile for iOS
|
00001 /************************************************************** 00002 * Copyright 2011 - Accusoft Corporation, Tampa Florida. * 00003 * This sample code is provided to Accusoft licensees "as is" * 00004 * with no restrictions on use or modification. No warranty * 00005 * for use of this sample code is provided by Accusoft. * 00006 **************************************************************/ 00007 00016 #import <CoreMedia/CoreMedia.h> 00017 #import <AVFoundation/AVFoundation.h> 00018 #import "BarcodeXpressIOS.h" 00019 #import "BXiOSAPI.h" 00020 00026 @interface BXRuntime : NSObject <AVCaptureVideoDataOutputSampleBufferDelegate, UIAlertViewDelegate> { 00027 00028 @public 00033 long m_numProcessedFrames; 00034 00035 @private 00037 AVCaptureSession *m_videoCaptureSession; 00038 00043 long m_barcodeTypes; 00044 00046 NSMutableArray *m_threadQueues; 00047 00052 id __unsafe_unretained m_cameraReceiver; 00053 00059 id __unsafe_unretained m_recognitionReceiver; 00060 00065 id __unsafe_unretained m_processingReceiver; 00066 00071 SEL m_cameraCallback; 00072 00078 SEL m_recognitionCallback; 00079 00084 SEL m_processingCallback; 00085 00091 BOOL m_isPaused; 00092 00097 BOOL m_licenseAlertIsActive; 00098 00104 BOOL m_useBlurDetection; 00105 00109 BXiOSAPI *m_bxInterface; 00110 00115 CGSize cameraResolution; 00116 00124 BOOL m_terminateBackgroundImageSource; 00125 } 00126 00128 @property (nonatomic, strong) AVCaptureSession *m_videoCaptureSession; 00129 00134 @property (nonatomic, assign) long m_barcodeTypes; 00135 00140 @property /* atomic*/(assign) long m_numProcessedFrames; 00141 00146 @property (nonatomic, unsafe_unretained) id m_cameraReceiver; 00147 00153 @property (nonatomic, unsafe_unretained) id m_recognitionReceiver; 00154 00159 @property (nonatomic, unsafe_unretained) id m_processingReceiver; 00160 00165 @property (nonatomic, assign) SEL m_cameraCallback; 00166 00172 @property (nonatomic, assign) SEL m_recognitionCallback; 00173 00178 @property (nonatomic, assign) SEL m_processingCallback; 00179 00185 @property (nonatomic, assign) BOOL m_isPaused; 00186 00191 @property (nonatomic, assign) BOOL m_licenseAlertIsActive; 00192 00198 @property (nonatomic, assign) BOOL m_useBlurDetection; 00199 00203 @property (nonatomic, assign) BXiOSAPI* m_bxInterface; 00204 00209 @property (nonatomic, assign) CGSize cameraResolution; 00210 00218 @property (nonatomic, assign) BOOL m_terminateBackgroundImageSource; 00219 00225 -(id)init; 00226 00236 -(id)initWithLicense :(BXLicense*)inLicense; 00237 00242 -(void)StartCaptureSession; 00243 00248 -(void)StopCaptureSession; 00249 00255 -(void)StartRecognition; 00256 00262 -(void)StopRecognition; 00263 00269 -(void)PauseRecognition; 00270 00275 -(void)ResumeRecognition; 00276 00289 -(void)SetCameraCallback :(id)receiver :(SEL)callback; 00290 00306 -(void)SetRecognitionCallback :(id)receiver :(SEL)callback; 00307 00320 -(void)SetProcessingCallback :(id)receiver :(SEL)callback; 00321 00338 -(enum Status)RecognizeImage :(UIImage*)image result:(BXResult **)result; 00339 00358 -(enum Status)RecognizeImage :(void*)image width:(size_t)width height:(size_t)height stride:(size_t)stride result:(BXResult **)result; 00359 00365 -(const char *)ReportVersion; 00366 00374 -(long)SetBarcodeTypes :(long)types; 00375 00382 -(AVCaptureSession*) GetCaptureSession; 00383 00384 @end 00385