UfrmCAM.pas ( File view )

  • By sathex 2016-03-20
  • View(s):0
  • Download(s):0
  • Point(s): 1
			unit UfrmCAM;

interface
{
$define NO_LOGPMTDATA
}

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs,UMD_Impl,UMDDefs, StdCtrls,UTFrmMultidec, ComCtrls,INIFiles,USmartCardISO,
  Buttons,USECA_EMM,USECAManager, ExtCtrls,UTS184ToBitFilter,SyncObjs, jpeg,
  ImgList,UnitTimer, Menus,UBitManager,UDVBTablesHolder,UfrmPMTDetails,UfrmEMM,
  UDVBConditionalAccessSystemNames,UDVBPIDNames,United32,clipbrd,UDVBCoreToMD,
  Spin, Mask, Grids, ValEdit,ufrmAddFilter,ULogEngine,ShellAPI,UEPGMHW,
  SynEdit,UScriptsEditor,UScriptFunctions,DateUtils,
  UnitMDInterface, UPESToTS,
{
$WARNINGS OFF
}
  FileCtrl,
{
$WARNINGS ON
}
  UTranslate,UfrmEPGAdvanced,UnitISO639_3;

Const MAX_ECM_RECORD=100; // it should be more than enought
const LANGUAGE_FILE_EXTENSION='.PMCAM.Language';
const LANGUAGE_FOLDER='PMCAM Languages\';
const PMCAM_SPECIAL_NAME='(V 9.0 EDIT)';
const PMCAM_MAX_INS_LOG=512;

const TTDVBACC_SETPIDs_Function='?SetPIDs@CDVBAVControl@@QAE?AW4DVB_ERROR@@GGG@Z';
const TTDVBACC_INITDVB_Function='?InitDvbApiDll@@YAXXZ';

const MAX_EMM_HANDLES = 5;

type fTTDVBACC_SetPIDs=function (APID: WORD; VPID: WORD;PCRPID: WORD): WORD;stdcall;
type fTTDVBACC_INITDVB=function (): WORD;stdcall;

type RCOM_Settings=record
    COMPort: BYTE;
    RxTimeout: integer;
    TxTimeout: integer;
    Cristal: eTISO_CRISTAL;
end;

type RProviderConfig=record
    EMMHandling: Boolean;
    EMMDump: Boolean;
end;

type RPID_RECORD=record
    PID: integer;
    Code: BYTE;
    SubCode: BYTE;
    Name: array[0..100] of Char;
end;

Type PPID_RECORD=^RPID_RECORD;

type RPID_RECORDs=record
    Counter: integer;
    Item: array [0..MAX_ECM_RECORD] of RPID_RECORD;
end;

type REMM_RECORD=record
    System: WORD;
    EMM: integer;
    EMMPPUA: integer;
    ProviderID: DWORD;
end;

type RECM_RECORD=record
    System: WORD;
    ProviderID: WORD;
    ECMPID: integer;
    PBM: array [0..7] of BYTE;
    Event: WORD;
    Date: WORD;
end;

type RECM_RECORDS_SECA=record
    Counter: integer;
    Current: integer;
    ECMs: array [0..MAX_ECM_RECORD] of RECM_RECORD;
end;

type REMM_RECORDS=record
    Counter: integer;
    EMMs: array [0..MAX_ECM_RECORD] of REMM_RECORD;
end;

type RCurrentChanInfoMD=record
    Name: String;
    SID: integer;
    ECM: integer;
    PMT: integer;
    EMM: integer;
    EMMPPUA: integer;
end;

type RDefaultSECAPID=record
    EMMSN: integer;
    EMMPPUA: integer;
end;

type RCurrentPIDs=record
    EMMSerial: array [1..MAX_EMM_HANDLES] of integer;
    EMMPPUA: array [1..MAX_EMM_HANDLES] of integer;
    ECM: integer;
    PMT: integer;
    PAT: integer;
    CAT: integer;
    EPG: array [0..1] of integer;
end;

type RCurrentStats=record
    EMMSerial: array [1..MAX_EMM_HANDLES] of int64;
    EMMSerialUpdated: Boolean;
    EMMPPUA: array [1..MAX_EMM_HANDLES] of int64;
    EMMPPUAUpdated: Boolean;
    ECM: int64;
    ECMUpdated: Boolean;
    PMT: int64;
    PMTUpdated: Boolean;
    PAT: int64;
    PATUpdated: Boolean;
    CAT: int64;
    CATUpdated: Boolean;
end;

type RCurrentHandles=record
    EMMSerial: array [1..MAX_EMM_HANDLES] of integer;
    EMMPPUA: array [1..MAX_EMM_HANDLES] of integer;
    ECM: integer;
    PMT: integer;
    PAT: integer;
    CAT: integer;
    EPG: array [0..1] of integer;
end;

const MAX_RECTVPIDS=5;

type eRECTVTYPE=(eRECTVTYPE_VIDEO,eRECTVTYPE_AUDIO,eRECTVTYPE_TTX);

type RRecTVRecord=record
    RecordPIDs: array [0..MAX_RECTVPIDS-1] of integer;
    StreamHandler: Array [0..MAX_RECTVPIDS-1] of TTS184ToBitFilter;
    TSStreamHandler: Array [0..MAX_RECTVPIDS-1] of TPESToTS;
    StreamIndex: Array [0..MAX_RECTVPIDS-1] of BYTE;
    WrittenPES: array [0..MAX_RECTVPIDS-1] of int64;
    WrittenBytes: array [0..MAX_RECTVPIDS-1] of int64;
    InstantBitRate: array [0..MAX_RECTVPIDS-1] of int64;
    InstantBitRateStamp: DWORD;
    Kind: array [0..MAX_RECTVPIDS-1] of eRECTVTYPE;
    Output: TStream;
    FilterAverageLastUpdate: DWORD;
    SavedVideoPID: WORD;
    SavedAudioPID: WORD;
    SavedTeleTextPID: WORD;
    RecordingTime: TFineTimer;
    Graph: TBitmap;
    GraphLastXY: TPoint;
    GraphStepper: DWORD;
    IsRecording: Boolean;
end;

Type TONSENDDW=procedure(DW1: PBYTEARRAY;DW2: PBYTEARRAY) of object;
Type TONCYCLEECM=procedure() of object;

type TSECAINSProcessor=Class(TThread)
  Private
  Protected
    INSBuffer: array[0..9,0..299] of BYTE;
    INSPointer: integer;
    SECAManager: TSECAManager;
    mvarONSendDW: TONSENDDW;
    mvarOnCycleECM: TONCYCLEECM;
    mvarEventHandle: TEvent;
    procedure Execute; override;
  Public
    Property ONSENDDW: TONSENDDW read mvarONSendDW write mvarONSendDW;
    property ONCYCLEECM: TONCYCLEECM read mvarOnCycleECM write mvarOnCycleECM;
    procedure ProcessINS;
    procedure AddInsToBuffer(INS: PBYTEARRAY);
    Constructor Create(CreateSuspended: Boolean);
    Destructor Destroy; override;
end;

type
  TfrmCAM = class(TFormMultiDec)
    Pages: TPageControl;
    CAM: TTabSheet;
    SmartCard: TTabSheet;
    Status: TStatusBar;
    grpFilters: TGroupBox;
    lblPAT: TLabel;
    lblCAT: TLabel;
    lblPMT: TLabel;
    lblECM: TLabel;
    lblPATPID: TLabel;
    lblCATPID: TLabel;
    lblPMTPID: TLabel;
    lblECMPID: TLabel;
    butReset: TBitBtn;
    SmartCardPages: TPageControl;
    General: TTabSheet;
    lblATR: TLabel;
    Label1: TLabel;
    Label2: TLabel;
    lblATRVersion: TLabel;
    Label3: TLabel;
    lblATRSystem: TLabel;
    Label4: TLabel;
    lblCardCopyright: TLabel;
    Label5: TLabel;
    lblCardSerial: TLabel;
    lblCardSerialHex: TLabel;
    TabFake: TTabControl;
    lblProviderIDlbl: TLabel;
    lblProviderID: TLabel;
    Label6: TLabel;
    Label9: TLabel;
    Label8: TLabel;
    lblProviderPPUA: TLabel;
    Label10: TLabel;
    Label12: TLabel;
    Label13: TLabel;
    Label14: TLabel;
    Label11: TLabel;
    lbProviderKeys: TListBox;
    Shape1: TShape;
    Shape2: TShape;
    Shape3: TShape;
    lblEMMSN: TLabel;
    lblEMMSNPID: TLabel;
    lblEMMPPUA: TLabel;
    lblEMMPPUAPID: TLabel;
    chkFilterLiveUpdate: TCheckBox;
    lvINSLog: TListView;
    chkEMMSerial: TCheckBox;
    Label7: TLabel;
    Shape4: TShape;
    Label15: TLabel;
    Shape5: TShape;
    chkEMMPPUA: TCheckBox;
    lblPATData: TLabel;
    lblCATData: TLabel;
    lblPMTData: TLabel;
    lblECMData: TLabel;
    lblEMMSNData: TLabel;
    lblEMMPPUAData: TLabel;
    tmrDataUpdate: TTimer;
    Phoenix: TTabSheet;
    cbCOMPort: TComboBox;
    Label16: TLabel;
    grpCrystal: TRadioGroup;
    butCloseCOM: TBitBtn;
    butPhoenixResetCard: TBitBtn;
    Nemesis: TImage;
    PhoenixLogo: TImage;
    imglstMain: TImageList;
    lblCurrentPPUA: TLabel;
    lblCurrentSerial: TLabel;
    lblUsingKey: TLabel;
    lvProviderLog: TListView;
    lvSerialNumber: TListView;
    popINSManager: TPopupMenu;
    popINSSendINSToCard: TMenuItem;
    PopINSCopyINStoclipboard: TMenuItem;
    chkProcessEMM: TCheckBox;
    About: TTabSheet;
    Label17: TLabel;
    lblJumpHomePage: TLabel;
    RichEditAbout: TRichEdit;
    tmrFilterRestart: TTimer;
    lblPMTInfo: TLabel;
    lblCATInfo: TLabel;
    GroupBox1: TGroupBox;
    Label19: TLabel;
    Label20: TLabel;
    lblHWComputerName: TLabel;
    lblHWUserName: TLabel;
    Label21: TLabel;
    lblHWWindowsUpTime: TLabel;
    tmrWindowsUpTime: TTimer;
    tmrRefreshPMTDetails: TTimer;
    chkActive: TCheckBox;
    rbCrystal_3_57: TRadioButton;
    rbCrystal_6_00: TRadioButton;
    GroupBox2: TGroupBox;
    spTimeoutRX: TSpinEdit;
    Label22: TLabel;
    Label23: TLabel;
    spTimeoutTX: TSpinEdit;
    Label24: TLabel;
    Shape6: TShape;
    lblResetCard: TLabel;
    Shape7: TShape;
    Label25: TLabel;
    pnlDirectTalk: TPanel;
    txtDirectTalk: TMaskEdit;
    butSendToPhoenix: TBitBtn;
    lvDirectTalk: TListView;
    Label26: TLabel;
    butResetPhoenixCard: TBitBtn;
    cbDirectPredefined: TComboBox;
    chkEMMPPUADump: TCheckBox;
    Logger: TTabSheet;
    chkLOGEverythingPPUA: TCheckBox;
    txtLOGALLPPUA: TEdit;
    cbLOGALLPPUA: TComboBox;
    butLOGNamePPUA: TBitBtn;
    chkLOGEverythingSerial: TCheckBox;
    cbLOGALLSerial: TComboBox;
    txtLOGALLSerial: TEdit;
    butLOGNameSerial: TBitBtn;
    Label27: TLabel;
    Shape8: TShape;
    Label28: TLabel;
    Shape9: TShape;
    vleLOGIDIndex: TValueListEditor;
    cbLOGPreCardIndex: TComboBox;
    Label29: TLabel;
    Label30: TLabel;
    lvLOGFilter: TListView;
    butLOGAddFilter: TBitBtn;
    butLOGRemoveFilter: TBitBtn;
    butLOGRestartEngine: TBitBtn;
    chkLOGActive: TCheckBox;
    Label31: TLabel;
    chkLOGAppendShared: TCheckBox;
    chkLOGAppendSerial: TCheckBox;
    Tools: TTabSheet;
    pgTools: TPageControl;
    tbEPGMHW: TTabSheet;
    pnlEPGMHW: TPanel;
    Label18: TLabel;
    btnEPG: TBitBtn;
    tmrCheckMHWEPG: TTimer;
    PMCAMStatus: TTabSheet;
    tmrFilterStatus: TTimer;
    Label33: TLabel;
    butLOGBrowseShare: TBitBtn;
    butLOGBrowseSerial: TBitBtn;
    LOGSaveDialog: TSaveDialog;
    lstStatusSerial: TListBox;
    Label34: TLabel;
    tabScripts: TTabSheet;
    lvFilters: TListView;
    pnlScripts: TPanel;
    Label32: TLabel;
    tabConfiguration: TTabSheet;
    chkAutoECM: TCheckBox;
    Bevel1: TBevel;
    Label35: TLabel;
    chkCycleECM: TCheckBox;
    butSaveNow: TBitBtn;
    chkFindECM: TCheckBox;
    chkMHWEPG: TCheckBox;
    Bevel2: TBevel;
    Label36: TLabel;
    spinLogSplit: TSpinEdit;
    Bevel3: TBevel;
    Label37: TLabel;
    Label38: TLabel;
    Label39: TLabel;
    tmrDVBCoreDelay: TTimer;
    Bevel4: TBevel;
    chkScriptRunStartup: TCheckBox;
    Label40: TLabel;
    rbScriptLoad: TRadioGroup;
    txtRunThisScript: TEdit;
    butBrowseScript: TBitBtn;
    OpenScript: TOpenDialog;
    chkScriptAutoSave: TCheckBox;
    tmrFilterWatchDog: TTimer;
    cbLanguage: TComboBox;
    Bevel5: TBevel;
    Label41: TLabel;
    lblTranslationRestart: TLabel;
    butDumpLog: TBitBtn;
    Label42: TLabel;
...
...
(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

UfrmCAM.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