-
Notifications
You must be signed in to change notification settings - Fork 10
/
BroadcastTsTransportConfiguration.ts
80 lines (69 loc) · 3.04 KB
/
BroadcastTsTransportConfiguration.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
import {map, mapArray} from '../common/Mapper';
/**
* @export
* @class BroadcastTsTransportConfiguration
*/
export class BroadcastTsTransportConfiguration {
/**
* Output rate in bps. The value zero implies to use minimal rate. The minimal rate leaves approximately 15kbps of null packets in the stream.
* @type {number}
* @memberof BroadcastTsTransportConfiguration
*/
public muxrate?: number;
/**
* Stop mux on errors. If true, implies halt multiplexing when any error is encountered. If false, errors are ignored and multiplexing continues. Note that the recovery from an error will usually result in an illegal transport stream and artifacts on a decoder.
* @type {boolean}
* @memberof BroadcastTsTransportConfiguration
*/
public stopOnError?: boolean;
/**
* If true, prevents adaptation fields with length field equal to zero in video, i.e., zero-length AF. Please note that this condition can only occur when pesAlign for the input stream is set to true.
* @type {boolean}
* @memberof BroadcastTsTransportConfiguration
*/
public preventEmptyAdaptionFieldsInVideo?: boolean;
/**
* Program Association Table (PAT) repetition rate per second. Number of PATs per second.
* @type {number}
* @memberof BroadcastTsTransportConfiguration
*/
public patRepetitionRatePerSec?: number;
/**
* Program Map Table (PMT) repetition rate per second. Number of PMTs for each program per second.
* @type {number}
* @memberof BroadcastTsTransportConfiguration
*/
public pmtRepetitionRatePerSec?: number;
/**
* When false, the output stream is created at a constant bit rate. When true, the output rate is allowed to vary from a maximum rate set by the muxrate parameter down to the minimum required to carry the stream.
* @type {boolean}
* @memberof BroadcastTsTransportConfiguration
*/
public variableMuxRate?: boolean;
/**
* Presentation time stamp value for the first video frame. The timestamp is specified in the timescale of 90000
* @type {number}
* @memberof BroadcastTsTransportConfiguration
*/
public initialPresentationTimeStamp?: number;
/**
* Program Clock Reference value at the beginning of the first packet for the transport stream. The PCR is specified in the timescale of 90000
* @type {number}
* @memberof BroadcastTsTransportConfiguration
*/
public initialProgramClockReference?: number;
constructor(obj?: Partial<BroadcastTsTransportConfiguration>) {
if(!obj) {
return;
}
this.muxrate = map(obj.muxrate);
this.stopOnError = map(obj.stopOnError);
this.preventEmptyAdaptionFieldsInVideo = map(obj.preventEmptyAdaptionFieldsInVideo);
this.patRepetitionRatePerSec = map(obj.patRepetitionRatePerSec);
this.pmtRepetitionRatePerSec = map(obj.pmtRepetitionRatePerSec);
this.variableMuxRate = map(obj.variableMuxRate);
this.initialPresentationTimeStamp = map(obj.initialPresentationTimeStamp);
this.initialProgramClockReference = map(obj.initialProgramClockReference);
}
}
export default BroadcastTsTransportConfiguration;