3 #include "AudioConfig.h"
4 #include "AudioTools/CoreAudio/AudioTypes.h"
5 #include "AudioTools/CoreAudio/AudioStreams.h"
6 #include "AudioTools/CoreAudio/AudioHttp/HttpRequest.h"
7 #include "MetaDataICY.h"
8 #include "MetaDataID3.h"
35 if (meta!=
nullptr)
delete meta;
44 #ifdef USE_URL_ARDUINO
50 int metaInt = icySetup.
setup(http);
57 virtual void begin(
int iceMetaint=0) {
58 LOGD(
"%s: %d", LOG_METHOD, iceMetaint);
59 if (callback!=
nullptr){
60 if (meta ==
nullptr) {
61 #if defined(USE_URL_ARDUINO)
67 meta->setCallback(callback);
68 meta->setIcyMetaInt(iceMetaint);
71 LOGI(
"callback not defined -> not Metadata processing")
76 if (callback!=
nullptr && meta !=
nullptr) {
83 virtual size_t write(
const uint8_t *data,
size_t len){
84 LOGD(
"%s: %d", LOG_METHOD, (
int)len);
86 if (callback!=
nullptr){
89 if (meta->write(data, len)!=len){
90 LOGE(
"Did not write all data");
100 virtual size_t write(uint8_t c) {
101 LOGE(
"Not Supported");
106 AbstractMetaData *meta=
nullptr;
107 void (*callback)(
MetaDataType info,
const char* str,
int len)=
nullptr;
113 using MetaDataPrint = MetaDataOutput;