mohammad izadpanah Posted November 8, 2019 Share Posted November 8, 2019 Hi dears Can anyone explain how to create new plugin for dvbdream or DVBViewer in multi steps like this? step 1: user must use which language( like C or C# or visual c#)? step 2: user writes codes in which software? step 3: How the user learn and use functions of dvb softwares? (like which function get user freq info). step 4: How the user create a dll for using in dvb softwares? thanks a lot Quote Link to comment
hackbart Posted November 8, 2019 Share Posted November 8, 2019 You should first know what kind of plugin you want to create. If you need a low level you should download the sdk from the members section. The OSD Plugin System uses the COM Interface. You can easily get the required information by importing the DVBViewer COM Object. It does not matter if you use C++/C# for the last one. C would be complicated if you want to use COM. A good start for it is to have a look in the developer section of this forum. Christian 1 Quote Link to comment
mohammad izadpanah Posted November 10, 2019 Author Share Posted November 10, 2019 (edited) Quote You should first know what kind of plugin you want to create I want to learn to write plugin for dvb player. my first plugin shows some info of current channel like pids, bitrate, frequency, polarization, sat position and .... step 1: user must use which language( like C or C# or visual c#)? It does not matter if you use C++/C# for the last one. C would be complicated if you want to use COM. is it possible to use VB.NET? step 2: user writes codes in which software? Any Software! Any recommendation? step 3: How the user learn and use functions of dvb softwares? (like which function get user freq info). You can easily get the required information by importing the DVBViewer COM Object.step 4: How the user create a dll for using in dvb softwares? like general methods to create dll. Edited November 10, 2019 by mohammad izadpanah Quote Link to comment
mohammad izadpanah Posted November 10, 2019 Author Share Posted November 10, 2019 is it possible to share source of a simple plugin? is it exist in forum? Quote Link to comment
mohammad izadpanah Posted November 11, 2019 Author Share Posted November 11, 2019 On 11/8/2019 at 7:12 PM, hackbart said: You should first know what kind of plugin you want to create. If you need a low level you should download the sdk from the members section. On 11/10/2019 at 8:44 AM, mohammad izadpanah said: is it possible to share source of a simple plugin? is it exist in forum? I found several source of plugins in developer section but i didn't find sdk. Please send download link. Also please give me members section link Quote Link to comment
Griga Posted November 11, 2019 Share Posted November 11, 2019 vor 34 Minuten schrieb mohammad izadpanah: but i didn't find sdk. Please send download link. Have a look here (and use a Google translation from German, if needed): https://www.dvbviewer.tv/forum/topic/62968-plugin-api-dvbviewer-media-server/?do=findComment&comment=483967 The topic contains some useful information about plugins. 1 Quote Link to comment
mohammad izadpanah Posted April 6, 2020 Author Share Posted April 6, 2020 (edited) Hi friends how can i get channel info according to attached file. I write a plugin in delphi 7 that show all channel info. Please write some codes. unit main; interface uses Windows, Messages, SysUtils,StrUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, ComCtrls, TeEngine, Series, ExtCtrls, TeeProcs, Chart, Grids,about, ModuleAPI; type Tfmain = class(TForm) Label1: TLabel; Label2: TLabel; Label2: TLabel; . . . procedure Tfmain.FormShow(Sender: TObject); var tpinfo: TTuner; begin Label11.Caption := inttostr(tpinfo.OrbitalPos);/////////// it is very important for me//////////////// Label12.Caption := inttostr(tpinfo.Frequency); Label13.Caption := inttostr(tpinfo.SymbolRate); end; these codes doesn't work correct.why? thanks APIModule.zip Edited April 6, 2020 by mohammad izadpanah Quote Link to comment
Griga Posted April 6, 2020 Share Posted April 6, 2020 Use the following up-to-date TTuner declaration: Spoiler TTuner = record TunerType: TTunerType; Group: TChannelGroup; Unused1: Byte; Flags: Byte; Frequency: DWord; SymbolRate: DWord; //or URL Hash 0..31 LOF: Word; //LNB LOF, or TS Stream URL Hash 32..47 PMT: Word; Volume: Byte; DiSEqCValueExt: Byte; SatModulation: Byte; AVFormat: Byte; FEC: Byte; AudioChannel: Byte; Unused3: Word; //SubtitlePID: Word; //TransEdit internal Polarity: Byte; //or Modulation or BandWidth Unused4: Byte; //Favourite: Byte; //DVBViewer GE internal OrbitalPos: Word; Tone: Byte; //22 khz off/on, or TS Stream stream type (only during runntime, not in channels.dat) EPGFlag: Byte; DiSEqCValue: Word; // OrbitPos, or other value: Positoner, GotoAngular, Command String, or TS Stream URL Hash 48..63 DiSEqC: Byte; //None,SimpleA, SimpleB, PosA/OptA, PosB/OptA, PosA/OptB, PosB/OptB Language: TTunerLanguage; AudioPID: Word; Substream: Word; //changed for MPLP, replaces former NetworkNr: Byte; Favourite: Byte; VideoPID: Word; TransportStreamID: Word; TelePID: Word; NetworkID: Word; SID: Word; PCRPID: Word; end; 1 Quote Link to comment
mohammad izadpanah Posted April 6, 2020 Author Share Posted April 6, 2020 (edited) thanks for new update but plugin shows zero for these variables. (OrbitalPos, frequency and SymbolRate). Please read my codes again. is it correct? procedure Tfmain.FormShow(Sender: TObject); var tpinfo: TTuner; begin Label11.Caption := inttostr(tpinfo.OrbitalPos); Label12.Caption := inttostr(tpinfo.Frequency); Label13.Caption := inttostr(tpinfo.SymbolRate); end; 1- what is this ? is it necessary to use EventMsg ? how to use ? Please write some codes. EventMsg (evRemoveChannel, @Tuner) ;// with evRemoveChannel = 998: Is sent if a station is already being played and passes a pointer to its tuner data record 2- Like TTuner declaration, what's declaration for channel info like name, provider, ecm, emm , ...? Edited April 6, 2020 by mohammad izadpanah Quote Link to comment
mohammad izadpanah Posted April 6, 2020 Author Share Posted April 6, 2020 (edited) According to this post by @Lars_MQ and up-to-date TTuner declaration by @Griga , Please help me to get transponder info (OrbitalPos, frequency and SymbolRate). I am guessing that it's needed to use DVBViewer Plugin API Commands by SendMessage Functions. 1- is there any API COMMAND LIKE following COMMANDs to get TTuner records? const WM_DVBVIEWER = $B2C2; MSG_STARTPIDCALLBACK = $45104; MSG_STOPPIDCALLBACK = $45105; 2- I found this in "DVBViewer SDK.chm" file. How can I use this to get Transponder info? res:=SendMessage(dvbHandle,$B2C2,$1031,0); // returns the ServiceID<<16+Transponder Edited April 6, 2020 by mohammad izadpanah Quote Link to comment
Griga Posted April 7, 2020 Share Posted April 7, 2020 20 hours ago, mohammad izadpanah said: Like TTuner declaration, what's declaration for channel info like name, provider, ecm, emm , ...? ecm and emm are not processed and stored in DVBViewer. Plugins must retrieve them from the DVB streams. You can get the number and name of the currently played channel in the follwoing way: type TSetChannel = packed record Channel: Integer; //channel number ChannelName: PAnsiChar; end; PSetChannel = ^TSetChannel; var SC: TSetChannel SendMessage(dvbHandle,WM_DVBVIEWER,MSG_GETCHANNEL,LPARAM(@SC)); but AFAIK there is no way to get the provider name. Attached the source code of a little plugin that I wrote for correcting wrong bits in video/audio/teletext PES headers, in order to make a channel playable in DVBViewer. The function EventMsg shows how to get the tuner record. PatchMarkerBits_Source.zip 1 Quote Link to comment
mohammad izadpanah Posted April 7, 2020 Author Share Posted April 7, 2020 thanks a lot. Please add a Simple Form to project to show freq info in Labels.(CurrentTuner.Frequency , CurrentTuner.SymbolRate , CurrentTuner.OrbitalPos) Label1.Caption := 'Frequency = ' + IntToStr(CurrentTuner.Frequency) ; Label2.Caption := 'SymbolRate = ' +IntToStr(CurrentTuner.SymbolRate ) ; Label3.Caption :='OrbitalPos= ' + IntToStr(CurrentTuner.OrbitalPos) ; Also add following procedure to project to show plugin in menu. procedure SetMenuHandle(Menu: HMenu); stdcall; begin //Please Write a some codes for me to learn end; procedure MenuItemClick(MenuID: integer); stdcall; begin //Please Write a some codes for me to learn end; I'm ashamed to take your time! ? 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.