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 1
1
//
2
2
// 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.
4
5
//
5
6
6
7
#include " AudioTools.h"
7
8
#include " AudioTools/AudioLibs/HLSStream.h"
8
9
#include " AudioTools/AudioCodecs/CodecHelix.h"
10
+ #include " AudioTools/AudioCodecs/CodecMTS.h"
9
11
#include " AudioTools/Concurrency/RTOS.h"
10
12
// #include "AudioTools/AudioLibs/AudioBoardStream.h"
11
13
@@ -18,6 +20,8 @@ HLSStream hls_stream("ssid", "password");
18
20
// decoder
19
21
MP3DecoderHelix mp3;
20
22
AACDecoderHelix aac;
23
+ MTSDecoder mts (aac); // MPEG-TS (MTS) decoder
24
+
21
25
MultiDecoder multi (hls_stream); // MultiDecoder using mime from hls_stream
22
26
EncodedAudioOutput dec (&out, &multi);
23
27
@@ -39,6 +43,7 @@ void setup(void) {
39
43
40
44
multi.addDecoder (mp3, " audio/mpeg" );
41
45
multi.addDecoder (aac, " audio/aac" );
46
+ multi.addDecoder (mts, " video/MP2T" ); // MPEG-TS
42
47
43
48
auto cfg = out.defaultConfig (TX_MODE);
44
49
out.begin (cfg);
You can’t perform that action at this time.
0 commit comments