mirror of
https://github.com/DigitalDevices/octonet.git
synced 2023-10-10 13:36:52 +02:00
Compare commits
No commits in common. "master" and "1.0.81" have entirely different histories.
@ -6,7 +6,7 @@ On Debian/Ubuntu (as root or using sudo):
|
||||
|
||||
```
|
||||
>apt-get install build-essential bison flex gettext libncurses5-dev texinfo autoconf automake libtool
|
||||
>apt-get install libpng12-dev libglib2.0-dev libgtk2.0-dev gperf
|
||||
>apt-get install libpng12-dev libglib2.0-dev libgtk2.0-dev gperf libxt-dev libxp-dev
|
||||
>apt-get install rsync git subversion mercurial
|
||||
```
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -2,7 +2,6 @@
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
/etc/recflash
|
||||
/usr/bin/ddflash
|
||||
;;
|
||||
esac
|
||||
|
@ -13,7 +13,6 @@ define OCTONET_INSTALL_TARGET_CMDS
|
||||
$(INSTALL) -m 0755 -D $(@D)/octokey $(TARGET_DIR)/usr/bin/octokey
|
||||
$(INSTALL) -m 0755 -D $(@D)/octonet $(TARGET_DIR)/usr/bin/octonet
|
||||
$(INSTALL) -m 0755 -D $(@D)/ddtest $(TARGET_DIR)/usr/bin/ddtest
|
||||
$(INSTALL) -m 0755 -D $(@D)/ddupdate $(TARGET_DIR)/usr/bin/ddupdate
|
||||
endef
|
||||
|
||||
$(eval $(generic-package))
|
||||
|
10
mk
10
mk
@ -13,17 +13,9 @@ LINUX=../linux.octonet
|
||||
#fi
|
||||
|
||||
cp $DDDVB/ddbridge/*.[ch] $LINUX/drivers/media/pci/ddbridge/
|
||||
cp $DDDVB/ddbridge/Kconfig $LINUX/drivers/media/pci/ddbridge/
|
||||
cp $DDDVB/ddbridge/Makefile.kernel $LINUX/drivers/media/pci/ddbridge/Makefile
|
||||
cp $DDDVB/dvb-core/*.c $LINUX/drivers/media/dvb-core/
|
||||
cp $DDDVB/dvb-core/Kconfig $LINUX/drivers/media/dvb-core/
|
||||
mkdir $LINUX/drivers/media/dvb-core/media/
|
||||
cp $DDDVB/include/linux/media/*.h $LINUX/drivers/media/dvb-core/media/
|
||||
cp $DDDVB/dvb-core/Makefile.kernel $LINUX/drivers/media/dvb-core/Makefile
|
||||
cp $DDDVB/dvb-core/*.[ch] $LINUX/drivers/media/dvb-core/
|
||||
cp $DDDVB/include/linux/dvb/*.h $LINUX/include/uapi/linux/dvb/
|
||||
|
||||
cp $DDDVB/frontends/Kconfig $LINUX/drivers/media/dvb-frontends/
|
||||
cp $DDDVB/frontends/Makefile.kernel $LINUX/drivers/media/dvb-frontends/Makefile
|
||||
cp $DDDVB/frontends/drxk*.[ch] $LINUX/drivers/media/dvb-frontends/
|
||||
cp $DDDVB/frontends/lnb*.[ch] $LINUX/drivers/media/dvb-frontends/
|
||||
cp $DDDVB/frontends/stv0367dd*.[ch] $LINUX/drivers/media/dvb-frontends/
|
||||
|
@ -1,18 +1,18 @@
|
||||
/*
|
||||
(C) 2015-16 Digital Devices GmbH.
|
||||
(C) 2015-16 Digital Devices GmbH.
|
||||
|
||||
Octoscan is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
Octoscan is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Octoscan is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
Octoscan is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with octoserve. If not, see <http://www.gnu.org/licenses/>.
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with octoserve. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
@ -73,10 +73,10 @@ static int eit_shortsize = 0;
|
||||
static int eit_extsize = 0;
|
||||
static int eit_events_deleted = 0;
|
||||
|
||||
char *pol2str[] = {"v", "h", "r", "l", NULL};
|
||||
char *pol2str[] = {"v", "h", "r", "l"};
|
||||
char *msys2str [] = {"undef", "dvbc", "dvbcb", "dvbt", "dss", "dvbs", "dvbs2", "dvbh",
|
||||
"isdbt", "isdbs", "isdbc", "atsc", "atscmh", "dtmb", "cmmb", "dab",
|
||||
"dvbt2", "turbo", "dvbcc", "dvbc2", NULL};
|
||||
"dvbt2", "turbo", "dvbcc", "dvbc2"};
|
||||
char *mtype2str [] = {"qpsk", "16qam", "32qam",
|
||||
"64qam", "128qam", "256qam",
|
||||
"autoqam", "8vsb", "16vsb", "8psk",
|
||||
@ -119,8 +119,8 @@ struct pid_info {
|
||||
int add_ext;
|
||||
int done;
|
||||
|
||||
uint8_t used;
|
||||
uint8_t cc;
|
||||
uint8_t used;
|
||||
uint8_t cc;
|
||||
uint16_t bufp;
|
||||
uint16_t len;
|
||||
uint8_t *buf;
|
||||
@ -147,7 +147,7 @@ struct ts_info {
|
||||
time_t timeout;
|
||||
int done;
|
||||
|
||||
struct pid_info pidi[0x2000];
|
||||
struct pid_info pidi[0x2000];
|
||||
};
|
||||
|
||||
#define MAX_ANUM 32
|
||||
@ -589,40 +589,40 @@ void add_fd(int fd, int *mfd, fd_set *fds)
|
||||
|
||||
static inline uint16_t seclen(const uint8_t *buf)
|
||||
{
|
||||
return 3+((buf[1]&0x0f)<<8)+buf[2];
|
||||
return 3+((buf[1]&0x0f)<<8)+buf[2];
|
||||
}
|
||||
|
||||
static inline uint16_t tspid(const uint8_t *buf)
|
||||
{
|
||||
return ((buf[1]&0x1f)<<8)+buf[2];
|
||||
return ((buf[1]&0x1f)<<8)+buf[2];
|
||||
}
|
||||
|
||||
static inline int tspayload(const uint8_t *tsp)
|
||||
{
|
||||
if (!(tsp[3] & 0x10))
|
||||
return 0;
|
||||
if (tsp[3] & 0x20) {
|
||||
if (!(tsp[3] & 0x10))
|
||||
return 0;
|
||||
if (tsp[3] & 0x20) {
|
||||
if (tsp[4] > 183)
|
||||
return 0;
|
||||
else
|
||||
return 183 - tsp[4];
|
||||
}
|
||||
return 184;
|
||||
return 184;
|
||||
}
|
||||
|
||||
|
||||
static inline int
|
||||
tspaystart(const uint8_t *tsp)
|
||||
{
|
||||
if (!(tsp[3]&0x10))
|
||||
return 188;
|
||||
if (tsp[3]&0x20) {
|
||||
if (tsp[4]>=184)
|
||||
return 188;
|
||||
else
|
||||
return tsp[4]+5;
|
||||
}
|
||||
return 4;
|
||||
if (!(tsp[3]&0x10))
|
||||
return 188;
|
||||
if (tsp[3]&0x20) {
|
||||
if (tsp[4]>=184)
|
||||
return 188;
|
||||
else
|
||||
return tsp[4]+5;
|
||||
}
|
||||
return 4;
|
||||
}
|
||||
/****************************************************************************/
|
||||
|
||||
@ -677,7 +677,7 @@ uint32_t dvb_crc32(uint8_t *data, int len)
|
||||
uint32_t crc=0xffffffff;
|
||||
|
||||
for (i = 0; i < len; i++)
|
||||
crc = (crc << 8) ^ dvb_crc_table[((crc >> 24) ^ *data++) & 0xff];
|
||||
crc = (crc << 8) ^ dvb_crc_table[((crc >> 24) ^ *data++) & 0xff];
|
||||
return crc;
|
||||
}
|
||||
|
||||
@ -841,33 +841,33 @@ static uint16_t get12(uint8_t *p)
|
||||
|
||||
static uint16_t get_pid(uint8_t *pid)
|
||||
{
|
||||
uint16_t pp;
|
||||
uint16_t pp;
|
||||
|
||||
pp = (pid[0] & 0x1f) << 8;
|
||||
pp |= pid[1] &0xff;
|
||||
return pp;
|
||||
pp = (pid[0] & 0x1f) << 8;
|
||||
pp |= pid[1] &0xff;
|
||||
return pp;
|
||||
}
|
||||
|
||||
static int get_desc(struct pid_info *p, uint8_t *buf, int length)
|
||||
{
|
||||
int dlength;
|
||||
int c=0;
|
||||
uint16_t casys;
|
||||
uint16_t capid;
|
||||
int dlength;
|
||||
int c=0;
|
||||
uint16_t casys;
|
||||
uint16_t capid;
|
||||
|
||||
while (c < length) {
|
||||
dlength = buf[c+1];
|
||||
while (c < length) {
|
||||
dlength = buf[c+1];
|
||||
|
||||
switch(buf[c]){
|
||||
case 0x02:
|
||||
break;
|
||||
case 0x03:
|
||||
break;
|
||||
case 0x09:
|
||||
if (!dlength)
|
||||
switch(buf[c]){
|
||||
case 0x02:
|
||||
break;
|
||||
case 0x03:
|
||||
break;
|
||||
case 0x09:
|
||||
if (!dlength)
|
||||
break;
|
||||
casys =(buf[c+2]<<8)|buf[c+3];
|
||||
capid = get_pid(buf+c+4);
|
||||
casys =(buf[c+2]<<8)|buf[c+3];
|
||||
capid = get_pid(buf+c+4);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@ -948,7 +948,7 @@ static int pmt_cb(struct sfilter *sf)
|
||||
if ((ilen = get12(buf + 10)))
|
||||
c += get_desc(p, buf + c, ilen);
|
||||
if (c != 12 + ilen)
|
||||
return 0;
|
||||
return 0;
|
||||
s = get_service(p->tsi->stp->tpi, pnr);
|
||||
s->pcr = get_pid(buf + 8);
|
||||
s->anum = 0;
|
||||
@ -985,8 +985,7 @@ static int pmt_cb(struct sfilter *sf)
|
||||
s->ttx = epid;
|
||||
else if (hasdesc(0x59, buf + c + 5, eslen))
|
||||
s->sub = epid;
|
||||
else if (hasdesc(0x6a, buf + c + 5, eslen) ||
|
||||
hasdesc(0x7a, buf + c + 5, eslen)) {
|
||||
else if (hasdesc(0x6a, buf + c + 5, eslen)) {
|
||||
if (s->anum < MAX_ANUM)
|
||||
s->apid[s->anum++] = epid;
|
||||
}
|
||||
@ -1125,235 +1124,72 @@ static int pat_cb(struct sfilter *sf)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#define CHARACTER_RESERVED_80 0x80
|
||||
#define CHARACTER_RESERVED_81 0x81
|
||||
#define CHARACTER_RESERVED_82 0x82
|
||||
#define CHARACTER_RESERVED_83 0x83
|
||||
#define CHARACTER_RESERVED_84 0x84
|
||||
#define CHARACTER_RESERVED_85 0x85
|
||||
#define UTF8_CC_START 0xc2
|
||||
#define SB_CC_RESERVED_80 0x80
|
||||
#define SB_CC_RESERVED_81 0x81
|
||||
#define SB_CC_RESERVED_82 0x82
|
||||
#define SB_CC_RESERVED_83 0x83
|
||||
#define SB_CC_RESERVED_84 0x84
|
||||
#define SB_CC_RESERVED_85 0x85
|
||||
#define CHARACTER_EMPHASIS_ON 0x86
|
||||
#define CHARACTER_EMPHASIS_OFF 0x87
|
||||
#define CHARACTER_RESERVED_88 0x88
|
||||
#define CHARACTER_RESERVED_89 0x89
|
||||
#define CHARACTER_CR_LF 0x8A
|
||||
#define CHARACTER_USER_8B 0x8B
|
||||
#define CHARACTER_USER_9F 0x9F
|
||||
#define SB_CC_RESERVED_88 0x88
|
||||
#define SB_CC_RESERVED_89 0x89
|
||||
#define CHARACTER_CR_LF 0x8a
|
||||
#define SB_CC_USER_8B 0x8b
|
||||
#define SB_CC_USER_9F 0x9f
|
||||
|
||||
uint16_t codetable_00[96] = {
|
||||
0x00A0,0x00A1,0x00A2,0x00A3, 0x20AC,0x00A5,0x0000,0x00A7, 0x00A4,0x2018,0x201C,0x00AB, 0x2190,0x2191,0x2192,0x2193,
|
||||
0x00B0,0x00B1,0x00B2,0x00B3, 0x00B4,0x00B5,0x00B6,0x00B7, 0x00F7,0x2019,0x201D,0x00BB, 0x00BC,0x00BD,0x00BE,0x00BF,
|
||||
0x0000,0x0300,0x0301,0x0302, 0x0303,0x0304,0x0306,0x0307, 0x0308,0x0000,0x030A,0x0327, 0x0000,0x030B,0x0328,0x030C,
|
||||
0x2015,0x00B9,0x00AE,0x00A9, 0x2122,0x266A,0x00AC,0x00A6, 0x0000,0x0000,0x0000,0x0000, 0x215B,0x215C,0x215D,0x215E,
|
||||
0x2126,0x00C6,0x0110,0x00AA, 0x0126,0x0000,0x0132,0x013F, 0x0141,0x00D8,0x0152,0x00BA, 0x00DE,0x0166,0x014A,0x0149,
|
||||
0x0138,0x00E6,0x0111,0x00F0, 0x0127,0x0131,0x0133,0x0140, 0x0142,0x00F8,0x0153,0x00DF, 0x00FE,0x0167,0x014B,0x00AD,
|
||||
};
|
||||
|
||||
uint16_t codetable_01[96] = {
|
||||
0x00A0,0x0401,0x0402,0x0403, 0x0404,0x0405,0x0406,0x0407, 0x0408,0x0409,0x040A,0x040B, 0x040C,0x00AD,0x040E,0x040F,
|
||||
0x0410,0x0411,0x0412,0x0413, 0x0414,0x0415,0x0416,0x0417, 0x0418,0x0419,0x041A,0x041B, 0x041C,0x041D,0x041E,0x041F,
|
||||
0x0420,0x0421,0x0422,0x0423, 0x0424,0x0425,0x0426,0x0427, 0x0428,0x0429,0x042A,0x042B, 0x042C,0x042D,0x042E,0x042F,
|
||||
0x0430,0x0431,0x0432,0x0433, 0x0434,0x0435,0x0436,0x0437, 0x0438,0x0439,0x043A,0x043B, 0x043C,0x043D,0x043E,0x043F,
|
||||
0x0440,0x0441,0x0442,0x0443, 0x0444,0x0445,0x0446,0x0447, 0x0448,0x0449,0x044A,0x044B, 0x044C,0x044D,0x044E,0x044F,
|
||||
0x2116,0x0451,0x0452,0x0453, 0x0454,0x0455,0x0456,0x0457, 0x0458,0x0459,0x045A,0x045B, 0x045C,0x00A7,0x045E,0x045F,
|
||||
};
|
||||
|
||||
uint16_t codetable_02[96] = {
|
||||
0x00A0,0x0000,0x0000,0x0000, 0x00A4,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000, 0x060C,0x00AD,0x0000,0x0000,
|
||||
0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x061B, 0x0000,0x0000,0x0000,0x061F,
|
||||
0x0000,0x0621,0x0622,0x0623, 0x0624,0x0625,0x0626,0x0627, 0x0628,0x0629,0x062A,0x062B, 0x062C,0x062D,0x062E,0x062F,
|
||||
0x0630,0x0631,0x0632,0x0633, 0x0634,0x0635,0x0636,0x0637, 0x0638,0x0639,0x063A,0x0000, 0x0000,0x0000,0x0000,0x0000,
|
||||
0x0640,0x0641,0x0642,0x0643, 0x0644,0x0645,0x0646,0x0647, 0x0648,0x0649,0x064A,0x064B, 0x064C,0x064D,0x064E, 0x064F,
|
||||
0x0650,0x0651,0x0652,0x0000, 0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000,
|
||||
};
|
||||
|
||||
uint16_t codetable_03[96] = {
|
||||
0x00A0,0x2018,0x2019,0x00A3, 0x20AC,0x20AF,0x00A6,0x00A7, 0x00A8,0x00A9,0x037A,0x00AB, 0x00AC,0x00AD,0x0000,0x2015,
|
||||
0x00B0,0x00B1,0x00B2,0x00B3, 0x0384,0x0385,0x0386,0x00B7, 0x0388,0x0389,0x038A,0x00BB, 0x038C,0x00BD,0x038E,0x038F,
|
||||
0x0390,0x0391,0x0392,0x0393, 0x0394,0x0395,0x0396,0x0397, 0x0398,0x0399,0x039A,0x039B, 0x039C,0x039D,0x039E,0x039F,
|
||||
0x03A0,0x03A1,0x0000,0x03A3, 0x03A4,0x03A5,0x03A6,0x03A7, 0x03A8,0x03A9,0x03AA,0x03AB, 0x03AC,0x03AD,0x03AE,0x03AF,
|
||||
0x03B0,0x03B1,0x03B2,0x03B3, 0x03B4,0x03B5,0x03B6,0x03B7, 0x03B8,0x03B9,0x03BA,0x03BB, 0x03BC,0x03BD,0x03BE,0x03BF,
|
||||
0x03C0,0x03C1,0x03C2,0x03C3, 0x03C4,0x03C5,0x03C6,0x03C7, 0x03C8,0x03C9,0x03CA,0x03CB, 0x03CC,0x03CD,0x03CE,0x0000,
|
||||
};
|
||||
|
||||
uint16_t codetable_04[96] = {
|
||||
0x00A0,0x0000,0x00A2,0x00A3, 0x00A4,0x00A5,0x00A6,0x00A7, 0x00A8,0x00A9,0x00D7,0x00AB, 0x00AC,0x00AD,0x00AE,0x00AF,
|
||||
0x00B0,0x00B1,0x00B2,0x00B3, 0x00B4,0x00B5,0x00B6,0x00B7, 0x00B8,0x00B9,0x00F7,0x00BB, 0x00BC,0x00BD,0x00BE,0x0000,
|
||||
0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000,
|
||||
0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x2017,
|
||||
0x05D0,0x05D1,0x05D2,0x05D3, 0x05D4,0x05D5,0x05D6,0x05D7, 0x05D8,0x05D9,0x05DA,0x05DB, 0x05DC,0x05DD,0x05DE,0x05DF,
|
||||
0x05E0,0x05E1,0x05E2,0x05E3, 0x05E4,0x05E5,0x05E6,0x05E7, 0x05E8,0x05E9,0x05EA,0x0000, 0x0000,0x200E,0x200F,0x0000,
|
||||
};
|
||||
|
||||
uint16_t codetable_05[96] = {
|
||||
0x00A0,0x00A1,0x00A2,0x00A3, 0x00A4,0x00A5,0x00A6,0x00A7, 0x00A8,0x00A9,0x00AA,0x00AB, 0x00AC,0x00AD,0x00AE,0x00AF,
|
||||
0x00B0,0x00B1,0x00B2,0x00B3, 0x00B4,0x00B5,0x00B6,0x00B7, 0x00B8,0x00B9,0x00BA,0x00BB, 0x00BC,0x00BD,0x00BE,0x00BF,
|
||||
0x00C0,0x00C1,0x00C2,0x00C3, 0x00C4,0x00C5,0x00C6,0x00C7, 0x00C8,0x00C9,0x00CA,0x00CB, 0x00CC,0x00CD,0x00CE,0x00CF,
|
||||
0x011E,0x00D1,0x00D2,0x00D3, 0x00D4,0x00D5,0x00D6,0x00D7, 0x00D8,0x00D9,0x00DA,0x00DB, 0x00DC,0x0130,0x015E,0x00DF,
|
||||
0x00E0,0x00E1,0x00E2,0x00E3, 0x00E4,0x00E5,0x00E6,0x00E7, 0x00E8,0x00E9,0x00EA,0x00EB, 0x00EC,0x00ED,0x00EE,0x00EF,
|
||||
0x011F,0x00F1,0x00F2,0x00F3, 0x00F4,0x00F5,0x00F6,0x00F7, 0x00F8,0x00F9,0x00FA,0x00FB, 0x00FC,0x0131,0x015F,0x00FF,
|
||||
};
|
||||
|
||||
uint16_t codetable_06[96] = {
|
||||
0x00A0,0x0104,0x0112,0x0122, 0x012A,0x0128,0x0136,0x00A7, 0x013B,0x0110,0x0160,0x0166, 0x017D,0x00AD,0x016A,0x014A,
|
||||
0x00B0,0x0105,0x0113,0x0123, 0x012B,0x0129,0x0137,0x00B7, 0x013C,0x0111,0x0161,0x0167, 0x017E,0x2015,0x016B,0x014B,
|
||||
0x0100,0x00C1,0x00C2,0x00C3, 0x00C4,0x00C5,0x00C6,0x012E, 0x010C,0x00C9,0x0118,0x00CB, 0x0116,0x00CD,0x00CE,0x00CF,
|
||||
0x00D0,0x0145,0x014C,0x00D3, 0x00D4,0x00D5,0x00D6,0x0168, 0x00D8,0x0172,0x00DA,0x00DB, 0x00DC,0x00DD,0x00DE,0x00DF,
|
||||
0x0101,0x00E1,0x00E2,0x00E3, 0x00E4,0x00E5,0x00E6,0x012F, 0x010D,0x00E9,0x0119,0x00EB, 0x0117,0x00ED,0x00EE,0x00EF,
|
||||
0x00F0,0x0146,0x014D,0x00F3, 0x00F4,0x00F5,0x00F6,0x0169, 0x00F8,0x0173,0x00FA,0x00FB, 0x00FC,0x00FD,0x00FE,0x0138,
|
||||
};
|
||||
|
||||
uint16_t codetable_07[96] = {
|
||||
0x00A0,0x0E01,0x0E02,0x0E03, 0x0E04,0x0E05,0x0E06,0x0E07, 0x0E08,0x0E09,0x0E0A,0x0E0B, 0x0E0C,0x0E0D,0x0E0E,0x0E0F,
|
||||
0x0E10,0x0E11,0x0E12,0x0E13, 0x0E14,0x0E15,0x0E16,0x0E17, 0x0E18,0x0E19,0x0E1A,0x0E1B, 0x0E1C,0x0E1D,0x0E1E,0x0E1F,
|
||||
0x0E20,0x0E21,0x0E22,0x0E23, 0x0E24,0x0E25,0x0E26,0x0E27, 0x0E28,0x0E29,0x0E2A,0x0E2B, 0x0E2C,0x0E2D,0x0E2E,0x0E2F,
|
||||
0x0E30,0x0E31,0x0E32,0x0E33, 0x0E34,0x0E35,0x0E36,0x0E37, 0x0E38,0x0E39,0x0E3A,0x0000, 0x0000,0x0000,0x0000,0x0E3F,
|
||||
0x0E40,0x0E41,0x0E42,0x0E43, 0x0E44,0x0E45,0x0E46,0x0E47, 0x0E48,0x0E49,0x0E4A,0x0E4B, 0x0E4C,0x0E4D,0x0E4E,0x0E4F,
|
||||
0x0E50,0x0E51,0x0E52,0x0E53, 0x0E54,0x0E55,0x0E56,0x0E57, 0x0E58,0x0E59,0x0E5A,0x0E5B, 0x0000,0x0000,0x0000,0x0000,
|
||||
};
|
||||
|
||||
uint16_t codetable_09[96] = {
|
||||
0x00A0,0x201D,0x00A2,0x00A3, 0x00A4,0x201E,0x00A6,0x00A7, 0x00D8,0x00A9,0x0156,0x00AB, 0x00AC,0x00AD,0x00AE,0x00C6,
|
||||
0x00B0,0x00B1,0x00B2,0x00B3, 0x201C,0x00B5,0x00B6,0x00B7, 0x00F8,0x00B9,0x0157,0x00BB, 0x00BC,0x00BD,0x00BE,0x00E6,
|
||||
0x0104,0x012E,0x0100,0x0106, 0x00C4,0x00C5,0x0118,0x0112, 0x010C,0x00C9,0x0179,0x0116, 0x0122,0x0136,0x012A,0x013B,
|
||||
0x0160,0x0143,0x0145,0x00D3, 0x014C,0x00D5,0x00D6,0x00D7, 0x0172,0x0141,0x015A,0x016A, 0x00DC,0x017B,0x017D,0x00DF,
|
||||
0x0105,0x012F,0x0101,0x0107, 0x00E4,0x00E5,0x0119,0x0113, 0x010D,0x00E9,0x017A,0x0117, 0x0123,0x0137,0x012B,0x013C,
|
||||
0x0161,0x0144,0x0146,0x00F3, 0x014D,0x00F5,0x00F6,0x00F7, 0x0173,0x0142,0x015B,0x016B, 0x00FC,0x017C,0x017E,0x2019,
|
||||
};
|
||||
|
||||
uint16_t codetable_0A[96] = {
|
||||
0x00A0,0x1E02,0x1E03,0x00A3, 0x010A,0x010B,0x1E0A,0x00A7, 0x1E80,0x00A9,0x1E82,0x1E0B, 0x1EF2,0x00AD,0x00AE,0x0178,
|
||||
0x1E1E,0x1E1F,0x0120,0x0121, 0x1E40,0x1E41,0x00B6,0x1E56, 0x1E81,0x1E57,0x1E83,0x1E60, 0x1EF3,0x1E84,0x1E85,0x1E61,
|
||||
0x00C0,0x00C1,0x00C2,0x00C3, 0x00C4,0x00C5,0x00C6,0x00C7, 0x00C8,0x00C9,0x00CA,0x00CB, 0x00CC,0x00CD,0x00CE,0x00CF,
|
||||
0x0174,0x00D1,0x00D2,0x00D3, 0x00D4,0x00D5,0x00D6,0x1E6A, 0x00D8,0x00D9,0x00DA,0x00DB, 0x00DC,0x00DD,0x0176,0x00DF,
|
||||
0x00E0,0x00E1,0x00E2,0x00E3, 0x00E4,0x00E5,0x00E6,0x00E7, 0x00E8,0x00E9,0x00EA,0x00EB, 0x00EC,0x00ED,0x00EE,0x00EF,
|
||||
0x0175,0x00F1,0x00F2,0x00F3, 0x00F4,0x00F5,0x00F6,0x1E6B, 0x00F8,0x00F9,0x00FA,0x00FB, 0x00FC,0x00FD,0x0177,0x00FF,
|
||||
};
|
||||
|
||||
uint16_t codetable_0B[96] = {
|
||||
0x00A0,0x00A1,0x00A2,0x00A3, 0x20AC,0x00A5,0x0160,0x00A7, 0x0161,0x00A9,0x00AA,0x00AB, 0x00AC,0x00AD,0x00AE,0x00AF,
|
||||
0x00B0,0x00B1,0x00B2,0x00B3, 0x017D,0x00B5,0x00B6,0x00B7, 0x017E,0x00B9,0x00BA,0x00BB, 0x0152,0x0153,0x0178,0x00BF,
|
||||
0x00C0,0x00C1,0x00C2,0x00C3, 0x00C4,0x00C5,0x00C6,0x00C7, 0x00C8,0x00C9,0x00CA,0x00CB, 0x00CC,0x00CD,0x00CE,0x00CF,
|
||||
0x00D0,0x00D1,0x00D2,0x00D3, 0x00D4,0x00D5,0x00D6,0x00D7, 0x00D8,0x00D9,0x00DA,0x00DB, 0x00DC,0x00DD,0x00DE,0x00DF,
|
||||
0x00E0,0x00E1,0x00E2,0x00E3, 0x00E4,0x00E5,0x00E6,0x00E7, 0x00E8,0x00E9,0x00EA,0x00EB, 0x00EC,0x00ED,0x00EE,0x00EF,
|
||||
0x00F0,0x00F1,0x00F2,0x00F3, 0x00F4,0x00F5,0x00F6,0x00F7, 0x00F8,0x00F9,0x00FA,0x00FB, 0x00FC,0x00FD,0x00FE,0x00FF,
|
||||
};
|
||||
|
||||
uint16_t *codetable_LUT[12] = {
|
||||
codetable_00,
|
||||
codetable_01,
|
||||
codetable_02,
|
||||
codetable_03,
|
||||
codetable_04,
|
||||
codetable_05,
|
||||
codetable_06,
|
||||
codetable_07,
|
||||
codetable_00,
|
||||
codetable_09,
|
||||
codetable_0A,
|
||||
codetable_0B,
|
||||
};
|
||||
|
||||
|
||||
|
||||
void en300468_parse_string_to_utf8(char *dest, const unsigned int destlen,
|
||||
uint8_t *src, const unsigned int len)
|
||||
void en300468_parse_string_to_utf8(char *dest, uint8_t *src,
|
||||
const unsigned int len)
|
||||
{
|
||||
uint16_t *codetable = codetable_00;
|
||||
int encoding = 0;
|
||||
int skip = 0; // (src[0] < 0x20) ? 1 : 0;
|
||||
if( src[0] < 0x20 ) {
|
||||
encoding = src[0];
|
||||
if( encoding < 12 )
|
||||
codetable = codetable_LUT[encoding];
|
||||
skip = 1;
|
||||
}
|
||||
if( encoding == 0x1F ) {
|
||||
skip = 2;
|
||||
}
|
||||
if( encoding == 0x10 ) {
|
||||
if( src[1] == 0 ) {
|
||||
codetable = codetable_0B;
|
||||
if( src[1] == 0 && src[2] >= 5 && src[2] <= 15 ) {
|
||||
codetable = codetable_LUT[src[2] - 4];
|
||||
}
|
||||
}
|
||||
skip = 3;
|
||||
}
|
||||
uint32_t utf8_cc;
|
||||
int utf8 = (src[0] == 0x15) ? 1 : 0;
|
||||
int skip = (src[0] < 0x20) ? 1 : 0;
|
||||
if( src[0] == 0x10 ) skip += 2;
|
||||
uint16_t utf8_cc;
|
||||
int dest_pos = 0;
|
||||
int emphasis = 0;
|
||||
int i;
|
||||
|
||||
for (i = skip; i < len && dest_pos < destlen - 1; i++) {
|
||||
utf8_cc = *(src + i);
|
||||
if (utf8_cc >= 128 && encoding == 0x15 ) {
|
||||
if( (utf8_cc & 0xC0) == 0xC0 )
|
||||
{
|
||||
i++;
|
||||
utf8_cc &= 0x3F;
|
||||
if( utf8_cc & 0x20 ) utf8_cc &= 0x1F;
|
||||
if( utf8_cc & 0x10 ) utf8_cc &= 0x0F;
|
||||
if( utf8_cc & 0x08 ) utf8_cc &= 0x07;
|
||||
while( i < len && (*(src + i) & 0xC0) == 0x80 ) {
|
||||
utf8_cc = (utf8_cc << 6) | (*(src + i) & 0x3F);
|
||||
i++;
|
||||
}
|
||||
if( utf8_cc > 0x10FFFF )
|
||||
break; // UTF-8 error
|
||||
}
|
||||
else
|
||||
break; // UTF-8 error
|
||||
} else {
|
||||
if( encoding <= 0x10 && utf8_cc >= 0x80 && utf8_cc < 0xA0 )
|
||||
utf8_cc |= 0x0100;
|
||||
else if( utf8_cc >= 0xA0 ) {
|
||||
utf8_cc = codetable[utf8_cc-0xA0];
|
||||
}
|
||||
}
|
||||
for (i = skip; i < len; i++) {
|
||||
switch(*(src + i)) {
|
||||
case SB_CC_RESERVED_80 ... SB_CC_RESERVED_85:
|
||||
case SB_CC_RESERVED_88 ... SB_CC_RESERVED_89:
|
||||
case SB_CC_USER_8B ... SB_CC_USER_9F:
|
||||
case CHARACTER_CR_LF:
|
||||
dest[dest_pos++] = '\n';
|
||||
continue;
|
||||
case CHARACTER_EMPHASIS_ON:
|
||||
emphasis = 1;
|
||||
continue;
|
||||
case CHARACTER_EMPHASIS_OFF:
|
||||
emphasis = 0;
|
||||
continue;
|
||||
case UTF8_CC_START:
|
||||
if (utf8 == 1) {
|
||||
utf8_cc = *(src + i) << 8;
|
||||
utf8_cc += *(src + i + 1);
|
||||
|
||||
if( utf8_cc < 0xA0 ) {
|
||||
switch(utf8_cc) {
|
||||
case 0x00:
|
||||
break;
|
||||
case 0x01 ... 0x7F:
|
||||
dest[dest_pos++] = utf8_cc;
|
||||
break;
|
||||
case CHARACTER_CR_LF:
|
||||
dest[dest_pos++] = '\n';
|
||||
break;
|
||||
case CHARACTER_EMPHASIS_ON:
|
||||
emphasis = 1;
|
||||
break;
|
||||
case CHARACTER_EMPHASIS_OFF:
|
||||
emphasis = 0;
|
||||
break;
|
||||
default: {
|
||||
if( dest_pos < destlen - 2 ) {
|
||||
dest[dest_pos++] = 0xC2;
|
||||
dest[dest_pos++] = (utf8_cc & 0x3F) | 0x80;
|
||||
switch(utf8_cc) {
|
||||
case ((UTF8_CC_START << 8) | CHARACTER_EMPHASIS_ON):
|
||||
emphasis = 1;
|
||||
i++;
|
||||
continue;
|
||||
case ((UTF8_CC_START << 8) | CHARACTER_EMPHASIS_OFF):
|
||||
emphasis = 0;
|
||||
i++;
|
||||
continue;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if( utf8_cc < 0x800 ) {
|
||||
if( dest_pos >= destlen - 2 )
|
||||
break;
|
||||
dest[dest_pos++] = 0xC0 | ((utf8_cc >> 6) & 0x1F);
|
||||
dest[dest_pos++] = (utf8_cc & 0x3F) | 0x80;
|
||||
} else if( utf8_cc < 0x10000 ) {
|
||||
if( dest_pos >= destlen - 3 )
|
||||
break;
|
||||
dest[dest_pos++] = 0xE0 | ((utf8_cc >> 12) & 0x0F);
|
||||
dest[dest_pos++] = ((utf8_cc >> 6) & 0x3F) | 0x80;
|
||||
dest[dest_pos++] = (utf8_cc & 0x3F) | 0x80;
|
||||
} else if( utf8_cc < 0x110000 ) {
|
||||
if( dest_pos >= destlen - 4 )
|
||||
break;
|
||||
dest[dest_pos++] = 0xF0 | ((utf8_cc >> 18) & 0x07);
|
||||
dest[dest_pos++] = ((utf8_cc >> 12) & 0x3F) | 0x80;
|
||||
dest[dest_pos++] = ((utf8_cc >> 6) & 0x3F) | 0x80;
|
||||
dest[dest_pos++] = (utf8_cc & 0x3F) | 0x80;
|
||||
default: {
|
||||
if (*(src + i) < 128)
|
||||
dest[dest_pos++] = *(src + i);
|
||||
else {
|
||||
dest[dest_pos++] = 0xc2 + (*(src + i) > 0xbf);
|
||||
dest[dest_pos++] = (*(src + i) & 0x3f) | 0x80;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1414,18 +1250,19 @@ static int sdt_cb(struct sfilter *sf)
|
||||
if (tag == 0x48) {
|
||||
spnl = buf[doff + 3];
|
||||
snl = buf[doff + 4 + spnl];
|
||||
s->pname[79] = 0x00;
|
||||
s->name[79] = 0x00;
|
||||
en300468_parse_string_to_utf8(s->pname, sizeof(s->pname), buf + doff + 4, spnl);
|
||||
if( s->pname[79] != 0 )
|
||||
fprintf(stderr, "********************************************* PNAME OVERFLOW %d spnl = %d",spnl);
|
||||
en300468_parse_string_to_utf8(s->name, sizeof(s->name), buf + doff + 5 + spnl, snl);
|
||||
if( s->name[79] != 0 )
|
||||
fprintf(stderr, "********************************************* SNAME OVERFLOW %d snl = %d",snl);
|
||||
s->pname[79] = 0x00;
|
||||
s->name[79] = 0x00;
|
||||
en300468_parse_string_to_utf8(s->pname, buf + doff + 4, spnl);
|
||||
if( s->pname[79] != 0 )
|
||||
fprintf(stderr, "********************************************* PNAME OVERFLOW %d spnl = %d",spnl);
|
||||
en300468_parse_string_to_utf8(s->name, buf + doff + 5 + spnl, snl);
|
||||
if( s->name[79] != 0 )
|
||||
fprintf(stderr, "********************************************* SNAME OVERFLOW %d snl = %d",snl);
|
||||
s->got_sdt = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -1755,10 +1592,10 @@ static inline int validcc(struct pid_info *p, uint8_t *tsp)
|
||||
int valid;
|
||||
|
||||
newcc = tsp[3] & 0x0f;
|
||||
valid = (((p->cc + 1) & 0x0f) == newcc) ? 1 : 0;
|
||||
valid = (((p->cc + 1) & 0x0f) == newcc) ? 1 : 0;
|
||||
if (p->cc == 0xff)
|
||||
valid=1;
|
||||
p->cc = newcc;
|
||||
p->cc = newcc;
|
||||
if (!valid) {
|
||||
fprintf(stderr, "CC error PID %04x!\n", p->pid);
|
||||
pid_info_reset(p);
|
||||
@ -1768,15 +1605,15 @@ static inline int validcc(struct pid_info *p, uint8_t *tsp)
|
||||
|
||||
static inline int pid_info_build_section(struct pid_info *p, uint8_t *tsp)
|
||||
{
|
||||
int pusoff, todo = tspayload(tsp), i = 188 - todo;
|
||||
int pusoff, todo = tspayload(tsp), i = 188 - todo;
|
||||
|
||||
if (!todo)
|
||||
return -1;
|
||||
if (!todo)
|
||||
return -1;
|
||||
pusoff = (tsp[1] & 0x40) ? tsp[i++] : todo;
|
||||
if (pusoff + i > 188)
|
||||
goto error;
|
||||
if (validcc(p, tsp) && pusoff && p->bufp) {
|
||||
int rlen = pusoff;
|
||||
int rlen = pusoff;
|
||||
if (p->len) {
|
||||
if (p->bufp + rlen > p->len)
|
||||
rlen = p->len - p->bufp;
|
||||
@ -1791,7 +1628,7 @@ static inline int pid_info_build_section(struct pid_info *p, uint8_t *tsp)
|
||||
}
|
||||
i += pusoff;
|
||||
while ((todo = 188 - i) > 0 && tsp[i] != 0xff) {
|
||||
pid_info_reset(p);
|
||||
pid_info_reset(p);
|
||||
if (todo < 3)
|
||||
fprintf(stderr, "sec start <3 \n");
|
||||
if (todo < 3 || (p->len = seclen(tsp+i)) > todo) {
|
||||
@ -1817,7 +1654,7 @@ error:
|
||||
|
||||
void proc_tsp(struct ts_info *tsi, uint8_t *tsp)
|
||||
{
|
||||
uint16_t pid = 0x1fff & ((tsp[1] << 8) | tsp[2]);
|
||||
uint16_t pid = 0x1fff & ((tsp[1] << 8) | tsp[2]);
|
||||
struct pid_info *pidi = &tsi->pidi[pid];
|
||||
|
||||
if (!pidi->used)
|
||||
@ -1897,7 +1734,7 @@ static void print_events(struct tp_info *tpi)
|
||||
{
|
||||
struct service *s;
|
||||
struct event *e;
|
||||
char t[768];
|
||||
char t[512];
|
||||
int i;
|
||||
uint16_t y;
|
||||
uint8_t m,d;
|
||||
@ -1916,11 +1753,11 @@ static void print_events(struct tp_info *tpi)
|
||||
}
|
||||
printf(" LANG:%c%c%c\n", e->s_lang[0], e->s_lang[1], e->s_lang[2]);
|
||||
if( e->s_name ) {
|
||||
en300468_parse_string_to_utf8(t,sizeof(t),&e->s_name[1],e->s_name[0]);
|
||||
en300468_parse_string_to_utf8(t,&e->s_name[1],e->s_name[0]);
|
||||
printf(" NAME:%s\n",t);
|
||||
}
|
||||
if( e->s_text ) {
|
||||
en300468_parse_string_to_utf8(t,sizeof(t),&e->s_text[1],e->s_text[0]);
|
||||
en300468_parse_string_to_utf8(t,&e->s_text[1],e->s_text[0]);
|
||||
printf(" TEXT:%s\n",t);
|
||||
}
|
||||
printf("END\n");
|
||||
@ -2075,45 +1912,25 @@ void tpstring(struct tp_info *tpi, char *s, int slen)
|
||||
{
|
||||
int len;
|
||||
|
||||
switch (tpi->msys) {
|
||||
case 1:
|
||||
if( tpi->freq_frac )
|
||||
len = snprintf(s, slen,
|
||||
"freq=%u.%04u&msys=dvbc&sr=%u&mtype=%s",
|
||||
tpi->freq, tpi->freq_frac, tpi->sr, mtype2str[tpi->mod]);
|
||||
else
|
||||
len = snprintf(s, slen,
|
||||
"freq=%u&msys=dvbc&sr=%u&mtype=%s",
|
||||
tpi->freq, tpi->sr, mtype2str[tpi->mod]);
|
||||
break;
|
||||
case 2:
|
||||
if( tpi->freq_frac )
|
||||
len = snprintf(s, slen,
|
||||
"freq=%u.%04u&msys=dvbt&bw=%s",
|
||||
tpi->freq, tpi->freq_frac, bw2str[tpi->bw]);
|
||||
else
|
||||
len = snprintf(s, slen,
|
||||
"freq=%u&msys=dvbt&bw=%s",
|
||||
tpi->freq, bw2str[tpi->bw]);
|
||||
break;
|
||||
case 5:
|
||||
case 6:
|
||||
len = snprintf(s, slen,
|
||||
"src=%u&freq=%u&pol=%s&msys=%s&sr=%u",
|
||||
tpi->src,tpi->freq, pol2str[tpi->pol&3],
|
||||
msys2str[tpi->msys], tpi->sr);
|
||||
break;
|
||||
case 16:
|
||||
if( tpi->freq_frac )
|
||||
len = snprintf(s, slen,
|
||||
"freq=%u.%04u&msys=dvbt2&bw=%s&plp=%u",
|
||||
tpi->freq, tpi->freq_frac, bw2str[tpi->bw], tpi->isi);
|
||||
else
|
||||
len = snprintf(s, slen,
|
||||
"freq=%u&msys=dvbt2&bw=%s&plp=%u",
|
||||
tpi->freq, bw2str[tpi->bw], tpi->isi);
|
||||
break;
|
||||
}
|
||||
switch (tpi->msys) {
|
||||
case 1:
|
||||
if( tpi->freq_frac )
|
||||
len = snprintf(s, slen,
|
||||
"freq=%u.%04u&msys=dvbc&sr=%u&mtype=%s",
|
||||
tpi->freq, tpi->freq_frac, tpi->sr, mtype2str[tpi->mod]);
|
||||
else
|
||||
len = snprintf(s, slen,
|
||||
"freq=%u&msys=dvbc&sr=%u&mtype=%s",
|
||||
tpi->freq, tpi->sr, mtype2str[tpi->mod]);
|
||||
break;
|
||||
case 5:
|
||||
case 6:
|
||||
len = snprintf(s, slen,
|
||||
"src=%u&freq=%u&pol=%s&msys=%s&sr=%u",
|
||||
tpi->src,tpi->freq, pol2str[tpi->pol&3],
|
||||
msys2str[tpi->msys], tpi->sr);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -2209,13 +2026,11 @@ void usage() {
|
||||
printf(" symbolrate in kSymbols (required for DVB-S/S2 and DVB-C)\n");
|
||||
printf(" DVB-S/S2 example: --sr=27500\n");
|
||||
printf(" DVB-C example: --sr=6900\n");
|
||||
printf(" --bw=<bandwidth>, -b <bandwidth>\n");
|
||||
printf(" bandwidth 1.712,5,6,7,8,10 (required for DVB-T/T2)\n");
|
||||
printf(" --pol=<polarisation>, -p <polarisation>\n");
|
||||
printf(" polarisation = v,h,r,l (required for DVB-S/S2)\n");
|
||||
printf(" example: --pol=v\n");
|
||||
printf(" --msys=<modulation system>, -m <modulation system>\n");
|
||||
printf(" system = dvbs,dvbs2,dvbc,dvbt,dvbt2 (required)\n");
|
||||
printf(" system = dvbs,dvbs2,dvbc (required)\n");
|
||||
printf(" example: --msys=dvbs\n");
|
||||
printf(" --mtype=<modulation type>, -t <modulation type>\n");
|
||||
printf(" modulation type = 16qam,32qam,64qam,128qam,256qam (required for DVB-C)\n");
|
||||
@ -2290,8 +2105,6 @@ int main(int argc, char **argv)
|
||||
{"sr", required_argument, 0, 's'},
|
||||
{"src", required_argument, 0, 'S'},
|
||||
{"pol", required_argument, 0, 'p'},
|
||||
{"bw", required_argument, 0, 'b'},
|
||||
{"plp", required_argument, 0, 'P'},
|
||||
{"msys", required_argument, 0, 'm'},
|
||||
{"mtype", required_argument, 0, 't'},
|
||||
{"eit", no_argument, 0, 'e'},
|
||||
@ -2300,7 +2113,7 @@ int main(int argc, char **argv)
|
||||
{0, 0, 0, 0}
|
||||
};
|
||||
c = getopt_long(argc, argv,
|
||||
"nf:s:S:p:b:P:m:t:e:x:?",
|
||||
"nf:s:S:p:m:t:e:x:?",
|
||||
long_options, &option_index);
|
||||
if (c==-1)
|
||||
break;
|
||||
@ -2357,7 +2170,7 @@ int main(int argc, char **argv)
|
||||
|
||||
case 'p':
|
||||
i = 0;
|
||||
while( pol2str[i] ) {
|
||||
while( i < 4 ) {
|
||||
if( strcmp(optarg,pol2str[i]) == 0 ) {
|
||||
tpi.pol = i;
|
||||
break;
|
||||
@ -2366,23 +2179,6 @@ int main(int argc, char **argv)
|
||||
}
|
||||
break;
|
||||
|
||||
case 'b':
|
||||
i = 0;
|
||||
while( bw2str[i] ) {
|
||||
if( strcmp(optarg,bw2str[i]) == 0 ) {
|
||||
tpi.bw = i;
|
||||
break;
|
||||
}
|
||||
i += 1;
|
||||
}
|
||||
break;
|
||||
|
||||
case 'P':
|
||||
tpi.isi = strtoul(optarg, NULL, 10);
|
||||
if( tpi.isi > 255 )
|
||||
tpi.isi = 0;
|
||||
break;
|
||||
|
||||
case 'm':
|
||||
i = 0;
|
||||
while( msys2str[i] ) {
|
||||
@ -2394,7 +2190,7 @@ int main(int argc, char **argv)
|
||||
}
|
||||
break;
|
||||
|
||||
case 't':
|
||||
case 't':
|
||||
i = 0;
|
||||
while( mtype2str[i] ) {
|
||||
if( strcmp(optarg,mtype2str[i]) == 0 ) {
|
||||
|
361
octoserve/dvb.c
361
octoserve/dvb.c
@ -194,8 +194,6 @@ static int set_fe_input(struct dvbfe *fe, uint32_t fr,
|
||||
int fd = fe->fd;
|
||||
|
||||
dbgprintf(DEBUG_DVB, "ds = %u, input = %u\n", ds, input);
|
||||
if (fe->set & (1UL << PARAM_FEC))
|
||||
p[5].u.data = fe->param[PARAM_FEC] - 1;
|
||||
|
||||
c.num = ARRAY_SIZE(p);
|
||||
c.props = p;
|
||||
@ -209,10 +207,7 @@ static int set_fe_input(struct dvbfe *fe, uint32_t fr,
|
||||
if (fe->set & (1UL << PARAM_ISI))
|
||||
set_property(fd, DTV_STREAM_ID, fe->param[PARAM_ISI]);
|
||||
if (fe->set & (1UL << PARAM_PLS))
|
||||
set_property(fd, DTV_SCRAMBLING_SEQUENCE_INDEX,
|
||||
fe->param[PARAM_PLS]);
|
||||
if (fe->set & (1UL << PARAM_MTYPE))
|
||||
set_property(fd, DTV_MODULATION, fe->param[PARAM_MTYPE] - 1);
|
||||
set_property(fd, DTV_PLS, fe->param[PARAM_PLS]);
|
||||
set_property(fd, DTV_TUNE, 0);
|
||||
return 0;
|
||||
}
|
||||
@ -329,12 +324,12 @@ static int set_en50607(struct dvbfe *fe, uint32_t freq, uint32_t sr,
|
||||
cmd.msg[0], cmd.msg[1], cmd.msg[2], cmd.msg[3]);
|
||||
}
|
||||
|
||||
static int tune_dvbs2(struct dvbfe *fe)
|
||||
static int tune_sat(struct dvbfe *fe)
|
||||
{
|
||||
uint32_t freq, hi = 0, src, lnb = 0, lnbc = 0, lofs;
|
||||
fe_delivery_system_t ds = fe->param[PARAM_MSYS] - 1;
|
||||
|
||||
dbgprintf(DEBUG_DVB, "tune_dvbs2\n");
|
||||
dbgprintf(DEBUG_DVB, "tune_sat\n");
|
||||
freq = fe->param[PARAM_FREQ];
|
||||
|
||||
if (fe->param[PARAM_SRC])
|
||||
@ -360,17 +355,10 @@ static int tune_dvbs2(struct dvbfe *fe)
|
||||
{
|
||||
if (lofs)
|
||||
hi = (freq > lofs) ? 1 : 0;
|
||||
if (lofs > 10000000) {
|
||||
if (hi)
|
||||
freq -= fe->lof2[lnbc];
|
||||
else
|
||||
freq -= fe->lof1[lnbc];
|
||||
} else {
|
||||
if (hi)
|
||||
freq = fe->lof2[lnbc] - freq;
|
||||
else
|
||||
freq = fe->lof1[lnbc] - freq;
|
||||
}
|
||||
if (hi)
|
||||
freq -= fe->lof2[lnbc];
|
||||
else
|
||||
freq -= fe->lof1[lnbc];
|
||||
}
|
||||
if (fe->first) {
|
||||
fe->first = 0;
|
||||
@ -399,7 +387,7 @@ static int tune_dvbs2(struct dvbfe *fe)
|
||||
}
|
||||
}
|
||||
|
||||
static int tune_dvbc(struct dvbfe *fe)
|
||||
static int tune_c(struct dvbfe *fe)
|
||||
{
|
||||
struct dtv_property p[] = {
|
||||
{ .cmd = DTV_CLEAR },
|
||||
@ -427,7 +415,24 @@ static int tune_dvbc(struct dvbfe *fe)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int tune_dvbt(struct dvbfe *fe)
|
||||
static int tune_cable(struct dvbfe *fe)
|
||||
{
|
||||
uint32_t freq;
|
||||
struct dvb_frontend_parameters p = {
|
||||
.frequency = fe->param[PARAM_FREQ] * 1000,
|
||||
.u.qam.symbol_rate = fe->param[PARAM_SR] * 1000,
|
||||
.u.qam.fec_inner = fe->param[PARAM_FEC] ? (fe->param[PARAM_FEC] - 1) : FEC_AUTO,
|
||||
.u.qam.modulation = fe->param[PARAM_MTYPE] - 1,
|
||||
};
|
||||
set_property(fe->fd, DTV_DELIVERY_SYSTEM, SYS_DVBC_ANNEX_A);
|
||||
if (ioctl(fe->fd, FE_SET_FRONTEND, &p) == -1) {
|
||||
perror("FE_SET_FRONTEND error");
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int tune_terr(struct dvbfe *fe)
|
||||
{
|
||||
struct dtv_property p[] = {
|
||||
{ .cmd = DTV_CLEAR },
|
||||
@ -449,8 +454,33 @@ static int tune_dvbt(struct dvbfe *fe)
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
#if 0
|
||||
static int tune_terr(struct dvbfe *fe)
|
||||
{
|
||||
uint32_t freq;
|
||||
enum fe_bandwidth bw;
|
||||
struct dvb_frontend_parameters p = {
|
||||
.frequency = fe->param[PARAM_FREQ] * 1000,
|
||||
.inversion = INVERSION_AUTO,
|
||||
.u.ofdm.code_rate_HP = FEC_AUTO,
|
||||
.u.ofdm.code_rate_LP = FEC_AUTO,
|
||||
.u.ofdm.constellation = fe->param[PARAM_MTYPE] - 1,
|
||||
.u.ofdm.transmission_mode = TRANSMISSION_MODE_AUTO,
|
||||
.u.ofdm.guard_interval = GUARD_INTERVAL_AUTO,
|
||||
.u.ofdm.hierarchy_information = HIERARCHY_AUTO,
|
||||
.u.ofdm.bandwidth = fe->param[PARAM_BW] ?
|
||||
(fe->param[PARAM_BW] - 1) : BANDWIDTH_AUTO,
|
||||
};
|
||||
set_property(fe->fd, DTV_DELIVERY_SYSTEM, SYS_DVBT);
|
||||
if (ioctl(fe->fd, FE_SET_FRONTEND, &p) == -1) {
|
||||
perror("FE_SET_FRONTEND error");
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
static int tune_dvbc2(struct dvbfe *fe)
|
||||
static int tune_c2(struct dvbfe *fe)
|
||||
{
|
||||
struct dtv_property p[] = {
|
||||
{ .cmd = DTV_CLEAR },
|
||||
@ -474,7 +504,7 @@ static int tune_dvbc2(struct dvbfe *fe)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int tune_dvbt2(struct dvbfe *fe)
|
||||
static int tune_terr2(struct dvbfe *fe)
|
||||
{
|
||||
struct dtv_property p[] = {
|
||||
{ .cmd = DTV_CLEAR },
|
||||
@ -521,76 +551,6 @@ static int tune_isdbt(struct dvbfe *fe)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int tune_isdbc(struct dvbfe *fe)
|
||||
{
|
||||
struct dtv_property p[] = {
|
||||
{ .cmd = DTV_CLEAR },
|
||||
{ .cmd = DTV_FREQUENCY, .u.data = fe->param[PARAM_FREQ] * 1000 },
|
||||
};
|
||||
struct dtv_properties c;
|
||||
int ret;
|
||||
|
||||
set_property(fe->fd, DTV_DELIVERY_SYSTEM, SYS_ISDBC);
|
||||
|
||||
c.num = ARRAY_SIZE(p);
|
||||
c.props = p;
|
||||
ret = ioctl(fe->fd, FE_SET_PROPERTY, &c);
|
||||
if (ret < 0) {
|
||||
fprintf(stderr, "FE_SET_PROPERTY returned %d\n", ret);
|
||||
return -1;
|
||||
}
|
||||
if (fe->set & (1UL << PARAM_ISI))
|
||||
set_property(fe->fd, DTV_STREAM_ID, fe->param[PARAM_ISI]);
|
||||
set_property(fe->fd, DTV_TUNE, 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int tune_j83b(struct dvbfe *fe)
|
||||
{
|
||||
struct dtv_property p[] = {
|
||||
{ .cmd = DTV_CLEAR },
|
||||
{ .cmd = DTV_FREQUENCY, .u.data = fe->param[PARAM_FREQ] * 1000 },
|
||||
};
|
||||
struct dtv_properties c;
|
||||
int ret;
|
||||
|
||||
set_property(fe->fd, DTV_DELIVERY_SYSTEM, SYS_DVBC_ANNEX_B);
|
||||
|
||||
c.num = ARRAY_SIZE(p);
|
||||
c.props = p;
|
||||
ret = ioctl(fe->fd, FE_SET_PROPERTY, &c);
|
||||
if (ret < 0) {
|
||||
fprintf(stderr, "FE_SET_PROPERTY returned %d\n", ret);
|
||||
return -1;
|
||||
}
|
||||
set_property(fe->fd, DTV_TUNE, 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int tune_isdbs(struct dvbfe *fe)
|
||||
{
|
||||
struct dtv_property p[] = {
|
||||
{ .cmd = DTV_CLEAR },
|
||||
{ .cmd = DTV_FREQUENCY, .u.data = fe->param[PARAM_FREQ] },
|
||||
};
|
||||
struct dtv_properties c;
|
||||
int ret;
|
||||
|
||||
set_property(fe->fd, DTV_DELIVERY_SYSTEM, SYS_ISDBS);
|
||||
|
||||
c.num = ARRAY_SIZE(p);
|
||||
c.props = p;
|
||||
ret = ioctl(fe->fd, FE_SET_PROPERTY, &c);
|
||||
if (ret < 0) {
|
||||
fprintf(stderr, "FE_SET_PROPERTY returned %d\n", ret);
|
||||
return -1;
|
||||
}
|
||||
if (fe->set & (1UL << PARAM_ISI))
|
||||
set_property(fe->fd, DTV_STREAM_ID, fe->param[PARAM_ISI]);
|
||||
set_property(fe->fd, DTV_TUNE, 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int tune(struct dvbfe *fe)
|
||||
{
|
||||
int ret;
|
||||
@ -600,33 +560,23 @@ static int tune(struct dvbfe *fe)
|
||||
switch (fe->n_param[PARAM_MSYS] - 1) {
|
||||
case SYS_DVBS:
|
||||
case SYS_DVBS2:
|
||||
ret = tune_dvbs2(fe);
|
||||
ret = tune_sat(fe);
|
||||
break;
|
||||
case SYS_DVBC_ANNEX_A:
|
||||
ret = tune_dvbc(fe);
|
||||
ret = tune_c(fe);
|
||||
break;
|
||||
case SYS_DVBT:
|
||||
ret = tune_dvbt(fe);
|
||||
ret = tune_terr(fe);
|
||||
break;
|
||||
case SYS_DVBT2:
|
||||
ret = tune_dvbt2(fe);
|
||||
ret = tune_terr2(fe);
|
||||
break;
|
||||
case SYS_DVBC2:
|
||||
ret = tune_dvbc2(fe);
|
||||
ret = tune_c2(fe);
|
||||
break;
|
||||
case SYS_ISDBT:
|
||||
ret = tune_isdbt(fe);
|
||||
break;
|
||||
case SYS_DVBC_ANNEX_B:
|
||||
ret = tune_j83b(fe);
|
||||
break;
|
||||
case SYS_DVBC_ANNEX_C:
|
||||
case SYS_ISDBC:
|
||||
ret = tune_isdbc(fe);
|
||||
break;
|
||||
case SYS_ISDBS:
|
||||
ret = tune_isdbs(fe);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@ -1018,7 +968,7 @@ static void calc_lq(struct dvbfe *fe)
|
||||
get_property(fe->fd, DTV_INNER_FEC, &fec);
|
||||
fe->param[PARAM_FEC] = fec + 1;
|
||||
get_property(fe->fd, DTV_MODULATION, &mod);
|
||||
//fe->param[PARAM_MTYPE] = mod + 1;
|
||||
fe->param[PARAM_MTYPE] = mod + 1;
|
||||
|
||||
get_stat(fe->fd, DTV_STAT_PRE_ERROR_BIT_COUNT, &st);
|
||||
ber_num = st.stat[0].uvalue;
|
||||
@ -1121,7 +1071,7 @@ void handle_fe(struct dvbfe *fe)
|
||||
} else {
|
||||
max = 1;
|
||||
nolock++;
|
||||
if (nolock > 100)
|
||||
if (nolock > 20)
|
||||
fe->tune = 1;
|
||||
}
|
||||
break;
|
||||
@ -1157,7 +1107,7 @@ int dvb_tune(struct dvbfe *fe, struct dvb_params *p)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int init_fe(struct octoserve *os, int a, int f, int fd)
|
||||
static int init_fe(struct octoserve *os, int a, int f, int fd, int nodvbt, int msmode)
|
||||
{
|
||||
struct dtv_properties dps;
|
||||
struct dtv_property dp[10];
|
||||
@ -1178,11 +1128,8 @@ static int init_fe(struct octoserve *os, int a, int f, int fd)
|
||||
dbgprintf(DEBUG_DVB, "delivery system %d\n", ds);
|
||||
fe->type |= (1UL << ds);
|
||||
}
|
||||
if (os->nodvbt)
|
||||
if (nodvbt)
|
||||
fe->type &= ~((1UL << SYS_DVBT2) | (1UL << SYS_DVBT));
|
||||
fe->type_orig = fe->type;
|
||||
if (os->delsys_mask)
|
||||
fe->type &= os->delsys_mask;
|
||||
|
||||
if (!fe->type)
|
||||
return -1;
|
||||
@ -1203,9 +1150,8 @@ static int init_fe(struct octoserve *os, int a, int f, int fd)
|
||||
dbgprintf(DEBUG_DVB, "input prop %u = %u\n", i, fe->input[i]);
|
||||
}
|
||||
if (fe->input[3]) {
|
||||
dbgprintf(DEBUG_DVB, "has_feswitch\n");
|
||||
os->has_feswitch = 1;
|
||||
if (!os->scif_type && !os->msmode) {
|
||||
if (!os->scif_type && !msmode) {
|
||||
if (fe->input[2] >= fe->input[1]) {
|
||||
fe->type = 0;
|
||||
return -1;
|
||||
@ -1229,7 +1175,7 @@ static int init_fe(struct octoserve *os, int a, int f, int fd)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int scan_dvbfe(struct octoserve *os)
|
||||
static int scan_dvbfe(struct octoserve *os, int nodvbt, int msmode)
|
||||
{
|
||||
int a, f, fd;
|
||||
char fname[80];
|
||||
@ -1239,7 +1185,7 @@ static int scan_dvbfe(struct octoserve *os)
|
||||
sprintf(fname, "/dev/dvb/adapter%d/frontend%d", a, f);
|
||||
fd = open(fname, O_RDWR);
|
||||
if (fd >= 0) {
|
||||
init_fe(os, a, f, fd);
|
||||
init_fe(os, a, f, fd, nodvbt, msmode);
|
||||
close(fd);
|
||||
}
|
||||
}
|
||||
@ -1254,10 +1200,11 @@ static int ai_callback(void *arg, uint8_t slot_id, uint16_t session_number,
|
||||
{
|
||||
struct dvbca *ca = arg;
|
||||
|
||||
dbgprintf(DEBUG_CI, "Application type: %02x\n", application_type);
|
||||
dbgprintf(DEBUG_CI, "Application manufacturer: %04x\n", application_manufacturer);
|
||||
dbgprintf(DEBUG_CI, "Manufacturer code: %04x\n", manufacturer_code);
|
||||
dbgprintf(DEBUG_CI, "Menu string: %.*s\n", menu_string_length, menu_string);
|
||||
dbgprintf(DEBUG_DVB, "Application type: %02x\n", application_type);
|
||||
dbgprintf(DEBUG_DVB, "Application manufacturer: %04x\n", application_manufacturer);
|
||||
dbgprintf(DEBUG_DVB, "Manufacturer code: %04x\n", manufacturer_code);
|
||||
dbgprintf(DEBUG_DVB, "Menu string: %.*s\n", menu_string_length, menu_string);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -1267,32 +1214,14 @@ static int ca_info_callback(void *arg, uint8_t slot_id, uint16_t snum,
|
||||
struct dvbca *ca = arg;
|
||||
uint32_t i;
|
||||
|
||||
dbgprintf(DEBUG_CI, "CAM supports the following ca system ids:\n");
|
||||
dbgprintf(DEBUG_DVB, "CAM supports the following ca system ids:\n");
|
||||
for (i = 0; i < id_count; i++) {
|
||||
dbgprintf(DEBUG_CI, " 0x%04x\n", ids[i]);
|
||||
dbgprintf(DEBUG_DVB, " 0x%04x\n", ids[i]);
|
||||
}
|
||||
ca->sentpmt = 0;
|
||||
ca->resource_ready = 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int ca_pmt_reply_callback(void *arg, uint8_t slot_id, uint16_t snum,
|
||||
struct en50221_app_pmt_reply *reply,
|
||||
uint32_t reply_size)
|
||||
{
|
||||
struct dvbca *ca = arg;
|
||||
uint32_t i;
|
||||
|
||||
if (!reply->CA_enable_flag || reply->CA_enable != 1) {
|
||||
dbgprintf(DEBUG_CI,
|
||||
"Descrambling not possible:"
|
||||
"ca_enable_flag: %d, ca_enable: 0x%02x", reply->CA_enable_flag, reply->CA_enable);
|
||||
return 0;
|
||||
}
|
||||
dbgprintf(DEBUG_CI, "Descrambling OK\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if 0
|
||||
static int handle_pmt(struct dvbca *ca, uint8_t *buf, int size)
|
||||
{
|
||||
@ -1302,7 +1231,7 @@ static int handle_pmt(struct dvbca *ca, uint8_t *buf, int size)
|
||||
struct section_ext *section_ext = section_ext_decode(section, 0);
|
||||
struct mpeg_pmt_section *pmt = mpeg_pmt_section_codec(section_ext);
|
||||
|
||||
dbgprintf(DEBUG_CI, "handle pmt\n");
|
||||
dbgprintf(DEBUG_DVB, "handle pmt\n");
|
||||
if (section_ext->version_number == ca->ca_pmt_version &&
|
||||
ca->pmt == ca->pmt_old)
|
||||
return;
|
||||
@ -1318,15 +1247,15 @@ static int handle_pmt(struct dvbca *ca, uint8_t *buf, int size)
|
||||
//return;
|
||||
}
|
||||
ca->sentpmt = 1;
|
||||
dbgprintf(DEBUG_CI, "set ca_pmt\n");
|
||||
dbgprintf(DEBUG_DVB, "set ca_pmt\n");
|
||||
|
||||
if ((size = en50221_ca_format_pmt(pmt, capmt, sizeof(capmt), ca->moveca, listmgmt,
|
||||
CA_PMT_CMD_ID_OK_DESCRAMBLING)) < 0) {
|
||||
dbgprintf(DEBUG_CI, "Failed to format PMT\n");
|
||||
dbgprintf(DEBUG_DVB, "Failed to format PMT\n");
|
||||
return -1;
|
||||
}
|
||||
if (en50221_app_ca_pmt(ca->stdcam->ca_resource, ca->stdcam->ca_session_number, capmt, size)) {
|
||||
dbgprintf(DEBUG_CI, "Failed to send PMT\n");
|
||||
dbgprintf(DEBUG_DVB, "Failed to send PMT\n");
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
@ -1350,7 +1279,7 @@ static void handle_tdt(struct dvbca *ca)
|
||||
len = getsec(ca->input, 0x14, 0, 0x70, sec);
|
||||
if (len < 0)
|
||||
return;
|
||||
dbgprintf(DEBUG_CI, "got tdt\n");
|
||||
dbgprintf(DEBUG_DVB, "got tdt\n");
|
||||
|
||||
section = section_codec(sec, len);
|
||||
if (section == NULL)
|
||||
@ -1360,12 +1289,11 @@ static void handle_tdt(struct dvbca *ca)
|
||||
return;
|
||||
dvb_time = dvbdate_to_unixtime(tdt->utc_time);
|
||||
|
||||
dbgprintf(DEBUG_CI, "set dvbtime\n");
|
||||
dbgprintf(DEBUG_DVB, "set dvbtime\n");
|
||||
if (ca->stdcam->dvbtime)
|
||||
ca->stdcam->dvbtime(ca->stdcam, dvb_time);
|
||||
}
|
||||
|
||||
#if 1
|
||||
static int handle_pmts(struct dvbca *ca)
|
||||
{
|
||||
int listmgmt = CA_LIST_MANAGEMENT_ONLY;
|
||||
@ -1377,78 +1305,10 @@ static int handle_pmts(struct dvbca *ca)
|
||||
|
||||
if (!ca->resource_ready)
|
||||
return 0;
|
||||
dbgprintf(DEBUG_DVB, "handle pmts\n");
|
||||
for (i = num = 0; i < MAX_PMT; i++)
|
||||
if (ca->pmt[i])
|
||||
num++;
|
||||
dbgprintf(DEBUG_CI, "ci %u.%u: handle %u pmts\n", ca->anum, ca->fnum, num);
|
||||
for (i = 0; i < num; i++) {
|
||||
len = getsec(ca->input, ca->pmt[i] & 0xffff, ca->pmt[i] >> 16, 2, sec);
|
||||
if (len < 0)
|
||||
return 0;
|
||||
section = section_codec(sec, len);
|
||||
section_ext = section_ext_decode(section, 0);
|
||||
pmt = mpeg_pmt_section_codec(section_ext);
|
||||
|
||||
ca->ca_pmt_version[i] = section_ext->version_number;
|
||||
if (ca->sentpmt) {
|
||||
return 0;
|
||||
listmgmt = CA_LIST_MANAGEMENT_UPDATE;
|
||||
} else {
|
||||
listmgmt = CA_LIST_MANAGEMENT_ONLY;
|
||||
#if 1
|
||||
if (num > 1) {
|
||||
listmgmt = CA_LIST_MANAGEMENT_MORE;
|
||||
if (i == 0)
|
||||
listmgmt = CA_LIST_MANAGEMENT_FIRST;
|
||||
if (i == num - 1)
|
||||
listmgmt = CA_LIST_MANAGEMENT_LAST;
|
||||
}
|
||||
#else
|
||||
if (i > 0)
|
||||
listmgmt = CA_LIST_MANAGEMENT_ADD;
|
||||
#endif
|
||||
}
|
||||
dbgprintf(DEBUG_CI, "set ca_pmt %d = %u as %s\n",
|
||||
i, ca->pmt[i] & 0xffff,
|
||||
(listmgmt == CA_LIST_MANAGEMENT_ONLY) ? "only" :
|
||||
(listmgmt == CA_LIST_MANAGEMENT_ADD) ? "add" :
|
||||
(listmgmt == CA_LIST_MANAGEMENT_FIRST) ? "first" :
|
||||
(listmgmt == CA_LIST_MANAGEMENT_LAST) ? "last" :
|
||||
"more");
|
||||
|
||||
if ((size = en50221_ca_format_pmt(pmt, capmt, sizeof(capmt), ca->moveca, listmgmt,
|
||||
CA_PMT_CMD_ID_OK_DESCRAMBLING)) < 0) {
|
||||
dbgprintf(DEBUG_CI, "Failed to format PMT\n");
|
||||
return -1;
|
||||
}
|
||||
dbgprintf(DEBUG_CI, "ci %u.%u: CA_PMT\n", ca->anum, ca->fnum, num);
|
||||
dump(capmt, size);
|
||||
if (en50221_app_ca_pmt(ca->stdcam->ca_resource, ca->stdcam->ca_session_number, capmt, size)) {
|
||||
dbgprintf(DEBUG_CI, "Failed to send PMT\n");
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
if (num)
|
||||
ca->sentpmt = 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
#else
|
||||
static int handle_pmts(struct dvbca *ca)
|
||||
{
|
||||
int listmgmt = CA_LIST_MANAGEMENT_ONLY;
|
||||
uint8_t sec[4096], capmt[MAX_PMT][4096];
|
||||
struct section *section;
|
||||
struct section_ext *section_ext;
|
||||
struct mpeg_pmt_section *pmt;
|
||||
int i, size[MAX_PMT], num, len;
|
||||
|
||||
if (!ca->resource_ready)
|
||||
return 0;
|
||||
for (i = num = 0; i < MAX_PMT; i++)
|
||||
if (ca->pmt[i])
|
||||
num++;
|
||||
dbgprintf(DEBUG_CI, "handle %u pmts\n", num);
|
||||
for (i = 0; i < num; i++) {
|
||||
len = getsec(ca->input, ca->pmt[i] & 0xffff, ca->pmt[i] >> 16, 2, sec);
|
||||
if (len < 0)
|
||||
@ -1459,11 +1319,10 @@ static int handle_pmts(struct dvbca *ca)
|
||||
|
||||
ca->ca_pmt_version[i] = section_ext->version_number;
|
||||
if (ca->sentpmt) {
|
||||
return 0;
|
||||
//return 0;
|
||||
listmgmt = CA_LIST_MANAGEMENT_UPDATE;
|
||||
} else {
|
||||
listmgmt = CA_LIST_MANAGEMENT_ONLY;
|
||||
#if 0
|
||||
if (num > 1) {
|
||||
listmgmt = CA_LIST_MANAGEMENT_MORE;
|
||||
if (i == 0)
|
||||
@ -1471,40 +1330,25 @@ static int handle_pmts(struct dvbca *ca)
|
||||
if (i == num - 1)
|
||||
listmgmt = CA_LIST_MANAGEMENT_LAST;
|
||||
}
|
||||
#else
|
||||
if (i > 0)
|
||||
listmgmt = CA_LIST_MANAGEMENT_ADD;
|
||||
#endif
|
||||
}
|
||||
dbgprintf(DEBUG_CI, "set ca_pmt %d = %u as %s\n",
|
||||
i, ca->pmt[i] & 0xffff,
|
||||
(listmgmt == CA_LIST_MANAGEMENT_ONLY) ? "only" :
|
||||
(listmgmt == CA_LIST_MANAGEMENT_ADD) ? "add" :
|
||||
(listmgmt == CA_LIST_MANAGEMENT_FIRST) ? "first" :
|
||||
(listmgmt == CA_LIST_MANAGEMENT_LAST) ? "last" :
|
||||
"more");
|
||||
dbgprintf(DEBUG_DVB, "set ca_pmt\n");
|
||||
|
||||
if ((size[i] = en50221_ca_format_pmt(pmt, capmt[i], sizeof(capmt[i]), ca->moveca, listmgmt,
|
||||
if ((size = en50221_ca_format_pmt(pmt, capmt, sizeof(capmt), ca->moveca, listmgmt,
|
||||
CA_PMT_CMD_ID_OK_DESCRAMBLING)) < 0) {
|
||||
dbgprintf(DEBUG_CI, "Failed to format PMT\n");
|
||||
dbgprintf(DEBUG_DVB, "Failed to format PMT\n");
|
||||
return -1;
|
||||
}
|
||||
dump(capmt[i], size[i]);
|
||||
}
|
||||
|
||||
for (i = 0; i < num; i++) {
|
||||
if (en50221_app_ca_pmt(ca->stdcam->ca_resource, ca->stdcam->ca_session_number, capmt[i], size[i])) {
|
||||
dbgprintf(DEBUG_CI, "Failed to send PMT\n");
|
||||
dump(capmt, size);
|
||||
if (en50221_app_ca_pmt(ca->stdcam->ca_resource, ca->stdcam->ca_session_number, capmt, size)) {
|
||||
dbgprintf(DEBUG_DVB, "Failed to send PMT\n");
|
||||
return -1;
|
||||
}
|
||||
dbgprintf(DEBUG_CI, "ca_pmt %d sent\n", i);
|
||||
}
|
||||
if (num)
|
||||
ca->sentpmt = 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
static void proc_csock_msg(struct dvbca *ca, uint8_t *buf, int len)
|
||||
{
|
||||
if (*buf == '\r') {
|
||||
@ -1631,15 +1475,8 @@ static void handle_ci(struct dvbca *ca)
|
||||
continue;
|
||||
}
|
||||
if (ca->setpmt) {
|
||||
dbgprintf(DEBUG_CI, "got new PMT %04x %04x %04x ...\n",
|
||||
ca->pmt_new[0],
|
||||
ca->pmt_new[1],
|
||||
ca->pmt_new[2]);
|
||||
dbgprintf(DEBUG_DVB, "got new PMT %08x\n", ca->pmt_new);
|
||||
memcpy(ca->pmt, ca->pmt_new, sizeof(ca->pmt));
|
||||
dbgprintf(DEBUG_CI, "copied: %04x %04x %04x ...\n",
|
||||
ca->pmt[0],
|
||||
ca->pmt[1],
|
||||
ca->pmt[2]);
|
||||
memset(ca->pmt_old, 0, sizeof(ca->pmt_old));
|
||||
for (i = 0; i < MAX_PMT; i++)
|
||||
ca->ca_pmt_version[i] = -1;
|
||||
@ -1669,10 +1506,10 @@ static void handle_ci(struct dvbca *ca)
|
||||
|
||||
int set_pmt(struct dvbca *ca, uint32_t *pmt)
|
||||
{
|
||||
dbgprintf(DEBUG_CI, "set_pmt %08x %08x %08x\n", pmt[0], pmt[1], pmt[2]);
|
||||
dbgprintf(DEBUG_DVB, "set_pmt %08x %08x %08x\n", pmt[0], pmt[1], pmt[2]);
|
||||
pthread_mutex_lock(&ca->mutex);
|
||||
memcpy(ca->pmt_new, pmt, sizeof(ca->pmt_new));
|
||||
ca->setpmt = 1;
|
||||
memcpy(ca->pmt_new, pmt, sizeof(ca->pmt_new));
|
||||
pthread_mutex_unlock(&ca->mutex);
|
||||
return 0;
|
||||
}
|
||||
@ -1763,19 +1600,19 @@ static int init_ca_stack(struct dvbca *ca)
|
||||
{
|
||||
ca->tl = en50221_tl_create(1, 16);
|
||||
if (ca->tl == NULL) {
|
||||
dbgprintf(DEBUG_CI, "Failed to create transport layer\n");
|
||||
dbgprintf(DEBUG_DVB, "Failed to create transport layer\n");
|
||||
return -1;
|
||||
}
|
||||
ca->sl = en50221_sl_create(ca->tl, 16);
|
||||
if (ca->sl == NULL) {
|
||||
dbgprintf(DEBUG_CI, "Failed to create session layer\n");
|
||||
dbgprintf(DEBUG_DVB, "Failed to create session layer\n");
|
||||
en50221_tl_destroy(ca->tl);
|
||||
return -1;
|
||||
}
|
||||
|
||||
ca->stdcam = en50221_stdcam_llci_create(ca->fd, 0, ca->tl, ca->sl);
|
||||
if (!ca->stdcam) {
|
||||
dbgprintf(DEBUG_CI, "Failed to create stdcam\n");
|
||||
dbgprintf(DEBUG_DVB, "Failed to create stdcam\n");
|
||||
en50221_sl_destroy(ca->sl);
|
||||
en50221_tl_destroy(ca->tl);
|
||||
return -1;
|
||||
@ -1785,7 +1622,6 @@ static int init_ca_stack(struct dvbca *ca)
|
||||
}
|
||||
if (ca->stdcam->ca_resource) {
|
||||
en50221_app_ca_register_info_callback(ca->stdcam->ca_resource, ca_info_callback, ca);
|
||||
en50221_app_ca_register_pmt_reply_callback(ca->stdcam->ca_resource, ca_pmt_reply_callback, ca);
|
||||
}
|
||||
if (ca->stdcam->mmi_resource) {
|
||||
en50221_app_mmi_register_close_callback(ca->stdcam->mmi_resource, mmi_close_callback, ca);
|
||||
@ -1795,7 +1631,7 @@ static int init_ca_stack(struct dvbca *ca)
|
||||
en50221_app_mmi_register_menu_callback(ca->stdcam->mmi_resource, mmi_menu_callback, ca);
|
||||
en50221_app_mmi_register_list_callback(ca->stdcam->mmi_resource, mmi_menu_callback, ca);
|
||||
} else {
|
||||
dbgprintf(DEBUG_CI,
|
||||
dbgprintf(DEBUG_DVB,
|
||||
"CAM Menus are not supported by this interface hardware\n");
|
||||
}
|
||||
return 0;
|
||||
@ -1837,7 +1673,7 @@ static int scan_dvbca(struct octoserve *os)
|
||||
}
|
||||
}
|
||||
}
|
||||
dbgprintf(DEBUG_CI, "Found %d CA interfaces\n", os->dvbca_num);
|
||||
dbgprintf(DEBUG_DVB, "Found %d CA interfaces\n", os->dvbca_num);
|
||||
}
|
||||
|
||||
void scif_config(struct octoserve *os, char *name, char *val)
|
||||
@ -1940,7 +1776,7 @@ void lnb_config(struct octoserve *os, char *name, char *val)
|
||||
}
|
||||
}
|
||||
|
||||
int init_dvb(struct octoserve *os)
|
||||
int init_dvb(struct octoserve *os, int nodvbt, int msmode)
|
||||
{
|
||||
int i, j;
|
||||
uint32_t fmode;
|
||||
@ -1950,16 +1786,13 @@ int init_dvb(struct octoserve *os)
|
||||
os->scif_type = 0;
|
||||
parse_config(os, "scif", &scif_config);
|
||||
|
||||
scan_dvbfe(os);
|
||||
scan_dvbfe(os, nodvbt, msmode);
|
||||
scan_dvbca(os);
|
||||
|
||||
if (os->scif_type)
|
||||
fmode = 0;
|
||||
else
|
||||
fmode = os->msmode;
|
||||
dbgprintf(DEBUG_DVB, "fmode = %u, msmode = %u hasfeswitch = %u\n",
|
||||
fmode, os->msmode, os->has_feswitch);
|
||||
|
||||
fmode = msmode;
|
||||
if (os->has_feswitch)
|
||||
set_fmode(fmode);
|
||||
|
||||
|
@ -162,34 +162,19 @@ void send_xml(struct os_ssdp *ss)
|
||||
uint8_t *mac = &os->mac[0];
|
||||
int serial = (mac[5] | (mac[4] << 8) | (mac[3] << 16)) / 2;
|
||||
char boxname[80];
|
||||
int i;
|
||||
|
||||
read_boxname(boxname);
|
||||
len = 0;
|
||||
|
||||
for (i = 0; i < 5; i++)
|
||||
switch ((i + os->first_ds) % 5) {
|
||||
case 0:
|
||||
if (os->dvbs2num)
|
||||
len += sprintf(cap + len, ",DVBS2-%u", os->dvbs2num);
|
||||
break;
|
||||
case 1:
|
||||
if (os->dvbtnum)
|
||||
len += sprintf(cap + len, ",DVBT-%u", os->dvbtnum);
|
||||
break;
|
||||
case 2:
|
||||
if (os->dvbt2num)
|
||||
len += sprintf(cap + len, ",DVBT2-%u", os->dvbt2num);
|
||||
break;
|
||||
case 3:
|
||||
if (os->dvbcnum)
|
||||
len += sprintf(cap + len, ",DVBC-%u", os->dvbcnum);
|
||||
break;
|
||||
case 4:
|
||||
if (os->dvbc2num)
|
||||
len += sprintf(cap + len, ",DVBC2-%u", os->dvbc2num);
|
||||
break;
|
||||
}
|
||||
if (os->dvbs2num)
|
||||
len += sprintf(cap + len, ",DVBS2-%u", os->dvbs2num);
|
||||
if (os->dvbtnum)
|
||||
len += sprintf(cap + len, ",DVBT-%u", os->dvbtnum);
|
||||
if (os->dvbt2num)
|
||||
len += sprintf(cap + len, ",DVBT2-%u", os->dvbt2num);
|
||||
if (os->dvbcnum)
|
||||
len += sprintf(cap + len, ",DVBC-%u", os->dvbcnum);
|
||||
if (os->dvbc2num)
|
||||
len += sprintf(cap + len, ",DVBC2-%u", os->dvbc2num);
|
||||
len = snprintf(buf, sizeof(buf), xmldesc,
|
||||
ss->configid, boxname,
|
||||
serial, ss->uuid_str, cap + 1);
|
||||
@ -241,7 +226,6 @@ void send_serverinfo(struct os_ssdp *ss)
|
||||
sendstr(fd, "Octoserve.DeviceID = %u;\r\n", ss->devid);
|
||||
sendstr(fd, "Octoserve.MAC = \"%02x:%02x:%02x:%02x:%02x:%02x\";\r\n",
|
||||
mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]);
|
||||
sendstr(fd, "Octoserve.DelsysMask = %u;\r\n", os->delsys_mask);
|
||||
sendstr(fd, "Octoserve.TunerList = new Array();\r\n");
|
||||
for (i = 0; i < os->dvbfe_num; i++) {
|
||||
struct dvbfe *fe = &os->dvbfe[i];
|
||||
@ -281,7 +265,7 @@ void send_serverinfo(struct os_ssdp *ss)
|
||||
types[pos] = '-';
|
||||
}
|
||||
sendstr(fd, "Octoserve.TunerList[%d] = new Object();\r\n", i);
|
||||
sendstr(fd, "Octoserve.TunerList[%d].Type = %u;\r\n", i, fe->type_orig);
|
||||
sendstr(fd, "Octoserve.TunerList[%d].Type = 0;\r\n", i);
|
||||
sendstr(fd, "Octoserve.TunerList[%d].Desc = \"%s\";\r\n", i, types);
|
||||
} else {
|
||||
sendstr(fd, "Octoserve.TunerList[%d] = false;\r\n", i);
|
||||
@ -346,7 +330,7 @@ void send_json_serverinfo(struct os_ssdp *ss)
|
||||
types[pos] = '-';
|
||||
}
|
||||
sendstr(fd, ",\"Present\":true", i);
|
||||
sendstr(fd, ",\"Type\":%u", fe->type);
|
||||
sendstr(fd, ",\"Type\":0");
|
||||
sendstr(fd, ",\"Desc\":\"%s\"", types);
|
||||
} else {
|
||||
sendstr(fd, "\"Present\":false", i);
|
||||
@ -577,8 +561,7 @@ void handle_http(struct os_ssdp *ss)
|
||||
while (buf[j] && buf[j] != '\r' && buf[j] != ' ')
|
||||
j++;
|
||||
buf[j] = 0;
|
||||
if (i == j ||
|
||||
(NULL !=strstr(buf + i, ".."))) {
|
||||
if (i == j) {
|
||||
send_http_error(ss->csock, 404);
|
||||
break;
|
||||
}
|
||||
|
@ -55,7 +55,7 @@ void proc_igmp(struct octoserve *os, uint8_t *b, int l, uint8_t *macheader)
|
||||
//0x0000: 0100 5e07 0101 089e 01b2 03c9 0800 46c0
|
||||
//0x0010: 0020 0000 4000 0102 3159 c0a8 020e ef07
|
||||
//0x0020: 0101 9404 0000 1600 f9f6 ef07 0101
|
||||
//dump(b, l);
|
||||
dump(b, l);
|
||||
sprintf(sd, "%03d.%03d.%03d.%03d -> %03d.%03d.%03d.%03d",
|
||||
b[12], b[13], b[14], b[15],
|
||||
b[16], b[17], b[18], b[19]);
|
||||
|
@ -44,14 +44,14 @@ void dump(const uint8_t *b, int l)
|
||||
for (j = 0; j < l; j += 16, b += 16) {
|
||||
for (i = 0; i < 16; i++)
|
||||
if (i + j < l)
|
||||
fprintf(stderr, "%02x ", b[i]);
|
||||
printf("%02x ", b[i]);
|
||||
else
|
||||
fprintf(stderr, " ");
|
||||
fprintf(stderr, " | ");
|
||||
printf(" ");
|
||||
printf(" | ");
|
||||
for (i = 0; i < 16; i++)
|
||||
if (i + j < l)
|
||||
fputc((b[i] > 31 && b[i] < 127) ? b[i] : '.', stderr);
|
||||
fprintf(stderr, "\n");
|
||||
putchar((b[i] > 31 && b[i] < 127) ? b[i] : '.');
|
||||
printf("\n");
|
||||
}
|
||||
}
|
||||
|
||||
@ -214,7 +214,7 @@ void send_error(struct oscon *con, int err)
|
||||
if (rerr->number == err)
|
||||
break;
|
||||
if (!rerr->number) {
|
||||
dbgprintf(DEBUG_NET, "Internal Error: invalid error number %d\n", err);
|
||||
printf("Internal Error: invalid error number %d\n", err);
|
||||
return;
|
||||
}
|
||||
len=sprintf(buf,
|
||||
@ -246,7 +246,7 @@ static struct dvbca *alloc_ca_num(struct osstrm *str, int num)
|
||||
pthread_mutex_lock(&os->lock);
|
||||
ca = &os->dvbca[num];
|
||||
if (ca->state == 0) {
|
||||
dbgprintf(DEBUG_CI, "alloced ca %d\n", num);
|
||||
printf("alloced ca %d\n", num);
|
||||
pthread_mutex_lock(&ca->mutex);
|
||||
memset(ca->pmt, 0, sizeof(ca->pmt));
|
||||
ca->state = 1;
|
||||
@ -266,12 +266,12 @@ static struct dvbca *alloc_ca(struct osstrm *str)
|
||||
struct dvbca *ca;
|
||||
uint32_t i;
|
||||
|
||||
dbgprintf(DEBUG_CI, "alloc ca\n");
|
||||
printf("alloc ca\n");
|
||||
pthread_mutex_lock(&os->lock);
|
||||
for (i = 0; i < os->dvbca_num; i++) {
|
||||
ca = &os->dvbca[i];
|
||||
if (ca->state == 0) {
|
||||
dbgprintf(DEBUG_CI, "alloced ca %d\n", i);
|
||||
printf("alloced ca %d\n", i);
|
||||
pthread_mutex_lock(&ca->mutex);
|
||||
memset(ca->pmt, 0, sizeof(ca->pmt));
|
||||
ca->state = 1;
|
||||
@ -524,22 +524,21 @@ static void check_mccs(struct ossess *sess)
|
||||
sess->mcc_tag++;
|
||||
send_igmp_query(sess->os, sess->trans.mcip, 10);
|
||||
sess->mcc_time = t;
|
||||
dbgprintf(DEBUG_IGMP, "%u: mcc_state 1 done, tag = %d\n", t, sess->mcc_tag);
|
||||
printf("%u: mcc_state 1 done, tag = %d\n", t, sess->mcc_tag);
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (tdiff >= 1) {
|
||||
sess->mcc_state = 3;
|
||||
send_igmp_query(sess->os, sess->trans.mcip, 10);
|
||||
dbgprintf(DEBUG_IGMP, "%u: mcc_state 2 done, tag = %d\n", t, sess->mcc_tag);
|
||||
printf("%u: mcc_state 2 done, tag = %d\n", t, sess->mcc_tag);
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
if (tdiff >= 2) {
|
||||
sess->mcc_state = 0;
|
||||
sess->mcc_time = t;
|
||||
dbgprintf(DEBUG_IGMP,
|
||||
"%u: mcc_state 3 done, tag = %d\n", t, sess->mcc_tag);
|
||||
printf("%u: mcc_state 3 done, tag = %d\n", t, sess->mcc_tag);
|
||||
update = 1;
|
||||
}
|
||||
break;
|
||||
@ -667,7 +666,7 @@ static struct oscon *alloc_con(struct octoserve *os)
|
||||
|
||||
int die(char *msg)
|
||||
{
|
||||
dbgprintf(DEBUG_SYS, "%s\n", msg);
|
||||
printf("%s\n", msg);
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
@ -700,17 +699,16 @@ static void send_option(struct oscon *con)
|
||||
#define PAR2STR(par) ((p->set & (1UL << PARAM_##par)) ? par##2str[p->param[PARAM_POL]] : "")
|
||||
|
||||
char *pol2str[] = {"", "v", "h", "r", "l", NULL};
|
||||
char *msys2str [] = {"", "undef", "dvbc", "j83b", "dvbt", "dss", "dvbs", "dvbs2", "dvbh",
|
||||
char *msys2str [] = {"", "undef", "dvbc", "dvbcb", "dvbt", "dss", "dvbs", "dvbs2", "dvbh",
|
||||
"isdbt", "isdbs", "isdbc", "atsc", "atscmh", "dtmb", "cmmb", "dab",
|
||||
"dvbt2", "turbo", "dvbcc", "dvbc2", NULL};
|
||||
char *mtype2str [] = {"", "qpsk", "16qam", "32qam",
|
||||
"64qam", "128qam", "256qam",
|
||||
"autoqam", "8vsb", "16vsb", "8psk",
|
||||
"16apsk", "32apsk", "dqpsk", "4qamnr",
|
||||
"64apsk", "128apsk", "256apsk", NULL};
|
||||
"16apsk", "32apsk", "dqpsk", "4qamnr", NULL};
|
||||
char *pilot2str [] = {"", "on", "off", "auto", NULL};
|
||||
char *roll2str [] = {"", "0.35", "0.20", "0.25", NULL};
|
||||
char *fec2str [] = {"", "none", "12", "23", "34", "45", "56", "67", "78", "89", "auto", "35", "910", "25", "14", "13", NULL};
|
||||
char *fec2str [] = {"", "none", "12", "23", "34", "56", "78", "89", "35", "45", "910", "25", NULL};
|
||||
char *bw2str [] = {"", "8", "7", "6", "auto", "5", "10", "1.712", NULL };
|
||||
char *tmode2str [] = { "", "2k", "8k", "auto", "4k", "1k", "16k", "32k", "c1", "c3780", NULL};
|
||||
char *gi2str [] = { "", "132", "116", "18", "14", "auto", "1128", "19128", "19256", "pn420", "pn595", "pn945", NULL};
|
||||
@ -1115,13 +1113,12 @@ static int parse_url(struct oscon *con, int streamonly)
|
||||
dbgprintf(DEBUG_SYS, "t2id=%d, ", p->param[PARAM_T2ID]);
|
||||
} else if (!strncasecmp(url, "x_isi=", 6)) {
|
||||
url += 6;
|
||||
p->param[PARAM_ISI] = strtoul(url, &end, 0);
|
||||
p->param[PARAM_ISI] = strtoul(url, &end, 10);
|
||||
if (end == url)
|
||||
break;
|
||||
p->set |= (1UL << PARAM_ISI);
|
||||
dbgprintf(DEBUG_SYS, "x_isi=%d, ", p->param[PARAM_ISI]);
|
||||
} else if (!strncasecmp(url, "x_pls=", 6) ||
|
||||
!strncasecmp(url, "x_ssi=", 6)) {
|
||||
} else if (!strncasecmp(url, "x_pls=", 6)) {
|
||||
url += 6;
|
||||
p->param[PARAM_PLS] = strtoul(url, &end, 0);
|
||||
if (end == url)
|
||||
@ -1390,9 +1387,7 @@ static int setup_nsp(struct ostrans *trans, struct dvb_ns_params *nsp)
|
||||
memset(nsp, 0, sizeof(struct dvb_ns_params));
|
||||
memcpy(nsp->dmac, trans->cmac, 6);
|
||||
memcpy(nsp->smac, trans->smac, 6);
|
||||
#ifndef MAC_ODD
|
||||
nsp->smac[5] |= 1;
|
||||
#endif
|
||||
nsp->sport = trans->sport;
|
||||
nsp->sport2 = trans->sport2;
|
||||
nsp->dport = trans->cport;
|
||||
@ -1627,7 +1622,7 @@ static int stop_session(struct ossess *sess)
|
||||
return 0;
|
||||
sess->playing &= ~1;
|
||||
if (!session_is_playing(sess)) {
|
||||
dbgprintf(DEBUG_RTSP, "stopping session %d\n", sess->nr);
|
||||
printf("stopping session %d\n", sess->nr);
|
||||
if (sess->nsfd >= 0)
|
||||
ioctl(sess->nsfd, NS_STOP);
|
||||
}
|
||||
@ -1638,7 +1633,7 @@ static int stop_session(struct ossess *sess)
|
||||
static int start_session(struct ossess *sess)
|
||||
{
|
||||
if (!session_is_playing(sess)) {
|
||||
dbgprintf(DEBUG_RTSP, "start session %d\n", sess->nr);
|
||||
dbgprintf(DEBUG_SYS, "start session %d\n", sess->nr);
|
||||
if (sess->stream->ca) {
|
||||
uint8_t canum = sess->stream->ca->nr - 1;
|
||||
if (sess->nsfd >= 0)
|
||||
@ -1718,10 +1713,10 @@ void mc_check(struct ossess *sess, int update)
|
||||
next = mcc->mcc.le_next;
|
||||
if (((sess->mcc_state == 0) && (sess->mcc_tag != mcc->tag)) ||
|
||||
(((os->igmp_mode & 1) == 0) && (os->igmp_tag - mcc->gtag) > 1)) {
|
||||
dbgprintf(DEBUG_IGMP, "removed client at %u.%u.%u.%u\n",
|
||||
mcc->ip[0], mcc->ip[1], mcc->ip[2], mcc->ip[3]);
|
||||
dbgprintf(DEBUG_IGMP, "mcc_tags: %d %d\n", sess->mcc_tag, mcc->tag);
|
||||
dbgprintf(DEBUG_IGMP, "gtags: %d %d\n", os->igmp_tag, mcc->gtag);
|
||||
printf("removed client at %u.%u.%u.%u\n",
|
||||
mcc->ip[0], mcc->ip[1], mcc->ip[2], mcc->ip[3]);
|
||||
printf("mcc_tags: %d %d\n", sess->mcc_tag, mcc->tag);
|
||||
printf("gtags: %d %d\n", os->igmp_tag, mcc->gtag);
|
||||
LIST_REMOVE(mcc, mcc);
|
||||
free(mcc);
|
||||
}
|
||||
@ -1773,19 +1768,18 @@ void mc_join(struct octoserve *os, uint8_t *ip, uint8_t *mac, uint8_t *group)
|
||||
goto out;
|
||||
|
||||
session_mc_timeout(sess);
|
||||
dbgprintf(DEBUG_IGMP, "matched session %d to join %u.%u.%u.%u\n",
|
||||
sess->nr, ip[0], ip[1], ip[2], ip[3]);
|
||||
printf("matched session %d to join %u.%u.%u.%u\n",
|
||||
sess->nr, ip[0], ip[1], ip[2], ip[3]);
|
||||
for (mcc = sess->mccs.lh_first; mcc; mcc = mcc->mcc.le_next)
|
||||
if (!memcmp(ip, mcc->ip, 4)) {
|
||||
mcc->tag = sess->mcc_tag;
|
||||
mcc->gtag = os->igmp_tag;
|
||||
dbgprintf(DEBUG_IGMP,
|
||||
"already in list, tag = %08x, gtag = %08x\n", mcc->tag, mcc->gtag);
|
||||
printf("already in list, tag = %08x, gtag = %08x\n", mcc->tag, mcc->gtag);
|
||||
goto out;
|
||||
}
|
||||
newmcc = malloc(sizeof(struct osmcc));
|
||||
if (!newmcc) {
|
||||
dbgprintf(DEBUG_IGMP, "Could not allocate new multicast client entry\n");
|
||||
printf("Could not allocate new multicast client entry\n");
|
||||
goto out;
|
||||
}
|
||||
memset(newmcc, 0, sizeof(struct osmcc));
|
||||
@ -1801,7 +1795,7 @@ void mc_join(struct octoserve *os, uint8_t *ip, uint8_t *mac, uint8_t *group)
|
||||
port = switch_get_port(newmcc->mac);
|
||||
else
|
||||
port = 0;
|
||||
dbgprintf(DEBUG_IGMP, "New client at port %02x\n", port);
|
||||
printf("New client at port %02x\n", port);
|
||||
if (port >= 0) {
|
||||
newmcc->port_vec = port;
|
||||
sess->mcc_port_vec |= port;
|
||||
@ -1831,8 +1825,8 @@ void mc_leave(struct octoserve *os, uint8_t *ip, uint8_t *group)
|
||||
if ((sess = match_session(os, group)) == NULL)
|
||||
goto out;
|
||||
|
||||
dbgprintf(DEBUG_IGMP, "matched session %d to leave %u.%u.%u.%u\n",
|
||||
sess->nr, ip[0], ip[1], ip[2], ip[3]);
|
||||
printf("matched session %d to leave %u.%u.%u.%u\n",
|
||||
sess->nr, ip[0], ip[1], ip[2], ip[3]);
|
||||
mc_query(sess);
|
||||
|
||||
for (mcc = sess->mccs.lh_first; mcc; mcc = next) {
|
||||
@ -1893,7 +1887,7 @@ static int parse_transport(struct oscon *con, char *line)
|
||||
for (arg = line; *arg == ' '; arg++);
|
||||
|
||||
do {
|
||||
dbgprintf(DEBUG_RTSP, "arg:%s\n", arg);
|
||||
printf("arg:%s\n", arg);
|
||||
if (!strncasecmp(arg, "RTP/AVP/UDP", 11)) {
|
||||
t->rtp = 1;
|
||||
end = arg + 11;
|
||||
@ -1988,7 +1982,7 @@ static int parse_x_octonet(struct oscon *con, char *line)
|
||||
if (port < 7)
|
||||
con->x_ports |= 1 << (port - 1);
|
||||
} while (*(arg++) == ',');
|
||||
dbgprintf(DEBUG_SWITCH, "x_ports = %02x\n", con->x_ports);
|
||||
printf("x_ports = %02x\n", con->x_ports);
|
||||
} else
|
||||
return -1;
|
||||
arg = end;
|
||||
@ -2235,7 +2229,7 @@ static int proc_line(struct oscon *con)
|
||||
}
|
||||
if (con->x_octonet_parsed) {
|
||||
con->session->port_vec = con->x_ports;
|
||||
dbgprintf(DEBUG_SWITCH, "port_vec = %02x\n", con->session->port_vec);
|
||||
printf("port_vec = %02x\n", con->session->port_vec);
|
||||
}
|
||||
res = play_session(con);
|
||||
if (res < 0)
|
||||
@ -2549,7 +2543,7 @@ static int alloc_igmp_raw_socket(struct octoserve *os)
|
||||
|
||||
n = setsockopt(s, SOL_SOCKET, SO_ATTACH_FILTER, &sfprog, sizeof(sfprog));
|
||||
if (n < 0) {
|
||||
dbgprintf(DEBUG_NET, "could not set filter\n");
|
||||
printf("could not set filter\n");
|
||||
}
|
||||
|
||||
#if 0
|
||||
@ -2655,7 +2649,7 @@ static void os_serve(struct octoserve *os)
|
||||
}
|
||||
if (FD_ISSET(os->mld_sock, &fds)) {
|
||||
n = recvfrom(os->mld_sock, buf, sizeof(buf), 0, &cadr, &clen);
|
||||
//printf("n = %d\n", n);
|
||||
printf("n = %d\n", n);
|
||||
if (n > 0)
|
||||
;//dump(buf, n);
|
||||
}
|
||||
@ -2697,6 +2691,91 @@ static void os_serve(struct octoserve *os)
|
||||
killall_sessions(os);
|
||||
}
|
||||
|
||||
static struct octoserve *os_init(char *ifname, int nossdp, int nodms, int nodvbt, int msmode)
|
||||
{
|
||||
struct octoserve *os;
|
||||
struct os_ssdp *ss;
|
||||
struct ifreq ifr;
|
||||
int s;
|
||||
pthread_mutexattr_t mta;
|
||||
|
||||
os = malloc(sizeof(*os));
|
||||
if (!os)
|
||||
return NULL;
|
||||
dbgprintf(DEBUG_SYS, "allocated octoserve struct, %d bytes\n", sizeof(*os));
|
||||
memset(os, 0, sizeof(struct octoserve));
|
||||
|
||||
pthread_mutexattr_init(&mta);
|
||||
pthread_mutexattr_settype(&mta, PTHREAD_MUTEX_RECURSIVE);
|
||||
pthread_mutex_init(&os->lock, &mta);
|
||||
|
||||
os->ifname = ifname;
|
||||
os->sessionid = random();
|
||||
|
||||
if (get_ifa(ifname, AF_INET, (struct sockaddr *) &os->ssdp.sadr) < 0) {
|
||||
perror("no such interface:");
|
||||
free(os);
|
||||
return NULL;
|
||||
}
|
||||
get_ifa(ifname, AF_INET6, (struct sockaddr *) &os->ssdp.sadr6);
|
||||
sockname((struct sockaddr *) &os->ssdp.sadr, os->ssdp.ip);
|
||||
sockname((struct sockaddr *) &os->ssdp.sadr6, os->ssdp.ip6);
|
||||
|
||||
strcpy(ifr.ifr_name, os->ifname);
|
||||
s = socket(AF_INET, SOCK_DGRAM, 0);
|
||||
ioctl(s, SIOCGIFHWADDR, &ifr);
|
||||
close(s);
|
||||
memcpy(os->mac, ifr.ifr_hwaddr.sa_data, 6);
|
||||
dbgprintf(DEBUG_NET, "MAC %s=%02x:%02x:%02x:%02x:%02x:%02x\n",
|
||||
os->ifname,
|
||||
os->mac[0], os->mac[1], os->mac[2],
|
||||
os->mac[3], os->mac[4], os->mac[5]);
|
||||
if (os->has_switch)
|
||||
switch_get_port(os->mac);
|
||||
|
||||
init_dvb(os, nodvbt, msmode);
|
||||
|
||||
ss = &os->ssdp;
|
||||
if (init_ssdp(os, &os->ssdp, debug, nossdp, nodms) < 0) {
|
||||
release_dvb(os);
|
||||
free(os);
|
||||
return NULL;
|
||||
}
|
||||
#if 0
|
||||
if (init_httpos, debug) < 0) {
|
||||
release_dvb(os);
|
||||
free(os);
|
||||
return NULL;
|
||||
}
|
||||
#endif
|
||||
return os;
|
||||
}
|
||||
|
||||
struct octoserve *os;
|
||||
|
||||
void term_action(int sig)
|
||||
{
|
||||
printf("EXIT\n");
|
||||
os->exit = 1;
|
||||
}
|
||||
|
||||
static int set_termaction(void)
|
||||
{
|
||||
struct sigaction term;
|
||||
|
||||
memset(&term, 0, sizeof(term));
|
||||
term.sa_handler = term_action;
|
||||
sigemptyset(&term.sa_mask);
|
||||
term.sa_flags = 0;
|
||||
sigaction(SIGINT, &term, NULL);
|
||||
|
||||
memset(&term, 0, sizeof(term));
|
||||
term.sa_handler = term_action;
|
||||
sigemptyset(&term.sa_mask);
|
||||
term.sa_flags = 0;
|
||||
sigaction(SIGTERM, &term, NULL);
|
||||
}
|
||||
|
||||
static int fexists(char *fn)
|
||||
{
|
||||
struct stat b;
|
||||
@ -2704,49 +2783,6 @@ static int fexists(char *fn)
|
||||
return (!stat(fn, &b));
|
||||
}
|
||||
|
||||
static int read_num(char *fn, int *num)
|
||||
{
|
||||
FILE *f;
|
||||
|
||||
f = fopen(fn, "r");
|
||||
if (!f)
|
||||
return -1;
|
||||
fscanf(f, "%i", num);
|
||||
fclose(f);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void read_first_ds(struct octoserve *os)
|
||||
{
|
||||
int num;
|
||||
int res = read_num("/config/first_ds", &num);
|
||||
|
||||
if (res < 0)
|
||||
os->first_ds = 0;
|
||||
else
|
||||
os->first_ds = num;
|
||||
|
||||
dbgprintf(DEBUG_SYS, "first_ds = %u\n", os->first_ds);
|
||||
}
|
||||
|
||||
static void read_delsys_mask(struct octoserve *os)
|
||||
{
|
||||
int fd, len;
|
||||
char mask[80];
|
||||
|
||||
os->delsys_mask = 0;
|
||||
fd = open("/config/delsys_mask", O_RDONLY);
|
||||
if (fd < 0)
|
||||
return;
|
||||
len = read(fd, mask, 79);
|
||||
if (len < 0)
|
||||
return;
|
||||
close (fd);
|
||||
if (len)
|
||||
os->delsys_mask = strtol(mask, NULL, 0);
|
||||
dbgprintf(DEBUG_SYS, "delsys_mask = %08x\n", os->delsys_mask);
|
||||
}
|
||||
|
||||
static int read_msmode(char *fn)
|
||||
{
|
||||
int fd, len;
|
||||
@ -2772,108 +2808,17 @@ static int read_msmode(char *fn)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct octoserve *os_init(char *ifname, int nossdp, int nodms)
|
||||
{
|
||||
struct octoserve *os;
|
||||
struct os_ssdp *ss;
|
||||
struct ifreq ifr;
|
||||
int s;
|
||||
pthread_mutexattr_t mta;
|
||||
|
||||
os = malloc(sizeof(*os));
|
||||
if (!os)
|
||||
return NULL;
|
||||
dbgprintf(DEBUG_SYS, "allocated octoserve struct, %d bytes\n", sizeof(*os));
|
||||
memset(os, 0, sizeof(struct octoserve));
|
||||
|
||||
if (fexists("/config/nodvbt.enabled"))
|
||||
os->nodvbt = 1;
|
||||
os->msmode = read_msmode("/config/msmode");
|
||||
read_first_ds(os);
|
||||
read_delsys_mask(os);
|
||||
pthread_mutexattr_init(&mta);
|
||||
pthread_mutexattr_settype(&mta, PTHREAD_MUTEX_RECURSIVE);
|
||||
pthread_mutex_init(&os->lock, &mta);
|
||||
|
||||
os->ifname = ifname;
|
||||
os->sessionid = random();
|
||||
if (get_ifa(ifname, AF_INET, (struct sockaddr *) &os->ssdp.sadr) < 0) {
|
||||
perror("no such interface:");
|
||||
free(os);
|
||||
return NULL;
|
||||
}
|
||||
get_ifa(ifname, AF_INET6, (struct sockaddr *) &os->ssdp.sadr6);
|
||||
sockname((struct sockaddr *) &os->ssdp.sadr, os->ssdp.ip);
|
||||
sockname((struct sockaddr *) &os->ssdp.sadr6, os->ssdp.ip6);
|
||||
|
||||
strcpy(ifr.ifr_name, os->ifname);
|
||||
s = socket(AF_INET, SOCK_DGRAM, 0);
|
||||
ioctl(s, SIOCGIFHWADDR, &ifr);
|
||||
close(s);
|
||||
memcpy(os->mac, ifr.ifr_hwaddr.sa_data, 6);
|
||||
dbgprintf(DEBUG_NET, "MAC %s=%02x:%02x:%02x:%02x:%02x:%02x\n",
|
||||
os->ifname,
|
||||
os->mac[0], os->mac[1], os->mac[2],
|
||||
os->mac[3], os->mac[4], os->mac[5]);
|
||||
if (os->has_switch)
|
||||
switch_get_port(os->mac);
|
||||
|
||||
switch_set_entry(os->mac, 0x20, 0x08);
|
||||
init_dvb(os);
|
||||
|
||||
ss = &os->ssdp;
|
||||
if (init_ssdp(os, &os->ssdp, debug, nossdp, nodms) < 0) {
|
||||
release_dvb(os);
|
||||
free(os);
|
||||
return NULL;
|
||||
}
|
||||
#if 0
|
||||
if (init_httpos, debug) < 0) {
|
||||
release_dvb(os);
|
||||
free(os);
|
||||
return NULL;
|
||||
}
|
||||
#endif
|
||||
return os;
|
||||
}
|
||||
|
||||
struct octoserve *os;
|
||||
|
||||
void term_action(int sig)
|
||||
{
|
||||
dbgprintf(DEBUG_SYS, "EXIT\n");
|
||||
os->exit = 1;
|
||||
}
|
||||
|
||||
static int set_termaction(void)
|
||||
{
|
||||
struct sigaction term;
|
||||
|
||||
memset(&term, 0, sizeof(term));
|
||||
term.sa_handler = term_action;
|
||||
sigemptyset(&term.sa_mask);
|
||||
term.sa_flags = 0;
|
||||
sigaction(SIGINT, &term, NULL);
|
||||
|
||||
memset(&term, 0, sizeof(term));
|
||||
term.sa_handler = term_action;
|
||||
sigemptyset(&term.sa_mask);
|
||||
term.sa_flags = 0;
|
||||
sigaction(SIGTERM, &term, NULL);
|
||||
}
|
||||
|
||||
static void awrite(char *fn, char *txt)
|
||||
{
|
||||
FILE *f = fopen(fn, "w");
|
||||
|
||||
if (f)
|
||||
fprintf(f, "%s", txt);
|
||||
fclose(f);
|
||||
}
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
int nodms = 0, nossdp = 0, vlan = 0;
|
||||
int nodms = 0, nossdp = 0, nodvbt = 0, vlan = 0, msmode = 1;
|
||||
|
||||
printf("Octoserve " OCTOSERVE_VERSION
|
||||
", Copyright (C) 2012-15 Digital Devices GmbH\n");
|
||||
@ -2887,12 +2832,13 @@ int main(int argc, char **argv)
|
||||
{"flags", required_argument, 0, 'f'},
|
||||
{"nossdp", no_argument, 0, 'n'},
|
||||
{"nodms", no_argument, 0, 'm'},
|
||||
{"nodvbt", no_argument, 0, 't'},
|
||||
{"conform", no_argument, 0, 'c'},
|
||||
{"help", no_argument , 0, 'h'},
|
||||
{0, 0, 0, 0}
|
||||
};
|
||||
c = getopt_long(argc, argv,
|
||||
"d:f:nmch",
|
||||
"d:f:nmtsch",
|
||||
long_options, &option_index);
|
||||
if (c==-1)
|
||||
break;
|
||||
@ -2910,6 +2856,9 @@ int main(int argc, char **argv)
|
||||
case 'm':
|
||||
nodms = 1;
|
||||
break;
|
||||
case 't':
|
||||
nodvbt = 1;
|
||||
break;
|
||||
case 'c':
|
||||
conform = 1;
|
||||
break;
|
||||
@ -2920,27 +2869,30 @@ int main(int argc, char **argv)
|
||||
}
|
||||
}
|
||||
if (optind < argc) {
|
||||
dbgprintf(DEBUG_SYS, "Warning: unused arguments\n");
|
||||
printf("Warning: unused arguments\n");
|
||||
}
|
||||
if (fexists("/config/nodms.enabled"))
|
||||
nodms = 1;
|
||||
msmode = read_msmode("/config/msmode");
|
||||
if (fexists("/config/nodvbt.enabled"))
|
||||
nodvbt = 1;
|
||||
if (fexists("/config/vlan.enabled")) {
|
||||
awrite("/sys/class/ddbridge/ddbridge0/vlan", "1");
|
||||
vlan = 1;
|
||||
} else
|
||||
awrite("/sys/class/ddbridge/ddbridge0/vlan", "0");
|
||||
dbgprintf(DEBUG_SYS, "nodms = %d, vlan = %d\n", nodms, vlan);
|
||||
printf("nodms = %d, nodvbt = %d, vlan = %d\n", nodms, nodvbt, vlan);
|
||||
|
||||
os = os_init("eth0", nossdp, nodms);
|
||||
os = os_init("eth0", nossdp, nodms, nodvbt, msmode);
|
||||
if (!os)
|
||||
return -1;
|
||||
set_termaction();
|
||||
|
||||
os->has_switch = switch_test();
|
||||
if (os->has_switch)
|
||||
dbgprintf(DEBUG_SYS, "Switch detected\n");
|
||||
printf("Switch detected\n");
|
||||
else
|
||||
dbgprintf(DEBUG_SYS, "No switch detected\n");
|
||||
printf("No switch detected\n");
|
||||
|
||||
os_serve(os);
|
||||
if (!nossdp)
|
||||
|
@ -73,7 +73,6 @@
|
||||
#define DEBUG_DVB 16
|
||||
#define DEBUG_IGMP 32
|
||||
#define DEBUG_SWITCH 64
|
||||
#define DEBUG_CI 128
|
||||
#define DEBUG_DEBUG 256
|
||||
|
||||
#if 0
|
||||
@ -183,7 +182,6 @@ struct dvbfe {
|
||||
int fd;
|
||||
int dmx;
|
||||
uint32_t type;
|
||||
uint32_t type_orig;
|
||||
int anum;
|
||||
int fnum;
|
||||
int state;
|
||||
@ -503,10 +501,6 @@ struct octoserve {
|
||||
int mld_sock;
|
||||
int has_switch;
|
||||
int strict;
|
||||
uint32_t delsys_mask;
|
||||
int msmode;
|
||||
int nodvbt;
|
||||
uint32_t first_ds;
|
||||
};
|
||||
|
||||
int streamsock(const char *port, int family, struct sockaddr *sadr);
|
||||
@ -514,7 +508,7 @@ void sockname(struct sockaddr *sadr, char *name);
|
||||
int get_ifa(const char *ifname, int iffam, struct sockaddr *sadr);
|
||||
int init_ssdp(struct octoserve *os, struct os_ssdp *ss, uint32_t d, int nossdp, int nodms);
|
||||
int dvb_tune(struct dvbfe *fe, struct dvb_params *p);
|
||||
int init_dvb(struct octoserve *os);
|
||||
int init_dvb(struct octoserve *os, int nodvbt, int noswitch);
|
||||
int release_dvb(struct octoserve *os);
|
||||
void parse_config(struct octoserve *os, char *sec,
|
||||
void (*cb)(struct octoserve *, char *, char *));
|
||||
|
@ -105,27 +105,6 @@ int mdio_close(int fd)
|
||||
close(fd);
|
||||
}
|
||||
|
||||
int switch_set_entry(uint8_t mac[6], uint8_t vec, uint8_t type)
|
||||
{
|
||||
int fd = mdio_open();
|
||||
|
||||
dbgprintf(DEBUG_SWITCH, "switch_set_entry %02x:%02x:%02x:%02x:%02x:%02x = %02x %02x\n",
|
||||
mac[0], mac[1], mac[2], mac[3], mac[4], mac[5], vec, type);
|
||||
if (fd < 0)
|
||||
return -1;
|
||||
if (vec)
|
||||
mdio_writereg(fd, 0x1b, 0x0c, (vec << 4) | type);
|
||||
else
|
||||
mdio_writereg(fd, 0x1b, 0x0c, 0);
|
||||
mdio_writereg(fd, 0x1b, 0x0d, ((uint16_t) mac[0] << 8) | mac[1]);
|
||||
mdio_writereg(fd, 0x1b, 0x0e, ((uint16_t) mac[2] << 8) | mac[3]);
|
||||
mdio_writereg(fd, 0x1b, 0x0f, ((uint16_t) mac[4] << 8) | mac[5]);
|
||||
mdio_writereg(fd, 0x1b, 0x0b, 0xb000);
|
||||
mdio_wait_switch(fd, 0x1b, 0x0b);
|
||||
mdio_close(fd);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int switch_get_port(uint8_t mac[6])
|
||||
{
|
||||
int fd = mdio_open();
|
||||
@ -170,7 +149,6 @@ int switch_get_port(uint8_t mac[6])
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
int switch_set_multicast(uint8_t mac[6], uint8_t vec)
|
||||
{
|
||||
int fd = mdio_open();
|
||||
|
File diff suppressed because one or more lines are too long
@ -97,10 +97,6 @@ else
|
||||
Params = Params .. " --msys="..v
|
||||
elseif p == "sr" then
|
||||
Params = Params .. " --sr="..v
|
||||
elseif p == "bw" then
|
||||
Params = Params .. " --bw="..v
|
||||
elseif p == "plp" then
|
||||
Params = Params .. " --plp="..v
|
||||
elseif p == "mtype" then
|
||||
Params = Params .. " --mtype="..v
|
||||
end
|
||||
|
@ -189,10 +189,6 @@ if tl.SourceList then
|
||||
Params = Params .. " --msys="..v
|
||||
elseif p == "sr" then
|
||||
Params = Params .. " --sr="..v
|
||||
elseif p == "bw" then
|
||||
Params = Params .. " --bw="..v
|
||||
elseif p == "plp" then
|
||||
Params = Params .. " --plp="..v
|
||||
elseif p == "mtype" then
|
||||
Params = Params .. " --mtype="..v
|
||||
end
|
||||
|
49
octoserve/var/monitor/fancontrol.lua
Normal file → Executable file
49
octoserve/var/monitor/fancontrol.lua
Normal file → Executable file
@ -9,31 +9,9 @@ local LogFile = "/tmp/Temperatur.log"
|
||||
local HighTemp = 50
|
||||
local LowTemp = 45
|
||||
|
||||
function ReadAttribute(attribute)
|
||||
local value = 0
|
||||
local ddbridge = io.open(devicepath.."/"..attribute,"r");
|
||||
if ddbridge then
|
||||
value = ddbridge:read("*l")
|
||||
ddbridge:close()
|
||||
end
|
||||
return value
|
||||
end
|
||||
|
||||
function ReadTemp(sensor)
|
||||
local temp = 0
|
||||
local file;
|
||||
|
||||
if sensor > 3 then
|
||||
sensor = sensor - 4
|
||||
if sensor == 0 then
|
||||
file = io.open(devicepath.."/temp")
|
||||
else
|
||||
file = io.open(devicepath.."/templ"..sensor)
|
||||
end
|
||||
else
|
||||
file = io.open(devicepath.."/temp"..sensor)
|
||||
end
|
||||
|
||||
local file = io.open(devicepath.."/temp"..sensor)
|
||||
if file then
|
||||
temp = file:read()
|
||||
if temp == "no sensor" then
|
||||
@ -77,21 +55,24 @@ local fanstate = -1
|
||||
|
||||
sleep(30)
|
||||
|
||||
local devid = ReadAttribute("devid0")
|
||||
if devid == "0307dd01" then
|
||||
fanstate = 1
|
||||
local devid1 = ReadAttribute("devid1")
|
||||
if devid1 == "0009dd01" or devid1 == "000add01" then
|
||||
fanstate = -2
|
||||
else
|
||||
local fs = tonumber(ReadAttribute("fanspeed1"))
|
||||
if fs > 0 and fs < 17000 then
|
||||
fanstate = -2
|
||||
local ddbridge = io.open("/sys/class/ddbridge/ddbridge0/devid0","r");
|
||||
if ddbridge then
|
||||
local devid = ddbridge:read("*l")
|
||||
ddbridge:close()
|
||||
if devid == "0307dd01" then
|
||||
fanstate = 1
|
||||
ddbridge = io.open("/sys/class/ddbridge/ddbridge0/fanspeed1","r");
|
||||
if ddbridge then
|
||||
local fs = tonumber(ddbridge:read("*l"))
|
||||
ddbridge:close()
|
||||
if fs > 0 and fs < 17000 then
|
||||
fanstate = -2
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
for i = 0,8,1 do
|
||||
for i = 0,4,1 do
|
||||
temp = ReadTemp(i)
|
||||
if temp > 0 then
|
||||
Sensor[NumSensors] = i
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 100 KiB |
@ -1,44 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- (c)2012 Digital Devices GmbH. All rights reserved -->
|
||||
<!-- $Id: SCIFDataBase.xml 695 2016-12-16 11:53:04Z manfred $ -->
|
||||
<!-- $Id: SCIFDataBase.xml 645 2016-02-09 18:33:05Z manfred $ -->
|
||||
<SCIFDataBase xmlns="http://schemas.DigitalDevices.de/SCIFDataBase">
|
||||
<OutdoorUnit Name="IDLU-UST110-CUO4O-32P (4x16)" Manufacturer="Inverto" Type="Switch" Protocol="EN50607" PowerupDelay="1000">
|
||||
<UBSlot Frequency="1210" />
|
||||
<UBSlot Frequency="1420" />
|
||||
<UBSlot Frequency="1680" />
|
||||
<UBSlot Frequency="2040" />
|
||||
<UBSlot Frequency="985" />
|
||||
<UBSlot Frequency="1050" />
|
||||
<UBSlot Frequency="1115" />
|
||||
<UBSlot Frequency="1275" />
|
||||
<UBSlot Frequency="1340" />
|
||||
<UBSlot Frequency="1485" />
|
||||
<UBSlot Frequency="1550" />
|
||||
<UBSlot Frequency="1615" />
|
||||
<UBSlot Frequency="1745" />
|
||||
<UBSlot Frequency="1810" />
|
||||
<UBSlot Frequency="1875" />
|
||||
<UBSlot Frequency="1940" />
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="IDLU-UST110-CUO8O-32PP (8x16)" Manufacturer="Inverto" Type="Switch" Protocol="EN50607" PowerupDelay="1000">
|
||||
<UBSlot Frequency="1210" />
|
||||
<UBSlot Frequency="1420" />
|
||||
<UBSlot Frequency="1680" />
|
||||
<UBSlot Frequency="2040" />
|
||||
<UBSlot Frequency="985" />
|
||||
<UBSlot Frequency="1050" />
|
||||
<UBSlot Frequency="1115" />
|
||||
<UBSlot Frequency="1275" />
|
||||
<UBSlot Frequency="1340" />
|
||||
<UBSlot Frequency="1485" />
|
||||
<UBSlot Frequency="1550" />
|
||||
<UBSlot Frequency="1615" />
|
||||
<UBSlot Frequency="1745" />
|
||||
<UBSlot Frequency="1810" />
|
||||
<UBSlot Frequency="1875" />
|
||||
<UBSlot Frequency="1940" />
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="IDLU-32UL40-UNBOO-OPP" Manufacturer="Inverto" Type="LNB" Protocol="EN50607" PowerupDelay="1000">
|
||||
<OutdoorUnit Name="IDLU-32UL40-UNBOO-OPP" Manufacturer="Inverto" Type="LNB" Protocol="EN50607">
|
||||
<UBSlot Frequency="1210" />
|
||||
<UBSlot Frequency="1420" />
|
||||
<UBSlot Frequency="1680" />
|
||||
@ -72,7 +36,7 @@
|
||||
<UBSlot Frequency="2112" />
|
||||
<UBSlot Frequency="2147" />
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="IDLU-24UL40-UNMOO-OPP" Manufacturer="Inverto" Type="LNB" Protocol="EN50607" PowerupDelay="1000">
|
||||
<OutdoorUnit Name="IDLU-24UL40-UNMOO-OPP" Manufacturer="Inverto" Type="LNB" Protocol="EN50607">
|
||||
<UBSlot Frequency="1210" />
|
||||
<UBSlot Frequency="1420" />
|
||||
<UBSlot Frequency="1680" />
|
||||
@ -142,7 +106,7 @@
|
||||
<UBSlot Frequency="1680"/>
|
||||
<UBSlot Frequency="2040"/>
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="IDLU-UST110-CUO1O-32P" Manufacturer="Inverto" Type="Switch" Protocol="EN50607" PowerupDelay="1000">
|
||||
<OutdoorUnit Name="IDLU-UST110-CUO1O-32P" Manufacturer="Inverto" Type="Switch" Protocol="EN50607">
|
||||
<UBSlot Frequency="1210"/>
|
||||
<UBSlot Frequency="1420"/>
|
||||
<UBSlot Frequency="1680"/>
|
||||
@ -176,66 +140,6 @@
|
||||
<UBSlot Frequency="2112"/>
|
||||
<UBSlot Frequency="2148"/>
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="IDLU-UWT110-CUO1O-32P" Manufacturer="Inverto" Type="Switch" Protocol="EN50607" PowerupDelay="1000">
|
||||
<UBSlot Frequency="1210"/>
|
||||
<UBSlot Frequency="1420"/>
|
||||
<UBSlot Frequency="1680"/>
|
||||
<UBSlot Frequency="2040"/>
|
||||
<UBSlot Frequency="984"/>
|
||||
<UBSlot Frequency="1020"/>
|
||||
<UBSlot Frequency="1056"/>
|
||||
<UBSlot Frequency="1092"/>
|
||||
<UBSlot Frequency="1128"/>
|
||||
<UBSlot Frequency="1164"/>
|
||||
<UBSlot Frequency="1256"/>
|
||||
<UBSlot Frequency="1292"/>
|
||||
<UBSlot Frequency="1328"/>
|
||||
<UBSlot Frequency="1364"/>
|
||||
<UBSlot Frequency="1458"/>
|
||||
<UBSlot Frequency="1494"/>
|
||||
<UBSlot Frequency="1530"/>
|
||||
<UBSlot Frequency="1566"/>
|
||||
<UBSlot Frequency="1602"/>
|
||||
<UBSlot Frequency="1638"/>
|
||||
<UBSlot Frequency="1716"/>
|
||||
<UBSlot Frequency="1752"/>
|
||||
<UBSlot Frequency="1788"/>
|
||||
<UBSlot Frequency="1824"/>
|
||||
<UBSlot Frequency="1860"/>
|
||||
<UBSlot Frequency="1896"/>
|
||||
<UBSlot Frequency="1932"/>
|
||||
<UBSlot Frequency="1968"/>
|
||||
<UBSlot Frequency="2004"/>
|
||||
<UBSlot Frequency="2076"/>
|
||||
<UBSlot Frequency="2112"/>
|
||||
<UBSlot Frequency="2148"/>
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="Unicable II LNB Diavolo" Manufacturer="Megasat" Type="LNB" Protocol="EN50607" PowerupDelay="1000">
|
||||
<UBSlot Frequency="1210" />
|
||||
<UBSlot Frequency="1420" />
|
||||
<UBSlot Frequency="1680" />
|
||||
<UBSlot Frequency="2040" />
|
||||
<UBSlot Frequency="1005" />
|
||||
<UBSlot Frequency="1050" />
|
||||
<UBSlot Frequency="1095" />
|
||||
<UBSlot Frequency="1140" />
|
||||
<UBSlot Frequency="1260" />
|
||||
<UBSlot Frequency="1305" />
|
||||
<UBSlot Frequency="1350" />
|
||||
<UBSlot Frequency="1475" />
|
||||
<UBSlot Frequency="1520" />
|
||||
<UBSlot Frequency="1565" />
|
||||
<UBSlot Frequency="1610" />
|
||||
<UBSlot Frequency="1725" />
|
||||
<UBSlot Frequency="1770" />
|
||||
<UBSlot Frequency="1815" />
|
||||
<UBSlot Frequency="1860" />
|
||||
<UBSlot Frequency="1905" />
|
||||
<UBSlot Frequency="1950" />
|
||||
<UBSlot Frequency="1995" />
|
||||
<UBSlot Frequency="2085" />
|
||||
<UBSlot Frequency="2130" />
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="TechniRouter 5/1x8" Manufacturer="TechniSat" Type="Switch">
|
||||
<UBSlot Frequency="1284"/>
|
||||
<UBSlot Frequency="1400"/>
|
||||
@ -246,32 +150,6 @@
|
||||
<UBSlot Frequency="1980"/>
|
||||
<UBSlot Frequency="2096"/>
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="UNYSAT-24TN-LNB" Manufacturer="TechniSat" Type="LNB">
|
||||
<UBSlot Frequency="975"/>
|
||||
<UBSlot Frequency="1025"/>
|
||||
<UBSlot Frequency="1075"/>
|
||||
<UBSlot Frequency="1125"/>
|
||||
<UBSlot Frequency="1175"/>
|
||||
<UBSlot Frequency="1225"/>
|
||||
<UBSlot Frequency="1275"/>
|
||||
<UBSlot Frequency="1325"/>
|
||||
<UBSlot Frequency="1375"/>
|
||||
<UBSlot Frequency="1425"/>
|
||||
<UBSlot Frequency="1475"/>
|
||||
<UBSlot Frequency="1525"/>
|
||||
<UBSlot Frequency="1575"/>
|
||||
<UBSlot Frequency="1625"/>
|
||||
<UBSlot Frequency="1675"/>
|
||||
<UBSlot Frequency="1725"/>
|
||||
<UBSlot Frequency="1775"/>
|
||||
<UBSlot Frequency="1825"/>
|
||||
<UBSlot Frequency="1875"/>
|
||||
<UBSlot Frequency="1925"/>
|
||||
<UBSlot Frequency="1975"/>
|
||||
<UBSlot Frequency="2025"/>
|
||||
<UBSlot Frequency="2075"/>
|
||||
<UBSlot Frequency="2125"/>
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="TechniRouter 9/1x8" Manufacturer="TechniSat" Type="Switch">
|
||||
<UBSlot Frequency="1284"/>
|
||||
<UBSlot Frequency="1400"/>
|
||||
@ -368,7 +246,7 @@
|
||||
<UBSlot Frequency="1400"/>
|
||||
<UBSlot Frequency="1516"/>
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="EXE 159" Manufacturer="Kathrein" Type="Switch" Protocol="EN50607" PinProtected="true" PowerupDelay="1000">
|
||||
<OutdoorUnit Name="EXE 159" Manufacturer="Kathrein" Type="Switch" Protocol="EN50607" PinProtected="true">
|
||||
<UBSlot Frequency="974"/>
|
||||
<UBSlot Frequency="1076"/>
|
||||
<UBSlot Frequency="1178"/>
|
||||
@ -379,7 +257,7 @@
|
||||
<UBSlot Frequency="1688"/>
|
||||
<UBSlot Frequency="1790"/>
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="EXE 1512/2512" Manufacturer="Kathrein" Type="Switch" Protocol="EN50607" PinProtected="true" PowerupDelay="1000">
|
||||
<OutdoorUnit Name="EXE 1512/2512" Manufacturer="Kathrein" Type="Switch" Protocol="EN50607" PinProtected="true">
|
||||
<UBSlot Frequency="974"/>
|
||||
<UBSlot Frequency="1076"/>
|
||||
<UBSlot Frequency="1178"/>
|
||||
@ -392,92 +270,6 @@
|
||||
<UBSlot Frequency="1892"/>
|
||||
<UBSlot Frequency="1994"/>
|
||||
<UBSlot Frequency="2096"/>
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="EXD 1532/2532 - Mode C (30 Userbands Output)" Manufacturer="Kathrein" Type="Switch" Protocol="EN50607" PinProtected="true">
|
||||
<UBSlot Frequency="970"/>
|
||||
<UBSlot Frequency="1010"/>
|
||||
<UBSlot Frequency="1050"/>
|
||||
<UBSlot Frequency="1090"/>
|
||||
<UBSlot Frequency="1130"/>
|
||||
<UBSlot Frequency="1170"/>
|
||||
<UBSlot Frequency="1210"/>
|
||||
<UBSlot Frequency="1250"/>
|
||||
<UBSlot Frequency="1290"/>
|
||||
<UBSlot Frequency="1330"/>
|
||||
<UBSlot Frequency="1370"/>
|
||||
<UBSlot Frequency="1410"/>
|
||||
<UBSlot Frequency="1450"/>
|
||||
<UBSlot Frequency="1490"/>
|
||||
<UBSlot Frequency="1530"/>
|
||||
<UBSlot Frequency="1570"/>
|
||||
<UBSlot Frequency="1610"/>
|
||||
<UBSlot Frequency="1650"/>
|
||||
<UBSlot Frequency="1690"/>
|
||||
<UBSlot Frequency="1730"/>
|
||||
<UBSlot Frequency="1770"/>
|
||||
<UBSlot Frequency="1810"/>
|
||||
<UBSlot Frequency="1850"/>
|
||||
<UBSlot Frequency="1890"/>
|
||||
<UBSlot Frequency="1930"/>
|
||||
<UBSlot Frequency="1970"/>
|
||||
<UBSlot Frequency="2010"/>
|
||||
<UBSlot Frequency="2050"/>
|
||||
<UBSlot Frequency="2090"/>
|
||||
<UBSlot Frequency="2130"/>
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="EXD 1532/2532 - Mode B (24 Userbands Output)" Manufacturer="Kathrein" Type="Switch" Protocol="EN50607" PinProtected="true">
|
||||
<UBSlot Frequency="975"/>
|
||||
<UBSlot Frequency="1025"/>
|
||||
<UBSlot Frequency="1075"/>
|
||||
<UBSlot Frequency="1125"/>
|
||||
<UBSlot Frequency="1175"/>
|
||||
<UBSlot Frequency="1225"/>
|
||||
<UBSlot Frequency="1275"/>
|
||||
<UBSlot Frequency="1325"/>
|
||||
<UBSlot Frequency="1375"/>
|
||||
<UBSlot Frequency="1425"/>
|
||||
<UBSlot Frequency="1475"/>
|
||||
<UBSlot Frequency="1525"/>
|
||||
<UBSlot Frequency="1575"/>
|
||||
<UBSlot Frequency="1625"/>
|
||||
<UBSlot Frequency="1675"/>
|
||||
<UBSlot Frequency="1725"/>
|
||||
<UBSlot Frequency="1775"/>
|
||||
<UBSlot Frequency="1825"/>
|
||||
<UBSlot Frequency="1875"/>
|
||||
<UBSlot Frequency="1925"/>
|
||||
<UBSlot Frequency="1975"/>
|
||||
<UBSlot Frequency="2025"/>
|
||||
<UBSlot Frequency="2075"/>
|
||||
<UBSlot Frequency="2125"/>
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="EXD 1532/2532 - Mode B (8 Userbands Output)" Manufacturer="Kathrein" Type="Switch" Protocol="EN50607" PinProtected="true">
|
||||
<UBSlot Frequency="975"/>
|
||||
<UBSlot Frequency="1025"/>
|
||||
<UBSlot Frequency="1075"/>
|
||||
<UBSlot Frequency="1125"/>
|
||||
<UBSlot Frequency="1175"/>
|
||||
<UBSlot Frequency="1225"/>
|
||||
<UBSlot Frequency="1275"/>
|
||||
<UBSlot Frequency="1325"/>
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="EXD 1532/2532 - Mode A (16 Userbands Outputs)" Manufacturer="Kathrein" Type="Switch" Protocol="EN50607" PinProtected="true">
|
||||
<UBSlot Frequency="975"/>
|
||||
<UBSlot Frequency="1025"/>
|
||||
<UBSlot Frequency="1075"/>
|
||||
<UBSlot Frequency="1125"/>
|
||||
<UBSlot Frequency="1175"/>
|
||||
<UBSlot Frequency="1225"/>
|
||||
<UBSlot Frequency="1275"/>
|
||||
<UBSlot Frequency="1325"/>
|
||||
<UBSlot Frequency="1375"/>
|
||||
<UBSlot Frequency="1425"/>
|
||||
<UBSlot Frequency="1475"/>
|
||||
<UBSlot Frequency="1525"/>
|
||||
<UBSlot Frequency="1575"/>
|
||||
<UBSlot Frequency="1625"/>
|
||||
<UBSlot Frequency="1675"/>
|
||||
<UBSlot Frequency="1725"/>
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="EXE 259" Manufacturer="Kathrein" Type="Switch">
|
||||
<UBSlot Frequency="974" />
|
||||
@ -577,17 +369,7 @@
|
||||
<UBSlot Frequency="1892" />
|
||||
<UBSlot Frequency="1994" />
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="DCR 5-1-8K" Manufacturer="Dura-Sat" Type="Switch" PinProtected="true">
|
||||
<UBSlot Frequency="1280" />
|
||||
<UBSlot Frequency="1382" />
|
||||
<UBSlot Frequency="1484" />
|
||||
<UBSlot Frequency="1586" />
|
||||
<UBSlot Frequency="1688" />
|
||||
<UBSlot Frequency="1790" />
|
||||
<UBSlot Frequency="1892" />
|
||||
<UBSlot Frequency="1994" />
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="UK 124" Manufacturer="Dura-Sat" Type="LNB" Protocol="EN50607" PowerupDelay="1000">
|
||||
<OutdoorUnit Name="UK 124" Manufacturer="Dura-Sat" Type="LNB" Protocol="EN50607">
|
||||
<UBSlot Frequency="1210" />
|
||||
<UBSlot Frequency="1420" />
|
||||
<UBSlot Frequency="1680" />
|
||||
@ -613,7 +395,7 @@
|
||||
<UBSlot Frequency="2085" />
|
||||
<UBSlot Frequency="2130" />
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="DUR-Line DPC-32 K (32 UB-Unicable Output)" Manufacturer="Dura-Sat" Type="Switch" Protocol="EN50607" PowerupDelay="1000">
|
||||
<OutdoorUnit Name="DUR-Line DPC-32 K (32 UB-Unicable Output)" Manufacturer="Dura-Sat" Type="Switch" Protocol="EN50607">
|
||||
<UBSlot Frequency="1210" />
|
||||
<UBSlot Frequency="1420" />
|
||||
<UBSlot Frequency="1680" />
|
||||
@ -647,7 +429,7 @@
|
||||
<UBSlot Frequency="2112" />
|
||||
<UBSlot Frequency="2147" />
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="DUR-Line DPC-32 K (16 UB-Unicable Output)" Manufacturer="Dura-Sat" Type="Switch" Protocol="EN50607" PowerupDelay="1000">
|
||||
<OutdoorUnit Name="DUR-Line DPC-32 K (16 UB-Unicable Output)" Manufacturer="Dura-Sat" Type="Switch" Protocol="EN50607">
|
||||
<UBSlot Frequency="1210" />
|
||||
<UBSlot Frequency="1420" />
|
||||
<UBSlot Frequency="1680" />
|
||||
@ -665,7 +447,7 @@
|
||||
<UBSlot Frequency="1458" />
|
||||
<UBSlot Frequency="1494" />
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="DUR-Line DPC-32 K (16 UB-Legacy Output)" Manufacturer="Dura-Sat" Type="Switch" Protocol="EN50607" PowerupDelay="1000">
|
||||
<OutdoorUnit Name="DUR-Line DPC-32 K (16 UB-Legacy Output)" Manufacturer="Dura-Sat" Type="Switch" Protocol="EN50607">
|
||||
<UBSlot Frequency="1530" />
|
||||
<UBSlot Frequency="1566" />
|
||||
<UBSlot Frequency="1602" />
|
||||
@ -935,34 +717,6 @@
|
||||
<UBSlot Frequency="1864"/>
|
||||
<UBSlot Frequency="1980"/>
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="SUS SUS 9942/8 (4x2 Mode, Output 1)" Manufacturer="Spaun" Type="Switch">
|
||||
<UBSlot Frequency="1076"/>
|
||||
<UBSlot Frequency="1178"/>
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="SUS SUS 9942/8 (4x2 Mode, Output 2)" Manufacturer="Spaun" Type="Switch">
|
||||
<UBSlot Frequency="1280"/>
|
||||
<UBSlot Frequency="1382"/>
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="SUS SUS 9942/8 (4x2 Mode, Output 3)" Manufacturer="Spaun" Type="Switch">
|
||||
<UBSlot Frequency="1076"/>
|
||||
<UBSlot Frequency="1178"/>
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="SUS SUS 9942/8 (4x2 Mode, Output 4)" Manufacturer="Spaun" Type="Switch">
|
||||
<UBSlot Frequency="1280"/>
|
||||
<UBSlot Frequency="1382"/>
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="SUS SUS 9942/8 (2x4 Mode, Output 1 und 2)" Manufacturer="Spaun" Type="Switch">
|
||||
<UBSlot Frequency="1076"/>
|
||||
<UBSlot Frequency="1178"/>
|
||||
<UBSlot Frequency="1280"/>
|
||||
<UBSlot Frequency="1382"/>
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="SUS SUS 9942/8 (2x4 Mode, Output 3 und 4)" Manufacturer="Spaun" Type="Switch">
|
||||
<UBSlot Frequency="1076"/>
|
||||
<UBSlot Frequency="1178"/>
|
||||
<UBSlot Frequency="1280"/>
|
||||
<UBSlot Frequency="1382"/>
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="SUS 5581/33 NF (3x3 Mode, Output 1)" Manufacturer="Spaun" Type="Switch">
|
||||
<UBSlot Frequency="1068"/>
|
||||
<UBSlot Frequency="1284"/>
|
||||
@ -1013,12 +767,12 @@
|
||||
<UBSlot Frequency="1382"/>
|
||||
<UBSlot Frequency="1484"/>
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="JPSxxxx-3A/T/TN" Manufacturer="Jultec" Type="Switch" Protocol="EN50607" PowerupDelay="1000">
|
||||
<OutdoorUnit Name="JPSxxxx-3A/T/TN" Manufacturer="Jultec" Type="Switch" Protocol="EN50607">
|
||||
<UBSlot Frequency="1280"/>
|
||||
<UBSlot Frequency="1382"/>
|
||||
<UBSlot Frequency="1484"/>
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="JPSxxxx-6A/T/TN" Manufacturer="Jultec" Type="Switch" Protocol="EN50607" PowerupDelay="1000">
|
||||
<OutdoorUnit Name="JPSxxxx-6A/T/TN" Manufacturer="Jultec" Type="Switch" Protocol="EN50607">
|
||||
<UBSlot Frequency="1280"/>
|
||||
<UBSlot Frequency="1382"/>
|
||||
<UBSlot Frequency="1484"/>
|
||||
@ -1026,7 +780,7 @@
|
||||
<UBSlot Frequency="1688"/>
|
||||
<UBSlot Frequency="1790"/>
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="JPSxxxx-8A/T/TN" Manufacturer="Jultec" Type="Switch" Protocol="EN50607" PowerupDelay="1000">
|
||||
<OutdoorUnit Name="JPSxxxx-8A/T/TN" Manufacturer="Jultec" Type="Switch" Protocol="EN50607">
|
||||
<UBSlot Frequency="1076"/>
|
||||
<UBSlot Frequency="1178"/>
|
||||
<UBSlot Frequency="1280"/>
|
||||
@ -1036,7 +790,7 @@
|
||||
<UBSlot Frequency="1688"/>
|
||||
<UBSlot Frequency="1790"/>
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="JPSxxxx-12AN/TN " Manufacturer="Jultec" Type="Switch" Protocol="EN50607" PowerupDelay="1000">
|
||||
<OutdoorUnit Name="JPSxxxx-12AN/TN " Manufacturer="Jultec" Type="Switch" Protocol="EN50607">
|
||||
<UBSlot Frequency="974"/>
|
||||
<UBSlot Frequency="1076"/>
|
||||
<UBSlot Frequency="1178"/>
|
||||
@ -1050,74 +804,10 @@
|
||||
<UBSlot Frequency="1994"/>
|
||||
<UBSlot Frequency="2096"/>
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="JPS0501-8M2" Manufacturer="Jultec" Type="Switch">
|
||||
<UBSlot Frequency="1375"/>
|
||||
<UBSlot Frequency="1425"/>
|
||||
<UBSlot Frequency="1475"/>
|
||||
<UBSlot Frequency="1525"/>
|
||||
<UBSlot Frequency="1575"/>
|
||||
<UBSlot Frequency="1625"/>
|
||||
<UBSlot Frequency="1675"/>
|
||||
<UBSlot Frequency="1725"/>
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="JPS0501-16MN/16TN" Manufacturer="Jultec" Type="Switch">
|
||||
<UBSlot Frequency="1375"/>
|
||||
<UBSlot Frequency="1425"/>
|
||||
<UBSlot Frequency="1475"/>
|
||||
<UBSlot Frequency="1525"/>
|
||||
<UBSlot Frequency="1575"/>
|
||||
<UBSlot Frequency="1625"/>
|
||||
<UBSlot Frequency="1675"/>
|
||||
<UBSlot Frequency="1725"/>
|
||||
<UBSlot Frequency="1775"/>
|
||||
<UBSlot Frequency="1825"/>
|
||||
<UBSlot Frequency="1875"/>
|
||||
<UBSlot Frequency="1925"/>
|
||||
<UBSlot Frequency="1975"/>
|
||||
<UBSlot Frequency="2025"/>
|
||||
<UBSlot Frequency="2075"/>
|
||||
<UBSlot Frequency="2125"/>
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="JPS0502-8T/M" Manufacturer="Jultec" Type="Switch">
|
||||
<UBSlot Frequency="1375"/>
|
||||
<UBSlot Frequency="1425"/>
|
||||
<UBSlot Frequency="1475"/>
|
||||
<UBSlot Frequency="1525"/>
|
||||
<UBSlot Frequency="1575"/>
|
||||
<UBSlot Frequency="1625"/>
|
||||
<UBSlot Frequency="1675"/>
|
||||
<UBSlot Frequency="1725"/>
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="JPS0508-8T/M" Manufacturer="Jultec" Type="Switch">
|
||||
<UBSlot Frequency="1375"/>
|
||||
<UBSlot Frequency="1425"/>
|
||||
<UBSlot Frequency="1475"/>
|
||||
<UBSlot Frequency="1525"/>
|
||||
<UBSlot Frequency="1575"/>
|
||||
<UBSlot Frequency="1625"/>
|
||||
<UBSlot Frequency="1675"/>
|
||||
<UBSlot Frequency="1725"/>
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="JPS0901-8T/8M" Manufacturer="Jultec" Type="Switch">
|
||||
<UBSlot Frequency="1375"/>
|
||||
<UBSlot Frequency="1425"/>
|
||||
<UBSlot Frequency="1475"/>
|
||||
<UBSlot Frequency="1525"/>
|
||||
<UBSlot Frequency="1575"/>
|
||||
<UBSlot Frequency="1625"/>
|
||||
<UBSlot Frequency="1675"/>
|
||||
<UBSlot Frequency="1725"/>
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="JRS0502-2+4T" Manufacturer="Jultec" Type="Switch">
|
||||
<UBSlot Frequency="1280"/>
|
||||
<UBSlot Frequency="1382"/>
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="JRS0502-4+4T" Manufacturer="Jultec" Type="Switch" Protocol="EN50607" PowerupDelay="1000">
|
||||
<UBSlot Frequency="1375"/>
|
||||
<UBSlot Frequency="1425"/>
|
||||
<UBSlot Frequency="1475"/>
|
||||
<UBSlot Frequency="1525"/>
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="JRS0504-2A/T" Manufacturer="Jultec" Type="Switch">
|
||||
<UBSlot Frequency="1280"/>
|
||||
<UBSlot Frequency="1382"/>
|
||||
@ -1144,7 +834,7 @@
|
||||
<UBSlot Frequency="1680"/>
|
||||
<UBSlot Frequency="2040"/>
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="GT-DLNB1T" Manufacturer="GT-SAT" Type="LNB" Protocol="EN50607" PowerupDelay="1000">
|
||||
<OutdoorUnit Name="GT-DLNB1T" Manufacturer="GT-SAT" Type="LNB" Protocol="EN50607">
|
||||
<UBSlot Frequency="975"/>
|
||||
<UBSlot Frequency="1025"/>
|
||||
<UBSlot Frequency="1075"/>
|
||||
@ -1170,7 +860,7 @@
|
||||
<UBSlot Frequency="2075"/>
|
||||
<UBSlot Frequency="2125"/>
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="MCR 221" Manufacturer="Fuba" Type="Switch" Protocol="EN50607" PowerupDelay="1000">
|
||||
<OutdoorUnit Name="MCR 221" Manufacturer="Fuba" Type="Switch" Protocol="EN50607">
|
||||
<UBSlot Frequency="1280"/>
|
||||
<UBSlot Frequency="1382"/>
|
||||
</OutdoorUnit>
|
||||
@ -1178,7 +868,7 @@
|
||||
<UBSlot Frequency="1280"/>
|
||||
<UBSlot Frequency="1382"/>
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="MCR 441" Manufacturer="Fuba" Type="Switch" Protocol="EN50607" PowerupDelay="1000">
|
||||
<OutdoorUnit Name="MCR 441" Manufacturer="Fuba" Type="Switch" Protocol="EN50607">
|
||||
<UBSlot Frequency="1280"/>
|
||||
<UBSlot Frequency="1382"/>
|
||||
<UBSlot Frequency="1484"/>
|
||||
@ -1262,30 +952,4 @@
|
||||
<UBSlot Frequency="1790"/>
|
||||
<UBSlot Frequency="1892"/>
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="H21dCSS" Manufacturer="Selfsat" Type="LNB" Protocol="EN50607" PowerupDelay="1000">
|
||||
<UBSlot Frequency="1210" />
|
||||
<UBSlot Frequency="1420" />
|
||||
<UBSlot Frequency="1680" />
|
||||
<UBSlot Frequency="2040" />
|
||||
<UBSlot Frequency="1005" />
|
||||
<UBSlot Frequency="1050" />
|
||||
<UBSlot Frequency="1095" />
|
||||
<UBSlot Frequency="1140" />
|
||||
<UBSlot Frequency="1260" />
|
||||
<UBSlot Frequency="1305" />
|
||||
<UBSlot Frequency="1350" />
|
||||
<UBSlot Frequency="1475" />
|
||||
<UBSlot Frequency="1520" />
|
||||
<UBSlot Frequency="1565" />
|
||||
<UBSlot Frequency="1610" />
|
||||
<UBSlot Frequency="1725" />
|
||||
<UBSlot Frequency="1770" />
|
||||
<UBSlot Frequency="1815" />
|
||||
<UBSlot Frequency="1860" />
|
||||
<UBSlot Frequency="1905" />
|
||||
<UBSlot Frequency="1950" />
|
||||
<UBSlot Frequency="1995" />
|
||||
<UBSlot Frequency="2085" />
|
||||
<UBSlot Frequency="2130" />
|
||||
</OutdoorUnit>
|
||||
</SCIFDataBase>
|
File diff suppressed because it is too large
Load Diff
@ -4,7 +4,7 @@
|
||||
MenuItems = new Array();
|
||||
|
||||
MenuItems.push( { Text:"Home", Link:"index.html" } );
|
||||
//MenuItems.push( { Text:"Browser TV", Link:"browsertv.html" } );
|
||||
MenuItems.push( { Text:"Browser TV", Link:"browsertv.html" } );
|
||||
MenuItems.push( { Text:"EPG", Link:"epg.html" } );
|
||||
MenuItems.push( { Text:"Stream Status", Link:"streamstatus.html" } );
|
||||
MenuItems.push( { Text:"Tuner Status", Link:"tunerstatus.html" } );
|
||||
|
@ -12,29 +12,6 @@
|
||||
<!-- Add page scripts here -->
|
||||
<script type="text/javascript">
|
||||
|
||||
var xmlhttp = new XMLHttpRequest();
|
||||
var url = "/octoserve/tunerstatus.json";
|
||||
|
||||
xmlhttp.onreadystatechange=function()
|
||||
{
|
||||
if (xmlhttp.readyState == 4 )
|
||||
{
|
||||
if( xmlhttp.status == 200 )
|
||||
myFunction(xmlhttp.responseText);
|
||||
}
|
||||
}
|
||||
|
||||
function myFunction(response)
|
||||
{
|
||||
try
|
||||
{
|
||||
var tl = JSON.parse(response);
|
||||
for(i= 0; i < tl.TunerList.length; i++ )
|
||||
document.getElementById("trTuner"+i).style.display = "table-row";
|
||||
}
|
||||
catch(err) {}
|
||||
}
|
||||
|
||||
SCIFEnabled = false;
|
||||
SelectedManufacturer = 0;
|
||||
SelectedUnit = 0;
|
||||
@ -120,10 +97,14 @@ function OnLoad()
|
||||
{
|
||||
SCIFEnabled = false;
|
||||
|
||||
for( i = 0; i < 12 ; i++ )
|
||||
{
|
||||
TunerList[i] = document.getElementById("formTuner"+i);
|
||||
}
|
||||
TunerList[0] = document.Tuner1;
|
||||
TunerList[1] = document.Tuner2;
|
||||
TunerList[2] = document.Tuner3;
|
||||
TunerList[3] = document.Tuner4;
|
||||
TunerList[4] = document.Tuner5;
|
||||
TunerList[5] = document.Tuner6;
|
||||
TunerList[6] = document.Tuner7;
|
||||
TunerList[7] = document.Tuner8;
|
||||
|
||||
document.Manufacturer.Select.length = 0;
|
||||
for( i = 0; i < ManufacturerList.length ; i++ )
|
||||
@ -160,8 +141,6 @@ function OnLoad()
|
||||
document.getElementById("EnableButton").checked = SCIFEnabled;
|
||||
document.getElementById("SetButton").disabled = true;
|
||||
|
||||
xmlhttp.open("GET", url, true);
|
||||
xmlhttp.send();
|
||||
}
|
||||
|
||||
</script>
|
||||
@ -217,22 +196,93 @@ function OnLoad()
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<script type="text/javascript">
|
||||
for( var i = 0; i < 12 ; i++ )
|
||||
{
|
||||
// document.write('<tr id="trTuner'+i+'">');
|
||||
document.write('<tr id="trTuner'+i+'" style="display:none">');
|
||||
document.write('<td>Tuner ' + (i+1) + '</td>');
|
||||
document.write('<td>');
|
||||
document.write('<form name="Tuner'+(i+1)+'" id="formTuner'+i+'" action="">');
|
||||
document.write('<select name="Select" size="1" style="width: 300px" onchange="SetSlot(1,document.Tuner' +(i+1)+'.Select.selectedIndex)">');
|
||||
document.write('</option>----</option>');
|
||||
document.write('</select>');
|
||||
document.write('</form>');
|
||||
document.write('</td>');
|
||||
document.write('</tr>');
|
||||
}
|
||||
</script>
|
||||
<tr>
|
||||
<td>Tuner 1</td>
|
||||
<td>
|
||||
<form name="Tuner1" action="">
|
||||
<select name="Select" size="1" style="width: 300px" onchange="SetSlot(1,document.Tuner1.Select.selectedIndex)">
|
||||
<option>----</option>
|
||||
</select>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Tuner 2</td>
|
||||
<td>
|
||||
<form name="Tuner2" action="">
|
||||
<select name="Select" size="1" style="width: 300px" onchange="SetSlot(2,document.Tuner2.Select.selectedIndex)">
|
||||
<option>----</option>
|
||||
</select>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Tuner 3</td>
|
||||
<td>
|
||||
<form name="Tuner3" action="">
|
||||
<select name="Select" size="1" style="width: 300px" onchange="SetSlot(3,document.Tuner3.Select.selectedIndex)">
|
||||
<option>----</option>
|
||||
</select>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Tuner 4</td>
|
||||
<td>
|
||||
<form name="Tuner4" action="">
|
||||
<select name="Select" size="1" style="width: 300px" onchange="SetSlot(4,document.Tuner4.Select.selectedIndex)">
|
||||
<option>----</option>
|
||||
</select>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Tuner 5</td>
|
||||
<td>
|
||||
<form name="Tuner5" action="">
|
||||
<select name="Select" size="1" style="width: 300px" onchange="SetSlot(5,document.Tuner5.Select.selectedIndex)">
|
||||
<option>----</option>
|
||||
</select>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Tuner 6</td>
|
||||
<td>
|
||||
<form name="Tuner6" action="">
|
||||
<select name="Select" size="1" style="width: 300px" onchange="SetSlot(6,document.Tuner6.Select.selectedIndex)">
|
||||
<option>----</option>
|
||||
</select>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Tuner 7</td>
|
||||
<td>
|
||||
<form name="Tuner7" action="">
|
||||
<select name="Select" size="1" style="width: 300px" onchange="SetSlot(7,document.Tuner7.Select.selectedIndex)">
|
||||
<option>----</option>
|
||||
</select>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Tuner 8</td>
|
||||
<td>
|
||||
<form name="Tuner8" action="">
|
||||
<select name="Select" size="1" style="width: 300px" onchange="SetSlot(8,document.Tuner8.Select.selectedIndex)">
|
||||
<option>----</option>
|
||||
</select>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td colspan="2" align="right">
|
||||
<div style="width: 300px">
|
||||
|
@ -6,39 +6,12 @@
|
||||
<link rel="stylesheet" type="text/css" href="/style.css">
|
||||
<script type="text/javascript" src="/menu.js"></script>
|
||||
<!-- Add included scripts here -->
|
||||
<script type="text/javascript">Octoserve = false;</script>
|
||||
<script type="text/javascript" src="/octoserve/serverinfo.js"></script>
|
||||
|
||||
<!-- Add page scripts here -->
|
||||
<script type="text/javascript">
|
||||
|
||||
var NewSettings = null;
|
||||
var OldSettings = null;
|
||||
|
||||
var SupportedDelsys = 0;
|
||||
|
||||
var DelSysID = new Array();
|
||||
DelSysID[ 0] = "SYS_UNDEFINED";
|
||||
DelSysID[ 1] = "SYS_DVBC_ANNEX_A";
|
||||
DelSysID[ 2] = "SYS_DVBC_ANNEX_B";
|
||||
DelSysID[ 3] = "SYS_DVBT";
|
||||
DelSysID[ 4] = "SYS_DSS";
|
||||
DelSysID[ 5] = "SYS_DVBS";
|
||||
DelSysID[ 6] = "SYS_DVBS2";
|
||||
DelSysID[ 7] = "SYS_DVBH";
|
||||
DelSysID[ 8] = "SYS_ISDBT";
|
||||
DelSysID[ 9] = "SYS_ISDBS";
|
||||
DelSysID[10] = "SYS_ISDBC";
|
||||
DelSysID[11] = "SYS_ATSC";
|
||||
DelSysID[12] = "SYS_ATSCMH";
|
||||
DelSysID[13] = "SYS_DTMB";
|
||||
DelSysID[14] = "SYS_CMMB";
|
||||
DelSysID[15] = "SYS_DAB";
|
||||
DelSysID[16] = "SYS_DVBT2";
|
||||
DelSysID[17] = "SYS_TURBO";
|
||||
DelSysID[18] = "SYS_DVBC_ANNEX_C";
|
||||
DelSysID[19] = "SYS_DVBC2";
|
||||
|
||||
var xmlhttp = new XMLHttpRequest();
|
||||
var url = "/systemsettings.lua";
|
||||
|
||||
@ -71,19 +44,19 @@ function myFunction(response)
|
||||
document.getElementById("QOSButton").checked = settings.vlanEnabled;
|
||||
document.getElementById("TelnetButton").checked = settings.telnetEnabled;
|
||||
document.getElementById("NODMSButton").checked = settings.nodmsEnabled;
|
||||
document.getElementById("NODVBTButton").checked = settings.nodvbtEnabled;
|
||||
document.getElementById("STRICTButton").checked = settings.strictEnabled;
|
||||
|
||||
document.getElementById("QOSButton").disabled = false;
|
||||
document.getElementById("TelnetButton").disabled = false;
|
||||
document.getElementById("NODMSButton").disabled = false;
|
||||
document.getElementById("NODVBTButton").disabled = false;
|
||||
document.getElementById("STRICTButton").disabled = false;
|
||||
document.getElementById("BoxName").disabled = false;
|
||||
document.getElementById("MSMode").disabled = false;
|
||||
|
||||
OldSettings = settings;
|
||||
NewSettings = JSON.parse(response);
|
||||
if( Octoserve )
|
||||
NewSettings.DelsysMask = Octoserve.DelsysMask;
|
||||
}
|
||||
|
||||
function SaveSettings()
|
||||
@ -115,6 +88,12 @@ function SaveSettings()
|
||||
param += "nodms=" + (NewSettings.nodmsEnabled?"1":"0");
|
||||
}
|
||||
|
||||
if( OldSettings.nodvbtEnabled != NewSettings.nodvbtEnabled )
|
||||
{
|
||||
if( param != "" ) param += "&";
|
||||
param += "nodvbt=" + (NewSettings.nodvbtEnabled?"1":"0");
|
||||
}
|
||||
|
||||
if( OldSettings.MSMode != NewSettings.MSMode )
|
||||
{
|
||||
if( param != "" ) param += "&";
|
||||
@ -127,17 +106,6 @@ function SaveSettings()
|
||||
param += "strict=" + (NewSettings.strictEnabled?"1":"0");
|
||||
}
|
||||
|
||||
if( Octoserve )
|
||||
{
|
||||
var DelsysMask = NewSettings.DelsysMask;
|
||||
if( DelsysMask != Octoserve.DelsysMask )
|
||||
{
|
||||
if( DelsysMask == SupportedDelsys ) DelsysMask = 0;
|
||||
if( param != "" ) param += "&";
|
||||
param += "delsysmask=" + DelsysMask;
|
||||
}
|
||||
}
|
||||
|
||||
document.getElementById("SetButton").disabled = true;
|
||||
if( param != "" )
|
||||
{
|
||||
@ -157,59 +125,14 @@ function ClearSettings()
|
||||
NewSettings.nodvbtEnabled = false;
|
||||
NewSettings.strictEnabled = false;
|
||||
NewSettings.MSMode = "quad";
|
||||
NewSettings.DelsysMask = 0;
|
||||
SaveSettings();
|
||||
}
|
||||
}
|
||||
|
||||
function ShowDelsys()
|
||||
{
|
||||
if( Octoserve )
|
||||
{
|
||||
SupportedDelsys = 0;
|
||||
for(var i = 0; i < Octoserve.TunerList.length; i++ )
|
||||
{
|
||||
if( Octoserve.TunerList[i] )
|
||||
{
|
||||
SupportedDelsys = SupportedDelsys | Octoserve.TunerList[i].Type;
|
||||
}
|
||||
}
|
||||
|
||||
for(var i = 0; i < DelSysID.length; i++ )
|
||||
{
|
||||
var Element = document.getElementById(DelSysID[i]);
|
||||
if( Element )
|
||||
{
|
||||
if( SupportedDelsys & (1<<i) )
|
||||
{
|
||||
Element.disabled = false;
|
||||
Element.checked = (( Octoserve.DelsysMask & (1<<i)) != 0) || (Octoserve.DelsysMask == 0);
|
||||
Element.parentElement.style.visibility = "visible";
|
||||
}
|
||||
else
|
||||
{
|
||||
Element.disabled = true;
|
||||
Element.checked = false;
|
||||
Element.parentElement.style.visibility = "hidden";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
SupportedDelsys &= ~(1<<i);
|
||||
}
|
||||
}
|
||||
for(var i = DelSysID.length; i < 32; i++ )
|
||||
{
|
||||
SupportedDelsys &= ~(1<<i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function OnLoad()
|
||||
{
|
||||
xmlhttp.open("GET", url, true);
|
||||
xmlhttp.send();
|
||||
ShowDelsys();
|
||||
xmlhttp.open("GET", url, true);
|
||||
xmlhttp.send();
|
||||
}
|
||||
|
||||
function ChangeBoxName()
|
||||
@ -224,6 +147,8 @@ function ChangeBoxName()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
function Change()
|
||||
{
|
||||
if( NewSettings )
|
||||
@ -232,54 +157,12 @@ function Change()
|
||||
NewSettings.vlanEnabled = document.getElementById("QOSButton").checked;
|
||||
NewSettings.telnetEnabled = document.getElementById("TelnetButton").checked;
|
||||
NewSettings.nodmsEnabled = document.getElementById("NODMSButton").checked;
|
||||
NewSettings.nodvbtEnabled = document.getElementById("NODVBTButton").checked;
|
||||
NewSettings.strictEnabled = document.getElementById("STRICTButton").checked;
|
||||
document.getElementById("SetButton").disabled = false;
|
||||
}
|
||||
}
|
||||
|
||||
function ChangeDelSys(delsys)
|
||||
{
|
||||
if( NewSettings )
|
||||
{
|
||||
if( NewSettings.DelsysMask == 0 )
|
||||
NewSettings.DelsysMask = SupportedDelsys;
|
||||
|
||||
var Element = document.getElementById(DelSysID[delsys]);
|
||||
if( Element )
|
||||
{
|
||||
if( Element.checked )
|
||||
{
|
||||
NewSettings.DelsysMask |= ((1<<delsys) & SupportedDelsys);
|
||||
if( delsys == 16 )
|
||||
{
|
||||
NewSettings.DelsysMask |= (1<<3);
|
||||
document.getElementById(DelSysID[3]).checked = true;
|
||||
}
|
||||
if( delsys == 6 )
|
||||
{
|
||||
NewSettings.DelsysMask |= (1<<5);
|
||||
document.getElementById(DelSysID[5]).checked = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
NewSettings.DelsysMask &= ~(1<<delsys);
|
||||
if( delsys == 3 )
|
||||
{
|
||||
NewSettings.DelsysMask &= ~(1<<16);
|
||||
document.getElementById(DelSysID[16]).checked = false;
|
||||
}
|
||||
if( delsys == 5 )
|
||||
{
|
||||
NewSettings.DelsysMask &= ~(1<<6);
|
||||
document.getElementById(DelSysID[6]).checked = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
document.getElementById("SetButton").disabled = false;
|
||||
}
|
||||
}
|
||||
|
||||
function SetPassword()
|
||||
{
|
||||
var pwd1 = document.getElementById("pwd1").value;
|
||||
@ -366,7 +249,17 @@ function ToggleHelp(id)
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Enforce strict SAT>IP</td>
|
||||
<td>Disable DVBT announcement</td>
|
||||
<td style="text-align:right">
|
||||
<form action="">
|
||||
<input id="NODVBTButton" type="checkbox" value="Check" disabled="true" checked="false" onclick="Change()" />
|
||||
</form>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Enforce strict SAT>IP</td>
|
||||
<td style="text-align:right">
|
||||
<form action="">
|
||||
<input id="STRICTButton" type="checkbox" value="Check" disabled="true" checked="false" onclick="Change()" />
|
||||
@ -395,67 +288,6 @@ function ToggleHelp(id)
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="3" >
|
||||
<form action="">
|
||||
<table id="delsystable" cellpadding="2px" align="center" width="100%">
|
||||
<colgroup>
|
||||
<col width="25%">
|
||||
<col width="25%">
|
||||
<col width="25%">
|
||||
<col width="25%">
|
||||
</colgroup>
|
||||
<tr>
|
||||
<td>
|
||||
<input id="SYS_DVBS" type="checkbox" disabled="true" checked="false" onclick="ChangeDelSys(5)"/>
|
||||
DVB-S
|
||||
</td>
|
||||
<td>
|
||||
<input id="SYS_DVBS2" type="checkbox" disabled="true" checked="false" onclick="ChangeDelSys(6)"/>
|
||||
DVB-S2/S2X
|
||||
</td>
|
||||
<td>
|
||||
<input id="SYS_ISDBS" type="checkbox" disabled="true" checked="false" onclick="ChangeDelSys(9)"/>
|
||||
ISDB-S
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input id="SYS_DVBT" type="checkbox" disabled="true" checked="false" onclick="ChangeDelSys(3)"/>
|
||||
DVB-T
|
||||
</td>
|
||||
<td>
|
||||
<input id="SYS_DVBT2" type="checkbox" disabled="true" checked="false" onclick="ChangeDelSys(16)"/>
|
||||
DVB-T2
|
||||
</td>
|
||||
<td>
|
||||
<input id="SYS_ISDBT" type="checkbox" disabled="true" checked="false" onclick="ChangeDelSys(8)"/>
|
||||
ISDB-T
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input id="SYS_DVBC_ANNEX_A" type="checkbox" disabled="true" checked="false" onclick="ChangeDelSys(1)"/>
|
||||
DVB-C
|
||||
</td>
|
||||
<td>
|
||||
<input id="SYS_DVBC2" type="checkbox" disabled="true" checked="false" onclick="ChangeDelSys(19)"/>
|
||||
DVB-C2
|
||||
</td>
|
||||
<td>
|
||||
<input id="SYS_ISDBC" type="checkbox" disabled="true" checked="false" onclick="ChangeDelSys(10)"/>
|
||||
ISDB-C
|
||||
</td>
|
||||
<td>
|
||||
<input id="SYS_DVBC_ANNEX_B" type="checkbox" disabled="true" checked="false" onclick="ChangeDelSys(4)"/>
|
||||
J83.B
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="2" align="right">
|
||||
<div style="width: 300px">
|
||||
@ -565,27 +397,27 @@ function ToggleHelp(id)
|
||||
<div id="strict_hlpE" onclick="ToggleHelp('strict_hlpE')"
|
||||
style="display: none; position: absolute; width: 660px; left: 30px; top:30px; z-index: 2; border: 1px solid #000000; background: #FFFFE0;">
|
||||
<div style="position: relative; margin:20px; clear:both">
|
||||
<h3>Enforce strict SAT>IP</h3>
|
||||
<h3>Enforce strict SAT>IP</h3>
|
||||
<p/>
|
||||
The SAT>IP specification allows a second client to receive a stream created by another client.
|
||||
The SAT>IP specification allows a second client to receive a stream created by another client.
|
||||
The OctopusNet allows to modify some parameters (like PIDs) on this second stream. The original stream is not affected by this.
|
||||
<p/>
|
||||
Enforce strict SAT>IP disables this enhancment.
|
||||
Enforce strict SAT>IP disables this enhancment.
|
||||
<br/>
|
||||
Do this for testing clients to ensure they are compatible with other SAT>IP servers
|
||||
Do this for testing clients to ensure they are compatible with other SAT>IP servers
|
||||
</div>
|
||||
</div>
|
||||
<div id="strict_hlpD" onclick="ToggleHelp('strict_hlpD')"
|
||||
style="display: none; position: absolute; width: 660px; left: 30px; top:30px; z-index: 2; border: 1px solid #000000; background: #FFFFE0;">
|
||||
<div style="position: relative; margin:20px; clear:both">
|
||||
<h3>Erzwinge striktes SAT>IP</h3>
|
||||
<h3>Erzwinge striktes SAT>IP</h3>
|
||||
<p/>
|
||||
Die SAT>IP Spezifikation erlaubt einem zweiten Client das Empfangen eines von einem anderen Client angelegten Stream. Die OctopusNet erlaubt
|
||||
Die SAT>IP Spezifikation erlaubt einem zweiten Client das Empfangen eines von einem anderen Client angelegten Stream. Die OctopusNet erlaubt
|
||||
die Änderung einiger Parameter (z.B. PIDs) für diesen Stream. Der orginale Stream wird dadurch nicht beeinflusst.
|
||||
<p/>
|
||||
Das Erzwingen von strikten SAT>IP schaltet diese Erweiterung ab.
|
||||
Das Erzwingen von strikten SAT>IP schaltet diese Erweiterung ab.
|
||||
<br/>
|
||||
Beim Testen von Clients ist es sinnvoll diesen Parameter zu setzen um die Kompatibilität mit anderen SAT>IP Servern sicherzustellen.
|
||||
Beim Testen von Clients ist es sinnvoll diesen Parameter zu setzen um die Kompatibilität mit anderen SAT>IP Servern sicherzustellen.
|
||||
</div>
|
||||
</div>
|
||||
<!-- End Content -->
|
||||
@ -597,3 +429,5 @@ function ToggleHelp(id)
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
</html>
|
||||
|
@ -66,12 +66,6 @@ function CheckMaxS8()
|
||||
if devid == "0007dd01" then
|
||||
isMaxS8 = "true"
|
||||
end
|
||||
if devid == "0009dd01" then
|
||||
isMaxS8 = "true"
|
||||
end
|
||||
if devid == "000bdd01" then
|
||||
isMaxS8 = "true"
|
||||
end
|
||||
end
|
||||
return isMaxS8
|
||||
end
|
||||
@ -162,20 +156,13 @@ if query ~= "" then
|
||||
end
|
||||
restart = 1;
|
||||
restartdms = 1;
|
||||
elseif name == "delsysmask" then
|
||||
if value ~= "0" then
|
||||
WriteConfigFile("delsys_mask",value)
|
||||
os.remove("/config/nodvbt.enabled")
|
||||
else
|
||||
os.remove("/config/delsys_mask")
|
||||
end
|
||||
restart = 1;
|
||||
elseif( WriteSetting(name,value == "1") ) then
|
||||
if name == "telnet" then
|
||||
os.execute("/etc/init.d/S91telnet restart")
|
||||
end
|
||||
if name == "vlan" then restart = 1 end
|
||||
if name == "nodms" then restart = 1 end
|
||||
if name == "nodvbt" then restart = 1 end
|
||||
if name == "strict" then restart = 1 end
|
||||
end
|
||||
end
|
||||
@ -206,6 +193,7 @@ else
|
||||
http_print(' "telnetEnabled":' .. ReadSetting('telnet') .. ',')
|
||||
http_print(' "vlanEnabled":' .. ReadSetting('vlan') .. ',')
|
||||
http_print(' "nodmsEnabled":' .. ReadSetting('nodms') .. ',')
|
||||
http_print(' "nodvbtEnabled":' .. ReadSetting('nodvbt') .. ',')
|
||||
http_print(' "MSMode":"' .. GetMSMode() .. '",')
|
||||
http_print(' "strictEnabled":' .. ReadSetting('strict'))
|
||||
|
||||
|
@ -52,7 +52,7 @@ function Show(TunerList)
|
||||
if( TunerList[i].Status == "Active" )
|
||||
document.getElementById("tdStatus"+i).firstChild.nodeValue = "No Signal";
|
||||
else
|
||||
document.getElementById("tdStatus"+i).firstChild.nodeValue = "IDLE";
|
||||
document.getElementById("tdStatus"+i).firstChild.nodeValue = "";
|
||||
document.getElementById("tdStrength"+i).firstChild.nodeValue = "";
|
||||
document.getElementById("tdSNR"+i).firstChild.nodeValue = "";
|
||||
document.getElementById("tdQuality"+i).firstChild.nodeValue = "";
|
||||
|
@ -19,5 +19,5 @@
|
||||
|
||||
#ifndef _OCTOSERVE_VERSION_
|
||||
#define _OCTOSERVE_VERSION_
|
||||
#define OCTOSERVE_VERSION "1.1.6"
|
||||
#define OCTOSERVE_VERSION "1.0.81"
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user