Page 1 of 1

Probs while programming a new DD Network remote control

Posted: Thu Nov 16, 2006 9:52 am
by ScanMan
I want to solve the prob having no remote possibilities on the client while streaming from DD on my server to e.g. VLC. on my notebook.

Therefore i programmed 2 little tools: A simple remote (all 47 keys) control working on the client as a stand-alone application and a little modul for DD to receive the rc-commands.

All keys will reflected by DD - except those 3:
RMT_OK = $00000011 is not responsed by DD
RMT_DOWN = $0000000E and RMT_UP = $0000000D rults in an ERROR !
What a pitty - the most urgent keys...

An other idea was to transfer the channel-list to the rc`for having a better programm-selection on the client. I did it like describe in the sample (for DELPHI).
When i install DD new (1.3 and 1.3a), copy my mod to the mod-dir, DD starts without any negative comment.
But when channels are scanned new, i got a little error window 'Out of memory'. The same, when i restart DD.

I'm using the newest SDK 1.7 and progging is DELPHI 6.

@rel
Is it neccessary to send you my 2 little tools to see whats happening in DD ?

Posted: Thu Nov 16, 2006 11:10 am
by rel
RMT_OK = $00000011 is not responsed by DD
what response do you expect? OK button is not assigned to any feature. There is no OSD channel list yet.
RMT_DOWN = $0000000E and RMT_UP = $0000000D rults in an ERROR !
what does error say?

Is it neccessary to send you my 2 little tools to see whats happening in DD ?
yes, rreloc at yahoo.com , send with source, so I can point it out where the problem is.

Posted: Thu Nov 16, 2006 12:32 pm
by ScanMan
You have mail !
:D ScanMan

Posted: Fri Nov 17, 2006 8:18 am
by rel
thanks, I will try to check it and let you know.

* I'm going to move this message to "Module programming" section of the forum, since it is related to development

Posted: Fri Nov 17, 2006 11:12 am
by rel

Code: Select all

function OnDDEvent(EventType: DWORD; EventParams: PWndMessage): BOOL; stdcall; export;

Type of EventParams parameter was wrong. It is not a window message, just a untyped parameter ('pointer' type is used in the SDK samples) You must typecast it according the EVENT code sent by DD . (in 'case' block)

Here is the fixed routine:

Code: Select all

function OnDDEvent(EventType: DWORD; EventParams: Pointer): BOOL; stdcall; export;
var
S : string;
begin
case EventType of
DDEVENT_ON_VOLUME_CHANGE : // Pointer to integer
begin
S := 'VOL ' + inttostr(PInteger(EventParams)^);
fmain.ListLastCMD(S);
end;
DDEVENT_ON_KEYBOARD : // Pointer to integer
begin
fmain.ListLastCMD('KEY ' + inttostr(PInteger(EventParams)^));
end;
DDEVENT_ON_REMOTE : // Pointer to integer
begin
fmain.ListLastCMD('REM ' + inttostr(PInteger(EventParams)^));
end;
DDEVENT_ON_WINDOW_NOTIFICATION_MSG : // Pointer to TWndMessage structure
begin
fmain.ListLastCMD('WNM ' + inttostr(PWndMessage(EventParams)^.Msg));
end;
DDEVENT_ON_CH_BROWSE : // Just integer !
begin
fmain.ListLastCMD('CHB ' + inttostr(Integer(EventParams)));
end;
end;

result := false;
end;



There was a problem related to RMT_OK inside the DD. I have fixed it. (v1.3b)
Other empty Remote codes do not have functionality yet. (thought for future OSD improvements with menu system etc.)


Sorry, the parameters for event types are not well documented in SDK, so you cant get much help there but this forum section is for that. You can ask everything you need to know here.


btw, nice module (from my preview). I guess the users who use streaming will like it when you release it. (You can post it here on the forum for beta tests if you would like.)

Posted: Sat Nov 18, 2006 4:11 am
by ScanMan
THX a lot !
Now it works - no more errors when programm changes. It must depend on that the returned code is an integer and not a pointer.
Looks a little bit curios, but doesn't matter... displaying the result codes is literal only for viewing if/how it works.
Another step to get a good working mod.
:D ScanMan