Constructor
new M2ts()
- Implements:
- Source:
- See:
Members
M2TS_PACKET_SIZE :number
The size of an M2TS source packet: a transport packet behind a 4-octet
arrival timestamp.
Type:
- number
- Source:
TS_PACKET_SIZE :number
The size of an MPEG-2 transport packet.
Type:
- number
- Source:
psi_ :Uint8Array
The catalog's initialization packets, normalized to 188-octet transport
packets and prepended to every group.
Type:
- Uint8Array
- Source:
Methods
isAudioCodec_(codec) → {boolean}
Parameters:
| Name | Type | Description |
|---|---|---|
codec |
string |
- Source:
Returns:
- Type
- boolean
isVideoCodec_(codec) → {boolean}
Parameters:
| Name | Type | Description |
|---|---|---|
codec |
string |
- Source:
Returns:
- Type
- boolean
normalizePackets_(datanon-null, packetSize) → {Uint8Array}
Copies out the 188-octet transport packets of a buffer of source packets,
dropping the 4-octet timestamp prefix of 192-octet M2TS source packets.
The prefix records when a packet arrived at a contribution encoder, which
says nothing about presentation, so nothing downstream wants it. Removing
it here means the rest of the player only ever sees plain transport
packets.
Parameters:
| Name | Type | Description |
|---|---|---|
data |
Uint8Array | |
packetSize |
number |
- Source:
Returns:
- Type
- Uint8Array
createSegmenter() → {shaka.extern.MsfSegmenter}
Creates a segmenter for the track this instance described. Called each
time the stream's segment index is created, so a track that is unsubscribed
and resubscribed starts from a clean segmenter.
- Implements:
- Source:
Returns:
describeTrack(track, initDatanon-null) → {shaka.extern.MsfTrackDescription}
Inspects a catalog track and describes how to present it, or returns null
if this packaging cannot handle the track, in which case the track is
skipped. Called once per track, before any objects arrive.
Parameters:
| Name | Type | Description |
|---|---|---|
track |
msfCatalog.Track | |
initData |
Uint8Array | The track's resolved initialization data, empty when the catalog carries none. Its meaning is packaging-specific: an MP4 initialization segment for CMAF, PAT/PMT transport packets for m2ts. |
- Implements:
- Source: