69 lines
1.8 KiB
Objective-C
69 lines
1.8 KiB
Objective-C
//
|
||
// AVVideoConfiguration.h
|
||
// AVDemo
|
||
//
|
||
// 自定义视频配置类,继承自 SellyLiveVideoConfiguration
|
||
// 添加业务相关的属性和方法
|
||
//
|
||
|
||
#import <Foundation/Foundation.h>
|
||
#import "SellyCloudSDK/SellyCloudManager.h"
|
||
#import "AVConstants.h"
|
||
|
||
NS_ASSUME_NONNULL_BEGIN
|
||
|
||
/// 自定义视频配置类
|
||
/// @discussion 继承自 SellyLiveVideoConfiguration,添加了业务相关的属性
|
||
@interface AVVideoConfiguration : SellyLiveVideoConfiguration
|
||
|
||
// ============ 业务属性 ============
|
||
|
||
/// 用户昵称
|
||
@property (nonatomic, copy) NSString *nickname;
|
||
|
||
/// 流 ID
|
||
@property (nonatomic, copy) NSString *streamId;
|
||
|
||
/// 视频编码器(H.264/H.265)
|
||
@property (nonatomic, assign) AVVideoCodec codec;
|
||
|
||
// ============ 工厂方法 ============
|
||
|
||
/// 创建默认配置
|
||
+ (instancetype)defaultConfiguration;
|
||
|
||
/// 创建指定分辨率的配置
|
||
/// @param resolution 分辨率
|
||
+ (instancetype)configurationWithResolution:(AVVideoResolution)resolution;
|
||
|
||
// ============ 便利方法 ============
|
||
|
||
/// 设置分辨率(采集和输出相同)
|
||
/// @param resolution 分辨率
|
||
- (void)setResolution:(AVVideoResolution)resolution;
|
||
|
||
/// 分别设置采集和输出分辨率(高级用法)
|
||
/// @param captureResolution 采集分辨率
|
||
/// @param outputResolution 输出分辨率
|
||
- (void)setCaptureResolution:(AVVideoResolution)captureResolution
|
||
outputResolution:(AVVideoResolution)outputResolution;
|
||
|
||
/// 获取当前输出分辨率
|
||
- (AVVideoResolution)currentResolution;
|
||
|
||
/// 获取当前采集分辨率
|
||
- (AVVideoResolution)currentCaptureResolution;
|
||
|
||
/// 获取当前输出分辨率
|
||
- (AVVideoResolution)currentOutputResolution;
|
||
|
||
/// 获取最大码率(kbps)
|
||
- (NSInteger)maxBitrateKbps;
|
||
|
||
/// 获取最小码率(kbps)
|
||
- (NSInteger)minBitrateKbps;
|
||
|
||
@end
|
||
|
||
NS_ASSUME_NONNULL_END
|