DvbDream Community

- No topics related to illegal ways of watching TV ! -
It is currently Thu May 23, 2013 11:58 am

All times are UTC - 7 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Thu Jul 16, 2009 8:42 pm 
Offline
Just can't stay away

Joined: Sun Jun 28, 2009 11:58 pm
Posts: 28
I would like to retrieve the polarization of the channel being tuned. I tried doing this but I am getting the polarization of the previous channel instead of the channel being tuned. Any ideas of how I can solve this problem? Thanks.

Code:
int __stdcall BeforeChannelChange (TChannelInfo *pChannelInfo)
{
     TTransponderInfo trans_info;  // '0' is Horizontal and '1'is Vertical
     trans_info.dwSize = sizeof TTransponderInfo;
     SendMessage(hwndDD, WM_MODULE_MSG, DDMODAPI_GET_TRANSPONDER_INFO, (LPARAM)&trans_info);

     char szBuf[100];
     wsprintf(szBuf, "Sat Position: %d\nPolarization: %d\n", pChannelInfo->wSatPos, trans_info.Pol);
     MessageBox(hwndDD, szBuf, "Notice", MB_OK);

     return FALSE;
}

_________________
TBS 6920 PCI-Express DVB-S/DVB-S2, Driver Version: 1.0.5.1
Windows Vista Business SP2 32bit
Gigabyte GA-MA780G-UD3H
ATI HD4550
AMD Athlon 64 X2 6000+ 3.0GHz
4gb of ram
DVBdream 2.2c OEM


Top
 Profile  
 
 Post subject:
PostPosted: Sun Aug 02, 2009 6:34 am 
Offline

Joined: Tue Oct 21, 2008 4:45 pm
Posts: 2
Been a while since i last worked with dvbdreams api - but i think DDMODAPI_GET_TRANSPONDER_INFO is supposed to return info for the previous channel in BeforeChannelChange, as Before suggests the channel change did not yet happen. Instead you should look for the info in the supplied pChannelInfo parameter. or retrieve the channel corresponding to pChannelInfo from the channel list if TChannelInfo doesn't include all channel information (can't remember)


Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 03, 2009 7:58 pm 
Offline
Just can't stay away

Joined: Sun Jun 28, 2009 11:58 pm
Posts: 28
Goldeneye wrote:
Been a while since i last worked with dvbdreams api - but i think DDMODAPI_GET_TRANSPONDER_INFO is supposed to return info for the previous channel in BeforeChannelChange, as Before suggests the channel change did not yet happen. Instead you should look for the info in the supplied pChannelInfo parameter. or retrieve the channel corresponding to pChannelInfo from the channel list if TChannelInfo doesn't include all channel information (can't remember)


I thought about getting the Polarization from pChannelInfo but the structure does not include the Polarization for the channel. It includes the Satellite Position, but does not include the Polarization.

// Channel Info
typedef struct
{
DWORD dwSize;
WORD wNID;
WORD wSID;
WORD wSatPos;
DWORD dwChId;
char ChName[64];
char Provider[64];
BYTE ChType;
BYTE Scrambled;
WORD wVideo;
WORD wPMT;
WORD wPCR;
WORD wTTX;
TAudioInfo Audio;
TCAInfo ECM;
TCAInfo EMM;
WORD wChNo;
}TChannelInfo, *PChannelInfo;

_________________
TBS 6920 PCI-Express DVB-S/DVB-S2, Driver Version: 1.0.5.1
Windows Vista Business SP2 32bit
Gigabyte GA-MA780G-UD3H
ATI HD4550
AMD Athlon 64 X2 6000+ 3.0GHz
4gb of ram
DVBdream 2.2c OEM


Top
 Profile  
 
 Post subject:
PostPosted: Sun Aug 09, 2009 7:14 am 
Offline

Joined: Tue Oct 21, 2008 4:45 pm
Posts: 2
Oh didn't remember the TChannelInfo is not the same as the channel list entry (TChlChannel).
But you can use the dwChId of TChannelInfo to look up the channel list entry.

get pointer to channel list:
PCHL myChlP;
SendMessage(hwndDD, WM_MODULE_MSG, DDMODAPI_CHL_GET_POINTER, (LPARAM)&myChlP);

and read the polarisation
BYTE pol = myChlP->Channels[pChannelInfo->dwChId].Pol;


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group