All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Benham <andrew.benham@adsb.co.uk>
To: linux-media@vger.kernel.org
Subject: [PATCH] dvb-apps: Add option for UK channel numbering in ZAP format
Date: Sat, 31 Oct 2020 15:23:36 +0000	[thread overview]
Message-ID: <06ff134b-4727-ba14-e614-934a296ea210@adsb.co.uk> (raw)

There is already a "-u" option to output UK channel numbering in VDR
format.  Patch accepts the option for ZAP format too.

In ZAP format, channel names will have "<channel_number>-" prepended,
allowing channels to be sorted by number order.


diff -r 3d43b280298c util/scan/dump-zap.c
--- a/util/scan/dump-zap.c      Fri Mar 21 20:26:36 2014 +0100
+++ b/util/scan/dump-zap.c      Sat Oct 31 15:12:40 2020 +0000T
@@ -116,8 +116,12 @@
                                  int sat_number,
                                  uint16_t video_pid,
                                  uint16_t *audio_pid,
-                                uint16_t service_id)
+                                uint16_t service_id,
+                                int dump_channum,
+                                int channel_num)
  {
+       if ((dump_channum == 1) && (channel_num > 0))
+               fprintf(f, "%i-", channel_num);
         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);
diff -r 3d43b280298c util/scan/dump-zap.h
--- a/util/scan/dump-zap.h      Fri Mar 21 20:26:36 2014 +0100
+++ b/util/scan/dump-zap.h      Sat Oct 31 15:12:40 2020 +0000
@@ -14,6 +14,8 @@
                                  char polarity, int sat,
                                  uint16_t video_pid,
                                  uint16_t *audio_pid,
-                                uint16_t service_id);
+                                uint16_t service_id,
+                                int dump_channum,
+                                int channel_num);

  #endif
diff -r 3d43b280298c util/scan/scan.c
--- a/util/scan/scan.c  Fri Mar 21 20:26:36 2014 +0100
+++ b/util/scan/scan.c  Sat Oct 31 15:12:40 2020 +0000
@@ -2477,7 +2477,9 @@
                                                     sat_number(t),
                                                     s->video_pid,
                                                     s->audio_pid,
-                                                   s->service_id);
+                                                   s->service_id,
+                                                   vdr_dump_channum,
+                                                   s->channel_num);
                           default:
                                break;
                           }
@@ -2545,7 +2547,7 @@
         "               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"
-       "       -u      UK DVB-T Freeview channel numbering for VDR\n\n"
+       "       -u      UK DVB-T Freeview channel numbering\n\n"
         "       -P do not use ATSC PSIP tables for scanning\n"
         "           (but only PAT and PMT) (applies for ATSC only)\n"
         "       -A N    check for ATSC 1=Terrestrial [default], 2=Cable 
or 3=both\n"


-- 
Andrew Benham     Southgate, London N14, United Kingdom

The gates in my computer are AND OR and NOT, not "Bill"

             reply	other threads:[~2020-10-31 15:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-31 15:23 Andrew Benham [this message]
2021-03-23 12:59 ` [PATCH] dvb-apps: Add option for UK channel numbering in ZAP format Mauro Carvalho Chehab

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=06ff134b-4727-ba14-e614-934a296ea210@adsb.co.uk \
    --to=andrew.benham@adsb.co.uk \
    --cc=linux-media@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.