-
Notifications
You must be signed in to change notification settings - Fork 10
/
Mp4Muxing.ts
71 lines (62 loc) · 2.02 KB
/
Mp4Muxing.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
import {map, mapArray} from '../common/Mapper';
import DolbyVisionMuxingConfiguration from './DolbyVisionMuxingConfiguration';
import EncodingOutput from './EncodingOutput';
import FragmentedMp4MuxingManifestType from './FragmentedMp4MuxingManifestType';
import Ignoring from './Ignoring';
import Muxing from './Muxing';
import MuxingStream from './MuxingStream';
import MuxingType from './MuxingType';
import StreamConditionsMode from './StreamConditionsMode';
import TimeCode from './TimeCode';
/**
* @export
* @class Mp4Muxing
*/
export class Mp4Muxing extends Muxing {
/**
* Discriminator property for Muxing
* @type {string}
* @memberof Mp4Muxing
*/
public readonly type: MuxingType = MuxingType.MP4;
/**
* Name of the output file (either `filename` or `name` is required, prefer `filename`)
* @type {string}
* @memberof Mp4Muxing
*/
public filename?: string;
/**
* Duration of fragments in milliseconds. Required for Fragmented MP4 Muxing (for Smooth Streaming or DASH On-Demand). Not setting this will result in unfragmented mp4.
* @type {number}
* @memberof Mp4Muxing
*/
public fragmentDuration?: number;
/**
* @type {TimeCode}
* @memberof Mp4Muxing
*/
public timeCode?: TimeCode;
/**
* @type {FragmentedMp4MuxingManifestType}
* @memberof Mp4Muxing
*/
public fragmentedMP4MuxingManifestType?: FragmentedMp4MuxingManifestType;
/**
* Dolby Vision specific configuration
* @type {DolbyVisionMuxingConfiguration}
* @memberof Mp4Muxing
*/
public dolbyVisionConfiguration?: DolbyVisionMuxingConfiguration;
constructor(obj?: Partial<Mp4Muxing>) {
super(obj);
if(!obj) {
return;
}
this.filename = map(obj.filename);
this.fragmentDuration = map(obj.fragmentDuration);
this.timeCode = map(obj.timeCode, TimeCode);
this.fragmentedMP4MuxingManifestType = map(obj.fragmentedMP4MuxingManifestType);
this.dolbyVisionConfiguration = map(obj.dolbyVisionConfiguration, DolbyVisionMuxingConfiguration);
}
}
export default Mp4Muxing;