-
Notifications
You must be signed in to change notification settings - Fork 10
/
TimeBasedTrimmingInputStream.ts
50 lines (43 loc) · 1.42 KB
/
TimeBasedTrimmingInputStream.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
import {map, mapArray} from '../common/Mapper';
import InputStream from './InputStream';
import InputStreamType from './InputStreamType';
/**
* @export
* @class TimeBasedTrimmingInputStream
*/
export class TimeBasedTrimmingInputStream extends InputStream {
/**
* Discriminator property for InputStream
* @type {string}
* @memberof TimeBasedTrimmingInputStream
*/
public readonly type: InputStreamType = InputStreamType.TRIMMING_TIME_BASED;
/**
* The id of the ingest input stream that should be trimmed
* @type {string}
* @memberof TimeBasedTrimmingInputStream
*/
public inputStreamId?: string;
/**
* Defines the offset in seconds at which the encoding should start, beginning at 0. The frame indicated by this value will be included in the encoding
* @type {number}
* @memberof TimeBasedTrimmingInputStream
*/
public offset?: number;
/**
* Defines how many seconds of the input will be encoded. Not defining or setting it to null indicates that the remaining input (considering offset) will be encoded.
* @type {number}
* @memberof TimeBasedTrimmingInputStream
*/
public duration?: number;
constructor(obj?: Partial<TimeBasedTrimmingInputStream>) {
super(obj);
if(!obj) {
return;
}
this.inputStreamId = map(obj.inputStreamId);
this.offset = map(obj.offset);
this.duration = map(obj.duration);
}
}
export default TimeBasedTrimmingInputStream;