From 6fef2a2ce83df49a8d22c5fdadd0c72130a91ea6 Mon Sep 17 00:00:00 2001 From: Ralph Metzler Date: Thu, 5 Nov 2015 19:03:54 +0100 Subject: [PATCH] calculate table lengths add supprt for isi parameter --- dddvb | 2 +- octoserve/dvb.c | 12 +++++++----- octoserve/octoserve.c | 9 ++++++++- octoserve/octoserve.h | 1 + 4 files changed, 17 insertions(+), 7 deletions(-) diff --git a/dddvb b/dddvb index 18481e2..e83dedf 160000 --- a/dddvb +++ b/dddvb @@ -1 +1 @@ -Subproject commit 18481e2ea6f62ff06c359aa4dc6debe2e5b53561 +Subproject commit e83dedf6b41d6cfb9315d714e5982d10ff8aab6c diff --git a/octoserve/dvb.c b/octoserve/dvb.c index 6f2c2c7..67c49b7 100644 --- a/octoserve/dvb.c +++ b/octoserve/dvb.c @@ -26,6 +26,7 @@ extern uint32_t debug; #define MMI_STATE_ENQ 2 #define MMI_STATE_MENU 3 +#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) static int set_fmode(uint32_t fmode) { @@ -148,6 +149,7 @@ static int set_fe(int fd, uint32_t fr, uint32_t sr, fe_delivery_system_t ds) { .cmd = DTV_INVERSION, .u.data = INVERSION_AUTO }, { .cmd = DTV_SYMBOL_RATE, .u.data = sr }, { .cmd = DTV_INNER_FEC, .u.data = FEC_AUTO }, +// { .cmd = DTV_STREAM_ID, .u.data = fe->param[PARAM_ISI] }, { .cmd = DTV_TUNE }, }; struct dtv_properties c; @@ -155,7 +157,7 @@ static int set_fe(int fd, uint32_t fr, uint32_t sr, fe_delivery_system_t ds) dbgprintf(DEBUG_DVB, "ds = %u\n", ds); - c.num = 7; + c.num = ARRAY_SIZE(p); c.props = p; ret = ioctl(fd, FE_SET_PROPERTY, &c); if (ret < 0) { @@ -366,7 +368,7 @@ static int tune_c(struct dvbfe *fe) set_property(fe->fd, DTV_DELIVERY_SYSTEM, SYS_DVBC_ANNEX_A); - c.num = 7; + c.num = ARRAY_SIZE(p); c.props = p; ret = ioctl(fe->fd, FE_SET_PROPERTY, &c); if (ret < 0) { @@ -406,7 +408,7 @@ static int tune_terr(struct dvbfe *fe) set_property(fe->fd, DTV_DELIVERY_SYSTEM, SYS_DVBT); - c.num = 4; + c.num = ARRAY_SIZE(p); c.props = p; ret = ioctl(fe->fd, FE_SET_PROPERTY, &c); if (ret < 0) { @@ -455,7 +457,7 @@ static int tune_c2(struct dvbfe *fe) set_property(fe->fd, DTV_DELIVERY_SYSTEM, SYS_DVBC2); - c.num = 5; + c.num = ARRAY_SIZE(p); c.props = p; ret = ioctl(fe->fd, FE_SET_PROPERTY, &c); if (ret < 0) { @@ -479,7 +481,7 @@ static int tune_terr2(struct dvbfe *fe) set_property(fe->fd, DTV_DELIVERY_SYSTEM, SYS_DVBT2); - c.num = 5; + c.num = ARRAY_SIZE(p); c.props = p; ret = ioctl(fe->fd, FE_SET_PROPERTY, &c); if (ret < 0) { diff --git a/octoserve/octoserve.c b/octoserve/octoserve.c index fd3609e..67efede 100644 --- a/octoserve/octoserve.c +++ b/octoserve/octoserve.c @@ -1043,6 +1043,13 @@ static int parse_url(struct oscon *con, int streamonly) break; p->set |= (1UL << PARAM_T2ID); dbgprintf(DEBUG_SYS, "t2id=%d, ", p->param[PARAM_T2ID]); + } else if (!strncasecmp(url, "isi=", 4)) { + url += 4; + p->param[PARAM_ISI] = strtoul(url, &end, 10); + if (end == url) + break; + p->set |= (1UL << PARAM_ISI); + dbgprintf(DEBUG_SYS, "isi=%d, ", p->param[PARAM_ISI]); } else if (!strncasecmp(url, "freq=", 5)) { float f; @@ -2580,7 +2587,7 @@ static struct octoserve *os_init(char *ifname, int nossdp, int nodms, int nodvbt return NULL; } #if 0 - if (init_http(os, debug) < 0) { + if (init_httpos, debug) < 0) { release_dvb(os); free(os); return NULL; diff --git a/octoserve/octoserve.h b/octoserve/octoserve.h index 5ed3c59..e7afaec 100644 --- a/octoserve/octoserve.h +++ b/octoserve/octoserve.h @@ -145,6 +145,7 @@ struct rtsp_error { #define PARAM_TMODE 14 #define PARAM_GI 15 #define PARAM_PLP 16 +#define PARAM_ISI 16 #define PARAM_T2ID 17 #define PARAM_SM 18 #define PARAM_C2TFT 19