- if(strcmp(arg_onTV, "/BS") == 0){
- STATION *sta=malloc(sizeof(STATION)*2);
- int sta_count = 0;
- svttop = calloc(1, sizeof(SVT_CONTROL));
- char *head="BS";
- GetSDT_chout(infile, svttop, secs, SECCOUNT,&sta, &sta_count,head);
- checkSta_BS(&sta,&sta_count);
- //if (sta_count)
- //printf("Station count: %d\n1st ontv=%s,name=%s\n",sta_count, sta[0].ontv, sta[0].name);
- pStas = sta;
- staCount = sta_count;// sizeof(pStas) / sizeof (STATION);
- act = 0 ;
- outputhtml=1;
+ pStas = NULL;
+ staCount = 0;
+ svttop = calloc(1, sizeof(SVT_CONTROL));
+ act = 0 ;
+
+ /* 興味のあるpidを指定 */
+ if ( is_logo ) {
+ memset(secs, 0, sizeof(SECcache) * SECCOUNT);
+ secs[0].pid = 0x00; /* PAT */
+ secs[1].pid = 0x11; /* SDT */
+ secs[2].pid = 0x29; /* CDT */
+ }
+ else {
+ memset(secs, 0, sizeof(SECcache) * SECCOUNT);
+ secs[0].pid = 0x00; /* PAT */
+ secs[1].pid = 0x11; /* SDT */
+ secs[2].pid = 0x12; /* EIT */
+ secs[3].pid = 0x23; /* SDTT */
+ secs[4].pid = 0x26; /* EIT */
+ secs[5].pid = 0x27; /* EIT */
+ secs[6].pid = 0x29; /* CDT */
+ }
+
+ if(strcmp(arg_onTV, "/TIME") == 0){
+ printf("TSに載っている時刻データは2秒ほど早めてあるのかもしれません。\n");
+ memset(secs, 0, sizeof(SECcache) * SECCOUNT);
+ secs[0].pid = 0x14; /* TOT */
+
+ GetSDT(infile, NULL, secs, SECCOUNT,NULL, NULL,NULL, 0);
+
+ goto cleanup;
+ }else if(strcmp(arg_onTV, "/BS") == 0){
+ char *head = "BS";
+ GetSDT(infile, svttop, secs, SECCOUNT, &pStas, &staCount, head, is_logo);