File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
examples/examples-communication/hls/hls-buffer-i2s Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 11//
22// Buffered playback of HLSStream: activate PSRAM!
3- // We use a MultiDecoder to handle different formats
3+ // We use a MultiDecoder to handle different formats.
4+ // For HLS you need to set the log level to Warning or higher.
45//
56
67#include " AudioTools.h"
78#include " AudioTools/AudioLibs/HLSStream.h"
89#include " AudioTools/AudioCodecs/CodecHelix.h"
10+ #include " AudioTools/AudioCodecs/CodecMTS.h"
911#include " AudioTools/Concurrency/RTOS.h"
1012// #include "AudioTools/AudioLibs/AudioBoardStream.h"
1113
@@ -18,6 +20,8 @@ HLSStream hls_stream("ssid", "password");
1820// decoder
1921MP3DecoderHelix mp3;
2022AACDecoderHelix aac;
23+ MTSDecoder mts (aac); // MPEG-TS (MTS) decoder
24+
2125MultiDecoder multi (hls_stream); // MultiDecoder using mime from hls_stream
2226EncodedAudioOutput dec (&out, &multi);
2327
@@ -39,6 +43,7 @@ void setup(void) {
3943
4044 multi.addDecoder (mp3, " audio/mpeg" );
4145 multi.addDecoder (aac, " audio/aac" );
46+ multi.addDecoder (mts, " video/MP2T" ); // MPEG-TS
4247
4348 auto cfg = out.defaultConfig (TX_MODE);
4449 out.begin (cfg);
You can’t perform that action at this time.
0 commit comments