Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RFC] keep the min/max/webm/divx information for each element #148

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 36 additions & 18 deletions matroska/KaxDefines.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,43 @@
#include <ebml/EbmlVersion.h>
#include <ebml/EbmlElement.h>

namespace libmatroska {

class MATROSKA_DLL_API MatroskaProfile : public libebml::EbmlDocVersion
{
public:
constexpr MatroskaProfile(bool webm, bool divx, version_type min, version_type max = ANY_VERSION)
:EbmlDocVersion(min, max)
,InWebM(webm)
,InDivX(divx)
{}

const bool InWebM;
const bool InDivX;
};

}

#define DEFINE_MKX_CONTEXT(a) DEFINE_xxx_CONTEXT(a,GetKaxGlobal_Context)
#define DEFINE_MKX_MASTER_CONS(a,b,c,d,i,e) DEFINE_xxx_MASTER_CONS(a,b,c,d,i,e,GetKaxGlobal_Context)
#define DEFINE_MKX_MASTER(a,b,c,d,i,e) DEFINE_xxx_MASTER(a,b,c,d,i,e,GetKaxGlobal_Context)
#define DEFINE_MKX_MASTER_ORPHAN(a,b,c,i,d) DEFINE_xxx_MASTER_ORPHAN(a,b,c,i,d,GetKaxGlobal_Context)
#define DEFINE_MKX_UINTEGER_DEF(a,b,c,d,e,v) DEFINE_xxx_UINTEGER_DEF(a,b,c,d,e,GetKaxGlobal_Context,v)
#define DEFINE_MKX_SINTEGER_DEF(a,b,c,d,e,v) DEFINE_xxx_SINTEGER_DEF(a,b,c,d,e,GetKaxGlobal_Context,v)
#define DEFINE_MKX_UINTEGER(a,b,c,d,e) DEFINE_xxx_UINTEGER(a,b,c,d,e,GetKaxGlobal_Context)
#define DEFINE_MKX_SINTEGER(a,b,c,d,e) DEFINE_xxx_SINTEGER(a,b,c,d,e,GetKaxGlobal_Context)
#define DEFINE_MKX_STRING_DEF(a,b,c,d,e,v) DEFINE_xxx_STRING_DEF(a,b,c,d,e,GetKaxGlobal_Context,v)
#define DEFINE_MKX_STRING(a,b,c,d,e) DEFINE_xxx_STRING(a,b,c,d,e,GetKaxGlobal_Context)
#define DEFINE_MKX_UNISTRING(a,b,c,d,e) DEFINE_xxx_UNISTRING(a,b,c,d,e,GetKaxGlobal_Context)
#define DEFINE_MKX_BINARY(a,b,c,d,e) DEFINE_xxx_BINARY(a,b,c,d,e,GetKaxGlobal_Context)
#define DEFINE_MKX_FLOAT_DEF(a,b,c,d,e,v) DEFINE_xxx_FLOAT_DEF(a,b,c,d,e,GetKaxGlobal_Context,v)
#define DEFINE_MKX_FLOAT(a,b,c,d,e) DEFINE_xxx_FLOAT(a,b,c,d,e,GetKaxGlobal_Context)
#define DEFINE_MKX_DATE(a,b,c,d,e) DEFINE_xxx_DATE(a,b,c,d,e,GetKaxGlobal_Context)
#define DEFINE_MKX_BINARY_CONS(a,b,c,d,e) DEFINE_xxx_CLASS_CONS(a,b,c,d,e,GetKaxGlobal_Context) \
const libebml::EbmlCallbacks a::ClassInfos(a::Create, Id_##a, false, e, Context_##a);
#define DEFINE_MKX_SINTEGER_CONS(a,b,c,d,e) DEFINE_xxx_CLASS_CONS(a,b,c,d,e,GetKaxGlobal_Context) \
const libebml::EbmlCallbacksDefault<std::int64_t> a::ClassInfos(a::Create, Id_##a, e, Context_##a);

#define DEFINE_MKX_MASTER_CONS(a,b,c,d,i,e,versions) DEFINE_xxx_MASTER_CONS(a,b,c,d,i,e,versions,GetKaxGlobal_Context)
#define DEFINE_MKX_MASTER(a,b,c,d,i,e,versions) DEFINE_xxx_MASTER(a,b,c,d,i,e,versions,GetKaxGlobal_Context)
#define DEFINE_MKX_MASTER_ORPHAN(a,b,c,i,d,versions) DEFINE_xxx_MASTER_ORPHAN(a,b,c,i,d,versions,GetKaxGlobal_Context)
#define DEFINE_MKX_UINTEGER_DEF(a,b,c,d,e,versions,v) DEFINE_xxx_UINTEGER_DEF(a,b,c,d,e,versions,GetKaxGlobal_Context,v)
#define DEFINE_MKX_SINTEGER_DEF(a,b,c,d,e,versions,v) DEFINE_xxx_SINTEGER_DEF(a,b,c,d,e,versions,GetKaxGlobal_Context,v)
#define DEFINE_MKX_UINTEGER(a,b,c,d,e,versions) DEFINE_xxx_UINTEGER(a,b,c,d,e,versions,GetKaxGlobal_Context)
#define DEFINE_MKX_SINTEGER(a,b,c,d,e,versions) DEFINE_xxx_SINTEGER(a,b,c,d,e,versions,GetKaxGlobal_Context)
#define DEFINE_MKX_STRING_DEF(a,b,c,d,e,versions,v) DEFINE_xxx_STRING_DEF(a,b,c,d,e,versions,GetKaxGlobal_Context,v)
#define DEFINE_MKX_STRING(a,b,c,d,e,versions) DEFINE_xxx_STRING(a,b,c,d,e,versions,GetKaxGlobal_Context)
#define DEFINE_MKX_UNISTRING(a,b,c,d,e,versions) DEFINE_xxx_UNISTRING(a,b,c,d,e,versions,GetKaxGlobal_Context)
#define DEFINE_MKX_BINARY(a,b,c,d,e,versions) DEFINE_xxx_BINARY(a,b,c,d,e,versions,GetKaxGlobal_Context)
#define DEFINE_MKX_FLOAT_DEF(a,b,c,d,e,versions,v) DEFINE_xxx_FLOAT_DEF(a,b,c,d,e,versions,GetKaxGlobal_Context,v)
#define DEFINE_MKX_FLOAT(a,b,c,d,e,versions) DEFINE_xxx_FLOAT(a,b,c,d,e,versions,GetKaxGlobal_Context)
#define DEFINE_MKX_DATE(a,b,c,d,e,versions) DEFINE_xxx_DATE(a,b,c,d,e,versions,GetKaxGlobal_Context)
#define DEFINE_MKX_BINARY_CONS(a,b,c,d,e,versions) DEFINE_xxx_CLASS_CONS(a,b,c,d,e,GetKaxGlobal_Context) \
const libebml::EbmlCallbacks a::ClassInfos(a::Create, Id_##a, false, e, Context_##a, versions);
#define DEFINE_MKX_SINTEGER_CONS(a,b,c,d,e,versions) DEFINE_xxx_CLASS_CONS(a,b,c,d,e,GetKaxGlobal_Context) \
const libebml::EbmlCallbacksDefault<std::int64_t> a::ClassInfos(a::Create, Id_##a, e, Context_##a, versions);

#define MATROSKA_CLASS_BODY(x) \
EBML_CONCRETE_CLASS(x)
Expand Down
Loading
Loading