Page 1 of 1

How to get/set plp via C++

PostPosted: Fri Sep 03, 2021 11:16 pm
by gianlucabruni
Hi
My name is Gianluca Bruni, I am from Italy (Prato)
I am a C++ programmer on Windows platforms.
I developed from several years a software in C++ (windows) mediacenter that I use at home to watch TV and movies, etc.
Now, with this new DVBT2 card, I'd like to know how to set/get plp to use new dvbt2 stream (I live in Italy, and new DVBT2 format will be available in next months, no one knows when!!)
By reading some posts, I have tried to do that:

int GetDVBT2PLP(IBaseFilter **tFilt,PLP_INFO *plp)
{
IBaseFilter *pTunerFilter;
IKsPropertySet *pPropertySet;
DWORD TypeSupport=0;
HRESULT hr = S_OK;
unsigned long BytesRead=1;
IEnumPins* pPinEnum = NULL;
int i;

ZeroMemory(plp,sizeof(PLP_INFO));

pTunerFilter = tFilt[TUNERDEVICE]; // This is the filter TBS 6281 DVB-T/T2 Tuner 0 or 1
...
// try to get pPropertySet by a filter pin ...
pTunerFilter->EnumPins(&pPinEnum);
if (pPinEnum)
{
IPin* pPin=NULL;
while ((pPropertySet == NULL) && (pPinEnum->Next(1, &pPin, NULL) == S_OK))
{
hr = pPin->QueryInterface(IID_IKsPropertySet, (void **) &pPropertySet);
pPin->Release();
}
pPinEnum->Release();
}

if (pPropertySet)
{
hr = pPropertySet->Get(KSPROPSETID_BdaTunerExtensionProperties,KSPROPERTY_BDA_PLPINFO,plp,sizeof(PLP_INFO),plp,sizeof(PLP_INFO),&BytesRead);

for (i = 0; i < plp->plpCount; i++)
logger.LogMessage(hr,LOG_INFO," plpId %d %d",i,plp->plpIdList[i]);
pPropertySet->Release();
// here you will got the plp info form the drivers. "plpCount" the value mean how many plp id on this frequency.
// plplist[] store the plp id.
return plp->plpCount;
}
return -1;
}

This is what I get:

03/09/2021 16:44:14:541 [INFO] - pPropertySet->Get plpCount 235
03/09/2021 16:44:14:556 [INFO] - plpId 0 144
03/09/2021 16:44:14:572 [INFO] - plpId 1 144
03/09/2021 16:44:14:611 [INFO] - plpId 2 144
03/09/2021 16:44:14:626 [INFO] - plpId 3 144
03/09/2021 16:44:14:650 [INFO] - plpId 4 139
03/09/2021 16:44:14:673 [INFO] - plpId 5 255
03/09/2021 16:44:14:705 [INFO] - plpId 6 85
03/09/2021 16:44:14:720 [INFO] - plpId 7 139
03/09/2021 16:44:14:744 [INFO] - plpId 8 236
03/09/2021 16:44:14:759 [INFO] - plpId 9 86
03/09/2021 16:44:14:783 [INFO] - plpId 10 87
03/09/2021 16:44:14:798 [INFO] - plpId 11 139
03/09/2021 16:44:14:822 [INFO] - plpId 12 125
03/09/2021 16:44:14:845 [INFO] - plpId 13 8
03/09/2021 16:44:14:869 [INFO] - plpId 14 139
03/09/2021 16:44:14:884 [INFO] - plpId 15 71
03/09/2021 16:44:14:908 [INFO] - plpId 16 16
03/09/2021 16:44:14:923 [INFO] - plpId 17 139
03/09/2021 16:44:14:947 [INFO] - plpId 18 112
03/09/2021 16:44:14:970 [INFO] - plpId 19 32
03/09/2021 16:44:14:994 [INFO] - plpId 20 3
03/09/2021 16:44:15:009 [INFO] - plpId 21 119
03/09/2021 16:44:15:033 [INFO] - plpId 22 12
....
All these pids are non sense for me.


Is my code correct or am I missing something?

Regards
Gianluca Bruni

Re: How to get/set plp via C++

PostPosted: Mon Sep 06, 2021 10:44 am
by smile
Hi
what is the cards you used? is it TBS6281? the card have not support the interface. you need use our new series of cards. such as TBS6281se.

Thanks
Best Regards

Re: How to get/set plp via C++

PostPosted: Fri Sep 24, 2021 4:19 pm
by gianlucabruni
Ah sorry, I use TBS6281SE
For now, I am able to see HEVC test program but I need to know the correct procedure do set/get pls, in order to be ready when dvbt2 channels will became available.
Thank you for your answer

Re: How to get/set plp via C++

PostPosted: Fri Sep 24, 2021 8:26 pm
by gianlucabruni
I have found the source code example in a similar post in this forum for tbs 6205 card.