QNCameraVideoTrackConfig.h 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. //
  2. // QNCameraVideoTrackConfig.h
  3. // QNRTCKit
  4. //
  5. // Created by 何云旗 on 2021/6/21.
  6. // Copyright © 2021 Pili Engineering, Qiniu Inc. All rights reserved.
  7. //
  8. #import <Foundation/Foundation.h>
  9. #import <AVFoundation/AVFoundation.h>
  10. #import <UIKit/UIKit.h>
  11. #import "QNVideoEncoderConfig.h"
  12. NS_ASSUME_NONNULL_BEGIN
  13. @interface QNCameraVideoTrackConfig : NSObject
  14. /*!
  15. * @abstract Track 的 tag,SDK 会将其透传到远端,当发布多路 Track 时可用 tag 来作区分。
  16. *
  17. * @since v4.0.0
  18. */
  19. @property (nonatomic, strong) NSString * tag;
  20. /*!
  21. * @abstract Track 是否开启大小流
  22. *
  23. * @since v4.0.0
  24. */
  25. @property (nonatomic, assign) BOOL multiStreamEnable;
  26. /*!
  27. * @abstract 摄像头的位置,默认为 AVCaptureDevicePositionFront。
  28. *
  29. * @since v5.0.0
  30. */
  31. @property (nonatomic, assign) AVCaptureDevicePosition captureDevicePosition;
  32. /*!
  33. * @abstract 视频编码配置。
  34. *
  35. * @since v5.0.0
  36. */
  37. @property (nonatomic, strong, readonly) QNVideoEncoderConfig *config;
  38. /*!
  39. * @abstract 初始化默认 Track 配置。
  40. *
  41. * @discussion 默认 tag 为 ""、码率为 600kbps、编码尺寸 480x640、24 帧、前置、关闭大小流
  42. *
  43. * @since v5.0.0
  44. */
  45. + (instancetype)defaultCameraVideoTrackConfig;
  46. /*!
  47. * @abstract 初始化指定 tag 参数的 Track 配置。
  48. *
  49. * @discussion 默认码率为 600kbps、编码尺寸 480x640、24 帧、前置、关闭大小流
  50. *
  51. * @param tag Track 的标识
  52. *
  53. * @since v4.0.0
  54. */
  55. - (instancetype)initWithSourceTag:(nullable NSString *)tag;
  56. /*!
  57. * @abstract 初始化指定 tag、config 参数的 Track 配置。
  58. *
  59. * @param tag Track 的标识
  60. *
  61. * @param config 视频编码配置 QNVideoEncoderConfig 实例
  62. *
  63. * @since v5.0.0
  64. */
  65. - (instancetype)initWithSourceTag:(nullable NSString *)tag
  66. config:(QNVideoEncoderConfig *)config;
  67. /*!
  68. * @abstract 初始化指定 tag、config、multiStreamEnable 参数的 Track 配置。
  69. *
  70. * @param tag Track 的标识
  71. *
  72. * @param config 视频编码配置 QNVideoEncoderConfig 实例
  73. *
  74. * @param multiStreamEnable 是否开启大小流
  75. *
  76. * @since v5.0.0
  77. */
  78. - (instancetype)initWithSourceTag:(nullable NSString *)tag
  79. config:(QNVideoEncoderConfig *)config
  80. multiStreamEnable:(BOOL)multiStreamEnable;
  81. @end
  82. NS_ASSUME_NONNULL_END