From cbb9fd45db204f1842f9e59ff957c374815a29f9 Mon Sep 17 00:00:00 2001 From: Steve Lhomme Date: Mon, 18 Dec 2023 18:33:30 +0100 Subject: [PATCH] drop libebml2 support It was probably broken and never used. --- CMakeLists.txt | 1 - matroska/FileKax.h | 11 ----- matroska/KaxDefines.h | 91 ------------------------------------------ matroska/KaxSemantic.h | 4 -- src/FileKax.cpp | 14 ------- src/KaxInfoData.cpp | 23 ----------- 6 files changed, 144 deletions(-) delete mode 100644 src/KaxInfoData.cpp diff --git a/CMakeLists.txt b/CMakeLists.txt index 0c96ceaf..9c3464df 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -24,7 +24,6 @@ set(libmatroska_SOURCES src/KaxContexts.cpp src/KaxCues.cpp src/KaxCuesData.cpp - src/KaxInfoData.cpp src/KaxSeekHead.cpp src/KaxSegment.cpp src/KaxSemantic.cpp diff --git a/matroska/FileKax.h b/matroska/FileKax.h index fb12a9f8..99209300 100644 --- a/matroska/FileKax.h +++ b/matroska/FileKax.h @@ -41,15 +41,4 @@ class MATROSKA_DLL_API FileMatroska { } // namespace libmatroska -#ifdef __cplusplus -extern "C" { -#endif - -MATROSKA_DLL_API void matroska_init(); -MATROSKA_DLL_API void matroska_done(); - -#ifdef __cplusplus -} -#endif - #endif // FILE_KAX_HPP diff --git a/matroska/KaxDefines.h b/matroska/KaxDefines.h index 08056bae..8209ad27 100644 --- a/matroska/KaxDefines.h +++ b/matroska/KaxDefines.h @@ -11,96 +11,6 @@ #include #include -#if defined(HAVE_EBML2) || defined(HAS_EBML2) -#define DEFINE_MKX_CONTEXT(a) DEFINE_xxx_CONTEXT(a,EBML_SemanticGlobal) -#define DEFINE_MKX_MASTER_CONS(a,b,c,d,e) DEFINE_xxx_MASTER_CONS(a,b,d,e,EBML_SemanticGlobal) -#define DEFINE_MKX_MASTER(a,b,c,d,e) DEFINE_xxx_MASTER(a,b,d,e,EBML_SemanticGlobal) -#define DEFINE_MKX_MASTER_ORPHAN(a,b,c,d) DEFINE_xxx_MASTER_ORPHAN(a,b,d,EBML_SemanticGlobal) -#define DEFINE_MKX_UINTEGER_DEF(a,b,c,d,e,v) DEFINE_xxx_UINTEGER_DEF(a,b,d,e,EBML_SemanticGlobal,v) -#define DEFINE_MKX_SINTEGER_DEF(a,b,c,d,e,v) DEFINE_xxx_SINTEGER_DEF(a,b,d,e,EBML_SemanticGlobal,v) -#define DEFINE_MKX_UINTEGER(a,b,c,d,e) DEFINE_xxx_UINTEGER(a,b,d,e,EBML_SemanticGlobal) -#define DEFINE_MKX_SINTEGER(a,b,c,d,e) DEFINE_xxx_SINTEGER(a,b,d,e,EBML_SemanticGlobal) -#define DEFINE_MKX_SINTEGER_CONS(a,b,c,d,e) DEFINE_xxx_SINTEGER_CONS(a,b,d,e,EBML_SemanticGlobal) -#define DEFINE_MKX_STRING_DEF(a,b,c,d,e,v) DEFINE_xxx_STRING_DEF(a,b,d,e,EBML_SemanticGlobal,v) -#define DEFINE_MKX_STRING(a,b,c,d,e) DEFINE_xxx_STRING(a,b,d,e,EBML_SemanticGlobal) -#define DEFINE_MKX_UNISTRING(a,b,c,d,e) DEFINE_xxx_UNISTRING(a,b,d,e,EBML_SemanticGlobal) -#define DEFINE_MKX_BINARY(a,b,c,d,e) DEFINE_xxx_BINARY(a,b,d,e,EBML_SemanticGlobal) -#define DEFINE_MKX_BINARY_CONS(a,b,c,d,e) DEFINE_xxx_BINARY_CONS(a,b,d,e,EBML_SemanticGlobal) -#define DEFINE_MKX_FLOAT_DEF(a,b,c,d,e,v) DEFINE_xxx_FLOAT_DEF(a,b,d,e,EBML_SemanticGlobal,v) -#define DEFINE_MKX_FLOAT(a,b,c,d,e) DEFINE_xxx_FLOAT(a,b,d,e,EBML_SemanticGlobal) -#define DEFINE_MKX_FLOAT64(a,b,c,d,e) DEFINE_xxx_FLOAT64(a,b,d,e,EBML_SemanticGlobal) -#define DEFINE_MKX_DATE(a,b,c,d,e) DEFINE_xxx_DATE(a,b,d,e,EBML_SemanticGlobal) - -#define DECLARE_MKX_CONTEXT(x) - -#define DECLARE_MKX_MASTER(x) DECLARE_MKX_CONTEXT(x) \ -class MATROSKA_DLL_API x : public EbmlMaster { \ - public: x(); \ - x(const x & ElementToClone) :EbmlMaster(ElementToClone) {} \ - EBML_CONCRETE_CLASS(x) - -#define DECLARE_MKX_MASTER_CONS(x) DECLARE_MKX_CONTEXT(x) \ -class MATROSKA_DLL_API x : public EbmlMaster { \ - public: x(); \ - x(const x & ElementToClone); \ - EBML_CONCRETE_CLASS(x) - -#define DECLARE_MKX_BINARY(x) DECLARE_MKX_CONTEXT(x) \ - class MATROSKA_DLL_API x : public EbmlBinary { \ - public: x(); \ - x(const x & ElementToClone) :EbmlBinary(ElementToClone) {} \ - EBML_CONCRETE_CLASS(x) - -#define DECLARE_MKX_BINARY_CONS(x) DECLARE_MKX_CONTEXT(x) \ - class MATROSKA_DLL_API x : public EbmlBinary { \ - public: x(); \ - x(const x & ElementToClone); \ - EBML_CONCRETE_CLASS(x) - -#define DECLARE_MKX_UNISTRING(x) DECLARE_MKX_CONTEXT(x) \ - class MATROSKA_DLL_API x : public EbmlUnicodeString { \ - public: x(); \ - x(const x & ElementToClone) :EbmlUnicodeString(ElementToClone) {} \ - EBML_CONCRETE_CLASS(x) - -#define DECLARE_MKX_STRING(x) DECLARE_MKX_CONTEXT(x) \ - class MATROSKA_DLL_API x : public EbmlString { \ - public: x(); \ - x(const x & ElementToClone) :EbmlString(ElementToClone) {} \ - EBML_CONCRETE_CLASS(x) - -#define DECLARE_MKX_UINTEGER(x) DECLARE_MKX_CONTEXT(x) \ - class MATROSKA_DLL_API x : public EbmlUInteger { \ - public: x(); \ - x(const x & ElementToClone) :EbmlUInteger(ElementToClone) {} \ - EBML_CONCRETE_CLASS(x) - -#define DECLARE_MKX_SINTEGER_CONS(x) DECLARE_MKX_CONTEXT(x) \ - class MATROSKA_DLL_API x : public EbmlSInteger { \ - public: x(); \ - x(const x & ElementToClone); \ - EBML_CONCRETE_CLASS(x) - -#define DECLARE_MKX_SINTEGER(x) DECLARE_MKX_CONTEXT(x) \ - class MATROSKA_DLL_API x : public EbmlSInteger { \ - public: x(); \ - x(const x & ElementToClone) :EbmlSInteger(ElementToClone) {} \ - EBML_CONCRETE_CLASS(x) - -#define DECLARE_MKX_DATE(x) DECLARE_MKX_CONTEXT(x) \ - class MATROSKA_DLL_API x : public EbmlDate { \ - public: x(); \ - x(const x & ElementToClone) :EbmlDate(ElementToClone) {} \ - EBML_CONCRETE_CLASS(x) - -#define DECLARE_MKX_FLOAT(x) DECLARE_MKX_CONTEXT(x) \ - class MATROSKA_DLL_API x : public EbmlFloat { \ - public: x(); \ - x(const x & ElementToClone) :EbmlFloat(ElementToClone) {} \ - EBML_CONCRETE_CLASS(x) - - -#else #define DEFINE_MKX_CONTEXT(a) DEFINE_xxx_CONTEXT(a,GetKaxGlobal_Context) #define DEFINE_MKX_MASTER_CONS(a,b,c,d,e) DEFINE_xxx_MASTER_CONS(a,b,c,d,e,GetKaxGlobal_Context) #define DEFINE_MKX_MASTER(a,b,c,d,e) DEFINE_xxx_MASTER(a,b,c,d,e,GetKaxGlobal_Context) @@ -187,6 +97,5 @@ class MATROSKA_DLL_API x : public EbmlMaster { \ x(const x & ElementToClone) :EbmlFloat(ElementToClone) {} \ EBML_CONCRETE_CLASS(x) -#endif #endif // LIBMATROSKA_DEFINES_H diff --git a/matroska/KaxSemantic.h b/matroska/KaxSemantic.h index 79019d50..0d4afb71 100644 --- a/matroska/KaxSemantic.h +++ b/matroska/KaxSemantic.h @@ -36,10 +36,6 @@ DECLARE_MKX_MASTER(KaxInfo) }; DECLARE_MKX_BINARY (KaxSegmentUID) -#if defined(HAVE_EBML2) || defined(HAS_EBML2) -public: - KaxSegmentUID(EBML_DEF_CONS EBML_DEF_SEP EBML_EXTRA_PARAM); -#endif public: bool ValidateSize() const override {return IsFiniteSize() && GetSize() == 16;} }; diff --git a/src/FileKax.cpp b/src/FileKax.cpp index 61d9d985..be4e2b1f 100644 --- a/src/FileKax.cpp +++ b/src/FileKax.cpp @@ -33,17 +33,3 @@ FileMatroska::FileMatroska(IOCallback & output) } */ } // namespace libmatroska - -void matroska_init() -{ -#if defined(HAVE_EBML2) || defined(HAS_EBML2) - ebml_init(); -#endif -} - -void matroska_done() -{ -#if defined(HAVE_EBML2) || defined(HAS_EBML2) - ebml_done(); -#endif -} diff --git a/src/KaxInfoData.cpp b/src/KaxInfoData.cpp deleted file mode 100644 index e49b1044..00000000 --- a/src/KaxInfoData.cpp +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright © 2002-2010 Steve Lhomme. -// SPDX-License-Identifier: LGPL-2.1-or-later - -/*! - \file - \author Steve Lhomme - \author John Cannon -*/ -#include "matroska/KaxInfoData.h" -#include "matroska/KaxContexts.h" -#include "matroska/KaxDefines.h" -#include "matroska/KaxSemantic.h" - -namespace libmatroska { - -#if defined(HAVE_EBML2) || defined(HAS_EBML2) -KaxSegmentUID::KaxSegmentUID() - :EbmlBinary(EBML_DEF_PARAM) -{ -} -#endif - -} // namespace libmatroska