MPEG-TS (MTS) decoder. Extracts (demuxes) the indicaated audio/video data from a MPEG-TS (MTS) data stream. You can define the relevant stream types via the API: addStreamType(MTSStreamType). By default, the decoder selects the AUDIO_AAC, AUDIO_AAC_LATM stream types.
More...
#include <CodecMTS.h>
|
| MTSDecoder ()=default |
| Default constructor.
|
|
| MTSDecoder (AudioDecoder &dec) |
| Provide the AAC decoder (or MP3 Decoder) to receive the extracted content.
|
|
virtual void | addNotifyAudioChange (AudioInfoSupport &bi) |
| Adds target to be notified about audio changes.
|
|
void | addStreamType (MTSStreamType type) |
| Defines the stream type that should be extracted.
|
|
virtual AudioInfo | audioInfo () |
| provides the actual input AudioInfo
|
|
virtual AudioInfo | audioInfoOut () |
|
bool | begin () override |
| Start the prcessor.
|
|
virtual bool | begin (AudioInfo info) override |
|
virtual void | clearNotifyAudioChange () |
| Deletes all change notify subscriptions.
|
|
void | clearStreamTypes () |
| Clears the stream type filter.
|
|
void | end () override |
| Stops the processing.
|
|
Print * | getOutput () |
|
bool | isNotifyActive () |
| Checks if the automatic AudioInfo update is active.
|
|
virtual bool | isResultPCM () |
| Returns true to indicate that the decoding result is PCM data.
|
|
bool | isStreamTypeActive (MTSStreamType type) |
| Checks if the stream type is active.
|
|
const char * | mime () |
| Provides the mime type: "video/MP2T";.
|
|
virtual | operator bool () override |
|
virtual bool | removeNotifyAudioChange (AudioInfoSupport &bi) |
| Removes a target in order not to be notified about audio changes.
|
|
void | resizeBuffer (int size) |
| Set a new write buffer size (default is 2000)
|
|
virtual void | setAudioInfo (AudioInfo from) override |
| for most decoders this is not needed
|
|
void | setNotifyActive (bool flag) |
| Deactivate/Reactivate automatic AudioInfo updates: (default is active)
|
|
void | setOutput (AudioOutput &out_stream) override |
| Defines where the decoded result is written to.
|
|
void | setOutput (AudioStream &out_stream) override |
| Defines where the decoded result is written to.
|
|
void | setOutput (Print &out_stream) override |
| Defines where the decoded result is written to.
|
|
size_t | write (const uint8_t *data, size_t len) override |
|
|
int | id |
| custom id to be used by application
|
|
|
void | addPID (uint16_t pid) |
|
void | demux () |
| demux the available data
|
|
int | findSyncWord (const uint8_t *buf, size_t nBytes, uint8_t synch=0xFF, uint8_t syncl=0xF0) |
| Finds the mp3/aac sync word.
|
|
int | getPayloadStart (uint8_t *packet, bool isPES, bool &payloadUnitStartIndicator) |
|
bool | isPESStartCodeValid (uint8_t *pes) |
| check for PES packet start code prefix
|
|
void | notifyAudioChange (AudioInfo info) |
|
bool | parse () |
| Parse a single packet and remove the processed data.
|
|
void | parsePacket (uint8_t *packet, int pid) |
| Detailed processing for parsing a single packet.
|
|
void | parsePAT (uint8_t *pat, int len) |
|
void | parsePES (uint8_t *packet, int pid) |
|
void | parsePMT (uint8_t *pmt, int len) |
|
int | syncPos () |
| Find the position of the next sync byte: Usually on position 0.
|
|
const char * | toStr (MTSStreamType type) |
| Convert the relevant MTSStreamType to a string.
|
|
void | writeBlocking (Print *out, uint8_t *data, size_t len) |
|
MPEG-TS (MTS) decoder. Extracts (demuxes) the indicaated audio/video data from a MPEG-TS (MTS) data stream. You can define the relevant stream types via the API: addStreamType(MTSStreamType). By default, the decoder selects the AUDIO_AAC, AUDIO_AAC_LATM stream types.
- Author
- Phil Schatzmann
- Copyright
- GPLv3
◆ addNotifyAudioChange()
◆ addPID()
void addPID |
( |
uint16_t |
pid | ) |
|
|
inlineprotected |
Add the PID for which we want to extract the audio data from the PES packets
◆ audioInfo()
provides the actual input AudioInfo
Implements AudioInfoSupport.
Reimplemented in CodecNOP, GGWaveDecoder, AACDecoderFDK, AACDecoderHelix, DecoderBasic, MP3DecoderHelix, MP3DecoderMAD, OpusAudioDecoder, WAVDecoder, WavIMADecoder, and OggContainerDecoder.
◆ audioInfoOut()
◆ begin() [1/2]
◆ begin() [2/2]
|
inlineoverridevirtualinherited |
◆ end()
◆ isResultPCM()
virtual bool isResultPCM |
( |
| ) |
|
|
inlinevirtualinherited |
◆ operator bool()
virtual operator bool |
( |
| ) |
|
|
inlineoverridevirtual |
◆ parsePES()
void parsePES |
( |
uint8_t * |
packet, |
|
|
int |
pid |
|
) |
| |
|
inlineprotected |
Check for ADTS
Write the data
◆ setAudioInfo()
|
inlineoverridevirtualinherited |
◆ setOutput() [1/3]
Defines where the decoded result is written to.
Reimplemented from AudioDecoder.
◆ setOutput() [2/3]
Defines where the decoded result is written to.
Reimplemented from AudioDecoder.
◆ setOutput() [3/3]
void setOutput |
( |
Print & |
out_stream | ) |
|
|
inlineoverridevirtual |
Defines where the decoded result is written to.
Reimplemented from AudioDecoder.
◆ write()
size_t write |
( |
const uint8_t * |
data, |
|
|
size_t |
len |
|
) |
| |
|
inlineoverridevirtual |
The documentation for this class was generated from the following file: