-
Notifications
You must be signed in to change notification settings - Fork 10
/
Trimming.ts
56 lines (48 loc) · 1.51 KB
/
Trimming.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
import {map, mapArray} from '../common/Mapper';
/**
* @export
* @class Trimming
*/
export class Trimming {
/**
* Defines the offset in seconds from which the encoding should start, beginning at 0.
* @type {number}
* @memberof Trimming
*/
public offset?: number;
/**
* Defines how many seconds from the input will be encoded. If not set, the input will be encoded until its end.
* @type {number}
* @memberof Trimming
*/
public duration?: number;
/**
* When true, \"duration\" will be interpreted as a maximum and not cause an error if the input is too short
* @type {boolean}
* @memberof Trimming
*/
public ignoreDurationIfInputTooShort?: boolean;
/**
* Defines the H264 picture timing of the first frame from which the encoding should start. Any defined offset or duration in seconds will be ignored.
* @type {string}
* @memberof Trimming
*/
public startPicTiming?: string;
/**
* Defines the H264 picture timing of the last frame, that will be included in the encoding. Any defined offset or duration in seconds will be ignored.
* @type {string}
* @memberof Trimming
*/
public endPicTiming?: string;
constructor(obj?: Partial<Trimming>) {
if(!obj) {
return;
}
this.offset = map(obj.offset);
this.duration = map(obj.duration);
this.ignoreDurationIfInputTooShort = map(obj.ignoreDurationIfInputTooShort);
this.startPicTiming = map(obj.startPicTiming);
this.endPicTiming = map(obj.endPicTiming);
}
}
export default Trimming;