# HG changeset patch # User Yoshiki Yazawa # Date 1366869748 -32400 # Node ID 2b057f249811167cf6d52a14500c4101dd113c5f # Parent 550ee373afbc13d94cd829eb375be917e040e3de imported bs_ch patch diff -r 550ee373afbc -r 2b057f249811 recpt1/recpt1.c --- 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. */