/
UntDataDLL.pas
151 lines (130 loc) · 5.9 KB
/
UntDataDLL.pas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
// ##############################################################################################
// Author: DsChAeK
// URL: http://www.dschaek.de
// Project: Neutrino.dll - box interface dll for dboxTV
// Version: 1.0
//
// Function: Data for exchange with dboxTV
//
// License: Copyright (c) 2009, DsChAeK
//
// Permission to use, copy, modify, and/or distribute this software for any purpose
// with or without fee is hereby granted, provided that the above copyright notice
// and this permission notice appear in all copies.
//
// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
// REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
// FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT,
// OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
// DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
// ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
//
// ##############################################################################################
unit UntDataDLL;
interface
const
// #####################
// #### constants ######
// #####################
// remote keys
KEY_1 = 'KEY_1';
KEY_2 = 'KEY_2';
KEY_3 = 'KEY_3';
KEY_4 = 'KEY_4';
KEY_5 = 'KEY_5';
KEY_6 = 'KEY_6';
KEY_7 = 'KEY_7';
KEY_8 = 'KEY_8';
KEY_9 = 'KEY_9';
KEY_0 = 'KEY_0';
KEY_POWER = 'KEY_POWER';
KEY_HOME = 'KEY_HOME';
KEY_SETUP = 'KEY_SETUP';
KEY_RED = 'KEY_RED';
KEY_GREEN = 'KEY_GREEN';
KEY_YELLOW = 'KEY_YELLOW';
KEY_BLUE = 'KEY_BLUE';
KEY_UP = 'KEY_UP';
KEY_DOWN = 'KEY_DOWN';
KEY_LEFT = 'KEY_LEFT';
KEY_RIGHT = 'KEY_RIGHT';
KEY_OK = 'KEY_OK';
KEY_VOLUMEUP = 'KEY_VOLUMEUP';
KEY_VOLUMEDOWN = 'KEY_VOLUMEDOWN';
KEY_MUTE = 'KEY_MUTE';
KEY_HELP = 'KEY_HELP';
// ###########################
// #### data structures ######
// ###########################
type
// box data
RBoxData = record
sIp : ShortString;
sPort : ShortString;
sUser : ShortString;
sPass : ShortString;
end;
// stream info
RStreamInfo = record
sResolution : ShortString; // resolution -> '720x576'
sAspectRatio : ShortString; // video aspect ratio -> '4:3'
sBitrate : ShortString; // video bitrate -> '1875kbit'
sFramerate : ShortString; // video framerate -> '25 fps'
sAudiotyp : ShortString; // audiotyp -> 'stereo'
sVPID : ShortString; // video pid -> '0x0F0F'
iAPIDCnt : Integer; // audio track count -> 2
sAPID : ShortString; // audio pids -> '0xEEFF,0xEEDD'
sALANG : ShortString; // audio language -> 'english,german'
sPMT : ShortString; // pmt -> '0x0E0E'
end;
// bouquet data
RBouquet = record
Name : ShortString; // bouquet name -> 'bouquet1'
Index : Integer; // bouquet index -> 0
end;
// channel data
RChannel = record
Index : Integer; // index in a bouquet -> 9
IndexGlobal : Integer; // global bouquet index -> 123
sChannelId : ShortString; // channel id -> '49100032ee9'
sName : ShortString; // channel name -> 'channel1'
Mode : ByteBool; // mode -> true=tv, false=radio
BouquetIndex : Integer; // bouquet index -> 0
end;
// channel program data
RChannelProgram = record
sChannelId : ShortString; // channel id -> '45300014462'
sEventId : ShortString; // event id -> '306526254720614746'
sDuration : ShortString; // duration in minutes -> '130'
sStartSec : ShortString; // starttime as time_t string -> '1273947300'
sStartTime : ShortString; // starttime as string -> '22:25'
sTitle : ShortString; // programm title (epg info) -> 'dog cat mouse'
sInfo1 : ShortString; // programm info 1 (epg details) -> 'season 1'
sInfo2 : PChar; // programm info 2 (epg details) -> 'dog hunts cat, cat hunts mouse'
end;
// ###########################
// #### function pointers ####
// ###########################
type
// box data
TDLL_GetBoxData = function (BoxID : Integer):RBoxData of object;
// logging
TDLL_LogStr = procedure (Text:PChar; Result : Integer) of object;
// data
TDLL_AddBouquet = function (BoxID : Integer; Bouquet : RBouquet):Integer of object;
TDLL_AddChannel = function (BoxID : Integer; BouquetID:Integer; Channel : RChannel):Integer of object;
TDLL_AddChannelProgram = function (BoxID : Integer; BouquetIndex:Integer; ChannelIndex:Integer; ChannelProgram : RChannelProgram):Integer of object;
// http client
TDLL_GetURL = function (BoxID : Integer; URL : PChar):PChar of object;
TDLL_GetURL_BIN = function (BoxID : Integer; URL : PChar):Pointer of object;
TDLL_GetURL_EPG = function (BoxID : Integer; URL : PChar):PChar of object;
TDLL_FreePChar = function (ToFree : PChar):ByteBool of object;
// regex engine
TDLL_NewRegEx = function : Integer of object;
TDLL_SetRegEx = procedure (iID : Integer; RegEx : PChar; ModifierS : ByteBool) of object;
TDLL_GetMatch = function (iID : Integer; iNr : Integer) : PChar of object;
TDLL_Execute = function (iID : Integer; Text : PChar) : Integer of object;
TDLL_ExecuteNext = function (iID : Integer) : ByteBool of object;
TDLL_SendTelnetCmd = function(BoxID : Integer; sCmd : ShortString; iWait : Integer):ByteBool of object;
implementation
end.