DvbDream Community

- No topics related to illegal ways of watching TV ! -
It is currently Tue Jun 18, 2013 7:06 pm

All times are UTC - 7 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Fri Sep 19, 2008 6:51 am 
Offline

Joined: Fri Sep 19, 2008 6:34 am
Posts: 2
Hi,

I need some help.
What params takes Callback function (dwHookProc) for filters started with DDMODAPI_START_FILTER command?

_________________
DVB: TT-3200 PCI
OS: W7 x86
GPU: ATI 3550 PCIe
CPU: Intel Core 2 Duo E6550
MB: Gigabyte G33-DS2R


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 22, 2008 6:13 am 
Offline
Not too shy to talk

Joined: Thu May 15, 2008 10:22 am
Posts: 10
Something like that:

function HP0012(Buf: PByteArray; Len: Longint; hFilter: DWORD): BOOL; stdcall;
begin
if not Stop0012 then
begin
BlockWrite(File0012, Buf[0], Len);
Inc(RecSize0012, Len);
end;
Result:= True;
end;

procedure TFormMain.StartParse;
var
_R: Integer;
_FileName: String;
begin
_FileName:= ExtractFilePath(ParamStr(0)) + 'Modules\file.0012';
AssignFile(File0012, _FileName);
Rewrite(File0012, 1);
Stop0012:= False;

ZeroMemory(@Sfp0012, SizeOf(Sfp0012));
Sfp0012.dwSize:= SizeOf(Sfp0012);
Sfp0012.wFilterType:= FT_TSFULL;
Sfp0012.wPID:= $0012;
Sfp0012.bIgnoreDublicates:= False;
Sfp0012.dwHookProc:= @HP0012;
Sfp0012.Description:= 'this0012';
_R:= SendMessage(DDHwnd, WM_MODULE_MSG, DDMODAPI_START_FILTER, Integer(@Sfp0012));


Top
 Profile  
 
 Post subject:
PostPosted: Sat Sep 27, 2008 10:58 am 
Offline

Joined: Fri Sep 19, 2008 6:34 am
Posts: 2
Thanks!

I want to send Control Words to DD with DDMODAPI_DVB_COMMAND. Found TDVBCommand struct, but on MDAPI is different and i used this:

//SAA_COMMAND : array [00..15] of Byte=(7,0,$10,1,5,0,0,0,0,0,0,0,0,0,0,0);

unsigned short DVBSetDescrCmd = 0x0110; // or 010A for Linux_9_4_01_04

void SendCW(const unsigned char* cw)
{
TDVB_COMMAND dvb;
unsigned char *p;

dvb.Cmd_laenge = 0x0007;
dvb.Cmd_Buffer[0] = DVBSetDescrCmd;
dvb.Cmd_Buffer[1] = 0x0005;
p = (unsigned char*)&(dvb.Cmd_Buffer[3]);

dvb.Cmd_Buffer[2] = 0x0000;
p[1] = cw[0];
p[0] = cw[1];
p[3] = cw[2];
p[2] = cw[3];
p[5] = cw[4];
p[4] = cw[5];
p[7] = cw[6];
p[6] = cw[7];

::SendMessage(m_MultiDecWindow, WM_USER, MDAPI_DVB_COMMAND,(LPARAM)&dvb);

dvb.Cmd_Buffer[2] = 0x0001;
p[1] = cw[8];
p[0] = cw[9];
p[3] = cw[10];
p[2] = cw[11];
p[5] = cw[12];
p[4] = cw[13];
p[7] = cw[14];
p[6] = cw[15];

::SendMessage(m_MultiDecWindow, WM_USER, MDAPI_DVB_COMMAND,(LPARAM)&dvb);
}

How this works on DD ?

_________________
DVB: TT-3200 PCI
OS: W7 x86
GPU: ATI 3550 PCIe
CPU: Intel Core 2 Duo E6550
MB: Gigabyte G33-DS2R


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

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 0 guests


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