Class: shaka.msf.packaging.Locmaf

Members

VERSION :string

The LOCMAF packaging version this build reads, as carried in the catalog's `locmafVersion` field.
Type:
  • string
Source:

Methods

readTrackParams_(initDatanon-null, timescale) → {shaka.msf.LOCMAFParser.TrackParams}

Reads what the CMAF Header contributes to reconstruction: the track's ID, the `trex` defaults every omitted field falls back to, and the `tenc` per-sample IV size protected tracks need. shaka.util.Mp4BoxParsers.parseTREX is not used here because it reports only two of the five values -- it exists for the transmuxer, which needs no more -- and widening it would change what every other caller reads.
Parameters:
Name Type Description
initData Uint8Array
timescale number
Source:
Returns:
Type
shaka.msf.LOCMAFParser.TrackParams

createSegmenter(codecopt) → {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.
Parameters:
Name Type Attributes Description
codec shaka.extern.MsfCodec <optional>
The negotiated draft's primitive codec. A packaging whose objects carry MoQT-encoded fields -- Object Properties, for one -- needs it, because that encoding changed between draft-16 and draft-18 and the object bytes alone do not say which one they are in. Packagings that read no such field ignore it.
Implements:
Source:
Returns:
Type
shaka.extern.MsfSegmenter

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:
Returns:
Type
shaka.extern.MsfTrackDescription