hallo,

attached to this mail is a very small patch which adds ca_filter support
for szap output in the scan utility which comes with the linux dvb
driver 1.0.0.

best regards,

   guenter

diff -u scan/dump-zap.c /root/linuxtv-dvb-1.0.0/apps/scan/dump-zap.c
--- scan/dump-zap.c     2003-05-26 19:42:18.000000000 +0200
+++ /root/linuxtv-dvb-1.0.0/apps/scan/dump-zap.c        2003-08-24 19:56:55.000000000 
+0200
@@ -109,11 +109,15 @@
                                 int sat_number,
                                 uint16_t video_pid,
                                 uint16_t *audio_pid,
-                                uint16_t service_id)
+                                uint16_t service_id,
+                                int scrambled,
+                                int ca_select)
 {
-       fprintf (f, "%s:", service_name);
-       zap_dump_dvb_parameters (f, type, p, polarity, sat_number);
-       fprintf (f, ":%i:%i:%i", video_pid, audio_pid[0], service_id);
-       fprintf (f, "\n");
+       if ( (!ca_select && !scrambled) || (ca_select == scrambled) ) {
+               fprintf (f, "%s:", service_name);
+               zap_dump_dvb_parameters (f, type, p, polarity, sat_number);
+               fprintf (f, ":%i:%i:%i", video_pid, audio_pid[0], service_id);
+               fprintf (f, "\n");
+       }
 }
 
diff -u scan/dump-zap.h /root/linuxtv-dvb-1.0.0/apps/scan/dump-zap.h
--- scan/dump-zap.h     2003-05-26 19:42:18.000000000 +0200
+++ /root/linuxtv-dvb-1.0.0/apps/scan/dump-zap.h        2003-08-24 19:55:03.000000000 
+0200
@@ -13,7 +13,9 @@
                                 char polarity, int sat,
                                 uint16_t video_pid,
                                 uint16_t *audio_pid,
-                                uint16_t service_id);
+                                uint16_t service_id,
+                                int scrambled,
+                                int ca_select);
 
 #endif
 
diff -u scan/scan.c /root/linuxtv-dvb-1.0.0/apps/scan/scan.c
--- scan/scan.c 2003-07-25 19:10:24.000000000 +0200
+++ /root/linuxtv-dvb-1.0.0/apps/scan/scan.c    2003-08-24 19:57:50.000000000 +0200
@@ -1546,7 +1546,9 @@
                                                    sat_number(t),
                                                    s->video_pid,
                                                    s->audio_pid,
-                                                   s->service_id);
+                                                   s->service_id,
+                                                   s->scrambled,
+                                                   ca_select);
                          default:
                                break;
                          }

Reply via email to