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.

57 lines
2.6 KiB

  1. //
  2. // SCManagedFrameHealthChecker.h
  3. // Snapchat
  4. //
  5. // Created by Pinlin Chen on 30/08/2017.
  6. //
  7. #import <SCBase/SCMacros.h>
  8. #import <SCFeatureGating/SCExperimentManager.h>
  9. #import <AVFoundation/AVFoundation.h>
  10. #import <Foundation/Foundation.h>
  11. @interface SCManagedFrameHealthChecker : NSObject
  12. + (SCManagedFrameHealthChecker *)sharedInstance;
  13. /*! @abstract Use sharedInstance instead. */
  14. SC_INIT_AND_NEW_UNAVAILABLE;
  15. /* Utility method */
  16. - (NSMutableDictionary *)metadataForSampleBuffer:(CMSampleBufferRef)sampleBuffer extraInfo:(NSDictionary *)extraInfo;
  17. - (NSMutableDictionary *)metadataForSampleBuffer:(CMSampleBufferRef)sampleBuffer
  18. photoCapturerEnabled:(BOOL)photoCapturerEnabled
  19. lensEnabled:(BOOL)lensesEnabled
  20. lensID:(NSString *)lensID;
  21. - (NSMutableDictionary *)metadataForMetadata:(NSDictionary *)metadata
  22. photoCapturerEnabled:(BOOL)photoCapturerEnabled
  23. lensEnabled:(BOOL)lensesEnabled
  24. lensID:(NSString *)lensID;
  25. - (NSMutableDictionary *)getPropertiesFromAsset:(AVAsset *)asset;
  26. /* Image snap */
  27. - (void)checkImageHealthForCaptureFrameImage:(UIImage *)image
  28. captureSettings:(NSDictionary *)captureSettings
  29. captureSessionID:(NSString *)captureSessionID;
  30. - (void)checkImageHealthForPreTranscoding:(UIImage *)image
  31. metadata:(NSDictionary *)metadata
  32. captureSessionID:(NSString *)captureSessionID;
  33. - (void)checkImageHealthForPostTranscoding:(NSData *)imageData
  34. metadata:(NSDictionary *)metadata
  35. captureSessionID:(NSString *)captureSessionID;
  36. /* Video snap */
  37. - (void)checkVideoHealthForCaptureFrameImage:(UIImage *)image
  38. metedata:(NSDictionary *)metadata
  39. captureSessionID:(NSString *)captureSessionID;
  40. - (void)checkVideoHealthForOverlayImage:(UIImage *)image
  41. metedata:(NSDictionary *)metadata
  42. captureSessionID:(NSString *)captureSessionID;
  43. - (void)checkVideoHealthForPostTranscodingThumbnail:(UIImage *)image
  44. metedata:(NSDictionary *)metadata
  45. properties:(NSDictionary *)properties
  46. captureSessionID:(NSString *)captureSessionID;
  47. - (void)reportFrameHealthCheckForCaptureSessionID:(NSString *)captureSessionID;
  48. @end