[tracker-miners/sam/remove-flac-vorbis-extractors: 186/186] extract: Remove flac and vorbis extractors



commit 9db7b0855b7df75c088a1ad6ed6d64b98fd11e27
Author: Sam Thursfield <sam afuera me uk>
Date:   Tue Feb 25 14:05:11 2020 +0100

    extract: Remove flac and vorbis extractors
    
    The GStreamer and libav extractors handle these types well, and these
    alternative codepaths were actually unused in most cases.
    
    Closes https://gitlab.gnome.org/GNOME/tracker-miners/issues/50

 meson.build                                        |   4 -
 meson_options.txt                                  |   4 -
 src/tracker-extract/10-flac.rule                   |   5 -
 src/tracker-extract/10-vorbis.rule                 |   5 -
 src/tracker-extract/meson.build                    |   8 -
 src/tracker-extract/tracker-extract-flac.c         | 321 ---------------
 src/tracker-extract/tracker-extract-vorbis.c       | 432 ---------------------
 tests/functional-tests/meson.build                 |   6 +-
 .../audio/vorbis.expected.json                     |  30 +-
 9 files changed, 3 insertions(+), 812 deletions(-)
---
diff --git a/meson.build b/meson.build
index 89e1e24bb..6a3f9630e 100644
--- a/meson.build
+++ b/meson.build
@@ -55,7 +55,6 @@ avformat = dependency('libavformat', version: '>= 0.8.4', required: false)
 avutil = dependency('libavutil', version: '>= 0.8.4', required: false)
 dbus = dependency('dbus-1', version: '>= 1.3.1')
 exempi = dependency('exempi-2.0', version: '>= 2.1.0', required: get_option('xmp'))
-flac = dependency('flac', version: '>= 1.2.1', required: get_option('flac'))
 gexiv2 = dependency('gexiv2', required: get_option('raw'))
 gio = dependency('gio-2.0', version: '>=' + glib_required)
 gio_unix = dependency('gio-unix-2.0', version: '>=' + glib_required)
@@ -81,7 +80,6 @@ libpng = dependency('libpng', version: '>= 0.89', required: get_option('png'))
 libseccomp = dependency('libseccomp', version: '>= 2.0', required: false)
 libtiff = dependency('libtiff-4', required: get_option('tiff'))
 libxml2 = dependency('libxml-2.0', version: '>= 2.6', required: get_option('xml'))
-libvorbis = dependency('vorbisfile', version: '>= 0.22', required: get_option('vorbis'))
 poppler = dependency('poppler-glib', version: '>= 0.16.0', required: get_option('pdf'))
 totem_plparser = dependency('totem-plparser', required: get_option('playlist'))
 upower = dependency('upower-glib', version: '>= 0.9.0', required: false)
@@ -474,8 +472,6 @@ if have_tracker_extract
     '    Support RAW:                            ' + gexiv2.found().to_string(),
     '    Support TIFF:                           @0@ (xmp: @1@, exif: @2@, iptc: @3@)'.format(
         libtiff.found().to_string(), exempi.found().to_string(), libexif.found().to_string(), 
libiptcdata.found().to_string()),
-    '    Support Vorbis (ogg/etc):               ' + libvorbis.found().to_string(),
-    '    Support Flac:                           ' + flac.found().to_string(),
     '    Support MS & Open Office:               ' + libgsf.found().to_string(),
     '    Support XML / HTML:                     ' + libxml2.found().to_string(),
     '    Support embedded / sidecar XMP:         ' + exempi.found().to_string(),
diff --git a/meson_options.txt b/meson_options.txt
index 19959dc95..8572a4189 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -39,8 +39,6 @@ option('cue', type: 'feature', value: 'auto',
        description: 'Support cue sheet parsing')
 option('exif', type: 'feature', value: 'auto',
        description: 'Support EXIF metadata')
-option('flac', type: 'feature', value: 'auto',
-       description: 'Support extracting metadata from Flac audio')
 option('gif', type: 'feature', value: 'auto',
        description: 'Support extracting metadata from GIF images')
 option('gsf', type: 'feature', value: 'auto',
@@ -61,8 +59,6 @@ option('raw', type: 'feature', value: 'auto',
        description: 'Support extracting metadata from RAW photos')
 option('tiff', type: 'feature', value: 'auto',
        description: 'Support extracting metadata from TIFF images')
-option('vorbis', type: 'feature', value: 'auto',
-       description: 'Support extracting metadata from Vorbis (ogg/etc) files')
 option('xml', type: 'feature', value: 'auto',
        description: 'Support extracting metadata from XML and HTML documents')
 option('xmp', type: 'feature', value: 'auto',
diff --git a/src/tracker-extract/meson.build b/src/tracker-extract/meson.build
index f2e03e8b7..b661654b0 100644
--- a/src/tracker-extract/meson.build
+++ b/src/tracker-extract/meson.build
@@ -25,10 +25,6 @@ if libgsf.found()
   modules += [['extract-oasis', 'tracker-extract-oasis.c', ['10-oasis.rule'], [libgsf, 
tracker_miners_common_dep]]]
 endif
 
-if flac.found()
-  modules += [['extract-flac', 'tracker-extract-flac.c', ['10-flac.rule'], [flac, 
tracker_miners_common_dep]]]
-endif
-
 if gexiv2.found()
   modules += [['extract-raw', 'tracker-extract-raw.c', ['10-raw.rule'], [gexiv2, tracker_miners_common_dep]]]
 endif
@@ -101,10 +97,6 @@ if libtiff.found()
   modules += [['extract-tiff', 'tracker-extract-tiff.c', ['10-tiff.rule'], [libtiff, 
tracker_miners_common_dep]]]
 endif
 
-if libvorbis.found()
-  modules += [['extract-vorbis', 'tracker-extract-vorbis.c', ['10-vorbis.rule'], [libvorbis, 
tracker_miners_common_dep]]]
-endif
-
 if libgxps.found()
   modules += [['extract-xps', 'tracker-extract-xps.c', ['10-xps.rule'], [libgxps, 
tracker_miners_common_dep]]]
 endif
diff --git a/tests/functional-tests/meson.build b/tests/functional-tests/meson.build
index 8a996432c..d5556d87c 100644
--- a/tests/functional-tests/meson.build
+++ b/tests/functional-tests/meson.build
@@ -42,11 +42,9 @@ extractor_tests = [
 # MusicBrainz tags
 if gstreamer.found() and gstreamer.version() >= '1.18.0'
   extractor_tests += 'audio/flac-musicbrainz'
+  extractor_tests += 'audio/vorbis-musicbrainz'
 else
   extractor_tests += 'audio/flac'
-endif
-
-if libvorbis.found()
   extractor_tests += 'audio/vorbis'
 endif
 
@@ -130,7 +128,7 @@ if libjpeg.found() and libgif.found() and libpng.found() and libtiff.found() and
   ]
 endif
 
-if libvorbis.found() and flac.found() and generic_media_handler_name != 'none'
+if generic_media_handler_name != 'none'
   functional_tests += 'writeback-audio'
 endif
 
diff --git a/tests/functional-tests/test-extraction-data/audio/vorbis.expected.json 
b/tests/functional-tests/test-extraction-data/audio/vorbis.expected.json
index 55ec43979..8756c850e 100644
--- a/tests/functional-tests/test-extraction-data/audio/vorbis.expected.json
+++ b/tests/functional-tests/test-extraction-data/audio/vorbis.expected.json
@@ -24,36 +24,8 @@
         },
         "nmm:musicAlbum": {
             "@type": "nmm:MusicAlbum",
-            "nie:title": "SinCos",
-            "tracker:hasExternalReference": [
-                {
-                    "@id": "https://musicbrainz.org/release/345612";,
-                    "@type": "tracker:ExternalReference",
-                    "tracker:referenceSource": "https://musicbrainz.org/doc/Release";,
-                    "tracker:referenceIdentifier": "345612"
-                },
-                {
-                    "@id": "https://musicbrainz.org/release-group/561234";,
-                    "@type": "tracker:ExternalReference",
-                    "tracker:referenceSource": "https://musicbrainz.org/doc/Release_Group";,
-                    "tracker:referenceIdentifier": "561234"
-                }
-            ]
+            "nie:title": "SinCos"
         },
-        "tracker:hasExternalReference": [
-            {
-                "@id": "https://musicbrainz.org/recording/456123";,
-                "@type": "tracker:ExternalReference",
-                "tracker:referenceSource": "https://musicbrainz.org/doc/Recording";,
-                "tracker:referenceIdentifier": "456123"
-            },
-            {
-                "@id": "https://musicbrainz.org/track/123456";,
-                "@type": "tracker:ExternalReference",
-                "tracker:referenceSource": "https://musicbrainz.org/doc/Track";,
-                "tracker:referenceIdentifier": "123456"
-            }
-        ],
         "nie:isStoredAs": [
             {
                 "nfo:hasHash": {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]