You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. /*
  2. * Copyright 2012 ZXing authors
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. #import <AVFoundation/AVFoundation.h>
  17. @protocol ZXCaptureDelegate, ZXReader;
  18. @class ZXDecodeHints;
  19. @interface ZXCapture : NSObject <AVCaptureVideoDataOutputSampleBufferDelegate, CAAction
  20. #if defined(__MAC_10_12) && __MAC_OS_X_VERSION_MAX_ALLOWED >= __MAC_10_12 || defined(__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0
  21. , CALayerDelegate
  22. #endif
  23. >
  24. @property (nonatomic, assign) int camera;
  25. @property (nonatomic, strong) AVCaptureDevice *captureDevice;
  26. @property (nonatomic, copy) NSString *captureToFilename;
  27. @property (nonatomic, weak) id<ZXCaptureDelegate> delegate;
  28. @property (nonatomic, assign) AVCaptureFocusMode focusMode;
  29. @property (nonatomic, strong) ZXDecodeHints *hints;
  30. @property (nonatomic, assign) CGImageRef lastScannedImage;
  31. @property (nonatomic, assign) BOOL invert;
  32. @property (nonatomic, strong, readonly) CALayer *layer;
  33. @property (nonatomic, assign) BOOL mirror;
  34. @property (nonatomic, strong, readonly) AVCaptureVideoDataOutput *output;
  35. @property (nonatomic, strong) id<ZXReader> reader;
  36. @property (nonatomic, assign) CGFloat rotation;
  37. @property (nonatomic, assign, readonly) BOOL running;
  38. @property (nonatomic, assign) CGRect scanRect;
  39. @property (nonatomic, copy) NSString *sessionPreset;
  40. @property (nonatomic, assign) BOOL torch;
  41. @property (nonatomic, assign) CGAffineTransform transform;
  42. - (int)back;
  43. - (int)front;
  44. - (BOOL)hasBack;
  45. - (BOOL)hasFront;
  46. - (BOOL)hasTorch;
  47. - (CALayer *)binary;
  48. - (void)setBinary:(BOOL)on_off;
  49. - (CALayer *)luminance;
  50. - (void)setLuminance:(BOOL)on_off;
  51. - (void)hard_stop;
  52. - (void)order_skip;
  53. - (void)start;
  54. - (void)stop;
  55. @end