PLStreamStatus.h
1.77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
//
// PLStreamStatus.h
// PLStreamingKit
//
// Created by 0dayZh on 16/1/9.
// Copyright © 2016年 pili-engineering. All rights reserved.
//
#import <Foundation/Foundation.h>
/*!
@class PLStreamStatus
@abstract 流的实时状态信息。
@discussion 通过实现 PLStreamingSession 对象的 PLStreamingSessionDelegate 代理协议,并实现 -streamingSession:streamStatusDidUpdate: 方法,
可以获取到流的实时状态信息。
@see PLStreamingSessionDelegate
@since v1.1.1
*/
@interface PLStreamStatus : NSObject <NSCopying>
/*!
@property videoFPS
@abstract 视频的帧率。
@since v1.1.1
*/
@property (nonatomic, assign, readonly) double videoFPS;
/*!
@property audioFPS
@abstract 音频的帧率。
@since v1.1.1
*/
@property (nonatomic, assign, readonly) double audioFPS;
/*!
@property totalBitrate
@abstract 音频和视频总共的码率。
@discussion 该属性的单位为 bps(Bits per Seccond)。在使用时请注意 Bit 和 Byte 的区别,不要混淆。
@since v1.1.1
*/
@property (nonatomic, assign, readonly) double totalBitrate;
/*!
@method initWithVideoFPS:audioFPS:totalBitrate:
@abstract 初始化 PLStreamStatus 对象。
@discussion 一般你不需要自己创建或初始化 PLStreamStatus 对象,该类的实例都是在创建并初始化好后通过 PLStreamingSessionDelegate 代理的
-streamingSession:streamStatusDidUpdate: 方法回调给开发者。
@see PLStreamingSessionDelegate
@since v1.1.1
*/
- (instancetype)initWithVideoFPS:(double)vfps
audioFPS:(double)afps
totalBitrate:(double)totalBitrate;
@end