OralCavityManager.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. //
  2. // OralCavityManager.h
  3. // OralCavityFramework
  4. //
  5. // Created by ss on 2024/8/30.
  6. //
  7. #import <Foundation/Foundation.h>
  8. //#include <CoreVideo/CoreVideo.h>
  9. #import <UIKit/UIKit.h>
  10. @interface OralCavityManager : NSObject
  11. + (instancetype)sharedInstance;
  12. //返回图片存储路径
  13. @property (nonatomic, copy) void (^getPhotoPath)(NSString *path);
  14. //返回视频存储路径
  15. @property (nonatomic, copy) void (^getVideoPath)(NSString *path);
  16. //返回保存图片结果
  17. @property (nonatomic, copy) void (^getSavePhotoPath)(NSString *path);
  18. //返回保存视频结果
  19. @property (nonatomic, copy) void (^getSaveRecordPath)(NSString *path);
  20. //获取视频pixelBuffer
  21. @property (nonatomic, copy) void (^getPixelBuffer)(CVPixelBufferRef pixelBuffer);
  22. //获取视频pixelBuffer
  23. //@property (nonatomic, copy) void (^getVideoView)(UIView *videoView);
  24. @property (nonatomic, copy) void (^getVideoView)(CALayer *videoView);
  25. //设备拍照
  26. @property (nonatomic, copy) void (^onDeviceTakePhoto)(void);
  27. //1: 成功 -4 10秒链接超时。-1 错误
  28. - (int)connectToServer;
  29. //开始视频
  30. - (void)startVideo;
  31. //停止视频
  32. - (void)stopVideo;
  33. //拍照 前缀
  34. - (void)takePhoto:(NSString *)str;
  35. //开始录像
  36. - (void)startRecord:(NSString *)str;
  37. //停止录像
  38. - (void)stopRecord;
  39. //获取图片列表
  40. - (NSArray *)getPhotoList;
  41. //获取视频列表
  42. - (NSArray *)getVideoList;
  43. //删除指定文件
  44. - (BOOL)deleteFile:(NSString *)filePath;
  45. //横屏
  46. - (void)getLandscapeView:(NSArray *)arr;
  47. //竖屏
  48. - (void)getPortraitView;
  49. //保存照片 数组,两个元素,0:临时视频路径,1:编辑后视频路径
  50. - (void)savePhoto:(NSArray *)arr;
  51. //保存视频 数组,两个元素,0:临时视频路径,1:编辑后视频路径
  52. - (void)saveRecord:(NSArray *)arr;
  53. @end