Hello community,

here is the log from the commit of package chromaprint for openSUSE:Factory 
checked in at 2018-01-26 13:55:54
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/chromaprint (Old)
 and      /work/SRC/openSUSE:Factory/.chromaprint.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "chromaprint"

Fri Jan 26 13:55:54 2018 rev:17 rq:568805 version:1.4.3

Changes:
--------
--- /work/SRC/openSUSE:Factory/chromaprint/chromaprint.changes  2017-08-12 
19:39:38.703925653 +0200
+++ /work/SRC/openSUSE:Factory/.chromaprint.new/chromaprint.changes     
2018-01-26 13:55:56.319235247 +0100
@@ -1,0 +2,16 @@
+Wed Jan 24 01:37:07 UTC 2018 - [email protected]
+
+- Update to 1.4.3:
+  * Allow one packet to have decoding error
+  * Print output even if there is a decoding error, exit with error
+    code 3 instead of 2 in such case
+  * Add new option -ignore-errors to change the error code 3 to 0
+  * Add new option -algorithm NUM
+  * Periodically flush output when working on a stream
+- drop chromaprint-ffmpeg-pkgconfig.patch
+  * fixed upstream
+- Switch to https for URL
+- Source moved to github
+- cleanup with spec-cleaner
+
+-------------------------------------------------------------------

Old:
----
  chromaprint-1.4.2.tar.gz
  chromaprint-ffmpeg-pkgconfig.patch

New:
----
  chromaprint-1.4.3.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ chromaprint.spec ++++++
--- /var/tmp/diff_new_pack.aq4SUs/_old  2018-01-26 13:55:57.631173992 +0100
+++ /var/tmp/diff_new_pack.aq4SUs/_new  2018-01-26 13:55:57.643173431 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package chromaprint
 #
-# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
 # Copyright (c) 2012 Pascal Bleser <[email protected]>
 #
 # All modifications and additions to the file contributed by third parties
@@ -20,21 +20,19 @@
 %define soname      1
 %bcond_without ffmpeg
 Name:           chromaprint
-Version:        1.4.2
+Version:        1.4.3
 Release:        0
 Summary:        Audio Fingerprinting Library
-License:        MIT and LGPL-2.1
+License:        MIT AND LGPL-2.1
 Group:          Development/Libraries/C and C++
-Url:            http://acoustid.org/chromaprint
-Source0:        
https://bitbucket.org/acoustid/chromaprint/downloads/chromaprint-%{version}.tar.gz
+Url:            https://acoustid.org/chromaprint
+Source0:        
https://github.com/acoustid/chromaprint/releases/download/v%{version}/%{name}-%{version}.tar.gz
 Source1:        baselibs.conf
-Patch0:         chromaprint-ffmpeg-pkgconfig.patch
 BuildRequires:  cmake
 BuildRequires:  fftw3-devel
 BuildRequires:  gcc-c++
 BuildRequires:  libtag-devel
 BuildRequires:  pkgconfig
-BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 %if %{with ffmpeg}
 BuildRequires:  pkgconfig(libavcodec)
 BuildRequires:  pkgconfig(libavformat)
@@ -88,8 +86,7 @@
 %endif
 
 %prep
-%setup -q
-%patch0 -p1
+%setup -qn %{name}-v%{version}
 
 %build
 %cmake \
@@ -106,24 +103,20 @@
 %cmake_install
 
 %post   -n libchromaprint%{soname} -p /sbin/ldconfig
-
 %postun -n libchromaprint%{soname} -p /sbin/ldconfig
 
 %files -n libchromaprint%{soname}
-%defattr(-,root,root)
 %doc LICENSE.md NEWS.txt README.md
 %{_libdir}/libchromaprint.so.%{soname}
 %{_libdir}/libchromaprint.so.%{soname}.*
 
 %files -n libchromaprint-devel
-%defattr(-,root,root)
 %{_includedir}/chromaprint.h
 %{_libdir}/libchromaprint.so
 %{_libdir}/pkgconfig/libchromaprint.pc
 
 %if %{with ffmpeg}
 %files fpcalc
-%defattr(-,root,root)
 %{_bindir}/fpcalc
 %endif
 

++++++ chromaprint-1.4.2.tar.gz -> chromaprint-1.4.3.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/chromaprint-1.4.2/.gitlab-ci.yml 
new/chromaprint-v1.4.3/.gitlab-ci.yml
--- old/chromaprint-1.4.2/.gitlab-ci.yml        2016-12-28 21:10:42.000000000 
+0100
+++ new/chromaprint-v1.4.3/.gitlab-ci.yml       2018-01-21 17:41:56.000000000 
+0100
@@ -11,8 +11,8 @@
     - mkdir build.test.${JOB_NAME[1]}
     - cd build.test.${JOB_NAME[1]}
     - cmake -DCMAKE_BUILD_TYPE=Release -DFFT_LIB=${JOB_NAME[1]} 
-DBUILD_TESTS=ON $EXTRA_CMAKE_ARGS ..
-    - make
-    - make check
+    - make VERBOSE=1
+    - make check VERBOSE=1
 
 test avfft:
   <<: *test
@@ -37,7 +37,7 @@
 test vdsp:
   <<: *test
   variables:
-    EXTRA_CMAKE_ARGS: -DCMAKE_CXX_FLAGS='-stdlib=libc++' 
-DGTEST_ROOT=/usr/local/src/gtest-1.7.0
+    EXTRA_CMAKE_ARGS: -DCMAKE_CXX_FLAGS='-stdlib=libc++' 
-DGTEST_ROOT=/usr/local/src/googletest/googletest/
   tags:
     - osx
 
@@ -61,14 +61,23 @@
   tags:
     - osx
 
-.package-raspberrypi: &package-raspberrypi
+.package-linux-armhf: &package-linux-armhf
   <<: *package
   tags:
-    - raspberrypi
+    - linux
+    - armhf
 
 package linux i686: *package
 package linux x86_64: *package
-package linux armhf: *package-raspberrypi
+package linux armhf: *package-linux-armhf
 package windows i686: *package
 package windows x86_64: *package
 package macos x86_64: *package-macos
+
+package src:
+  <<: *package
+  script:
+    - VERSION=$(echo $CI_BUILD_TAG | sed 's/^v//')
+    - git archive --format=tar.gz --prefix=chromaprint-$CI_BUILD_TAG/ 
$CI_BUILD_TAG >chromaprint-$VERSION.tar.gz
+  only:
+    - tags
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/chromaprint-1.4.2/CMakeLists.txt 
new/chromaprint-v1.4.3/CMakeLists.txt
--- old/chromaprint-1.4.2/CMakeLists.txt        2016-12-28 21:10:42.000000000 
+0100
+++ new/chromaprint-v1.4.3/CMakeLists.txt       2018-01-21 17:41:56.000000000 
+0100
@@ -12,7 +12,7 @@
 
 set(chromaprint_VERSION_MAJOR 1)
 set(chromaprint_VERSION_MINOR 4)
-set(chromaprint_VERSION_PATCH 2)
+set(chromaprint_VERSION_PATCH 3)
 set(chromaprint_VERSION 
"${chromaprint_VERSION_MAJOR}.${chromaprint_VERSION_MINOR}.${chromaprint_VERSION_PATCH}")
 
 set(PROJECT_VERSION "${chromaprint_VERSION}")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/chromaprint-1.4.2/NEWS.txt 
new/chromaprint-v1.4.3/NEWS.txt
--- old/chromaprint-1.4.2/NEWS.txt      2016-12-28 21:10:42.000000000 +0100
+++ new/chromaprint-v1.4.3/NEWS.txt     2018-01-21 17:41:56.000000000 +0100
@@ -1,3 +1,12 @@
+Version 1.4.3 -- January 21, 2017
+==================================
+
+ - Allow one packet to have decoding error
+ - Print output even if there is a decoding error, exit with error code 3 
instead of 2 in such case
+ - Add new option -ignore-errors to change the error code 3 to 0
+ - Add new option -algorithm NUM
+ - Periotically flush output when working on a stream
+
 Version 1.4.2 -- December 28, 2016
 ==================================
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/chromaprint-1.4.2/cmake/modules/FindFFmpeg.cmake 
new/chromaprint-v1.4.3/cmake/modules/FindFFmpeg.cmake
--- old/chromaprint-1.4.2/cmake/modules/FindFFmpeg.cmake        2016-12-28 
21:10:42.000000000 +0100
+++ new/chromaprint-v1.4.3/cmake/modules/FindFFmpeg.cmake       2018-01-21 
17:41:56.000000000 +0100
@@ -108,7 +108,7 @@
 
 SET(FFMPEG_FOUND "NO")
 # Note we don't check FFMPEG_LIBSWSCALE_FOUND here, it's optional.
-IF   (FFMPEG_LIBAVFORMAT_FOUND AND FFMPEG_LIBAVCODEC_FOUND AND 
FFMPEG_LIBAVUTIL_FOUND AND FFMPEG_STDINT_INCLUDE_DIR)
+IF   (FFMPEG_LIBAVFORMAT_FOUND AND FFMPEG_LIBAVCODEC_FOUND AND 
FFMPEG_LIBAVUTIL_FOUND)
 
     SET(FFMPEG_FOUND "YES")
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/chromaprint-1.4.2/package/build.sh 
new/chromaprint-v1.4.3/package/build.sh
--- old/chromaprint-1.4.2/package/build.sh      2016-12-28 21:10:42.000000000 
+0100
+++ new/chromaprint-v1.4.3/package/build.sh     2018-01-21 17:41:56.000000000 
+0100
@@ -70,8 +70,8 @@
 
 cmake "${CMAKE_ARGS[@]}" $BASE_DIR
 
-make
-make install
+make VERBOSE=1
+make install VERBOSE=1
 
 $STRIP $BASE_DIR/chromaprint-$OS-$ARCH/bin/fpcalc*
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/chromaprint-1.4.2/src/audio/ffmpeg_audio_reader.h 
new/chromaprint-v1.4.3/src/audio/ffmpeg_audio_reader.h
--- old/chromaprint-1.4.2/src/audio/ffmpeg_audio_reader.h       2016-12-28 
21:10:42.000000000 +0100
+++ new/chromaprint-v1.4.3/src/audio/ffmpeg_audio_reader.h      2018-01-21 
17:41:56.000000000 +0100
@@ -289,15 +289,15 @@
                        if (m_packet.stream_index != m_stream_index) {
                                m_packet.data = nullptr;
                                m_packet.size = 0;
+                       } else {
+                               m_nb_packets++;
                        }
                }
 
-               m_nb_packets++;
-
                ret = avcodec_decode_audio4(m_codec_ctx, m_frame, &m_got_frame, 
&m_packet);
                if (ret < 0) {
-                       if (m_decode_error || m_nb_packets > 1) {
-                               SetError("Error decoding audio frame", ret);
+                       if (m_decode_error) {
+                               SetError("Error decoding audio frame", 
m_decode_error);
                                return false;
                        }
                        m_decode_error = ret;
@@ -366,7 +366,6 @@
                }
        }
        m_error_code = errnum;
-       DEBUG(m_error);
 }
 
 }; // namespace chromaprint
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/chromaprint-1.4.2/src/chromaprint.h 
new/chromaprint-v1.4.3/src/chromaprint.h
--- old/chromaprint-1.4.2/src/chromaprint.h     2016-12-28 21:10:42.000000000 
+0100
+++ new/chromaprint-v1.4.3/src/chromaprint.h    2018-01-21 17:41:56.000000000 
+0100
@@ -84,13 +84,13 @@
 
 #define CHROMAPRINT_VERSION_MAJOR 1
 #define CHROMAPRINT_VERSION_MINOR 4
-#define CHROMAPRINT_VERSION_PATCH 2
+#define CHROMAPRINT_VERSION_PATCH 3
 
 enum ChromaprintAlgorithm {
        CHROMAPRINT_ALGORITHM_TEST1 = 0,
        CHROMAPRINT_ALGORITHM_TEST2,
        CHROMAPRINT_ALGORITHM_TEST3,
-       CHROMAPRINT_ALGORITHM_TEST4,
+       CHROMAPRINT_ALGORITHM_TEST4,                   // removes leading 
silence
        CHROMAPRINT_ALGORITHM_TEST5,
        CHROMAPRINT_ALGORITHM_DEFAULT = CHROMAPRINT_ALGORITHM_TEST2,
 };
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/chromaprint-1.4.2/src/cmd/fpcalc.cpp 
new/chromaprint-v1.4.3/src/cmd/fpcalc.cpp
--- old/chromaprint-1.4.2/src/cmd/fpcalc.cpp    2016-12-28 21:10:42.000000000 
+0100
+++ new/chromaprint-v1.4.3/src/cmd/fpcalc.cpp   2018-01-21 17:41:56.000000000 
+0100
@@ -28,6 +28,9 @@
 static bool g_overlap = false;
 static bool g_raw = false;
 static bool g_abs_ts = false;
+static bool g_ignore_errors = false;
+static ChromaprintAlgorithm g_algorithm = CHROMAPRINT_ALGORITHM_DEFAULT;
+
 
 const char *g_help =
        "Usage: %s [OPTIONS] FILE [FILE...]\n"
@@ -40,6 +43,7 @@
        "  -channels NUM  Set the number of channels in the input audio\n"
        "  -length SECS   Restrict the duration of the processed input audio 
(default 120)\n"
        "  -chunk SECS    Split the input audio into chunks of this duration\n"
+       "  -algorithm NUM Set the algorigthm method (default 2)\n"
        "  -overlap       Overlap the chunks slightly to make sure audio on the 
edges is fingerprinted\n"
        "  -ts            Output UNIX timestamps for chunked results, useful 
when fingerprinting real-time audio stream\n"
        "  -raw           Output fingerprints in the uncompressed format\n"
@@ -94,6 +98,15 @@
                                exit(2);
                        }
                        i++;
+        } else if ((!strcmp(argv[i], "-algorithm") || !strcmp(argv[i], "-a")) 
&& i + 1 < argc) {
+            auto value = atoi(argv[i + 1]);
+            if (value >= 1 && value <= 5) {
+                g_algorithm = (ChromaprintAlgorithm)(value - 1);
+            } else {
+                fprintf(stderr, "ERROR: The argument for %s must be 1 - 5\n", 
argv[i]);
+                exit(2);
+            }
+            i++;
                } else if (!strcmp(argv[i], "-text")) {
                        g_format = TEXT;
                } else if (!strcmp(argv[i], "-json")) {
@@ -106,6 +119,8 @@
                        g_abs_ts = true;
                } else if (!strcmp(argv[i], "-raw")) {
                        g_raw = true;
+               } else if (!strcmp(argv[i], "-ignore-errors")) {
+                       g_ignore_errors = true;
                } else if (!strcmp(argv[i], "-v") || !strcmp(argv[i], 
"-version")) {
                        fprintf(stdout, "fpcalc version %s\n", 
chromaprint_get_version());
                        exit(0);
@@ -213,6 +228,8 @@
                        printf("%s\n", fp);
                        break;
        }
+
+       fflush(stdout);
 }
 
 double GetCurrentTimestamp() {
@@ -255,13 +272,16 @@
        }
 
        bool first_chunk = true;
+       bool read_failed = false;
+       bool got_results = false;
 
        while (!reader.IsFinished()) {
                const int16_t *frame_data = nullptr;
                size_t frame_size = 0;
                if (!reader.Read(&frame_data, &frame_size)) {
                        fprintf(stderr, "ERROR: %s\n", 
reader.GetError().c_str());
-                       exit(2);
+                       read_failed = true;
+                       break;
                }
 
                bool stream_done = false;
@@ -307,6 +327,7 @@
 
                        const auto chunk_duration = (chunk_size - 
extra_chunk_limit) * 1.0 / reader.GetSampleRate() + overlap;
                        PrintResult(ctx, reader, first_chunk, ts, 
chunk_duration);
+                       got_results = true;
 
                        if (g_abs_ts) {
                                ts = GetCurrentTimestamp();
@@ -360,10 +381,17 @@
        if (chunk_size > 0) {
                const auto chunk_duration = (chunk_size - extra_chunk_limit) * 
1.0 / reader.GetSampleRate() + overlap;
                PrintResult(ctx, reader, first_chunk, ts, chunk_duration);
+               got_results = true;
        } else if (first_chunk) {
                fprintf(stderr, "ERROR: Not enough audio data\n");
                exit(2);
        }
+
+       if (!g_ignore_errors) {
+               if (read_failed) {
+                       exit(got_results ? 3 : 2);
+               }
+       }
 }
 
 int fpcalc_main(int argc, char **argv) {
@@ -389,7 +417,7 @@
                }
        }
 
-       ChromaprintContext *chromaprint_ctx = 
chromaprint_new(CHROMAPRINT_ALGORITHM_DEFAULT);
+       ChromaprintContext *chromaprint_ctx = chromaprint_new(g_algorithm);
        SCOPE_EXIT(chromaprint_free(chromaprint_ctx));
 
        reader.SetOutputChannels(chromaprint_get_num_channels(chromaprint_ctx));


Reply via email to