-
Notifications
You must be signed in to change notification settings - Fork 10
/
TsMuxingConfiguration.ts
56 lines (48 loc) · 1.74 KB
/
TsMuxingConfiguration.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
import {map, mapArray} from '../common/Mapper';
import TsAudioStreamConfiguration from './TsAudioStreamConfiguration';
import TsProgramClockReferenceConfiguration from './TsProgramClockReferenceConfiguration';
import TsProgramMapTableConfiguration from './TsProgramMapTableConfiguration';
import TsVideoStreamConfiguration from './TsVideoStreamConfiguration';
/**
* @export
* @class TsMuxingConfiguration
*/
export class TsMuxingConfiguration {
/**
* An integer value. Value for program_number field in the MPEG Transport Stream Program Map Table (PMT). The value zero is reserved for the NIT PID entry in the PAT.
* @type {number}
* @memberof TsMuxingConfiguration
*/
public programNumber?: number;
/**
* @type {TsProgramMapTableConfiguration}
* @memberof TsMuxingConfiguration
*/
public pmt?: TsProgramMapTableConfiguration;
/**
* @type {TsProgramClockReferenceConfiguration}
* @memberof TsMuxingConfiguration
*/
public pcr?: TsProgramClockReferenceConfiguration;
/**
* @type {TsVideoStreamConfiguration[]}
* @memberof TsMuxingConfiguration
*/
public videoStreams?: TsVideoStreamConfiguration[];
/**
* @type {TsAudioStreamConfiguration[]}
* @memberof TsMuxingConfiguration
*/
public audioStreams?: TsAudioStreamConfiguration[];
constructor(obj?: Partial<TsMuxingConfiguration>) {
if(!obj) {
return;
}
this.programNumber = map(obj.programNumber);
this.pmt = map(obj.pmt, TsProgramMapTableConfiguration);
this.pcr = map(obj.pcr, TsProgramClockReferenceConfiguration);
this.videoStreams = mapArray(obj.videoStreams, TsVideoStreamConfiguration);
this.audioStreams = mapArray(obj.audioStreams, TsAudioStreamConfiguration);
}
}
export default TsMuxingConfiguration;