21 unsigned short streamTag)
22 : m_carouselId(dii->m_downloadId), m_moduleId(
info->m_moduleId),
23 m_streamId(streamTag), m_version(
info->m_moduleVersion),
24 m_moduleSize(
info->m_moduleSize),
26 m_descriptorData(
info->m_modInfo.m_descriptorData)
30 m_blocks.resize(num_blocks,
nullptr);
45 const unsigned char *data)
49 LOG(VB_DSMCC, LOG_WARNING, QString(
"[dsmcc] Module %1 my version %2 != %3")
59 LOG(VB_DSMCC, LOG_WARNING, QString(
"[dsmcc] Module %1 block number %2 "
71 s += block ?
'+' :
'X';
73 LOG(VB_DSMCC, LOG_INFO, QString(
"[dsmcc] Module %1 block %2 dup: %3")
84 LOG(VB_DSMCC, LOG_INFO, QString(
"[dsmcc] Module %1 block %2/%3 bytes %4/%5")
92 LOG(VB_DSMCC, LOG_INFO,
93 QString(
"[dsmcc] Reconstructing module %1 from blocks")
98 if (tmp_data ==
nullptr)
104 if (block ==
nullptr)
106 LOG(VB_DSMCC, LOG_INFO,
107 QString(
"[dsmcc] Null data found, aborting reconstruction"));
111 uint size = block->size();
112 memcpy(tmp_data + curp, block->data(), size);
122 LOG(VB_DSMCC, LOG_INFO, QString(
"[dsmcc] uncompressing: "
123 "compressed size %1, final size %2")
126 auto *uncompressed = (
unsigned char*) malloc(dataLen);
127 int ret = uncompress(uncompressed, &dataLen, tmp_data,
m_moduleSize);
130 LOG(VB_DSMCC, LOG_ERR,
"[dsmcc] compression error, skipping");
137 tmp_data = uncompressed;
148 for (
const auto & cache :
m_Cache)
154 unsigned short streamTag)
172 LOG(VB_DSMCC, LOG_DEBUG, QString(
"[dsmcc] Already Know Module %1")
173 .arg(
info->m_moduleId));
183 LOG(VB_DSMCC, LOG_ERR,
184 QString(
"[dsmcc] Module %1 size has changed (%2 to %3) "
185 "but version has not!!")
186 .arg(
info->m_moduleId)
187 .arg(
info->m_moduleSize)
191 LOG(VB_DSMCC, LOG_INFO, QString(
"[dsmcc] Updated Module %1")
192 .arg(
info->m_moduleId));
204 LOG(VB_DSMCC, LOG_INFO, QString(
"[dsmcc] Saving info for module %1")
209 int tag =
info->m_modInfo.m_tap.m_assocTag;
210 LOG(VB_DSMCC, LOG_DEBUG, QString(
"[dsmcc] Module info tap identifies "
211 "tag %1 with carousel %2")
212 .arg(tag).arg(cachep->CarouselId()));
215 status->
AddTap(tag, cachep->CarouselId());
229 LOG(VB_DSMCC, LOG_DEBUG, QString(
"[dsmcc] Data block on carousel %1").arg(
m_id));
234 if (cachep->CarouselId() ==
m_id &&
238 unsigned char *tmp_data = cachep->AddModuleData(ddb, data);
242 unsigned int len = cachep->DataSize();
243 unsigned long curp = 0;
244 LOG(VB_DSMCC, LOG_DEBUG, QString(
"[biop] Module size (uncompressed) = %1").arg(len));
260 LOG(VB_DSMCC, LOG_INFO, QString(
"[dsmcc] Data block module %1 not on carousel %2")