Constructor
new DummyCaptionDecoder()
- Implements:
- Source:
Methods
clear()
Clears the decoder state completely.
Should be used when an action renders the decoder state invalid,
e.g. unbuffered seeks.
- Implements:
- Source:
decode() → {Array<!shaka.extern.ICaptionDecoder.ClosedCaption>}
Decodes all currently extracted packets and then clears them.
This should be called once for a set of extracts (see comment on extract).
- Implements:
- Source:
Returns:
- Type
- Array<!shaka.extern.ICaptionDecoder.ClosedCaption>
extract(userDataSeiMessagenon-null, pts)
Extracts packets and prepares them for decoding. In a given media fragment,
all the caption packets found in its SEI messages should be extracted by
successive calls to extract(), followed by a single call to decode().
Parameters:
| Name | Type | Description |
|---|---|---|
userDataSeiMessage |
Uint8Array | This is a User Data registered by Rec.ITU-T T.35 SEI message. It is described in sections D.1.6 and D.2.6 of Rec. ITU-T H.264 (06/2019). |
pts |
number | PTS when this packet was received, in seconds. |
- Implements:
- Source:
extractRaw608(raw608Datanon-null, pts)
Extracts raw CEA-608 caption bytes from a dedicated MP4 'c608' track
and prepares them for decoding. In a given media fragment, all the
CEA-608 samples found in the track should be extracted by successive
calls to extractRaw608(), followed by a single call to decode().
Unlike extract(), this method does not process SEI messages or
ITU-T T.35 user data. The input is raw CEA-608 byte pairs as stored
directly in the MP4 sample payload of a 'c608' track (Apple-style
fragmented MP4).
Each call provides the full sample payload for a single caption
sample. The payload typically consists of one or more CEA-608
cc_data byte pairs.
Parameters:
| Name | Type | Description |
|---|---|---|
raw608Data |
Uint8Array | Raw CEA-608 data bytes from a 'c608' MP4 track sample. |
pts |
number | PTS when this sample was received, in seconds. |
- Implements:
- Source:
getStreams() → {Array<string>}
Returns the streams that the CEA decoder found.
- Implements:
- Source:
Returns:
- Type
- Array<string>