Skip to content

Commit

Permalink
use standard declaration macros for KaxBlock/KaxSimpleBlock
Browse files Browse the repository at this point in the history
So they can benefit of all the internal changes.
  • Loading branch information
robUx4 committed Feb 24, 2024
1 parent b7e8136 commit 1a983ae
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
11 changes: 2 additions & 9 deletions matroska/KaxBlock.h
Original file line number Diff line number Diff line change
Expand Up @@ -269,22 +269,15 @@ class MATROSKA_DLL_API KaxInternalBlock : public libebml::EbmlBinary {
libebml::filepos_t RenderData(libebml::IOCallback & output, bool bForceRender, const ShouldWrite & writeFilter = WriteSkipDefault) override;
};

class MATROSKA_DLL_API KaxBlock : public KaxInternalBlock {
private:
static const libebml::EbmlCallbacks ClassInfos;
public:
KaxBlock() :KaxInternalBlock(KaxBlock::ClassInfos) {}
DECLARE_xxx_BASE(KaxBlock, MATROSKA_DLL_API, KaxInternalBlock)
MATROSKA_CLASS_BODY(KaxBlock)
};

class MATROSKA_DLL_API KaxSimpleBlock : public KaxInternalBlock {
DECLARE_xxx_BASE(KaxSimpleBlock, MATROSKA_DLL_API, KaxInternalBlock)
private:
static const libebml::EbmlCallbacks ClassInfos;
bool bIsKeyframe{true};
bool bIsDiscardable{false};
public:
KaxSimpleBlock() :KaxInternalBlock(KaxSimpleBlock::ClassInfos) {}

void SetKeyframe(bool b_keyframe) { bIsKeyframe = b_keyframe; }
void SetDiscardable(bool b_discard) { bIsDiscardable = b_discard; }

Expand Down
4 changes: 4 additions & 0 deletions src/KaxBlock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ KaxInternalBlock::KaxInternalBlock(const KaxInternalBlock & ElementToClone)
}


KaxBlock::KaxBlock() :KaxInternalBlock(KaxBlock::ClassInfos) {}
KaxSimpleBlock::KaxSimpleBlock() :KaxInternalBlock(KaxSimpleBlock::ClassInfos) {}


/* KaxBlockGroup::~KaxBlockGroup()
{
//NOTE("KaxBlockGroup::~KaxBlockGroup");
Expand Down

0 comments on commit 1a983ae

Please sign in to comment.