2014 snapchat source code
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.

31 lines
830 B

  1. //
  2. // SCCaptureDeviceAuthorizationChecker.h
  3. // Snapchat
  4. //
  5. // Created by Sun Lei on 15/03/2018.
  6. //
  7. @class SCQueuePerformer;
  8. #import <SCBase/SCMacros.h>
  9. #import <Foundation/Foundation.h>
  10. /*
  11. In general, the function of SCCaptureDeviceAuthorizationChecker is to speed up the checking of AVMediaTypeVideo
  12. authorization. It would cache the authorization value. 'preloadVideoCaptureAuthorization' would be called very early
  13. after the app is launched to populate the cached value. 'authorizedForVideoCapture' could be called to get the value
  14. synchronously.
  15. */
  16. @interface SCCaptureDeviceAuthorizationChecker : NSObject
  17. SC_INIT_AND_NEW_UNAVAILABLE
  18. - (instancetype)initWithPerformer:(SCQueuePerformer *)performer NS_DESIGNATED_INITIALIZER;
  19. - (BOOL)authorizedForVideoCapture;
  20. - (void)preloadVideoCaptureAuthorization;
  21. @end