diff --git a/matroska/KaxBlock.h b/matroska/KaxBlock.h index ef139e01..e11b1b8a 100644 --- a/matroska/KaxBlock.h +++ b/matroska/KaxBlock.h @@ -196,7 +196,7 @@ class MATROSKA_DLL_API KaxInternalBlock : public EbmlBinary { /*! \note override this function to generate the Data/Size on the fly, unlike the usual binary elements */ - filepos_t UpdateSize(bool bSaveDefault = false, bool bForceRender = false) override; + filepos_t UpdateSize(ShouldWrite writeFilter = WriteSkipDefault, bool bForceRender = false) override; filepos_t ReadData(IOCallback & input, ScopeMode ReadFully = SCOPE_ALL_DATA) override; /*! @@ -262,7 +262,7 @@ class MATROSKA_DLL_API KaxInternalBlock : public EbmlBinary { bool bIsKeyframe{true}; bool bIsDiscardable{false}; - filepos_t RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault = false) override; + filepos_t RenderData(IOCallback & output, bool bForceRender, ShouldWrite writeFilter = WriteSkipDefault) override; }; DECLARE_MKX_CONTEXT(KaxBlock) @@ -334,11 +334,11 @@ DECLARE_MKX_BINARY_CONS(KaxBlockVirtual) /*! \note override this function to generate the Data/Size on the fly, unlike the usual binary elements */ - filepos_t UpdateSize(bool bSaveDefault = false, bool bForceRender = false) override; + filepos_t UpdateSize(ShouldWrite writeFilter = WriteSkipDefault, bool bForceRender = false) override; void SetParent(const KaxCluster & aParentCluster) {ParentCluster = &aParentCluster;} - filepos_t RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault) override; + filepos_t RenderData(IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; filepos_t ReadData(IOCallback & input, ScopeMode ReadFully = SCOPE_ALL_DATA) override; diff --git a/matroska/KaxBlockData.h b/matroska/KaxBlockData.h index 6a16933d..96d5a8ba 100644 --- a/matroska/KaxBlockData.h +++ b/matroska/KaxBlockData.h @@ -28,7 +28,7 @@ DECLARE_MKX_SINTEGER_CONS(KaxReferenceBlock) /*! \brief override this method to compute the timecode value */ - filepos_t UpdateSize(bool bSaveDefault = false, bool bForceRender = false) override; + filepos_t UpdateSize(ShouldWrite writeFilter = WriteSkipDefault, bool bForceRender = false) override; const KaxBlockBlob & RefBlock() const; void SetReferencedBlock(const KaxBlockBlob * aRefdBlock); diff --git a/matroska/KaxCluster.h b/matroska/KaxCluster.h index b004e20e..6e252518 100644 --- a/matroska/KaxCluster.h +++ b/matroska/KaxCluster.h @@ -48,7 +48,7 @@ DECLARE_MKX_MASTER_CONS(KaxCluster) /*! \brief Render the data to the stream and retrieve the position of BlockGroups for later cue entries */ - filepos_t Render(IOCallback & output, KaxCues & CueToUpdate, bool bSaveDefault = false); + filepos_t Render(IOCallback & output, KaxCues & CueToUpdate, ShouldWrite writeFilter = WriteSkipDefault); /*! \return the global timecode of this Cluster diff --git a/matroska/KaxCues.h b/matroska/KaxCues.h index b9dbbbd6..6dcfb952 100644 --- a/matroska/KaxCues.h +++ b/matroska/KaxCues.h @@ -36,9 +36,9 @@ DECLARE_MKX_MASTER(KaxCues) /*! \brief override to sort by timecode/track */ - filepos_t Render(IOCallback & output, bool bSaveDefault = false) { + filepos_t Render(IOCallback & output, ShouldWrite writeFilter = WriteSkipDefault) { Sort(); - return EbmlMaster::Render(output, bSaveDefault); + return EbmlMaster::Render(output, writeFilter); } std::uint64_t GetTimecodePosition(std::uint64_t aTimecode) const; diff --git a/matroska/KaxSemantic.h b/matroska/KaxSemantic.h index 0d4afb71..01c93fb9 100644 --- a/matroska/KaxSemantic.h +++ b/matroska/KaxSemantic.h @@ -89,12 +89,12 @@ DECLARE_MKX_UINTEGER(KaxClusterTimecode) DECLARE_MKX_MASTER(KaxClusterSilentTracks) public: - filepos_t RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault) override; + filepos_t RenderData(IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; }; DECLARE_MKX_UINTEGER(KaxClusterSilentTrackNumber) public: - filepos_t RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault) override; + filepos_t RenderData(IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; }; DECLARE_MKX_UINTEGER(KaxClusterPosition) @@ -123,7 +123,7 @@ DECLARE_MKX_UINTEGER(KaxReferencePriority) DECLARE_MKX_SINTEGER(KaxReferenceVirtual) public: - filepos_t RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault) override; + filepos_t RenderData(IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; }; DECLARE_MKX_BINARY (KaxCodecState) @@ -134,57 +134,57 @@ DECLARE_MKX_SINTEGER(KaxDiscardPadding) DECLARE_MKX_MASTER(KaxSlices) public: - filepos_t RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault) override; + filepos_t RenderData(IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; }; DECLARE_MKX_MASTER(KaxTimeSlice) public: - filepos_t RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault) override; + filepos_t RenderData(IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; }; DECLARE_MKX_UINTEGER(KaxSliceLaceNumber) public: - filepos_t RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault) override; + filepos_t RenderData(IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; }; DECLARE_MKX_UINTEGER(KaxSliceFrameNumber) public: - filepos_t RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault) override; + filepos_t RenderData(IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; }; DECLARE_MKX_UINTEGER(KaxSliceBlockAddID) public: - filepos_t RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault) override; + filepos_t RenderData(IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; }; DECLARE_MKX_UINTEGER(KaxSliceDelay) public: - filepos_t RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault) override; + filepos_t RenderData(IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; }; DECLARE_MKX_UINTEGER(KaxSliceDuration) public: - filepos_t RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault) override; + filepos_t RenderData(IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; }; DECLARE_MKX_MASTER(KaxReferenceFrame) public: - filepos_t RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault) override; + filepos_t RenderData(IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; }; DECLARE_MKX_UINTEGER(KaxReferenceOffset) public: - filepos_t RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault) override; + filepos_t RenderData(IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; }; DECLARE_MKX_UINTEGER(KaxReferenceTimeCode) public: - filepos_t RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault) override; + filepos_t RenderData(IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; }; DECLARE_MKX_BINARY (KaxEncryptedBlock) public: - filepos_t RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault) override; + filepos_t RenderData(IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; }; DECLARE_MKX_MASTER(KaxTracks) @@ -228,12 +228,12 @@ DECLARE_MKX_UINTEGER(KaxTrackFlagLacing) DECLARE_MKX_UINTEGER(KaxTrackMinCache) public: - filepos_t RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault) override; + filepos_t RenderData(IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; }; DECLARE_MKX_UINTEGER(KaxTrackMaxCache) public: - filepos_t RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault) override; + filepos_t RenderData(IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; }; DECLARE_MKX_UINTEGER(KaxTrackDefaultDuration) @@ -244,12 +244,12 @@ DECLARE_MKX_UINTEGER(KaxTrackDefaultDecodedFieldDuration) DECLARE_MKX_FLOAT(KaxTrackTimecodeScale) public: - filepos_t RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault) override; + filepos_t RenderData(IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; }; DECLARE_MKX_SINTEGER(KaxTrackOffset) public: - filepos_t RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault) override; + filepos_t RenderData(IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; }; DECLARE_MKX_UINTEGER(KaxMaxBlockAdditionID) @@ -290,27 +290,27 @@ DECLARE_MKX_UNISTRING(KaxCodecName) DECLARE_MKX_UINTEGER(KaxTrackAttachmentLink) public: - filepos_t RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault) override; + filepos_t RenderData(IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; }; DECLARE_MKX_UNISTRING(KaxCodecSettings) public: - filepos_t RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault) override; + filepos_t RenderData(IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; }; DECLARE_MKX_STRING(KaxCodecInfoURL) public: - filepos_t RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault) override; + filepos_t RenderData(IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; }; DECLARE_MKX_STRING(KaxCodecDownloadURL) public: - filepos_t RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault) override; + filepos_t RenderData(IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; }; DECLARE_MKX_UINTEGER(KaxCodecDecodeAll) public: - filepos_t RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault) override; + filepos_t RenderData(IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; }; DECLARE_MKX_UINTEGER(KaxTrackOverlay) @@ -351,7 +351,7 @@ DECLARE_MKX_UINTEGER(KaxVideoAlphaMode) DECLARE_MKX_UINTEGER(KaxOldStereoMode) public: - filepos_t RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault) override; + filepos_t RenderData(IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; }; DECLARE_MKX_UINTEGER(KaxVideoPixelWidth) @@ -383,7 +383,7 @@ DECLARE_MKX_UINTEGER(KaxVideoDisplayUnit) DECLARE_MKX_UINTEGER(KaxVideoAspectRatio) public: - filepos_t RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault) override; + filepos_t RenderData(IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; }; DECLARE_MKX_BINARY (KaxVideoColourSpace) @@ -393,12 +393,12 @@ DECLARE_MKX_BINARY (KaxVideoColourSpace) DECLARE_MKX_FLOAT(KaxVideoGamma) public: - filepos_t RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault) override; + filepos_t RenderData(IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; }; DECLARE_MKX_FLOAT(KaxVideoFrameRate) public: - filepos_t RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault) override; + filepos_t RenderData(IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; }; DECLARE_MKX_MASTER(KaxVideoColour) @@ -508,7 +508,7 @@ DECLARE_MKX_UINTEGER(KaxAudioChannels) DECLARE_MKX_BINARY (KaxAudioPosition) public: - filepos_t RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault) override; + filepos_t RenderData(IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; }; DECLARE_MKX_UINTEGER(KaxAudioBitDepth) @@ -540,28 +540,28 @@ DECLARE_MKX_UINTEGER(KaxTrackJoinUID) DECLARE_MKX_UINTEGER(KaxTrickTrackUID) public: - filepos_t RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault) override; + filepos_t RenderData(IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; }; DECLARE_MKX_BINARY (KaxTrickTrackSegmentUID) public: - filepos_t RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault) override; + filepos_t RenderData(IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; bool ValidateSize() const override {return IsFiniteSize() && GetSize() == 16;} }; DECLARE_MKX_UINTEGER(KaxTrickTrackFlag) public: - filepos_t RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault) override; + filepos_t RenderData(IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; }; DECLARE_MKX_UINTEGER(KaxTrickMasterTrackUID) public: - filepos_t RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault) override; + filepos_t RenderData(IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; }; DECLARE_MKX_BINARY (KaxTrickMasterTrackSegmentUID) public: - filepos_t RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault) override; + filepos_t RenderData(IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; bool ValidateSize() const override {return IsFiniteSize() && GetSize() == 16;} }; @@ -606,22 +606,22 @@ DECLARE_MKX_UINTEGER(KaxAESSettingsCipherMode) DECLARE_MKX_BINARY (KaxContentSignature) public: - filepos_t RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault) override; + filepos_t RenderData(IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; }; DECLARE_MKX_BINARY (KaxContentSigKeyID) public: - filepos_t RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault) override; + filepos_t RenderData(IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; }; DECLARE_MKX_UINTEGER(KaxContentSigAlgo) public: - filepos_t RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault) override; + filepos_t RenderData(IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; }; DECLARE_MKX_UINTEGER(KaxContentSigHashAlgo) public: - filepos_t RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault) override; + filepos_t RenderData(IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; }; DECLARE_MKX_UINTEGER(KaxCueTime) @@ -650,17 +650,17 @@ DECLARE_MKX_UINTEGER(KaxCueRefTime) DECLARE_MKX_UINTEGER(KaxCueRefCluster) public: - filepos_t RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault) override; + filepos_t RenderData(IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; }; DECLARE_MKX_UINTEGER(KaxCueRefNumber) public: - filepos_t RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault) override; + filepos_t RenderData(IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; }; DECLARE_MKX_UINTEGER(KaxCueRefCodecState) public: - filepos_t RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault) override; + filepos_t RenderData(IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; }; DECLARE_MKX_MASTER(KaxAttachments) @@ -686,17 +686,17 @@ DECLARE_MKX_UINTEGER(KaxFileUID) DECLARE_MKX_BINARY (KaxFileReferral) public: - filepos_t RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault) override; + filepos_t RenderData(IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; }; DECLARE_MKX_UINTEGER(KaxFileUsedStartTime) public: - filepos_t RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault) override; + filepos_t RenderData(IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; }; DECLARE_MKX_UINTEGER(KaxFileUsedEndTime) public: - filepos_t RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault) override; + filepos_t RenderData(IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; }; DECLARE_MKX_MASTER(KaxChapters) @@ -844,7 +844,7 @@ DECLARE_MKX_UINTEGER(KaxTagDefault) DECLARE_MKX_UINTEGER(KaxTagDefaultBogus) public: - filepos_t RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault) override; + filepos_t RenderData(IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; }; DECLARE_MKX_UNISTRING(KaxTagString) @@ -1170,7 +1170,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. diff --git a/src/KaxBlock.cpp b/src/KaxBlock.cpp index 2159fac6..da901376 100644 --- a/src/KaxBlock.cpp +++ b/src/KaxBlock.cpp @@ -204,7 +204,7 @@ LacingType KaxInternalBlock::GetBestLacingType() const { return LACING_EBML; } -filepos_t KaxInternalBlock::UpdateSize(bool /* bSaveDefault */, bool /* bForceRender */) +filepos_t KaxInternalBlock::UpdateSize(ShouldWrite, bool /* bForceRender */) { LacingType LacingHere; assert(!EbmlBinary::GetBuffer()); // Data is not used for KaxInternalBlock @@ -279,7 +279,7 @@ KaxBlockVirtual::~KaxBlockVirtual() SetBuffer( nullptr, 0 ); } -filepos_t KaxBlockVirtual::UpdateSize(bool /* bSaveDefault */, bool /* bForceRender */) +filepos_t KaxBlockVirtual::UpdateSize(ShouldWrite, bool /* bForceRender */) { assert(TrackNumber < 0x4000); binary *cursor = EbmlBinary::GetBuffer(); @@ -307,7 +307,7 @@ filepos_t KaxBlockVirtual::UpdateSize(bool /* bSaveDefault */, bool /* bForceRen \todo more optimisation is possible (render the Block head and don't copy the buffer in memory, care should be taken with the allocation of Data) \todo the actual timecode to write should be retrieved from the Cluster from here */ -filepos_t KaxInternalBlock::RenderData(IOCallback & output, bool /* bForceRender */, bool /* bSaveDefault */) +filepos_t KaxInternalBlock::RenderData(IOCallback & output, bool /* bForceRender */, ShouldWrite) { if (myBuffers.empty()) return 0; diff --git a/src/KaxBlockData.cpp b/src/KaxBlockData.cpp index 168ce11d..1af7bc36 100644 --- a/src/KaxBlockData.cpp +++ b/src/KaxBlockData.cpp @@ -46,7 +46,7 @@ void KaxReferenceBlock::FreeBlob() RefdBlock = nullptr; } -filepos_t KaxReferenceBlock::UpdateSize(bool bSaveDefault, bool bForceRender) +filepos_t KaxReferenceBlock::UpdateSize(ShouldWrite writeFilter, bool bForceRender) { if (!bTimecodeSet) { assert(RefdBlock); @@ -55,7 +55,7 @@ filepos_t KaxReferenceBlock::UpdateSize(bool bSaveDefault, bool bForceRender) auto &block = static_cast(*RefdBlock); SetValue(static_cast(block.GlobalTimecode()) - static_cast(ParentBlock->GlobalTimecode()) / static_cast(ParentBlock->GlobalTimecodeScale())); } - return EbmlSInteger::UpdateSize(bSaveDefault, bForceRender); + return EbmlSInteger::UpdateSize(writeFilter, bForceRender); } void KaxReferenceBlock::SetReferencedBlock(const KaxBlockBlob * aRefdBlock) diff --git a/src/KaxCluster.cpp b/src/KaxCluster.cpp index b5fbce5b..47ccfb5d 100644 --- a/src/KaxCluster.cpp +++ b/src/KaxCluster.cpp @@ -112,7 +112,7 @@ bool KaxCluster::AddFrame(const KaxTrackEntry & track, std::uint64_t timecode, D /*! \todo only put the Blocks written in the cue entries */ -filepos_t KaxCluster::Render(IOCallback & output, KaxCues & CueToUpdate, bool bSaveDefault) +filepos_t KaxCluster::Render(IOCallback & output, KaxCues & CueToUpdate, ShouldWrite writeFilter) { filepos_t Result = 0; @@ -144,7 +144,7 @@ filepos_t KaxCluster::Render(IOCallback & output, KaxCues & CueToUpdate, bool bS } } - Result = EbmlMaster::Render(output, bSaveDefault); + Result = EbmlMaster::Render(output, writeFilter); // For all Blocks add their position on the CueEntry for (const auto& element : GetElementList()) { @@ -182,7 +182,7 @@ filepos_t KaxCluster::Render(IOCallback & output, KaxCues & CueToUpdate, bool bS } } - Result = EbmlMaster::Render(output, bSaveDefault); + Result = EbmlMaster::Render(output, writeFilter); // For all Blocks add their position on the CueEntry for (const auto& blob : Blobs) diff --git a/src/KaxSemantic.cpp b/src/KaxSemantic.cpp index 1a4f0072..eb758939 100644 --- a/src/KaxSemantic.cpp +++ b/src/KaxSemantic.cpp @@ -734,227 +734,227 @@ DEFINE_MKX_UINTEGER_DEF(KaxTagDefaultBogus, 0x44B4, 2, KaxTagSimple, "TagDefault DEFINE_MKX_UNISTRING(KaxTagString, 0x4487, 2, KaxTagSimple, "TagString") DEFINE_MKX_BINARY (KaxTagBinary, 0x4485, 2, KaxTagSimple, "TagBinary") -filepos_t KaxClusterSilentTracks::RenderData(IOCallback & /* output */, bool /* bForceRender */, bool /* bSaveDefault */) { +filepos_t KaxClusterSilentTracks::RenderData(IOCallback & /* output */, bool /* bForceRender */, ShouldWrite) { assert(false); // no you are not allowed to use this element ! return 0; } -filepos_t KaxClusterSilentTrackNumber::RenderData(IOCallback & /* output */, bool /* bForceRender */, bool /* bSaveDefault */) { +filepos_t KaxClusterSilentTrackNumber::RenderData(IOCallback & /* output */, bool /* bForceRender */, ShouldWrite) { assert(false); // no you are not allowed to use this element ! return 0; } -filepos_t KaxBlockVirtual::RenderData(IOCallback & /* output */, bool /* bForceRender */, bool /* bSaveDefault */) { +filepos_t KaxBlockVirtual::RenderData(IOCallback & /* output */, bool /* bForceRender */, ShouldWrite) { assert(false); // no you are not allowed to use this element ! return 0; } -filepos_t KaxReferenceVirtual::RenderData(IOCallback & /* output */, bool /* bForceRender */, bool /* bSaveDefault */) { +filepos_t KaxReferenceVirtual::RenderData(IOCallback & /* output */, bool /* bForceRender */, ShouldWrite) { assert(false); // no you are not allowed to use this element ! return 0; } -filepos_t KaxSlices::RenderData(IOCallback & /* output */, bool /* bForceRender */, bool /* bSaveDefault */) { +filepos_t KaxSlices::RenderData(IOCallback & /* output */, bool /* bForceRender */, ShouldWrite) { assert(false); // no you are not allowed to use this element ! return 0; } -filepos_t KaxTimeSlice::RenderData(IOCallback & /* output */, bool /* bForceRender */, bool /* bSaveDefault */) { +filepos_t KaxTimeSlice::RenderData(IOCallback & /* output */, bool /* bForceRender */, ShouldWrite) { assert(false); // no you are not allowed to use this element ! return 0; } -filepos_t KaxSliceLaceNumber::RenderData(IOCallback & /* output */, bool /* bForceRender */, bool /* bSaveDefault */) { +filepos_t KaxSliceLaceNumber::RenderData(IOCallback & /* output */, bool /* bForceRender */, ShouldWrite) { assert(false); // no you are not allowed to use this element ! return 0; } -filepos_t KaxSliceFrameNumber::RenderData(IOCallback & /* output */, bool /* bForceRender */, bool /* bSaveDefault */) { +filepos_t KaxSliceFrameNumber::RenderData(IOCallback & /* output */, bool /* bForceRender */, ShouldWrite) { assert(false); // no you are not allowed to use this element ! return 0; } -filepos_t KaxSliceBlockAddID::RenderData(IOCallback & /* output */, bool /* bForceRender */, bool /* bSaveDefault */) { +filepos_t KaxSliceBlockAddID::RenderData(IOCallback & /* output */, bool /* bForceRender */, ShouldWrite) { assert(false); // no you are not allowed to use this element ! return 0; } -filepos_t KaxSliceDelay::RenderData(IOCallback & /* output */, bool /* bForceRender */, bool /* bSaveDefault */) { +filepos_t KaxSliceDelay::RenderData(IOCallback & /* output */, bool /* bForceRender */, ShouldWrite) { assert(false); // no you are not allowed to use this element ! return 0; } -filepos_t KaxSliceDuration::RenderData(IOCallback & /* output */, bool /* bForceRender */, bool /* bSaveDefault */) { +filepos_t KaxSliceDuration::RenderData(IOCallback & /* output */, bool /* bForceRender */, ShouldWrite) { assert(false); // no you are not allowed to use this element ! return 0; } -filepos_t KaxReferenceFrame::RenderData(IOCallback & /* output */, bool /* bForceRender */, bool /* bSaveDefault */) { +filepos_t KaxReferenceFrame::RenderData(IOCallback & /* output */, bool /* bForceRender */, ShouldWrite) { assert(false); // no you are not allowed to use this element ! return 0; } -filepos_t KaxReferenceOffset::RenderData(IOCallback & /* output */, bool /* bForceRender */, bool /* bSaveDefault */) { +filepos_t KaxReferenceOffset::RenderData(IOCallback & /* output */, bool /* bForceRender */, ShouldWrite) { assert(false); // no you are not allowed to use this element ! return 0; } -filepos_t KaxReferenceTimeCode::RenderData(IOCallback & /* output */, bool /* bForceRender */, bool /* bSaveDefault */) { +filepos_t KaxReferenceTimeCode::RenderData(IOCallback & /* output */, bool /* bForceRender */, ShouldWrite) { assert(false); // no you are not allowed to use this element ! return 0; } -filepos_t KaxEncryptedBlock::RenderData(IOCallback & /* output */, bool /* bForceRender */, bool /* bSaveDefault */) { +filepos_t KaxEncryptedBlock::RenderData(IOCallback & /* output */, bool /* bForceRender */, ShouldWrite) { assert(false); // no you are not allowed to use this element ! return 0; } -filepos_t KaxTrackMinCache::RenderData(IOCallback & /* output */, bool /* bForceRender */, bool /* bSaveDefault */) { +filepos_t KaxTrackMinCache::RenderData(IOCallback & /* output */, bool /* bForceRender */, ShouldWrite) { assert(false); // no you are not allowed to use this element ! return 0; } -filepos_t KaxTrackMaxCache::RenderData(IOCallback & /* output */, bool /* bForceRender */, bool /* bSaveDefault */) { +filepos_t KaxTrackMaxCache::RenderData(IOCallback & /* output */, bool /* bForceRender */, ShouldWrite) { assert(false); // no you are not allowed to use this element ! return 0; } -filepos_t KaxTrackTimecodeScale::RenderData(IOCallback & /* output */, bool /* bForceRender */, bool /* bSaveDefault */) { +filepos_t KaxTrackTimecodeScale::RenderData(IOCallback & /* output */, bool /* bForceRender */, ShouldWrite) { assert(false); // no you are not allowed to use this element ! return 0; } -filepos_t KaxTrackOffset::RenderData(IOCallback & /* output */, bool /* bForceRender */, bool /* bSaveDefault */) { +filepos_t KaxTrackOffset::RenderData(IOCallback & /* output */, bool /* bForceRender */, ShouldWrite) { assert(false); // no you are not allowed to use this element ! return 0; } -filepos_t KaxTrackAttachmentLink::RenderData(IOCallback & /* output */, bool /* bForceRender */, bool /* bSaveDefault */) { +filepos_t KaxTrackAttachmentLink::RenderData(IOCallback & /* output */, bool /* bForceRender */, ShouldWrite) { assert(false); // no you are not allowed to use this element ! return 0; } -filepos_t KaxCodecSettings::RenderData(IOCallback & /* output */, bool /* bForceRender */, bool /* bSaveDefault */) { +filepos_t KaxCodecSettings::RenderData(IOCallback & /* output */, bool /* bForceRender */, ShouldWrite) { assert(false); // no you are not allowed to use this element ! return 0; } -filepos_t KaxCodecInfoURL::RenderData(IOCallback & /* output */, bool /* bForceRender */, bool /* bSaveDefault */) { +filepos_t KaxCodecInfoURL::RenderData(IOCallback & /* output */, bool /* bForceRender */, ShouldWrite) { assert(false); // no you are not allowed to use this element ! return 0; } -filepos_t KaxCodecDownloadURL::RenderData(IOCallback & /* output */, bool /* bForceRender */, bool /* bSaveDefault */) { +filepos_t KaxCodecDownloadURL::RenderData(IOCallback & /* output */, bool /* bForceRender */, ShouldWrite) { assert(false); // no you are not allowed to use this element ! return 0; } -filepos_t KaxCodecDecodeAll::RenderData(IOCallback & /* output */, bool /* bForceRender */, bool /* bSaveDefault */) { +filepos_t KaxCodecDecodeAll::RenderData(IOCallback & /* output */, bool /* bForceRender */, ShouldWrite) { assert(false); // no you are not allowed to use this element ! return 0; } -filepos_t KaxOldStereoMode::RenderData(IOCallback & /* output */, bool /* bForceRender */, bool /* bSaveDefault */) { +filepos_t KaxOldStereoMode::RenderData(IOCallback & /* output */, bool /* bForceRender */, ShouldWrite) { assert(false); // no you are not allowed to use this element ! return 0; } -filepos_t KaxVideoAspectRatio::RenderData(IOCallback & /* output */, bool /* bForceRender */, bool /* bSaveDefault */) { +filepos_t KaxVideoAspectRatio::RenderData(IOCallback & /* output */, bool /* bForceRender */, ShouldWrite) { assert(false); // no you are not allowed to use this element ! return 0; } -filepos_t KaxVideoGamma::RenderData(IOCallback & /* output */, bool /* bForceRender */, bool /* bSaveDefault */) { +filepos_t KaxVideoGamma::RenderData(IOCallback & /* output */, bool /* bForceRender */, ShouldWrite) { assert(false); // no you are not allowed to use this element ! return 0; } -filepos_t KaxVideoFrameRate::RenderData(IOCallback & /* output */, bool /* bForceRender */, bool /* bSaveDefault */) { +filepos_t KaxVideoFrameRate::RenderData(IOCallback & /* output */, bool /* bForceRender */, ShouldWrite) { assert(false); // no you are not allowed to use this element ! return 0; } -filepos_t KaxAudioPosition::RenderData(IOCallback & /* output */, bool /* bForceRender */, bool /* bSaveDefault */) { +filepos_t KaxAudioPosition::RenderData(IOCallback & /* output */, bool /* bForceRender */, ShouldWrite) { assert(false); // no you are not allowed to use this element ! return 0; } -filepos_t KaxTrickTrackUID::RenderData(IOCallback & /* output */, bool /* bForceRender */, bool /* bSaveDefault */) { +filepos_t KaxTrickTrackUID::RenderData(IOCallback & /* output */, bool /* bForceRender */, ShouldWrite) { assert(false); // no you are not allowed to use this element ! return 0; } -filepos_t KaxTrickTrackSegmentUID::RenderData(IOCallback & /* output */, bool /* bForceRender */, bool /* bSaveDefault */) { +filepos_t KaxTrickTrackSegmentUID::RenderData(IOCallback & /* output */, bool /* bForceRender */, ShouldWrite) { assert(false); // no you are not allowed to use this element ! return 0; } -filepos_t KaxTrickTrackFlag::RenderData(IOCallback & /* output */, bool /* bForceRender */, bool /* bSaveDefault */) { +filepos_t KaxTrickTrackFlag::RenderData(IOCallback & /* output */, bool /* bForceRender */, ShouldWrite) { assert(false); // no you are not allowed to use this element ! return 0; } -filepos_t KaxTrickMasterTrackUID::RenderData(IOCallback & /* output */, bool /* bForceRender */, bool /* bSaveDefault */) { +filepos_t KaxTrickMasterTrackUID::RenderData(IOCallback & /* output */, bool /* bForceRender */, ShouldWrite) { assert(false); // no you are not allowed to use this element ! return 0; } -filepos_t KaxTrickMasterTrackSegmentUID::RenderData(IOCallback & /* output */, bool /* bForceRender */, bool /* bSaveDefault */) { +filepos_t KaxTrickMasterTrackSegmentUID::RenderData(IOCallback & /* output */, bool /* bForceRender */, ShouldWrite) { assert(false); // no you are not allowed to use this element ! return 0; } -filepos_t KaxContentSignature::RenderData(IOCallback & /* output */, bool /* bForceRender */, bool /* bSaveDefault */) { +filepos_t KaxContentSignature::RenderData(IOCallback & /* output */, bool /* bForceRender */, ShouldWrite) { assert(false); // no you are not allowed to use this element ! return 0; } -filepos_t KaxContentSigKeyID::RenderData(IOCallback & /* output */, bool /* bForceRender */, bool /* bSaveDefault */) { +filepos_t KaxContentSigKeyID::RenderData(IOCallback & /* output */, bool /* bForceRender */, ShouldWrite) { assert(false); // no you are not allowed to use this element ! return 0; } -filepos_t KaxContentSigAlgo::RenderData(IOCallback & /* output */, bool /* bForceRender */, bool /* bSaveDefault */) { +filepos_t KaxContentSigAlgo::RenderData(IOCallback & /* output */, bool /* bForceRender */, ShouldWrite) { assert(false); // no you are not allowed to use this element ! return 0; } -filepos_t KaxContentSigHashAlgo::RenderData(IOCallback & /* output */, bool /* bForceRender */, bool /* bSaveDefault */) { +filepos_t KaxContentSigHashAlgo::RenderData(IOCallback & /* output */, bool /* bForceRender */, ShouldWrite) { assert(false); // no you are not allowed to use this element ! return 0; } -filepos_t KaxCueRefCluster::RenderData(IOCallback & /* output */, bool /* bForceRender */, bool /* bSaveDefault */) { +filepos_t KaxCueRefCluster::RenderData(IOCallback & /* output */, bool /* bForceRender */, ShouldWrite) { assert(false); // no you are not allowed to use this element ! return 0; } -filepos_t KaxCueRefNumber::RenderData(IOCallback & /* output */, bool /* bForceRender */, bool /* bSaveDefault */) { +filepos_t KaxCueRefNumber::RenderData(IOCallback & /* output */, bool /* bForceRender */, ShouldWrite) { assert(false); // no you are not allowed to use this element ! return 0; } -filepos_t KaxCueRefCodecState::RenderData(IOCallback & /* output */, bool /* bForceRender */, bool /* bSaveDefault */) { +filepos_t KaxCueRefCodecState::RenderData(IOCallback & /* output */, bool /* bForceRender */, ShouldWrite) { assert(false); // no you are not allowed to use this element ! return 0; } -filepos_t KaxFileReferral::RenderData(IOCallback & /* output */, bool /* bForceRender */, bool /* bSaveDefault */) { +filepos_t KaxFileReferral::RenderData(IOCallback & /* output */, bool /* bForceRender */, ShouldWrite) { assert(false); // no you are not allowed to use this element ! return 0; } -filepos_t KaxFileUsedStartTime::RenderData(IOCallback & /* output */, bool /* bForceRender */, bool /* bSaveDefault */) { +filepos_t KaxFileUsedStartTime::RenderData(IOCallback & /* output */, bool /* bForceRender */, ShouldWrite) { assert(false); // no you are not allowed to use this element ! return 0; } -filepos_t KaxFileUsedEndTime::RenderData(IOCallback & /* output */, bool /* bForceRender */, bool /* bSaveDefault */) { +filepos_t KaxFileUsedEndTime::RenderData(IOCallback & /* output */, bool /* bForceRender */, ShouldWrite) { assert(false); // no you are not allowed to use this element ! return 0; } -filepos_t KaxTagDefaultBogus::RenderData(IOCallback & /* output */, bool /* bForceRender */, bool /* bSaveDefault */) { +filepos_t KaxTagDefaultBogus::RenderData(IOCallback & /* output */, bool /* bForceRender */, ShouldWrite) { assert(false); // no you are not allowed to use this element ! return 0; } diff --git a/test/mux/test6.cpp b/test/mux/test6.cpp index 07740385..23d7c1e0 100644 --- a/test/mux/test6.cpp +++ b/test/mux/test6.cpp @@ -35,7 +35,7 @@ const unsigned int BIN_FRAME_SIZE = 1500; const unsigned int TXT_FRAME_SIZE = 200; const std::uint64_t TIMECODE_SCALE = 1000000; -const bool bWriteDefaultValues = false; +const EbmlElement::ShouldWrite bWriteDefaultValues = EbmlElement::WriteSkipDefault; /*! The first file is a "binary" file with data scaling from 0x00 to 0xFF repeatedly