diff --git a/matroska/FileKax.h b/matroska/FileKax.h index 99209300..aad76299 100644 --- a/matroska/FileKax.h +++ b/matroska/FileKax.h @@ -18,8 +18,6 @@ //#include "Cluster.h" //#include "CodecHeader.h" -using namespace libebml; - namespace libmatroska { //class Track; @@ -33,9 +31,9 @@ namespace libmatroska { */ class MATROSKA_DLL_API FileMatroska { public: - FileMatroska(IOCallback & output); + FileMatroska(libebml::IOCallback & output); ~FileMatroska() = default; - IOCallback & myFile; + libebml::IOCallback & myFile; }; diff --git a/matroska/KaxBlock.h b/matroska/KaxBlock.h index 1d594cbf..68305a2b 100644 --- a/matroska/KaxBlock.h +++ b/matroska/KaxBlock.h @@ -18,8 +18,6 @@ #include "matroska/KaxTracks.h" #include "matroska/KaxDefines.h" -using namespace libebml; - namespace libmatroska { class KaxCluster; @@ -29,14 +27,14 @@ class KaxBlockBlob; class MATROSKA_DLL_API DataBuffer { protected: - binary *myBuffer{nullptr}; + libebml::binary *myBuffer{nullptr}; std::uint32_t mySize; bool bValidValue{true}; bool (*myFreeBuffer)(const DataBuffer & aBuffer); // method to free the internal buffer bool bInternalBuffer; public: - DataBuffer(binary * aBuffer, std::uint32_t aSize, bool (*aFreeBuffer)(const DataBuffer & aBuffer) = nullptr, bool _bInternalBuffer = false) + DataBuffer(libebml::binary * aBuffer, std::uint32_t aSize, bool (*aFreeBuffer)(const DataBuffer & aBuffer) = nullptr, bool _bInternalBuffer = false) :mySize(aSize) ,myFreeBuffer(aFreeBuffer) ,bInternalBuffer(_bInternalBuffer) @@ -44,7 +42,7 @@ class MATROSKA_DLL_API DataBuffer { if (bInternalBuffer) { try { - myBuffer = new binary[mySize]; + myBuffer = new libebml::binary[mySize]; memcpy(myBuffer, aBuffer, mySize); } catch (const std::bad_alloc &) { bValidValue = false; @@ -55,9 +53,9 @@ class MATROSKA_DLL_API DataBuffer { } virtual ~DataBuffer() = default; - virtual binary * Buffer() {assert(bValidValue); return myBuffer;} + virtual libebml::binary * Buffer() {assert(bValidValue); return myBuffer;} virtual std::uint32_t & Size() {return mySize;}; - virtual const binary * Buffer() const {assert(bValidValue); return myBuffer;} + virtual const libebml::binary * Buffer() const {assert(bValidValue); return myBuffer;} virtual std::uint32_t Size() const {return mySize;}; bool FreeBuffer(const DataBuffer & aBuffer) { bool bResult = true; @@ -78,7 +76,7 @@ class MATROSKA_DLL_API DataBuffer { class MATROSKA_DLL_API SimpleDataBuffer : public DataBuffer { public: - SimpleDataBuffer(binary * aBuffer, std::uint32_t aSize, std::uint32_t aOffset, bool (*aFreeBuffer)(const DataBuffer & aBuffer) = myFreeBuffer) + SimpleDataBuffer(libebml::binary * aBuffer, std::uint32_t aSize, std::uint32_t aOffset, bool (*aFreeBuffer)(const DataBuffer & aBuffer) = myFreeBuffer) :DataBuffer(aBuffer + aOffset, aSize, aFreeBuffer) ,Offset(aOffset) ,BaseBuffer(aBuffer) @@ -89,7 +87,7 @@ class MATROSKA_DLL_API SimpleDataBuffer : public DataBuffer { protected: std::uint32_t Offset; - binary * BaseBuffer; + libebml::binary * BaseBuffer; static bool myFreeBuffer(const DataBuffer & aBuffer) { @@ -107,8 +105,8 @@ class MATROSKA_DLL_API SimpleDataBuffer : public DataBuffer { * / class MATROSKA_DLL_API NotSoSimpleDataBuffer : public SimpleDataBuffer { public: - NotSoSimpleDataBuffer(binary * aBuffer, std::uint32_t aSize, std::uint32_t aOffset) - :SimpleDataBuffer(new binary[aSize - aOffset], aSize, 0) + NotSoSimpleDataBuffer(libebml::binary * aBuffer, std::uint32_t aSize, std::uint32_t aOffset) + :SimpleDataBuffer(new libebml::binary[aSize - aOffset], aSize, 0) { memcpy(BaseBuffer, aBuffer + aOffset, aSize - aOffset); } @@ -179,10 +177,10 @@ DECLARE_MKX_MASTER(KaxBlockGroup) const KaxTrackEntry * ParentTrack{nullptr}; }; -class MATROSKA_DLL_API KaxInternalBlock : public EbmlBinary { +class MATROSKA_DLL_API KaxInternalBlock : public libebml::EbmlBinary { public: - KaxInternalBlock(const EbmlCallbacks & classInfo, bool bSimple) - :EbmlBinary(classInfo), + KaxInternalBlock(const libebml::EbmlCallbacks & classInfo, bool bSimple) + :libebml::EbmlBinary(classInfo), bIsSimple(bSimple) {} KaxInternalBlock(const KaxInternalBlock & ElementToClone); @@ -198,14 +196,14 @@ 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(ShouldWrite writeFilter = WriteSkipDefault, bool bForceRender = false) override; - filepos_t ReadData(IOCallback & input, ScopeMode ReadFully = SCOPE_ALL_DATA) override; + libebml::filepos_t UpdateSize(ShouldWrite writeFilter = WriteSkipDefault, bool bForceRender = false) override; + libebml::filepos_t ReadData(libebml::IOCallback & input, libebml::ScopeMode ReadFully = libebml::SCOPE_ALL_DATA) override; /*! \brief Only read the head of the Block (not internal data) \note convenient when you are parsing the file quickly */ - std::uint64_t ReadInternalHead(IOCallback & input); + std::uint64_t ReadInternalHead(libebml::IOCallback & input); unsigned int NumberFrames() const { return SizeList.size();} DataBuffer & GetBuffer(unsigned int iIndex) {return *myBuffers[iIndex];} @@ -264,7 +262,7 @@ class MATROSKA_DLL_API KaxInternalBlock : public EbmlBinary { bool bIsKeyframe{true}; bool bIsDiscardable{false}; - filepos_t RenderData(IOCallback & output, bool bForceRender, ShouldWrite writeFilter = WriteSkipDefault) override; + libebml::filepos_t RenderData(libebml::IOCallback & output, bool bForceRender, ShouldWrite writeFilter = WriteSkipDefault) override; }; class MATROSKA_DLL_API KaxBlock : public KaxInternalBlock { @@ -334,18 +332,18 @@ 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(ShouldWrite writeFilter = WriteSkipDefault, bool bForceRender = false) override; + libebml::filepos_t UpdateSize(ShouldWrite writeFilter = WriteSkipDefault, bool bForceRender = false) override; void SetParent(const KaxCluster & aParentCluster) {ParentCluster = &aParentCluster;} - filepos_t RenderData(IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; + libebml::filepos_t RenderData(libebml::IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; - filepos_t ReadData(IOCallback & input, ScopeMode ReadFully = SCOPE_ALL_DATA) override; + libebml::filepos_t ReadData(libebml::IOCallback & input, libebml::ScopeMode ReadFully = libebml::SCOPE_ALL_DATA) override; protected: std::uint64_t Timecode; // temporary timecode of the first frame if there are more than one std::uint16_t TrackNumber; - binary DataBlock[5]; + libebml::binary DataBlock[5]; const KaxCluster * ParentCluster{nullptr}; }; diff --git a/matroska/KaxBlockData.h b/matroska/KaxBlockData.h index e4594741..fa6a6782 100644 --- a/matroska/KaxBlockData.h +++ b/matroska/KaxBlockData.h @@ -15,8 +15,6 @@ #include "matroska/KaxDefines.h" #include "matroska/KaxBlock.h" -using namespace libebml; - namespace libmatroska { /*! @@ -28,7 +26,7 @@ DECLARE_MKX_SINTEGER_CONS(KaxReferenceBlock) /*! \brief override this method to compute the timecode value */ - filepos_t UpdateSize(ShouldWrite writeFilter = WriteSkipDefault, bool bForceRender = false) override; + libebml::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 6e252518..72cb7a48 100644 --- a/matroska/KaxCluster.h +++ b/matroska/KaxCluster.h @@ -17,8 +17,6 @@ #include "matroska/KaxCues.h" #include "matroska/KaxDefines.h" -using namespace libebml; - namespace libmatroska { class KaxSegment; @@ -48,7 +46,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, ShouldWrite writeFilter = WriteSkipDefault); + libebml::filepos_t Render(libebml::IOCallback & output, KaxCues & CueToUpdate, ShouldWrite writeFilter = WriteSkipDefault); /*! \return the global timecode of this Cluster diff --git a/matroska/KaxContexts.h b/matroska/KaxContexts.h index ff1ca912..46ab4e73 100644 --- a/matroska/KaxContexts.h +++ b/matroska/KaxContexts.h @@ -11,48 +11,46 @@ #include "matroska/KaxTypes.h" #include -using namespace libebml; - namespace libmatroska { -extern const EbmlSemanticContext MATROSKA_DLL_API Context_KaxMatroska; -extern const EbmlSemanticContext MATROSKA_DLL_API Context_KaxSegment; -extern const EbmlSemanticContext MATROSKA_DLL_API Context_KaxAttachments; -extern const EbmlSemanticContext MATROSKA_DLL_API Context_KaxAttached; -extern const EbmlSemanticContext MATROSKA_DLL_API Context_KaxFileDescription; -extern const EbmlSemanticContext MATROSKA_DLL_API Context_KaxFileName; -extern const EbmlSemanticContext MATROSKA_DLL_API Context_KaxMimeType; -extern const EbmlSemanticContext MATROSKA_DLL_API Context_KaxFileData; -extern const EbmlSemanticContext MATROSKA_DLL_API Context_KaxChapters; -extern const EbmlSemanticContext MATROSKA_DLL_API Context_KaxCluster; -extern const EbmlSemanticContext MATROSKA_DLL_API Context_KaxTags; -extern const EbmlSemanticContext MATROSKA_DLL_API Context_KaxTag; -extern const EbmlSemanticContext MATROSKA_DLL_API Context_KaxBlockGroup; -extern const EbmlSemanticContext MATROSKA_DLL_API Context_KaxReferencePriority; -extern const EbmlSemanticContext MATROSKA_DLL_API Context_KaxReferenceBlock; -extern const EbmlSemanticContext MATROSKA_DLL_API Context_KaxReferenceVirtual; -extern const EbmlSemanticContext MATROSKA_DLL_API Context_KaxCues; -extern const EbmlSemanticContext MATROSKA_DLL_API Context_KaxInfo; -extern const EbmlSemanticContext MATROSKA_DLL_API Context_KaxSeekHead; -extern const EbmlSemanticContext MATROSKA_DLL_API Context_KaxTracks; -extern const EbmlSemanticContext MATROSKA_DLL_API Context_KaxTrackEntry; -extern const EbmlSemanticContext MATROSKA_DLL_API Context_KaxTrackNumber; -extern const EbmlSemanticContext MATROSKA_DLL_API Context_KaxTrackType; -extern const EbmlSemanticContext MATROSKA_DLL_API Context_KaxTrackFlagEnabled; -extern const EbmlSemanticContext MATROSKA_DLL_API Context_KaxTrackFlagDefault; -extern const EbmlSemanticContext MATROSKA_DLL_API Context_KaxTrackFlagLacing; -extern const EbmlSemanticContext MATROSKA_DLL_API Context_KaxTrackName; -extern const EbmlSemanticContext MATROSKA_DLL_API Context_KaxTrackLanguage; -extern const EbmlSemanticContext MATROSKA_DLL_API Context_KaxCodecID; -extern const EbmlSemanticContext MATROSKA_DLL_API Context_KaxCodecPrivate; -extern const EbmlSemanticContext MATROSKA_DLL_API Context_KaxCodecName; -extern const EbmlSemanticContext MATROSKA_DLL_API Context_KaxCodecSettings; -extern const EbmlSemanticContext MATROSKA_DLL_API Context_KaxCodecInfoURL; -extern const EbmlSemanticContext MATROSKA_DLL_API Context_KaxCodecDownloadURL; -extern const EbmlSemanticContext MATROSKA_DLL_API Context_KaxCodecDecodeAll; -extern const EbmlSemanticContext MATROSKA_DLL_API Context_KaxTrackOverlay; - -extern MATROSKA_DLL_API const EbmlSemanticContext & GetKaxGlobal_Context(); +extern const libebml::EbmlSemanticContext MATROSKA_DLL_API Context_KaxMatroska; +extern const libebml::EbmlSemanticContext MATROSKA_DLL_API Context_KaxSegment; +extern const libebml::EbmlSemanticContext MATROSKA_DLL_API Context_KaxAttachments; +extern const libebml::EbmlSemanticContext MATROSKA_DLL_API Context_KaxAttached; +extern const libebml::EbmlSemanticContext MATROSKA_DLL_API Context_KaxFileDescription; +extern const libebml::EbmlSemanticContext MATROSKA_DLL_API Context_KaxFileName; +extern const libebml::EbmlSemanticContext MATROSKA_DLL_API Context_KaxMimeType; +extern const libebml::EbmlSemanticContext MATROSKA_DLL_API Context_KaxFileData; +extern const libebml::EbmlSemanticContext MATROSKA_DLL_API Context_KaxChapters; +extern const libebml::EbmlSemanticContext MATROSKA_DLL_API Context_KaxCluster; +extern const libebml::EbmlSemanticContext MATROSKA_DLL_API Context_KaxTags; +extern const libebml::EbmlSemanticContext MATROSKA_DLL_API Context_KaxTag; +extern const libebml::EbmlSemanticContext MATROSKA_DLL_API Context_KaxBlockGroup; +extern const libebml::EbmlSemanticContext MATROSKA_DLL_API Context_KaxReferencePriority; +extern const libebml::EbmlSemanticContext MATROSKA_DLL_API Context_KaxReferenceBlock; +extern const libebml::EbmlSemanticContext MATROSKA_DLL_API Context_KaxReferenceVirtual; +extern const libebml::EbmlSemanticContext MATROSKA_DLL_API Context_KaxCues; +extern const libebml::EbmlSemanticContext MATROSKA_DLL_API Context_KaxInfo; +extern const libebml::EbmlSemanticContext MATROSKA_DLL_API Context_KaxSeekHead; +extern const libebml::EbmlSemanticContext MATROSKA_DLL_API Context_KaxTracks; +extern const libebml::EbmlSemanticContext MATROSKA_DLL_API Context_KaxTrackEntry; +extern const libebml::EbmlSemanticContext MATROSKA_DLL_API Context_KaxTrackNumber; +extern const libebml::EbmlSemanticContext MATROSKA_DLL_API Context_KaxTrackType; +extern const libebml::EbmlSemanticContext MATROSKA_DLL_API Context_KaxTrackFlagEnabled; +extern const libebml::EbmlSemanticContext MATROSKA_DLL_API Context_KaxTrackFlagDefault; +extern const libebml::EbmlSemanticContext MATROSKA_DLL_API Context_KaxTrackFlagLacing; +extern const libebml::EbmlSemanticContext MATROSKA_DLL_API Context_KaxTrackName; +extern const libebml::EbmlSemanticContext MATROSKA_DLL_API Context_KaxTrackLanguage; +extern const libebml::EbmlSemanticContext MATROSKA_DLL_API Context_KaxCodecID; +extern const libebml::EbmlSemanticContext MATROSKA_DLL_API Context_KaxCodecPrivate; +extern const libebml::EbmlSemanticContext MATROSKA_DLL_API Context_KaxCodecName; +extern const libebml::EbmlSemanticContext MATROSKA_DLL_API Context_KaxCodecSettings; +extern const libebml::EbmlSemanticContext MATROSKA_DLL_API Context_KaxCodecInfoURL; +extern const libebml::EbmlSemanticContext MATROSKA_DLL_API Context_KaxCodecDownloadURL; +extern const libebml::EbmlSemanticContext MATROSKA_DLL_API Context_KaxCodecDecodeAll; +extern const libebml::EbmlSemanticContext MATROSKA_DLL_API Context_KaxTrackOverlay; + +extern MATROSKA_DLL_API const libebml::EbmlSemanticContext & GetKaxGlobal_Context(); } // namespace libmatroska diff --git a/matroska/KaxCues.h b/matroska/KaxCues.h index 6dcfb952..3519b067 100644 --- a/matroska/KaxCues.h +++ b/matroska/KaxCues.h @@ -14,8 +14,6 @@ #include #include "matroska/KaxBlock.h" -using namespace libebml; - namespace libmatroska { class KaxCuePoint; @@ -36,7 +34,7 @@ DECLARE_MKX_MASTER(KaxCues) /*! \brief override to sort by timecode/track */ - filepos_t Render(IOCallback & output, ShouldWrite writeFilter = WriteSkipDefault) { + libebml::filepos_t Render(libebml::IOCallback & output, ShouldWrite writeFilter = WriteSkipDefault) { Sort(); return EbmlMaster::Render(output, writeFilter); } diff --git a/matroska/KaxCuesData.h b/matroska/KaxCuesData.h index b364d314..4fb35451 100644 --- a/matroska/KaxCuesData.h +++ b/matroska/KaxCuesData.h @@ -13,8 +13,6 @@ #include #include "matroska/KaxDefines.h" -using namespace libebml; - namespace libmatroska { class KaxBlockGroup; diff --git a/matroska/KaxDefines.h b/matroska/KaxDefines.h index ed813c5c..d6337a5f 100644 --- a/matroska/KaxDefines.h +++ b/matroska/KaxDefines.h @@ -37,67 +37,67 @@ #define DEFINE_MKX_SINTEGER_CONS(a,b,c,d,e) DEFINE_xxx_CLASS_CONS(a,b,c,d,e,GetKaxGlobal_Context) #define DECLARE_MKX_MASTER(x) \ -class MATROSKA_DLL_API x : public EbmlMaster { \ +class MATROSKA_DLL_API x : public libebml::EbmlMaster { \ public: x(); \ x(const x & ElementToClone) :EbmlMaster(ElementToClone) {} \ EBML_CONCRETE_CLASS(x) #define DECLARE_MKX_MASTER_CONS(x) \ -class MATROSKA_DLL_API x : public EbmlMaster { \ +class MATROSKA_DLL_API x : public libebml::EbmlMaster { \ public: x(); \ x(const x & ElementToClone); \ EBML_CONCRETE_CLASS(x) #define DECLARE_MKX_BINARY(x) \ - class MATROSKA_DLL_API x : public EbmlBinary { \ + class MATROSKA_DLL_API x : public libebml::EbmlBinary { \ public: x(); \ x(const x & ElementToClone) :EbmlBinary(ElementToClone) {} \ EBML_CONCRETE_CLASS(x) #define DECLARE_MKX_BINARY_CONS(x) \ - class MATROSKA_DLL_API x : public EbmlBinary { \ + class MATROSKA_DLL_API x : public libebml::EbmlBinary { \ public: x(); \ x(const x & ElementToClone); \ EBML_CONCRETE_CLASS(x) #define DECLARE_MKX_UNISTRING(x) \ - class MATROSKA_DLL_API x : public EbmlUnicodeString { \ + class MATROSKA_DLL_API x : public libebml::EbmlUnicodeString { \ public: x(); \ x(const x & ElementToClone) :EbmlUnicodeString(ElementToClone) {} \ EBML_CONCRETE_CLASS(x) #define DECLARE_MKX_STRING(x) \ - class MATROSKA_DLL_API x : public EbmlString { \ + class MATROSKA_DLL_API x : public libebml::EbmlString { \ public: x(); \ x(const x & ElementToClone) :EbmlString(ElementToClone) {} \ EBML_CONCRETE_CLASS(x) #define DECLARE_MKX_UINTEGER(x) \ - class MATROSKA_DLL_API x : public EbmlUInteger { \ + class MATROSKA_DLL_API x : public libebml::EbmlUInteger { \ public: x(); \ x(const x & ElementToClone) :EbmlUInteger(ElementToClone) {} \ EBML_CONCRETE_CLASS(x) #define DECLARE_MKX_SINTEGER_CONS(x) \ - class MATROSKA_DLL_API x : public EbmlSInteger { \ + class MATROSKA_DLL_API x : public libebml::EbmlSInteger { \ public: x(); \ x(const x & ElementToClone); \ EBML_CONCRETE_CLASS(x) #define DECLARE_MKX_SINTEGER(x) \ - class MATROSKA_DLL_API x : public EbmlSInteger { \ + class MATROSKA_DLL_API x : public libebml::EbmlSInteger { \ public: x(); \ x(const x & ElementToClone) :EbmlSInteger(ElementToClone) {} \ EBML_CONCRETE_CLASS(x) #define DECLARE_MKX_DATE(x) \ - class MATROSKA_DLL_API x : public EbmlDate { \ + class MATROSKA_DLL_API x : public libebml::EbmlDate { \ public: x(); \ x(const x & ElementToClone) :EbmlDate(ElementToClone) {} \ EBML_CONCRETE_CLASS(x) #define DECLARE_MKX_FLOAT(x) \ - class MATROSKA_DLL_API x : public EbmlFloat { \ + class MATROSKA_DLL_API x : public libebml::EbmlFloat { \ public: x(); \ x(const x & ElementToClone) :EbmlFloat(ElementToClone) {} \ EBML_CONCRETE_CLASS(x) diff --git a/matroska/KaxSeekHead.h b/matroska/KaxSeekHead.h index 73c38e68..e9bff792 100644 --- a/matroska/KaxSeekHead.h +++ b/matroska/KaxSeekHead.h @@ -14,8 +14,6 @@ #include #include "matroska/KaxDefines.h" -using namespace libebml; - namespace libmatroska { class KaxSegment; @@ -23,7 +21,7 @@ class KaxSegment; DECLARE_MKX_MASTER(KaxSeek) public: std::int64_t Location() const; - bool IsEbmlId(const EbmlId & aId) const; + bool IsEbmlId(const libebml::EbmlId & aId) const; bool IsEbmlId(const KaxSeek & aPoint) const; }; @@ -35,7 +33,7 @@ DECLARE_MKX_MASTER(KaxSeekHead) */ KaxSeek * IndexThis(const EbmlElement & aElt, const KaxSegment & ParentSegment); - KaxSeek * FindFirstOf(const EbmlCallbacks & Callbacks) const; + KaxSeek * FindFirstOf(const libebml::EbmlCallbacks & Callbacks) const; KaxSeek * FindNextOf(const KaxSeek &aPrev) const; }; diff --git a/matroska/KaxSegment.h b/matroska/KaxSegment.h index f636b9b9..8b857751 100644 --- a/matroska/KaxSegment.h +++ b/matroska/KaxSegment.h @@ -12,8 +12,6 @@ #include #include "matroska/KaxDefines.h" -using namespace libebml; - namespace libmatroska { DECLARE_MKX_MASTER_CONS(KaxSegment) diff --git a/matroska/KaxSemantic.h b/matroska/KaxSemantic.h index 1c0d532a..f4826288 100644 --- a/matroska/KaxSemantic.h +++ b/matroska/KaxSemantic.h @@ -21,8 +21,6 @@ #include #include "matroska/KaxDefines.h" -using namespace libebml; - namespace libmatroska { DECLARE_MKX_BINARY (KaxSeekID) public: @@ -99,12 +97,12 @@ DECLARE_MKX_UINTEGER(KaxClusterTimecode) DECLARE_MKX_MASTER(KaxClusterSilentTracks) public: - filepos_t RenderData(IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; + libebml::filepos_t RenderData(libebml::IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; }; DECLARE_MKX_UINTEGER(KaxClusterSilentTrackNumber) public: - filepos_t RenderData(IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; + libebml::filepos_t RenderData(libebml::IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; }; DECLARE_MKX_UINTEGER(KaxClusterPosition) @@ -133,7 +131,7 @@ DECLARE_MKX_UINTEGER(KaxReferencePriority) DECLARE_MKX_SINTEGER(KaxReferenceVirtual) public: - filepos_t RenderData(IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; + libebml::filepos_t RenderData(libebml::IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; }; DECLARE_MKX_BINARY (KaxCodecState) @@ -144,57 +142,57 @@ DECLARE_MKX_SINTEGER(KaxDiscardPadding) DECLARE_MKX_MASTER(KaxSlices) public: - filepos_t RenderData(IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; + libebml::filepos_t RenderData(libebml::IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; }; DECLARE_MKX_MASTER(KaxTimeSlice) public: - filepos_t RenderData(IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; + libebml::filepos_t RenderData(libebml::IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; }; DECLARE_MKX_UINTEGER(KaxSliceLaceNumber) public: - filepos_t RenderData(IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; + libebml::filepos_t RenderData(libebml::IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; }; DECLARE_MKX_UINTEGER(KaxSliceFrameNumber) public: - filepos_t RenderData(IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; + libebml::filepos_t RenderData(libebml::IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; }; DECLARE_MKX_UINTEGER(KaxSliceBlockAddID) public: - filepos_t RenderData(IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; + libebml::filepos_t RenderData(libebml::IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; }; DECLARE_MKX_UINTEGER(KaxSliceDelay) public: - filepos_t RenderData(IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; + libebml::filepos_t RenderData(libebml::IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; }; DECLARE_MKX_UINTEGER(KaxSliceDuration) public: - filepos_t RenderData(IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; + libebml::filepos_t RenderData(libebml::IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; }; DECLARE_MKX_MASTER(KaxReferenceFrame) public: - filepos_t RenderData(IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; + libebml::filepos_t RenderData(libebml::IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; }; DECLARE_MKX_UINTEGER(KaxReferenceOffset) public: - filepos_t RenderData(IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; + libebml::filepos_t RenderData(libebml::IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; }; DECLARE_MKX_UINTEGER(KaxReferenceTimeCode) public: - filepos_t RenderData(IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; + libebml::filepos_t RenderData(libebml::IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; }; DECLARE_MKX_BINARY (KaxEncryptedBlock) public: - filepos_t RenderData(IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; + libebml::filepos_t RenderData(libebml::IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; }; DECLARE_MKX_MASTER(KaxTracks) @@ -238,12 +236,12 @@ DECLARE_MKX_UINTEGER(KaxTrackFlagLacing) DECLARE_MKX_UINTEGER(KaxTrackMinCache) public: - filepos_t RenderData(IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; + libebml::filepos_t RenderData(libebml::IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; }; DECLARE_MKX_UINTEGER(KaxTrackMaxCache) public: - filepos_t RenderData(IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; + libebml::filepos_t RenderData(libebml::IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; }; DECLARE_MKX_UINTEGER(KaxTrackDefaultDuration) @@ -254,12 +252,12 @@ DECLARE_MKX_UINTEGER(KaxTrackDefaultDecodedFieldDuration) DECLARE_MKX_FLOAT(KaxTrackTimecodeScale) public: - filepos_t RenderData(IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; + libebml::filepos_t RenderData(libebml::IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; }; DECLARE_MKX_SINTEGER(KaxTrackOffset) public: - filepos_t RenderData(IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; + libebml::filepos_t RenderData(libebml::IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; }; DECLARE_MKX_UINTEGER(KaxMaxBlockAdditionID) @@ -300,27 +298,27 @@ DECLARE_MKX_UNISTRING(KaxCodecName) DECLARE_MKX_UINTEGER(KaxTrackAttachmentLink) public: - filepos_t RenderData(IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; + libebml::filepos_t RenderData(libebml::IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; }; DECLARE_MKX_UNISTRING(KaxCodecSettings) public: - filepos_t RenderData(IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; + libebml::filepos_t RenderData(libebml::IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; }; DECLARE_MKX_STRING(KaxCodecInfoURL) public: - filepos_t RenderData(IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; + libebml::filepos_t RenderData(libebml::IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; }; DECLARE_MKX_STRING(KaxCodecDownloadURL) public: - filepos_t RenderData(IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; + libebml::filepos_t RenderData(libebml::IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; }; DECLARE_MKX_UINTEGER(KaxCodecDecodeAll) public: - filepos_t RenderData(IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; + libebml::filepos_t RenderData(libebml::IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; }; DECLARE_MKX_UINTEGER(KaxTrackOverlay) @@ -361,7 +359,7 @@ DECLARE_MKX_UINTEGER(KaxVideoAlphaMode) DECLARE_MKX_UINTEGER(KaxOldStereoMode) public: - filepos_t RenderData(IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; + libebml::filepos_t RenderData(libebml::IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; }; DECLARE_MKX_UINTEGER(KaxVideoPixelWidth) @@ -393,7 +391,7 @@ DECLARE_MKX_UINTEGER(KaxVideoDisplayUnit) DECLARE_MKX_UINTEGER(KaxVideoAspectRatio) public: - filepos_t RenderData(IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; + libebml::filepos_t RenderData(libebml::IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; }; DECLARE_MKX_BINARY (KaxVideoColourSpace) @@ -403,12 +401,12 @@ DECLARE_MKX_BINARY (KaxVideoColourSpace) DECLARE_MKX_FLOAT(KaxVideoGamma) public: - filepos_t RenderData(IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; + libebml::filepos_t RenderData(libebml::IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; }; DECLARE_MKX_FLOAT(KaxVideoFrameRate) public: - filepos_t RenderData(IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; + libebml::filepos_t RenderData(libebml::IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; }; DECLARE_MKX_MASTER(KaxVideoColour) @@ -518,7 +516,7 @@ DECLARE_MKX_UINTEGER(KaxAudioChannels) DECLARE_MKX_BINARY (KaxAudioPosition) public: - filepos_t RenderData(IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; + libebml::filepos_t RenderData(libebml::IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; }; DECLARE_MKX_UINTEGER(KaxAudioBitDepth) @@ -550,28 +548,28 @@ DECLARE_MKX_UINTEGER(KaxTrackJoinUID) DECLARE_MKX_UINTEGER(KaxTrickTrackUID) public: - filepos_t RenderData(IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; + libebml::filepos_t RenderData(libebml::IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; }; DECLARE_MKX_BINARY (KaxTrickTrackSegmentUID) public: - filepos_t RenderData(IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; + libebml::filepos_t RenderData(libebml::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, ShouldWrite writeFilter) override; + libebml::filepos_t RenderData(libebml::IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; }; DECLARE_MKX_UINTEGER(KaxTrickMasterTrackUID) public: - filepos_t RenderData(IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; + libebml::filepos_t RenderData(libebml::IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; }; DECLARE_MKX_BINARY (KaxTrickMasterTrackSegmentUID) public: - filepos_t RenderData(IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; + libebml::filepos_t RenderData(libebml::IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; bool ValidateSize() const override {return IsFiniteSize() && GetSize() == 16;} }; @@ -616,22 +614,22 @@ DECLARE_MKX_UINTEGER(KaxAESSettingsCipherMode) DECLARE_MKX_BINARY (KaxContentSignature) public: - filepos_t RenderData(IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; + libebml::filepos_t RenderData(libebml::IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; }; DECLARE_MKX_BINARY (KaxContentSigKeyID) public: - filepos_t RenderData(IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; + libebml::filepos_t RenderData(libebml::IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; }; DECLARE_MKX_UINTEGER(KaxContentSigAlgo) public: - filepos_t RenderData(IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; + libebml::filepos_t RenderData(libebml::IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; }; DECLARE_MKX_UINTEGER(KaxContentSigHashAlgo) public: - filepos_t RenderData(IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; + libebml::filepos_t RenderData(libebml::IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; }; DECLARE_MKX_UINTEGER(KaxCueTime) @@ -660,17 +658,17 @@ DECLARE_MKX_UINTEGER(KaxCueRefTime) DECLARE_MKX_UINTEGER(KaxCueRefCluster) public: - filepos_t RenderData(IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; + libebml::filepos_t RenderData(libebml::IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; }; DECLARE_MKX_UINTEGER(KaxCueRefNumber) public: - filepos_t RenderData(IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; + libebml::filepos_t RenderData(libebml::IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; }; DECLARE_MKX_UINTEGER(KaxCueRefCodecState) public: - filepos_t RenderData(IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; + libebml::filepos_t RenderData(libebml::IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; }; DECLARE_MKX_MASTER(KaxAttachments) @@ -696,17 +694,17 @@ DECLARE_MKX_UINTEGER(KaxFileUID) DECLARE_MKX_BINARY (KaxFileReferral) public: - filepos_t RenderData(IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; + libebml::filepos_t RenderData(libebml::IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; }; DECLARE_MKX_UINTEGER(KaxFileUsedStartTime) public: - filepos_t RenderData(IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; + libebml::filepos_t RenderData(libebml::IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; }; DECLARE_MKX_UINTEGER(KaxFileUsedEndTime) public: - filepos_t RenderData(IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; + libebml::filepos_t RenderData(libebml::IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; }; DECLARE_MKX_MASTER(KaxChapters) @@ -854,7 +852,7 @@ DECLARE_MKX_UINTEGER(KaxTagDefault) DECLARE_MKX_UINTEGER(KaxTagDefaultBogus) public: - filepos_t RenderData(IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; + libebml::filepos_t RenderData(libebml::IOCallback & output, bool bForceRender, ShouldWrite writeFilter) override; }; DECLARE_MKX_UNISTRING(KaxTagString) diff --git a/matroska/KaxTracks.h b/matroska/KaxTracks.h index 17e8cddb..94a5298a 100644 --- a/matroska/KaxTracks.h +++ b/matroska/KaxTracks.h @@ -14,13 +14,11 @@ #include "matroska/KaxDefines.h" #include "matroska/KaxSemantic.h" -using namespace libebml; - namespace libmatroska { DECLARE_MKX_MASTER(KaxTrackEntry) public: - EbmlUInteger & TrackNumber() const { return *(static_cast(FindElt(EBML_INFO(KaxTrackNumber)))); } + libebml::EbmlUInteger & TrackNumber() const { return *(static_cast(FindElt(EBML_INFO(KaxTrackNumber)))); } void EnableLacing(bool bEnable = true); diff --git a/src/FileKax.cpp b/src/FileKax.cpp index be4e2b1f..ab22726b 100644 --- a/src/FileKax.cpp +++ b/src/FileKax.cpp @@ -15,6 +15,8 @@ //#include "Frame.h" //#include "Version.h" +using namespace libebml; + namespace libmatroska { //typedef Track *TrackID; diff --git a/src/KaxBlock.cpp b/src/KaxBlock.cpp index f360cf00..26edb9fc 100644 --- a/src/KaxBlock.cpp +++ b/src/KaxBlock.cpp @@ -19,6 +19,8 @@ #include "matroska/KaxCluster.h" #include "matroska/KaxDefines.h" +using namespace libebml; + namespace libmatroska { DataBuffer * DataBuffer::Clone() diff --git a/src/KaxCluster.cpp b/src/KaxCluster.cpp index a442cc5f..0d9ea442 100644 --- a/src/KaxCluster.cpp +++ b/src/KaxCluster.cpp @@ -11,6 +11,8 @@ #include "matroska/KaxSegment.h" #include "matroska/KaxDefines.h" +using namespace libebml; + // sub elements namespace libmatroska { diff --git a/src/KaxCues.cpp b/src/KaxCues.cpp index 3bcfe5a5..b57d2fb1 100644 --- a/src/KaxCues.cpp +++ b/src/KaxCues.cpp @@ -14,6 +14,8 @@ #include "matroska/KaxDefines.h" #include "matroska/KaxSemantic.h" +using namespace libebml; + // sub elements namespace libmatroska { diff --git a/src/KaxCuesData.cpp b/src/KaxCuesData.cpp index c5e93872..93f637bf 100644 --- a/src/KaxCuesData.cpp +++ b/src/KaxCuesData.cpp @@ -16,6 +16,8 @@ #include "matroska/KaxDefines.h" #include "matroska/KaxSemantic.h" +using namespace libebml; + namespace libmatroska { /*! diff --git a/src/KaxSegment.cpp b/src/KaxSegment.cpp index 54e61eb6..5fa4faad 100644 --- a/src/KaxSegment.cpp +++ b/src/KaxSegment.cpp @@ -16,6 +16,8 @@ #include "matroska/KaxContexts.h" #include "matroska/KaxDefines.h" +using namespace libebml; + namespace libmatroska { KaxSegment::KaxSegment() diff --git a/src/KaxSemantic.cpp b/src/KaxSemantic.cpp index be94fceb..32511ac3 100644 --- a/src/KaxSemantic.cpp +++ b/src/KaxSemantic.cpp @@ -16,6 +16,8 @@ #include "matroska/KaxBlockData.h" #include "matroska/KaxCuesData.h" +using namespace libebml; + namespace libmatroska { DEFINE_START_SEMANTIC(KaxSegment) diff --git a/src/KaxTracks.cpp b/src/KaxTracks.cpp index c7c71fae..014f06f3 100644 --- a/src/KaxTracks.cpp +++ b/src/KaxTracks.cpp @@ -11,6 +11,8 @@ #include "matroska/KaxContexts.h" #include "matroska/KaxDefines.h" +using namespace libebml; + namespace libmatroska { KaxTrackEntry::KaxTrackEntry() diff --git a/test/ebml/test00.cpp b/test/ebml/test00.cpp index ef81d000..1bf530ab 100644 --- a/test/ebml/test00.cpp +++ b/test/ebml/test00.cpp @@ -23,6 +23,7 @@ #include #include +using namespace libebml; using namespace libmatroska; const char RW_FILENAME[] = "test.kax"; diff --git a/test/mux/test6.cpp b/test/mux/test6.cpp index 5a31fc0f..c48943f9 100644 --- a/test/mux/test6.cpp +++ b/test/mux/test6.cpp @@ -25,6 +25,7 @@ #include +using namespace libebml; using namespace libmatroska; using namespace std; diff --git a/test/mux/test8.cpp b/test/mux/test8.cpp index fa6c1216..5131d8ce 100644 --- a/test/mux/test8.cpp +++ b/test/mux/test8.cpp @@ -28,6 +28,7 @@ #include #include +using namespace libebml; using namespace libmatroska; using namespace std;