DVBCore.pas ( File view )

  • By sathex 2016-03-20
  • View(s):0
  • Download(s):0
  • Point(s): 1
			//
// Generated from DVBCore.h
// Look at DVBCore.h also. if you'll find any difference please
// tell me about that. It's not so easy to synchronize these two files.
//

unit DVBCore;

interface
uses windows, sysutils;

const

DVB_HDRVER_TP_INFO			=$104;
DVB_HDRVER_NET_INFO			=$100;
DVB_HDRVER_PLG_INFO			=$100;
DVB_HDRVER_TUNER_INFO		=$101;
DVB_HDRVER_HW_DISPLAY		=$100;
DVB_HDRVER_DS_DISPLAY		=$100;
DVB_HDRVER_FILE_PLAYBACK	=$101;
DVB_HDRVER_EPG_EVENT		=$100;

(* errors *)
DVB_ERROR_NONE        = 0; (* kein Fehler*)
DVB_ERROR_DRIVER      = 1; (* Treiberzugriffsfehler*)
DVB_ERROR_HARDWARE    = 2; (* Hardware-Fehler*)
DVB_ERROR_PARAMETER   = 3; (* ungltiger Parameter*)
DVB_ERROR_TIMEOUT     = 4; (* Timeout*)
DVB_ERROR_STATE       = 5; (* Zustandsfehler*)
DVB_ERROR_RESOURCES   = 6; (* Mangel an Ressourcen*)
DVB_ERROR_GENERAL     = 7; (* allgemeiner Fehler*)
DVB_ERROR_PAT_INVALID = 1000; // Error in Program Association Table
DVB_ERROR_NO_SIGNAL	  =	1001; // No signal after setting tuner

//***************************** GENERAL FUNCTIONS *************************************************************************

const

DVB_TYPE_AUTO		=0;
DVB_TYPE_SkyStar_1	=1;
DVB_TYPE_SkyStar_2	=2;
DVB_TYPE_TwinHan	=4;


(*Get Version of DVBCore*)
//function DVBGetCoreVer(Str: PByteArray = NIL): DWORD; stdcall; external 'DVBCore.dll';

(*Init DVB Hardware*)
function DVBInit(CardType: PDWORD = nil): DWORD; stdcall; external 'DVBCore.dll';

(*Close DVB hardware*)
procedure DVBClose(ShutDown: BOOL = true); stdcall; external 'DVBCore.dll';

//****************************** MAIN CONTROL FUNCTION OF DVBCORE *********************************************************

const

(* Valid options for DVBParams. May be mixed*)
SET_DISEQ           = $0000001; //SetUp DiSEq data
SET_TUNER           = $0000002; //SetUp Tuner data
SET_PIDS            = $0000004; //SetUp PIDs Audio, Video, PCR

// Be sure you supplied all PIDs before start capture.
// if all 3 PIDs (Audio, Video, PCR) not equal zero then capture starts in Audio/Video mode.
// if Video or PCR PID equals to zero then capture starts in Audio-only mode.
// if Audio PID equals to zero then capture doesn't starts.

SET_STARTCAPTURE	= $0000018;	//Start Capture AV
SET_STOPCAPTURE		= $0000008;	//Stop	Capture AV
SET_COPYALLDATA     = $0010000; //Copy whole TP_INFO structure to internal DVBCore Cache
GET_PATINFO         = $0000100; //Get Program Association Table (PMT PIDs, Channel IDs)
GET_CATINFO         = $0000200; //Get Condotion Access Table (All EMM PIDs)
GET_PMTINFO			= $0000400;	//Get Program Map Table for specified channel (Audio, Video, PCR, ECM PIDs)
GET_SDTINFO			= $0000800;
GET_ALLPMTINFO		= $0001000;	//Same as before but for all channels from current transponder
GET_ALLTABLESINFO   = GET_PATINFO or GET_CATINFO or GET_ALLPMTINFO or GET_SDTINFO;
GET_TUNERDISEQINFO  = $0001000; //Get current parameters from Tuner and DiSEq (allways from cache)
GET_ALLINFO         = GET_PATINFO or GET_CATINFO or GET_ALLPMTINFO or GET_SDTINFO or GET_TUNERDISEQINFO;
GET_TRYFROMCACHE    = $0100000; //Try Get info from DVBCore cache if data exists, otherwise get it from stream
GET_ONLYFROMCACHE   = $0200000; //Allways get info from cache (even it's invalid. Check appropriate flags to make sure data is valid)
SET_FASTMODE		= $1000000; //Fast getting info. Call DVBParams(NULL,SET_FASTMODE) after last use this mode!

(**)
(* Tip: You may mix some flags. for example: (SET_DISEQ | SET_TUNER | GET_ALLINFO| SET_PIDS) *)
(* It will setup DiSEq and Tuner then gat all info about this transponder, then setup PIDS of first channel.*)
(**)
LNB_VOLT00      = 0; (* zero volt (power off)*)
LNB_POWEROFF    = 0; (* zero volt (power off)*)
LNB_VOLT13      = 13; (* 13 volt (vertical polarisation)*)
LNB_POL_VERT    = 13; (* 13 volt (vertical polarisation)*)
LNB_VOLT18      = 18; (* 18 volt (horizontal polarisation)*)
LNB_POL_HORZ    = 18; (* 18 volt (horizontal polarisation)*)

VITERBI_AUTO     = 0; (* DVB-S: automtic detection of viterbi rate*)
VITERBI_RATE_1_2 = 1; (* DVB-S: viterbi rate: 1/2*)
VITERBI_RATE_2_3 = 2; (* DVB-S: viterbi rate: 2/3*)
VITERBI_RATE_3_4 = 3; (* DVB-S: viterbi rate: 3/4*)
VITERBI_RATE_4_5 = 4; (* DVB-S: viterbi rate: 4/5*)
VITERBI_RATE_5_6 = 5; (* DVB-S: viterbi rate: 5/6*)
VITERBI_RATE_6_7 = 6; (* DVB-S: viterbi rate: 6/7*)
VITERBI_RATE_7_8 = 7; (* DVB-S: viterbi rate: 7/8*)
VITERBI_RATE_8_9 = 8; (* DVB-S: viterbi rate: 8/9*)

DVB_C_QAM_16	 =0;	// DVB-C: Modulation:  16-QAM
DVB_C_QAM_32	 =1;	// DVB-C: Modulation:  32-QAM
DVB_C_QAM_64	 =2;	// DVB-C: Modulation:  64-QAM (default)
DVB_C_QAM_128	 =3;	// DVB-C: Modulation: 128-QAM
DVB_C_QAM_256	 =4;	// DVB-C: Modulation: 256-QAM


DISEQC_NONE		   = $00;
DISEQC_SIMPLE	   = $10;
DISEQC_V1_0		   = $20;

// DiSEqC v1.0 Constants
DISEQC_HIGH_NIBLE  = $F0;
DISEQC_LOW_BAND    = $00;
DISEQC_HIGH_BAND   = $01;
DISEQC_VERTICAL    = $00;
DISEQC_HORIZONTAL  = $02;
DISEQC_POSITION_A  = $00;
DISEQC_POSITION_B  = $04;
DISEQC_OPTION_A    = $00;
DISEQC_OPTION_B    = $08;

//For simple DiSEqC management mode
DISEQC_V1_0_LNB1   = DISEQC_V1_0 or DISEQC_POSITION_A or DISEQC_OPTION_A;
DISEQC_V1_0_LNB2   = DISEQC_V1_0 or DISEQC_POSITION_B or DISEQC_OPTION_A;
DISEQC_V1_0_LNB3   = DISEQC_V1_0 or DISEQC_POSITION_A or DISEQC_OPTION_B;
DISEQC_V1_0_LNB4   = DISEQC_V1_0 or DISEQC_POSITION_B or DISEQC_OPTION_B;
DISEQC_SIMPLE_LNB1 = DISEQC_SIMPLE or DISEQC_POSITION_A;
DISEQC_SIMPLE_LNB2 = DISEQC_SIMPLE or DISEQC_POSITION_B;


SPECTRAL_INVERSION_AUTO = 2; (* automatic detection of spectral inversion*)
SPECTRAL_INVERSION_ON   = 0; (* spectral inversion*)
SPECTRAL_INVERSION_OFF  = 1; (* no spectral inversion*)

(* const for wDataValid*)
PAT_VALID  =1;	//info about PAT is valid
CAT_VALID  =2;	//info about Condition Access in current structure is valid
PMT_VALID  =4;
SDT_VALID  =8;

(*const for wCount, wChCount*)
CURRENT_NONE        = $FFFF;

TPI_CA_COUNT	=64;
TPI_AUD_COUNT	=16;
TXT_MGZ_COUNT	=4;
TPI_CH_COUNT	=128;
TPI_NAME_LEN	=64;

//For AUD_PID->dwFlags
DVB_AUDIO_ISO11172  =$00;
DVB_AUDIO_ISO13818  =$01;
DVB_AUDIO_AC3		=$02;
DVB_AUDIO_TYPEMASK	=$0F;

type

CA_INFO = packed record
    wCount:     WORD; (*Quantity of PIDs*)
    wCurrent:   WORD; //Current PID. For current EMM dont use this field. use Channel.wEMMCurrent instead!
    wCA_Type:   packed array [0..TPI_CA_COUNT-1] of WORD; (*Type of CA system (i.e. Viaccess = 0x0500)*)
    wPID:       packed array [0..TPI_CA_COUNT-1] of WORD; (*PID for CA*)
end;

AUD_PID = packed record
    wCount:     WORD; (*Quantity of PIDs*)
    wCurrent:   WORD; (*Current PID*)
    wPID:       packed array [0..TPI_AUD_COUNT-1] of WORD; (*PID :)*)
    dwFlags:    packed array [0..TPI_AUD_COUNT-1] of DWORD; //see DVB_AUDIO_*
end;

TXT_MGZ = packed record
    wCount:     WORD; //Quantity of Magazines
    wCurrent:   WORD; //Current Magazine
    wOpt:       packed array [0..TXT_MGZ_COUNT-1] of WORD;  //Option bits: 0-7 page number, 8-10 - magazine number, 11-15 - Teletext Type
    dwLang:     packed array [0..TXT_MGZ_COUNT-1] of DWORD; //Language ID for Magazine
end;

CH_INFO = packed record
    wDataValid: WORD;       //Flag for validating data in all fields except wSID and wPMT (validate these fields by TP_INFO.wDataValid)
	dwUserFlags:DWORD;		//User defined flags or variable;
    wSID:       WORD;       //Channel ID
    wPMT:       WORD;       //PID for Program Map Table
	wTeletext:  WORD; 		//Teletext PID. 0 if none
    wType:      WORD;
    wScrambled: WORD;
    Ch_Name:    packed array [0..TPI_NAME_LEN-1] of char; (*Channel Name*)
    Prov_Name:  packed array [0..TPI_NAME_LEN-1] of char; (*Provider Name*)
    wPCR:       WORD;       //PID for Program Clock Reference
    wVideo:     WORD;       //Video PID
    Audio:      AUD_PID;    //Array of Audio PIDs
    TxtMgz:     TXT_MGZ;    //Array of Teletext Magazines
	wEMMCurrent:WORD; 	    //Current EMM pid for current channel
    ECM:        CA_INFO;    //Array or ECM PIDs
end;

TP_INFO = packed record
    HdrVer:         DWORD;  //Structure version. Please check this for sure data is in expected form*)
    wDataValid:     WORD;   //Flag for validating data in wChCount, wChCurrent, all EMMs, all wPMT and all wSID*)
	dwUserFlags:    DWORD; 	//User defined flags or variable
    DiSEqData:      packed array [0..31] of BYTE; //Data for DiSEq
    bDiSEqLen:      BYTE;   //Length of DiSEq Data
    bDiSEqToneburst:BYTE;
    dwSymbRate:     DWORD;  //Symbol Rate of Transponder (DVB-S and DVB-C only)
    dwFreq:         DWORD;  //Frequency
    dwLNB_Power:    DWORD;  //Power for LNB (DVB-S only)
    dwInversion:    DWORD;  //Spectral Inversion
    dwLOF:          DWORD;  //LOF for DVB-S, QAM for DVB-C
    bF22KHz:        BOOL;   //ON/OFF 22KHz (DVB-S only)
    dwViterbi:      DWORD;  //Viterbi Rate (DVB-S only)
    wChCount:       WORD;   //Quantity of Channels of current transponder
    wChCurrent:     WORD;   //Current Channel
    Channel:        packed array [0..TPI_CH_COUNT-1] of CH_INFO; //Channel Map
    EMM:            CA_INFO;//Array of EMM PIDs
    wDummy1:        WORD;   //Reserved
	wNetID:         WORD;	//Network ID
	wTSID:          WORD;	//Transport Stream ID
end;

pTP_INFO = ^TP_INFO;

(*Main management function to SET/GET parameters about transponder and channels*)
//function DVBParams(TP_Info: pTP_INFO;  Options: DWORD): DWORD; stdcall; external 'DVBCore.dll';

//**************************** NETWORK INFO *******************************************************************************

const

DVB_FEC_NOTDEFINED		=0;
DVB_FEC_12				=1;
DVB_FEC_23				=2;
DVB_FEC_34				=3;
DVB_FEC_56				=4;
DVB_FEC_78				=5;
DVB_FEC_NOCODING		=15;

DVB_MOD_NOTDEFINED		=0;
DVB_MOD_QPSK			=1;

DVB_POL_LINEAR_HORZ		=0;
DVB_POL_LINEAR_VERT		=1;
DVB_POL_CIRCULAR_LEFT	=2;
DVB_POL_CIRCULAR_RIGHT	=3;

type
TPN_INFO = packed record
    dwFreq:     DWORD;
    dwSymbRate: DWORD;
	wOrbPos:    WORD;
	wNumber:    WORD;
	bWestEast:  BYTE;
	bPolar:     BYTE;
	bMod:       BYTE;
	bFEC:       BYTE;
end;

NET_INFO = pack
...
...
(Not finished, please download and read the complete file)
			
...
Expand> <Close

Want complete source code? Download it here

Point(s): 1

Download
0 lines left, continue to read
Sponsored links

File list

Tips: You can preview the content of files by clicking file names^_^
Name Size Date
About.rtf20.49 kB2005-03-15|17:16
changelog.txt4.26 kB2005-03-15|17:16
clean.bat92.00 B2005-01-05|02:35
DVBCore.pas31.98 kB2004-12-17|23:45
frmPPVInfo.dfm15.69 kB2004-12-19|19:54
frmPPVInfo.pas6.17 kB2005-03-03|01:02
01.96 kB
About.bmp3.05 kB2004-12-17|23:52
About.ico2.40 kB2004-12-17|23:52
Add.bmp1.30 kB2004-12-17|23:52
bluenote.ico7.23 kB2004-12-17|23:52
bug.jpg6.04 kB2005-01-05|02:35
CAM.ico2.40 kB2004-12-17|23:52
Close.bmp3.05 kB2004-12-17|23:52
EPG.bmp1.05 kB2005-01-05|21:10
EPG.ico1.37 kB2004-12-17|23:52
EPGOFF.bmp1.62 kB2004-12-17|23:52
EPGON.bmp1.62 kB2004-12-17|23:52
EPG_Gliph.bmp3.43 kB2004-12-17|23:52
Event.ico1.37 kB2004-12-17|23:52
jetons.ico1.37 kB2004-12-17|23:52
leftLogo.bmp9.96 kB2004-12-17|23:52
logger.ico1.68 kB2004-12-17|23:52
MagicWand.bmp1.30 kB2004-12-17|23:52
MagicWand.ico1.37 kB2004-12-17|23:52
MAS.ico1.37 kB2004-12-17|23:52
MENOS.ico1.37 kB2004-12-17|23:52
nemesis.ico4.19 kB2004-12-17|23:52
Phoenix.ico1.72 kB2004-12-17|23:52
Provider.ico1.37 kB2004-12-17|23:52
Remove.bmp1.30 kB2004-12-17|23:52
Reset.bmp3.05 kB2004-12-17|23:52
Restart.bmp1.30 kB2004-12-17|23:52
Save.bmp2.05 kB2004-12-17|23:52
scriptengine.ico7.23 kB2004-12-17|23:52
ScriptsEngine.bmp6.80 kB2004-12-17|23:52
Tools.bmp246.00 B2004-12-17|23:52
tuxprogramming.jpg4.15 kB2005-01-13|19:01
V9Card.jpg11.00 kB2005-03-03|01:02
IFSI_IniFiles.pas10.45 kB2004-12-19|19:54
MpgLib.DLL141.50 kB2004-12-24|17:03
PMCAM0.00 B2005-03-15|17:18
PMCAM4.67 kB2005-01-05|17:24
PMCAM4.69 kB2005-01-05|17:24
PMCAM4.52 kB2005-01-05|17:24
PMCAM.rc3.60 kB2004-12-17|23:47
PMCAM2.dpr6.30 kB2005-03-11|20:15
PMCAM2.res1.70 kB2005-03-15|17:16
PMCAM2StandAlone.dpr1.19 kB2005-03-03|01:02
PMCAM2StandAlone.res4.95 kB2005-03-11|20:15
PMCAMMenu.rc259.00 B2004-12-26|20:10
PMCAMMenu.RES162.25 kB2005-03-15|17:16
rUPClickSplitter.res740.00 B2004-12-19|19:54
santa_rock.jpg5.65 kB2004-12-24|17:59
UBitManager.pas4.18 kB2004-12-17|23:45
uDecode123.pas4.01 kB2004-12-29|01:33
UDVBConditionalAccessSystemNames.pas1.49 kB2004-12-17|23:45
UDVBCoreToMD.pas4.59 kB2004-12-17|23:45
UDVBPIDNames.pas1.23 kB2004-12-17|23:45
UDVBTablesHolder.pas2.68 kB2004-12-28|02:17
UEPGEntry.pas3.29 kB2004-12-17|23:45
UEPGMHW.dfm7.72 kB2005-01-11|02:38
UEPGMHW.pas40.85 kB2005-01-11|02:38
UfrmAddFilter.dfm6.86 kB2004-12-17|23:46
UfrmAddFilter.pas3.68 kB2004-12-17|23:45
UfrmCAM.dfm217.00 kB2005-03-15|03:22
UfrmCAM.pas159.37 kB2005-03-15|17:16
ufrmDLLForm.dfm420.00 B2004-12-19|19:54
ufrmDLLForm.pas1.87 kB2004-12-26|20:10
UfrmEMM.dfm1.28 kB2004-12-17|23:46
UfrmEMM.pas1.47 kB2004-12-17|23:45
UfrmEPGAdvanced.dfm7.01 kB2005-01-05|21:10
UfrmEPGAdvanced.pas2.56 kB2005-01-05|21:10
UfrmMHWEPGEntries.dfm3.81 kB2004-12-17|23:46
UfrmMHWEPGEntries.pas4.33 kB2004-12-17|23:45
ufrmMHWRadio.dfm35.85 kB2005-01-21|18:53
ufrmMHWRadio.pas37.84 kB2005-01-21|18:53
UfrmPMTDetails.dfm2.31 kB2005-01-21|18:53
UfrmPMTDetails.pas2.74 kB2005-01-21|18:53
UfrmWarningOnExit.dfm15.64 kB2005-01-05|21:10
UfrmWarningOnExit.pas1.44 kB2005-01-05|21:10
ULogEngine.pas15.89 kB2005-03-12|17:11
UMDDefs.pas4.07 kB2005-03-03|01:02
UMD_Impl.pas11.26 kB2005-03-03|01:02
United32.pas14.20 kB2004-12-17|23:45
UnitISO639_3.pas10.04 kB2005-03-03|01:02
UnitMDInterface.pas28.92 kB2005-03-15|03:22
UnitTimer.pas1.39 kB2004-12-17|23:45
Unit_CRC32.pas3.62 kB2004-12-17|23:45
uPESToTS.pas6.11 kB2005-03-03|01:02
UScriptFunctions.pas2.97 kB2005-01-03|16:45
UScriptsEditor.dfm58.10 kB2005-01-21|18:53
UScriptsEditor.pas22.02 kB2005-03-03|01:02
USECAManager.pas18.26 kB2005-03-03|01:02
USECATableStore.pas12.92 kB2004-12-17|23:45
USECA_EMM.pas7.74 kB2005-03-12|03:36
USmartCardISO.pas14.45 kB2004-12-17|23:45
UTfrmMultiDec.dfm407.00 B2005-01-21|18:53
UTfrmMultiDec.pas4.38 kB2005-01-21|18:53
UTranslate.pas6.49 kB2004-12-24|17:03
UTS184ToBitFilter.pas36.28 kB2005-03-11|20:15
uUPClickSplitter.dcr488.00 B2004-12-19|19:54
uUPClickSplitter.dcu18.09 kB2005-03-03|01:02
uUPClickSplitter.pas20.43 kB2004-12-26|20:10
PMCAM2_2.50.zip870.87 kB2016-03-19|22:08
...
Sponsored links

DVBCore.pas (1.30 MB)

Need 1 point
Your Point(s)

Your Point isn't enough.

Get point immediately by PayPal

More(Debit card / Credit card / PayPal Credit / Online Banking)

Submit your source codes. Get more point

LOGIN

Don't have an account? Register now
Need any help?
Mail to: support@codeforge.com

切换到中文版?

CodeForge Chinese Version
CodeForge English Version

Where are you going?

^_^"Oops ...

Sorry!This guy is mysterious, its blog hasn't been opened, try another, please!
OK

Warm tip!

CodeForge to FavoriteFavorite by Ctrl+D