Mercurial > pt1
changeset 135:2b057f249811
imported bs_ch patch
author | Yoshiki Yazawa <yaz@honeyplanet.jp> |
---|---|
date | Thu, 25 Apr 2013 15:02:28 +0900 |
parents | 550ee373afbc |
children | 0e2ab31cd219 |
files | recpt1/recpt1.c |
diffstat | 1 files changed, 28 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/recpt1/recpt1.c Thu Apr 25 15:02:26 2013 +0900 +++ b/recpt1/recpt1.c Thu Apr 25 15:02:28 2013 +0900 @@ -40,6 +40,9 @@ /* ipc message size */ #define MSGSZ 255 +#define ISDB_T_NODE_LIMIT 24 // 32:ARIB limit 24:program maximum +#define ISDB_T_SLOT_LIMIT 8 + /* type definitions */ typedef int boolean; @@ -73,6 +76,8 @@ /* globals */ boolean f_exit = FALSE; +char bs_channel_buf[8]; +ISDB_T_FREQ_CONV_TABLE isdb_t_conv_set = { 0, CHTYPE_SATELLITE, 0, bs_channel_buf }; /* prototypes */ ISDB_T_FREQ_CONV_TABLE *searchrecoff(char *channel); @@ -185,6 +190,29 @@ { int lp; + if(channel[0] == 'B' && channel[1] == 'S') { + int node = 0; + int slot = 0; + char *bs_ch; + + bs_ch = channel + 2; + while(isdigit(*bs_ch)) { + node *= 10; + node += *bs_ch++ - '0'; + } + if(*bs_ch == '_' && (node&0x01) && node < ISDB_T_NODE_LIMIT) { + if(isdigit(*++bs_ch)) { + slot = *bs_ch - '0'; + if(*++bs_ch == '\0' && slot < ISDB_T_SLOT_LIMIT) { + isdb_t_conv_set.set_freq = node / 2; + isdb_t_conv_set.add_freq = slot; + sprintf(bs_channel_buf, "BS%d_%d", node, slot); + return &isdb_t_conv_set; + } + } + } + return NULL; + } for(lp = 0; isdb_t_conv_table[lp].parm_freq != NULL; lp++) { /* return entry number in the table when strings match and * lengths are same. */