diff options
author | Mark Purcell <msp@debian.org> | 2008-06-22 11:00:40 +1000 |
---|---|---|
committer | etobi <git@e-tobi.net> | 2013-09-03 09:48:42 +0200 |
commit | 891c51ff368ed700dec6025eeb47ce4d96f76418 (patch) | |
tree | 3729664829e4faa691d403274f38eb10890b533c /util/scan/scan.c | |
parent | 1c6e1f28f54ec2606c23936c1d8689f2be55a86c (diff) | |
parent | ab959d7b4194715870128e616b8e29d4a101e488 (diff) | |
download | linux-dvb-apps-debian/1.1.1+rev1207-1.tar.gz |
Imported Debian patch 1.1.1+rev1207-1debian/1.1.1+rev1207-1
Diffstat (limited to 'util/scan/scan.c')
-rw-r--r-- | util/scan/scan.c | 66 |
1 files changed, 46 insertions, 20 deletions
diff --git a/util/scan/scan.c b/util/scan/scan.c index 350d9c9..1b7a3e5 100644 --- a/util/scan/scan.c +++ b/util/scan/scan.c @@ -61,9 +61,9 @@ static int vdr_dump_provider; static int vdr_dump_channum; static int no_ATSC_PSIP; static int ATSC_type=1; -static int ca_select = 1; +static int ca_select = -1; static int serv_select = 7; -static int vdr_version = 2; +static int vdr_version = 3; static struct lnb_types_st lnb_type; static int unique_anon_services; @@ -130,6 +130,7 @@ struct transponder { struct list_head list; struct list_head services; int network_id; + int original_network_id; int transport_stream_id; enum fe_type type; struct dvb_frontend_parameters param; @@ -236,6 +237,7 @@ static struct transponder *find_transponder(uint32_t frequency) static void copy_transponder(struct transponder *d, struct transponder *s) { d->network_id = s->network_id; + d->original_network_id = s->original_network_id; d->transport_stream_id = s->transport_stream_id; d->type = s->type; memcpy(&d->param, &s->param, sizeof(d->param)); @@ -755,12 +757,15 @@ static void parse_pmt (const unsigned char *buf, int section_length, int service switch (buf[0]) { case 0x01: case 0x02: + case 0x1b: /* H.264 video stream */ moreverbose(" VIDEO : PID 0x%04x\n", elementary_pid); if (s->video_pid == 0) s->video_pid = elementary_pid; break; case 0x03: case 0x81: /* Audio per ATSC A/53B [2] Annex B */ + case 0x0f: /* ADTS Audio Stream - usually AAC */ + case 0x11: /* ISO/IEC 14496-3 Audio with LATM transport */ case 0x04: moreverbose(" AUDIO : PID 0x%04x\n", elementary_pid); if (s->audio_num < AUDIO_CHAN_MAX) { @@ -772,6 +777,12 @@ static void parse_pmt (const unsigned char *buf, int section_length, int service warning("more than %i audio channels, truncating\n", AUDIO_CHAN_MAX); break; + case 0x07: + moreverbose(" MHEG : PID 0x%04x\n", elementary_pid); + break; + case 0x0B: + moreverbose(" DSM-CC : PID 0x%04x\n", elementary_pid); + break; case 0x06: if (find_descriptor(0x56, buf + 5, ES_info_len, NULL, NULL)) { moreverbose(" TELETEXT : PID 0x%04x\n", elementary_pid); @@ -860,6 +871,7 @@ static void parse_nit (const unsigned char *buf, int section_length, int network memset(&tn, 0, sizeof(tn)); tn.type = -1; tn.network_id = network_id; + tn.original_network_id = (buf[2] << 8) | buf[3]; tn.transport_stream_id = transport_stream_id; parse_descriptors (NIT, buf + 6, descriptors_loop_len, &tn); @@ -1462,21 +1474,34 @@ static int __tune_to_transponder (int frontend_fd, struct transponder *t) } if (t->type == FE_QPSK) { - int hiband = 0; - - if (lnb_type.switch_val && lnb_type.high_val && - p.frequency >= lnb_type.switch_val) - hiband = 1; - - setup_switch (frontend_fd, - switch_pos, - t->polarisation == POLARISATION_VERTICAL ? 0 : 1, - hiband); - usleep(50000); - if (hiband) - p.frequency = abs(p.frequency - lnb_type.high_val); - else + if (lnb_type.high_val) { + if (lnb_type.switch_val) { + /* Voltage-controlled switch */ + int hiband = 0; + + if (p.frequency >= lnb_type.switch_val) + hiband = 1; + + setup_switch (frontend_fd, + switch_pos, + t->polarisation == POLARISATION_VERTICAL ? 0 : 1, + hiband); + usleep(50000); + if (hiband) + p.frequency = abs(p.frequency - lnb_type.high_val); + else + p.frequency = abs(p.frequency - lnb_type.low_val); + } else { + /* C-Band Multipoint LNBf */ + p.frequency = abs(p.frequency - (t->polarisation == POLARISATION_VERTICAL ? + lnb_type.low_val: lnb_type.high_val)); + } + } else { + /* Monopoint LNBf without switch */ p.frequency = abs(p.frequency - lnb_type.low_val); + } + if (verbosity >= 2) + dprintf(1,"DVB-S IF freq is %d\n",p.frequency); } if (ioctl(frontend_fd, FE_SET_FRONTEND, &p) == -1) { @@ -1991,7 +2016,7 @@ static void dump_lists (void) //FIXME: s->subtitling_pid s->ac3_pid, s->service_id, - t->network_id, + t->original_network_id, s->transport_stream_id, t->orbital_pos, t->we_flag, @@ -2066,14 +2091,15 @@ static const char *usage = "\n" " -5 multiply all filter timeouts by factor 5\n" " for non-DVB-compliant section repitition rates\n" " -o fmt output format: 'zap' (default), 'vdr' or 'pids' (default with -c)\n" - " -x N Conditional Axcess, (default 1)\n" + " -x N Conditional Access, (default -1)\n" " N=0 gets only FTA channels\n" + " N=-1 gets all channels\n" " N=xxx sets ca field in vdr output to :xxx:\n" " -t N Service select, Combined bitfield parameter.\n" " 1 = TV, 2 = Radio, 4 = Other, (default 7)\n" " -p for vdr output format: dump provider name\n" - " -e N VDR version, default 2 for VDR-1.2.x\n" - " ANYTHING ELSE GIVES NONZERO NIT and TID\n" + " -e N VDR version, default 3 for VDR-1.3.x and newer\n" + " value 2 sets NIT and TID to zero\n" " Vdr version 1.3.x and up implies -p.\n" " -l lnb-type (DVB-S Only) (use -l help to print types) or \n" " -l low[,high[,switch]] in Mhz\n" |