diff options
author | Dudemanguy <random342@airmail.cc> | 2023-10-18 11:16:51 -0500 |
---|---|---|
committer | Dudemanguy <random342@airmail.cc> | 2023-10-19 12:10:53 -0500 |
commit | d5e5c2ce9821db344c6744a33cec5068fe4bbeb3 (patch) | |
tree | 1f2d5b53ba3d36b45ae8ca08c270f0021805fca5 /stream/stream_cdda.c | |
parent | bd1ba99ab2f64f218128100cbf3a91e5cb1b4872 (diff) | |
download | mpv-d5e5c2ce9821db344c6744a33cec5068fe4bbeb3.tar.bz2 mpv-d5e5c2ce9821db344c6744a33cec5068fe4bbeb3.tar.xz |
stream_cdda: remove fallback for ancient libcdio versions
CDIO_API_VERSION 6 has been around since libcdio 0.90. That was release
over a decade ago. There's literally no reason to keep the ugly mess of
the old api around so remove it.
Diffstat (limited to 'stream/stream_cdda.c')
-rw-r--r-- | stream/stream_cdda.c | 42 |
1 files changed, 6 insertions, 36 deletions
diff --git a/stream/stream_cdda.c b/stream/stream_cdda.c index 2ee1af3ddb..f73c84a0da 100644 --- a/stream/stream_cdda.c +++ b/stream/stream_cdda.c @@ -17,29 +17,21 @@ * with mpv. If not, see <http://www.gnu.org/licenses/>. */ -#include "config.h" +#include <stdbool.h> +#include <stdio.h> +#include <stdlib.h> #include <cdio/cdio.h> -#if CDIO_API_VERSION < 6 -#define OLD_API -#endif - +// For cdio_cddap_version #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wstrict-prototypes" -#ifdef OLD_API -#include <cdio/cdda.h> -#include <cdio/paranoia.h> -#else #include <cdio/paranoia/cdda.h> #include <cdio/paranoia/paranoia.h> -#endif #pragma GCC diagnostic pop -#include <stdio.h> -#include <stdlib.h> -#include <stdbool.h> - +#include "common/msg.h" +#include "config.h" #include "mpv_talloc.h" #include "stream.h" @@ -47,9 +39,6 @@ #include "options/m_config.h" #include "options/options.h" -#include "common/msg.h" - -#include "config.h" #if !HAVE_GPL #error GPL only #endif @@ -101,16 +90,6 @@ const struct m_sub_options stream_cdda_conf = { }; static const char *const cdtext_name[] = { -#ifdef OLD_API - [CDTEXT_ARRANGER] = "Arranger", - [CDTEXT_COMPOSER] = "Composer", - [CDTEXT_MESSAGE] = "Message", - [CDTEXT_ISRC] = "ISRC", - [CDTEXT_PERFORMER] = "Performer", - [CDTEXT_SONGWRITER] = "Songwriter", - [CDTEXT_TITLE] = "Title", - [CDTEXT_UPC_EAN] = "UPC_EAN", -#else [CDTEXT_FIELD_ARRANGER] = "Arranger", [CDTEXT_FIELD_COMPOSER] = "Composer", [CDTEXT_FIELD_MESSAGE] = "Message", @@ -119,7 +98,6 @@ static const char *const cdtext_name[] = { [CDTEXT_FIELD_SONGWRITER] = "Songwriter", [CDTEXT_FIELD_TITLE] = "Title", [CDTEXT_FIELD_UPC_EAN] = "UPC_EAN", -#endif }; static void print_cdtext(stream_t *s, int track) @@ -127,20 +105,12 @@ static void print_cdtext(stream_t *s, int track) cdda_priv* p = (cdda_priv*)s->priv; if (!p->cdtext) return; -#ifdef OLD_API - cdtext_t *text = cdio_get_cdtext(p->cd->p_cdio, track); -#else cdtext_t *text = cdio_get_cdtext(p->cd->p_cdio); -#endif int header = 0; if (text) { for (int i = 0; i < sizeof(cdtext_name) / sizeof(cdtext_name[0]); i++) { const char *name = cdtext_name[i]; -#ifdef OLD_API - const char *value = cdtext_get_const(i, text); -#else const char *value = cdtext_get_const(text, i, track); -#endif if (name && value) { if (!header) MP_INFO(s, "CD-Text (%s):\n", track ? "track" : "CD"); |