-
Notifications
You must be signed in to change notification settings - Fork 10
/
Muxing.ts
131 lines (119 loc) · 3.94 KB
/
Muxing.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
119
120
121
122
123
124
125
126
127
128
129
130
import {map, mapArray} from '../common/Mapper';
import BitmovinResource from './BitmovinResource';
import BroadcastTsMuxing from './BroadcastTsMuxing';
import ChunkedTextMuxing from './ChunkedTextMuxing';
import CmafMuxing from './CmafMuxing';
import EncodingOutput from './EncodingOutput';
import Fmp4Muxing from './Fmp4Muxing';
import Ignoring from './Ignoring';
import Mp3Muxing from './Mp3Muxing';
import Mp4Muxing from './Mp4Muxing';
import MuxingStream from './MuxingStream';
import MuxingType from './MuxingType';
import MxfMuxing from './MxfMuxing';
import PackedAudioMuxing from './PackedAudioMuxing';
import ProgressiveMovMuxing from './ProgressiveMovMuxing';
import ProgressiveTsMuxing from './ProgressiveTsMuxing';
import ProgressiveWavMuxing from './ProgressiveWavMuxing';
import ProgressiveWebmMuxing from './ProgressiveWebmMuxing';
import SegmentedRawMuxing from './SegmentedRawMuxing';
import StreamConditionsMode from './StreamConditionsMode';
import TextMuxing from './TextMuxing';
import TsMuxing from './TsMuxing';
import WebmMuxing from './WebmMuxing';
export type MuxingUnion =
Fmp4Muxing |
CmafMuxing |
Mp4Muxing |
TsMuxing |
WebmMuxing |
Mp3Muxing |
MxfMuxing |
ProgressiveWavMuxing |
ProgressiveWebmMuxing |
ProgressiveMovMuxing |
ProgressiveTsMuxing |
BroadcastTsMuxing |
ChunkedTextMuxing |
TextMuxing |
SegmentedRawMuxing |
PackedAudioMuxing;
/**
* @export
* @class Muxing
*/
export class Muxing extends BitmovinResource {
protected static readonly _discriminatorName = 'type';
protected static readonly _discriminatorMapping: { [key in keyof typeof MuxingType]: string; } = {
FMP4: 'Fmp4Muxing',
CMAF: 'CmafMuxing',
MP4: 'Mp4Muxing',
TS: 'TsMuxing',
WEBM: 'WebmMuxing',
MP3: 'Mp3Muxing',
MXF: 'MxfMuxing',
PROGRESSIVE_WAV: 'ProgressiveWavMuxing',
PROGRESSIVE_WEBM: 'ProgressiveWebmMuxing',
PROGRESSIVE_MOV: 'ProgressiveMovMuxing',
PROGRESSIVE_TS: 'ProgressiveTsMuxing',
BROADCAST_TS: 'BroadcastTsMuxing',
CHUNKED_TEXT: 'ChunkedTextMuxing',
TEXT: 'TextMuxing',
SEGMENTED_RAW: 'SegmentedRawMuxing',
PACKED_AUDIO: 'PackedAudioMuxing'
};
/**
* @type {MuxingStream[]}
* @memberof Muxing
*/
public streams?: MuxingStream[];
/**
* @type {EncodingOutput[]}
* @memberof Muxing
*/
public outputs?: EncodingOutput[];
/**
* Average bitrate. Available after encoding finishes.
* @type {number}
* @memberof Muxing
*/
public avgBitrate?: number;
/**
* Min bitrate. Available after encoding finishes.
* @type {number}
* @memberof Muxing
*/
public minBitrate?: number;
/**
* Max bitrate. Available after encoding finishes.
* @type {number}
* @memberof Muxing
*/
public maxBitrate?: number;
/**
* This read-only property is set during the analysis step of the encoding. If it contains items, the Muxing has been ignored during the encoding process according to its 'streamConditionsMode'
* @type {Ignoring[]}
* @memberof Muxing
*/
public ignoredBy?: Ignoring[];
/**
* Specifies how to proceed with the Muxing when some of its Streams are ignored (see 'condition' property of the Stream resource). The settings only make a difference for Muxings with more than one Stream. When retrieving the resource after the analysis step of the encoding has finished, 'ignoredBy' will indicate if and why it has been ignored.
* @type {StreamConditionsMode}
* @memberof Muxing
*/
public streamConditionsMode?: StreamConditionsMode;
constructor(obj?: Partial<Muxing>) {
super(obj);
if(!obj) {
return;
}
this.streams = mapArray(obj.streams, MuxingStream);
this.outputs = mapArray(obj.outputs, EncodingOutput);
this.avgBitrate = map(obj.avgBitrate);
this.minBitrate = map(obj.minBitrate);
this.maxBitrate = map(obj.maxBitrate);
this.ignoredBy = mapArray(obj.ignoredBy, Ignoring);
this.streamConditionsMode = map(obj.streamConditionsMode);
}
}
export default Muxing;