]> granicus.if.org Git - libmatroska/commitdiff
use the new accessors internally
authorSteve Lhomme <slhomme@matroska.org>
Mon, 15 Mar 2010 16:03:51 +0000 (16:03 +0000)
committerSteve Lhomme <slhomme@matroska.org>
Mon, 15 Mar 2010 16:03:51 +0000 (16:03 +0000)
+ make the new accessors inline

git-svn-id: https://matroska.svn.sourceforge.net/svnroot/matroska/trunk/libmatroska@13 a6f86f6d-0131-4f8e-9e7b-e335508773d5

matroska/KaxBlock.h
matroska/KaxInfoData.h
matroska/KaxSeekHead.h
matroska/KaxTag.h
matroska/KaxTrackVideo.h
src/KaxBlock.cpp
src/KaxBlockData.cpp
src/KaxCluster.cpp
src/KaxCuesData.cpp
src/KaxSeekHead.cpp
src/KaxSegment.cpp

index 1ca08e386ec5707c6f6bf0ee758f2cb0d9e10227..f114992c60b846534ee03ca1385a37d1ed3b5daa 100644 (file)
@@ -365,7 +365,7 @@ class MATROSKA_DLL_API KaxBlockDuration : public EbmlUInteger {
 #if MATROSKA_VERSION >= 2
 class MATROSKA_DLL_API KaxBlockVirtual : public EbmlBinary {
        public:
-               KaxBlockVirtual() :ParentCluster(NULL) {Data = DataBlock; Size = countof(DataBlock);}
+               KaxBlockVirtual() :ParentCluster(NULL) {SetBuffer(DataBlock,sizeof(DataBlock)); SetValueIsSet(false);}
                KaxBlockVirtual(const KaxBlockVirtual & ElementToClone);
                static EbmlElement & Create() {return *(new KaxBlockVirtual);}
                const EbmlCallbacks & Generic() const {return ClassInfos;}
index ee185a7867b7a02658ac72e95670bff54e00b05f..5325c1a5ee8db7b860747fcb02e874d50254a702 100644 (file)
@@ -54,7 +54,7 @@ class MATROSKA_DLL_API KaxSegmentUID : public EbmlBinary {
                KaxSegmentUID() {}
                KaxSegmentUID(const KaxSegmentUID & ElementToClone) :EbmlBinary(ElementToClone){}
                static EbmlElement & Create() {return *(new KaxSegmentUID);}
-               bool ValidateSize() const { return (Size == 16);}
+               bool ValidateSize() const { return (GetSize() == 16);}
                const EbmlCallbacks & Generic() const {return ClassInfos;}
                static const EbmlCallbacks ClassInfos;
                operator const EbmlId &() const {return ClassInfos.GlobalId;}
@@ -77,7 +77,7 @@ class MATROSKA_DLL_API KaxPrevUID : public KaxSegmentUID {
                KaxPrevUID() {}
                KaxPrevUID(const KaxPrevUID & ElementToClone) :KaxSegmentUID(ElementToClone){}
                static EbmlElement & Create() {return *(new KaxPrevUID);}
-               bool ValidateSize() const { return (Size == 16);}
+               bool ValidateSize() const { return (GetSize() == 16);}
                const EbmlCallbacks & Generic() const {return ClassInfos;}
                static const EbmlCallbacks ClassInfos;
                operator const EbmlId &() const {return ClassInfos.GlobalId;}
@@ -100,7 +100,7 @@ class MATROSKA_DLL_API KaxNextUID : public KaxSegmentUID {
                KaxNextUID() {}
                KaxNextUID(const KaxNextUID & ElementToClone) :KaxSegmentUID(ElementToClone){}
                static EbmlElement & Create() {return *(new KaxNextUID);}
-               bool ValidateSize() const { return (Size == 16);}
+               bool ValidateSize() const { return (GetSize() == 16);}
                const EbmlCallbacks & Generic() const {return ClassInfos;}
                static const EbmlCallbacks ClassInfos;
                operator const EbmlId &() const {return ClassInfos.GlobalId;}
@@ -123,7 +123,7 @@ class MATROSKA_DLL_API KaxSegmentFamily : public EbmlBinary {
                KaxSegmentFamily() {}
                KaxSegmentFamily(const KaxSegmentFamily & ElementToClone) :EbmlBinary(ElementToClone){}
                static EbmlElement & Create() {return *(new KaxSegmentFamily);}
-               bool ValidateSize() const { return (Size == 16);}
+               bool ValidateSize() const { return (GetSize() == 16);}
                const EbmlCallbacks & Generic() const {return ClassInfos;}
                static const EbmlCallbacks ClassInfos;
                operator const EbmlId &() const {return ClassInfos.GlobalId;}
index 1b269fc254fa8217fd67c8f7cd4d5b2fa5f7d83b..d3c2b4f874dd5564817d92bebfe14648d73bc7ae 100644 (file)
@@ -90,7 +90,7 @@ class MATROSKA_DLL_API KaxSeekID : public EbmlBinary {
                const EbmlCallbacks & Generic() const {return ClassInfos;}
                static const EbmlCallbacks ClassInfos;
                operator const EbmlId &() const {return ClassInfos.GlobalId;}
-               bool ValidateSize() const {return Size <= 4;}
+               bool ValidateSize() const {return GetSize() <= 4;}
                EbmlElement * Clone() const {return new KaxSeekID(*this);}
 };
 
index 8bf132521debe864683329f24fc6725e6a779853..98e64eb96f201e49a825049ec72e962a16ba4e52 100644 (file)
@@ -687,7 +687,7 @@ class MATROSKA_DLL_API KaxTagBinary : public EbmlBinary {
                KaxTagBinary() {}
                KaxTagBinary(const KaxTagBinary & ElementToClone) :EbmlBinary(ElementToClone){}
                static EbmlElement & Create() {return *(new KaxTagBinary);}
-               bool ValidateSize() const {return (Size >= 0);}
+               bool ValidateSize() const {return true;} // {return (GetSize() >= 0);}
                const EbmlCallbacks & Generic() const {return ClassInfos;}
                static const EbmlCallbacks ClassInfos;
                operator const EbmlId &() const {return ClassInfos.GlobalId;}
index 92c0cf30d3b6de5779182730b406c79c54e0a512..9a2678cd40d5ad3e2545d897b613af46fc7bbc75 100644 (file)
@@ -199,7 +199,7 @@ class MATROSKA_DLL_API KaxVideoColourSpace : public EbmlBinary {
                static EbmlElement & Create() {return *(new KaxVideoColourSpace);}
                const EbmlCallbacks & Generic() const {return ClassInfos;}
                static const EbmlCallbacks ClassInfos;
-               bool ValidateSize(void) const {return (Size == 4);}
+        bool ValidateSize(void) const {return (GetSize() == 4);}
                operator const EbmlId &() const {return ClassInfos.GlobalId;}
                EbmlElement * Clone() const {return new KaxVideoColourSpace(*this);}
 };
index 9b121ab40e63db4b5138d2553e8c56afdb6dbbb3..2e95c72e3a9fd68572090411aa61d85d145cef5d 100644 (file)
@@ -134,7 +134,7 @@ SimpleDataBuffer::SimpleDataBuffer(const SimpleDataBuffer & ToClone)
 
 bool KaxInternalBlock::ValidateSize() const
 {
-       return (Size >= 4); /// for the moment
+       return (GetSize() >= 4); /// for the moment
 }
 
 KaxInternalBlock::~KaxInternalBlock()
@@ -188,7 +188,7 @@ KaxBlockMore::KaxBlockMore()
 */
 bool KaxInternalBlock::AddFrame(const KaxTrackEntry & track, uint64 timecode, DataBuffer & buffer, LacingType lacing, bool invisible)
 {
-       bValueIsSet = true;
+       SetValueIsSet();
        if (myBuffers.size() == 0) {
                // first frame
                Timecode = timecode;
@@ -228,7 +228,7 @@ LacingType KaxInternalBlock::GetBestLacingType() const {
                        SameSize = false;
                XiphLacingSize += myBuffers[i]->Size() / 255 + 1;
        }
-       EbmlLacingSize += CodedSizeLength(myBuffers[0]->Size(), 0, bSizeIsFinite);
+       EbmlLacingSize += CodedSizeLength(myBuffers[0]->Size(), 0, IsFiniteSize());
        for (i = 1; i < (int)myBuffers.size() - 1; i++)
                EbmlLacingSize += CodedSizeLengthSigned(int64(myBuffers[i]->Size()) - int64(myBuffers[i - 1]->Size()), 0);
        if (SameSize)
@@ -242,20 +242,20 @@ LacingType KaxInternalBlock::GetBestLacingType() const {
 uint64 KaxInternalBlock::UpdateSize(bool bSaveDefault, bool bForceRender)
 {
        LacingType LacingHere;
-       assert(Data == NULL); // Data is not used for KaxInternalBlock
+       assert(GetData() == NULL); // Data is not used for KaxInternalBlock
        assert(TrackNumber < 0x4000); // no more allowed for the moment
        unsigned int i;
 
        // compute the final size of the data
        switch (myBuffers.size()) {
                case 0:
-                       Size = 0;
+                       SetSize_(0);
                        break;
                case 1:
-                       Size = 4 + myBuffers[0]->Size();
+                       SetSize_(4 + myBuffers[0]->Size());
                        break;
                default:
-                       Size = 4 + 1; // 1 for the lacing head
+                       SetSize_(4 + 1); // 1 for the lacing head
                        if (mLacing == LACING_AUTO)
                                LacingHere = GetBestLacingType();
                        else
@@ -264,33 +264,32 @@ uint64 KaxInternalBlock::UpdateSize(bool bSaveDefault, bool bForceRender)
                        {
                        case LACING_XIPH:
                                for (i=0; i<myBuffers.size()-1; i++) {
-                                       Size += myBuffers[i]->Size() + (myBuffers[i]->Size() / 0xFF + 1);
+                                       SetSize_(GetSize() + myBuffers[i]->Size() + (myBuffers[i]->Size() / 0xFF + 1));
                                }
                                break;
                        case LACING_EBML:
-                               Size += myBuffers[0]->Size() + CodedSizeLength(myBuffers[0]->Size(), 0, bSizeIsFinite);
+                               SetSize_(GetSize() + myBuffers[0]->Size() + CodedSizeLength(myBuffers[0]->Size(), 0, IsFiniteSize()));
                                for (i=1; i<myBuffers.size()-1; i++) {
-                                       Size += myBuffers[i]->Size() 
-                                               + CodedSizeLengthSigned(int64(myBuffers[i]->Size()) - int64(myBuffers[i-1]->Size()), 0);;
+                                       SetSize_(GetSize() + myBuffers[i]->Size() + CodedSizeLengthSigned(int64(myBuffers[i]->Size()) - int64(myBuffers[i-1]->Size()), 0));
                                }
                                break;
                        case LACING_FIXED:
                                for (i=0; i<myBuffers.size()-1; i++) {
-                                       Size += myBuffers[i]->Size();
+                                       SetSize_(GetSize() + myBuffers[i]->Size());
                                }
                                break;
                        default:
                                assert(0);
                        }
                        // Size of the last frame (not in lace)
-                       Size += myBuffers[i]->Size();
+                       SetSize_(GetSize() + myBuffers[i]->Size());
                        break;
        }
 
        if (TrackNumber >= 0x80)
-               Size++; // the size will be coded with one more octet
+               SetSize_(GetSize() + 1); // the size will be coded with one more octet
 
-       return Size;
+       return GetSize();
 }
 
 #if MATROSKA_VERSION >= 2
@@ -300,13 +299,14 @@ KaxBlockVirtual::KaxBlockVirtual(const KaxBlockVirtual & ElementToClone)
  ,TrackNumber(ElementToClone.TrackNumber)
  ,ParentCluster(ElementToClone.ParentCluster) ///< \todo not exactly
 {
-       Data = DataBlock;
+    SetBuffer(DataBlock,sizeof(DataBlock));
+    SetValueIsSet(false);
 }
 
 uint64 KaxBlockVirtual::UpdateSize(bool bSaveDefault, bool bForceRender)
 {
        assert(TrackNumber < 0x4000);
-       binary *cursor = Data;
+       binary *cursor = GetData();
        // fill data
        if (TrackNumber < 0x80) {
                *cursor++ = TrackNumber | 0x80; // set the first bit to 1 
@@ -323,7 +323,7 @@ uint64 KaxBlockVirtual::UpdateSize(bool bSaveDefault, bool bForceRender)
 
        *cursor++ = 0; // flags
 
-       return Size;
+       return GetSize();
 }
 #endif // MATROSKA_VERSION
 
@@ -341,15 +341,15 @@ uint32 KaxInternalBlock::RenderData(IOCallback & output, bool bForceRender, bool
                unsigned int i;
 
                if (myBuffers.size() == 1) {
-                       Size = 4;
+                       SetSize_(4);
                        mLacing = LACING_NONE;
                } else {
                        if (mLacing == LACING_NONE)
                                mLacing = LACING_EBML; // supposedly the best of all
-                       Size = 4 + 1; // 1 for the lacing head (number of laced elements)
+                       SetSize_(4 + 1); // 1 for the lacing head (number of laced elements)
                }
                if (TrackNumber > 0x80)
-                       Size++;
+                       SetSize_(GetSize() + 1);
 
                // write Block Head
                if (TrackNumber < 0x80) {
@@ -416,12 +416,12 @@ uint32 KaxInternalBlock::RenderData(IOCallback & output, bool bForceRender, bool
                                uint16 tmpSize = myBuffers[i]->Size();
                                while (tmpSize >= 0xFF) {
                                        output.writeFully(&tmpValue, 1);
-                                       Size++;
+                                       SetSize_(GetSize() + 1);
                                        tmpSize -= 0xFF;
                                }
                                tmpValue = binary(tmpSize);
                                output.writeFully(&tmpValue, 1);
-                               Size++;
+                               SetSize_(GetSize() + 1);
                        }
                        break;
                case LACING_EBML:
@@ -436,12 +436,12 @@ uint32 KaxInternalBlock::RenderData(IOCallback & output, bool bForceRender, bool
 
                                _Size = myBuffers[0]->Size();
 
-                               _CodedSize = CodedSizeLength(_Size, 0, bSizeIsFinite);
+                               _CodedSize = CodedSizeLength(_Size, 0, IsFiniteSize());
 
                                // first size in the lace is not a signed
                                CodedValueLength(_Size, _CodedSize, _FinalHead);
                                output.writeFully(_FinalHead, _CodedSize);
-                               Size += _CodedSize;
+                               SetSize_(GetSize() + _CodedSize);
 
                                // set the size of each member in the lace
                                for (i=1; i<myBuffers.size()-1; i++) {
@@ -449,7 +449,7 @@ uint32 KaxInternalBlock::RenderData(IOCallback & output, bool bForceRender, bool
                                        _CodedSize = CodedSizeLengthSigned(_Size, 0);
                                        CodedValueLengthSigned(_Size, _CodedSize, _FinalHead);
                                        output.writeFully(_FinalHead, _CodedSize);
-                                       Size += _CodedSize;
+                                       SetSize_(GetSize() + _CodedSize);
                                }
                        }
                        break;
@@ -467,11 +467,11 @@ uint32 KaxInternalBlock::RenderData(IOCallback & output, bool bForceRender, bool
                // put the data of each frame
                for (i=0; i<myBuffers.size(); i++) {
                        output.writeFully(myBuffers[i]->Buffer(), myBuffers[i]->Size());
-                       Size += myBuffers[i]->Size();
+                       SetSize_(GetSize() + myBuffers[i]->Size());
                }
        }
 
-       return Size;
+       return GetSize();
 }
 
 uint64 KaxInternalBlock::ReadInternalHead(IOCallback & input)
@@ -519,7 +519,7 @@ uint64 KaxInternalBlock::ReadData(IOCallback & input, ScopeMode ReadFully)
        if (ReadFully == SCOPE_ALL_DATA)
        {
                Result = EbmlBinary::ReadData(input, ReadFully);
-               binary *cursor = Data;
+               binary *cursor = GetData();
                uint8 BlockHeadSize = 4;
 
                // update internal values
@@ -552,14 +552,14 @@ uint64 KaxInternalBlock::ReadData(IOCallback & input, ScopeMode ReadFully)
 
                // put all Frames in the list
                if (mLacing == LACING_NONE) {
-                       FirstFrameLocation += cursor - Data;
-                       DataBuffer * soloFrame = new DataBuffer(cursor, Size - BlockHeadSize);
+                       FirstFrameLocation += cursor - GetData();
+                       DataBuffer * soloFrame = new DataBuffer(cursor, GetSize() - BlockHeadSize);
                        myBuffers.push_back(soloFrame);
                        SizeList.resize(1);
-                       SizeList[0] = Size - BlockHeadSize;
+                       SizeList[0] = GetSize() - BlockHeadSize;
                } else {
                        // read the number of frames in the lace
-                       uint32 LastBufferSize = Size - BlockHeadSize - 1; // 1 for number of frame
+                       uint32 LastBufferSize = GetSize() - BlockHeadSize - 1; // 1 for number of frame
                        uint8 FrameNum = *cursor++; // number of frames in the lace - 1
                        // read the list of frame sizes
                        uint8 Index;
@@ -611,7 +611,7 @@ uint64 KaxInternalBlock::ReadData(IOCallback & input, ScopeMode ReadFully)
                                assert(0);
                        }
 
-                       FirstFrameLocation += cursor - Data;
+                       FirstFrameLocation += cursor - GetData();
 
                        for (Index=0; Index<=FrameNum; Index++) {
                                DataBuffer * lacedFrame = new DataBuffer(cursor, SizeList[Index]);
@@ -619,7 +619,7 @@ uint64 KaxInternalBlock::ReadData(IOCallback & input, ScopeMode ReadFully)
                                cursor += SizeList[Index];
                        }
                }
-               bValueIsSet = true;
+               SetValueIsSet();
        }
        else if (ReadFully == SCOPE_PARTIAL_DATA)
        {
@@ -668,7 +668,7 @@ uint64 KaxInternalBlock::ReadData(IOCallback & input, ScopeMode ReadFully)
                // put all Frames in the list
                if (mLacing != LACING_NONE) {
                        // read the number of frames in the lace
-                       uint32 LastBufferSize = Size - BlockHeadSize - 1; // 1 for number of frame
+                       uint32 LastBufferSize = GetSize() - BlockHeadSize - 1; // 1 for number of frame
                        uint8 FrameNum = _TempHead[0]; // number of frames in the lace - 1
                        // read the list of frame sizes
                        uint8 Index;
@@ -732,13 +732,13 @@ uint64 KaxInternalBlock::ReadData(IOCallback & input, ScopeMode ReadFully)
                        }
                } else {
                        SizeList.resize(1);
-                       SizeList[0] = Size - BlockHeadSize;
+                       SizeList[0] = GetSize() - BlockHeadSize;
                }
-               bValueIsSet = false;
-               Result = Size;
+               SetValueIsSet(false);
+               Result = GetSize();
        } else {
-               bValueIsSet = false;
-               Result = Size;
+               SetValueIsSet(false);
+               Result = GetSize();
        }
 
        return Result;
@@ -937,7 +937,7 @@ int64 KaxInternalBlock::GetDataPosition(size_t FrameNumber)
 {
        int64 _Result = -1;
 
-       if (bValueIsSet && FrameNumber < SizeList.size())
+       if (ValueIsSet() && FrameNumber < SizeList.size())
        {
                _Result = FirstFrameLocation;
        
index 1c5b9791e34d827a496fefba722240c267ffadcb..216f4096d8fcb7f5ad899351c67ef8b222a48f96 100644 (file)
@@ -124,7 +124,7 @@ void KaxReferenceBlock::SetReferencedBlock(const KaxBlockBlob * aRefdBlock)
        assert(RefdBlock == NULL);
        assert(aRefdBlock != NULL);
        RefdBlock = aRefdBlock; 
-       bValueIsSet = true;
+       SetValueIsSet();
 }
 
 void KaxReferenceBlock::SetReferencedBlock(const KaxBlockGroup & aRefdBlock)
@@ -132,7 +132,7 @@ void KaxReferenceBlock::SetReferencedBlock(const KaxBlockGroup & aRefdBlock)
        KaxBlockBlob *block_blob = new KaxBlockBlob(BLOCK_BLOB_NO_SIMPLE);
        block_blob->SetBlockGroup(*const_cast<KaxBlockGroup*>(&aRefdBlock));
        RefdBlock = block_blob; 
-       bValueIsSet = true;
+       SetValueIsSet();
 }
 
 END_LIBMATROSKA_NAMESPACE
index d520e7afb18b541af3c023616ffc3f49c7eecb29..807181ae1aed29f1c067fd97d7317172812fd5a3 100644 (file)
@@ -75,8 +75,8 @@ KaxCluster::KaxCluster(const KaxCluster & ElementToClone)
  ,bSilentTracksUsed(ElementToClone.bSilentTracksUsed)
 {
        // update the parent of each children
-       std::vector<EbmlElement *>::const_iterator Itr = ElementList.begin();
-       while (Itr != ElementList.end())
+       std::vector<EbmlElement *>::const_iterator Itr = begin();
+       while (Itr != end())
        {
                if (EbmlId(**Itr) == KaxBlockGroup::ClassInfos.GlobalId) {
                        static_cast<KaxBlockGroup   *>(*Itr)->SetParent(*this);
@@ -193,15 +193,15 @@ uint32 KaxCluster::Render(IOCallback & output, KaxCues & CueToUpdate, bool bSave
                                {
                                        KaxTrackEntry & entry = *static_cast<KaxTrackEntry *>(MyTracks[TrkIndex]);
                                        uint32 tracknum = entry.TrackNumber();
-                                       for (Index = 0; Index < ElementList.size(); Index++) {
-                                               if (EbmlId(*ElementList[Index]) == KaxBlockGroup::ClassInfos.GlobalId) {
-                                                       KaxBlockGroup & group = *static_cast<KaxBlockGroup *>(ElementList[Index]);
+                                       for (Index = 0; Index < ListSize(); Index++) {
+                                               if (EbmlId(*(*this)[Index]) == KaxBlockGroup::ClassInfos.GlobalId) {
+                                                       KaxBlockGroup & group = *static_cast<KaxBlockGroup *>((*this)[Index]);
                                                        if (group.TrackNumber() == tracknum)
                                                                break; // this track is used
                                                }
                                        }
                                        // the track wasn't found in this cluster
-                                       if (Index == ElementList.size())
+                                       if (Index == ListSize())
                                        {
                                                KaxClusterSilentTracks * SilentTracks = static_cast<KaxClusterSilentTracks *>(this->FindFirstElt(KaxClusterSilentTracks::ClassInfos));
                                                assert(SilentTracks != NULL); // the flag bSilentTracksUsed should be set when creating the Cluster
@@ -215,9 +215,9 @@ uint32 KaxCluster::Render(IOCallback & output, KaxCues & CueToUpdate, bool bSave
                Result = EbmlMaster::Render(output, bSaveDefault);
                // For all Blocks add their position on the CueEntry
                
-               for (Index = 0; Index < ElementList.size(); Index++) {
-                       if (EbmlId(*ElementList[Index]) == KaxBlockGroup::ClassInfos.GlobalId) {
-                               CueToUpdate.PositionSet(*static_cast<const KaxBlockGroup *>(ElementList[Index]));
+               for (Index = 0; Index < ListSize(); Index++) {
+                       if (EbmlId(*(*this)[Index]) == KaxBlockGroup::ClassInfos.GlobalId) {
+                               CueToUpdate.PositionSet(*static_cast<const KaxBlockGroup *>((*this)[Index]));
                        }
                }
        } else {
@@ -226,10 +226,10 @@ uint32 KaxCluster::Render(IOCallback & output, KaxCues & CueToUpdate, bool bSave
                {
 #if MATROSKA_VERSION >= 2
                        if (Blobs[Index]->IsSimpleBlock())
-                               ElementList.push_back( &(KaxSimpleBlock&) *Blobs[Index] );
+                               PushElement( (KaxSimpleBlock&) *Blobs[Index] );
                        else
 #endif
-                               ElementList.push_back( &(KaxBlockGroup&) *Blobs[Index] );
+                               PushElement( (KaxBlockGroup&) *Blobs[Index] );
                }
 
                // SilentTracks handling
@@ -247,7 +247,7 @@ uint32 KaxCluster::Render(IOCallback & output, KaxCues & CueToUpdate, bool bSave
                                                                break; // this track is used
                                        }
                                        // the track wasn't found in this cluster
-                                       if (Index == ElementList.size())
+                                       if (Index == ListSize())
                                        {
                                                KaxClusterSilentTracks * SilentTracks = static_cast<KaxClusterSilentTracks *>(this->FindFirstElt(KaxClusterSilentTracks::ClassInfos));
                                                assert(SilentTracks != NULL); // the flag bSilentTracksUsed should be set when creating the Cluster
@@ -319,9 +319,9 @@ void KaxCluster::ReleaseFrames()
 {
        size_t Index;
        
-       for (Index = 0; Index < ElementList.size(); Index++) {
-               if (EbmlId(*ElementList[Index]) == KaxBlockGroup::ClassInfos.GlobalId) {
-                       static_cast<KaxBlockGroup*>(ElementList[Index])->ReleaseFrames();
+       for (Index = 0; Index < ListSize(); Index++) {
+               if (EbmlId(*(*this)[Index]) == KaxBlockGroup::ClassInfos.GlobalId) {
+                       static_cast<KaxBlockGroup*>((*this)[Index])->ReleaseFrames();
                }
        }
 }
index 17b688ce960228f7a308c4765f1fc867b5cd9a16..01402268a1a6a51acc2a4183881cdfbf4c09890f 100644 (file)
@@ -166,7 +166,7 @@ void KaxCuePoint::PositionSet(const KaxBlockGroup & BlockReference, uint64 Globa
        }
 #endif // MATROSKA_VERSION
 
-       bValueIsSet = true;
+       SetValueIsSet();
 }
 
 void KaxCuePoint::PositionSet(const KaxBlockBlob & BlobReference, uint64 GlobalTimecodeScale)
@@ -207,7 +207,7 @@ void KaxCuePoint::PositionSet(const KaxBlockBlob & BlobReference, uint64 GlobalT
        }
 #endif // MATROSKA_VERSION
 
-       bValueIsSet = true;
+       SetValueIsSet();
 }
 
 #if MATROSKA_VERSION >= 2
index 63efdadd19d30b37070cb54c043ec2a945460ab0..4dfceca392d3c73d7ed62db4dc739623645191c2 100644 (file)
@@ -126,19 +126,19 @@ KaxSeek * KaxSeekHead::FindNextOf(const KaxSeek &aPrev) const
        KaxSeek *tmp;
        
        // look for the previous in the list
-       for (iIndex = 0; iIndex<ElementList.size(); iIndex++)
+       for (iIndex = 0; iIndex<ListSize(); iIndex++)
        {
-               if (ElementList[iIndex] == static_cast<const EbmlElement*>(&aPrev))
+               if ((*this)[iIndex] == static_cast<const EbmlElement*>(&aPrev))
                        break;
        }
 
-       if (iIndex <ElementList.size()) {
+       if (iIndex <ListSize()) {
                iIndex++;
-               for (; iIndex<ElementList.size(); iIndex++)
+               for (; iIndex<ListSize(); iIndex++)
                {
-                       if (EbmlId(*(ElementList[iIndex])) == KaxSeek::ClassInfos.GlobalId)
+                       if (EbmlId(*((*this)[iIndex])) == KaxSeek::ClassInfos.GlobalId)
                        {
-                               tmp = static_cast<KaxSeek *>(ElementList[iIndex]);
+                               tmp = (KaxSeek *)((*this)[iIndex]);
                                if (tmp->IsEbmlId(aPrev))
                                        return tmp;
                        }
index 4bafab1e7bc6c090ebbae72b03f4197899acaf99..34bcad927877e1d795b1ee61b5a03cc16be00a3d 100644 (file)
@@ -83,8 +83,8 @@ KaxSegment::KaxSegment(const KaxSegment & ElementToClone)
  :EbmlMaster(ElementToClone)
 {
        // update the parent of each children
-       std::vector<EbmlElement *>::const_iterator Itr = ElementList.begin();
-       while (Itr != ElementList.end())
+       std::vector<EbmlElement *>::const_iterator Itr = begin();
+       while (Itr != end())
        {
                if (EbmlId(**Itr) == KaxCluster::ClassInfos.GlobalId) {
                        static_cast<KaxCluster *>(*Itr)->SetParent(*this);