QNScreenVideoTrackConfig.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. //
  2. // QNScreenVideoTrackConfig.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 <UIKit/UIKit.h>
  10. #import "QNVideoEncoderConfig.h"
  11. NS_ASSUME_NONNULL_BEGIN
  12. @interface QNScreenVideoTrackConfig : NSObject
  13. /*!
  14. * @abstract Track 的 tag,SDK 会将其透传到远端,当发布多路 Track 时可用 tag 来作区分。
  15. *
  16. * @since v4.0.0
  17. */
  18. @property (nonatomic, strong) NSString * tag;
  19. /*!
  20. * @abstract 视频编码配置。
  21. *
  22. * @since v5.0.0
  23. */
  24. @property (nonatomic, strong, readonly) QNVideoEncoderConfig *config;
  25. /*!
  26. * @abstract Track 是否开启大小流
  27. *
  28. * @since v4.0.0
  29. */
  30. @property (nonatomic, assign) BOOL multiStreamEnable;
  31. /*!
  32. * @abstract 初始化默认 Track。
  33. *
  34. * @discussion 默认码率为 600kbps。
  35. *
  36. * @since v5.0.0
  37. */
  38. + (instancetype)defaultScreenVideoTrackConfig;
  39. /*!
  40. * @abstract 初始化指定 tag 参数的 Track 配置。
  41. *
  42. * @discussion 默认码率为 600kbps。
  43. *
  44. * @since v4.0.0
  45. */
  46. - (instancetype)initWithSourceTag:(nullable NSString *)tag;
  47. /*!
  48. * @abstract 初始化指定 tag、config 参数的 Track 配置。
  49. *
  50. * @param tag Track 的标识
  51. *
  52. * @param config 视频编码配置 QNVideoEncoderConfig 实例
  53. *
  54. * @since v5.0.0
  55. */
  56. - (instancetype)initWithSourceTag:(nullable NSString *)tag
  57. config:(QNVideoEncoderConfig *)config;
  58. /*!
  59. * @abstract 初始化指定 tag、config、multiStreamEnable 参数的 Track 配置。
  60. *
  61. * @param tag Track 的标识
  62. *
  63. * @param config 视频编码配置 QNVideoEncoderConfig 实例
  64. *
  65. * @param multiStreamEnable 是否开启大小流
  66. *
  67. * @since v5.0.0
  68. */
  69. - (instancetype)initWithSourceTag:(nullable NSString *)tag
  70. config:(QNVideoEncoderConfig *)config
  71. multiStreamEnable:(BOOL)multiStreamEnable;
  72. @end
  73. NS_ASSUME_NONNULL_END