-
Notifications
You must be signed in to change notification settings - Fork 10
/
StreamInfosDetails.ts
162 lines (141 loc) · 5.09 KB
/
StreamInfosDetails.ts
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
import {map, mapArray} from '../common/Mapper';
import LiveEncodingCodec from './LiveEncodingCodec';
import MediaType from './MediaType';
/**
* @export
* @class StreamInfosDetails
*/
export class StreamInfosDetails {
/**
* The id of the stream (required)
* @type {string}
* @memberof StreamInfosDetails
*/
public id?: string;
/**
* The media type of the stream (required)
* @type {MediaType}
* @memberof StreamInfosDetails
*/
public mediaType?: MediaType;
/**
* The width of the stream, if it is a video stream
* @type {number}
* @memberof StreamInfosDetails
*/
public width?: number;
/**
* The height of the stream, if it is a video stream
* @type {number}
* @memberof StreamInfosDetails
*/
public height?: number;
/**
* The rate (sample rate / fps) of the stream (required)
* @type {number}
* @memberof StreamInfosDetails
*/
public rate?: number;
/**
* The codec of the input stream (required)
* @type {LiveEncodingCodec}
* @memberof StreamInfosDetails
*/
public codec?: LiveEncodingCodec;
/**
* The minimum samples read per second within the last minute (required)
* @type {number}
* @memberof StreamInfosDetails
*/
public samplesReadPerSecondMin?: number;
/**
* The maximum samples read per second within the last minute (required)
* @type {number}
* @memberof StreamInfosDetails
*/
public samplesReadPerSecondMax?: number;
/**
* The average samples read per second within the last minute (required)
* @type {number}
* @memberof StreamInfosDetails
*/
public samplesReadPerSecondAvg?: number;
/**
* The minimum amount of backup samples used per second within the last minute. This will be written when no live stream is ingested. The last picture will be repeated with silent audio. (required)
* @type {number}
* @memberof StreamInfosDetails
*/
public samplesBackupPerSecondMin?: number;
/**
* The maximum amount of backup samples used per second within the last minute. This will be written when no live stream is ingested. The last picture will be repeated with silent audio. (required)
* @type {number}
* @memberof StreamInfosDetails
*/
public samplesBackupPerSecondMax?: number;
/**
* The average amount of backup samples used per second within the last minute. This will be written when no live stream is ingested. The last picture will be repeated with silent audio. (required)
* @type {number}
* @memberof StreamInfosDetails
*/
public samplesBackupPerSecondAvg?: number;
/**
* The minimum bytes read per second within the last minute (required)
* @type {number}
* @memberof StreamInfosDetails
*/
public bytesReadPerSecondMin?: number;
/**
* The maximum bytes read per second within the last minute (required)
* @type {number}
* @memberof StreamInfosDetails
*/
public bytesReadPerSecondMax?: number;
/**
* The average bytes read per second within the last minute (required)
* @type {number}
* @memberof StreamInfosDetails
*/
public bytesReadPerSecondAvg?: number;
/**
* The minimum amount of backup bytes used per second within the last minute. This will be written when no live stream is ingested. The last picture will be repeated with silent audio. (required)
* @type {number}
* @memberof StreamInfosDetails
*/
public bytesBackupPerSecondMin?: number;
/**
* The maximum amount of backup bytes used per second within the last minute. This will be written when no live stream is ingested. The last picture will be repeated with silent audio. (required)
* @type {number}
* @memberof StreamInfosDetails
*/
public bytesBackupPerSecondMax?: number;
/**
* The average amount of backup bytes used per second within the last minute. This will be written when no live stream is ingested. The last picture will be repeated with silent audio. (required)
* @type {number}
* @memberof StreamInfosDetails
*/
public bytesBackupPerSecondAvg?: number;
constructor(obj?: Partial<StreamInfosDetails>) {
if(!obj) {
return;
}
this.id = map(obj.id);
this.mediaType = map(obj.mediaType);
this.width = map(obj.width);
this.height = map(obj.height);
this.rate = map(obj.rate);
this.codec = map(obj.codec);
this.samplesReadPerSecondMin = map(obj.samplesReadPerSecondMin);
this.samplesReadPerSecondMax = map(obj.samplesReadPerSecondMax);
this.samplesReadPerSecondAvg = map(obj.samplesReadPerSecondAvg);
this.samplesBackupPerSecondMin = map(obj.samplesBackupPerSecondMin);
this.samplesBackupPerSecondMax = map(obj.samplesBackupPerSecondMax);
this.samplesBackupPerSecondAvg = map(obj.samplesBackupPerSecondAvg);
this.bytesReadPerSecondMin = map(obj.bytesReadPerSecondMin);
this.bytesReadPerSecondMax = map(obj.bytesReadPerSecondMax);
this.bytesReadPerSecondAvg = map(obj.bytesReadPerSecondAvg);
this.bytesBackupPerSecondMin = map(obj.bytesBackupPerSecondMin);
this.bytesBackupPerSecondMax = map(obj.bytesBackupPerSecondMax);
this.bytesBackupPerSecondAvg = map(obj.bytesBackupPerSecondAvg);
}
}
export default StreamInfosDetails;