-
Notifications
You must be signed in to change notification settings - Fork 10
/
StartEncodingRequest.ts
119 lines (104 loc) · 4.68 KB
/
StartEncodingRequest.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
import {map, mapArray} from '../common/Mapper';
import EncodingMode from './EncodingMode';
import ManifestGenerator from './ManifestGenerator';
import ManifestResource from './ManifestResource';
import PerTitle from './PerTitle';
import Scheduling from './Scheduling';
import Trimming from './Trimming';
import Tweaks from './Tweaks';
/**
* @export
* @class StartEncodingRequest
*/
export class StartEncodingRequest {
/**
* Allows to encode only part of the input. Defines start (offset) and duration of the desired section. This is not allowed when the Encoding uses any kind of Input Stream resource.
* @type {Trimming}
* @memberof StartEncodingRequest
*/
public trimming?: Trimming;
/**
* Scheduling parameters of the encoding.
* @type {Scheduling}
* @memberof StartEncodingRequest
*/
public scheduling?: Scheduling;
/**
* Special tweaks for your encoding job.
* @type {Tweaks}
* @memberof StartEncodingRequest
*/
public tweaks?: Tweaks;
/**
* Enable frame dropping/duplication to handle variable frames per seconds of video input streams
* @type {boolean}
* @memberof StartEncodingRequest
*/
public handleVariableInputFps?: boolean;
/**
* The pass mode of the encoding. Must only be set when `encodingMode` is not set on any codec configuration used by this encoding.
* @type {EncodingMode}
* @memberof StartEncodingRequest
*/
public encodingMode?: EncodingMode;
/**
* DASH manifests to be generated for previewing while the encoding is still running. See [documentation](https://developer.bitmovin.com/encoding/docs/how-to-create-manifests-for-your-encodings#just-in-time-jit)
* @type {ManifestResource[]}
* @memberof StartEncodingRequest
*/
public previewDashManifests?: ManifestResource[];
/**
* HLS manifests to be generated for previewing while the encoding is still running. See [documentation](https://developer.bitmovin.com/encoding/docs/how-to-create-manifests-for-your-encodings#just-in-time-jit)
* @type {ManifestResource[]}
* @memberof StartEncodingRequest
*/
public previewHlsManifests?: ManifestResource[];
/**
* DASH manifests to be generated right after encoding (just-in-time). See [documentation](https://developer.bitmovin.com/encoding/docs/how-to-create-manifests-for-your-encodings#just-in-time-jit)
* @type {ManifestResource[]}
* @memberof StartEncodingRequest
*/
public vodDashManifests?: ManifestResource[];
/**
* HLS manifests to be generated right after encoding (just-in-time). See [documentation](https://developer.bitmovin.com/encoding/docs/how-to-create-manifests-for-your-encodings#just-in-time-jit)
* @type {ManifestResource[]}
* @memberof StartEncodingRequest
*/
public vodHlsManifests?: ManifestResource[];
/**
* Smooth Streaming manifests to be generated right after encoding (just-in-time). See [documentation](https://developer.bitmovin.com/encoding/docs/how-to-create-manifests-for-your-encodings#just-in-time-jit)
* @type {ManifestResource[]}
* @memberof StartEncodingRequest
*/
public vodSmoothManifests?: ManifestResource[];
/**
* Major version of the manifest generator to be used for manifests referenced in this request (by properties vodDashManifests, vodHlsManifests, vodSmoothManifests, previewDashManifests, previewHlsManifests). `V2` is available for encoder versions 2.70.0 and above and is the recommended option. The default value depends on the sign-up date of your organization. See [documentation](https://developer.bitmovin.com/encoding/docs/manifest-generator-v2) page for a detailed explanation.
* @type {ManifestGenerator}
* @memberof StartEncodingRequest
*/
public manifestGenerator?: ManifestGenerator;
/**
* Per-Title settings
* @type {PerTitle}
* @memberof StartEncodingRequest
*/
public perTitle?: PerTitle;
constructor(obj?: Partial<StartEncodingRequest>) {
if(!obj) {
return;
}
this.trimming = map(obj.trimming, Trimming);
this.scheduling = map(obj.scheduling, Scheduling);
this.tweaks = map(obj.tweaks, Tweaks);
this.handleVariableInputFps = map(obj.handleVariableInputFps);
this.encodingMode = map(obj.encodingMode);
this.previewDashManifests = mapArray(obj.previewDashManifests, ManifestResource);
this.previewHlsManifests = mapArray(obj.previewHlsManifests, ManifestResource);
this.vodDashManifests = mapArray(obj.vodDashManifests, ManifestResource);
this.vodHlsManifests = mapArray(obj.vodHlsManifests, ManifestResource);
this.vodSmoothManifests = mapArray(obj.vodSmoothManifests, ManifestResource);
this.manifestGenerator = map(obj.manifestGenerator);
this.perTitle = map(obj.perTitle, PerTitle);
}
}
export default StartEncodingRequest;