-
Notifications
You must be signed in to change notification settings - Fork 10
/
StreamInput.ts
66 lines (57 loc) · 1.92 KB
/
StreamInput.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
import {map, mapArray} from '../common/Mapper';
import EncodingStreamInputDetails from './EncodingStreamInputDetails';
import StreamSelectionMode from './StreamSelectionMode';
/**
* @export
* @class StreamInput
*/
export class StreamInput {
/**
* ID of an Input resource defining the input storage. Required if 'inputStreamId' is not set.
* @type {string}
* @memberof StreamInput
*/
public inputId?: string;
/**
* Path to an input media file. Required if 'inputStreamId' is not set.
* @type {string}
* @memberof StreamInput
*/
public inputPath?: string;
/**
* Specifies the strategy for selecting a stream from the input file. Must not be set when 'inputStreamId' is set.
* @type {StreamSelectionMode}
* @memberof StreamInput
*/
public selectionMode?: StreamSelectionMode;
/**
* Position of the stream to be selected from the input file (zero-based). Must not be set in combination with selectionMode 'AUTO', defaults to 0 for any other selectionMode.
* @type {number}
* @memberof StreamInput
*/
public position?: number;
/**
* Set this property instead of all others to reference an InputStream resource (e.g. an Ingest-, Trimming- or ConcatenationInputStream)
* @type {string}
* @memberof StreamInput
*/
public inputStreamId?: string;
/**
* Input analysis details This property is populated after the encoding has finished
* @type {EncodingStreamInputDetails}
* @memberof StreamInput
*/
public analysisDetails?: EncodingStreamInputDetails;
constructor(obj?: Partial<StreamInput>) {
if(!obj) {
return;
}
this.inputId = map(obj.inputId);
this.inputPath = map(obj.inputPath);
this.selectionMode = map(obj.selectionMode);
this.position = map(obj.position);
this.inputStreamId = map(obj.inputStreamId);
this.analysisDetails = map(obj.analysisDetails, EncodingStreamInputDetails);
}
}
export default StreamInput;