-
Notifications
You must be signed in to change notification settings - Fork 10
/
EncodingStreamInputDetails.ts
100 lines (87 loc) · 2.36 KB
/
EncodingStreamInputDetails.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
import {map, mapArray} from '../common/Mapper';
import AudioStream from './AudioStream';
import MediaStream from './MediaStream';
import SubtitleStream from './SubtitleStream';
import VideoStream from './VideoStream';
/**
* @export
* @class EncodingStreamInputDetails
*/
export class EncodingStreamInputDetails {
/**
* Format name
* @type {string}
* @memberof EncodingStreamInputDetails
*/
public formatName?: string;
/**
* The start time in seconds
* @type {number}
* @memberof EncodingStreamInputDetails
*/
public startTime?: number;
/**
* Duration in seconds
* @type {number}
* @memberof EncodingStreamInputDetails
*/
public duration?: number;
/**
* Input file size in bytes
* @type {number}
* @memberof EncodingStreamInputDetails
*/
public size?: number;
/**
* Bitrate in bps
* @type {number}
* @memberof EncodingStreamInputDetails
*/
public bitrate?: number;
/**
* Additional metadata saved in the input file
* @type {{ [key: string]: any; }}
* @memberof EncodingStreamInputDetails
*/
public tags?: { [key: string]: any; };
/**
* Video streams in the input file
* @type {VideoStream[]}
* @memberof EncodingStreamInputDetails
*/
public videoStreams?: VideoStream[];
/**
* Audio stream in the input file
* @type {AudioStream[]}
* @memberof EncodingStreamInputDetails
*/
public audioStreams?: AudioStream[];
/**
* Meta data streams in the input file
* @type {MediaStream[]}
* @memberof EncodingStreamInputDetails
*/
public metaStreams?: MediaStream[];
/**
* Subtitle streams in the input file
* @type {SubtitleStream[]}
* @memberof EncodingStreamInputDetails
*/
public subtitleStreams?: SubtitleStream[];
constructor(obj?: Partial<EncodingStreamInputDetails>) {
if(!obj) {
return;
}
this.formatName = map(obj.formatName);
this.startTime = map(obj.startTime);
this.duration = map(obj.duration);
this.size = map(obj.size);
this.bitrate = map(obj.bitrate);
this.tags = map(obj.tags);
this.videoStreams = mapArray(obj.videoStreams, VideoStream);
this.audioStreams = mapArray(obj.audioStreams, AudioStream);
this.metaStreams = mapArray(obj.metaStreams, MediaStream);
this.subtitleStreams = mapArray(obj.subtitleStreams, SubtitleStream);
}
}
export default EncodingStreamInputDetails;