# HG changeset patch # User Naoya OYAMA # Date 1347254204 -32400 # Node ID 159a729b90eb9844c1d069d7b303d0430608a463 # Parent 5d010d0ff6a10572fde1ca6b4694790febc63e50 Specify the BS channels by transponder and slot. diff -r 5d010d0ff6a1 -r 159a729b90eb src/recpt1.c --- a/src/recpt1.c Sun Sep 02 20:52:45 2012 +0900 +++ b/src/recpt1.c Mon Sep 10 14:16:44 2012 +0900 @@ -43,6 +43,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 + typedef struct pt1_msgbuf { long mtype; char mtext[MSGSZ]; @@ -52,6 +55,8 @@ boolean f_exit = FALSE; struct channel_info_list *channel_list = NULL; extern struct ushare_t *ut; +char bs_channel_buf[8]; +ISDB_T_FREQ_CONV_TABLE isdb_t_conv_set = { 0, CHTYPE_SATELLITE, 0, bs_channel_buf }; /* prototypes */ int tune(char *channel, thread_data *tdata, char *device); @@ -234,6 +239,30 @@ { 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. */