I am not sure if getExtensionTable gives you the bouquet_id.
FYI: I needed to run some code that scans BAT from epgcache and getTableIdExtension() gives me the correct bouquet_id on 28.2e from the LongCrcSection otcs(d)
void eEPGCache::channel_data::OPENTV_ChannelsSection(const uint8_t *d)
{
OpenTvChannelSection otcs(d);
#ifdef OPENTV_CHANNELS_DEBUG
eDebug("[eEPGCache] OpenTV: BouquetId %d", otcs.getTableIdExtension());
#endif
for (OpenTvChannelListConstIterator channel = otcs.getChannels()->begin(); channel != otcs.getChannels()->end(); ++channel)
{
#ifdef OPENTV_CHANNELS_DEBUG
eDebug("[eEPGCache] OpenTV: found %d channelId %d %x:%x:%x:%x lcn %d region-flag:id %x:%d",
otcs.getChannelsListSize(),
(*channel)->getChannelId(),
(*channel)->getServiceId(),
(*channel)->getTransportStreamId(),
(*channel)->getOriginalNetworkId(),
(*channel)->getServiceType(),
(*channel)->getChannelNumber(),
(*channel)->getRegionFlag(),
(*channel)->getRegionId());
#endif
if (m_OPENTV_channels_map.find((*channel)->getChannelId()) == m_OPENTV_channels_map.end())
{
struct opentv_channel otc;
otc.originalNetworkId = (*channel)->getOriginalNetworkId();
otc.transportStreamId = (*channel)->getTransportStreamId();
otc.serviceId = (*channel)->getServiceId();
otc.serviceType = (*channel)->getServiceType();
m_OPENTV_channels_map[(*channel)->getChannelId()] = otc;
#ifdef OPENTV_CHANNELS_DEBUG
eDebug("[eEPGCache] OpenTV: ..add >> channelId %d %x found %d",
(*channel)->getChannelId(), otc.serviceId, m_OPENTV_channels_map.size());
#endif
}
}
OPENTV_checkCompletion(otcs.getCrc32());
}
[eEPGCache] OpenTV: BouquetId 4096
[eEPGCache] OpenTV: BouquetId 4097
[eEPGCache] OpenTV: BouquetId 4098
[eEPGCache] OpenTV: BouquetId 4099
[eEPGCache] OpenTV: BouquetId 4100
[eEPGCache] OpenTV: BouquetId 4101
[eEPGCache] OpenTV: BouquetId 4102
[eEPGCache] OpenTV: BouquetId 4103
[eEPGCache] OpenTV: BouquetId 4104
[eEPGCache] OpenTV: BouquetId 4105
[eEPGCache] OpenTV: BouquetId 4106
[eEPGCache] OpenTV: BouquetId 4107
[eEPGCache] OpenTV: BouquetId 4108
[eEPGCache] OpenTV: BouquetId 4109
[eEPGCache] OpenTV: BouquetId 4110