MGVideoDelegate.h 736 B

12345678910111213141516171819202122232425262728293031
  1. //
  2. // MGVideoDelegate.h
  3. // MGBaseKit
  4. //
  5. // Created by Megvii on 2017/4/18.
  6. // Copyright © 2017Year megvii. All rights reserved.
  7. //
  8. #ifndef MGVideoDelegate_h
  9. #define MGVideoDelegate_h
  10. #import <AVFoundation/AVFoundation.h>
  11. typedef enum : NSUInteger {
  12. MGVideoErrorNOPermission = 100,
  13. MGVideoErrorNOSessionPreset,
  14. MGVideoErrorNODevice,
  15. } MGVideoErrorType;
  16. @protocol MGVideoDelegate <NSObject>
  17. @required
  18. - (void)MGCaptureOutput:(AVCaptureOutput *)captureOutput
  19. didOutputSampleBuffer:(CMSampleBufferRef)sampleBuffer
  20. fromConnection:(AVCaptureConnection *)connection;
  21. @optional
  22. - (void)MGCaptureOutput:(AVCaptureOutput *)captureOutput error:(MGVideoErrorType)error;
  23. @end
  24. #endif /* MGVideoDelegate_h */