QNUtil.h 952 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. //
  2. // QNUtil.h
  3. // QNRTCKit
  4. //
  5. // Created by hxiongan on 2019/1/4.
  6. // Copyright © 2019年 Pili Engineering, Qiniu Inc. All rights reserved.
  7. //
  8. #import <Foundation/Foundation.h>
  9. #import <CoreVideo/CoreVideo.h>
  10. #import <UIKit/UIKit.h>
  11. #import <CoreAudioTypes/CoreAudioTypes.h>
  12. #import <CoreMedia/CoreMedia.h>
  13. @interface QNUtil : NSObject
  14. /*!
  15. * @abstract 将 CVPixelBufferRef 转换为 UIImage. 支持的 PixelFormat 类型: kCVPixelFormatType_32BGRA, kCVPixelFormatType_420YpCbCr8Planar, kCVPixelFormatType_420YpCbCr8PlanarFullRange, kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange, kCVPixelFormatType_420YpCbCr8BiPlanarFullRange
  16. *
  17. * @since v4.0.0
  18. */
  19. + (UIImage *)convertFrame:(CVPixelBufferRef)pixelBuffer;
  20. /*!
  21. * @abstract 开始 dump 音频数据到本地
  22. *
  23. * @since v5.2.1
  24. */
  25. + (BOOL)startAecDump:(NSString *)path durationMs:(int)durationMs;
  26. /*!
  27. * @abstract 停止 dump 音频数据
  28. *
  29. * @since v5.2.1
  30. */
  31. + (void)stopAecDump;
  32. @end