Skip to content

Commit

Permalink
remove the EbmlBinary::SizeIsValid pure virtual method
Browse files Browse the repository at this point in the history
We get that information from the EbmlCallbacks.
  • Loading branch information
robUx4 committed Mar 3, 2024
1 parent 8563b7f commit f7e06a0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 14 deletions.
4 changes: 0 additions & 4 deletions matroska/KaxBlock.h
Original file line number Diff line number Diff line change
Expand Up @@ -184,10 +184,6 @@ class MATROSKA_DLL_API KaxInternalBlock : public libebml::EbmlBinary {
{}
KaxInternalBlock(const KaxInternalBlock & ElementToClone);
~KaxInternalBlock() override;
bool SizeIsValid(std::uint64_t size) const override
{
return size >= 4; /// for the moment
}
static inline bool SizeIsValid(std::uint64_t size)
{
return size >= 4; /// for the moment
Expand Down
20 changes: 10 additions & 10 deletions matroska/KaxSemantic.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include "matroska/KaxDefines.h"

namespace libmatroska {
DECLARE_MKX_BINARY_LENGTH(KaxSeekID, 4)
DECLARE_MKX_BINARY(KaxSeekID)
static inline bool SizeIsValid(std::uint64_t Size) {return Size == 4;}
};

Expand All @@ -32,28 +32,28 @@ DECLARE_MKX_UINTEGER(KaxSeekPosition)
DECLARE_MKX_MASTER(KaxInfo)
};

DECLARE_MKX_BINARY_LENGTH(KaxSegmentUID, 16)
DECLARE_MKX_BINARY(KaxSegmentUID)
static inline bool SizeIsValid(std::uint64_t Size) {return Size == 16;}
};

DECLARE_MKX_UNISTRING(KaxSegmentFilename)
};

DECLARE_MKX_BINARY_LENGTH(KaxPrevUID, 16)
DECLARE_MKX_BINARY(KaxPrevUID)
static inline bool SizeIsValid(std::uint64_t Size) {return Size == 16;}
};

DECLARE_MKX_UNISTRING(KaxPrevFilename)
};

DECLARE_MKX_BINARY_LENGTH(KaxNextUID, 16)
DECLARE_MKX_BINARY(KaxNextUID)
static inline bool SizeIsValid(std::uint64_t Size) {return Size == 16;}
};

DECLARE_MKX_UNISTRING(KaxNextFilename)
};

DECLARE_MKX_BINARY_LENGTH(KaxSegmentFamily, 16)
DECLARE_MKX_BINARY(KaxSegmentFamily)
static inline bool SizeIsValid(std::uint64_t Size) {return Size == 16;}
};

Expand Down Expand Up @@ -391,7 +391,7 @@ DECLARE_MKX_UINTEGER_DEF(KaxVideoAspectRatio)
libebml::filepos_t RenderData(libebml::IOCallback & output, bool bForceRender, const ShouldWrite & writeFilter) override;
};

DECLARE_MKX_BINARY_LENGTH(KaxVideoColourSpace, 4)
DECLARE_MKX_BINARY(KaxVideoColourSpace)
static inline bool SizeIsValid(std::uint64_t Size) {return Size == 4;}
};

Expand Down Expand Up @@ -547,7 +547,7 @@ DECLARE_MKX_UINTEGER(KaxTrickTrackUID)
libebml::filepos_t RenderData(libebml::IOCallback & output, bool bForceRender, const ShouldWrite & writeFilter) override;
};

DECLARE_MKX_BINARY_LENGTH(KaxTrickTrackSegmentUID, 16)
DECLARE_MKX_BINARY(KaxTrickTrackSegmentUID)
public:
libebml::filepos_t RenderData(libebml::IOCallback & output, bool bForceRender, const ShouldWrite & writeFilter) override;
static inline bool SizeIsValid(std::uint64_t Size) {return Size == 16;}
Expand All @@ -563,7 +563,7 @@ DECLARE_MKX_UINTEGER(KaxTrickMasterTrackUID)
libebml::filepos_t RenderData(libebml::IOCallback & output, bool bForceRender, const ShouldWrite & writeFilter) override;
};

DECLARE_MKX_BINARY_LENGTH(KaxTrickMasterTrackSegmentUID, 16)
DECLARE_MKX_BINARY(KaxTrickMasterTrackSegmentUID)
public:
libebml::filepos_t RenderData(libebml::IOCallback & output, bool bForceRender, const ShouldWrite & writeFilter) override;
static inline bool SizeIsValid(std::uint64_t Size) {return Size == 16;}
Expand Down Expand Up @@ -751,7 +751,7 @@ DECLARE_MKX_UINTEGER_DEF(KaxChapterFlagHidden)
DECLARE_MKX_UINTEGER_DEF(KaxChapterFlagEnabled)
};

DECLARE_MKX_BINARY_LENGTH(KaxChapterSegmentUID, 16)
DECLARE_MKX_BINARY(KaxChapterSegmentUID)
static inline bool SizeIsValid(std::uint64_t Size) {return Size == 16;}
};

Expand Down Expand Up @@ -1173,7 +1173,7 @@ typedef enum {
*Indicate what type of content the ChapterAtom contains and might be skipped. It can be used to automatically skip content based on the type.
If a `ChapterAtom` is inside a `ChapterAtom` that has a `ChapterSkipType` set, it **MUST NOT** have a `ChapterSkipType` or have a `ChapterSkipType` with the same value as it's parent `ChapterAtom`.
If the `ChapterAtom` doesn't contain a `ChapterTimeEnd`, the value of the `ChapterSkipType` is only valid until the next `ChapterAtom` with a `ChapterSkipType` value or the end of the file.
*/
typedef enum {
MATROSKA_CHAPTERSKIPTYPE_NO_SKIPPING = 0, // Content which should not be skipped.
Expand Down

0 comments on commit f7e06a0

Please sign in to comment.