[w-scan] 01/04: Imported Upstream version 20141122

Tobias Grimm tiber-guest at moszumanska.debian.org
Sat Feb 14 10:39:10 UTC 2015


This is an automated email from the git hooks/post-receive script.

tiber-guest pushed a commit to branch master
in repository w-scan.

commit fea1d5cd876be1bb85720e0b89197612de3fbf7c
Author: etobi <git at e-tobi.net>
Date:   Sat Dec 27 11:23:25 2014 +0100

    Imported Upstream version 20141122
---
 ChangeLog     |  9 +++++++++
 Makefile.am   |  2 +-
 Makefile.in   |  3 ++-
 config.h      |  6 +++---
 configure     | 20 ++++++++++----------
 configure.in  |  2 +-
 descriptors.c | 24 +++++++++++++-----------
 descriptors.h |  1 +
 scan.c        | 42 +++++++++++++++++++++++++++---------------
 version.h     |  2 +-
 10 files changed, 68 insertions(+), 43 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index bf204cf..66fade6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
 ChangeLog:
 --------------------
+2014-11-22
+ - move '-lrt' from LDFLAGS to AM_LDFLAGS
+ - move nested function LeapYear() outside modified_julian_date_to_utc()
+ - add stream_type 0x24 (HEVC)
+ - bug fix: on Finnish DVBT/T2 network, 'other terrestrial frequencies' are
+   signalled by other_frequency flag, but not transmitted in NIT.
+   If those freqs could not be tuned due to bad reception, w_scan gets in
+   an endless loop; fix it. Thanks to Olli Salonen for report and help
+   debugging on remote side.
 
 2014-07-27
  - for changes against 20140118, see
diff --git a/Makefile.am b/Makefile.am
index 15d87a1..efd32c3 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -23,6 +23,6 @@ w_scan_SOURCES += version.h iconv_codes.c iconv_codes.h char-coding.c char-codin
 bin_SCRIPTS	= 
 dist_man_MANS	= doc/w_scan.1
 EXTRA_DIST	= doc
-LDFLAGS =  -lrt
 
+AM_LDFLAGS =  -lrt
 AM_CFLAGS = -Wall -Wextra -Wno-comment -Wswitch-default -Wno-unused-parameter
diff --git a/Makefile.in b/Makefile.in
index e1d592d..5274c98 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -178,7 +178,7 @@ INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-LDFLAGS = -lrt
+LDFLAGS = @LDFLAGS@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LTLIBOBJS = @LTLIBOBJS@
@@ -255,6 +255,7 @@ w_scan_SOURCES = atsc_psip_section.c atsc_psip_section.h config.h \
 bin_SCRIPTS = 
 dist_man_MANS = doc/w_scan.1
 EXTRA_DIST = doc
+AM_LDFLAGS = -lrt
 AM_CFLAGS = -Wall -Wextra -Wno-comment -Wswitch-default -Wno-unused-parameter
 all: config.h
 	$(MAKE) $(AM_MAKEFLAGS) all-am
diff --git a/config.h b/config.h
index 380ebf9..7dd8016 100644
--- a/config.h
+++ b/config.h
@@ -60,7 +60,7 @@
 #define PACKAGE_NAME "w_scan"
 
 /* Define to the full name and version of this package. */
-#define PACKAGE_STRING "w_scan 20140727"
+#define PACKAGE_STRING "w_scan 20141122"
 
 /* Define to the one symbol short name of this package. */
 #define PACKAGE_TARNAME "w_scan"
@@ -69,7 +69,7 @@
 #define PACKAGE_URL ""
 
 /* Define to the version of this package. */
-#define PACKAGE_VERSION "20140727"
+#define PACKAGE_VERSION "20141122"
 
 /* Define to 1 if you have the ANSI C header files. */
 #define STDC_HEADERS 1
@@ -97,7 +97,7 @@
 
 
 /* Version number of package */
-#define VERSION "20140727"
+#define VERSION "20141122"
 
 /* Define to 1 if on MINIX. */
 /* #undef _MINIX */
diff --git a/configure b/configure
index a8046bd..b36c02b 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for w_scan 20140727.
+# Generated by GNU Autoconf 2.68 for w_scan 20141122.
 #
 #
 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -557,8 +557,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='w_scan'
 PACKAGE_TARNAME='w_scan'
-PACKAGE_VERSION='20140727'
-PACKAGE_STRING='w_scan 20140727'
+PACKAGE_VERSION='20141122'
+PACKAGE_STRING='w_scan 20141122'
 PACKAGE_BUGREPORT=''
 PACKAGE_URL=''
 
@@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures w_scan 20140727 to adapt to many kinds of systems.
+\`configure' configures w_scan 20141122 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1306,7 +1306,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of w_scan 20140727:";;
+     short | recursive ) echo "Configuration of w_scan 20141122:";;
    esac
   cat <<\_ACEOF
 
@@ -1393,7 +1393,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-w_scan configure 20140727
+w_scan configure 20141122
 generated by GNU Autoconf 2.68
 
 Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1811,7 +1811,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by w_scan $as_me 20140727, which was
+It was created by w_scan $as_me 20141122, which was
 generated by GNU Autoconf 2.68.  Invocation command line was
 
   $ $0 $@
@@ -2629,7 +2629,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='w_scan'
- VERSION='20140727'
+ VERSION='20141122'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -5029,7 +5029,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by w_scan $as_me 20140727, which was
+This file was extended by w_scan $as_me 20141122, which was
 generated by GNU Autoconf 2.68.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -5095,7 +5095,7 @@ _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-w_scan config.status 20140727
+w_scan config.status 20141122
 configured by $0, generated by GNU Autoconf 2.68,
   with options \\"\$ac_cs_config\\"
 
diff --git a/configure.in b/configure.in
index 380c542..1a2d100 100644
--- a/configure.in
+++ b/configure.in
@@ -2,7 +2,7 @@
 # Process this file with autoconf to produce a configure script.
 
 AC_PREREQ([2.63])
-AC_INIT([w_scan], [20140727])
+AC_INIT([w_scan], [20141122])
 AC_CONFIG_SRCDIR([scan.c])
 AC_CONFIG_HEADERS([config.h])
 AM_INIT_AUTOMAKE
diff --git a/descriptors.c b/descriptors.c
index c88d339..ada403e 100644
--- a/descriptors.c
+++ b/descriptors.c
@@ -1192,26 +1192,28 @@ void parse_logical_channel_descriptor(const unsigned char * buf, struct transpon
      }
 }
 
+
 /* 300468 v011101 annex C, Conversion between time and date conventions
  * NOTE: These formulas are applicable between the inclusive dates 1900 March 1 to 2100 February 28.
  */
+
+static  __u8 LeapYear(__u16 year) {
+  if ((year % 400) == 0)
+     return 1;
+  else if ((year % 100) == 0)
+     return 0;
+  else if ((year % 4) == 0)
+     return 1;
+  return 0;
+}
+
 struct tm modified_julian_date_to_utc(__u32 MJD) {
   struct tm utc;
   __u8 mtab[] = {31,28,31,30,31,30,31,31,30,31,30,31};
   int _Y = (int) (MJD - 15078.2) / 365.25;
   int _M = (int) (MJD - 14956.1 - (int) (_Y * 365.25)) / 30.6001;
   int K = (_M == 14) ? 1 : (_M == 15) ? 1 : 0;
-
-  __u8 LeapYear(__u16 year) {
-    if ((year % 400) == 0)
-       return 1;
-    else if ((year % 100) == 0)
-       return 0;
-    else if ((year % 4) == 0)
-       return 1;
-    return 0;
-    }
-        
+       
   memset(&utc, 0, sizeof(struct tm));
   utc.tm_mday = MJD - 14956 - (int) (_Y * 365.25) - (int) (_M * 30.6001);
   utc.tm_year = _Y + K;
diff --git a/descriptors.h b/descriptors.h
index d34ae91..bb45e6e 100644
--- a/descriptors.h
+++ b/descriptors.h
@@ -172,6 +172,7 @@ enum _stream_type {
         metadata_in_iso_iec_13818_6_synced_dl   = 0x19,
         iso_iec_13818_11_IPMP_stream            = 0x1A,
         iso_iec_14496_10_AVC_video_stream       = 0x1B,
+        iso_iec_23008_2_H265_video_hevc_stream  = 0x24,
         atsc_a_52b_ac3                          = 0x81, // ac-3 @ atsc
 };
 
diff --git a/scan.c b/scan.c
index 52f40be..ac97e42 100644
--- a/scan.c
+++ b/scan.c
@@ -921,7 +921,7 @@ static void parse_descriptors(enum table_id t, const unsigned char * buf, int de
      }
 }
 
-/* EN 13818-1 p.43 Table 2-25 � Program association section
+/* EN 13818-1 p.43 Table 2-25 - Program association section
  */
 em_static void parse_pat(const unsigned char * buf, uint16_t section_length, uint16_t transport_stream_id, uint32_t flags) {
   verbose("PAT (xxxx:xxxx:%u)\n", transport_stream_id);  
@@ -960,7 +960,7 @@ em_static void parse_pat(const unsigned char * buf, uint16_t section_length, uin
      s->pmt_pid = program_number;
 
      if (! (flags & SECTION_FLAG_INITIAL)) {
-        if (s->priv == NULL) { //  && s->pmt_pid) {  pmt_pid is by spec: 0x0010 .. 0x1FFE . see EN13818-1 p.19 Table 2-3 � PID table 
+        if (s->priv == NULL) { //  && s->pmt_pid) {  pmt_pid is by spec: 0x0010 .. 0x1FFE . see EN13818-1 p.19 Table 2-3 - PID table
            s->priv = calloc(1, sizeof(struct section_buf));
            setup_filter(s->priv, demux_devname, s->pmt_pid, TABLE_PMT, -1, 1, 0, SECTION_FLAG_FREE);
            add_filter(s->priv);
@@ -1175,6 +1175,13 @@ em_static void parse_pmt(const unsigned char * buf, uint16_t section_length, uin
               s->video_stream_type = buf[0];
               }
            break;
+        case iso_iec_23008_2_H265_video_hevc_stream:
+           moreverbose("  HEVC Video stream, ITU-T Rec. H.265 | ISO/IEC 23008-1 : PID %d (stream type 0x%x)\n", elementary_pid, buf[0]);
+           if (s->video_pid == 0) {
+              s->video_pid = elementary_pid;
+              s->video_stream_type = buf[0];
+              }
+           break;
         case atsc_a_52b_ac3:
            moreverbose("  AC-3 Audio per ATSC A/52B : PID %d (stream type 0x%x)\n", elementary_pid, buf[0]);
            if (s->ac3_num < AC3_CHAN_MAX) {
@@ -2307,29 +2314,31 @@ static int tune_to_next_transponder(int frontend_fd) {
      t = new_transponders->first;
      i = 0;
 
-   //retry:                                                        /* NOTE: jump mark here. */
      if (t->frequency && (tune_to_transponder(frontend_fd, t) == 0))
         return 0;
 
-   //other_freq:                                                   /* NOTE: jump mark here. */
      if (t->other_frequency_flag && ((t->frequencies)->count > 0)) {
         while(i < (t->frequencies)->count) {
+           struct transponder * test = NULL;
            struct frequency_item * next = GetItem(t->frequencies, i++);
+
            if (next == NULL)
               continue; // GetItem may return NULL; dont want to segfault here.
 
            t->frequency = next->frequency;
            j = 0;
-           if (find_transponder_by_freq(t) == NULL) {
+           test = find_transponder_by_freq(t);
+           if ((test != NULL) && !(IsMember(scanned_transponders, test))) {
               info("retrying with center_frequency = %u\n", t->frequency);
-              //goto retry;
               if (tune_to_transponder(frontend_fd, t) == 0)
                  return 0;
+
               }
            while(j < (next->transposers)->count) {
               struct frequency_item * transposer = GetItem(next->transposers, j++);
               t->frequency = transposer->frequency;
-              if (find_transponder_by_freq(t) == NULL) {
+              test = find_transponder_by_freq(t);
+              if ((test != NULL) && !(IsMember(scanned_transponders, test))) {
                  info("retrying with transposer_frequency = %u\n", t->frequency);
                  if (tune_to_transponder(frontend_fd, t) == 0)
                     return 0;
@@ -2337,6 +2346,14 @@ static int tune_to_next_transponder(int frontend_fd) {
               }
            }
         }
+     if (IsMember(new_transponders, t)) {
+        // moving new_transponders -> scanned_transponders is handled in tune_to_transponder(),
+        // but we may pass here w/o calling it. Enshure this tp is moved to scanned_transponders.
+        verbose("skipped: (%u:%u:%u) (time: %s)\n",
+                t->original_network_id, t->network_id, t->transport_stream_id, run_time());
+        UnlinkItem(new_transponders, t, false);
+        AddItem(scanned_transponders, t);
+        }
      }
   return -1;
 }
@@ -2919,8 +2936,9 @@ static void network_scan(int frontend_fd, int tuning_data) {
      exit(1);
      }
 
-  do { scan_tp(); }
-     while (tune_to_next_transponder(frontend_fd) == 0);
+  do {
+     scan_tp();
+     } while (tune_to_next_transponder(frontend_fd) == 0);
 }
 
 int device_is_preferred(int caps, const char * frontend_name, uint16_t scantype) {
@@ -4097,15 +4115,9 @@ int main(int argc, char ** argv) {
      }
 
   signal(SIGINT, handle_sigint);
-
   network_scan(frontend_fd, valid_initial_data);
-
   close(frontend_fd);
-
   dump_lists(adapter, frontend);
-
   cleanup();
-
   return 0;
 }
-
diff --git a/version.h b/version.h
index cd4f495..deda43b 100644
--- a/version.h
+++ b/version.h
@@ -1,6 +1,6 @@
 /* AUTOMATICALLY GENERATED - DO NOT EDIT MANUALLY */
 #ifndef W_SCAN_VERSION_H
 #define W_SCAN_VERSION_H
-uint version=20140727;
+uint version=20141122;
 #endif
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vdr-dvb/w-scan.git



More information about the pkg-vdr-dvb-changes mailing list