Mercurial > pt1.oyama
changeset 156:159a729b90eb
Specify the BS channels by transponder and slot.
author | Naoya OYAMA <naoya.oyama@gmail.com> |
---|---|
date | Mon, 10 Sep 2012 14:16:44 +0900 |
parents | 5d010d0ff6a1 |
children | 2c1cec3c5d64 |
files | src/recpt1.c |
diffstat | 1 files changed, 29 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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. */