Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
9a8914c4 by Steve Lhomme at 2026-01-16T09:46:21+00:00
access: cdda: remove CDDB support

The CDDB databse from freedb.videolan.org doesn't reply anymore (due to
MusicBrainz ?). freedb.org is dead and gnudb.org is empty.

We still have MusicBrainz which is better.

The one reason it may still work for some is that they run their own server.
And the CDs they have are not found in MusicBrainz.

- - - - -
2842f532 by Steve Lhomme at 2026-01-16T09:46:21+00:00
contrib: cddb: remove cddb package

The CDDB databse from freedb.videolan.org doesn't reply anymore (due to
MusicBrainz ?). freedb.org is dead and gnudb.org is empty.

CDDB was a fallback in case the MusicBrainz query didn't find any match but
we're just waiting time doing a query that will never provide any good answer
anymore.

- - - - -
7011ef67 by Steve Lhomme at 2026-01-16T09:46:21+00:00
contrib: regex: remove package not built by default

It was only built because of cddb.

- - - - -


23 changed files:

- NEWS
- configure.ac
- − contrib/src/cddb/SHA512SUMS
- − contrib/src/cddb/cddb-gcc14-getsockoptfix.patch
- − contrib/src/cddb/cddb-no-alarm.patch
- − contrib/src/cddb/cross.patch
- − contrib/src/cddb/fix-header-guards.patch
- − contrib/src/cddb/getenv-crash.patch
- − contrib/src/cddb/no-gettext.patch
- − contrib/src/cddb/rules.mak
- − contrib/src/regex/SHA512SUMS
- − contrib/src/regex/decls.patch
- − contrib/src/regex/no-docs.patch
- − contrib/src/regex/rules.mak
- extras/package/apple/build.conf
- extras/package/os2/configure.sh
- extras/package/snap/snapcraft.yaml
- extras/package/win32/build.sh
- extras/package/win32/configure.sh
- meson_options.txt
- modules/access/Makefile.am
- modules/access/cdda.c
- modules/access/meson.build


Changes:

=====================================
NEWS
=====================================
@@ -70,7 +70,7 @@ Access:
  * Added support for the Gopher Protocol
  * Added avaudiocapture module as a replacement for qtsound, which is removed 
now
  * Audio CD data tracks are now correctly detected and skipped
- * Deprecates Audio CD CDDB lookups in favor of more accurate Musicbrainz
+ * Replace Audio CD CDDB lookups in favor of more accurate Musicbrainz
  * Improved CD-TEXT and added Shift-JIS encoding support
  * Support for YoutubeDL (where available).
  * On-the-fly Zstandard (zstd) file decompression (where available).


=====================================
configure.ac
=====================================
@@ -2330,10 +2330,6 @@ AC_ARG_ENABLE([vcd],
   AS_HELP_STRING([--disable-vcd],
     [disable built-in VCD and CD-DA support (default enabled)]))
 
-AC_ARG_ENABLE([libcddb],
-  AS_HELP_STRING([--disable-libcddb],
-    [disable CDDB for Audio CD (default enabled)]))
-
 if test "${enable_vcd}" != "no" -a "${enable_winstore_app}" != "yes"
 then
   AC_MSG_CHECKING(for cdrom_msf0 in linux/cdrom.h)
@@ -2366,17 +2362,6 @@ then
   then
     VLC_ADD_PLUGIN([vcd cdda])
   fi
-
-  if test "$enable_libcddb" != "no"; then
-    PKG_CHECK_MODULES(LIBCDDB, [libcddb >= 0.9.5], [
-      HAVE_LIBCDDB=yes
-      AC_DEFINE(HAVE_LIBCDDB, 1, [Define this if you have libcddb installed])
-      VLC_ADD_LIBS([cdda],[$LIBCDDB_LIBS])
-      VLC_ADD_CFLAGS([cdda],[$LIBCDDB_CFLAGS])
-      ],:
-      [AC_MSG_WARN([${LIBCDDB_PKG_ERRORS}: CDDB access disabled.])
-      HAVE_LIBCDDB=no])
-  fi
 fi
 
 dnl


=====================================
contrib/src/cddb/SHA512SUMS deleted
=====================================
@@ -1 +0,0 @@
-0e07e7d37f2013164d75b530a5528f54847271fd20f3b7bedb192a05d1f61dcf006d10dc2927efe155a01eddcc57b940bc31d8ac88d5dfc4f1a09771caa84e0a
  libcddb-1.3.2.tar.bz2


=====================================
contrib/src/cddb/cddb-gcc14-getsockoptfix.patch deleted
=====================================
@@ -1,55 +0,0 @@
-*size_t cannot be passed into getsockopt since gcc14
-
---- b/lib/cddb_net.c   2025-02-28 13:13:17.680209272 +0000
-+++ a/lib/cddb_net.c   2025-02-28 13:15:19.318977753 +0000
-@@ -265,10 +265,16 @@ int timeout_connect(int sockfd, const st
-     if (connect(sockfd, addr, len) == -1) {
-         /* check whether we can continue */
-         if (errno == EINPROGRESS) {
-+#ifdef _WIN32
-+            DWORD rv;
-+#define GETSOCKOPT_VAL_TYPE char
-+#else
-             int rv;
-+#define GETSOCKOPT_VAL_TYPE int
-+#endif
-             fd_set wfds;
-             struct timeval tv;
--            size_t l;
-+            socklen_t l;
- 
-             /* set up select time out */
-             tv.tv_sec = timeout;
-@@ -288,7 +294,7 @@ int timeout_connect(int sockfd, const st
-             default:
-                 /* we got connected, check error condition */
-                 l = sizeof(rv);
--                getsockopt(sockfd, SOL_SOCKET, SO_ERROR, &rv, &l);
-+                getsockopt(sockfd, SOL_SOCKET, SO_ERROR, 
(GETSOCKOPT_VAL_TYPE*)&rv, &l);
-                 if (rv) {
-                     /* something went wrong, simulate normal connect 
behaviour */
-                     errno = rv;
---- a/configure.ac.orig        2025-03-06 10:32:40.974509646 +0000
-+++ b/configure.ac     2025-03-09 10:13:07.446501285 +0000
-@@ -133,6 +133,21 @@
- fi
- AC_SUBST(with_iconv)
-
-+dnl Check for socklen_t type
-+AC_CHECK_TYPE([socklen_t],
-+  [],
-+  [AC_DEFINE([socklen_t], [int], [Define to `int' if <sys/socket.h> does not 
define it.])],
-+  [[
-+#if defined(_WIN32)
-+# include <winsock2.h>
-+# include <ws2tcpip.h>
-+#else
-+# include <sys/types.h>
-+# include <sys/socket.h>
-+#endif
-+  ]]
-+)
-+
- dnl Check and add some GCC specific warning flags
- dnl - we do this as the last thing so that a possible -Werror flag
- dnl - does not cause a failure in one of the other tests above


=====================================
contrib/src/cddb/cddb-no-alarm.patch deleted
=====================================
@@ -1,50 +0,0 @@
-diff -ru cddb.orig/lib/cddb_net.c cddb/lib/cddb_net.c
---- cddb.orig/lib/cddb_net.c   2011-11-05 18:21:42.000000000 +0200
-+++ cddb/lib/cddb_net.c        2011-11-05 18:22:11.000000000 +0200
-@@ -228,46 +228,9 @@
- 
- /* Time-out enabled work-alikes */
- 
--#ifdef HAVE_ALARM
--/* time-out jump buffer */
--static jmp_buf timeout_expired;
--
--/* time-out signal handler */
--static void alarm_handler(int signum)
--{
--    longjmp(timeout_expired, 1);
--}
--#endif
--
- struct hostent *timeout_gethostbyname(const char *hostname, int timeout)
- {
--#ifdef HAVE_ALARM
--    struct hostent *he = NULL;
--    struct sigaction action;
--    struct sigaction old;
--
--    /* no signal before setjmp */
--    alarm(0);
--
--    /* register signal handler */
--    memset(&action, 0, sizeof(action));
--    action.sa_handler = alarm_handler;
--    sigaction(SIGALRM, &action, &old);
--
--    /* save stack state */
--    if (!setjmp(timeout_expired)) {
--        alarm(timeout);         /* set time-out alarm */
--        he = gethostbyname(hostname); /* execute DNS query */
--        alarm(0);               /* reset alarm timer */
--    } else {
--        errno = ETIMEDOUT;
--    }
--    sigaction(SIGALRM, &old, NULL); /* restore previous signal handler */
--
--    return he;
--#else
-     return gethostbyname(hostname); /* execute DNS query directly */
--#endif
- }
- 
- int timeout_connect(int sockfd, const struct sockaddr *addr, 


=====================================
contrib/src/cddb/cross.patch deleted
=====================================
@@ -1,30 +0,0 @@
---- libcddb/Makefile.am.orig   2009-10-24 17:24:43.000000000 +0200
-+++ libcddb/Makefile.am        2009-10-24 17:26:58.000000000 +0200
-@@ -1,5 +1,5 @@
- 
--SUBDIRS       = include lib examples tests
-+SUBDIRS       = include lib 
- EXTRA_DIST = doc/doxygen.conf misc/$(PACKAGE).ebuild
- 
- dist-hook:
---- libcddb/configure.ac.orig  2009-10-25 01:51:35.000000000 +0200
-+++ libcddb/configure.ac       2009-10-25 01:51:44.000000000 +0200
-@@ -107,8 +107,6 @@
- AC_TYPE_SIZE_T
- 
- dnl Checks for library functions.
--AC_FUNC_MALLOC
--AC_FUNC_REALLOC
- AC_FUNC_STAT
- AC_FUNC_VPRINTF
- AC_FUNC_SELECT_ARGTYPES
---- libcddb/include/cddb/cddb_ni.h.orig        2009-10-25 21:58:20.000000000 
+0100
-+++ libcddb/include/cddb/cddb_ni.h     2009-10-25 21:58:46.000000000 +0100
-@@ -35,6 +35,7 @@
- #  include <iconv.h>
- #else
-    typedef void *iconv_t;       /* for code uniformity */
-+   #define ICONV_CONST const
- #endif
- 
- #ifdef HAVE_WINDOWS_H


=====================================
contrib/src/cddb/fix-header-guards.patch deleted
=====================================
@@ -1,22 +0,0 @@
---- cddb/include/cddb/cddb_log.h.orig  2005-03-11 16:29:29.000000000 -0500
-+++ cddb/include/cddb/cddb_log.h       2014-11-10 12:45:12.000000000 -0500
-@@ -19,7 +19,7 @@
-     Boston, MA  02111-1307, USA.
- */
- 
--#ifndef CDDB_LOH_H
-+#ifndef CDDB_LOG_H
- #define CDDB_LOG_H
- 
- #ifdef __cplusplus
---- cddb/include/cddb/cddb_log_ni.h.orig       2005-03-11 16:29:29.000000000 
-0500
-+++ cddb/include/cddb/cddb_log_ni.h    2014-11-10 12:45:32.000000000 -0500
-@@ -19,7 +19,7 @@
-     Boston, MA  02111-1307, USA.
- */
- 
--#ifndef CDDB_LOH_NI_H
-+#ifndef CDDB_LOG_NI_H
- #define CDDB_LOG_NI_H
- 
- #ifdef __cplusplus


=====================================
contrib/src/cddb/getenv-crash.patch deleted
=====================================
@@ -1,24 +0,0 @@
---- libcddb/lib/cddb_conn.c    2006-10-15 13:53:11.000000000 +0200
-+++ libcddb.new/lib/cddb_conn.c        2010-11-28 21:03:39.012749230 +0100
-@@ -100,9 +100,18 @@
-         c->use_cache = CACHE_ON;
-         /* construct cache dir '$HOME/[DEFAULT_CACHE]' */
-         s = getenv("HOME");
--        c->cache_dir = (char*)malloc(strlen(s) + 1 + sizeof(DEFAULT_CACHE) + 
1);
--        sprintf(c->cache_dir, "%s/%s", s, DEFAULT_CACHE);
--        c->cache_read = FALSE;
-+        if( s )
-+        {
-+            c->cache_dir = (char*)malloc(strlen(s) + 1 + 
sizeof(DEFAULT_CACHE) + 1);
-+            sprintf(c->cache_dir, "%s/%s", s, DEFAULT_CACHE);
-+            c->cache_read = FALSE;
-+        }
-+        else
-+        {
-+            c->cache_dir = NULL;
-+            c->use_cache = CACHE_OFF;
-+            c->cache_read = FALSE;
-+        }
- 
-         /* use anonymous@localhost */
-         c->user = strdup(DEFAULT_USER);


=====================================
contrib/src/cddb/no-gettext.patch deleted
=====================================
@@ -1,13 +0,0 @@
-diff -urN cddb.bak/configure.ac cddb/configure.ac
---- cddb.bak/configure.ac      2021-01-14 18:46:48.702409826 +0300
-+++ cddb/configure.ac  2021-01-14 18:47:04.354533931 +0300
-@@ -19,9 +19,6 @@
- LIBCDDB_VERSION_NUM=131
- AC_SUBST(LIBCDDB_VERSION_NUM)
- 
--dnl iconv uses gettext macros (dependency on config.rpath)
--AM_GNU_GETTEXT_VERSION(0.14.4)
--
- dnl Process custom command-line options
- AC_ARG_ENABLE([loglevel],
-               AC_HELP_STRING([--enable-loglevel=LVL],


=====================================
contrib/src/cddb/rules.mak deleted
=====================================
@@ -1,51 +0,0 @@
-# CDDB
-CDDB_VERSION := 1.3.2
-CDDB_URL := $(SF)/libcddb/libcddb-$(CDDB_VERSION).tar.bz2
-
-ifdef BUILD_NETWORK
-ifdef BUILD_DISCS
-PKGS += cddb
-endif
-endif
-ifeq ($(call need_pkg,"libcddb"),)
-PKGS_FOUND += cddb
-endif
-
-$(TARBALLS)/libcddb-$(CDDB_VERSION).tar.bz2:
-       $(call download_pkg,$(CDDB_URL),cddb)
-
-.sum-cddb: libcddb-$(CDDB_VERSION).tar.bz2
-
-cddb: libcddb-$(CDDB_VERSION).tar.bz2 .sum-cddb
-       $(UNPACK)
-       # $(call update_autoconfig,.)
-       $(APPLY) $(SRC)/cddb/cross.patch
-       $(APPLY) $(SRC)/cddb/getenv-crash.patch
-       $(APPLY) $(SRC)/cddb/cddb-no-alarm.patch
-       $(APPLY) $(SRC)/cddb/fix-header-guards.patch
-       $(APPLY) $(SRC)/cddb/no-gettext.patch
-       $(APPLY) $(SRC)/cddb/cddb-gcc14-getsockoptfix.patch
-       # Avoid relying on iconv.m4 from gettext, when reconfiguring.
-       # This is only used by the frontend which we disable.
-       sed -i.orig 's/^[[:blank:]]*AM_ICONV/#&/' $(UNPACK_DIR)/configure.ac
-       # add internal dependencies
-       sed -i.orig 's/-lcddb @LIBICONV@/-lcddb @LIBS@/' 
$(UNPACK_DIR)/libcddb.pc.in
-       $(MOVE)
-
-DEPS_cddb = regex $(DEPS_regex)
-
-CDDB_CONF := --without-iconv
-
-CDDB_CFLAGS := $(CFLAGS) -D_BSD_SOCKLEN_T_=int
-ifdef HAVE_WIN32
-CDDB_CFLAGS += -DWIN32_LEAN_AND_MEAN
-endif
-CDDB_CONF += CFLAGS="$(CDDB_CFLAGS)"
-
-.cddb: cddb
-       $(RECONF)
-       $(MAKEBUILDDIR)
-       $(MAKECONFIGURE) $(CDDB_CONF)
-       +$(MAKEBUILD)
-       +$(MAKEBUILD) install
-       touch $@


=====================================
contrib/src/regex/SHA512SUMS deleted
=====================================
@@ -1 +0,0 @@
-8a6d873c115357126db2df47886550b77d2b0f56f56f4261140a1823ba492ef86b64880ccb317a2e2a9058b6c046a06c3c6e700f6da16fc0ba60b4f568379723
  regex-0.13.tar.gz


=====================================
contrib/src/regex/decls.patch deleted
=====================================
@@ -1,11 +0,0 @@
---- regex/regex.c.orig 2022-04-21 17:46:06.786845467 +0300
-+++ regex/regex.c      2022-04-21 16:46:41.670051683 +0300
-@@ -127,6 +127,8 @@
- #  else
- char *malloc ();
- char *realloc ();
-+void abort ();
-+void free ();
- #  endif
- 
- /* When used in Emacs's lib-src, we need to get bzero and bcopy somehow.


=====================================
contrib/src/regex/no-docs.patch deleted
=====================================
@@ -1,11 +0,0 @@
---- regex/Makefile.in.orig     2013-08-28 05:27:27.729372586 +0200
-+++ regex/Makefile.in  2013-08-28 05:27:37.377372917 +0200
-@@ -43,7 +43,7 @@
- 
- SHELL = /bin/sh
- 
--subdirs = doc test
-+subdirs =
- 
- default all:: regex.o
- .PHONY: default all


=====================================
contrib/src/regex/rules.mak deleted
=====================================
@@ -1,28 +0,0 @@
-# REGEX
-REGEX_VERSION := 0.13
-REGEX_URL := $(CONTRIB_VIDEOLAN)/regex/regex-$(REGEX_VERSION).tar.gz
-
-ifndef HAVE_WIN32
-# Part of POSIX.2001
-PKGS_FOUND += regex
-endif
-
-$(TARBALLS)/regex-$(REGEX_VERSION).tar.gz:
-       $(call download,$(REGEX_URL))
-
-.sum-regex: regex-$(REGEX_VERSION).tar.gz
-
-regex: regex-$(REGEX_VERSION).tar.gz .sum-regex
-       $(UNPACK)
-       $(APPLY) $(SRC)/regex/no-docs.patch
-       $(APPLY) $(SRC)/regex/decls.patch
-       $(MOVE)
-
-.regex: regex
-       $(MAKEBUILDDIR)
-       $(MAKECONFIGURE)
-       +$(MAKEBUILD) subirs=
-       cd $(BUILD_DIR) && $(AR) rcvu libregex.a regex.o && $(RANLIB) libregex.a
-       mkdir -p $(PREFIX)/include/ && cp $</regex.h $(PREFIX)/include
-       mkdir -p $(PREFIX)/lib/ && cp $(BUILD_DIR)/libregex.a $(PREFIX)/lib
-       touch $@


=====================================
extras/package/apple/build.conf
=====================================
@@ -82,7 +82,6 @@ export VLC_CONTRIB_OPTIONS_BASE=(
 export VLC_CONTRIB_OPTIONS_MACOSX=(
     --disable-twolame
     --disable-microdns
-    --disable-cddb
 )
 
 # Additional contrib bootstrap options for iOS
@@ -134,7 +133,6 @@ export VLC_CONTRIB_OPTIONS_WATCHOS=(
 export VLC_CONFIG_OPTIONS_BASE=(
     --disable-sse
     --disable-vcd
-    --disable-libcddb
     --disable-macosx
     --disable-macosx-avfoundation
     --disable-lua


=====================================
extras/package/os2/configure.sh
=====================================
@@ -9,7 +9,6 @@ OPTIONS="
       --enable-dvdnav
       --enable-sftp
       --enable-vcd
-      --enable-libcddb
       --enable-dvbpsi
       --enable-ogg
       --enable-mad


=====================================
extras/package/snap/snapcraft.yaml
=====================================
@@ -158,7 +158,6 @@ parts:
       - libavutil-dev
       - libbluray-dev
       - libcaca-dev
-      - libcddb2-dev
       - libchromaprint-dev
       - libdav1d-dev
       - libdca-dev
@@ -280,7 +279,6 @@ parts:
       - libavutil58
       - libbluray2
       - libcaca0
-      - libcddb2
       - libchromaprint1
       - libdav1d7
       - libdb5.3


=====================================
extras/package/win32/build.sh
=====================================
@@ -470,7 +470,7 @@ cd ../..
 MCONFIGFLAGS="-Dlua=enabled -Dflac=enabled -Dtheoradec=enabled 
-Dtheoraenc=enabled \
     -Davcodec=enabled -Dmerge-ffmpeg=true \
     -Dlibass=enabled -Dschroedinger=enabled -Dshout=enabled -Dgoom2=enabled \
-    -Dsse=enabled -Dlibcddb=enabled -Dzvbi=enabled -Dtelx=disabled 
$MCONFIGFLAGS"
+    -Dsse=enabled -Dzvbi=enabled -Dtelx=disabled $MCONFIGFLAGS"
 
 MCONFIGFLAGS="$MCONFIGFLAGS --prefer-static"
 if [ "$RELEASE" != "yes" ]; then


=====================================
extras/package/win32/configure.sh
=====================================
@@ -10,7 +10,6 @@ OPTIONS="
       --enable-shout
       --enable-goom
       --enable-sse
-      --enable-libcddb
       --enable-zvbi --disable-telx"
 
 sh "$(dirname $0)"/../../../configure ${OPTIONS}  "$@"


=====================================
meson_options.txt
=====================================
@@ -474,11 +474,6 @@ option('taglib',
     value : 'auto',
     description : 'Enable/disable taglib support')
 
-option('libcddb',
-    type : 'feature',
-    value : 'auto',
-    description : 'Enable/disable libcddb support')
-
 option('libass',
     type : 'feature',
     value : 'auto',


=====================================
modules/access/Makefile.am
=====================================
@@ -246,8 +246,8 @@ libcdda_plugin_la_SOURCES = access/cdda.c 
access/disc_helper.h access/vcd/cdrom.
                             access/vcd/cdrom_internals.h \
                             misc/webservices/json_helper.h 
misc/webservices/musicbrainz.c \
                             misc/webservices/musicbrainz.h
-libcdda_plugin_la_CFLAGS = $(AM_CFLAGS) $(LIBCDDB_CFLAGS)
-libcdda_plugin_la_LIBADD = libvlc_json.la $(LIBCDDB_LIBS) $(LIBM)
+libcdda_plugin_la_CFLAGS = $(AM_CFLAGS)
+libcdda_plugin_la_LIBADD = libvlc_json.la $(LIBM)
 libcdda_plugin_la_LDFLAGS = $(AM_LDFLAGS) -rpath '$(accessdir)'
 if HAVE_DARWIN
 libcdda_plugin_la_LIBADD += -liconv


=====================================
modules/access/cdda.c
=====================================
@@ -23,7 +23,6 @@
 
 /**
  * Todo:
- *   - Improve CDDB support (non-blocking, ...)
  *   - Fix tracknumber in MRL
  */
 
@@ -62,11 +61,6 @@
 #include "../misc/webservices/musicbrainz.h"
 
 
-#ifdef HAVE_LIBCDDB
- #include <cddb/cddb.h>
- #include <errno.h>
-#endif
-
 #define INVALID_SECTOR ((unsigned) -1)
 
 static vcddev_t *DiscOpen(vlc_object_t *obj, const char *location,
@@ -379,9 +373,6 @@ typedef struct
     int          i_cdda_last;                       /* Last .. */
     int          cdtextc;
     vlc_meta_t **cdtextv;
-#ifdef HAVE_LIBCDDB
-    cddb_disc_t *cddb;
-#endif
     musicbrainz_recording_t *mbrecord;
 } access_sys_t;
 
@@ -519,112 +510,6 @@ static musicbrainz_recording_t * GetMusicbrainzInfo( 
vlc_object_t *obj,
     return recording;
 }
 
-#ifdef HAVE_LIBCDDB
-static cddb_disc_t *GetCDDBInfo( vlc_object_t *obj, const vcddev_toc_t *p_toc )
-{
-    msg_Dbg( obj, "retrieving metadata with CDDB" );
-
-    /* */
-    cddb_conn_t *p_cddb = cddb_new();
-    if( !p_cddb )
-    {
-        msg_Warn( obj, "unable to use CDDB" );
-        return NULL;
-    }
-
-    /* */
-
-    cddb_http_enable( p_cddb );
-
-    char *psz_tmp = var_InheritString( obj, "cddb-server" );
-    if( psz_tmp )
-    {
-        cddb_set_server_name( p_cddb, psz_tmp );
-        free( psz_tmp );
-    }
-
-    cddb_set_server_port( p_cddb, var_InheritInteger( obj, "cddb-port" ) );
-
-    cddb_set_email_address( p_cddb, "[email protected]" );
-
-    cddb_set_http_path_query( p_cddb, "/~cddb/cddb.cgi" );
-    cddb_set_http_path_submit( p_cddb, "/~cddb/submit.cgi" );
-
-
-    char *psz_cachedir;
-    char *psz_temp = config_GetUserDir( VLC_CACHE_DIR );
-    if (likely(psz_temp != NULL))
-    {
-        if( asprintf( &psz_cachedir, "%s" DIR_SEP "cddb", psz_temp ) > 0 ) {
-            cddb_cache_enable( p_cddb );
-            cddb_cache_set_dir( p_cddb, psz_cachedir );
-            free( psz_cachedir );
-        }
-        free( psz_temp );
-    }
-
-    cddb_set_timeout( p_cddb, 10 );
-
-    /* */
-    cddb_disc_t *p_disc = cddb_disc_new();
-    if( !p_disc )
-    {
-        msg_Err( obj, "unable to create CDDB disc structure." );
-        goto error;
-    }
-
-    for( int i = 0; i < p_toc->i_tracks; i++ )
-    {
-        int cddb_offset = LBAPregap(p_toc->p_sectors[i].i_lba); // 2s Pregap 
offset
-        cddb_track_t *t = cddb_track_new();
-        cddb_track_set_frame_offset( t, cddb_offset );
-
-        cddb_disc_add_track( p_disc, t );
-
-        msg_Dbg( obj, "Track %i offset: %i", i, cddb_offset );
-    }
-    const int64_t i_size = p_toc->p_sectors[p_toc->i_tracks].i_lba - 
p_toc->p_sectors[0].i_lba;
-    int i_length = (int)(i_size * CDDA_DATA_SIZE / 4 / 44100) + 2 ; // 2s 
Pregap
-
-    msg_Dbg( obj, "Total length: %i", i_length );
-    cddb_disc_set_length( p_disc, i_length );
-
-    if( !cddb_disc_calc_discid( p_disc ) )
-    {
-        msg_Err( obj, "CDDB disc ID calculation failed" );
-        goto error;
-    }
-
-    const int i_matches = cddb_query( p_cddb, p_disc );
-    if( i_matches < 0 )
-    {
-        msg_Warn( obj, "CDDB error: %s", cddb_error_str(errno) );
-        goto error;
-    }
-    else if( i_matches == 0 )
-    {
-        msg_Dbg( obj, "Couldn't find any matches in CDDB." );
-        goto error;
-    }
-    else if( i_matches > 1 )
-        msg_Warn( obj, "found %d matches in CDDB. Using first one.", i_matches 
);
-
-    cddb_read( p_cddb, p_disc );
-
-    msg_Dbg( obj, "disc ID: 0x%08x", cddb_disc_get_discid(p_disc) );
-
-    cddb_destroy( p_cddb);
-    return p_disc;
-
-error:
-    if( p_disc )
-        cddb_disc_destroy( p_disc );
-    cddb_destroy( p_cddb );
-    msg_Dbg( obj, "CDDB failure" );
-    return NULL;
-}
-#endif /* HAVE_LIBCDDB */
-
 static void AccessGetMeta(stream_t *access, vlc_meta_t *meta)
 {
     access_sys_t *sys = access->p_sys;
@@ -639,52 +524,6 @@ static void AccessGetMeta(stream_t *access, vlc_meta_t 
*meta)
 #define NONEMPTY( psz ) ( (psz) && *(psz) )
 /* If the given string is NULL or empty, fill it by the return value of 'code' 
*/
 #define ON_EMPTY( psz, code ) do { if( !NONEMPTY( psz) ) { (psz) = code; } } 
while(0)
-
-    /* Retrieve CDDB information (preferred over CD-TEXT) */
-#ifdef HAVE_LIBCDDB
-    if (sys->cddb != NULL)
-    {
-        const char *str = cddb_disc_get_title(sys->cddb);
-        if (NONEMPTY(str))
-            vlc_meta_SetTitle(meta, str);
-
-        str = cddb_disc_get_genre(sys->cddb);
-        if (NONEMPTY(str))
-            vlc_meta_SetGenre(meta, str);
-
-        const unsigned year = cddb_disc_get_year(sys->cddb);
-        if (year != 0)
-        {
-            char yearbuf[5];
-
-            int ret = snprintf(yearbuf, sizeof (yearbuf), "%u", year);
-            if (ret >= 0 && (size_t) ret < sizeof (yearbuf))
-                vlc_meta_SetDate(meta, yearbuf);
-        }
-
-        /* Set artist only if identical across tracks */
-        str = cddb_disc_get_artist(sys->cddb);
-        if (NONEMPTY(str))
-        {
-            for (int i = 0; i < sys->p_toc->i_tracks; i++)
-            {
-                cddb_track_t *t = cddb_disc_get_track(sys->cddb, i);
-                if (t == NULL)
-                    continue;
-
-                const char *track_artist = cddb_track_get_artist(t);
-                if (NONEMPTY(track_artist))
-                {
-                    if (strcmp(str, track_artist))
-                    {
-                        str = NULL;
-                        break;
-                    }
-                }
-            }
-        }
-    }
-#endif
 }
 
 static int ReadDir(stream_t *access, input_item_node_t *node)
@@ -754,23 +593,6 @@ static int ReadDir(stream_t *access, input_item_node_t 
*node)
         const char *isrc = NULL;
         int year = 0;
 
-#ifdef HAVE_LIBCDDB
-        if (sys->cddb != NULL)
-        {
-            cddb_track_t *t = cddb_disc_get_track(sys->cddb, i);
-            if (t != NULL)
-            {
-                title = cddb_track_get_title(t);
-                artist = cddb_track_get_artist(t);
-            }
-
-            ON_EMPTY(artist, cddb_disc_get_artist(sys->cddb));
-            album = cddb_disc_get_title(sys->cddb);
-            genre = cddb_disc_get_genre(sys->cddb);
-            year = cddb_disc_get_year(sys->cddb);
-        }
-#endif
-
         /* Per track CDText */
         if(sys->cdtextc > 0)
         {
@@ -924,18 +746,11 @@ static int AccessOpen(vlc_object_t *obj, vcddev_t *dev)
     }
 
     sys->mbrecord = NULL;
-#ifdef HAVE_LIBCDDB
-    sys->cddb = NULL;
-#endif
 
     if(var_InheritBool(obj, "metadata-network-access"))
     {
         sys->mbrecord = GetMusicbrainzInfo(obj, sys->p_toc, sys->i_cdda_tracks,
                                            sys->i_cdda_first, sys->i_cdda_last 
);
-#ifdef HAVE_LIBCDDB
-        if(!sys->mbrecord)
-            sys->cddb = GetCDDBInfo(obj, sys->p_toc);
-#endif
     }
     else msg_Dbg(obj, "album art policy set to manual: not fetching");
 
@@ -962,10 +777,6 @@ static void AccessClose(access_sys_t *sys)
     }
     free(sys->cdtextv);
 
-#ifdef HAVE_LIBCDDB
-    if (sys->cddb != NULL)
-        cddb_disc_destroy(sys->cddb);
-#endif
     if(sys->mbrecord)
         musicbrainz_recording_release(sys->mbrecord);
     vcddev_toc_Free(sys->p_toc);
@@ -1043,13 +854,6 @@ vlc_module_begin ()
     add_string( "musicbrainz-server", MUSICBRAINZ_DEFAULT_SERVER,
                 N_( "Musicbrainz Server" ),
                 N_( "Address of the musicbrainz server to use." ) )
-#ifdef HAVE_LIBCDDB
-    add_string( "cddb-server", "freedb.videolan.org", N_( "CDDB Server" ),
-            N_( "Address of the CDDB server to use." ) )
-    add_integer( "cddb-port", 80, N_( "CDDB port" ),
-            N_( "CDDB Server port to use." ) )
-        change_integer_range( 1, 65535 )
-#endif
 
     add_shortcut( "cdda", "cddasimple" )
 vlc_module_end ()


=====================================
modules/access/meson.build
=====================================
@@ -259,11 +259,6 @@ endif
 if get_option('vcd_module')
     vcd_cdda_flags = []
 
-    libcddb_dep = dependency('libcddb', version: '>= 0.9.5', required: 
get_option('libcddb'))
-    if libcddb_dep.found()
-        vcd_cdda_flags += '-DHAVE_LIBCDDB'
-    endif
-
     if cc.has_header_symbol('linux/cdrom.h', 'struct cdrom_msf0')
         needed_vcd_unix_headers_present = true
     elif cc.has_header_symbol('sys/scsiio.h', 'struct scsireq')
@@ -293,7 +288,7 @@ if get_option('vcd_module')
             ),
             'c_args' : vcd_cdda_flags,
             'link_with' : vlc_json_lib,
-            'dependencies' : [libcddb_dep, vcd_cdda_darwin_deps, gcrypt_dep]
+            'dependencies' : [vcd_cdda_darwin_deps, gcrypt_dep]
         }
 
         vlc_modules += {
@@ -303,7 +298,7 @@ if get_option('vcd_module')
                 'vcd/cdrom.c',
             ),
             'c_args' : vcd_cdda_flags,
-            'dependencies' : [libcddb_dep, vcd_cdda_darwin_deps]
+            'dependencies' : [vcd_cdda_darwin_deps]
         }
 
     endif



View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/compare/07a2ad663da8631e904f22b0deee29de96a38bca...7011ef67d690537ca90797311c800d4b0ff76075

-- 
View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/compare/07a2ad663da8631e904f22b0deee29de96a38bca...7011ef67d690537ca90797311c800d4b0ff76075
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance
_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to