The exact same data is used by oscam to fetch caid, provid and ecmpid.
But provid is not always communicated in pmt by the provider in that case oscam zero's it too.
this code is used in dvbapi to parse it: (I stripped away already some silly stuff you dont need)
void dvbapi_parse_descriptor(int32_t demux_id, uint32_t info_length, unsigned char *buffer)
{
// int32_t ca_pmt_cmd_id = buffer[i + 5];
uint32_t descriptor_length = 0;
uint32_t j, u, k;
if(info_length < 1)
{ return; }
for(j = 0; j + 1 < info_length; j += descriptor_length + 2)
{
descriptor_length = buffer[j + 1];
if(buffer[j] != 0x09) { continue; }
if(demux[demux_id].ECMpidcount >= ECM_PIDS) { break; }
int32_t descriptor_ca_system_id = b2i(2, buffer + j + 2);
int32_t descriptor_ca_pid = b2i(2, buffer + j + 4)&0x1FFF;
int32_t descriptor_ca_provider = 0;
if(descriptor_ca_system_id >> 8 == 0x01)
{
for(u = 2; u < descriptor_length; u += 15)
{
descriptor_ca_pid = b2i(2, buffer + j + u + 2)&0x1FFF;
descriptor_ca_provider = b2i(2, buffer + j + u + 4);
dvbapi_add_ecmpid(demux_id, descriptor_ca_system_id, descriptor_ca_pid, descriptor_ca_provider);
}
}
else
{
if(caid_is_viaccess(descriptor_ca_system_id) && descriptor_length == 0x0F && buffer[j + 12] == 0x14)
{ descriptor_ca_provider = b2i(3, buffer + j + 14) &0xFFFFF0; }
if(caid_is_nagra(descriptor_ca_system_id) && descriptor_length == 0x07)
{ descriptor_ca_provider = b2i(2, buffer + j + 7); }
if((descriptor_ca_system_id >> 8 == 0x4A || descriptor_ca_system_id == 0x2710) && descriptor_length > 0x04 )
{ descriptor_ca_provider = buffer[j + 6]; }
dvbapi_add_ecmpid(demux_id, descriptor_ca_system_id, descriptor_ca_pid, descriptor_ca_provider);
}
}
@Camping: ZGemma H.2S, Technisat Multytenne 4-in-1 @Home: Edision Mini 4K, Wave Frontier T55, EMP Centauri EMP DiSEqC 8/1 switch, 4x Inverto Ultra Black single LNB