daffy Posted October 17, 2003 Share Posted October 17, 2003 Looking at the SDK samples, it seems as if "OSDDisplay" is something that DVBViewer looks for. Alas, the expected signature "OSDDisplay" is not documented in the SDK docs and neither is the meaning of all passed parameters. Quote Link to comment
Guest hackbart Posted October 20, 2003 Share Posted October 20, 2003 Hmm, the sdk is a bit outdated. Each time Griga needs something, or i want to outsource a few things i add some missing things.. Try to use this: type TOSDStart = record Width, Height: Word; end; POSDStart = ^TOSDStart; TOSDDraw = record x: Word; y: Word; Sizex: Word; Sizey: Word; Color: TColor; end; POSDDraw = ^TOSDDraw; TOSDSetFont = record Size: Word; Fg_Color: TColor; Bg_Color: TColor; end; POSDSetFont = ^TOSDSetFont; TOSDSetText = record x: Word; y: Word; Caption: array[0..127] of char; end; POSDSetText = ^TOSDSetText; const MSG_STARTOSD = $2000; MSG_STOPOSD = $2001; MSG_DRAWBLOCK = $2002; MSG_SETFONT = $2003; MSG_SETTEXT = $2004; e.g.: SendMessage(DVBVHandle,WM_DVBVIEWER,MSD_DRAWBLOCK,@OSDDraw); To change the OSD Display Look and Feel you might look for these routines: type TOSDType = (otMenu,otEPG,otEPGInfo,otDuration); TActionRecord = record caption: String; Id: Integer; end; TActionArray = array[0..3] of TActionRecord; TListArray = array[0..22] of TActionRecord; procedure OSDDisplay (Handle:THandle;Rect:TRect;Typ:TOSDType;Data:TListArray;Buttons:TActionArray;Sel ected:integer);stdcall; procedure OSDAspect (Rect:TRect;Typ: TOSDType;Var AspectX,AspectY:Double;Var DivFactor:Byte;Var SuggestedX,SuggestedY,OSDEpp:Integer);stdcall; function OSDExecute (Entry:TActionRecord):Boolean;stdcall; procedure OSDAddEntries(NodeLevel:integer;Var Entries:TListArray;Var Action:TActionArray);stdcall; These routines are a bit ugly to play with, so i'm not sure if you figure it out Christian Quote Link to comment
Guest Lars_MQ Posted May 7, 2004 Share Posted May 7, 2004 (edited) So heb ich diesen leicht angestaubten thread nochmal nach vorne und hijacke ihn Ich hab mich mit dem OSD mal etwas beschäftigt und bekomme mit den messages das auch schon hin. Das berüchtigte "Hello World" zeigt der DVBViewer Aber die OSD Anzeige erscheint sehr verzögert (20 - 30 sec.) oder wenn man ein anderes OSD aufruft, ist das gewollt? [Edit] Nach weiterem probieren tritt die verzögerung nur bei vmr7 + 9 auf... [/Edit] procedure OSDDisplay (Handle:THandle;Rect:TRect;Typ:TOSDType;Data:TListArray;Buttons:TActionArray;Selected:integer);stdcall; procedure OSDAspect (Rect:TRect;Typ: TOSDType;Var AspectX,AspectY:Double;Var DivFactor:Byte;Var SuggestedX,SuggestedY,OSDEpp:Integer);stdcall; function OSDExecute (Entry:TActionRecord):Boolean;stdcall; procedure OSDAddEntries(NodeLevel:integer;Var Entries:TListArray;Var Action:TActionArray);stdcall; These routines are a bit ugly to play with, so i'm not sure if you figure it out Für die routinen schein ich etwas neben der rolle zu stehen. Ich krieg sie nicht gebacken, das gilt auch für das (unvollständige) OSD-Demo im SDK... Vielleicht gibt es hier einen netten menschen, der mir eine Erleuchtung verschafft :-) Also nur nen schupps in die richtige richtung... vielen Dank schonmal Lars Edited May 8, 2004 by Lars_MQ Quote Link to comment
Guest hackbart Posted May 11, 2004 Share Posted May 11, 2004 Also prinzipiell kann das komplette OSD von einem Programm übernommen werden. Das zeichne Text und Rechtecke geht zwar auch, ist aber nur für Debugging Zwecke eingebaut wurden. OSDDisplay: procedure(Handle: THandle; Rect: TRect; Typ: TOSDType; Data: TListArray; Buttons: TActionArray; Selected: integer); stdcall; OSDAspect: procedure(Rect: TRect; Typ: TOSDType; var AspectX, AspectY: Double; var DivFactor: Byte; var SuggestedX, SuggestedY, OSDEpp: Integer); stdcall; OSDExecute: function(Entry: TActionRecord): Boolean; stdcall; OSDAddEntries: procedure(NodeLevel: integer; var Entries: TListArray; var Action: TActionArray); stdcall; TOSDType = (otMenu,otEPG,otEPGInfo,otDuration); TActionRecord = record caption: String; <- wird aber heute noch pchar Id: Integer; end; TActionArray = array[0..3] of TActionRecord; TListArray = array[0..22] of TActionRecord; Christian Quote Link to comment
erwin Posted June 7, 2004 Share Posted June 7, 2004 const MSG_STARTOSD = $2000; MSG_STOPOSD = $2001; MSG_DRAWBLOCK = $2002; MSG_SETFONT = $2003; MSG_SETTEXT = $2004; e.g.: SendMessage(DVBVHandle,WM_DVBVIEWER,MSD_DRAWBLOCK,@OSDDraw); Was ist hier der Parameter DVBVHandle, woher bekomme ich ihn? Sorry aber ich versuche mich in C++ und die SDK-Beschreibung ist wirklich dürftig. Wisst ihr selbst aber andere Dinge gehen halt vor. Gruß Erwin. Quote Link to comment
Guest hackbart Posted June 10, 2004 Share Posted June 10, 2004 Nun das stimmt - Asche auf mein Haupt Das SDK habe ich bis jetzt eher stiefmütterlich behandelt und dementsprechend auch lange nicht mehr aktualisiert. Prinzipiell bin ich aber was Anfragen via eMail über bestimmte Dinge angeht recht fix.. Also zum auslesen des Handles kannst du zum einen FindWindow(NULL, "DVBViewer") benutzen oder aber über die Plugin Funktion: void __stdcall SetAppHandle(int *Handle; TRebuildfunc *RebuildFunc); Christian Quote Link to comment
erwin Posted June 11, 2004 Share Posted June 11, 2004 Nun das stimmt - Asche auf mein Haupt Das SDK habe ich bis jetzt eher stiefmütterlich behandelt und dementsprechend auch lange nicht mehr aktualisiert. Prinzipiell bin ich aber was Anfragen via eMail über bestimmte Dinge angeht recht fix.. Also zum auslesen des Handles kannst du zum einen FindWindow(NULL, "DVBViewer") benutzen oder aber über die Plugin Funktion: void __stdcall SetAppHandle(int *Handle; TRebuildfunc *RebuildFunc); Christian Hallo! Bin nach einer Weile selbst auf SetAppHandle gestossen und habe gemutmaßt der erste Param könnte es sein. Ausprobiert und siehe es klappte. Habe mich dann doch ein wenig geschämt, die Frage mußte nicht sein. Allerdings fehlt mir nach wie vor sowas wie ein Prototyp für TRebuildfunc - müßte ich ja irgenwie deklarieren egal ob Delphi oder C++. Hab inzwischen auch einige interessante Versuche gemacht (z.B. Fonts in den TListViews alias Recorder und EPG vergrößert - vom Sofa aus sind mir diese auf dem TV zu klein ). Allerdings bisher nichts abschließend Brauchbares. Was FindWindow() angeht so war dies bisher recht brauchbar bei meinen Versuchen den DVBViewer in myHTPC via myHTPC-Plugin einzubinden. Dann ist ja eine fast komplette Fernsteuerung des DVBViewers über die ac*-Kommandos möglich. Dieser Remote-Teil des SDK ist ja auch verständlich dargestellt. Allerdings wenns in die Innereien geht d.h. Zugriff aufs Wesentliche wie den Stream-Inhalten und deren Manipulation ... (-; Ich komme deshalb bestimmt auf dein eMail Angebot zurück. mfG Erwin Quote Link to comment
Guest Lars_MQ Posted June 11, 2004 Share Posted June 11, 2004 (edited) Hallo Erwin, die void __stdcall TRebuildFunc (PTuner Tuner) typedef struct { char TunerType; DWORD Frequency; DWORD SymbolRate; DWORD LNB; UINT ECM; char Unused; char AC3; DWORD FEC; DWORD Polarity; //| Modulation |GuardInterval DWORD LNBSelection; DWORD DiSEqC; DWORD AudioPid; DWORD VideoPid; DWORD TelePid; DWORD ServiceID; } findest Du auf jedenfall in den (veralteten) SDK-Dokus :-) In delphi und in C Gruss Lars Edited June 11, 2004 by Lars_MQ Quote Link to comment
erwin Posted June 15, 2004 Share Posted June 15, 2004 Hallo Erwin, die void __stdcall TRebuildFunc (PTuner Tuner) typedef struct { char TunerType; DWORD Frequency; DWORD SymbolRate; DWORD LNB; UINT ECM; char Unused; char AC3; DWORD FEC; DWORD Polarity; //| Modulation |GuardInterval DWORD LNBSelection; DWORD DiSEqC; DWORD AudioPid; DWORD VideoPid; DWORD TelePid; DWORD ServiceID; } findest Du auf jedenfall in den (veralteten) SDK-Dokus :-) In delphi und in C Gruss Lars Danke für den Hinweis. In der Doku ist tatsächlich zu finden: TRebuildFunc=procedure (Tuner:PTuner);stdcall; void __stdcall TRebuildFunc (PTuner Tuner) Ohne jetzt jemanden zu nahe treten zu wollen, aber wäre die korrekte Umsetzung der ersten Zeile nach C nicht typedef void ( __stdcall * TRebuildFunc )( TTuner * tuner ); gewesen? void __stdcall TRebuildFunc (PTuner Tuner) verstehe ich als eine im Pluginn (optional) zu implementierende Funktion und nicht als Type-Deklaration. Vielleicht daher meine Begriffstutzigkeit? mfG Erwin Quote Link to comment
Guest hackbart Posted June 15, 2004 Share Posted June 15, 2004 ja das stimmt schon.. Wichtig ist nur, dass alle Funktionen vom Typ stdcall sind. Übrigens der Tuner struct ist ein bissel aktualisiert worden: TTuner = record TunerType: TTunerType; Frequency: DWord; SymbolRate: DWord; LNB: Word; PMT: Word; Unused1: Word; Unused2: Byte; AC3: Byte; FEC: Word; Unused3: Word; Polarity: Word; //or Modulation or GuardInterval Unused4: Word; LNBSelection: Word; Unused5: Word; Diseqc: Word; Unused6: Word; AudioPID: Word; Unused7: Word; VideoPID: Word; TransportStreamID: Word; telePID: Word; NetworkID: Word; SID: Word; PCRPID: Word; end; Christian Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.