]> granicus.if.org Git - libmatroska/commitdiff
update the copyright notice to 2010
authorSteve Lhomme <slhomme@matroska.org>
Mon, 15 Mar 2010 16:19:18 +0000 (16:19 +0000)
committerSteve Lhomme <slhomme@matroska.org>
Mon, 15 Mar 2010 16:19:18 +0000 (16:19 +0000)
git-svn-id: https://matroska.svn.sourceforge.net/svnroot/matroska/trunk/libmatroska@18 a6f86f6d-0131-4f8e-9e7b-e335508773d5

49 files changed:
matroska/FileKax.h
matroska/KaxAttached.h
matroska/KaxAttachments.h
matroska/KaxBlock.h
matroska/KaxBlockData.h
matroska/KaxChapters.h
matroska/KaxCluster.h
matroska/KaxClusterData.h
matroska/KaxConfig.h
matroska/KaxContentEncoding.h
matroska/KaxContexts.h
matroska/KaxCues.h
matroska/KaxCuesData.h
matroska/KaxInfo.h
matroska/KaxInfoData.h
matroska/KaxSeekHead.h
matroska/KaxSegment.h
matroska/KaxTag.h
matroska/KaxTagMulti.h
matroska/KaxTags.h
matroska/KaxTrackAudio.h
matroska/KaxTrackEntryData.h
matroska/KaxTrackVideo.h
matroska/KaxTracks.h
matroska/KaxTypes.h
matroska/KaxVersion.h
src/KaxAttached.cpp
src/KaxAttachments.cpp
src/KaxBlock.cpp
src/KaxBlockData.cpp
src/KaxChapters.cpp
src/KaxCluster.cpp
src/KaxClusterData.cpp
src/KaxContentEncoding.cpp
src/KaxContexts.cpp
src/KaxCues.cpp
src/KaxCuesData.cpp
src/KaxInfo.cpp
src/KaxInfoData.cpp
src/KaxSeekHead.cpp
src/KaxSegment.cpp
src/KaxTag.cpp
src/KaxTagMulti.cpp
src/KaxTags.cpp
src/KaxTrackAudio.cpp
src/KaxTrackEntryData.cpp
src/KaxTrackVideo.cpp
src/KaxTracks.cpp
src/KaxVersion.cpp

index 8ac7393d74c702b548568dbfb215267921e14574..3d60d07c93c826af44c292c01888f6264dec7a67 100644 (file)
-/****************************************************************************
-** libmatroska : parse Matroska files, see http://www.matroska.org/
-**
-** <file/class description>
-**
-** Copyright (C) 2002-2004 Steve Lhomme.  All rights reserved.
-**
-** This file is part of libmatroska.
-**
-** This library is free software; you can redistribute it and/or
-** modify it under the terms of the GNU Lesser General Public
-** License as published by the Free Software Foundation; either
-** version 2.1 of the License, or (at your option) any later version.
-** 
-** This library is distributed in the hope that it will be useful,
-** but WITHOUT ANY WARRANTY; without even the implied warranty of
-** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-** Lesser General Public License for more details.
-** 
-** You should have received a copy of the GNU Lesser General Public
-** License along with this library; if not, write to the Free Software
-** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-**
-** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**
-** Contact license@matroska.org if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-/*!
-       \file
-       \version \$Id: FileKax.h,v 1.5 2004/04/14 23:26:17 robux4 Exp $
-       \author Steve Lhomme     <robux4 @ users.sf.net>
-*/
-#ifndef LIBMATROSKA_FILE_H
-#define LIBMATROSKA_FILE_H
-
-//#include <vector>
-
-#include "matroska/KaxTypes.h"
-#include "ebml/IOCallback.h"
-//#include "MainHeader.h"
-//#include "TrackType.h"
-//#include "StreamInfo.h"
-//#include "Cluster.h"
-//#include "CodecHeader.h"
-
-using namespace LIBEBML_NAMESPACE;
-
-START_LIBMATROSKA_NAMESPACE
-
-//class Track;
-//class Frame;
-
-/*!
-    \class MATROSKA_DLL_API FileMatroska
-    \brief General container of all the parameters and data of an Matroska file
-    \todo Handle the filename and next filename
-    \todo Handle the IOCallback selection/type
-*/
-class MATROSKA_DLL_API FileMatroska {
-    public:
-               FileMatroska(IOCallback & output);
-               ~FileMatroska();
-#ifdef OLD
-       uint32 RenderHead(const std::string & aEncoderApp);
-       uint32 ReadHead();
-       uint32 ReadTracks();
-       uint32 ReadCodec();
-       void Close(const uint32 aTimeLength);
-
-       inline void type_SetInfo(const std::string & aStr) {myMainHeader.type_SetInfo(aStr);}
-       inline void type_SetAds(const std::string & aStr) {myMainHeader.type_SetAds(aStr);}
-       inline void type_SetSize(const std::string & aStr) {myMainHeader.type_SetSize(aStr);}
-       inline void type_SetSize(uint64 aSize) {myMainHeader.type_SetSize(aSize);}
-
-       inline uint8 GetTrackNumber() const { return myTracks.size(); }
-
-       void track_SetName(Track * aTrack, const std::string & aName);
-       void track_SetLaced(Track * aTrack, bool bLaced = true);
-
-       Track * CreateTrack(const track_type aType);
-       inline Track * GetTrack(const uint8 aTrackNb) const
-       {
-           if (aTrackNb > myTracks.size())
-               return NULL;
-           else
-               return myTracks[aTrackNb-1];
-       }
-
-       void Track_GetInfo(const Track * aTrack, TrackInfo & aTrackInfo) const;
-       
-       void Track_SetInfo_Audio(Track * aTrack, const TrackInfoAudio & aTrackInfo);
-       void Track_GetInfo_Audio(const Track * aTrack, TrackInfoAudio & aTrackInfo) const;
-
-       void Track_SetInfo_Video(Track * aTrack, const TrackInfoVideo & aTrackInfo);
-       void Track_GetInfo_Video(const Track * aTrack, TrackInfoVideo & aTrackInfo) const;
-
-       void SelectReadingTrack(Track * aTrack, bool select = true);
-
-       /*!
-           \return wether the frame has been added or not
-       */
-       bool AddFrame(Track * aTrack, const uint32 aTimecode, const binary *aFrame, const uint32 aFrameSize,
-                    bool aKeyFrame = true, bool aBFrame = false);
-
-       /*!
-           \return wether the frame has been read or not
-       */
-       bool ReadFrame(Track * & aTrack, uint32 & aTimecode, const binary * & aFrame, uint32 & aFrameSize,
-                    bool & aKeyFrame, bool & aBFrame);
-
-       /*
-           Render the pending cluster to file
-       */
-       void Flush();
-
-       void SetMaxClusterSize(const uint32 value);
-       void SetMinClusterSize(const uint32 value) {myMinClusterSize = value;}
-
-    protected:
-       MainHeader myMainHeader;
-
-       std::vector<Track *> myTracks;
-       std::vector<uint8> mySelectedTracks;
-
-//     Track *findTrack(Track * aTrack) const;
-
-       Cluster  myCurrWriteCluster; /// \todo merge with the write one ?
-       uint32   myReadBlockNumber;
-       Cluster  myCurrReadCluster;
-       binary * myCurrReadBlock;      ///< The buffer containing the current read block
-       uint32   myCurrReadBlockSize;  ///< The size of the buffer containing the current read block
-       uint8    myCurrReadBlockTrack; ///< The track number of the current track to read
-
-       uint32 myMaxClusterSize;
-       uint32 myMinClusterSize;
-
-       StreamInfo myStreamInfo;
-
-       CodecHeader myCodecHeader;
-
-       inline bool IsMyTrack(const Track * aTrack) const;
-       inline bool IsReadingTrack(const uint8 aTrackNum) const;
-#endif // OLD
-       IOCallback & myFile;
-
-};
-
-END_LIBMATROSKA_NAMESPACE
-
-#endif // FILE_KAX_HPP
+/****************************************************************************\r
+** libmatroska : parse Matroska files, see http://www.matroska.org/\r
+**\r
+** <file/class description>\r
+**\r
+** Copyright (C) 2002-2010 Steve Lhomme.  All rights reserved.\r
+**\r
+** This file is part of libmatroska.\r
+**\r
+** This library is free software; you can redistribute it and/or\r
+** modify it under the terms of the GNU Lesser General Public\r
+** License as published by the Free Software Foundation; either\r
+** version 2.1 of the License, or (at your option) any later version.\r
+** \r
+** This library is distributed in the hope that it will be useful,\r
+** but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
+** Lesser General Public License for more details.\r
+** \r
+** You should have received a copy of the GNU Lesser General Public\r
+** License along with this library; if not, write to the Free Software\r
+** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\r
+**\r
+** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**\r
+** Contact license@matroska.org if any conditions of this licensing are\r
+** not clear to you.\r
+**\r
+**********************************************************************/\r
+\r
+/*!\r
+       \file\r
+       \version \$Id: FileKax.h,v 1.5 2004/04/14 23:26:17 robux4 Exp $\r
+       \author Steve Lhomme     <robux4 @ users.sf.net>\r
+*/\r
+#ifndef LIBMATROSKA_FILE_H\r
+#define LIBMATROSKA_FILE_H\r
+\r
+//#include <vector>\r
+\r
+#include "matroska/KaxTypes.h"\r
+#include "ebml/IOCallback.h"\r
+//#include "MainHeader.h"\r
+//#include "TrackType.h"\r
+//#include "StreamInfo.h"\r
+//#include "Cluster.h"\r
+//#include "CodecHeader.h"\r
+\r
+using namespace LIBEBML_NAMESPACE;\r
+\r
+START_LIBMATROSKA_NAMESPACE\r
+\r
+//class Track;\r
+//class Frame;\r
+\r
+/*!\r
+    \class MATROSKA_DLL_API FileMatroska\r
+    \brief General container of all the parameters and data of an Matroska file\r
+    \todo Handle the filename and next filename\r
+    \todo Handle the IOCallback selection/type\r
+*/\r
+class MATROSKA_DLL_API FileMatroska {\r
+    public:\r
+               FileMatroska(IOCallback & output);\r
+               ~FileMatroska();\r
+#ifdef OLD\r
+       uint32 RenderHead(const std::string & aEncoderApp);\r
+       uint32 ReadHead();\r
+       uint32 ReadTracks();\r
+       uint32 ReadCodec();\r
+       void Close(const uint32 aTimeLength);\r
+\r
+       inline void type_SetInfo(const std::string & aStr) {myMainHeader.type_SetInfo(aStr);}\r
+       inline void type_SetAds(const std::string & aStr) {myMainHeader.type_SetAds(aStr);}\r
+       inline void type_SetSize(const std::string & aStr) {myMainHeader.type_SetSize(aStr);}\r
+       inline void type_SetSize(uint64 aSize) {myMainHeader.type_SetSize(aSize);}\r
+\r
+       inline uint8 GetTrackNumber() const { return myTracks.size(); }\r
+\r
+       void track_SetName(Track * aTrack, const std::string & aName);\r
+       void track_SetLaced(Track * aTrack, bool bLaced = true);\r
+\r
+       Track * CreateTrack(const track_type aType);\r
+       inline Track * GetTrack(const uint8 aTrackNb) const\r
+       {\r
+           if (aTrackNb > myTracks.size())\r
+               return NULL;\r
+           else\r
+               return myTracks[aTrackNb-1];\r
+       }\r
+\r
+       void Track_GetInfo(const Track * aTrack, TrackInfo & aTrackInfo) const;\r
+       \r
+       void Track_SetInfo_Audio(Track * aTrack, const TrackInfoAudio & aTrackInfo);\r
+       void Track_GetInfo_Audio(const Track * aTrack, TrackInfoAudio & aTrackInfo) const;\r
+\r
+       void Track_SetInfo_Video(Track * aTrack, const TrackInfoVideo & aTrackInfo);\r
+       void Track_GetInfo_Video(const Track * aTrack, TrackInfoVideo & aTrackInfo) const;\r
+\r
+       void SelectReadingTrack(Track * aTrack, bool select = true);\r
+\r
+       /*!\r
+           \return wether the frame has been added or not\r
+       */\r
+       bool AddFrame(Track * aTrack, const uint32 aTimecode, const binary *aFrame, const uint32 aFrameSize,\r
+                    bool aKeyFrame = true, bool aBFrame = false);\r
+\r
+       /*!\r
+           \return wether the frame has been read or not\r
+       */\r
+       bool ReadFrame(Track * & aTrack, uint32 & aTimecode, const binary * & aFrame, uint32 & aFrameSize,\r
+                    bool & aKeyFrame, bool & aBFrame);\r
+\r
+       /*\r
+           Render the pending cluster to file\r
+       */\r
+       void Flush();\r
+\r
+       void SetMaxClusterSize(const uint32 value);\r
+       void SetMinClusterSize(const uint32 value) {myMinClusterSize = value;}\r
+\r
+    protected:\r
+       MainHeader myMainHeader;\r
+\r
+       std::vector<Track *> myTracks;\r
+       std::vector<uint8> mySelectedTracks;\r
+\r
+//     Track *findTrack(Track * aTrack) const;\r
+\r
+       Cluster  myCurrWriteCluster; /// \todo merge with the write one ?\r
+       uint32   myReadBlockNumber;\r
+       Cluster  myCurrReadCluster;\r
+       binary * myCurrReadBlock;      ///< The buffer containing the current read block\r
+       uint32   myCurrReadBlockSize;  ///< The size of the buffer containing the current read block\r
+       uint8    myCurrReadBlockTrack; ///< The track number of the current track to read\r
+\r
+       uint32 myMaxClusterSize;\r
+       uint32 myMinClusterSize;\r
+\r
+       StreamInfo myStreamInfo;\r
+\r
+       CodecHeader myCodecHeader;\r
+\r
+       inline bool IsMyTrack(const Track * aTrack) const;\r
+       inline bool IsReadingTrack(const uint8 aTrackNum) const;\r
+#endif // OLD\r
+       IOCallback & myFile;\r
+\r
+};\r
+\r
+END_LIBMATROSKA_NAMESPACE\r
+\r
+#endif // FILE_KAX_HPP\r
index e2a1743884c2be1238b9d83a3007e8725145d6f7..9b60f96d422ddd9f2dcad6abf132df2281cf272b 100644 (file)
-/****************************************************************************
-** libmatroska : parse Matroska files, see http://www.matroska.org/
-**
-** <file/class MATROSKA_DLL_API description>
-**
-** Copyright (C) 2002-2004 Steve Lhomme.  All rights reserved.
-**
-** This file is part of libmatroska.
-**
-** This library is free software; you can redistribute it and/or
-** modify it under the terms of the GNU Lesser General Public
-** License as published by the Free Software Foundation; either
-** version 2.1 of the License, or (at your option) any later version.
-** 
-** This library is distributed in the hope that it will be useful,
-** but WITHOUT ANY WARRANTY; without even the implied warranty of
-** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-** Lesser General Public License for more details.
-** 
-** You should have received a copy of the GNU Lesser General Public
-** License along with this library; if not, write to the Free Software
-** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-**
-** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**
-** Contact license@matroska.org if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-/*!
-       \file
-       \version \$Id: KaxAttached.h,v 1.8 2004/04/14 23:26:17 robux4 Exp $
-       \author Steve Lhomme     <robux4 @ users.sf.net>
-*/
-#ifndef LIBMATROSKA_ATTACHED_H
-#define LIBMATROSKA_ATTACHED_H
-
-#include "matroska/KaxTypes.h"
-#include "ebml/EbmlMaster.h"
-#include "ebml/EbmlUnicodeString.h"
-#include "ebml/EbmlString.h"
-#include "ebml/EbmlBinary.h"
-#include "ebml/EbmlUInteger.h"
-
-using namespace LIBEBML_NAMESPACE;
-
-START_LIBMATROSKA_NAMESPACE
-
-class MATROSKA_DLL_API KaxAttached : public EbmlMaster {
-       public:
-               KaxAttached();
-               KaxAttached(const KaxAttached & ElementToClone) : EbmlMaster(ElementToClone) {}
-        
-        EBML_CONCRETE_CLASS(KaxAttached)
-};
-
-class MATROSKA_DLL_API KaxFileDescription : public EbmlUnicodeString {
-       public:
-               KaxFileDescription() {}
-               KaxFileDescription(const KaxFileDescription & ElementToClone) : EbmlUnicodeString(ElementToClone) {}
-        
-        EBML_CONCRETE_CLASS(KaxFileDescription)
-};
-
-class MATROSKA_DLL_API KaxFileName : public EbmlUnicodeString {
-       public:
-               KaxFileName() {}
-               KaxFileName(const KaxFileName & ElementToClone) : EbmlUnicodeString(ElementToClone) {}
-        
-        EBML_CONCRETE_CLASS(KaxFileName)
-};
-
-class MATROSKA_DLL_API KaxMimeType : public EbmlString {
-       public:
-               KaxMimeType() {}
-               KaxMimeType(const KaxMimeType & ElementToClone) : EbmlString(ElementToClone) {}
-        
-        EBML_CONCRETE_CLASS(KaxMimeType)
-};
-
-class MATROSKA_DLL_API KaxFileData : public EbmlBinary {
-       public:
-               KaxFileData() {}
-               KaxFileData(const KaxFileData & ElementToClone) :EbmlBinary(ElementToClone){}
-       
-               bool ValidateSize() const {return true;} // we don't mind about what's inside
-               
-        EBML_CONCRETE_CLASS(KaxFileData)
-};
-
-class MATROSKA_DLL_API KaxFileReferral : public EbmlBinary {
-       public:
-               KaxFileReferral() {}
-               KaxFileReferral(const KaxFileReferral & ElementToClone) :EbmlBinary(ElementToClone){}
-               bool ValidateSize() const {return true;} // we don't mind about what's inside
-               
-        EBML_CONCRETE_CLASS(KaxFileReferral)
-};
-
-class MATROSKA_DLL_API KaxFileUID : public EbmlUInteger {
-       public:
-               KaxFileUID() {}
-               KaxFileUID(const KaxFileUID & ElementToClone) : EbmlUInteger(ElementToClone) {}
-        
-        EBML_CONCRETE_CLASS(KaxFileUID)
-};
-
-END_LIBMATROSKA_NAMESPACE
-
-#endif // LIBMATROSKA_ATTACHED_H
+/****************************************************************************\r
+** libmatroska : parse Matroska files, see http://www.matroska.org/\r
+**\r
+** <file/class MATROSKA_DLL_API description>\r
+**\r
+** Copyright (C) 2002-2010 Steve Lhomme.  All rights reserved.\r
+**\r
+** This file is part of libmatroska.\r
+**\r
+** This library is free software; you can redistribute it and/or\r
+** modify it under the terms of the GNU Lesser General Public\r
+** License as published by the Free Software Foundation; either\r
+** version 2.1 of the License, or (at your option) any later version.\r
+** \r
+** This library is distributed in the hope that it will be useful,\r
+** but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
+** Lesser General Public License for more details.\r
+** \r
+** You should have received a copy of the GNU Lesser General Public\r
+** License along with this library; if not, write to the Free Software\r
+** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\r
+**\r
+** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**\r
+** Contact license@matroska.org if any conditions of this licensing are\r
+** not clear to you.\r
+**\r
+**********************************************************************/\r
+\r
+/*!\r
+       \file\r
+       \version \$Id: KaxAttached.h,v 1.8 2004/04/14 23:26:17 robux4 Exp $\r
+       \author Steve Lhomme     <robux4 @ users.sf.net>\r
+*/\r
+#ifndef LIBMATROSKA_ATTACHED_H\r
+#define LIBMATROSKA_ATTACHED_H\r
+\r
+#include "matroska/KaxTypes.h"\r
+#include "ebml/EbmlMaster.h"\r
+#include "ebml/EbmlUnicodeString.h"\r
+#include "ebml/EbmlString.h"\r
+#include "ebml/EbmlBinary.h"\r
+#include "ebml/EbmlUInteger.h"\r
+\r
+using namespace LIBEBML_NAMESPACE;\r
+\r
+START_LIBMATROSKA_NAMESPACE\r
+\r
+class MATROSKA_DLL_API KaxAttached : public EbmlMaster {\r
+       public:\r
+               KaxAttached();\r
+               KaxAttached(const KaxAttached & ElementToClone) : EbmlMaster(ElementToClone) {}\r
+        \r
+        EBML_CONCRETE_CLASS(KaxAttached)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxFileDescription : public EbmlUnicodeString {\r
+       public:\r
+               KaxFileDescription() {}\r
+               KaxFileDescription(const KaxFileDescription & ElementToClone) : EbmlUnicodeString(ElementToClone) {}\r
+        \r
+        EBML_CONCRETE_CLASS(KaxFileDescription)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxFileName : public EbmlUnicodeString {\r
+       public:\r
+               KaxFileName() {}\r
+               KaxFileName(const KaxFileName & ElementToClone) : EbmlUnicodeString(ElementToClone) {}\r
+        \r
+        EBML_CONCRETE_CLASS(KaxFileName)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxMimeType : public EbmlString {\r
+       public:\r
+               KaxMimeType() {}\r
+               KaxMimeType(const KaxMimeType & ElementToClone) : EbmlString(ElementToClone) {}\r
+        \r
+        EBML_CONCRETE_CLASS(KaxMimeType)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxFileData : public EbmlBinary {\r
+       public:\r
+               KaxFileData() {}\r
+               KaxFileData(const KaxFileData & ElementToClone) :EbmlBinary(ElementToClone){}\r
+       \r
+               bool ValidateSize() const {return true;} // we don't mind about what's inside\r
+               \r
+        EBML_CONCRETE_CLASS(KaxFileData)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxFileReferral : public EbmlBinary {\r
+       public:\r
+               KaxFileReferral() {}\r
+               KaxFileReferral(const KaxFileReferral & ElementToClone) :EbmlBinary(ElementToClone){}\r
+               bool ValidateSize() const {return true;} // we don't mind about what's inside\r
+               \r
+        EBML_CONCRETE_CLASS(KaxFileReferral)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxFileUID : public EbmlUInteger {\r
+       public:\r
+               KaxFileUID() {}\r
+               KaxFileUID(const KaxFileUID & ElementToClone) : EbmlUInteger(ElementToClone) {}\r
+        \r
+        EBML_CONCRETE_CLASS(KaxFileUID)\r
+};\r
+\r
+END_LIBMATROSKA_NAMESPACE\r
+\r
+#endif // LIBMATROSKA_ATTACHED_H\r
index aded54e3a0ed0ab3111969e97d802945bd4c116b..15458ba045e543f2da016df3e795255723383df7 100644 (file)
@@ -1,55 +1,55 @@
-/****************************************************************************
-** libmatroska : parse Matroska files, see http://www.matroska.org/
-**
-** <file/class description>
-**
-** Copyright (C) 2002-2004 Steve Lhomme.  All rights reserved.
-**
-** This file is part of libmatroska.
-**
-** This library is free software; you can redistribute it and/or
-** modify it under the terms of the GNU Lesser General Public
-** License as published by the Free Software Foundation; either
-** version 2.1 of the License, or (at your option) any later version.
-** 
-** This library is distributed in the hope that it will be useful,
-** but WITHOUT ANY WARRANTY; without even the implied warranty of
-** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-** Lesser General Public License for more details.
-** 
-** You should have received a copy of the GNU Lesser General Public
-** License along with this library; if not, write to the Free Software
-** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-**
-** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**
-** Contact license@matroska.org if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-/*!
-       \file
-       \version \$Id: KaxAttachments.h,v 1.8 2004/04/14 23:26:17 robux4 Exp $
-       \author Steve Lhomme     <robux4 @ users.sf.net>
-*/
-#ifndef LIBMATROSKA_ATTACHEMENTS_H
-#define LIBMATROSKA_ATTACHEMENTS_H
-
-#include "matroska/KaxTypes.h"
-#include "ebml/EbmlMaster.h"
-
-using namespace LIBEBML_NAMESPACE;
-
-START_LIBMATROSKA_NAMESPACE
-
-class MATROSKA_DLL_API KaxAttachments : public EbmlMaster {
-       public:
-               KaxAttachments();
-               KaxAttachments(const KaxAttachments & ElementToClone) : EbmlMaster(ElementToClone) {}
-        
-        EBML_CONCRETE_CLASS(KaxAttachments)
-};
-
-END_LIBMATROSKA_NAMESPACE
-
-#endif // LIBMATROSKA_ATTACHEMENTS_H
+/****************************************************************************\r
+** libmatroska : parse Matroska files, see http://www.matroska.org/\r
+**\r
+** <file/class description>\r
+**\r
+** Copyright (C) 2002-2010 Steve Lhomme.  All rights reserved.\r
+**\r
+** This file is part of libmatroska.\r
+**\r
+** This library is free software; you can redistribute it and/or\r
+** modify it under the terms of the GNU Lesser General Public\r
+** License as published by the Free Software Foundation; either\r
+** version 2.1 of the License, or (at your option) any later version.\r
+** \r
+** This library is distributed in the hope that it will be useful,\r
+** but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
+** Lesser General Public License for more details.\r
+** \r
+** You should have received a copy of the GNU Lesser General Public\r
+** License along with this library; if not, write to the Free Software\r
+** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\r
+**\r
+** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**\r
+** Contact license@matroska.org if any conditions of this licensing are\r
+** not clear to you.\r
+**\r
+**********************************************************************/\r
+\r
+/*!\r
+       \file\r
+       \version \$Id: KaxAttachments.h,v 1.8 2004/04/14 23:26:17 robux4 Exp $\r
+       \author Steve Lhomme     <robux4 @ users.sf.net>\r
+*/\r
+#ifndef LIBMATROSKA_ATTACHEMENTS_H\r
+#define LIBMATROSKA_ATTACHEMENTS_H\r
+\r
+#include "matroska/KaxTypes.h"\r
+#include "ebml/EbmlMaster.h"\r
+\r
+using namespace LIBEBML_NAMESPACE;\r
+\r
+START_LIBMATROSKA_NAMESPACE\r
+\r
+class MATROSKA_DLL_API KaxAttachments : public EbmlMaster {\r
+       public:\r
+               KaxAttachments();\r
+               KaxAttachments(const KaxAttachments & ElementToClone) : EbmlMaster(ElementToClone) {}\r
+        \r
+        EBML_CONCRETE_CLASS(KaxAttachments)\r
+};\r
+\r
+END_LIBMATROSKA_NAMESPACE\r
+\r
+#endif // LIBMATROSKA_ATTACHEMENTS_H\r
index f48c47292b0d7354e25687a906ee4cd0527566f4..d11ed7b4ccc43d2f504db6ed06cb86db35c3335e 100644 (file)
-/****************************************************************************
-** libmatroska : parse Matroska files, see http://www.matroska.org/
-**
-** <file/class description>
-**
-** Copyright (C) 2002-2005 Steve Lhomme.  All rights reserved.
-**
-** This library is free software; you can redistribute it and/or
-** modify it under the terms of the GNU Lesser General Public
-** License as published by the Free Software Foundation; either
-** version 2.1 of the License, or (at your option) any later version.
-** 
-** This library is distributed in the hope that it will be useful,
-** but WITHOUT ANY WARRANTY; without even the implied warranty of
-** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-** Lesser General Public License for more details.
-** 
-** You should have received a copy of the GNU Lesser General Public
-** License along with this library; if not, write to the Free Software
-** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-**
-** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**
-** Contact license@matroska.org if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-/*!
-       \file
-       \todo add a PureBlock class to group functionalities between Block and BlockVirtual
-       \version \$Id: KaxBlock.h,v 1.24 2004/04/14 23:26:17 robux4 Exp $
-       \author Steve Lhomme     <robux4 @ users.sf.net>
-       \author Julien Coloos    <suiryc @ users.sf.net>
-*/
-#ifndef LIBMATROSKA_BLOCK_H
-#define LIBMATROSKA_BLOCK_H
-
-#include <vector>
-
-#include "matroska/KaxTypes.h"
-#include "ebml/EbmlBinary.h"
-#include "ebml/EbmlMaster.h"
-#include "matroska/KaxTracks.h"
-
-using namespace LIBEBML_NAMESPACE;
-
-START_LIBMATROSKA_NAMESPACE
-
-class KaxCluster;
-class KaxReferenceBlock;
-class KaxInternalBlock;
-class KaxBlockBlob;
-
-class MATROSKA_DLL_API DataBuffer {
-       protected:
-               binary * myBuffer;
-               uint32   mySize;
-               bool     bValidValue;
-               bool     (*myFreeBuffer)(const DataBuffer & aBuffer); // method to free the internal buffer
-
-       public:
-               DataBuffer(binary * aBuffer, uint32 aSize, bool (*aFreeBuffer)(const DataBuffer & aBuffer) = NULL)
-                       :myBuffer(aBuffer)
-                       ,mySize(aSize)
-                       ,bValidValue(true)      
-      ,myFreeBuffer(aFreeBuffer)
-               {}
-               virtual ~DataBuffer() {}
-               virtual binary * Buffer() {return myBuffer;}
-               virtual uint32   & Size() {return mySize;};
-               virtual const binary * Buffer() const {return myBuffer;}
-               virtual const uint32   Size()   const {return mySize;};
-               bool    FreeBuffer(const DataBuffer & aBuffer) {
-                       bool bResult = true;
-                       if (myBuffer != NULL && myFreeBuffer != NULL && bValidValue) {
-                               bResult = myFreeBuffer(aBuffer);
-                               myBuffer = NULL;
-                               bValidValue = false;
-                       }
-                       return bResult;
-               }
-
-               virtual DataBuffer * Clone();
-};
-
-class MATROSKA_DLL_API SimpleDataBuffer : public DataBuffer {
-       public:
-               SimpleDataBuffer(binary * aBuffer, uint32 aSize, uint32 aOffset, bool (*aFreeBuffer)(const DataBuffer & aBuffer) = myFreeBuffer)
-                       :DataBuffer(aBuffer + aOffset, aSize, aFreeBuffer)
-                       ,Offset(aOffset)
-                       ,BaseBuffer(aBuffer)
-               {}
-               virtual ~SimpleDataBuffer() {}
-
-               DataBuffer * Clone() {return new SimpleDataBuffer(*this);}
-
-       protected:
-               uint32 Offset;
-               binary * BaseBuffer;
-
-               static bool myFreeBuffer(const DataBuffer & aBuffer)
-               {
-                       binary *_Buffer = static_cast<const SimpleDataBuffer*>(&aBuffer)->BaseBuffer;
-                       if (_Buffer != NULL)
-                               free(_Buffer);
-                       return true;
-               }
-
-               SimpleDataBuffer(const SimpleDataBuffer & ToClone);
-};
-
-/*!
-       \note the data is copied locally, it can be freed right away
-* /
-class MATROSKA_DLL_API NotSoSimpleDataBuffer : public SimpleDataBuffer {
-       public:
-               NotSoSimpleDataBuffer(binary * aBuffer, uint32 aSize, uint32 aOffset)
-                       :SimpleDataBuffer(new binary[aSize - aOffset], aSize, 0)
-               {
-                       memcpy(BaseBuffer, aBuffer + aOffset, aSize - aOffset);
-               }
-};
-*/
-
-class MATROSKA_DLL_API KaxBlockGroup : public EbmlMaster {
-       public:
-               KaxBlockGroup();
-               KaxBlockGroup(const KaxBlockGroup & ElementToClone) :EbmlMaster(ElementToClone) {}
-
-               ~KaxBlockGroup();
-
-               /*!
-                       \brief Addition of a frame without references
-               */
-               bool AddFrame(const KaxTrackEntry & track, uint64 timecode, DataBuffer & buffer, LacingType lacing = LACING_AUTO);
-               /*!
-                       \brief Addition of a frame with a backward reference (P frame)
-               */
-               bool AddFrame(const KaxTrackEntry & track, uint64 timecode, DataBuffer & buffer, const KaxBlockGroup & PastBlock, LacingType lacing = LACING_AUTO);
-
-               /*!
-                       \brief Addition of a frame with a backward+forward reference (B frame)
-               */
-               bool AddFrame(const KaxTrackEntry & track, uint64 timecode, DataBuffer & buffer, const KaxBlockGroup & PastBlock, const KaxBlockGroup & ForwBlock, LacingType lacing = LACING_AUTO);
-               bool AddFrame(const KaxTrackEntry & track, uint64 timecode, DataBuffer & buffer, const KaxBlockBlob * PastBlock, const KaxBlockBlob * ForwBlock, LacingType lacing = LACING_AUTO);
-
-               void SetParent(KaxCluster & aParentCluster);
-
-               void SetParentTrack(const KaxTrackEntry & aParentTrack) {
-                       ParentTrack = &aParentTrack;
-               }
-
-               /*!
-                       \brief Set the duration of the contained frame(s) (for the total number of frames)
-               */
-               void SetBlockDuration(uint64 TimeLength);
-               bool GetBlockDuration(uint64 &TheTimecode) const;
-
-               /*!
-                       \return the global timecode of this Block (not just the delta to the Cluster)
-               */
-               uint64 GlobalTimecode() const;
-               uint64 GlobalTimecodeScale() const {
-                       assert(ParentTrack != NULL);
-                       return ParentTrack->GlobalTimecodeScale();
-               }
-
-               uint16 TrackNumber() const;
-
-               uint64 ClusterPosition() const;
-               
-               /*!
-                       \return the number of references to other frames
-               */
-               unsigned int ReferenceCount() const;
-               const KaxReferenceBlock & Reference(unsigned int Index) const;
-
-               /*!
-                       \brief release all the frames of all Blocks
-               */
-               void ReleaseFrames();
-
-               operator KaxInternalBlock &();
-
-               const KaxCluster *GetParentCluster() const { return ParentCluster; }
-
-       protected:
-               KaxCluster * ParentCluster;
-               const KaxTrackEntry * ParentTrack;
-        
-        EBML_CONCRETE_CLASS(KaxBlockGroup)
-};
-
-class KaxInternalBlock : public EbmlBinary {
-       public:
-               KaxInternalBlock( bool bSimple ) :bLocalTimecodeUsed(false), mLacing(LACING_AUTO), mInvisible(false)
-                       ,ParentCluster(NULL), bIsSimple(bSimple), bIsKeyframe(true), bIsDiscardable(false)
-               {}
-               KaxInternalBlock(const KaxInternalBlock & ElementToClone);
-               ~KaxInternalBlock();
-               bool ValidateSize() const;
-
-               uint16 TrackNum() const {return TrackNumber;}
-               /*!
-                       \todo !!!! This method needs to be changes !
-               */
-               uint64 GlobalTimecode() const {return Timecode;}
-
-               /*!
-                       \note override this function to generate the Data/Size on the fly, unlike the usual binary elements
-               */
-               uint64 UpdateSize(bool bSaveDefault = false, bool bForceRender = false);
-               uint64 ReadData(IOCallback & input, ScopeMode ReadFully = SCOPE_ALL_DATA);
-               
-               /*!
-                       \brief Only read the head of the Block (not internal data)
-                       \note convenient when you are parsing the file quickly
-               */
-               uint64 ReadInternalHead(IOCallback & input);
-               
-               unsigned int NumberFrames() const { return SizeList.size();}
-               DataBuffer & GetBuffer(unsigned int iIndex) {return *myBuffers[iIndex];}
-
-               bool AddFrame(const KaxTrackEntry & track, uint64 timecode, DataBuffer & buffer, LacingType lacing = LACING_AUTO, bool invisible = false);
-
-               /*!
-                       \brief release all the frames of all Blocks
-               */
-               void ReleaseFrames();
-
-               void SetParent(KaxCluster & aParentCluster);
-
-               /*!
-                       \return Returns the lacing type that produces the smallest footprint.
-               */
-               LacingType GetBestLacingType() const;
-
-               /*!
-                       \param FrameNumber 0 for the first frame
-                       \return the position in the stream for a given frame
-                       \note return -1 if the position doesn't exist
-               */
-               int64 GetDataPosition(size_t FrameNumber = 0);
-
-               /*!
-                       \param FrameNumber 0 for the first frame
-                       \return the size of a given frame
-                       \note return -1 if the position doesn't exist
-               */
-               int64 GetFrameSize(size_t FrameNumber = 0);
-               
-               bool IsInvisible() const { return mInvisible; }
-
-               uint64 ClusterPosition() const;
-
-       protected:
-               std::vector<DataBuffer *> myBuffers;
-               std::vector<int32>        SizeList;
-               uint64     Timecode; // temporary timecode of the first frame, non scaled
-               int16      LocalTimecode;
-               bool       bLocalTimecodeUsed;
-               uint16     TrackNumber;
-               LacingType mLacing;
-               bool       mInvisible;
-               uint64     FirstFrameLocation;
-
-               uint32 RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault = false);
-
-               KaxCluster * ParentCluster;
-               bool       bIsSimple;
-               bool       bIsKeyframe;
-               bool       bIsDiscardable;
-};
-
-class MATROSKA_DLL_API KaxBlock : public KaxInternalBlock {
-       public:
-               KaxBlock() :KaxInternalBlock(false) {}
-        
-        EBML_CONCRETE_CLASS(KaxBlock)
-};
-
-#if MATROSKA_VERSION >= 2
-class MATROSKA_DLL_API KaxSimpleBlock : public KaxInternalBlock {
-       public:
-               KaxSimpleBlock() :KaxInternalBlock(true) {}
-
-               void SetKeyframe(bool b_keyframe) { bIsKeyframe = b_keyframe; }
-               void SetDiscardable(bool b_discard) { bIsDiscardable = b_discard; }
-
-               bool IsKeyframe() const    { return bIsKeyframe; }
-               bool IsDiscardable() const { return bIsDiscardable; }
-
-               operator KaxInternalBlock &() { return *this; }
-        
-        EBML_CONCRETE_CLASS(KaxSimpleBlock)
-};
-#endif // MATROSKA_VERSION
-
-class MATROSKA_DLL_API KaxBlockBlob {
-public:
-       KaxBlockBlob(BlockBlobType sblock_mode) :ParentCluster(NULL), SimpleBlockMode(sblock_mode) {
-               bUseSimpleBlock = (sblock_mode != BLOCK_BLOB_NO_SIMPLE);
-               Block.group = NULL;
-       }
-
-       ~KaxBlockBlob() {
-#if MATROSKA_VERSION >= 2
-               if (bUseSimpleBlock)
-                       delete Block.simpleblock;
-               else
-#endif // MATROSKA_VERSION
-                       delete Block.group;
-       }
-
-       operator KaxBlockGroup &();
-       operator const KaxBlockGroup &() const;
-#if MATROSKA_VERSION >= 2
-       operator KaxSimpleBlock &();
-#endif
-       operator KaxInternalBlock &();
-       operator const KaxInternalBlock &() const;
-
-       void SetBlockGroup( KaxBlockGroup &BlockRef );
-
-       void SetBlockDuration(uint64 TimeLength);
-
-       void SetParent(KaxCluster & aParentCluster);
-       bool AddFrameAuto(const KaxTrackEntry & track, uint64 timecode, DataBuffer & buffer, LacingType lacing = LACING_AUTO, const KaxBlockBlob * PastBlock = NULL, const KaxBlockBlob * ForwBlock = NULL);
-
-       bool IsSimpleBlock() const {return bUseSimpleBlock;}
-
-       bool ReplaceSimpleByGroup();
-protected:
-       KaxCluster * ParentCluster;
-       union {
-               KaxBlockGroup *group;
-#if MATROSKA_VERSION >= 2
-               KaxSimpleBlock *simpleblock;
-#endif // MATROSKA_VERSION
-       } Block;
-       bool bUseSimpleBlock;
-       BlockBlobType SimpleBlockMode;
-};
-
-class MATROSKA_DLL_API KaxBlockDuration : public EbmlUInteger {
-       public:
-               KaxBlockDuration() {}
-               KaxBlockDuration(const KaxBlockDuration & ElementToClone) :EbmlUInteger(ElementToClone) {}
-        
-        EBML_CONCRETE_CLASS(KaxBlockDuration)
-};
-
-#if MATROSKA_VERSION >= 2
-class MATROSKA_DLL_API KaxBlockVirtual : public EbmlBinary {
-       public:
-               KaxBlockVirtual() :ParentCluster(NULL) {SetBuffer(DataBlock,sizeof(DataBlock)); SetValueIsSet(false);}
-               KaxBlockVirtual(const KaxBlockVirtual & ElementToClone);
-               bool ValidateSize() const {return true;}
-
-               /*!
-                       \note override this function to generate the Data/Size on the fly, unlike the usual binary elements
-               */
-               uint64 UpdateSize(bool bSaveDefault = false, bool bForceRender = false);
-
-               void SetParent(const KaxCluster & aParentCluster) {ParentCluster = &aParentCluster;}
-
-       protected:
-               uint64 Timecode; // temporary timecode of the first frame if there are more than one
-               uint16 TrackNumber;
-               binary DataBlock[5];
-
-               const KaxCluster * ParentCluster;
-        
-        EBML_CONCRETE_CLASS(KaxBlockVirtual)
-};
-#endif // MATROSKA_VERSION
-
-class MATROSKA_DLL_API KaxBlockAdditional : public EbmlBinary {
-       public:
-               KaxBlockAdditional() {}
-               KaxBlockAdditional(const KaxBlockAdditional & ElementToClone) :EbmlBinary(ElementToClone){}
-        bool ValidateSize() const {return true;}
-
-        EBML_CONCRETE_CLASS(KaxBlockAdditional)
-};
-
-class MATROSKA_DLL_API KaxBlockAdditions : public EbmlMaster {
-       public:
-               KaxBlockAdditions();
-               KaxBlockAdditions(const KaxBlockAdditions & ElementToClone) :EbmlMaster(ElementToClone) {}
-        
-        EBML_CONCRETE_CLASS(KaxBlockAdditions)
-};
-
-class MATROSKA_DLL_API KaxBlockMore : public EbmlMaster {
-       public:
-               KaxBlockMore();
-               KaxBlockMore(const KaxBlockMore & ElementToClone) :EbmlMaster(ElementToClone) {}
-        
-        EBML_CONCRETE_CLASS(KaxBlockMore)
-};
-
-class MATROSKA_DLL_API KaxBlockAddID : public EbmlUInteger {
-       public:
-               KaxBlockAddID() :EbmlUInteger(1) {}
-               KaxBlockAddID(const KaxBlockAddID & ElementToClone) :EbmlUInteger(ElementToClone) {}
-        
-        EBML_CONCRETE_CLASS(KaxBlockAddID)
-};
-
-class MATROSKA_DLL_API KaxCodecState : public EbmlBinary {
-       public:
-               KaxCodecState() {}
-               KaxCodecState(const KaxCodecState & ElementToClone) :EbmlBinary(ElementToClone){}
-
-        bool ValidateSize() const {return true;}
-
-        EBML_CONCRETE_CLASS(KaxCodecState)
-};
-
-END_LIBMATROSKA_NAMESPACE
-
-#endif // LIBMATROSKA_BLOCK_H
+/****************************************************************************\r
+** libmatroska : parse Matroska files, see http://www.matroska.org/\r
+**\r
+** <file/class description>\r
+**\r
+** Copyright (C) 2002-2010 Steve Lhomme.  All rights reserved.\r
+**\r
+** This library is free software; you can redistribute it and/or\r
+** modify it under the terms of the GNU Lesser General Public\r
+** License as published by the Free Software Foundation; either\r
+** version 2.1 of the License, or (at your option) any later version.\r
+** \r
+** This library is distributed in the hope that it will be useful,\r
+** but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
+** Lesser General Public License for more details.\r
+** \r
+** You should have received a copy of the GNU Lesser General Public\r
+** License along with this library; if not, write to the Free Software\r
+** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\r
+**\r
+** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**\r
+** Contact license@matroska.org if any conditions of this licensing are\r
+** not clear to you.\r
+**\r
+**********************************************************************/\r
+\r
+/*!\r
+       \file\r
+       \todo add a PureBlock class to group functionalities between Block and BlockVirtual\r
+       \version \$Id: KaxBlock.h,v 1.24 2004/04/14 23:26:17 robux4 Exp $\r
+       \author Steve Lhomme     <robux4 @ users.sf.net>\r
+       \author Julien Coloos    <suiryc @ users.sf.net>\r
+*/\r
+#ifndef LIBMATROSKA_BLOCK_H\r
+#define LIBMATROSKA_BLOCK_H\r
+\r
+#include <vector>\r
+\r
+#include "matroska/KaxTypes.h"\r
+#include "ebml/EbmlBinary.h"\r
+#include "ebml/EbmlMaster.h"\r
+#include "matroska/KaxTracks.h"\r
+\r
+using namespace LIBEBML_NAMESPACE;\r
+\r
+START_LIBMATROSKA_NAMESPACE\r
+\r
+class KaxCluster;\r
+class KaxReferenceBlock;\r
+class KaxInternalBlock;\r
+class KaxBlockBlob;\r
+\r
+class MATROSKA_DLL_API DataBuffer {\r
+       protected:\r
+               binary * myBuffer;\r
+               uint32   mySize;\r
+               bool     bValidValue;\r
+               bool     (*myFreeBuffer)(const DataBuffer & aBuffer); // method to free the internal buffer\r
+\r
+       public:\r
+               DataBuffer(binary * aBuffer, uint32 aSize, bool (*aFreeBuffer)(const DataBuffer & aBuffer) = NULL)\r
+                       :myBuffer(aBuffer)\r
+                       ,mySize(aSize)\r
+                       ,bValidValue(true)      \r
+      ,myFreeBuffer(aFreeBuffer)\r
+               {}\r
+               virtual ~DataBuffer() {}\r
+               virtual binary * Buffer() {return myBuffer;}\r
+               virtual uint32   & Size() {return mySize;};\r
+               virtual const binary * Buffer() const {return myBuffer;}\r
+               virtual const uint32   Size()   const {return mySize;};\r
+               bool    FreeBuffer(const DataBuffer & aBuffer) {\r
+                       bool bResult = true;\r
+                       if (myBuffer != NULL && myFreeBuffer != NULL && bValidValue) {\r
+                               bResult = myFreeBuffer(aBuffer);\r
+                               myBuffer = NULL;\r
+                               bValidValue = false;\r
+                       }\r
+                       return bResult;\r
+               }\r
+\r
+               virtual DataBuffer * Clone();\r
+};\r
+\r
+class MATROSKA_DLL_API SimpleDataBuffer : public DataBuffer {\r
+       public:\r
+               SimpleDataBuffer(binary * aBuffer, uint32 aSize, uint32 aOffset, bool (*aFreeBuffer)(const DataBuffer & aBuffer) = myFreeBuffer)\r
+                       :DataBuffer(aBuffer + aOffset, aSize, aFreeBuffer)\r
+                       ,Offset(aOffset)\r
+                       ,BaseBuffer(aBuffer)\r
+               {}\r
+               virtual ~SimpleDataBuffer() {}\r
+\r
+               DataBuffer * Clone() {return new SimpleDataBuffer(*this);}\r
+\r
+       protected:\r
+               uint32 Offset;\r
+               binary * BaseBuffer;\r
+\r
+               static bool myFreeBuffer(const DataBuffer & aBuffer)\r
+               {\r
+                       binary *_Buffer = static_cast<const SimpleDataBuffer*>(&aBuffer)->BaseBuffer;\r
+                       if (_Buffer != NULL)\r
+                               free(_Buffer);\r
+                       return true;\r
+               }\r
+\r
+               SimpleDataBuffer(const SimpleDataBuffer & ToClone);\r
+};\r
+\r
+/*!\r
+       \note the data is copied locally, it can be freed right away\r
+* /\r
+class MATROSKA_DLL_API NotSoSimpleDataBuffer : public SimpleDataBuffer {\r
+       public:\r
+               NotSoSimpleDataBuffer(binary * aBuffer, uint32 aSize, uint32 aOffset)\r
+                       :SimpleDataBuffer(new binary[aSize - aOffset], aSize, 0)\r
+               {\r
+                       memcpy(BaseBuffer, aBuffer + aOffset, aSize - aOffset);\r
+               }\r
+};\r
+*/\r
+\r
+class MATROSKA_DLL_API KaxBlockGroup : public EbmlMaster {\r
+       public:\r
+               KaxBlockGroup();\r
+               KaxBlockGroup(const KaxBlockGroup & ElementToClone) :EbmlMaster(ElementToClone) {}\r
+\r
+               ~KaxBlockGroup();\r
+\r
+               /*!\r
+                       \brief Addition of a frame without references\r
+               */\r
+               bool AddFrame(const KaxTrackEntry & track, uint64 timecode, DataBuffer & buffer, LacingType lacing = LACING_AUTO);\r
+               /*!\r
+                       \brief Addition of a frame with a backward reference (P frame)\r
+               */\r
+               bool AddFrame(const KaxTrackEntry & track, uint64 timecode, DataBuffer & buffer, const KaxBlockGroup & PastBlock, LacingType lacing = LACING_AUTO);\r
+\r
+               /*!\r
+                       \brief Addition of a frame with a backward+forward reference (B frame)\r
+               */\r
+               bool AddFrame(const KaxTrackEntry & track, uint64 timecode, DataBuffer & buffer, const KaxBlockGroup & PastBlock, const KaxBlockGroup & ForwBlock, LacingType lacing = LACING_AUTO);\r
+               bool AddFrame(const KaxTrackEntry & track, uint64 timecode, DataBuffer & buffer, const KaxBlockBlob * PastBlock, const KaxBlockBlob * ForwBlock, LacingType lacing = LACING_AUTO);\r
+\r
+               void SetParent(KaxCluster & aParentCluster);\r
+\r
+               void SetParentTrack(const KaxTrackEntry & aParentTrack) {\r
+                       ParentTrack = &aParentTrack;\r
+               }\r
+\r
+               /*!\r
+                       \brief Set the duration of the contained frame(s) (for the total number of frames)\r
+               */\r
+               void SetBlockDuration(uint64 TimeLength);\r
+               bool GetBlockDuration(uint64 &TheTimecode) const;\r
+\r
+               /*!\r
+                       \return the global timecode of this Block (not just the delta to the Cluster)\r
+               */\r
+               uint64 GlobalTimecode() const;\r
+               uint64 GlobalTimecodeScale() const {\r
+                       assert(ParentTrack != NULL);\r
+                       return ParentTrack->GlobalTimecodeScale();\r
+               }\r
+\r
+               uint16 TrackNumber() const;\r
+\r
+               uint64 ClusterPosition() const;\r
+               \r
+               /*!\r
+                       \return the number of references to other frames\r
+               */\r
+               unsigned int ReferenceCount() const;\r
+               const KaxReferenceBlock & Reference(unsigned int Index) const;\r
+\r
+               /*!\r
+                       \brief release all the frames of all Blocks\r
+               */\r
+               void ReleaseFrames();\r
+\r
+               operator KaxInternalBlock &();\r
+\r
+               const KaxCluster *GetParentCluster() const { return ParentCluster; }\r
+\r
+       protected:\r
+               KaxCluster * ParentCluster;\r
+               const KaxTrackEntry * ParentTrack;\r
+        \r
+        EBML_CONCRETE_CLASS(KaxBlockGroup)\r
+};\r
+\r
+class KaxInternalBlock : public EbmlBinary {\r
+       public:\r
+               KaxInternalBlock( bool bSimple ) :bLocalTimecodeUsed(false), mLacing(LACING_AUTO), mInvisible(false)\r
+                       ,ParentCluster(NULL), bIsSimple(bSimple), bIsKeyframe(true), bIsDiscardable(false)\r
+               {}\r
+               KaxInternalBlock(const KaxInternalBlock & ElementToClone);\r
+               ~KaxInternalBlock();\r
+               bool ValidateSize() const;\r
+\r
+               uint16 TrackNum() const {return TrackNumber;}\r
+               /*!\r
+                       \todo !!!! This method needs to be changes !\r
+               */\r
+               uint64 GlobalTimecode() const {return Timecode;}\r
+\r
+               /*!\r
+                       \note override this function to generate the Data/Size on the fly, unlike the usual binary elements\r
+               */\r
+               uint64 UpdateSize(bool bSaveDefault = false, bool bForceRender = false);\r
+               uint64 ReadData(IOCallback & input, ScopeMode ReadFully = SCOPE_ALL_DATA);\r
+               \r
+               /*!\r
+                       \brief Only read the head of the Block (not internal data)\r
+                       \note convenient when you are parsing the file quickly\r
+               */\r
+               uint64 ReadInternalHead(IOCallback & input);\r
+               \r
+               unsigned int NumberFrames() const { return SizeList.size();}\r
+               DataBuffer & GetBuffer(unsigned int iIndex) {return *myBuffers[iIndex];}\r
+\r
+               bool AddFrame(const KaxTrackEntry & track, uint64 timecode, DataBuffer & buffer, LacingType lacing = LACING_AUTO, bool invisible = false);\r
+\r
+               /*!\r
+                       \brief release all the frames of all Blocks\r
+               */\r
+               void ReleaseFrames();\r
+\r
+               void SetParent(KaxCluster & aParentCluster);\r
+\r
+               /*!\r
+                       \return Returns the lacing type that produces the smallest footprint.\r
+               */\r
+               LacingType GetBestLacingType() const;\r
+\r
+               /*!\r
+                       \param FrameNumber 0 for the first frame\r
+                       \return the position in the stream for a given frame\r
+                       \note return -1 if the position doesn't exist\r
+               */\r
+               int64 GetDataPosition(size_t FrameNumber = 0);\r
+\r
+               /*!\r
+                       \param FrameNumber 0 for the first frame\r
+                       \return the size of a given frame\r
+                       \note return -1 if the position doesn't exist\r
+               */\r
+               int64 GetFrameSize(size_t FrameNumber = 0);\r
+               \r
+               bool IsInvisible() const { return mInvisible; }\r
+\r
+               uint64 ClusterPosition() const;\r
+\r
+       protected:\r
+               std::vector<DataBuffer *> myBuffers;\r
+               std::vector<int32>        SizeList;\r
+               uint64     Timecode; // temporary timecode of the first frame, non scaled\r
+               int16      LocalTimecode;\r
+               bool       bLocalTimecodeUsed;\r
+               uint16     TrackNumber;\r
+               LacingType mLacing;\r
+               bool       mInvisible;\r
+               uint64     FirstFrameLocation;\r
+\r
+               uint32 RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault = false);\r
+\r
+               KaxCluster * ParentCluster;\r
+               bool       bIsSimple;\r
+               bool       bIsKeyframe;\r
+               bool       bIsDiscardable;\r
+};\r
+\r
+class MATROSKA_DLL_API KaxBlock : public KaxInternalBlock {\r
+       public:\r
+               KaxBlock() :KaxInternalBlock(false) {}\r
+        \r
+        EBML_CONCRETE_CLASS(KaxBlock)\r
+};\r
+\r
+#if MATROSKA_VERSION >= 2\r
+class MATROSKA_DLL_API KaxSimpleBlock : public KaxInternalBlock {\r
+       public:\r
+               KaxSimpleBlock() :KaxInternalBlock(true) {}\r
+\r
+               void SetKeyframe(bool b_keyframe) { bIsKeyframe = b_keyframe; }\r
+               void SetDiscardable(bool b_discard) { bIsDiscardable = b_discard; }\r
+\r
+               bool IsKeyframe() const    { return bIsKeyframe; }\r
+               bool IsDiscardable() const { return bIsDiscardable; }\r
+\r
+               operator KaxInternalBlock &() { return *this; }\r
+        \r
+        EBML_CONCRETE_CLASS(KaxSimpleBlock)\r
+};\r
+#endif // MATROSKA_VERSION\r
+\r
+class MATROSKA_DLL_API KaxBlockBlob {\r
+public:\r
+       KaxBlockBlob(BlockBlobType sblock_mode) :ParentCluster(NULL), SimpleBlockMode(sblock_mode) {\r
+               bUseSimpleBlock = (sblock_mode != BLOCK_BLOB_NO_SIMPLE);\r
+               Block.group = NULL;\r
+       }\r
+\r
+       ~KaxBlockBlob() {\r
+#if MATROSKA_VERSION >= 2\r
+               if (bUseSimpleBlock)\r
+                       delete Block.simpleblock;\r
+               else\r
+#endif // MATROSKA_VERSION\r
+                       delete Block.group;\r
+       }\r
+\r
+       operator KaxBlockGroup &();\r
+       operator const KaxBlockGroup &() const;\r
+#if MATROSKA_VERSION >= 2\r
+       operator KaxSimpleBlock &();\r
+#endif\r
+       operator KaxInternalBlock &();\r
+       operator const KaxInternalBlock &() const;\r
+\r
+       void SetBlockGroup( KaxBlockGroup &BlockRef );\r
+\r
+       void SetBlockDuration(uint64 TimeLength);\r
+\r
+       void SetParent(KaxCluster & aParentCluster);\r
+       bool AddFrameAuto(const KaxTrackEntry & track, uint64 timecode, DataBuffer & buffer, LacingType lacing = LACING_AUTO, const KaxBlockBlob * PastBlock = NULL, const KaxBlockBlob * ForwBlock = NULL);\r
+\r
+       bool IsSimpleBlock() const {return bUseSimpleBlock;}\r
+\r
+       bool ReplaceSimpleByGroup();\r
+protected:\r
+       KaxCluster * ParentCluster;\r
+       union {\r
+               KaxBlockGroup *group;\r
+#if MATROSKA_VERSION >= 2\r
+               KaxSimpleBlock *simpleblock;\r
+#endif // MATROSKA_VERSION\r
+       } Block;\r
+       bool bUseSimpleBlock;\r
+       BlockBlobType SimpleBlockMode;\r
+};\r
+\r
+class MATROSKA_DLL_API KaxBlockDuration : public EbmlUInteger {\r
+       public:\r
+               KaxBlockDuration() {}\r
+               KaxBlockDuration(const KaxBlockDuration & ElementToClone) :EbmlUInteger(ElementToClone) {}\r
+        \r
+        EBML_CONCRETE_CLASS(KaxBlockDuration)\r
+};\r
+\r
+#if MATROSKA_VERSION >= 2\r
+class MATROSKA_DLL_API KaxBlockVirtual : public EbmlBinary {\r
+       public:\r
+               KaxBlockVirtual() :ParentCluster(NULL) {SetBuffer(DataBlock,sizeof(DataBlock)); SetValueIsSet(false);}\r
+               KaxBlockVirtual(const KaxBlockVirtual & ElementToClone);\r
+               bool ValidateSize() const {return true;}\r
+\r
+               /*!\r
+                       \note override this function to generate the Data/Size on the fly, unlike the usual binary elements\r
+               */\r
+               uint64 UpdateSize(bool bSaveDefault = false, bool bForceRender = false);\r
+\r
+               void SetParent(const KaxCluster & aParentCluster) {ParentCluster = &aParentCluster;}\r
+\r
+       protected:\r
+               uint64 Timecode; // temporary timecode of the first frame if there are more than one\r
+               uint16 TrackNumber;\r
+               binary DataBlock[5];\r
+\r
+               const KaxCluster * ParentCluster;\r
+        \r
+        EBML_CONCRETE_CLASS(KaxBlockVirtual)\r
+};\r
+#endif // MATROSKA_VERSION\r
+\r
+class MATROSKA_DLL_API KaxBlockAdditional : public EbmlBinary {\r
+       public:\r
+               KaxBlockAdditional() {}\r
+               KaxBlockAdditional(const KaxBlockAdditional & ElementToClone) :EbmlBinary(ElementToClone){}\r
+        bool ValidateSize() const {return true;}\r
+\r
+        EBML_CONCRETE_CLASS(KaxBlockAdditional)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxBlockAdditions : public EbmlMaster {\r
+       public:\r
+               KaxBlockAdditions();\r
+               KaxBlockAdditions(const KaxBlockAdditions & ElementToClone) :EbmlMaster(ElementToClone) {}\r
+        \r
+        EBML_CONCRETE_CLASS(KaxBlockAdditions)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxBlockMore : public EbmlMaster {\r
+       public:\r
+               KaxBlockMore();\r
+               KaxBlockMore(const KaxBlockMore & ElementToClone) :EbmlMaster(ElementToClone) {}\r
+        \r
+        EBML_CONCRETE_CLASS(KaxBlockMore)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxBlockAddID : public EbmlUInteger {\r
+       public:\r
+               KaxBlockAddID() :EbmlUInteger(1) {}\r
+               KaxBlockAddID(const KaxBlockAddID & ElementToClone) :EbmlUInteger(ElementToClone) {}\r
+        \r
+        EBML_CONCRETE_CLASS(KaxBlockAddID)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxCodecState : public EbmlBinary {\r
+       public:\r
+               KaxCodecState() {}\r
+               KaxCodecState(const KaxCodecState & ElementToClone) :EbmlBinary(ElementToClone){}\r
+\r
+        bool ValidateSize() const {return true;}\r
+\r
+        EBML_CONCRETE_CLASS(KaxCodecState)\r
+};\r
+\r
+END_LIBMATROSKA_NAMESPACE\r
+\r
+#endif // LIBMATROSKA_BLOCK_H\r
index f2099930b58cb0c6f72eceb425bec69b3be51a08..38a5706b15fe69608d87170e946d219d6cf7d0a4 100644 (file)
-/****************************************************************************
-** libmatroska : parse Matroska files, see http://www.matroska.org/
-**
-** <file/class description>
-**
-** Copyright (C) 2002-2005 Steve Lhomme.  All rights reserved.
-**
-** This library is free software; you can redistribute it and/or
-** modify it under the terms of the GNU Lesser General Public
-** License as published by the Free Software Foundation; either
-** version 2.1 of the License, or (at your option) any later version.
-** 
-** This library is distributed in the hope that it will be useful,
-** but WITHOUT ANY WARRANTY; without even the implied warranty of
-** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-** Lesser General Public License for more details.
-** 
-** You should have received a copy of the GNU Lesser General Public
-** License along with this library; if not, write to the Free Software
-** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-**
-** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**
-** Contact license@matroska.org if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-/*!
-       \file
-       \version \$Id: KaxBlockData.h,v 1.10 2004/04/14 23:26:17 robux4 Exp $
-       \author Steve Lhomme     <robux4 @ users.sf.net>
-*/
-#ifndef LIBMATROSKA_BLOCK_ADDITIONAL_H
-#define LIBMATROSKA_BLOCK_ADDITIONAL_H
-
-#include "matroska/KaxTypes.h"
-#include "ebml/EbmlMaster.h"
-#include "ebml/EbmlUInteger.h"
-#include "ebml/EbmlSInteger.h"
-
-using namespace LIBEBML_NAMESPACE;
-
-START_LIBMATROSKA_NAMESPACE
-
-class KaxReferenceBlock;
-class KaxBlockGroup;
-class KaxBlockBlob;
-
-class MATROSKA_DLL_API KaxReferencePriority : public EbmlUInteger {
-       public:
-               KaxReferencePriority() :EbmlUInteger(0) {}
-               KaxReferencePriority(const KaxReferencePriority & ElementToClone) :EbmlUInteger(ElementToClone) {}
-        
-        EBML_CONCRETE_CLASS(KaxReferencePriority)
-};
-
-/*!
-       \brief element used for B frame-likes
-*/
-class MATROSKA_DLL_API KaxReferenceBlock : public EbmlSInteger {
-       public:
-               KaxReferenceBlock() :RefdBlock(NULL), ParentBlock(NULL) {bTimecodeSet = false;}
-               KaxReferenceBlock(const KaxReferenceBlock & ElementToClone) :EbmlSInteger(ElementToClone), bTimecodeSet(ElementToClone.bTimecodeSet) {}
-               
-               /*!
-                       \brief override this method to compute the timecode value
-               */
-               virtual uint64 UpdateSize(bool bSaveDefault = false, bool bForceRender = false);
-
-               const KaxBlockBlob & RefBlock() const;
-               void SetReferencedBlock(const KaxBlockBlob * aRefdBlock);
-               void SetReferencedBlock(const KaxBlockGroup & aRefdBlock);
-               void SetParentBlock(const KaxBlockGroup & aParentBlock) {ParentBlock = &aParentBlock;}
-               
-       protected:
-               const KaxBlockBlob * RefdBlock;
-               const KaxBlockGroup * ParentBlock;
-               void SetReferencedTimecode(int64 refTimecode) {*static_cast<EbmlSInteger*>(this) = refTimecode; bTimecodeSet = true;};
-               bool bTimecodeSet;
-        
-        EBML_CONCRETE_CLASS(KaxReferenceBlock)
-};
-
-#if MATROSKA_VERSION >= 2
-class MATROSKA_DLL_API KaxReferenceVirtual : public EbmlSInteger {
-       public:
-               KaxReferenceVirtual() {}
-               KaxReferenceVirtual(const KaxReferenceVirtual & ElementToClone) :EbmlSInteger(ElementToClone) {}
-        
-        EBML_CONCRETE_CLASS(KaxReferenceVirtual)
-};
-#endif // MATROSKA_VERSION
-
-class MATROSKA_DLL_API KaxTimeSlice : public EbmlMaster {
-       public:
-               KaxTimeSlice();
-               KaxTimeSlice(const KaxTimeSlice & ElementToClone) :EbmlMaster(ElementToClone) {}
-        
-        EBML_CONCRETE_CLASS(KaxTimeSlice)
-};
-
-class MATROSKA_DLL_API KaxSlices : public EbmlMaster {
-       public:
-               KaxSlices();
-               KaxSlices(const KaxSlices & ElementToClone) :EbmlMaster(ElementToClone) {}
-        
-        EBML_CONCRETE_CLASS(KaxSlices)
-};
-
-class MATROSKA_DLL_API KaxSliceLaceNumber : public EbmlUInteger {
-       public:
-               KaxSliceLaceNumber() :EbmlUInteger(0) {}
-               KaxSliceLaceNumber(const KaxSliceLaceNumber & ElementToClone) :EbmlUInteger(ElementToClone) {}
-        
-        EBML_CONCRETE_CLASS(KaxSliceLaceNumber)
-};
-
-class MATROSKA_DLL_API KaxSliceFrameNumber : public EbmlUInteger {
-       public:
-               KaxSliceFrameNumber() :EbmlUInteger(0) {}
-               KaxSliceFrameNumber(const KaxSliceFrameNumber & ElementToClone) :EbmlUInteger(ElementToClone) {}
-        
-        EBML_CONCRETE_CLASS(KaxSliceFrameNumber)
-};
-
-class MATROSKA_DLL_API KaxSliceBlockAddID : public EbmlUInteger {
-       public:
-               KaxSliceBlockAddID() :EbmlUInteger(0) {}
-               KaxSliceBlockAddID(const KaxSliceBlockAddID & ElementToClone) :EbmlUInteger(ElementToClone) {}
-        
-        EBML_CONCRETE_CLASS(KaxSliceBlockAddID)
-};
-
-class MATROSKA_DLL_API KaxSliceDelay : public EbmlUInteger {
-       public:
-               KaxSliceDelay() :EbmlUInteger(0) {}
-               KaxSliceDelay(const KaxSliceDelay & ElementToClone) :EbmlUInteger(ElementToClone) {}
-        
-        EBML_CONCRETE_CLASS(KaxSliceDelay)
-};
-
-class MATROSKA_DLL_API KaxSliceDuration : public EbmlUInteger {
-       public:
-               KaxSliceDuration() {}
-               KaxSliceDuration(const KaxSliceDuration & ElementToClone) :EbmlUInteger(ElementToClone) {}
-        
-        EBML_CONCRETE_CLASS(KaxSliceDuration)
-};
-
-END_LIBMATROSKA_NAMESPACE
-
-#endif // LIBMATROSKA_BLOCK_ADDITIONAL_H
+/****************************************************************************\r
+** libmatroska : parse Matroska files, see http://www.matroska.org/\r
+**\r
+** <file/class description>\r
+**\r
+** Copyright (C) 2002-2010 Steve Lhomme.  All rights reserved.\r
+**\r
+** This library is free software; you can redistribute it and/or\r
+** modify it under the terms of the GNU Lesser General Public\r
+** License as published by the Free Software Foundation; either\r
+** version 2.1 of the License, or (at your option) any later version.\r
+** \r
+** This library is distributed in the hope that it will be useful,\r
+** but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
+** Lesser General Public License for more details.\r
+** \r
+** You should have received a copy of the GNU Lesser General Public\r
+** License along with this library; if not, write to the Free Software\r
+** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\r
+**\r
+** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**\r
+** Contact license@matroska.org if any conditions of this licensing are\r
+** not clear to you.\r
+**\r
+**********************************************************************/\r
+\r
+/*!\r
+       \file\r
+       \version \$Id: KaxBlockData.h,v 1.10 2004/04/14 23:26:17 robux4 Exp $\r
+       \author Steve Lhomme     <robux4 @ users.sf.net>\r
+*/\r
+#ifndef LIBMATROSKA_BLOCK_ADDITIONAL_H\r
+#define LIBMATROSKA_BLOCK_ADDITIONAL_H\r
+\r
+#include "matroska/KaxTypes.h"\r
+#include "ebml/EbmlMaster.h"\r
+#include "ebml/EbmlUInteger.h"\r
+#include "ebml/EbmlSInteger.h"\r
+\r
+using namespace LIBEBML_NAMESPACE;\r
+\r
+START_LIBMATROSKA_NAMESPACE\r
+\r
+class KaxReferenceBlock;\r
+class KaxBlockGroup;\r
+class KaxBlockBlob;\r
+\r
+class MATROSKA_DLL_API KaxReferencePriority : public EbmlUInteger {\r
+       public:\r
+               KaxReferencePriority() :EbmlUInteger(0) {}\r
+               KaxReferencePriority(const KaxReferencePriority & ElementToClone) :EbmlUInteger(ElementToClone) {}\r
+        \r
+        EBML_CONCRETE_CLASS(KaxReferencePriority)\r
+};\r
+\r
+/*!\r
+       \brief element used for B frame-likes\r
+*/\r
+class MATROSKA_DLL_API KaxReferenceBlock : public EbmlSInteger {\r
+       public:\r
+               KaxReferenceBlock() :RefdBlock(NULL), ParentBlock(NULL) {bTimecodeSet = false;}\r
+               KaxReferenceBlock(const KaxReferenceBlock & ElementToClone) :EbmlSInteger(ElementToClone), bTimecodeSet(ElementToClone.bTimecodeSet) {}\r
+               \r
+               /*!\r
+                       \brief override this method to compute the timecode value\r
+               */\r
+               virtual uint64 UpdateSize(bool bSaveDefault = false, bool bForceRender = false);\r
+\r
+               const KaxBlockBlob & RefBlock() const;\r
+               void SetReferencedBlock(const KaxBlockBlob * aRefdBlock);\r
+               void SetReferencedBlock(const KaxBlockGroup & aRefdBlock);\r
+               void SetParentBlock(const KaxBlockGroup & aParentBlock) {ParentBlock = &aParentBlock;}\r
+               \r
+       protected:\r
+               const KaxBlockBlob * RefdBlock;\r
+               const KaxBlockGroup * ParentBlock;\r
+               void SetReferencedTimecode(int64 refTimecode) {*static_cast<EbmlSInteger*>(this) = refTimecode; bTimecodeSet = true;};\r
+               bool bTimecodeSet;\r
+        \r
+        EBML_CONCRETE_CLASS(KaxReferenceBlock)\r
+};\r
+\r
+#if MATROSKA_VERSION >= 2\r
+class MATROSKA_DLL_API KaxReferenceVirtual : public EbmlSInteger {\r
+       public:\r
+               KaxReferenceVirtual() {}\r
+               KaxReferenceVirtual(const KaxReferenceVirtual & ElementToClone) :EbmlSInteger(ElementToClone) {}\r
+        \r
+        EBML_CONCRETE_CLASS(KaxReferenceVirtual)\r
+};\r
+#endif // MATROSKA_VERSION\r
+\r
+class MATROSKA_DLL_API KaxTimeSlice : public EbmlMaster {\r
+       public:\r
+               KaxTimeSlice();\r
+               KaxTimeSlice(const KaxTimeSlice & ElementToClone) :EbmlMaster(ElementToClone) {}\r
+        \r
+        EBML_CONCRETE_CLASS(KaxTimeSlice)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxSlices : public EbmlMaster {\r
+       public:\r
+               KaxSlices();\r
+               KaxSlices(const KaxSlices & ElementToClone) :EbmlMaster(ElementToClone) {}\r
+        \r
+        EBML_CONCRETE_CLASS(KaxSlices)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxSliceLaceNumber : public EbmlUInteger {\r
+       public:\r
+               KaxSliceLaceNumber() :EbmlUInteger(0) {}\r
+               KaxSliceLaceNumber(const KaxSliceLaceNumber & ElementToClone) :EbmlUInteger(ElementToClone) {}\r
+        \r
+        EBML_CONCRETE_CLASS(KaxSliceLaceNumber)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxSliceFrameNumber : public EbmlUInteger {\r
+       public:\r
+               KaxSliceFrameNumber() :EbmlUInteger(0) {}\r
+               KaxSliceFrameNumber(const KaxSliceFrameNumber & ElementToClone) :EbmlUInteger(ElementToClone) {}\r
+        \r
+        EBML_CONCRETE_CLASS(KaxSliceFrameNumber)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxSliceBlockAddID : public EbmlUInteger {\r
+       public:\r
+               KaxSliceBlockAddID() :EbmlUInteger(0) {}\r
+               KaxSliceBlockAddID(const KaxSliceBlockAddID & ElementToClone) :EbmlUInteger(ElementToClone) {}\r
+        \r
+        EBML_CONCRETE_CLASS(KaxSliceBlockAddID)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxSliceDelay : public EbmlUInteger {\r
+       public:\r
+               KaxSliceDelay() :EbmlUInteger(0) {}\r
+               KaxSliceDelay(const KaxSliceDelay & ElementToClone) :EbmlUInteger(ElementToClone) {}\r
+        \r
+        EBML_CONCRETE_CLASS(KaxSliceDelay)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxSliceDuration : public EbmlUInteger {\r
+       public:\r
+               KaxSliceDuration() {}\r
+               KaxSliceDuration(const KaxSliceDuration & ElementToClone) :EbmlUInteger(ElementToClone) {}\r
+        \r
+        EBML_CONCRETE_CLASS(KaxSliceDuration)\r
+};\r
+\r
+END_LIBMATROSKA_NAMESPACE\r
+\r
+#endif // LIBMATROSKA_BLOCK_ADDITIONAL_H\r
index 2c276978986ac1ec4bf1fa6466ee5a54019f0f19..1f1f72030bb7562d6369c06215f668b646f7b46d 100644 (file)
-/****************************************************************************
-** libmatroska : parse Matroska files, see http://www.matroska.org/
-**
-** <file/class description>
-**
-** Copyright (C) 2002-2005 Steve Lhomme.  All rights reserved.
-**
-** This file is part of libmatroska.
-**
-** This library is free software; you can redistribute it and/or
-** modify it under the terms of the GNU Lesser General Public
-** License as published by the Free Software Foundation; either
-** version 2.1 of the License, or (at your option) any later version.
-** 
-** This library is distributed in the hope that it will be useful,
-** but WITHOUT ANY WARRANTY; without even the implied warranty of
-** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-** Lesser General Public License for more details.
-** 
-** You should have received a copy of the GNU Lesser General Public
-** License along with this library; if not, write to the Free Software
-** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-**
-** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**
-** Contact license@matroska.org if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-/*!
-       \file
-       \version \$Id: KaxChapters.h,v 1.9 2004/04/14 23:26:17 robux4 Exp $
-       \author Steve Lhomme     <robux4 @ users.sf.net>
-*/
-#ifndef LIBMATROSKA_CHAPTERS_H
-#define LIBMATROSKA_CHAPTERS_H
-
-#include "matroska/KaxTypes.h"
-#include "ebml/EbmlMaster.h"
-#include "ebml/EbmlUInteger.h"
-#include "ebml/EbmlUnicodeString.h"
-#include "ebml/EbmlString.h"
-#include "ebml/EbmlBinary.h"
-
-using namespace LIBEBML_NAMESPACE;
-
-START_LIBMATROSKA_NAMESPACE
-
-class MATROSKA_DLL_API KaxChapters : public EbmlMaster {
-       public:
-               KaxChapters();
-               KaxChapters(const KaxChapters & ElementToClone) :EbmlMaster(ElementToClone) {}
-        
-        EBML_CONCRETE_CLASS(KaxChapters)
-};
-
-class MATROSKA_DLL_API KaxEditionEntry : public EbmlMaster {
-       public:
-               KaxEditionEntry();
-               KaxEditionEntry(const KaxEditionEntry & ElementToClone) :EbmlMaster(ElementToClone) {}
-        
-        EBML_CONCRETE_CLASS(KaxEditionEntry)
-};
-
-class MATROSKA_DLL_API KaxEditionUID : public EbmlUInteger {
-    public:
-        KaxEditionUID() {}
-           KaxEditionUID(const KaxEditionUID & ElementToClone) :EbmlUInteger(ElementToClone) {}
-            
-        EBML_CONCRETE_CLASS(KaxEditionUID)
-};
-
-class MATROSKA_DLL_API KaxEditionFlagHidden : public EbmlUInteger {
-    public:
-        KaxEditionFlagHidden(): EbmlUInteger(0) {}
-           KaxEditionFlagHidden(const KaxEditionFlagHidden & ElementToClone) :EbmlUInteger(ElementToClone) {}
-        
-        EBML_CONCRETE_CLASS(KaxEditionFlagHidden)
-};
-
-class MATROSKA_DLL_API KaxEditionFlagDefault : public EbmlUInteger {
-    public:
-        KaxEditionFlagDefault(): EbmlUInteger(0) {}
-           KaxEditionFlagDefault(const KaxEditionFlagDefault & ElementToClone) :EbmlUInteger(ElementToClone) {}
-        
-        EBML_CONCRETE_CLASS(KaxEditionFlagDefault)
-};
-
-class MATROSKA_DLL_API KaxEditionFlagOrdered : public EbmlUInteger {
-    public:
-        KaxEditionFlagOrdered(): EbmlUInteger(0) {}
-           KaxEditionFlagOrdered(const KaxEditionFlagOrdered & ElementToClone) :EbmlUInteger(ElementToClone) {}
-        
-        EBML_CONCRETE_CLASS(KaxEditionFlagOrdered)
-};
-
-class MATROSKA_DLL_API KaxChapterAtom : public EbmlMaster {
-    public:
-        KaxChapterAtom();
-           KaxChapterAtom(const KaxChapterAtom & ElementToClone) :EbmlMaster(ElementToClone) {}
-        
-        EBML_CONCRETE_CLASS(KaxChapterAtom)
-};
-
-class MATROSKA_DLL_API KaxChapterUID : public EbmlUInteger {
-    public:
-        KaxChapterUID() {}
-           KaxChapterUID(const KaxChapterUID & ElementToClone) :EbmlUInteger(ElementToClone) {}
-        
-        EBML_CONCRETE_CLASS(KaxChapterUID)
-};
-
-class MATROSKA_DLL_API KaxChapterTimeStart : public EbmlUInteger {
-    public:
-        KaxChapterTimeStart() {}
-           KaxChapterTimeStart(const KaxChapterTimeStart & ElementToClone) :EbmlUInteger(ElementToClone) {}
-        
-        EBML_CONCRETE_CLASS(KaxChapterTimeStart)
-};
-
-class MATROSKA_DLL_API KaxChapterTimeEnd : public EbmlUInteger {
-    public:
-        KaxChapterTimeEnd() {}
-           KaxChapterTimeEnd(const KaxChapterTimeEnd & ElementToClone) :EbmlUInteger(ElementToClone) {}
-        
-        EBML_CONCRETE_CLASS(KaxChapterTimeEnd)
-};
-
-class MATROSKA_DLL_API KaxChapterFlagHidden : public EbmlUInteger {
-    public:
-           KaxChapterFlagHidden(): EbmlUInteger(0) {}
-           KaxChapterFlagHidden(const KaxChapterFlagHidden & ElementToClone) :EbmlUInteger(ElementToClone) {}
-        
-        EBML_CONCRETE_CLASS(KaxChapterFlagHidden)
-};
-
-class MATROSKA_DLL_API KaxChapterFlagEnabled : public EbmlUInteger {
-    public:
-           KaxChapterFlagEnabled(): EbmlUInteger(1) {}
-           KaxChapterFlagEnabled(const KaxChapterFlagEnabled & ElementToClone) :EbmlUInteger(ElementToClone) {}
-        
-        EBML_CONCRETE_CLASS(KaxChapterFlagEnabled)
-};
-
-class MATROSKA_DLL_API KaxChapterSegmentUID : public EbmlBinary {
-    public:
-        KaxChapterSegmentUID() {}
-           KaxChapterSegmentUID(const KaxChapterSegmentUID & ElementToClone) :EbmlBinary(ElementToClone) {}
-           bool ValidateSize() const { return (GetSize() == 16);}
-            
-        EBML_CONCRETE_CLASS(KaxChapterSegmentUID)
-};
-
-class MATROSKA_DLL_API KaxChapterSegmentEditionUID : public EbmlBinary {
-    public:
-        KaxChapterSegmentEditionUID() {}
-           KaxChapterSegmentEditionUID(const KaxChapterSegmentEditionUID & ElementToClone) :EbmlBinary(ElementToClone) {}
-           bool ValidateSize() const { return (GetSize() == 16);}
-        
-        EBML_CONCRETE_CLASS(KaxChapterSegmentEditionUID)
-};
-
-class MATROSKA_DLL_API KaxChapterPhysicalEquiv : public EbmlUInteger {
-    public:
-           KaxChapterPhysicalEquiv(): EbmlUInteger() {}
-           KaxChapterPhysicalEquiv(const KaxChapterPhysicalEquiv & ElementToClone) :EbmlUInteger(ElementToClone) {}
-            
-        EBML_CONCRETE_CLASS(KaxChapterPhysicalEquiv)
-};
-
-class MATROSKA_DLL_API KaxChapterTrack : public EbmlMaster {
-    public:
-        KaxChapterTrack();
-           KaxChapterTrack(const KaxChapterTrack & ElementToClone) :EbmlMaster(ElementToClone) {}
-            
-        EBML_CONCRETE_CLASS(KaxChapterTrack)
-};
-
-class MATROSKA_DLL_API KaxChapterTrackNumber : public EbmlUInteger {
-    public:
-        KaxChapterTrackNumber() {}
-           KaxChapterTrackNumber(const KaxChapterTrackNumber & ElementToClone) :EbmlUInteger(ElementToClone) {}
-        
-        EBML_CONCRETE_CLASS(KaxChapterTrackNumber)
-};
-
-class MATROSKA_DLL_API KaxChapterDisplay : public EbmlMaster {
-    public:
-        KaxChapterDisplay();
-           KaxChapterDisplay(const KaxChapterDisplay & ElementToClone) :EbmlMaster(ElementToClone) {}
-        
-        EBML_CONCRETE_CLASS(KaxChapterDisplay)
-};
-
-class MATROSKA_DLL_API KaxChapterString : public EbmlUnicodeString {
-    public:
-        KaxChapterString() {}
-           KaxChapterString(const KaxChapterString & ElementToClone) :EbmlUnicodeString(ElementToClone) {}
-        
-        EBML_CONCRETE_CLASS(KaxChapterString)
-};
-
-class MATROSKA_DLL_API KaxChapterLanguage : public EbmlString {
-    public:
-        KaxChapterLanguage() :EbmlString("eng") {}
-           KaxChapterLanguage(const KaxChapterLanguage & ElementToClone) :EbmlString(ElementToClone) {}
-        
-        EBML_CONCRETE_CLASS(KaxChapterLanguage)
-};
-
-class MATROSKA_DLL_API KaxChapterCountry : public EbmlString {
-    public:
-        KaxChapterCountry() :EbmlString() {}
-           KaxChapterCountry(const KaxChapterCountry & ElementToClone) :EbmlString(ElementToClone) {}
-        
-        EBML_CONCRETE_CLASS(KaxChapterCountry)
-};
-
-class MATROSKA_DLL_API KaxChapterProcess : public EbmlMaster {
-    public:
-        KaxChapterProcess();
-           KaxChapterProcess(const KaxChapterProcess & ElementToClone) :EbmlMaster(ElementToClone) {}
-        
-        EBML_CONCRETE_CLASS(KaxChapterProcess)
-};
-
-class MATROSKA_DLL_API KaxChapterProcessCodecID : public EbmlUInteger {
-    public:
-        KaxChapterProcessCodecID() :EbmlUInteger(0) {}
-           KaxChapterProcessCodecID(const KaxChapterProcessCodecID & ElementToClone) :EbmlUInteger(ElementToClone) {}
-        
-        EBML_CONCRETE_CLASS(KaxChapterProcessCodecID)
-};
-
-class MATROSKA_DLL_API KaxChapterProcessPrivate : public EbmlBinary {
-    public:
-        KaxChapterProcessPrivate() {}
-           KaxChapterProcessPrivate(const KaxChapterProcessPrivate & ElementToClone) :EbmlBinary(ElementToClone) {}
-           bool ValidateSize() const {return true;}
-        
-        EBML_CONCRETE_CLASS(KaxChapterProcessPrivate)
-};
-
-class MATROSKA_DLL_API KaxChapterProcessCommand : public EbmlMaster {
-    public:
-        KaxChapterProcessCommand();
-           KaxChapterProcessCommand(const KaxChapterProcessCommand & ElementToClone) :EbmlMaster(ElementToClone) {}
-        
-        EBML_CONCRETE_CLASS(KaxChapterProcessCommand)
-};
-
-class MATROSKA_DLL_API KaxChapterProcessTime : public EbmlUInteger {
-    public:
-        KaxChapterProcessTime() {}
-           KaxChapterProcessTime(const KaxChapterProcessTime & ElementToClone) :EbmlUInteger(ElementToClone) {}
-        
-        EBML_CONCRETE_CLASS(KaxChapterProcessTime)
-};
-
-class MATROSKA_DLL_API KaxChapterProcessData : public EbmlBinary {
-    public:
-        KaxChapterProcessData() {}
-           KaxChapterProcessData(const KaxChapterProcessData & ElementToClone) :EbmlBinary(ElementToClone) {}
-           bool ValidateSize() const {return true;}
-        
-        EBML_CONCRETE_CLASS(KaxChapterProcessData)
-};
-
-END_LIBMATROSKA_NAMESPACE
-
-#endif // LIBMATROSKA_CHAPTERS_H
+/****************************************************************************\r
+** libmatroska : parse Matroska files, see http://www.matroska.org/\r
+**\r
+** <file/class description>\r
+**\r
+** Copyright (C) 2002-2010 Steve Lhomme.  All rights reserved.\r
+**\r
+** This file is part of libmatroska.\r
+**\r
+** This library is free software; you can redistribute it and/or\r
+** modify it under the terms of the GNU Lesser General Public\r
+** License as published by the Free Software Foundation; either\r
+** version 2.1 of the License, or (at your option) any later version.\r
+** \r
+** This library is distributed in the hope that it will be useful,\r
+** but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
+** Lesser General Public License for more details.\r
+** \r
+** You should have received a copy of the GNU Lesser General Public\r
+** License along with this library; if not, write to the Free Software\r
+** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\r
+**\r
+** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**\r
+** Contact license@matroska.org if any conditions of this licensing are\r
+** not clear to you.\r
+**\r
+**********************************************************************/\r
+\r
+/*!\r
+       \file\r
+       \version \$Id: KaxChapters.h,v 1.9 2004/04/14 23:26:17 robux4 Exp $\r
+       \author Steve Lhomme     <robux4 @ users.sf.net>\r
+*/\r
+#ifndef LIBMATROSKA_CHAPTERS_H\r
+#define LIBMATROSKA_CHAPTERS_H\r
+\r
+#include "matroska/KaxTypes.h"\r
+#include "ebml/EbmlMaster.h"\r
+#include "ebml/EbmlUInteger.h"\r
+#include "ebml/EbmlUnicodeString.h"\r
+#include "ebml/EbmlString.h"\r
+#include "ebml/EbmlBinary.h"\r
+\r
+using namespace LIBEBML_NAMESPACE;\r
+\r
+START_LIBMATROSKA_NAMESPACE\r
+\r
+class MATROSKA_DLL_API KaxChapters : public EbmlMaster {\r
+       public:\r
+               KaxChapters();\r
+               KaxChapters(const KaxChapters & ElementToClone) :EbmlMaster(ElementToClone) {}\r
+        \r
+        EBML_CONCRETE_CLASS(KaxChapters)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxEditionEntry : public EbmlMaster {\r
+       public:\r
+               KaxEditionEntry();\r
+               KaxEditionEntry(const KaxEditionEntry & ElementToClone) :EbmlMaster(ElementToClone) {}\r
+        \r
+        EBML_CONCRETE_CLASS(KaxEditionEntry)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxEditionUID : public EbmlUInteger {\r
+    public:\r
+        KaxEditionUID() {}\r
+           KaxEditionUID(const KaxEditionUID & ElementToClone) :EbmlUInteger(ElementToClone) {}\r
+            \r
+        EBML_CONCRETE_CLASS(KaxEditionUID)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxEditionFlagHidden : public EbmlUInteger {\r
+    public:\r
+        KaxEditionFlagHidden(): EbmlUInteger(0) {}\r
+           KaxEditionFlagHidden(const KaxEditionFlagHidden & ElementToClone) :EbmlUInteger(ElementToClone) {}\r
+        \r
+        EBML_CONCRETE_CLASS(KaxEditionFlagHidden)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxEditionFlagDefault : public EbmlUInteger {\r
+    public:\r
+        KaxEditionFlagDefault(): EbmlUInteger(0) {}\r
+           KaxEditionFlagDefault(const KaxEditionFlagDefault & ElementToClone) :EbmlUInteger(ElementToClone) {}\r
+        \r
+        EBML_CONCRETE_CLASS(KaxEditionFlagDefault)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxEditionFlagOrdered : public EbmlUInteger {\r
+    public:\r
+        KaxEditionFlagOrdered(): EbmlUInteger(0) {}\r
+           KaxEditionFlagOrdered(const KaxEditionFlagOrdered & ElementToClone) :EbmlUInteger(ElementToClone) {}\r
+        \r
+        EBML_CONCRETE_CLASS(KaxEditionFlagOrdered)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxChapterAtom : public EbmlMaster {\r
+    public:\r
+        KaxChapterAtom();\r
+           KaxChapterAtom(const KaxChapterAtom & ElementToClone) :EbmlMaster(ElementToClone) {}\r
+        \r
+        EBML_CONCRETE_CLASS(KaxChapterAtom)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxChapterUID : public EbmlUInteger {\r
+    public:\r
+        KaxChapterUID() {}\r
+           KaxChapterUID(const KaxChapterUID & ElementToClone) :EbmlUInteger(ElementToClone) {}\r
+        \r
+        EBML_CONCRETE_CLASS(KaxChapterUID)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxChapterTimeStart : public EbmlUInteger {\r
+    public:\r
+        KaxChapterTimeStart() {}\r
+           KaxChapterTimeStart(const KaxChapterTimeStart & ElementToClone) :EbmlUInteger(ElementToClone) {}\r
+        \r
+        EBML_CONCRETE_CLASS(KaxChapterTimeStart)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxChapterTimeEnd : public EbmlUInteger {\r
+    public:\r
+        KaxChapterTimeEnd() {}\r
+           KaxChapterTimeEnd(const KaxChapterTimeEnd & ElementToClone) :EbmlUInteger(ElementToClone) {}\r
+        \r
+        EBML_CONCRETE_CLASS(KaxChapterTimeEnd)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxChapterFlagHidden : public EbmlUInteger {\r
+    public:\r
+           KaxChapterFlagHidden(): EbmlUInteger(0) {}\r
+           KaxChapterFlagHidden(const KaxChapterFlagHidden & ElementToClone) :EbmlUInteger(ElementToClone) {}\r
+        \r
+        EBML_CONCRETE_CLASS(KaxChapterFlagHidden)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxChapterFlagEnabled : public EbmlUInteger {\r
+    public:\r
+           KaxChapterFlagEnabled(): EbmlUInteger(1) {}\r
+           KaxChapterFlagEnabled(const KaxChapterFlagEnabled & ElementToClone) :EbmlUInteger(ElementToClone) {}\r
+        \r
+        EBML_CONCRETE_CLASS(KaxChapterFlagEnabled)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxChapterSegmentUID : public EbmlBinary {\r
+    public:\r
+        KaxChapterSegmentUID() {}\r
+           KaxChapterSegmentUID(const KaxChapterSegmentUID & ElementToClone) :EbmlBinary(ElementToClone) {}\r
+           bool ValidateSize() const { return (GetSize() == 16);}\r
+            \r
+        EBML_CONCRETE_CLASS(KaxChapterSegmentUID)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxChapterSegmentEditionUID : public EbmlBinary {\r
+    public:\r
+        KaxChapterSegmentEditionUID() {}\r
+           KaxChapterSegmentEditionUID(const KaxChapterSegmentEditionUID & ElementToClone) :EbmlBinary(ElementToClone) {}\r
+           bool ValidateSize() const { return (GetSize() == 16);}\r
+        \r
+        EBML_CONCRETE_CLASS(KaxChapterSegmentEditionUID)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxChapterPhysicalEquiv : public EbmlUInteger {\r
+    public:\r
+           KaxChapterPhysicalEquiv(): EbmlUInteger() {}\r
+           KaxChapterPhysicalEquiv(const KaxChapterPhysicalEquiv & ElementToClone) :EbmlUInteger(ElementToClone) {}\r
+            \r
+        EBML_CONCRETE_CLASS(KaxChapterPhysicalEquiv)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxChapterTrack : public EbmlMaster {\r
+    public:\r
+        KaxChapterTrack();\r
+           KaxChapterTrack(const KaxChapterTrack & ElementToClone) :EbmlMaster(ElementToClone) {}\r
+            \r
+        EBML_CONCRETE_CLASS(KaxChapterTrack)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxChapterTrackNumber : public EbmlUInteger {\r
+    public:\r
+        KaxChapterTrackNumber() {}\r
+           KaxChapterTrackNumber(const KaxChapterTrackNumber & ElementToClone) :EbmlUInteger(ElementToClone) {}\r
+        \r
+        EBML_CONCRETE_CLASS(KaxChapterTrackNumber)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxChapterDisplay : public EbmlMaster {\r
+    public:\r
+        KaxChapterDisplay();\r
+           KaxChapterDisplay(const KaxChapterDisplay & ElementToClone) :EbmlMaster(ElementToClone) {}\r
+        \r
+        EBML_CONCRETE_CLASS(KaxChapterDisplay)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxChapterString : public EbmlUnicodeString {\r
+    public:\r
+        KaxChapterString() {}\r
+           KaxChapterString(const KaxChapterString & ElementToClone) :EbmlUnicodeString(ElementToClone) {}\r
+        \r
+        EBML_CONCRETE_CLASS(KaxChapterString)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxChapterLanguage : public EbmlString {\r
+    public:\r
+        KaxChapterLanguage() :EbmlString("eng") {}\r
+           KaxChapterLanguage(const KaxChapterLanguage & ElementToClone) :EbmlString(ElementToClone) {}\r
+        \r
+        EBML_CONCRETE_CLASS(KaxChapterLanguage)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxChapterCountry : public EbmlString {\r
+    public:\r
+        KaxChapterCountry() :EbmlString() {}\r
+           KaxChapterCountry(const KaxChapterCountry & ElementToClone) :EbmlString(ElementToClone) {}\r
+        \r
+        EBML_CONCRETE_CLASS(KaxChapterCountry)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxChapterProcess : public EbmlMaster {\r
+    public:\r
+        KaxChapterProcess();\r
+           KaxChapterProcess(const KaxChapterProcess & ElementToClone) :EbmlMaster(ElementToClone) {}\r
+        \r
+        EBML_CONCRETE_CLASS(KaxChapterProcess)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxChapterProcessCodecID : public EbmlUInteger {\r
+    public:\r
+        KaxChapterProcessCodecID() :EbmlUInteger(0) {}\r
+           KaxChapterProcessCodecID(const KaxChapterProcessCodecID & ElementToClone) :EbmlUInteger(ElementToClone) {}\r
+        \r
+        EBML_CONCRETE_CLASS(KaxChapterProcessCodecID)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxChapterProcessPrivate : public EbmlBinary {\r
+    public:\r
+        KaxChapterProcessPrivate() {}\r
+           KaxChapterProcessPrivate(const KaxChapterProcessPrivate & ElementToClone) :EbmlBinary(ElementToClone) {}\r
+           bool ValidateSize() const {return true;}\r
+        \r
+        EBML_CONCRETE_CLASS(KaxChapterProcessPrivate)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxChapterProcessCommand : public EbmlMaster {\r
+    public:\r
+        KaxChapterProcessCommand();\r
+           KaxChapterProcessCommand(const KaxChapterProcessCommand & ElementToClone) :EbmlMaster(ElementToClone) {}\r
+        \r
+        EBML_CONCRETE_CLASS(KaxChapterProcessCommand)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxChapterProcessTime : public EbmlUInteger {\r
+    public:\r
+        KaxChapterProcessTime() {}\r
+           KaxChapterProcessTime(const KaxChapterProcessTime & ElementToClone) :EbmlUInteger(ElementToClone) {}\r
+        \r
+        EBML_CONCRETE_CLASS(KaxChapterProcessTime)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxChapterProcessData : public EbmlBinary {\r
+    public:\r
+        KaxChapterProcessData() {}\r
+           KaxChapterProcessData(const KaxChapterProcessData & ElementToClone) :EbmlBinary(ElementToClone) {}\r
+           bool ValidateSize() const {return true;}\r
+        \r
+        EBML_CONCRETE_CLASS(KaxChapterProcessData)\r
+};\r
+\r
+END_LIBMATROSKA_NAMESPACE\r
+\r
+#endif // LIBMATROSKA_CHAPTERS_H\r
index 4c84d2295b6c5d2b2bed81602ad31f316810cbbf..edd62afa7bd378ebb18bf5271e2eb7e2895e0447 100644 (file)
-/****************************************************************************
-** libmatroska : parse Matroska files, see http://www.matroska.org/
-**
-** <file/class description>
-**
-** Copyright (C) 2002-2004 Steve Lhomme.  All rights reserved.
-**
-** This library is free software; you can redistribute it and/or
-** modify it under the terms of the GNU Lesser General Public
-** License as published by the Free Software Foundation; either
-** version 2.1 of the License, or (at your option) any later version.
-** 
-** This library is distributed in the hope that it will be useful,
-** but WITHOUT ANY WARRANTY; without even the implied warranty of
-** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-** Lesser General Public License for more details.
-** 
-** You should have received a copy of the GNU Lesser General Public
-** License along with this library; if not, write to the Free Software
-** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-**
-** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**
-** Contact license@matroska.org if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-/*!
-       \file
-       \version \$Id: KaxCluster.h,v 1.10 2004/04/14 23:26:17 robux4 Exp $
-       \author Steve Lhomme     <robux4 @ users.sf.net>
-       \author Julien Coloos    <suiryc @ users.sf.net>
-
-*/
-#ifndef LIBMATROSKA_CLUSTER_H
-#define LIBMATROSKA_CLUSTER_H
-
-#include "matroska/KaxTypes.h"
-#include "ebml/EbmlMaster.h"
-#include "matroska/KaxTracks.h"
-#include "matroska/KaxBlock.h"
-#include "matroska/KaxCues.h"
-#include "matroska/KaxClusterData.h"
-
-using namespace LIBEBML_NAMESPACE;
-
-START_LIBMATROSKA_NAMESPACE
-
-class KaxSegment;
-
-class MATROSKA_DLL_API KaxCluster : public EbmlMaster {
-       public:
-               KaxCluster();
-               KaxCluster(const KaxCluster & ElementToClone);
-
-               /*!
-                       \brief Addition of a frame without references
-
-                       \param the timecode is expressed in nanoseconds, relative to the beggining of the Segment
-               */
-               bool AddFrame(const KaxTrackEntry & track, uint64 timecode, DataBuffer & buffer, KaxBlockGroup * & MyNewBlock, LacingType lacing = LACING_AUTO);
-               /*!
-                       \brief Addition of a frame with a backward reference (P frame)
-                       \param the timecode is expressed in nanoseconds, relative to the beggining of the Segment
-
-               */
-               bool AddFrame(const KaxTrackEntry & track, uint64 timecode, DataBuffer & buffer, KaxBlockGroup * & MyNewBlock, const KaxBlockGroup & PastBlock, LacingType lacing = LACING_AUTO);
-
-               /*!
-                       \brief Addition of a frame with a backward+forward reference (B frame)
-                       \param the timecode is expressed in nanoseconds, relative to the beggining of the Segment
-
-               */
-               bool AddFrame(const KaxTrackEntry & track, uint64 timecode, DataBuffer & buffer, KaxBlockGroup * & MyNewBlock, const KaxBlockGroup & PastBlock, const KaxBlockGroup & ForwBlock, LacingType lacing = LACING_AUTO);
-
-               /*!
-                       \brief Render the data to the stream and retrieve the position of BlockGroups for later cue entries
-               */
-               uint32 Render(IOCallback & output, KaxCues & CueToUpdate, bool bSaveDefault = false);
-
-               /*!
-                       \return the global timecode of this Cluster
-               */
-               uint64 GlobalTimecode() const;
-
-               KaxBlockGroup & GetNewBlock();
-               
-               /*!
-                       \brief release all the frames of all Blocks
-                       \note this is a convenience to be able to keep Clusters+Blocks in memory (for future reference) withouht being a memory hog
-               */
-               void ReleaseFrames();
-
-               /*!
-                       \brief return the position offset compared to the beggining of the Segment
-               */
-               uint64 GetPosition() const;
-
-               void SetParent(const KaxSegment & aParentSegment) {ParentSegment = &aParentSegment;}
-
-               void SetPreviousTimecode(uint64 aPreviousTimecode, int64 aTimecodeScale) {
-                       bPreviousTimecodeIsSet = true; 
-                       PreviousTimecode = aPreviousTimecode;
-                       SetGlobalTimecodeScale(aTimecodeScale);
-               }
-
-               /*!
-                       \note dirty hack to get the mandatory data back after reading
-                       \todo there should be a better way to get mandatory data
-               */
-               void InitTimecode(uint64 aTimecode, int64 aTimecodeScale) {
-                       SetGlobalTimecodeScale(aTimecodeScale);
-                       MinTimecode = MaxTimecode = PreviousTimecode = aTimecode * TimecodeScale;
-                       bFirstFrameInside = bPreviousTimecodeIsSet = true;
-               }
-
-               int16 GetBlockLocalTimecode(uint64 GlobalTimecode) const;
-
-               uint64 GetBlockGlobalTimecode(int16 LocalTimecode);
-
-               void SetGlobalTimecodeScale(uint64 aGlobalTimecodeScale) {
-                       TimecodeScale = aGlobalTimecodeScale;
-                       bTimecodeScaleIsSet = true;
-               }
-               uint64 GlobalTimecodeScale() const {
-                       assert(bTimecodeScaleIsSet); 
-                       return TimecodeScale;
-               }
-
-               bool SetSilentTrackUsed()
-               {
-                       bSilentTracksUsed = true;
-                       return FindFirstElt(EBML_INFO(KaxClusterSilentTracks), true) != NULL;
-               }
-
-               bool AddBlockBlob(KaxBlockBlob * NewBlob);
-
-               const KaxSegment *GetParentSegment() const { return ParentSegment; }
-
-       protected:
-               KaxBlockBlob     * currentNewBlob;
-               std::vector<KaxBlockBlob*> Blobs;
-               KaxBlockGroup    * currentNewBlock;
-               const KaxSegment * ParentSegment;
-
-               uint64 MinTimecode, MaxTimecode, PreviousTimecode;
-               int64  TimecodeScale;
-
-               bool bFirstFrameInside; // used to speed research
-               bool bPreviousTimecodeIsSet;
-               bool bTimecodeScaleIsSet;
-               bool bSilentTracksUsed;
-
-               /*!
-                       \note method used internally
-               */
-               bool AddFrameInternal(const KaxTrackEntry & track, uint64 timecode, DataBuffer & buffer, KaxBlockGroup * & MyNewBlock, const KaxBlockGroup * PastBlock, const KaxBlockGroup * ForwBlock, LacingType lacing);
-
-        EBML_CONCRETE_CLASS(KaxCluster)
-};
-
-END_LIBMATROSKA_NAMESPACE
-
-#endif // LIBMATROSKA_CLUSTER_H
+/****************************************************************************\r
+** libmatroska : parse Matroska files, see http://www.matroska.org/\r
+**\r
+** <file/class description>\r
+**\r
+** Copyright (C) 2002-2010 Steve Lhomme.  All rights reserved.\r
+**\r
+** This library is free software; you can redistribute it and/or\r
+** modify it under the terms of the GNU Lesser General Public\r
+** License as published by the Free Software Foundation; either\r
+** version 2.1 of the License, or (at your option) any later version.\r
+** \r
+** This library is distributed in the hope that it will be useful,\r
+** but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
+** Lesser General Public License for more details.\r
+** \r
+** You should have received a copy of the GNU Lesser General Public\r
+** License along with this library; if not, write to the Free Software\r
+** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\r
+**\r
+** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**\r
+** Contact license@matroska.org if any conditions of this licensing are\r
+** not clear to you.\r
+**\r
+**********************************************************************/\r
+\r
+/*!\r
+       \file\r
+       \version \$Id: KaxCluster.h,v 1.10 2004/04/14 23:26:17 robux4 Exp $\r
+       \author Steve Lhomme     <robux4 @ users.sf.net>\r
+       \author Julien Coloos    <suiryc @ users.sf.net>\r
+\r
+*/\r
+#ifndef LIBMATROSKA_CLUSTER_H\r
+#define LIBMATROSKA_CLUSTER_H\r
+\r
+#include "matroska/KaxTypes.h"\r
+#include "ebml/EbmlMaster.h"\r
+#include "matroska/KaxTracks.h"\r
+#include "matroska/KaxBlock.h"\r
+#include "matroska/KaxCues.h"\r
+#include "matroska/KaxClusterData.h"\r
+\r
+using namespace LIBEBML_NAMESPACE;\r
+\r
+START_LIBMATROSKA_NAMESPACE\r
+\r
+class KaxSegment;\r
+\r
+class MATROSKA_DLL_API KaxCluster : public EbmlMaster {\r
+       public:\r
+               KaxCluster();\r
+               KaxCluster(const KaxCluster & ElementToClone);\r
+\r
+               /*!\r
+                       \brief Addition of a frame without references\r
+\r
+                       \param the timecode is expressed in nanoseconds, relative to the beggining of the Segment\r
+               */\r
+               bool AddFrame(const KaxTrackEntry & track, uint64 timecode, DataBuffer & buffer, KaxBlockGroup * & MyNewBlock, LacingType lacing = LACING_AUTO);\r
+               /*!\r
+                       \brief Addition of a frame with a backward reference (P frame)\r
+                       \param the timecode is expressed in nanoseconds, relative to the beggining of the Segment\r
+\r
+               */\r
+               bool AddFrame(const KaxTrackEntry & track, uint64 timecode, DataBuffer & buffer, KaxBlockGroup * & MyNewBlock, const KaxBlockGroup & PastBlock, LacingType lacing = LACING_AUTO);\r
+\r
+               /*!\r
+                       \brief Addition of a frame with a backward+forward reference (B frame)\r
+                       \param the timecode is expressed in nanoseconds, relative to the beggining of the Segment\r
+\r
+               */\r
+               bool AddFrame(const KaxTrackEntry & track, uint64 timecode, DataBuffer & buffer, KaxBlockGroup * & MyNewBlock, const KaxBlockGroup & PastBlock, const KaxBlockGroup & ForwBlock, LacingType lacing = LACING_AUTO);\r
+\r
+               /*!\r
+                       \brief Render the data to the stream and retrieve the position of BlockGroups for later cue entries\r
+               */\r
+               uint32 Render(IOCallback & output, KaxCues & CueToUpdate, bool bSaveDefault = false);\r
+\r
+               /*!\r
+                       \return the global timecode of this Cluster\r
+               */\r
+               uint64 GlobalTimecode() const;\r
+\r
+               KaxBlockGroup & GetNewBlock();\r
+               \r
+               /*!\r
+                       \brief release all the frames of all Blocks\r
+                       \note this is a convenience to be able to keep Clusters+Blocks in memory (for future reference) withouht being a memory hog\r
+               */\r
+               void ReleaseFrames();\r
+\r
+               /*!\r
+                       \brief return the position offset compared to the beggining of the Segment\r
+               */\r
+               uint64 GetPosition() const;\r
+\r
+               void SetParent(const KaxSegment & aParentSegment) {ParentSegment = &aParentSegment;}\r
+\r
+               void SetPreviousTimecode(uint64 aPreviousTimecode, int64 aTimecodeScale) {\r
+                       bPreviousTimecodeIsSet = true; \r
+                       PreviousTimecode = aPreviousTimecode;\r
+                       SetGlobalTimecodeScale(aTimecodeScale);\r
+               }\r
+\r
+               /*!\r
+                       \note dirty hack to get the mandatory data back after reading\r
+                       \todo there should be a better way to get mandatory data\r
+               */\r
+               void InitTimecode(uint64 aTimecode, int64 aTimecodeScale) {\r
+                       SetGlobalTimecodeScale(aTimecodeScale);\r
+                       MinTimecode = MaxTimecode = PreviousTimecode = aTimecode * TimecodeScale;\r
+                       bFirstFrameInside = bPreviousTimecodeIsSet = true;\r
+               }\r
+\r
+               int16 GetBlockLocalTimecode(uint64 GlobalTimecode) const;\r
+\r
+               uint64 GetBlockGlobalTimecode(int16 LocalTimecode);\r
+\r
+               void SetGlobalTimecodeScale(uint64 aGlobalTimecodeScale) {\r
+                       TimecodeScale = aGlobalTimecodeScale;\r
+                       bTimecodeScaleIsSet = true;\r
+               }\r
+               uint64 GlobalTimecodeScale() const {\r
+                       assert(bTimecodeScaleIsSet); \r
+                       return TimecodeScale;\r
+               }\r
+\r
+               bool SetSilentTrackUsed()\r
+               {\r
+                       bSilentTracksUsed = true;\r
+                       return FindFirstElt(EBML_INFO(KaxClusterSilentTracks), true) != NULL;\r
+               }\r
+\r
+               bool AddBlockBlob(KaxBlockBlob * NewBlob);\r
+\r
+               const KaxSegment *GetParentSegment() const { return ParentSegment; }\r
+\r
+       protected:\r
+               KaxBlockBlob     * currentNewBlob;\r
+               std::vector<KaxBlockBlob*> Blobs;\r
+               KaxBlockGroup    * currentNewBlock;\r
+               const KaxSegment * ParentSegment;\r
+\r
+               uint64 MinTimecode, MaxTimecode, PreviousTimecode;\r
+               int64  TimecodeScale;\r
+\r
+               bool bFirstFrameInside; // used to speed research\r
+               bool bPreviousTimecodeIsSet;\r
+               bool bTimecodeScaleIsSet;\r
+               bool bSilentTracksUsed;\r
+\r
+               /*!\r
+                       \note method used internally\r
+               */\r
+               bool AddFrameInternal(const KaxTrackEntry & track, uint64 timecode, DataBuffer & buffer, KaxBlockGroup * & MyNewBlock, const KaxBlockGroup * PastBlock, const KaxBlockGroup * ForwBlock, LacingType lacing);\r
+\r
+        EBML_CONCRETE_CLASS(KaxCluster)\r
+};\r
+\r
+END_LIBMATROSKA_NAMESPACE\r
+\r
+#endif // LIBMATROSKA_CLUSTER_H\r
index d6e9f7bfd30403b3354b1ee005743567f4520eb8..32b14e653ff1771ada648aaa06e67f245907de0f 100644 (file)
@@ -1,88 +1,88 @@
-/****************************************************************************
-** libmatroska : parse Matroska files, see http://www.matroska.org/
-**
-** <file/class MATROSKA_DLL_API description>
-**
-** Copyright (C) 2002-2004 Steve Lhomme.  All rights reserved.
-**
-** This file is part of libmatroska.
-**
-** This library is free software; you can redistribute it and/or
-** modify it under the terms of the GNU Lesser General Public
-** License as published by the Free Software Foundation; either
-** version 2.1 of the License, or (at your option) any later version.
-** 
-** This library is distributed in the hope that it will be useful,
-** but WITHOUT ANY WARRANTY; without even the implied warranty of
-** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-** Lesser General Public License for more details.
-** 
-** You should have received a copy of the GNU Lesser General Public
-** License along with this library; if not, write to the Free Software
-** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-**
-** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**
-** Contact license@matroska.org if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-/*!
-       \file
-       \version \$Id: KaxClusterData.h,v 1.9 2004/04/21 19:50:10 mosu Exp $
-       \author Steve Lhomme     <robux4 @ users.sf.net>
-*/
-#ifndef LIBMATROSKA_CLUSTER_DATA_H
-#define LIBMATROSKA_CLUSTER_DATA_H
-
-#include "matroska/KaxTypes.h"
-#include "ebml/EbmlMaster.h"
-#include "ebml/EbmlUInteger.h"
-
-using namespace LIBEBML_NAMESPACE;
-
-START_LIBMATROSKA_NAMESPACE
-
-class MATROSKA_DLL_API KaxClusterTimecode : public EbmlUInteger {
-       public:
-               KaxClusterTimecode() {}
-               KaxClusterTimecode(const KaxClusterTimecode & ElementToClone) :EbmlUInteger(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxClusterTimecode)
-};
-
-class MATROSKA_DLL_API KaxClusterSilentTracks : public EbmlMaster {
-       public:
-               KaxClusterSilentTracks();
-               KaxClusterSilentTracks(const KaxClusterSilentTracks & ElementToClone) :EbmlMaster(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxClusterSilentTracks)
-};
-
-class MATROSKA_DLL_API KaxClusterSilentTrackNumber : public EbmlUInteger {
-       public:
-               KaxClusterSilentTrackNumber() {}
-               KaxClusterSilentTrackNumber(const KaxClusterSilentTrackNumber & ElementToClone) :EbmlUInteger(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxClusterSilentTrackNumber)
-};
-
-class MATROSKA_DLL_API KaxClusterPosition : public EbmlUInteger {
-       public:
-               KaxClusterPosition() {}
-               KaxClusterPosition(const KaxClusterPosition & ElementToClone) :EbmlUInteger(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxClusterPosition)
-};
-
-class MATROSKA_DLL_API KaxClusterPrevSize : public EbmlUInteger {
-       public:
-               KaxClusterPrevSize() {}
-               KaxClusterPrevSize(const KaxClusterPrevSize & ElementToClone) :EbmlUInteger(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxClusterPrevSize)
-};
-
-END_LIBMATROSKA_NAMESPACE
-
-#endif // LIBMATROSKA_CLUSTER_DATA_H
+/****************************************************************************\r
+** libmatroska : parse Matroska files, see http://www.matroska.org/\r
+**\r
+** <file/class MATROSKA_DLL_API description>\r
+**\r
+** Copyright (C) 2002-2010 Steve Lhomme.  All rights reserved.\r
+**\r
+** This file is part of libmatroska.\r
+**\r
+** This library is free software; you can redistribute it and/or\r
+** modify it under the terms of the GNU Lesser General Public\r
+** License as published by the Free Software Foundation; either\r
+** version 2.1 of the License, or (at your option) any later version.\r
+** \r
+** This library is distributed in the hope that it will be useful,\r
+** but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
+** Lesser General Public License for more details.\r
+** \r
+** You should have received a copy of the GNU Lesser General Public\r
+** License along with this library; if not, write to the Free Software\r
+** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\r
+**\r
+** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**\r
+** Contact license@matroska.org if any conditions of this licensing are\r
+** not clear to you.\r
+**\r
+**********************************************************************/\r
+\r
+/*!\r
+       \file\r
+       \version \$Id: KaxClusterData.h,v 1.9 2004/04/21 19:50:10 mosu Exp $\r
+       \author Steve Lhomme     <robux4 @ users.sf.net>\r
+*/\r
+#ifndef LIBMATROSKA_CLUSTER_DATA_H\r
+#define LIBMATROSKA_CLUSTER_DATA_H\r
+\r
+#include "matroska/KaxTypes.h"\r
+#include "ebml/EbmlMaster.h"\r
+#include "ebml/EbmlUInteger.h"\r
+\r
+using namespace LIBEBML_NAMESPACE;\r
+\r
+START_LIBMATROSKA_NAMESPACE\r
+\r
+class MATROSKA_DLL_API KaxClusterTimecode : public EbmlUInteger {\r
+       public:\r
+               KaxClusterTimecode() {}\r
+               KaxClusterTimecode(const KaxClusterTimecode & ElementToClone) :EbmlUInteger(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxClusterTimecode)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxClusterSilentTracks : public EbmlMaster {\r
+       public:\r
+               KaxClusterSilentTracks();\r
+               KaxClusterSilentTracks(const KaxClusterSilentTracks & ElementToClone) :EbmlMaster(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxClusterSilentTracks)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxClusterSilentTrackNumber : public EbmlUInteger {\r
+       public:\r
+               KaxClusterSilentTrackNumber() {}\r
+               KaxClusterSilentTrackNumber(const KaxClusterSilentTrackNumber & ElementToClone) :EbmlUInteger(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxClusterSilentTrackNumber)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxClusterPosition : public EbmlUInteger {\r
+       public:\r
+               KaxClusterPosition() {}\r
+               KaxClusterPosition(const KaxClusterPosition & ElementToClone) :EbmlUInteger(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxClusterPosition)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxClusterPrevSize : public EbmlUInteger {\r
+       public:\r
+               KaxClusterPrevSize() {}\r
+               KaxClusterPrevSize(const KaxClusterPrevSize & ElementToClone) :EbmlUInteger(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxClusterPrevSize)\r
+};\r
+\r
+END_LIBMATROSKA_NAMESPACE\r
+\r
+#endif // LIBMATROSKA_CLUSTER_DATA_H\r
index 2896978109a87d703399c1419bc3a2ed1bde0d53..b1b419a957ecb09e845124b9c2f15b56d2de2aef 100644 (file)
@@ -1,70 +1,70 @@
-/****************************************************************************
-** libmatroska : parse Matroska files, see http://www.matroska.org/
-**
-** <file/class description>
-**
-** Copyright (C) 2002-2005 Steve Lhomme.  All rights reserved.
-**
-** This library is free software; you can redistribute it and/or
-** modify it under the terms of the GNU Lesser General Public
-** License as published by the Free Software Foundation; either
-** version 2.1 of the License, or (at your option) any later version.
-** 
-** This library is distributed in the hope that it will be useful,
-** but WITHOUT ANY WARRANTY; without even the implied warranty of
-** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-** Lesser General Public License for more details.
-** 
-** You should have received a copy of the GNU Lesser General Public
-** License along with this library; if not, write to the Free Software
-** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-**
-** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**
-** Contact license@matroska.org if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-/*!
-       \file
-       \version \$Id: KaxConfig.h,v 1.7 2004/04/14 23:26:17 robux4 Exp $
-       \author Steve Lhomme     <robux4 @ users.sf.net>
-       \author Moritz Bunkus <moritz @ bunkus.org>
-*/
-#ifndef LIBMATROSKA_CONFIG_H
-#define LIBMATROSKA_CONFIG_H
-
-#define LIBMATROSKA_NAMESPACE       libmatroska
-
-#if defined(NO_NAMESPACE) // for older GCC
-# define START_LIBMATROSKA_NAMESPACE
-# define END_LIBMATROSKA_NAMESPACE
-#else // NO_NAMESPACE
-# define START_LIBMATROSKA_NAMESPACE namespace LIBMATROSKA_NAMESPACE {
-# define END_LIBMATROSKA_NAMESPACE   };
-#endif // NO_NAMESPACE
-
-// There are special implementations for certain platforms. For example on Windows
-// we use the Win32 file API. here we set the appropriate macros.
-#if defined(_WIN32)||defined(WIN32)
-
-# if defined(MATROSKA_DLL)
-#  if defined(MATROSKA_DLL_EXPORT)
-#   define MATROSKA_DLL_API __declspec(dllexport)
-#  else // MATROSKA_DLL_EXPORT
-#   define MATROSKA_DLL_API __declspec(dllimport)
-#  endif // MATROSKA_DLL_EXPORT
-# else // MATROSKA_DLL
-#  define MATROSKA_DLL_API
-# endif // MATROSKA_DLL
-
-#else
-# define MATROSKA_DLL_API
-#endif
-
-#if !defined(MATROSKA_VERSION)
-#define MATROSKA_VERSION  2
-#endif // MATROSKA_VERSION
-
-
-#endif // LIBMATROSKA_CONFIG_H
+/****************************************************************************\r
+** libmatroska : parse Matroska files, see http://www.matroska.org/\r
+**\r
+** <file/class description>\r
+**\r
+** Copyright (C) 2002-2010 Steve Lhomme.  All rights reserved.\r
+**\r
+** This library is free software; you can redistribute it and/or\r
+** modify it under the terms of the GNU Lesser General Public\r
+** License as published by the Free Software Foundation; either\r
+** version 2.1 of the License, or (at your option) any later version.\r
+** \r
+** This library is distributed in the hope that it will be useful,\r
+** but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
+** Lesser General Public License for more details.\r
+** \r
+** You should have received a copy of the GNU Lesser General Public\r
+** License along with this library; if not, write to the Free Software\r
+** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\r
+**\r
+** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**\r
+** Contact license@matroska.org if any conditions of this licensing are\r
+** not clear to you.\r
+**\r
+**********************************************************************/\r
+\r
+/*!\r
+       \file\r
+       \version \$Id: KaxConfig.h,v 1.7 2004/04/14 23:26:17 robux4 Exp $\r
+       \author Steve Lhomme     <robux4 @ users.sf.net>\r
+       \author Moritz Bunkus <moritz @ bunkus.org>\r
+*/\r
+#ifndef LIBMATROSKA_CONFIG_H\r
+#define LIBMATROSKA_CONFIG_H\r
+\r
+#define LIBMATROSKA_NAMESPACE       libmatroska\r
+\r
+#if defined(NO_NAMESPACE) // for older GCC\r
+# define START_LIBMATROSKA_NAMESPACE\r
+# define END_LIBMATROSKA_NAMESPACE\r
+#else // NO_NAMESPACE\r
+# define START_LIBMATROSKA_NAMESPACE namespace LIBMATROSKA_NAMESPACE {\r
+# define END_LIBMATROSKA_NAMESPACE   };\r
+#endif // NO_NAMESPACE\r
+\r
+// There are special implementations for certain platforms. For example on Windows\r
+// we use the Win32 file API. here we set the appropriate macros.\r
+#if defined(_WIN32)||defined(WIN32)\r
+\r
+# if defined(MATROSKA_DLL)\r
+#  if defined(MATROSKA_DLL_EXPORT)\r
+#   define MATROSKA_DLL_API __declspec(dllexport)\r
+#  else // MATROSKA_DLL_EXPORT\r
+#   define MATROSKA_DLL_API __declspec(dllimport)\r
+#  endif // MATROSKA_DLL_EXPORT\r
+# else // MATROSKA_DLL\r
+#  define MATROSKA_DLL_API\r
+# endif // MATROSKA_DLL\r
+\r
+#else\r
+# define MATROSKA_DLL_API\r
+#endif\r
+\r
+#if !defined(MATROSKA_VERSION)\r
+#define MATROSKA_VERSION  2\r
+#endif // MATROSKA_VERSION\r
+\r
+\r
+#endif // LIBMATROSKA_CONFIG_H\r
index b6e3d2d42dd5f97ea6d3ac1c1491198406769ac4..d5087437342140538a92f286e894e8b45b7e5d2c 100644 (file)
-/****************************************************************************
-** libmatroska : parse Matroska files, see http://www.matroska.org/
-**
-** <file/class description>
-**
-** Copyright (C) 2002-2004 Steve Lhomme.  All rights reserved.
-**
-** This file is part of libmatroska.
-**
-** This library is free software; you can redistribute it and/or
-** modify it under the terms of the GNU Lesser General Public
-** License as published by the Free Software Foundation; either
-** version 2.1 of the License, or (at your option) any later version.
-** 
-** This library is distributed in the hope that it will be useful,
-** but WITHOUT ANY WARRANTY; without even the implied warranty of
-** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-** Lesser General Public License for more details.
-** 
-** You should have received a copy of the GNU Lesser General Public
-** License along with this library; if not, write to the Free Software
-** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-**
-** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**
-** Contact license@matroska.org if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-/*!
-       \file
-       \version \$Id: KaxContentEncoding.h,v 1.7 2004/04/14 23:26:17 robux4 Exp $
-       \author Moritz Bunkus <moritz @ bunkus.org>
-*/
-#ifndef LIBMATROSKA_CONTENT_ENCODING_H
-#define LIBMATROSKA_CONTENT_ENCODING_H
-
-#include "matroska/KaxTypes.h"
-#include "ebml/EbmlMaster.h"
-#include "ebml/EbmlUInteger.h"
-#include "ebml/EbmlBinary.h"
-
-using namespace LIBEBML_NAMESPACE;
-
-START_LIBMATROSKA_NAMESPACE
-
-class MATROSKA_DLL_API KaxContentEncodings: public EbmlMaster {
-    public:
-        KaxContentEncodings();
-        KaxContentEncodings(const KaxContentEncodings &ElementToClone):
-            EbmlMaster(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxContentEncodings)
-};
-
-class MATROSKA_DLL_API KaxContentEncoding: public EbmlMaster {
-    public:
-        KaxContentEncoding();
-        KaxContentEncoding(const KaxContentEncoding &ElementToClone):
-            EbmlMaster(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxContentEncoding)
-};
-
-class MATROSKA_DLL_API KaxContentEncodingOrder: public EbmlUInteger {
-    public:
-        KaxContentEncodingOrder(): EbmlUInteger(0) {}
-        KaxContentEncodingOrder(const KaxContentEncodingOrder &ElementToClone):
-            EbmlUInteger(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxContentEncodingOrder)
-};
-
-class MATROSKA_DLL_API KaxContentEncodingScope: public EbmlUInteger {
-    public:
-        KaxContentEncodingScope(): EbmlUInteger(1) {}
-        KaxContentEncodingScope(const KaxContentEncodingScope &ElementToClone):
-        EbmlUInteger(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxContentEncodingScope)
-};
-
-class MATROSKA_DLL_API KaxContentEncodingType: public EbmlUInteger {
-    public:
-        KaxContentEncodingType(): EbmlUInteger(0) {}
-        KaxContentEncodingType(const KaxContentEncodingType &ElementToClone):
-            EbmlUInteger(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxContentEncodingType)
-};
-
-class MATROSKA_DLL_API KaxContentCompression: public EbmlMaster {
-    public:
-        KaxContentCompression();
-        KaxContentCompression(const KaxContentCompression &ElementToClone):
-            EbmlMaster(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxContentCompression)
-};
-
-class MATROSKA_DLL_API KaxContentCompAlgo: public EbmlUInteger {
-    public:
-        KaxContentCompAlgo(): EbmlUInteger(0) {}
-        KaxContentCompAlgo(const KaxContentCompAlgo &ElementToClone):
-            EbmlUInteger(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxContentCompAlgo)
-};
-
-class MATROSKA_DLL_API KaxContentCompSettings: public EbmlBinary {
-    public:
-        KaxContentCompSettings() {}
-        KaxContentCompSettings(const KaxContentCompSettings &ElementToClone):
-            EbmlBinary(ElementToClone) {}
-        bool ValidateSize(void) const { return true; }
-
-        EBML_CONCRETE_CLASS(KaxContentCompSettings)
-};
-
-class MATROSKA_DLL_API KaxContentEncryption: public EbmlMaster {
-    public:
-        KaxContentEncryption();
-        KaxContentEncryption(const KaxContentEncryption &ElementToClone):
-            EbmlMaster(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxContentEncryption)
-};
-
-class MATROSKA_DLL_API KaxContentEncAlgo: public EbmlUInteger {
-    public:
-        KaxContentEncAlgo(): EbmlUInteger(0) {}
-        KaxContentEncAlgo(const KaxContentEncAlgo &ElementToClone):
-            EbmlUInteger(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxContentEncAlgo)
-};
-
-class MATROSKA_DLL_API KaxContentEncKeyID: public EbmlBinary {
-    public:
-        KaxContentEncKeyID() {}
-        KaxContentEncKeyID(const KaxContentEncKeyID &ElementToClone):
-            EbmlBinary(ElementToClone) {}
-        bool ValidateSize(void) const { return true; }
-
-        EBML_CONCRETE_CLASS(KaxContentEncKeyID)
-};
-
-class MATROSKA_DLL_API KaxContentSignature: public EbmlBinary {
-    public:
-        KaxContentSignature() {}
-        KaxContentSignature(const KaxContentSignature &ElementToClone):
-            EbmlBinary(ElementToClone) {}
-        bool ValidateSize(void) const { return true; }
-
-        EBML_CONCRETE_CLASS(KaxContentSignature)
-};
-
-class MATROSKA_DLL_API KaxContentSigKeyID: public EbmlBinary {
-    public:
-        KaxContentSigKeyID() {}
-        KaxContentSigKeyID(const KaxContentSigKeyID &ElementToClone):
-            EbmlBinary(ElementToClone) {}
-        bool ValidateSize(void) const { return true; }
-
-        EBML_CONCRETE_CLASS(KaxContentSigKeyID)
-};
-
-class MATROSKA_DLL_API KaxContentSigAlgo: public EbmlUInteger {
-    public:
-        KaxContentSigAlgo() {}
-        KaxContentSigAlgo(const KaxContentSigAlgo &ElementToClone):
-            EbmlUInteger(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxContentSigAlgo)
-};
-
-class MATROSKA_DLL_API KaxContentSigHashAlgo: public EbmlUInteger {
-    public:
-        KaxContentSigHashAlgo() {}
-        KaxContentSigHashAlgo(const KaxContentSigHashAlgo &ElementToClone):
-            EbmlUInteger(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxContentSigHashAlgo)
-};
-
-END_LIBMATROSKA_NAMESPACE
-
-#endif // LIBMATROSKA_CONTENT_ENCODING_H
+/****************************************************************************\r
+** libmatroska : parse Matroska files, see http://www.matroska.org/\r
+**\r
+** <file/class description>\r
+**\r
+** Copyright (C) 2002-2010 Steve Lhomme.  All rights reserved.\r
+**\r
+** This file is part of libmatroska.\r
+**\r
+** This library is free software; you can redistribute it and/or\r
+** modify it under the terms of the GNU Lesser General Public\r
+** License as published by the Free Software Foundation; either\r
+** version 2.1 of the License, or (at your option) any later version.\r
+** \r
+** This library is distributed in the hope that it will be useful,\r
+** but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
+** Lesser General Public License for more details.\r
+** \r
+** You should have received a copy of the GNU Lesser General Public\r
+** License along with this library; if not, write to the Free Software\r
+** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\r
+**\r
+** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**\r
+** Contact license@matroska.org if any conditions of this licensing are\r
+** not clear to you.\r
+**\r
+**********************************************************************/\r
+\r
+/*!\r
+       \file\r
+       \version \$Id: KaxContentEncoding.h,v 1.7 2004/04/14 23:26:17 robux4 Exp $\r
+       \author Moritz Bunkus <moritz @ bunkus.org>\r
+*/\r
+#ifndef LIBMATROSKA_CONTENT_ENCODING_H\r
+#define LIBMATROSKA_CONTENT_ENCODING_H\r
+\r
+#include "matroska/KaxTypes.h"\r
+#include "ebml/EbmlMaster.h"\r
+#include "ebml/EbmlUInteger.h"\r
+#include "ebml/EbmlBinary.h"\r
+\r
+using namespace LIBEBML_NAMESPACE;\r
+\r
+START_LIBMATROSKA_NAMESPACE\r
+\r
+class MATROSKA_DLL_API KaxContentEncodings: public EbmlMaster {\r
+    public:\r
+        KaxContentEncodings();\r
+        KaxContentEncodings(const KaxContentEncodings &ElementToClone):\r
+            EbmlMaster(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxContentEncodings)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxContentEncoding: public EbmlMaster {\r
+    public:\r
+        KaxContentEncoding();\r
+        KaxContentEncoding(const KaxContentEncoding &ElementToClone):\r
+            EbmlMaster(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxContentEncoding)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxContentEncodingOrder: public EbmlUInteger {\r
+    public:\r
+        KaxContentEncodingOrder(): EbmlUInteger(0) {}\r
+        KaxContentEncodingOrder(const KaxContentEncodingOrder &ElementToClone):\r
+            EbmlUInteger(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxContentEncodingOrder)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxContentEncodingScope: public EbmlUInteger {\r
+    public:\r
+        KaxContentEncodingScope(): EbmlUInteger(1) {}\r
+        KaxContentEncodingScope(const KaxContentEncodingScope &ElementToClone):\r
+        EbmlUInteger(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxContentEncodingScope)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxContentEncodingType: public EbmlUInteger {\r
+    public:\r
+        KaxContentEncodingType(): EbmlUInteger(0) {}\r
+        KaxContentEncodingType(const KaxContentEncodingType &ElementToClone):\r
+            EbmlUInteger(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxContentEncodingType)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxContentCompression: public EbmlMaster {\r
+    public:\r
+        KaxContentCompression();\r
+        KaxContentCompression(const KaxContentCompression &ElementToClone):\r
+            EbmlMaster(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxContentCompression)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxContentCompAlgo: public EbmlUInteger {\r
+    public:\r
+        KaxContentCompAlgo(): EbmlUInteger(0) {}\r
+        KaxContentCompAlgo(const KaxContentCompAlgo &ElementToClone):\r
+            EbmlUInteger(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxContentCompAlgo)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxContentCompSettings: public EbmlBinary {\r
+    public:\r
+        KaxContentCompSettings() {}\r
+        KaxContentCompSettings(const KaxContentCompSettings &ElementToClone):\r
+            EbmlBinary(ElementToClone) {}\r
+        bool ValidateSize(void) const { return true; }\r
+\r
+        EBML_CONCRETE_CLASS(KaxContentCompSettings)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxContentEncryption: public EbmlMaster {\r
+    public:\r
+        KaxContentEncryption();\r
+        KaxContentEncryption(const KaxContentEncryption &ElementToClone):\r
+            EbmlMaster(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxContentEncryption)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxContentEncAlgo: public EbmlUInteger {\r
+    public:\r
+        KaxContentEncAlgo(): EbmlUInteger(0) {}\r
+        KaxContentEncAlgo(const KaxContentEncAlgo &ElementToClone):\r
+            EbmlUInteger(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxContentEncAlgo)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxContentEncKeyID: public EbmlBinary {\r
+    public:\r
+        KaxContentEncKeyID() {}\r
+        KaxContentEncKeyID(const KaxContentEncKeyID &ElementToClone):\r
+            EbmlBinary(ElementToClone) {}\r
+        bool ValidateSize(void) const { return true; }\r
+\r
+        EBML_CONCRETE_CLASS(KaxContentEncKeyID)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxContentSignature: public EbmlBinary {\r
+    public:\r
+        KaxContentSignature() {}\r
+        KaxContentSignature(const KaxContentSignature &ElementToClone):\r
+            EbmlBinary(ElementToClone) {}\r
+        bool ValidateSize(void) const { return true; }\r
+\r
+        EBML_CONCRETE_CLASS(KaxContentSignature)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxContentSigKeyID: public EbmlBinary {\r
+    public:\r
+        KaxContentSigKeyID() {}\r
+        KaxContentSigKeyID(const KaxContentSigKeyID &ElementToClone):\r
+            EbmlBinary(ElementToClone) {}\r
+        bool ValidateSize(void) const { return true; }\r
+\r
+        EBML_CONCRETE_CLASS(KaxContentSigKeyID)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxContentSigAlgo: public EbmlUInteger {\r
+    public:\r
+        KaxContentSigAlgo() {}\r
+        KaxContentSigAlgo(const KaxContentSigAlgo &ElementToClone):\r
+            EbmlUInteger(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxContentSigAlgo)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxContentSigHashAlgo: public EbmlUInteger {\r
+    public:\r
+        KaxContentSigHashAlgo() {}\r
+        KaxContentSigHashAlgo(const KaxContentSigHashAlgo &ElementToClone):\r
+            EbmlUInteger(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxContentSigHashAlgo)\r
+};\r
+\r
+END_LIBMATROSKA_NAMESPACE\r
+\r
+#endif // LIBMATROSKA_CONTENT_ENCODING_H\r
index ced77406ed6ca94d9a943221ae88922aa3455792..2624c5426aaa73a5dfd069f37fa192b6658a75ed 100644 (file)
@@ -1,87 +1,87 @@
-/****************************************************************************
-** libmatroska : parse Matroska files, see http://www.matroska.org/
-**
-** <file/class description>
-**
-** Copyright (C) 2002-2004 Steve Lhomme.  All rights reserved.
-**
-** This file is part of libmatroska.
-**
-** This library is free software; you can redistribute it and/or
-** modify it under the terms of the GNU Lesser General Public
-** License as published by the Free Software Foundation; either
-** version 2.1 of the License, or (at your option) any later version.
-** 
-** This library is distributed in the hope that it will be useful,
-** but WITHOUT ANY WARRANTY; without even the implied warranty of
-** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-** Lesser General Public License for more details.
-** 
-** You should have received a copy of the GNU Lesser General Public
-** License along with this library; if not, write to the Free Software
-** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-**
-** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**
-** Contact license@matroska.org if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-/*!
-       \file
-       \version \$Id: KaxContexts.h,v 1.6 2004/04/14 23:26:17 robux4 Exp $
-       \author Steve Lhomme     <robux4 @ users.sf.net>
-*/
-#ifndef LIBMATROSKA_CONTEXTS_H
-#define LIBMATROSKA_CONTEXTS_H
-
-#include "matroska/KaxTypes.h"
-#include "ebml/EbmlElement.h"
-
-using namespace LIBEBML_NAMESPACE;
-
-START_LIBMATROSKA_NAMESPACE
-
-extern const EbmlSemanticContext MATROSKA_DLL_API KaxMatroska_Context;
-extern const EbmlSemanticContext MATROSKA_DLL_API KaxSegment_Context;
-extern const EbmlSemanticContext MATROSKA_DLL_API KaxAttachments_Context;
-extern const EbmlSemanticContext MATROSKA_DLL_API KaxAttached_Context;
-extern const EbmlSemanticContext MATROSKA_DLL_API KaxFileDescription_Context;
-extern const EbmlSemanticContext MATROSKA_DLL_API KaxFileName_Context;
-extern const EbmlSemanticContext MATROSKA_DLL_API KaxMimeType_Context;
-extern const EbmlSemanticContext MATROSKA_DLL_API KaxFileData_Context;
-extern const EbmlSemanticContext MATROSKA_DLL_API KaxChapters_Context;
-extern const EbmlSemanticContext MATROSKA_DLL_API KaxCluster_Context;
-extern const EbmlSemanticContext MATROSKA_DLL_API KaxTags_Context;
-extern const EbmlSemanticContext MATROSKA_DLL_API KaxTag_Context;
-extern const EbmlSemanticContext MATROSKA_DLL_API KaxBlockGroup_Context;
-extern const EbmlSemanticContext MATROSKA_DLL_API KaxReferencePriority_Context;
-extern const EbmlSemanticContext MATROSKA_DLL_API KaxReferenceBlock_Context;
-extern const EbmlSemanticContext MATROSKA_DLL_API KaxReferenceVirtual_Context;
-extern const EbmlSemanticContext MATROSKA_DLL_API KaxCues_Context;
-extern const EbmlSemanticContext MATROSKA_DLL_API KaxInfo_Context;
-extern const EbmlSemanticContext MATROSKA_DLL_API KaxSeekHead_Context;
-extern const EbmlSemanticContext MATROSKA_DLL_API KaxTracks_Context;
-extern const EbmlSemanticContext MATROSKA_DLL_API KaxTrackEntry_Context;
-extern const EbmlSemanticContext MATROSKA_DLL_API KaxTrackNumber_Context;
-extern const EbmlSemanticContext MATROSKA_DLL_API KaxTrackType_Context;
-extern const EbmlSemanticContext MATROSKA_DLL_API KaxTrackFlagEnabled_Context;
-extern const EbmlSemanticContext MATROSKA_DLL_API KaxTrackFlagDefault_Context;
-extern const EbmlSemanticContext MATROSKA_DLL_API KaxTrackFlagLacing_Context;
-extern const EbmlSemanticContext MATROSKA_DLL_API KaxTrackName_Context;
-extern const EbmlSemanticContext MATROSKA_DLL_API KaxTrackLanguage_Context;
-extern const EbmlSemanticContext MATROSKA_DLL_API KaxCodecID_Context;
-extern const EbmlSemanticContext MATROSKA_DLL_API KaxCodecPrivate_Context;
-extern const EbmlSemanticContext MATROSKA_DLL_API KaxCodecName_Context;
-extern const EbmlSemanticContext MATROSKA_DLL_API KaxCodecSettings_Context;
-extern const EbmlSemanticContext MATROSKA_DLL_API KaxCodecInfoURL_Context;
-extern const EbmlSemanticContext MATROSKA_DLL_API KaxCodecDownloadURL_Context;
-extern const EbmlSemanticContext MATROSKA_DLL_API KaxCodecDecodeAll_Context;
-extern const EbmlSemanticContext MATROSKA_DLL_API KaxTrackOverlay_Context;
-
-extern const EbmlSemanticContext & MATROSKA_DLL_API GetKaxGlobal_Context();
-extern const EbmlSemanticContext & MATROSKA_DLL_API GetKaxTagsGlobal_Context();
-
-END_LIBMATROSKA_NAMESPACE
-
-#endif // LIBMATROSKA_CONTEXTS_H
+/****************************************************************************\r
+** libmatroska : parse Matroska files, see http://www.matroska.org/\r
+**\r
+** <file/class description>\r
+**\r
+** Copyright (C) 2002-2010 Steve Lhomme.  All rights reserved.\r
+**\r
+** This file is part of libmatroska.\r
+**\r
+** This library is free software; you can redistribute it and/or\r
+** modify it under the terms of the GNU Lesser General Public\r
+** License as published by the Free Software Foundation; either\r
+** version 2.1 of the License, or (at your option) any later version.\r
+** \r
+** This library is distributed in the hope that it will be useful,\r
+** but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
+** Lesser General Public License for more details.\r
+** \r
+** You should have received a copy of the GNU Lesser General Public\r
+** License along with this library; if not, write to the Free Software\r
+** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\r
+**\r
+** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**\r
+** Contact license@matroska.org if any conditions of this licensing are\r
+** not clear to you.\r
+**\r
+**********************************************************************/\r
+\r
+/*!\r
+       \file\r
+       \version \$Id: KaxContexts.h,v 1.6 2004/04/14 23:26:17 robux4 Exp $\r
+       \author Steve Lhomme     <robux4 @ users.sf.net>\r
+*/\r
+#ifndef LIBMATROSKA_CONTEXTS_H\r
+#define LIBMATROSKA_CONTEXTS_H\r
+\r
+#include "matroska/KaxTypes.h"\r
+#include "ebml/EbmlElement.h"\r
+\r
+using namespace LIBEBML_NAMESPACE;\r
+\r
+START_LIBMATROSKA_NAMESPACE\r
+\r
+extern const EbmlSemanticContext MATROSKA_DLL_API KaxMatroska_Context;\r
+extern const EbmlSemanticContext MATROSKA_DLL_API KaxSegment_Context;\r
+extern const EbmlSemanticContext MATROSKA_DLL_API KaxAttachments_Context;\r
+extern const EbmlSemanticContext MATROSKA_DLL_API KaxAttached_Context;\r
+extern const EbmlSemanticContext MATROSKA_DLL_API KaxFileDescription_Context;\r
+extern const EbmlSemanticContext MATROSKA_DLL_API KaxFileName_Context;\r
+extern const EbmlSemanticContext MATROSKA_DLL_API KaxMimeType_Context;\r
+extern const EbmlSemanticContext MATROSKA_DLL_API KaxFileData_Context;\r
+extern const EbmlSemanticContext MATROSKA_DLL_API KaxChapters_Context;\r
+extern const EbmlSemanticContext MATROSKA_DLL_API KaxCluster_Context;\r
+extern const EbmlSemanticContext MATROSKA_DLL_API KaxTags_Context;\r
+extern const EbmlSemanticContext MATROSKA_DLL_API KaxTag_Context;\r
+extern const EbmlSemanticContext MATROSKA_DLL_API KaxBlockGroup_Context;\r
+extern const EbmlSemanticContext MATROSKA_DLL_API KaxReferencePriority_Context;\r
+extern const EbmlSemanticContext MATROSKA_DLL_API KaxReferenceBlock_Context;\r
+extern const EbmlSemanticContext MATROSKA_DLL_API KaxReferenceVirtual_Context;\r
+extern const EbmlSemanticContext MATROSKA_DLL_API KaxCues_Context;\r
+extern const EbmlSemanticContext MATROSKA_DLL_API KaxInfo_Context;\r
+extern const EbmlSemanticContext MATROSKA_DLL_API KaxSeekHead_Context;\r
+extern const EbmlSemanticContext MATROSKA_DLL_API KaxTracks_Context;\r
+extern const EbmlSemanticContext MATROSKA_DLL_API KaxTrackEntry_Context;\r
+extern const EbmlSemanticContext MATROSKA_DLL_API KaxTrackNumber_Context;\r
+extern const EbmlSemanticContext MATROSKA_DLL_API KaxTrackType_Context;\r
+extern const EbmlSemanticContext MATROSKA_DLL_API KaxTrackFlagEnabled_Context;\r
+extern const EbmlSemanticContext MATROSKA_DLL_API KaxTrackFlagDefault_Context;\r
+extern const EbmlSemanticContext MATROSKA_DLL_API KaxTrackFlagLacing_Context;\r
+extern const EbmlSemanticContext MATROSKA_DLL_API KaxTrackName_Context;\r
+extern const EbmlSemanticContext MATROSKA_DLL_API KaxTrackLanguage_Context;\r
+extern const EbmlSemanticContext MATROSKA_DLL_API KaxCodecID_Context;\r
+extern const EbmlSemanticContext MATROSKA_DLL_API KaxCodecPrivate_Context;\r
+extern const EbmlSemanticContext MATROSKA_DLL_API KaxCodecName_Context;\r
+extern const EbmlSemanticContext MATROSKA_DLL_API KaxCodecSettings_Context;\r
+extern const EbmlSemanticContext MATROSKA_DLL_API KaxCodecInfoURL_Context;\r
+extern const EbmlSemanticContext MATROSKA_DLL_API KaxCodecDownloadURL_Context;\r
+extern const EbmlSemanticContext MATROSKA_DLL_API KaxCodecDecodeAll_Context;\r
+extern const EbmlSemanticContext MATROSKA_DLL_API KaxTrackOverlay_Context;\r
+\r
+extern const EbmlSemanticContext & MATROSKA_DLL_API GetKaxGlobal_Context();\r
+extern const EbmlSemanticContext & MATROSKA_DLL_API GetKaxTagsGlobal_Context();\r
+\r
+END_LIBMATROSKA_NAMESPACE\r
+\r
+#endif // LIBMATROSKA_CONTEXTS_H\r
index 92d2f88de639226c5280d210fb77fb3efcc7f88d..fe7459f70a8c6b64f59d02d050848e271fb5b603 100644 (file)
@@ -1,95 +1,95 @@
-/****************************************************************************
-** libmatroska : parse Matroska files, see http://www.matroska.org/
-**
-** <file/class description>
-**
-** Copyright (C) 2002-2004 Steve Lhomme.  All rights reserved.
-**
-** This file is part of libmatroska.
-**
-** This library is free software; you can redistribute it and/or
-** modify it under the terms of the GNU Lesser General Public
-** License as published by the Free Software Foundation; either
-** version 2.1 of the License, or (at your option) any later version.
-** 
-** This library is distributed in the hope that it will be useful,
-** but WITHOUT ANY WARRANTY; without even the implied warranty of
-** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-** Lesser General Public License for more details.
-** 
-** You should have received a copy of the GNU Lesser General Public
-** License along with this library; if not, write to the Free Software
-** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-**
-** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**
-** Contact license@matroska.org if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-/*!
-       \file
-       \version \$Id: KaxCues.h,v 1.7 2004/04/14 23:26:17 robux4 Exp $
-       \author Steve Lhomme     <robux4 @ users.sf.net>
-*/
-#ifndef LIBMATROSKA_CUES_H
-#define LIBMATROSKA_CUES_H
-
-#include <vector>
-
-#include "matroska/KaxTypes.h"
-#include "ebml/EbmlMaster.h"
-#include "matroska/KaxBlock.h"
-
-using namespace LIBEBML_NAMESPACE;
-
-START_LIBMATROSKA_NAMESPACE
-
-class KaxCuePoint;
-
-class MATROSKA_DLL_API KaxCues : public EbmlMaster {
-       public:
-               KaxCues();
-               KaxCues(const KaxCues & ElementToClone) :EbmlMaster(ElementToClone) {}
-               ~KaxCues();
-
-               bool AddBlockGroup(const KaxBlockGroup & BlockReference);
-               bool AddBlockBlob(const KaxBlockBlob & BlockReference);
-
-               /*!
-                       \brief Indicate that the position for this Block is set
-               */
-               void PositionSet(const KaxBlockGroup & BlockReference);
-               void PositionSet(const KaxBlockBlob & BlockReference);
-
-               /*!
-                       \brief override to sort by timecode/track
-               */
-               uint32 Render(IOCallback & output, bool bSaveDefault = false) {
-                       Sort();
-                       return EbmlMaster::Render(output, bSaveDefault);
-               }
-
-               uint64 GetTimecodePosition(uint64 aTimecode) const;
-               const KaxCuePoint * GetTimecodePoint(uint64 aTimecode) const;
-
-               void SetGlobalTimecodeScale(uint64 aGlobalTimecodeScale) {
-                       mGlobalTimecodeScale = aGlobalTimecodeScale;
-                       bGlobalTimecodeScaleIsSet = true;
-               }
-               uint64 GlobalTimecodeScale() const {
-                       assert(bGlobalTimecodeScaleIsSet); 
-                       return mGlobalTimecodeScale;
-               }
-
-       protected:
-               std::vector<const KaxBlockBlob *> myTempReferences;
-               bool   bGlobalTimecodeScaleIsSet;
-               uint64 mGlobalTimecodeScale;
-
-        EBML_CONCRETE_CLASS(KaxCues)
-};
-
-END_LIBMATROSKA_NAMESPACE
-
-#endif // LIBMATROSKA_CUES_H
+/****************************************************************************\r
+** libmatroska : parse Matroska files, see http://www.matroska.org/\r
+**\r
+** <file/class description>\r
+**\r
+** Copyright (C) 2002-2010 Steve Lhomme.  All rights reserved.\r
+**\r
+** This file is part of libmatroska.\r
+**\r
+** This library is free software; you can redistribute it and/or\r
+** modify it under the terms of the GNU Lesser General Public\r
+** License as published by the Free Software Foundation; either\r
+** version 2.1 of the License, or (at your option) any later version.\r
+** \r
+** This library is distributed in the hope that it will be useful,\r
+** but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
+** Lesser General Public License for more details.\r
+** \r
+** You should have received a copy of the GNU Lesser General Public\r
+** License along with this library; if not, write to the Free Software\r
+** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\r
+**\r
+** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**\r
+** Contact license@matroska.org if any conditions of this licensing are\r
+** not clear to you.\r
+**\r
+**********************************************************************/\r
+\r
+/*!\r
+       \file\r
+       \version \$Id: KaxCues.h,v 1.7 2004/04/14 23:26:17 robux4 Exp $\r
+       \author Steve Lhomme     <robux4 @ users.sf.net>\r
+*/\r
+#ifndef LIBMATROSKA_CUES_H\r
+#define LIBMATROSKA_CUES_H\r
+\r
+#include <vector>\r
+\r
+#include "matroska/KaxTypes.h"\r
+#include "ebml/EbmlMaster.h"\r
+#include "matroska/KaxBlock.h"\r
+\r
+using namespace LIBEBML_NAMESPACE;\r
+\r
+START_LIBMATROSKA_NAMESPACE\r
+\r
+class KaxCuePoint;\r
+\r
+class MATROSKA_DLL_API KaxCues : public EbmlMaster {\r
+       public:\r
+               KaxCues();\r
+               KaxCues(const KaxCues & ElementToClone) :EbmlMaster(ElementToClone) {}\r
+               ~KaxCues();\r
+\r
+               bool AddBlockGroup(const KaxBlockGroup & BlockReference);\r
+               bool AddBlockBlob(const KaxBlockBlob & BlockReference);\r
+\r
+               /*!\r
+                       \brief Indicate that the position for this Block is set\r
+               */\r
+               void PositionSet(const KaxBlockGroup & BlockReference);\r
+               void PositionSet(const KaxBlockBlob & BlockReference);\r
+\r
+               /*!\r
+                       \brief override to sort by timecode/track\r
+               */\r
+               uint32 Render(IOCallback & output, bool bSaveDefault = false) {\r
+                       Sort();\r
+                       return EbmlMaster::Render(output, bSaveDefault);\r
+               }\r
+\r
+               uint64 GetTimecodePosition(uint64 aTimecode) const;\r
+               const KaxCuePoint * GetTimecodePoint(uint64 aTimecode) const;\r
+\r
+               void SetGlobalTimecodeScale(uint64 aGlobalTimecodeScale) {\r
+                       mGlobalTimecodeScale = aGlobalTimecodeScale;\r
+                       bGlobalTimecodeScaleIsSet = true;\r
+               }\r
+               uint64 GlobalTimecodeScale() const {\r
+                       assert(bGlobalTimecodeScaleIsSet); \r
+                       return mGlobalTimecodeScale;\r
+               }\r
+\r
+       protected:\r
+               std::vector<const KaxBlockBlob *> myTempReferences;\r
+               bool   bGlobalTimecodeScaleIsSet;\r
+               uint64 mGlobalTimecodeScale;\r
+\r
+        EBML_CONCRETE_CLASS(KaxCues)\r
+};\r
+\r
+END_LIBMATROSKA_NAMESPACE\r
+\r
+#endif // LIBMATROSKA_CUES_H\r
index 86d3c2174d001169c70ab21a21c6cbc708922e06..51d3594b9172f5cd62ac77b25ba532e8a997e503 100644 (file)
-/****************************************************************************
-** libmatroska : parse Matroska files, see http://www.matroska.org/
-**
-** <file/class description>
-**
-** Copyright (C) 2002-2005 Steve Lhomme.  All rights reserved.
-**
-** This library is free software; you can redistribute it and/or
-** modify it under the terms of the GNU Lesser General Public
-** License as published by the Free Software Foundation; either
-** version 2.1 of the License, or (at your option) any later version.
-** 
-** This library is distributed in the hope that it will be useful,
-** but WITHOUT ANY WARRANTY; without even the implied warranty of
-** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-** Lesser General Public License for more details.
-** 
-** You should have received a copy of the GNU Lesser General Public
-** License along with this library; if not, write to the Free Software
-** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-**
-** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**
-** Contact license@matroska.org if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-/*!
-       \file
-       \version \$Id: KaxCuesData.h,v 1.8 2004/04/14 23:26:17 robux4 Exp $
-       \author Steve Lhomme     <robux4 @ users.sf.net>
-*/
-#ifndef LIBMATROSKA_CUES_DATA_H
-#define LIBMATROSKA_CUES_DATA_H
-
-#include "matroska/KaxTypes.h"
-#include "ebml/EbmlUInteger.h"
-#include "ebml/EbmlMaster.h"
-
-using namespace LIBEBML_NAMESPACE;
-
-START_LIBMATROSKA_NAMESPACE
-
-class KaxBlockGroup;
-class KaxBlockBlob;
-class KaxCueTrackPositions;
-class KaxInternalBlock;
-
-class MATROSKA_DLL_API KaxCuePoint : public EbmlMaster {
-       public:
-               KaxCuePoint();
-               KaxCuePoint(const KaxCuePoint & ElementToClone) :EbmlMaster(ElementToClone) {}
-               void PositionSet(const KaxBlockGroup & BlockReference, uint64 GlobalTimecodeScale);
-               void PositionSet(const KaxBlockBlob & BlobReference, uint64 GlobalTimecodeScale);
-
-               bool operator<(const EbmlElement & EltB) const;
-
-               const KaxCueTrackPositions * GetSeekPosition() const;
-               bool Timecode(uint64 & aTimecode, uint64 GlobalTimecodeScale) const;
-
-        EBML_CONCRETE_CLASS(KaxCuePoint)
-};
-
-class MATROSKA_DLL_API KaxCueTime : public EbmlUInteger {
-       public:
-               KaxCueTime() {}
-               KaxCueTime(const KaxCueTime & ElementToClone) :EbmlUInteger(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxCueTime)
-};
-
-class MATROSKA_DLL_API KaxCueTrackPositions : public EbmlMaster {
-       public:
-               KaxCueTrackPositions();
-               KaxCueTrackPositions(const KaxCueTrackPositions & ElementToClone) :EbmlMaster(ElementToClone) {}
-
-               uint64 ClusterPosition() const;
-               uint16 TrackNumber() const;
-
-        EBML_CONCRETE_CLASS(KaxCueTrackPositions)
-};
-
-class MATROSKA_DLL_API KaxCueTrack : public EbmlUInteger {
-       public:
-               KaxCueTrack() {}
-               KaxCueTrack(const KaxCueTrack & ElementToClone) :EbmlUInteger(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxCueTrack)
-};
-
-class MATROSKA_DLL_API KaxCueClusterPosition : public EbmlUInteger {
-       public:
-               KaxCueClusterPosition() {}
-               KaxCueClusterPosition(const KaxCueClusterPosition & ElementToClone) :EbmlUInteger(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxCueClusterPosition)
-};
-
-class MATROSKA_DLL_API KaxCueBlockNumber : public EbmlUInteger {
-       public:
-               KaxCueBlockNumber() :EbmlUInteger(1) {}
-               KaxCueBlockNumber(const KaxCueBlockNumber & ElementToClone) :EbmlUInteger(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxCueBlockNumber)
-};
-
-#if MATROSKA_VERSION >= 2
-class MATROSKA_DLL_API KaxCueCodecState : public EbmlUInteger {
-       public:
-               KaxCueCodecState() :EbmlUInteger(0) {}
-               KaxCueCodecState(const KaxCueCodecState & ElementToClone) :EbmlUInteger(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxCueCodecState)
-};
-
-class MATROSKA_DLL_API KaxCueReference : public EbmlMaster {
-       public:
-               KaxCueReference();
-               KaxCueReference(const KaxCueReference & ElementToClone) :EbmlMaster(ElementToClone) {}
-               
-               void AddReference(const KaxBlockGroup & BlockReferenced, uint64 GlobalTimecodeScale);
-               void AddReference(const KaxBlockBlob & BlockReferenced, uint64 GlobalTimecodeScale);
-
-        EBML_CONCRETE_CLASS(KaxCueReference)
-};
-
-class MATROSKA_DLL_API KaxCueRefTime : public EbmlUInteger {
-       public:
-               KaxCueRefTime() {}
-               KaxCueRefTime(const KaxCueRefTime & ElementToClone) :EbmlUInteger(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxCueRefTime)
-};
-
-class MATROSKA_DLL_API KaxCueRefCluster : public EbmlUInteger {
-       public:
-               KaxCueRefCluster() {}
-               KaxCueRefCluster(const KaxCueRefCluster & ElementToClone) :EbmlUInteger(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxCueRefCluster)
-};
-
-class MATROSKA_DLL_API KaxCueRefNumber : public EbmlUInteger {
-       public:
-               KaxCueRefNumber() :EbmlUInteger(1) {}
-               KaxCueRefNumber(const KaxCueRefNumber & ElementToClone) :EbmlUInteger(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxCueRefNumber)
-};
-
-class MATROSKA_DLL_API KaxCueRefCodecState : public EbmlUInteger {
-       public:
-               KaxCueRefCodecState() :EbmlUInteger(0) {}
-               KaxCueRefCodecState(const KaxCueRefCodecState & ElementToClone) :EbmlUInteger(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxCueRefCodecState)
-};
-#endif // MATROSKA_VERSION
-
-END_LIBMATROSKA_NAMESPACE
-
-#endif // LIBMATROSKA_CUES_DATA_H
+/****************************************************************************\r
+** libmatroska : parse Matroska files, see http://www.matroska.org/\r
+**\r
+** <file/class description>\r
+**\r
+** Copyright (C) 2002-2010 Steve Lhomme.  All rights reserved.\r
+**\r
+** This library is free software; you can redistribute it and/or\r
+** modify it under the terms of the GNU Lesser General Public\r
+** License as published by the Free Software Foundation; either\r
+** version 2.1 of the License, or (at your option) any later version.\r
+** \r
+** This library is distributed in the hope that it will be useful,\r
+** but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
+** Lesser General Public License for more details.\r
+** \r
+** You should have received a copy of the GNU Lesser General Public\r
+** License along with this library; if not, write to the Free Software\r
+** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\r
+**\r
+** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**\r
+** Contact license@matroska.org if any conditions of this licensing are\r
+** not clear to you.\r
+**\r
+**********************************************************************/\r
+\r
+/*!\r
+       \file\r
+       \version \$Id: KaxCuesData.h,v 1.8 2004/04/14 23:26:17 robux4 Exp $\r
+       \author Steve Lhomme     <robux4 @ users.sf.net>\r
+*/\r
+#ifndef LIBMATROSKA_CUES_DATA_H\r
+#define LIBMATROSKA_CUES_DATA_H\r
+\r
+#include "matroska/KaxTypes.h"\r
+#include "ebml/EbmlUInteger.h"\r
+#include "ebml/EbmlMaster.h"\r
+\r
+using namespace LIBEBML_NAMESPACE;\r
+\r
+START_LIBMATROSKA_NAMESPACE\r
+\r
+class KaxBlockGroup;\r
+class KaxBlockBlob;\r
+class KaxCueTrackPositions;\r
+class KaxInternalBlock;\r
+\r
+class MATROSKA_DLL_API KaxCuePoint : public EbmlMaster {\r
+       public:\r
+               KaxCuePoint();\r
+               KaxCuePoint(const KaxCuePoint & ElementToClone) :EbmlMaster(ElementToClone) {}\r
+               void PositionSet(const KaxBlockGroup & BlockReference, uint64 GlobalTimecodeScale);\r
+               void PositionSet(const KaxBlockBlob & BlobReference, uint64 GlobalTimecodeScale);\r
+\r
+               bool operator<(const EbmlElement & EltB) const;\r
+\r
+               const KaxCueTrackPositions * GetSeekPosition() const;\r
+               bool Timecode(uint64 & aTimecode, uint64 GlobalTimecodeScale) const;\r
+\r
+        EBML_CONCRETE_CLASS(KaxCuePoint)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxCueTime : public EbmlUInteger {\r
+       public:\r
+               KaxCueTime() {}\r
+               KaxCueTime(const KaxCueTime & ElementToClone) :EbmlUInteger(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxCueTime)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxCueTrackPositions : public EbmlMaster {\r
+       public:\r
+               KaxCueTrackPositions();\r
+               KaxCueTrackPositions(const KaxCueTrackPositions & ElementToClone) :EbmlMaster(ElementToClone) {}\r
+\r
+               uint64 ClusterPosition() const;\r
+               uint16 TrackNumber() const;\r
+\r
+        EBML_CONCRETE_CLASS(KaxCueTrackPositions)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxCueTrack : public EbmlUInteger {\r
+       public:\r
+               KaxCueTrack() {}\r
+               KaxCueTrack(const KaxCueTrack & ElementToClone) :EbmlUInteger(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxCueTrack)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxCueClusterPosition : public EbmlUInteger {\r
+       public:\r
+               KaxCueClusterPosition() {}\r
+               KaxCueClusterPosition(const KaxCueClusterPosition & ElementToClone) :EbmlUInteger(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxCueClusterPosition)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxCueBlockNumber : public EbmlUInteger {\r
+       public:\r
+               KaxCueBlockNumber() :EbmlUInteger(1) {}\r
+               KaxCueBlockNumber(const KaxCueBlockNumber & ElementToClone) :EbmlUInteger(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxCueBlockNumber)\r
+};\r
+\r
+#if MATROSKA_VERSION >= 2\r
+class MATROSKA_DLL_API KaxCueCodecState : public EbmlUInteger {\r
+       public:\r
+               KaxCueCodecState() :EbmlUInteger(0) {}\r
+               KaxCueCodecState(const KaxCueCodecState & ElementToClone) :EbmlUInteger(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxCueCodecState)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxCueReference : public EbmlMaster {\r
+       public:\r
+               KaxCueReference();\r
+               KaxCueReference(const KaxCueReference & ElementToClone) :EbmlMaster(ElementToClone) {}\r
+               \r
+               void AddReference(const KaxBlockGroup & BlockReferenced, uint64 GlobalTimecodeScale);\r
+               void AddReference(const KaxBlockBlob & BlockReferenced, uint64 GlobalTimecodeScale);\r
+\r
+        EBML_CONCRETE_CLASS(KaxCueReference)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxCueRefTime : public EbmlUInteger {\r
+       public:\r
+               KaxCueRefTime() {}\r
+               KaxCueRefTime(const KaxCueRefTime & ElementToClone) :EbmlUInteger(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxCueRefTime)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxCueRefCluster : public EbmlUInteger {\r
+       public:\r
+               KaxCueRefCluster() {}\r
+               KaxCueRefCluster(const KaxCueRefCluster & ElementToClone) :EbmlUInteger(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxCueRefCluster)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxCueRefNumber : public EbmlUInteger {\r
+       public:\r
+               KaxCueRefNumber() :EbmlUInteger(1) {}\r
+               KaxCueRefNumber(const KaxCueRefNumber & ElementToClone) :EbmlUInteger(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxCueRefNumber)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxCueRefCodecState : public EbmlUInteger {\r
+       public:\r
+               KaxCueRefCodecState() :EbmlUInteger(0) {}\r
+               KaxCueRefCodecState(const KaxCueRefCodecState & ElementToClone) :EbmlUInteger(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxCueRefCodecState)\r
+};\r
+#endif // MATROSKA_VERSION\r
+\r
+END_LIBMATROSKA_NAMESPACE\r
+\r
+#endif // LIBMATROSKA_CUES_DATA_H\r
index 8c422cf1252aee3f2c5e6665a94724396707239f..e15d7ffe62a9630ed7d1cafa57e3bf141ac7af4d 100644 (file)
@@ -1,72 +1,72 @@
-/****************************************************************************
-** libmatroska : parse Matroska files, see http://www.matroska.org/
-**
-** <file/class MATROSKA_DLL_API description>
-**
-** Copyright (C) 2002-2004 Steve Lhomme.  All rights reserved.
-**
-** This file is part of libmatroska.
-**
-** This library is free software; you can redistribute it and/or
-** modify it under the terms of the GNU Lesser General Public
-** License as published by the Free Software Foundation; either
-** version 2.1 of the License, or (at your option) any later version.
-** 
-** This library is distributed in the hope that it will be useful,
-** but WITHOUT ANY WARRANTY; without even the implied warranty of
-** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-** Lesser General Public License for more details.
-** 
-** You should have received a copy of the GNU Lesser General Public
-** License along with this library; if not, write to the Free Software
-** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-**
-** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**
-** Contact license@matroska.org if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-/*!
-       \file
-       \version \$Id: KaxInfo.h,v 1.7 2004/04/14 23:26:17 robux4 Exp $
-       \author Steve Lhomme     <robux4 @ users.sf.net>
-*/
-#ifndef LIBMATROSKA_INFO_H
-#define LIBMATROSKA_INFO_H
-
-#include "matroska/KaxTypes.h"
-#include "ebml/EbmlMaster.h"
-#include "ebml/EbmlUnicodeString.h"
-
-using namespace LIBEBML_NAMESPACE;
-
-START_LIBMATROSKA_NAMESPACE
-
-class MATROSKA_DLL_API KaxInfo : public EbmlMaster {
-       public:
-               KaxInfo();
-               KaxInfo(const KaxInfo & ElementToClone) :EbmlMaster(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxInfo)
-};
-
-class MATROSKA_DLL_API KaxMuxingApp : public EbmlUnicodeString {
-       public:
-               KaxMuxingApp() {}
-               KaxMuxingApp(const KaxMuxingApp & ElementToClone) :EbmlUnicodeString(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxMuxingApp)
-};
-
-class MATROSKA_DLL_API KaxWritingApp : public EbmlUnicodeString {
-       public:
-               KaxWritingApp() {}
-               KaxWritingApp(const KaxWritingApp & ElementToClone) :EbmlUnicodeString(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxWritingApp)
-};
-
-END_LIBMATROSKA_NAMESPACE
-
-#endif // LIBMATROSKA_INFO_H
+/****************************************************************************\r
+** libmatroska : parse Matroska files, see http://www.matroska.org/\r
+**\r
+** <file/class MATROSKA_DLL_API description>\r
+**\r
+** Copyright (C) 2002-2010 Steve Lhomme.  All rights reserved.\r
+**\r
+** This file is part of libmatroska.\r
+**\r
+** This library is free software; you can redistribute it and/or\r
+** modify it under the terms of the GNU Lesser General Public\r
+** License as published by the Free Software Foundation; either\r
+** version 2.1 of the License, or (at your option) any later version.\r
+** \r
+** This library is distributed in the hope that it will be useful,\r
+** but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
+** Lesser General Public License for more details.\r
+** \r
+** You should have received a copy of the GNU Lesser General Public\r
+** License along with this library; if not, write to the Free Software\r
+** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\r
+**\r
+** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**\r
+** Contact license@matroska.org if any conditions of this licensing are\r
+** not clear to you.\r
+**\r
+**********************************************************************/\r
+\r
+/*!\r
+       \file\r
+       \version \$Id: KaxInfo.h,v 1.7 2004/04/14 23:26:17 robux4 Exp $\r
+       \author Steve Lhomme     <robux4 @ users.sf.net>\r
+*/\r
+#ifndef LIBMATROSKA_INFO_H\r
+#define LIBMATROSKA_INFO_H\r
+\r
+#include "matroska/KaxTypes.h"\r
+#include "ebml/EbmlMaster.h"\r
+#include "ebml/EbmlUnicodeString.h"\r
+\r
+using namespace LIBEBML_NAMESPACE;\r
+\r
+START_LIBMATROSKA_NAMESPACE\r
+\r
+class MATROSKA_DLL_API KaxInfo : public EbmlMaster {\r
+       public:\r
+               KaxInfo();\r
+               KaxInfo(const KaxInfo & ElementToClone) :EbmlMaster(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxInfo)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxMuxingApp : public EbmlUnicodeString {\r
+       public:\r
+               KaxMuxingApp() {}\r
+               KaxMuxingApp(const KaxMuxingApp & ElementToClone) :EbmlUnicodeString(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxMuxingApp)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxWritingApp : public EbmlUnicodeString {\r
+       public:\r
+               KaxWritingApp() {}\r
+               KaxWritingApp(const KaxWritingApp & ElementToClone) :EbmlUnicodeString(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxWritingApp)\r
+};\r
+\r
+END_LIBMATROSKA_NAMESPACE\r
+\r
+#endif // LIBMATROSKA_INFO_H\r
index 99c287dc0267431ab909b0fc6f3ced6bb5e02ee0..69ef67ed414b03c0f945ad14a7bae625a63ad14d 100644 (file)
-/****************************************************************************
-** libmatroska : parse Matroska files, see http://www.matroska.org/
-**
-** <file/class description>
-**
-** Copyright (C) 2002-2005 Steve Lhomme.  All rights reserved.
-**
-** This file is part of libmatroska.
-**
-** This library is free software; you can redistribute it and/or
-** modify it under the terms of the GNU Lesser General Public
-** License as published by the Free Software Foundation; either
-** version 2.1 of the License, or (at your option) any later version.
-** 
-** This library is distributed in the hope that it will be useful,
-** but WITHOUT ANY WARRANTY; without even the implied warranty of
-** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-** Lesser General Public License for more details.
-** 
-** You should have received a copy of the GNU Lesser General Public
-** License along with this library; if not, write to the Free Software
-** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-**
-** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**
-** Contact license@matroska.org if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-/*!
-       \file
-       \version \$Id: KaxInfoData.h,v 1.7 2004/04/14 23:26:17 robux4 Exp $
-       \author Steve Lhomme     <robux4 @ users.sf.net>
-       \author John Cannon      <spyder2555 @ users.sf.net>
-       \author Moritz Bunkus    <moritz @ bunkus.org>
-*/
-#ifndef LIBMATROSKA_INFO_DATA_H
-#define LIBMATROSKA_INFO_DATA_H
-
-#include "matroska/KaxTypes.h"
-#include "ebml/EbmlUInteger.h"
-#include "ebml/EbmlFloat.h"
-#include "ebml/EbmlUnicodeString.h"
-#include "ebml/EbmlBinary.h"
-#include "ebml/EbmlDate.h"
-#include "ebml/EbmlMaster.h"
-
-using namespace LIBEBML_NAMESPACE;
-
-START_LIBMATROSKA_NAMESPACE
-
-class MATROSKA_DLL_API KaxSegmentUID : public EbmlBinary {
-       public:
-               KaxSegmentUID() {}
-               KaxSegmentUID(const KaxSegmentUID & ElementToClone) :EbmlBinary(ElementToClone){}
-               bool ValidateSize() const { return (GetSize() == 16);}
-
-        EBML_CONCRETE_CLASS(KaxSegmentUID)
-};
-
-class MATROSKA_DLL_API KaxSegmentFilename : public EbmlUnicodeString {
-       public:
-               KaxSegmentFilename() {}
-               KaxSegmentFilename(const KaxSegmentFilename & ElementToClone) :EbmlUnicodeString(ElementToClone){}
-
-        EBML_CONCRETE_CLASS(KaxSegmentFilename)
-};
-
-class MATROSKA_DLL_API KaxPrevUID : public KaxSegmentUID {
-       public:
-               KaxPrevUID() {}
-               KaxPrevUID(const KaxPrevUID & ElementToClone) :KaxSegmentUID(ElementToClone){}
-               bool ValidateSize() const { return (GetSize() == 16);}
-
-        EBML_CONCRETE_CLASS(KaxPrevUID)
-};
-
-class MATROSKA_DLL_API KaxPrevFilename : public EbmlUnicodeString {
-       public:
-               KaxPrevFilename() :EbmlUnicodeString() {}
-               KaxPrevFilename(const KaxPrevFilename & ElementToClone) :EbmlUnicodeString(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxPrevFilename)
-};
-
-class MATROSKA_DLL_API KaxNextUID : public KaxSegmentUID {
-       public:
-               KaxNextUID() {}
-               KaxNextUID(const KaxNextUID & ElementToClone) :KaxSegmentUID(ElementToClone){}
-               bool ValidateSize() const { return (GetSize() == 16);}
-
-        EBML_CONCRETE_CLASS(KaxNextUID)
-};
-
-class MATROSKA_DLL_API KaxNextFilename : public EbmlUnicodeString {
-       public:
-               KaxNextFilename() {}
-               KaxNextFilename(const KaxNextFilename & ElementToClone) :EbmlUnicodeString(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxNextFilename)
-};
-
-class MATROSKA_DLL_API KaxSegmentFamily : public EbmlBinary {
-       public:
-               KaxSegmentFamily() {}
-               KaxSegmentFamily(const KaxSegmentFamily & ElementToClone) :EbmlBinary(ElementToClone){}
-               bool ValidateSize() const { return (GetSize() == 16);}
-
-        EBML_CONCRETE_CLASS(KaxSegmentFamily)
-};
-
-class MATROSKA_DLL_API KaxChapterTranslate : public EbmlMaster {
-       public:
-               KaxChapterTranslate();
-               KaxChapterTranslate(const KaxChapterTranslate & ElementToClone) :EbmlMaster(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxChapterTranslate)
-};
-
-class MATROSKA_DLL_API KaxChapterTranslateCodec : public EbmlUInteger {
-       public:
-               KaxChapterTranslateCodec() {}
-               KaxChapterTranslateCodec(const KaxChapterTranslateCodec & ElementToClone) :EbmlUInteger(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxChapterTranslateCodec)
-};
-
-class MATROSKA_DLL_API KaxChapterTranslateEditionUID : public EbmlUInteger {
-       public:
-               KaxChapterTranslateEditionUID() {}
-               KaxChapterTranslateEditionUID(const KaxChapterTranslateEditionUID & ElementToClone) :EbmlUInteger(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxChapterTranslateEditionUID)
-};
-
-class MATROSKA_DLL_API KaxChapterTranslateID : public EbmlBinary {
-       public:
-               KaxChapterTranslateID() {}
-               KaxChapterTranslateID(const KaxChapterTranslateID & ElementToClone) :EbmlBinary(ElementToClone){}
-               bool ValidateSize() const { return true;}
-
-        EBML_CONCRETE_CLASS(KaxChapterTranslateID)
-};
-
-class MATROSKA_DLL_API KaxTimecodeScale : public EbmlUInteger {
-       public:
-               KaxTimecodeScale() :EbmlUInteger(1000000) {}
-               KaxTimecodeScale(const KaxTimecodeScale & ElementToClone) :EbmlUInteger(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxTimecodeScale)
-};
-
-class MATROSKA_DLL_API KaxDuration : public EbmlFloat {
-       public:
-               KaxDuration(): EbmlFloat(FLOAT_64) {}
-               KaxDuration(const KaxDuration & ElementToClone) :EbmlFloat(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxDuration)
-};
-
-class MATROSKA_DLL_API KaxDateUTC : public EbmlDate {
-       public:
-               KaxDateUTC() {}
-               KaxDateUTC(const KaxDateUTC & ElementToClone) :EbmlDate(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxDateUTC)
-};
-
-class MATROSKA_DLL_API KaxTitle : public EbmlUnicodeString {
-       public:
-               KaxTitle() {}
-               KaxTitle(const KaxTitle & ElementToClone) :EbmlUnicodeString(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxTitle)
-};
-
-END_LIBMATROSKA_NAMESPACE
-
-#endif // LIBMATROSKA_INFO_DATA_H
+/****************************************************************************\r
+** libmatroska : parse Matroska files, see http://www.matroska.org/\r
+**\r
+** <file/class description>\r
+**\r
+** Copyright (C) 2002-2010 Steve Lhomme.  All rights reserved.\r
+**\r
+** This file is part of libmatroska.\r
+**\r
+** This library is free software; you can redistribute it and/or\r
+** modify it under the terms of the GNU Lesser General Public\r
+** License as published by the Free Software Foundation; either\r
+** version 2.1 of the License, or (at your option) any later version.\r
+** \r
+** This library is distributed in the hope that it will be useful,\r
+** but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
+** Lesser General Public License for more details.\r
+** \r
+** You should have received a copy of the GNU Lesser General Public\r
+** License along with this library; if not, write to the Free Software\r
+** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\r
+**\r
+** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**\r
+** Contact license@matroska.org if any conditions of this licensing are\r
+** not clear to you.\r
+**\r
+**********************************************************************/\r
+\r
+/*!\r
+       \file\r
+       \version \$Id: KaxInfoData.h,v 1.7 2004/04/14 23:26:17 robux4 Exp $\r
+       \author Steve Lhomme     <robux4 @ users.sf.net>\r
+       \author John Cannon      <spyder2555 @ users.sf.net>\r
+       \author Moritz Bunkus    <moritz @ bunkus.org>\r
+*/\r
+#ifndef LIBMATROSKA_INFO_DATA_H\r
+#define LIBMATROSKA_INFO_DATA_H\r
+\r
+#include "matroska/KaxTypes.h"\r
+#include "ebml/EbmlUInteger.h"\r
+#include "ebml/EbmlFloat.h"\r
+#include "ebml/EbmlUnicodeString.h"\r
+#include "ebml/EbmlBinary.h"\r
+#include "ebml/EbmlDate.h"\r
+#include "ebml/EbmlMaster.h"\r
+\r
+using namespace LIBEBML_NAMESPACE;\r
+\r
+START_LIBMATROSKA_NAMESPACE\r
+\r
+class MATROSKA_DLL_API KaxSegmentUID : public EbmlBinary {\r
+       public:\r
+               KaxSegmentUID() {}\r
+               KaxSegmentUID(const KaxSegmentUID & ElementToClone) :EbmlBinary(ElementToClone){}\r
+               bool ValidateSize() const { return (GetSize() == 16);}\r
+\r
+        EBML_CONCRETE_CLASS(KaxSegmentUID)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxSegmentFilename : public EbmlUnicodeString {\r
+       public:\r
+               KaxSegmentFilename() {}\r
+               KaxSegmentFilename(const KaxSegmentFilename & ElementToClone) :EbmlUnicodeString(ElementToClone){}\r
+\r
+        EBML_CONCRETE_CLASS(KaxSegmentFilename)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxPrevUID : public KaxSegmentUID {\r
+       public:\r
+               KaxPrevUID() {}\r
+               KaxPrevUID(const KaxPrevUID & ElementToClone) :KaxSegmentUID(ElementToClone){}\r
+               bool ValidateSize() const { return (GetSize() == 16);}\r
+\r
+        EBML_CONCRETE_CLASS(KaxPrevUID)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxPrevFilename : public EbmlUnicodeString {\r
+       public:\r
+               KaxPrevFilename() :EbmlUnicodeString() {}\r
+               KaxPrevFilename(const KaxPrevFilename & ElementToClone) :EbmlUnicodeString(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxPrevFilename)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxNextUID : public KaxSegmentUID {\r
+       public:\r
+               KaxNextUID() {}\r
+               KaxNextUID(const KaxNextUID & ElementToClone) :KaxSegmentUID(ElementToClone){}\r
+               bool ValidateSize() const { return (GetSize() == 16);}\r
+\r
+        EBML_CONCRETE_CLASS(KaxNextUID)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxNextFilename : public EbmlUnicodeString {\r
+       public:\r
+               KaxNextFilename() {}\r
+               KaxNextFilename(const KaxNextFilename & ElementToClone) :EbmlUnicodeString(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxNextFilename)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxSegmentFamily : public EbmlBinary {\r
+       public:\r
+               KaxSegmentFamily() {}\r
+               KaxSegmentFamily(const KaxSegmentFamily & ElementToClone) :EbmlBinary(ElementToClone){}\r
+               bool ValidateSize() const { return (GetSize() == 16);}\r
+\r
+        EBML_CONCRETE_CLASS(KaxSegmentFamily)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxChapterTranslate : public EbmlMaster {\r
+       public:\r
+               KaxChapterTranslate();\r
+               KaxChapterTranslate(const KaxChapterTranslate & ElementToClone) :EbmlMaster(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxChapterTranslate)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxChapterTranslateCodec : public EbmlUInteger {\r
+       public:\r
+               KaxChapterTranslateCodec() {}\r
+               KaxChapterTranslateCodec(const KaxChapterTranslateCodec & ElementToClone) :EbmlUInteger(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxChapterTranslateCodec)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxChapterTranslateEditionUID : public EbmlUInteger {\r
+       public:\r
+               KaxChapterTranslateEditionUID() {}\r
+               KaxChapterTranslateEditionUID(const KaxChapterTranslateEditionUID & ElementToClone) :EbmlUInteger(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxChapterTranslateEditionUID)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxChapterTranslateID : public EbmlBinary {\r
+       public:\r
+               KaxChapterTranslateID() {}\r
+               KaxChapterTranslateID(const KaxChapterTranslateID & ElementToClone) :EbmlBinary(ElementToClone){}\r
+               bool ValidateSize() const { return true;}\r
+\r
+        EBML_CONCRETE_CLASS(KaxChapterTranslateID)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTimecodeScale : public EbmlUInteger {\r
+       public:\r
+               KaxTimecodeScale() :EbmlUInteger(1000000) {}\r
+               KaxTimecodeScale(const KaxTimecodeScale & ElementToClone) :EbmlUInteger(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTimecodeScale)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxDuration : public EbmlFloat {\r
+       public:\r
+               KaxDuration(): EbmlFloat(FLOAT_64) {}\r
+               KaxDuration(const KaxDuration & ElementToClone) :EbmlFloat(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxDuration)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxDateUTC : public EbmlDate {\r
+       public:\r
+               KaxDateUTC() {}\r
+               KaxDateUTC(const KaxDateUTC & ElementToClone) :EbmlDate(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxDateUTC)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTitle : public EbmlUnicodeString {\r
+       public:\r
+               KaxTitle() {}\r
+               KaxTitle(const KaxTitle & ElementToClone) :EbmlUnicodeString(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTitle)\r
+};\r
+\r
+END_LIBMATROSKA_NAMESPACE\r
+\r
+#endif // LIBMATROSKA_INFO_DATA_H\r
index 1382855e80fdca90c27c11dab79eb381e28b0be5..29e412629d5821e7f7e144aca8f998815b3c6648 100644 (file)
@@ -1,98 +1,98 @@
-/****************************************************************************
-** libmatroska : parse Matroska files, see http://www.matroska.org/
-**
-** <file/class description>
-**
-** Copyright (C) 2002-2004 Steve Lhomme.  All rights reserved.
-**
-** This file is part of libmatroska.
-**
-** This library is free software; you can redistribute it and/or
-** modify it under the terms of the GNU Lesser General Public
-** License as published by the Free Software Foundation; either
-** version 2.1 of the License, or (at your option) any later version.
-** 
-** This library is distributed in the hope that it will be useful,
-** but WITHOUT ANY WARRANTY; without even the implied warranty of
-** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-** Lesser General Public License for more details.
-** 
-** You should have received a copy of the GNU Lesser General Public
-** License along with this library; if not, write to the Free Software
-** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-**
-** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**
-** Contact license@matroska.org if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-/*!
-       \file
-       \version \$Id: KaxSeekHead.h,v 1.7 2004/04/14 23:26:17 robux4 Exp $
-       \author Steve Lhomme     <robux4 @ users.sf.net>
-*/
-#ifndef LIBMATROSKA_SEEK_HEAD_H
-#define LIBMATROSKA_SEEK_HEAD_H
-
-#include "matroska/KaxTypes.h"
-#include "ebml/EbmlMaster.h"
-#include "ebml/EbmlBinary.h"
-#include "ebml/EbmlUInteger.h"
-
-using namespace LIBEBML_NAMESPACE;
-
-START_LIBMATROSKA_NAMESPACE
-
-class KaxSegment;
-class KaxSeek;
-
-class MATROSKA_DLL_API KaxSeekHead : public EbmlMaster {
-       public:
-               KaxSeekHead();
-               KaxSeekHead(const KaxSeekHead & ElementToClone) :EbmlMaster(ElementToClone) {}
-
-               /*!
-                       \brief add an element to index in the Meta Seek data
-                       \note the element should already be written in the file
-               */
-               void IndexThis(const EbmlElement & aElt, const KaxSegment & ParentSegment);
-
-               KaxSeek * FindFirstOf(const EbmlCallbacks & Callbacks) const;
-               KaxSeek * FindNextOf(const KaxSeek &aPrev) const;
-
-        EBML_CONCRETE_CLASS(KaxSeekHead)
-};
-
-class MATROSKA_DLL_API KaxSeek : public EbmlMaster {
-       public:
-               KaxSeek();
-               KaxSeek(const KaxSeek & ElementToClone) :EbmlMaster(ElementToClone) {}
-
-               int64 Location() const;
-               bool IsEbmlId(const EbmlId & aId) const;
-               bool IsEbmlId(const KaxSeek & aPoint) const;
-
-        EBML_CONCRETE_CLASS(KaxSeek)
-};
-
-class MATROSKA_DLL_API KaxSeekID : public EbmlBinary {
-       public:
-               KaxSeekID() {}
-               KaxSeekID(const KaxSeekID & ElementToClone) :EbmlBinary(ElementToClone){}
-               bool ValidateSize() const {return GetSize() <= 4;}
-
-        EBML_CONCRETE_CLASS(KaxSeekID)
-};
-
-class MATROSKA_DLL_API KaxSeekPosition : public EbmlUInteger {
-       public:
-               KaxSeekPosition() {}
-               KaxSeekPosition(const KaxSeekPosition & ElementToClone) :EbmlUInteger(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxSeekPosition)
-};
-
-END_LIBMATROSKA_NAMESPACE
-
-#endif // LIBMATROSKA_SEEK_HEAD_H
+/****************************************************************************\r
+** libmatroska : parse Matroska files, see http://www.matroska.org/\r
+**\r
+** <file/class description>\r
+**\r
+** Copyright (C) 2002-2010 Steve Lhomme.  All rights reserved.\r
+**\r
+** This file is part of libmatroska.\r
+**\r
+** This library is free software; you can redistribute it and/or\r
+** modify it under the terms of the GNU Lesser General Public\r
+** License as published by the Free Software Foundation; either\r
+** version 2.1 of the License, or (at your option) any later version.\r
+** \r
+** This library is distributed in the hope that it will be useful,\r
+** but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
+** Lesser General Public License for more details.\r
+** \r
+** You should have received a copy of the GNU Lesser General Public\r
+** License along with this library; if not, write to the Free Software\r
+** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\r
+**\r
+** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**\r
+** Contact license@matroska.org if any conditions of this licensing are\r
+** not clear to you.\r
+**\r
+**********************************************************************/\r
+\r
+/*!\r
+       \file\r
+       \version \$Id: KaxSeekHead.h,v 1.7 2004/04/14 23:26:17 robux4 Exp $\r
+       \author Steve Lhomme     <robux4 @ users.sf.net>\r
+*/\r
+#ifndef LIBMATROSKA_SEEK_HEAD_H\r
+#define LIBMATROSKA_SEEK_HEAD_H\r
+\r
+#include "matroska/KaxTypes.h"\r
+#include "ebml/EbmlMaster.h"\r
+#include "ebml/EbmlBinary.h"\r
+#include "ebml/EbmlUInteger.h"\r
+\r
+using namespace LIBEBML_NAMESPACE;\r
+\r
+START_LIBMATROSKA_NAMESPACE\r
+\r
+class KaxSegment;\r
+class KaxSeek;\r
+\r
+class MATROSKA_DLL_API KaxSeekHead : public EbmlMaster {\r
+       public:\r
+               KaxSeekHead();\r
+               KaxSeekHead(const KaxSeekHead & ElementToClone) :EbmlMaster(ElementToClone) {}\r
+\r
+               /*!\r
+                       \brief add an element to index in the Meta Seek data\r
+                       \note the element should already be written in the file\r
+               */\r
+               void IndexThis(const EbmlElement & aElt, const KaxSegment & ParentSegment);\r
+\r
+               KaxSeek * FindFirstOf(const EbmlCallbacks & Callbacks) const;\r
+               KaxSeek * FindNextOf(const KaxSeek &aPrev) const;\r
+\r
+        EBML_CONCRETE_CLASS(KaxSeekHead)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxSeek : public EbmlMaster {\r
+       public:\r
+               KaxSeek();\r
+               KaxSeek(const KaxSeek & ElementToClone) :EbmlMaster(ElementToClone) {}\r
+\r
+               int64 Location() const;\r
+               bool IsEbmlId(const EbmlId & aId) const;\r
+               bool IsEbmlId(const KaxSeek & aPoint) const;\r
+\r
+        EBML_CONCRETE_CLASS(KaxSeek)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxSeekID : public EbmlBinary {\r
+       public:\r
+               KaxSeekID() {}\r
+               KaxSeekID(const KaxSeekID & ElementToClone) :EbmlBinary(ElementToClone){}\r
+               bool ValidateSize() const {return GetSize() <= 4;}\r
+\r
+        EBML_CONCRETE_CLASS(KaxSeekID)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxSeekPosition : public EbmlUInteger {\r
+       public:\r
+               KaxSeekPosition() {}\r
+               KaxSeekPosition(const KaxSeekPosition & ElementToClone) :EbmlUInteger(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxSeekPosition)\r
+};\r
+\r
+END_LIBMATROSKA_NAMESPACE\r
+\r
+#endif // LIBMATROSKA_SEEK_HEAD_H\r
index cad6be9219dec89bd1c06fac367e97d858ade09b..adf2bacf8f2fb3631829f236688f27160c245518 100644 (file)
@@ -1,66 +1,66 @@
-/****************************************************************************
-** libmatroska : parse Matroska files, see http://www.matroska.org/
-**
-** <file/class MATROSKA_DLL_API description>
-**
-** Copyright (C) 2002-2004 Steve Lhomme.  All rights reserved.
-**
-** This file is part of libmatroska.
-**
-** This library is free software; you can redistribute it and/or
-** modify it under the terms of the GNU Lesser General Public
-** License as published by the Free Software Foundation; either
-** version 2.1 of the License, or (at your option) any later version.
-** 
-** This library is distributed in the hope that it will be useful,
-** but WITHOUT ANY WARRANTY; without even the implied warranty of
-** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-** Lesser General Public License for more details.
-** 
-** You should have received a copy of the GNU Lesser General Public
-** License along with this library; if not, write to the Free Software
-** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-**
-** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**
-** Contact license@matroska.org if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-/*!
-       \file
-       \version \$Id: KaxSegment.h,v 1.8 2004/04/14 23:26:17 robux4 Exp $
-       \author Steve Lhomme     <robux4 @ users.sf.net>
-*/
-#ifndef LIBMATROSKA_SEGMENT_H
-#define LIBMATROSKA_SEGMENT_H
-
-#include "matroska/KaxTypes.h"
-#include "ebml/EbmlMaster.h"
-
-using namespace LIBEBML_NAMESPACE;
-
-START_LIBMATROSKA_NAMESPACE
-
-class MATROSKA_DLL_API KaxSegment : public EbmlMaster {
-       public:
-               KaxSegment();
-               KaxSegment(const KaxSegment & ElementToClone);
-
-               /*!
-                       \brief give the position of the element in the segment
-               */
-               uint64 GetRelativePosition(const EbmlElement & Elt) const;
-               uint64 GetRelativePosition(uint64 aGlobalPosition) const;
-
-               /*!
-                       \brief give the position of the element in the file
-               */
-               uint64 GetGlobalPosition(uint64 aRelativePosition) const;
-
-        EBML_CONCRETE_CLASS(KaxSegment)
-};
-
-END_LIBMATROSKA_NAMESPACE
-
-#endif // LIBMATROSKA_SEGMENT_H
+/****************************************************************************\r
+** libmatroska : parse Matroska files, see http://www.matroska.org/\r
+**\r
+** <file/class MATROSKA_DLL_API description>\r
+**\r
+** Copyright (C) 2002-2010 Steve Lhomme.  All rights reserved.\r
+**\r
+** This file is part of libmatroska.\r
+**\r
+** This library is free software; you can redistribute it and/or\r
+** modify it under the terms of the GNU Lesser General Public\r
+** License as published by the Free Software Foundation; either\r
+** version 2.1 of the License, or (at your option) any later version.\r
+** \r
+** This library is distributed in the hope that it will be useful,\r
+** but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
+** Lesser General Public License for more details.\r
+** \r
+** You should have received a copy of the GNU Lesser General Public\r
+** License along with this library; if not, write to the Free Software\r
+** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\r
+**\r
+** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**\r
+** Contact license@matroska.org if any conditions of this licensing are\r
+** not clear to you.\r
+**\r
+**********************************************************************/\r
+\r
+/*!\r
+       \file\r
+       \version \$Id: KaxSegment.h,v 1.8 2004/04/14 23:26:17 robux4 Exp $\r
+       \author Steve Lhomme     <robux4 @ users.sf.net>\r
+*/\r
+#ifndef LIBMATROSKA_SEGMENT_H\r
+#define LIBMATROSKA_SEGMENT_H\r
+\r
+#include "matroska/KaxTypes.h"\r
+#include "ebml/EbmlMaster.h"\r
+\r
+using namespace LIBEBML_NAMESPACE;\r
+\r
+START_LIBMATROSKA_NAMESPACE\r
+\r
+class MATROSKA_DLL_API KaxSegment : public EbmlMaster {\r
+       public:\r
+               KaxSegment();\r
+               KaxSegment(const KaxSegment & ElementToClone);\r
+\r
+               /*!\r
+                       \brief give the position of the element in the segment\r
+               */\r
+               uint64 GetRelativePosition(const EbmlElement & Elt) const;\r
+               uint64 GetRelativePosition(uint64 aGlobalPosition) const;\r
+\r
+               /*!\r
+                       \brief give the position of the element in the file\r
+               */\r
+               uint64 GetGlobalPosition(uint64 aRelativePosition) const;\r
+\r
+        EBML_CONCRETE_CLASS(KaxSegment)\r
+};\r
+\r
+END_LIBMATROSKA_NAMESPACE\r
+\r
+#endif // LIBMATROSKA_SEGMENT_H\r
index 9572ff76297e71bc53d04a1236bbd498330973ed..2ad40184bcc6fcb5993667324cc2bd6457a9a23e 100644 (file)
-/****************************************************************************
-** libmatroska : parse Matroska files, see http://www.matroska.org/
-**
-** <file/class MATROSKA_DLL_API description>
-**
-** Copyright (C) 2002-2004 Steve Lhomme.  All rights reserved.
-**
-** This file is part of libmatroska.
-**
-** This library is free software; you can redistribute it and/or
-** modify it under the terms of the GNU Lesser General Public
-** License as published by the Free Software Foundation; either
-** version 2.1 of the License, or (at your option) any later version.
-** 
-** This library is distributed in the hope that it will be useful,
-** but WITHOUT ANY WARRANTY; without even the implied warranty of
-** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-** Lesser General Public License for more details.
-** 
-** You should have received a copy of the GNU Lesser General Public
-** License along with this library; if not, write to the Free Software
-** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-**
-** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**
-** Contact license@matroska.org if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-/*!
-       \file
-       \version \$Id: KaxTag.h,v 1.9 2004/04/14 23:26:17 robux4 Exp $
-       \author Jory Stone     <jcsston @ toughguy.net>
-       \author Steve Lhomme   <robux4 @ users.sf.net>
-*/
-#ifndef LIBMATROSKA_TAG_H
-#define LIBMATROSKA_TAG_H
-
-#include "matroska/KaxTypes.h"
-#include "ebml/EbmlMaster.h"
-#include "ebml/EbmlFloat.h"
-#include "ebml/EbmlSInteger.h"
-#include "ebml/EbmlUInteger.h"
-#include "ebml/EbmlString.h"
-#include "ebml/EbmlUnicodeString.h"
-#include "ebml/EbmlBinary.h"
-
-using namespace LIBEBML_NAMESPACE;
-
-START_LIBMATROSKA_NAMESPACE
-
-class MATROSKA_DLL_API KaxTag : public EbmlMaster {
-       public:
-               KaxTag();
-               KaxTag(const KaxTag & ElementToClone) :EbmlMaster(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxTag)
-};
-
-class MATROSKA_DLL_API KaxTagTargets : public EbmlMaster {
-       public:
-               KaxTagTargets();
-               KaxTagTargets(const KaxTagTargets & ElementToClone) :EbmlMaster(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxTagTargets)
-};
-
-class MATROSKA_DLL_API KaxTagGeneral : public EbmlMaster {
-       public:
-               KaxTagGeneral();
-               KaxTagGeneral(const KaxTagGeneral & ElementToClone) :EbmlMaster(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxTagGeneral)
-};
-
-class MATROSKA_DLL_API KaxTagGenres : public EbmlMaster {
-       public:
-               KaxTagGenres();
-               KaxTagGenres(const KaxTagGenres & ElementToClone) :EbmlMaster(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxTagGenres)
-};
-
-class MATROSKA_DLL_API KaxTagAudioSpecific : public EbmlMaster {
-       public:
-               KaxTagAudioSpecific();
-               KaxTagAudioSpecific(const KaxTagAudioSpecific & ElementToClone) :EbmlMaster(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxTagAudioSpecific)
-};
-
-class MATROSKA_DLL_API KaxTagImageSpecific : public EbmlMaster {
-       public:
-               KaxTagImageSpecific();
-               KaxTagImageSpecific(const KaxTagImageSpecific & ElementToClone) :EbmlMaster(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxTagImageSpecific)
-};
-
-class MATROSKA_DLL_API KaxTagTargetTypeValue : public EbmlUInteger {
-       public:
-               KaxTagTargetTypeValue() :EbmlUInteger(50) {}
-               KaxTagTargetTypeValue(const KaxTagTargetTypeValue & ElementToClone) :EbmlUInteger(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxTagTargetTypeValue)
-};
-
-class MATROSKA_DLL_API KaxTagTargetType : public EbmlString {
-       public:
-               KaxTagTargetType() {}
-               KaxTagTargetType(const KaxTagTargetType & ElementToClone) :EbmlString(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxTagTargetType)
-};
-
-class MATROSKA_DLL_API KaxTagTrackUID : public EbmlUInteger {
-       public:
-               KaxTagTrackUID() :EbmlUInteger(0) {}
-               KaxTagTrackUID(const KaxTagTrackUID & ElementToClone) :EbmlUInteger(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxTagTrackUID)
-};
-
-class MATROSKA_DLL_API KaxTagEditionUID : public EbmlUInteger {
-       public:
-               KaxTagEditionUID() :EbmlUInteger(0) {}
-               KaxTagEditionUID(const KaxTagEditionUID & ElementToClone) :EbmlUInteger(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxTagEditionUID)
-};
-
-class MATROSKA_DLL_API KaxTagChapterUID : public EbmlUInteger {
-       public:
-               KaxTagChapterUID() :EbmlUInteger(0) {}
-               KaxTagChapterUID(const KaxTagChapterUID & ElementToClone) :EbmlUInteger(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxTagChapterUID)
-};
-
-class MATROSKA_DLL_API KaxTagAttachmentUID : public EbmlUInteger {
-       public:
-               KaxTagAttachmentUID() :EbmlUInteger(0) {}
-               KaxTagAttachmentUID(const KaxTagAttachmentUID & ElementToClone) :EbmlUInteger(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxTagAttachmentUID)
-};
-
-class MATROSKA_DLL_API KaxTagArchivalLocation : public EbmlUnicodeString {
-       public:
-               KaxTagArchivalLocation() {}
-               KaxTagArchivalLocation(const KaxTagArchivalLocation & ElementToClone) :EbmlUnicodeString(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxTagArchivalLocation)
-};
-
-class MATROSKA_DLL_API KaxTagAudioEncryption : public EbmlBinary {
-       public:
-               KaxTagAudioEncryption() {}
-               KaxTagAudioEncryption(const KaxTagAudioEncryption & ElementToClone) :EbmlBinary(ElementToClone){}
-               bool ValidateSize() const {return true;} // we don't mind about what's inside
-
-        EBML_CONCRETE_CLASS(KaxTagAudioEncryption)
-};
-
-class MATROSKA_DLL_API KaxTagAudioGain : public EbmlFloat {
-       public:
-               KaxTagAudioGain() {}
-               KaxTagAudioGain(const KaxTagAudioGain & ElementToClone) :EbmlFloat(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxTagAudioGain)
-};
-
-class MATROSKA_DLL_API KaxTagAudioGenre : public EbmlString {
-       public:
-               KaxTagAudioGenre() {}
-               KaxTagAudioGenre(const KaxTagAudioGenre & ElementToClone) :EbmlString(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxTagAudioGenre)
-};
-
-class MATROSKA_DLL_API KaxTagAudioPeak : public EbmlFloat {
-       public:
-               KaxTagAudioPeak() {}
-               KaxTagAudioPeak(const KaxTagAudioPeak & ElementToClone) :EbmlFloat(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxTagAudioPeak)
-};
-
-class MATROSKA_DLL_API KaxTagBibliography : public EbmlUnicodeString {
-       public:
-               KaxTagBibliography() {}
-               KaxTagBibliography(const KaxTagBibliography & ElementToClone) :EbmlUnicodeString(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxTagBibliography)
-};
-
-class MATROSKA_DLL_API KaxTagBPM : public EbmlFloat {
-       public:
-               KaxTagBPM() {}
-               KaxTagBPM(const KaxTagBPM & ElementToClone) :EbmlFloat(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxTagBPM)
-};
-
-class MATROSKA_DLL_API KaxTagCaptureDPI : public EbmlUInteger {
-       public:
-               KaxTagCaptureDPI() {}
-               KaxTagCaptureDPI(const KaxTagCaptureDPI & ElementToClone) :EbmlUInteger(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxTagCaptureDPI)
-};
-
-class MATROSKA_DLL_API KaxTagCaptureLightness : public EbmlBinary {
-       public:
-               KaxTagCaptureLightness() {}
-               KaxTagCaptureLightness(const KaxTagCaptureLightness & ElementToClone) :EbmlBinary(ElementToClone){}
-               bool ValidateSize() const {return true;} // we don't mind about what's inside
-
-        EBML_CONCRETE_CLASS(KaxTagCaptureLightness)
-};
-
-class MATROSKA_DLL_API KaxTagCapturePaletteSetting : public EbmlUInteger {
-       public:
-               KaxTagCapturePaletteSetting() {}
-               KaxTagCapturePaletteSetting(const KaxTagCapturePaletteSetting & ElementToClone) :EbmlUInteger(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxTagCapturePaletteSetting)
-};
-
-class MATROSKA_DLL_API KaxTagCaptureSharpness : public EbmlBinary {
-       public:
-               KaxTagCaptureSharpness() {}
-               KaxTagCaptureSharpness(const KaxTagCaptureSharpness & ElementToClone) :EbmlBinary(ElementToClone){}
-               bool ValidateSize() const {return true;} // we don't mind about what's inside
-
-        EBML_CONCRETE_CLASS(KaxTagCaptureSharpness)
-};
-
-class MATROSKA_DLL_API KaxTagCropped : public EbmlUnicodeString {
-       public:
-               KaxTagCropped() {}
-               KaxTagCropped(const KaxTagCropped & ElementToClone) :EbmlUnicodeString(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxTagCropped)
-};
-
-class MATROSKA_DLL_API KaxTagDiscTrack : public EbmlUInteger {
-       public:
-               KaxTagDiscTrack() {}
-               KaxTagDiscTrack(const KaxTagDiscTrack & ElementToClone) :EbmlUInteger(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxTagDiscTrack)
-};
-
-class MATROSKA_DLL_API KaxTagEncoder : public EbmlUnicodeString {
-       public:
-               KaxTagEncoder() {}
-               KaxTagEncoder(const KaxTagEncoder & ElementToClone) :EbmlUnicodeString(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxTagEncoder)
-};
-
-class MATROSKA_DLL_API KaxTagEncodeSettings : public EbmlUnicodeString {
-       public:
-               KaxTagEncodeSettings() {}
-               KaxTagEncodeSettings(const KaxTagEncodeSettings & ElementToClone) :EbmlUnicodeString(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxTagEncodeSettings)
-};
-
-class MATROSKA_DLL_API KaxTagEqualisation : public EbmlBinary {
-       public:
-               KaxTagEqualisation() {}
-               KaxTagEqualisation(const KaxTagEqualisation & ElementToClone) :EbmlBinary(ElementToClone){}
-               bool ValidateSize() const {return true;} // we don't mind about what's inside
-
-        EBML_CONCRETE_CLASS(KaxTagEqualisation)
-};
-
-class MATROSKA_DLL_API KaxTagFile : public EbmlUnicodeString {
-       public:
-               KaxTagFile() {}
-               KaxTagFile(const KaxTagFile & ElementToClone) :EbmlUnicodeString(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxTagFile)
-};
-
-class MATROSKA_DLL_API KaxTagInitialKey : public EbmlString {
-       public:
-               KaxTagInitialKey() {}
-               KaxTagInitialKey(const KaxTagInitialKey & ElementToClone) :EbmlString(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxTagInitialKey)
-};
-
-class MATROSKA_DLL_API KaxTagKeywords : public EbmlUnicodeString {
-       public:
-               KaxTagKeywords() {}
-               KaxTagKeywords(const KaxTagKeywords & ElementToClone) :EbmlUnicodeString(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxTagKeywords)
-};
-
-class MATROSKA_DLL_API KaxTagLanguage : public EbmlString {
-       public:
-               KaxTagLanguage() {}
-               KaxTagLanguage(const KaxTagLanguage & ElementToClone) :EbmlString(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxTagLanguage)
-};
-
-class MATROSKA_DLL_API KaxTagLength : public EbmlUInteger {
-       public:
-               KaxTagLength() {}
-               KaxTagLength(const KaxTagLength & ElementToClone) :EbmlUInteger(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxTagLength)
-};
-
-class MATROSKA_DLL_API KaxTagMood : public EbmlUnicodeString {
-       public:
-               KaxTagMood() {}
-               KaxTagMood(const KaxTagMood & ElementToClone) :EbmlUnicodeString(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxTagMood)
-};
-
-class MATROSKA_DLL_API KaxTagOfficialAudioFileURL : public EbmlString {
-       public:
-               KaxTagOfficialAudioFileURL() {}
-               KaxTagOfficialAudioFileURL(const KaxTagOfficialAudioFileURL & ElementToClone) :EbmlString(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxTagOfficialAudioFileURL)
-};
-
-class MATROSKA_DLL_API KaxTagOfficialAudioSourceURL : public EbmlString {
-       public:
-               KaxTagOfficialAudioSourceURL() {}
-               KaxTagOfficialAudioSourceURL(const KaxTagOfficialAudioSourceURL & ElementToClone) :EbmlString(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxTagOfficialAudioSourceURL)
-};
-
-class MATROSKA_DLL_API KaxTagOriginalDimensions : public EbmlString {
-       public:
-               KaxTagOriginalDimensions() {}
-               KaxTagOriginalDimensions(const KaxTagOriginalDimensions & ElementToClone) :EbmlString(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxTagOriginalDimensions)
-};
-
-class MATROSKA_DLL_API KaxTagOriginalMediaType : public EbmlUnicodeString {
-       public:
-               KaxTagOriginalMediaType() {}
-               KaxTagOriginalMediaType(const KaxTagOriginalMediaType & ElementToClone) :EbmlUnicodeString(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxTagOriginalMediaType)
-};
-
-class MATROSKA_DLL_API KaxTagPlayCounter : public EbmlUInteger {
-       public:
-               KaxTagPlayCounter() {}
-               KaxTagPlayCounter(const KaxTagPlayCounter & ElementToClone) :EbmlUInteger(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxTagPlayCounter)
-};                      
-
-class MATROSKA_DLL_API KaxTagPlaylistDelay : public EbmlUInteger {
-       public:
-               KaxTagPlaylistDelay() {}
-               KaxTagPlaylistDelay(const KaxTagPlaylistDelay & ElementToClone) :EbmlUInteger(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxTagPlaylistDelay)
-};
-
-class MATROSKA_DLL_API KaxTagPopularimeter : public EbmlSInteger {
-       public:
-               KaxTagPopularimeter() {}
-               KaxTagPopularimeter(const KaxTagPopularimeter & ElementToClone) :EbmlSInteger(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxTagPopularimeter)
-};
-
-class MATROSKA_DLL_API KaxTagProduct : public EbmlUnicodeString {
-       public:
-               KaxTagProduct() {}
-               KaxTagProduct(const KaxTagProduct & ElementToClone) :EbmlUnicodeString(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxTagProduct)
-};
-
-class MATROSKA_DLL_API KaxTagRating : public EbmlBinary {
-       public:
-               KaxTagRating() {}
-               KaxTagRating(const KaxTagRating & ElementToClone) :EbmlBinary(ElementToClone){}
-               bool ValidateSize() const {return true;} // we don't mind about what's inside
-
-        EBML_CONCRETE_CLASS(KaxTagRating)
-};
-
-class MATROSKA_DLL_API KaxTagRecordLocation : public EbmlString {
-       public:
-               KaxTagRecordLocation() {}
-               KaxTagRecordLocation(const KaxTagRecordLocation & ElementToClone) :EbmlString(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxTagRecordLocation)
-};
-
-class MATROSKA_DLL_API KaxTagSetPart : public EbmlUInteger {
-       public:
-               KaxTagSetPart() {}
-               KaxTagSetPart(const KaxTagSetPart & ElementToClone) :EbmlUInteger(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxTagSetPart)
-};
-
-class MATROSKA_DLL_API KaxTagSource : public EbmlUnicodeString {
-       public:
-               KaxTagSource() {}
-               KaxTagSource(const KaxTagSource & ElementToClone) :EbmlUnicodeString(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxTagSource)
-};
-
-class MATROSKA_DLL_API KaxTagSourceForm : public EbmlUnicodeString {
-       public:
-               KaxTagSourceForm() {}
-               KaxTagSourceForm(const KaxTagSourceForm & ElementToClone) :EbmlUnicodeString(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxTagSourceForm)
-};
-
-class MATROSKA_DLL_API KaxTagSubGenre : public EbmlString {
-       public:
-               KaxTagSubGenre() {}
-               KaxTagSubGenre(const KaxTagSubGenre & ElementToClone) :EbmlString(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxTagSubGenre)
-};
-
-class MATROSKA_DLL_API KaxTagSubject : public EbmlUnicodeString {
-       public:
-               KaxTagSubject() {}
-               KaxTagSubject(const KaxTagSubject & ElementToClone) :EbmlUnicodeString(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxTagSubject)
-};
-
-class MATROSKA_DLL_API KaxTagUnsynchronisedText : public EbmlUnicodeString {
-       public:
-               KaxTagUnsynchronisedText() {}
-               KaxTagUnsynchronisedText(const KaxTagUnsynchronisedText & ElementToClone) :EbmlUnicodeString(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxTagUnsynchronisedText)
-};
-
-class MATROSKA_DLL_API KaxTagUserDefinedURL : public EbmlString {
-       public:
-               KaxTagUserDefinedURL() {}
-               KaxTagUserDefinedURL(const KaxTagUserDefinedURL & ElementToClone) :EbmlString(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxTagUserDefinedURL)
-};
-
-class MATROSKA_DLL_API KaxTagVideoGenre : public EbmlBinary {
-       public:
-               KaxTagVideoGenre() {}
-               KaxTagVideoGenre(const KaxTagVideoGenre & ElementToClone) :EbmlBinary(ElementToClone){}
-               bool ValidateSize() const {return (GetSize() >= 2);}
-
-        EBML_CONCRETE_CLASS(KaxTagVideoGenre)
-};
-
-class MATROSKA_DLL_API KaxTagSimple : public EbmlMaster {
-       public:
-               KaxTagSimple();
-               KaxTagSimple(const KaxTagSimple & ElementToClone) :EbmlMaster(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxTagSimple)
-};
-
-class MATROSKA_DLL_API KaxTagName : public EbmlUnicodeString {
-       public:
-               KaxTagName() {}
-               KaxTagName(const KaxTagName & ElementToClone) :EbmlUnicodeString(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxTagName)
-};
-
-class MATROSKA_DLL_API KaxTagLangue : public EbmlString {
-       public:
-               KaxTagLangue(): EbmlString("und") {}
-               KaxTagLangue(const KaxTagLangue & ElementToClone) :EbmlString(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxTagLangue)
-};
-
-class MATROSKA_DLL_API KaxTagDefault : public EbmlUInteger {
-       public:
-               KaxTagDefault() :EbmlUInteger(1) {}
-               KaxTagDefault(const KaxTagTrackUID & ElementToClone) :EbmlUInteger(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxTagDefault)
-};
-
-class MATROSKA_DLL_API KaxTagString : public EbmlUnicodeString {
-       public:
-               KaxTagString() {}
-               KaxTagString(const KaxTagString & ElementToClone) :EbmlUnicodeString(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxTagString)
-};
-
-class MATROSKA_DLL_API KaxTagBinary : public EbmlBinary {
-       public:
-               KaxTagBinary() {}
-               KaxTagBinary(const KaxTagBinary & ElementToClone) :EbmlBinary(ElementToClone){}
-               bool ValidateSize() const {return true;} // {return (GetSize() >= 0);}
-
-        EBML_CONCRETE_CLASS(KaxTagBinary)
-};
-
-END_LIBMATROSKA_NAMESPACE
-
-#endif // LIBMATROSKA_TAG_H
+/****************************************************************************\r
+** libmatroska : parse Matroska files, see http://www.matroska.org/\r
+**\r
+** <file/class MATROSKA_DLL_API description>\r
+**\r
+** Copyright (C) 2002-2010 Steve Lhomme.  All rights reserved.\r
+**\r
+** This file is part of libmatroska.\r
+**\r
+** This library is free software; you can redistribute it and/or\r
+** modify it under the terms of the GNU Lesser General Public\r
+** License as published by the Free Software Foundation; either\r
+** version 2.1 of the License, or (at your option) any later version.\r
+** \r
+** This library is distributed in the hope that it will be useful,\r
+** but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
+** Lesser General Public License for more details.\r
+** \r
+** You should have received a copy of the GNU Lesser General Public\r
+** License along with this library; if not, write to the Free Software\r
+** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\r
+**\r
+** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**\r
+** Contact license@matroska.org if any conditions of this licensing are\r
+** not clear to you.\r
+**\r
+**********************************************************************/\r
+\r
+/*!\r
+       \file\r
+       \version \$Id: KaxTag.h,v 1.9 2004/04/14 23:26:17 robux4 Exp $\r
+       \author Jory Stone     <jcsston @ toughguy.net>\r
+       \author Steve Lhomme   <robux4 @ users.sf.net>\r
+*/\r
+#ifndef LIBMATROSKA_TAG_H\r
+#define LIBMATROSKA_TAG_H\r
+\r
+#include "matroska/KaxTypes.h"\r
+#include "ebml/EbmlMaster.h"\r
+#include "ebml/EbmlFloat.h"\r
+#include "ebml/EbmlSInteger.h"\r
+#include "ebml/EbmlUInteger.h"\r
+#include "ebml/EbmlString.h"\r
+#include "ebml/EbmlUnicodeString.h"\r
+#include "ebml/EbmlBinary.h"\r
+\r
+using namespace LIBEBML_NAMESPACE;\r
+\r
+START_LIBMATROSKA_NAMESPACE\r
+\r
+class MATROSKA_DLL_API KaxTag : public EbmlMaster {\r
+       public:\r
+               KaxTag();\r
+               KaxTag(const KaxTag & ElementToClone) :EbmlMaster(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTag)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTagTargets : public EbmlMaster {\r
+       public:\r
+               KaxTagTargets();\r
+               KaxTagTargets(const KaxTagTargets & ElementToClone) :EbmlMaster(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTagTargets)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTagGeneral : public EbmlMaster {\r
+       public:\r
+               KaxTagGeneral();\r
+               KaxTagGeneral(const KaxTagGeneral & ElementToClone) :EbmlMaster(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTagGeneral)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTagGenres : public EbmlMaster {\r
+       public:\r
+               KaxTagGenres();\r
+               KaxTagGenres(const KaxTagGenres & ElementToClone) :EbmlMaster(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTagGenres)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTagAudioSpecific : public EbmlMaster {\r
+       public:\r
+               KaxTagAudioSpecific();\r
+               KaxTagAudioSpecific(const KaxTagAudioSpecific & ElementToClone) :EbmlMaster(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTagAudioSpecific)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTagImageSpecific : public EbmlMaster {\r
+       public:\r
+               KaxTagImageSpecific();\r
+               KaxTagImageSpecific(const KaxTagImageSpecific & ElementToClone) :EbmlMaster(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTagImageSpecific)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTagTargetTypeValue : public EbmlUInteger {\r
+       public:\r
+               KaxTagTargetTypeValue() :EbmlUInteger(50) {}\r
+               KaxTagTargetTypeValue(const KaxTagTargetTypeValue & ElementToClone) :EbmlUInteger(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTagTargetTypeValue)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTagTargetType : public EbmlString {\r
+       public:\r
+               KaxTagTargetType() {}\r
+               KaxTagTargetType(const KaxTagTargetType & ElementToClone) :EbmlString(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTagTargetType)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTagTrackUID : public EbmlUInteger {\r
+       public:\r
+               KaxTagTrackUID() :EbmlUInteger(0) {}\r
+               KaxTagTrackUID(const KaxTagTrackUID & ElementToClone) :EbmlUInteger(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTagTrackUID)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTagEditionUID : public EbmlUInteger {\r
+       public:\r
+               KaxTagEditionUID() :EbmlUInteger(0) {}\r
+               KaxTagEditionUID(const KaxTagEditionUID & ElementToClone) :EbmlUInteger(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTagEditionUID)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTagChapterUID : public EbmlUInteger {\r
+       public:\r
+               KaxTagChapterUID() :EbmlUInteger(0) {}\r
+               KaxTagChapterUID(const KaxTagChapterUID & ElementToClone) :EbmlUInteger(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTagChapterUID)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTagAttachmentUID : public EbmlUInteger {\r
+       public:\r
+               KaxTagAttachmentUID() :EbmlUInteger(0) {}\r
+               KaxTagAttachmentUID(const KaxTagAttachmentUID & ElementToClone) :EbmlUInteger(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTagAttachmentUID)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTagArchivalLocation : public EbmlUnicodeString {\r
+       public:\r
+               KaxTagArchivalLocation() {}\r
+               KaxTagArchivalLocation(const KaxTagArchivalLocation & ElementToClone) :EbmlUnicodeString(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTagArchivalLocation)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTagAudioEncryption : public EbmlBinary {\r
+       public:\r
+               KaxTagAudioEncryption() {}\r
+               KaxTagAudioEncryption(const KaxTagAudioEncryption & ElementToClone) :EbmlBinary(ElementToClone){}\r
+               bool ValidateSize() const {return true;} // we don't mind about what's inside\r
+\r
+        EBML_CONCRETE_CLASS(KaxTagAudioEncryption)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTagAudioGain : public EbmlFloat {\r
+       public:\r
+               KaxTagAudioGain() {}\r
+               KaxTagAudioGain(const KaxTagAudioGain & ElementToClone) :EbmlFloat(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTagAudioGain)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTagAudioGenre : public EbmlString {\r
+       public:\r
+               KaxTagAudioGenre() {}\r
+               KaxTagAudioGenre(const KaxTagAudioGenre & ElementToClone) :EbmlString(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTagAudioGenre)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTagAudioPeak : public EbmlFloat {\r
+       public:\r
+               KaxTagAudioPeak() {}\r
+               KaxTagAudioPeak(const KaxTagAudioPeak & ElementToClone) :EbmlFloat(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTagAudioPeak)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTagBibliography : public EbmlUnicodeString {\r
+       public:\r
+               KaxTagBibliography() {}\r
+               KaxTagBibliography(const KaxTagBibliography & ElementToClone) :EbmlUnicodeString(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTagBibliography)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTagBPM : public EbmlFloat {\r
+       public:\r
+               KaxTagBPM() {}\r
+               KaxTagBPM(const KaxTagBPM & ElementToClone) :EbmlFloat(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTagBPM)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTagCaptureDPI : public EbmlUInteger {\r
+       public:\r
+               KaxTagCaptureDPI() {}\r
+               KaxTagCaptureDPI(const KaxTagCaptureDPI & ElementToClone) :EbmlUInteger(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTagCaptureDPI)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTagCaptureLightness : public EbmlBinary {\r
+       public:\r
+               KaxTagCaptureLightness() {}\r
+               KaxTagCaptureLightness(const KaxTagCaptureLightness & ElementToClone) :EbmlBinary(ElementToClone){}\r
+               bool ValidateSize() const {return true;} // we don't mind about what's inside\r
+\r
+        EBML_CONCRETE_CLASS(KaxTagCaptureLightness)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTagCapturePaletteSetting : public EbmlUInteger {\r
+       public:\r
+               KaxTagCapturePaletteSetting() {}\r
+               KaxTagCapturePaletteSetting(const KaxTagCapturePaletteSetting & ElementToClone) :EbmlUInteger(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTagCapturePaletteSetting)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTagCaptureSharpness : public EbmlBinary {\r
+       public:\r
+               KaxTagCaptureSharpness() {}\r
+               KaxTagCaptureSharpness(const KaxTagCaptureSharpness & ElementToClone) :EbmlBinary(ElementToClone){}\r
+               bool ValidateSize() const {return true;} // we don't mind about what's inside\r
+\r
+        EBML_CONCRETE_CLASS(KaxTagCaptureSharpness)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTagCropped : public EbmlUnicodeString {\r
+       public:\r
+               KaxTagCropped() {}\r
+               KaxTagCropped(const KaxTagCropped & ElementToClone) :EbmlUnicodeString(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTagCropped)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTagDiscTrack : public EbmlUInteger {\r
+       public:\r
+               KaxTagDiscTrack() {}\r
+               KaxTagDiscTrack(const KaxTagDiscTrack & ElementToClone) :EbmlUInteger(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTagDiscTrack)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTagEncoder : public EbmlUnicodeString {\r
+       public:\r
+               KaxTagEncoder() {}\r
+               KaxTagEncoder(const KaxTagEncoder & ElementToClone) :EbmlUnicodeString(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTagEncoder)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTagEncodeSettings : public EbmlUnicodeString {\r
+       public:\r
+               KaxTagEncodeSettings() {}\r
+               KaxTagEncodeSettings(const KaxTagEncodeSettings & ElementToClone) :EbmlUnicodeString(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTagEncodeSettings)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTagEqualisation : public EbmlBinary {\r
+       public:\r
+               KaxTagEqualisation() {}\r
+               KaxTagEqualisation(const KaxTagEqualisation & ElementToClone) :EbmlBinary(ElementToClone){}\r
+               bool ValidateSize() const {return true;} // we don't mind about what's inside\r
+\r
+        EBML_CONCRETE_CLASS(KaxTagEqualisation)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTagFile : public EbmlUnicodeString {\r
+       public:\r
+               KaxTagFile() {}\r
+               KaxTagFile(const KaxTagFile & ElementToClone) :EbmlUnicodeString(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTagFile)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTagInitialKey : public EbmlString {\r
+       public:\r
+               KaxTagInitialKey() {}\r
+               KaxTagInitialKey(const KaxTagInitialKey & ElementToClone) :EbmlString(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTagInitialKey)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTagKeywords : public EbmlUnicodeString {\r
+       public:\r
+               KaxTagKeywords() {}\r
+               KaxTagKeywords(const KaxTagKeywords & ElementToClone) :EbmlUnicodeString(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTagKeywords)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTagLanguage : public EbmlString {\r
+       public:\r
+               KaxTagLanguage() {}\r
+               KaxTagLanguage(const KaxTagLanguage & ElementToClone) :EbmlString(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTagLanguage)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTagLength : public EbmlUInteger {\r
+       public:\r
+               KaxTagLength() {}\r
+               KaxTagLength(const KaxTagLength & ElementToClone) :EbmlUInteger(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTagLength)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTagMood : public EbmlUnicodeString {\r
+       public:\r
+               KaxTagMood() {}\r
+               KaxTagMood(const KaxTagMood & ElementToClone) :EbmlUnicodeString(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTagMood)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTagOfficialAudioFileURL : public EbmlString {\r
+       public:\r
+               KaxTagOfficialAudioFileURL() {}\r
+               KaxTagOfficialAudioFileURL(const KaxTagOfficialAudioFileURL & ElementToClone) :EbmlString(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTagOfficialAudioFileURL)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTagOfficialAudioSourceURL : public EbmlString {\r
+       public:\r
+               KaxTagOfficialAudioSourceURL() {}\r
+               KaxTagOfficialAudioSourceURL(const KaxTagOfficialAudioSourceURL & ElementToClone) :EbmlString(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTagOfficialAudioSourceURL)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTagOriginalDimensions : public EbmlString {\r
+       public:\r
+               KaxTagOriginalDimensions() {}\r
+               KaxTagOriginalDimensions(const KaxTagOriginalDimensions & ElementToClone) :EbmlString(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTagOriginalDimensions)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTagOriginalMediaType : public EbmlUnicodeString {\r
+       public:\r
+               KaxTagOriginalMediaType() {}\r
+               KaxTagOriginalMediaType(const KaxTagOriginalMediaType & ElementToClone) :EbmlUnicodeString(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTagOriginalMediaType)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTagPlayCounter : public EbmlUInteger {\r
+       public:\r
+               KaxTagPlayCounter() {}\r
+               KaxTagPlayCounter(const KaxTagPlayCounter & ElementToClone) :EbmlUInteger(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTagPlayCounter)\r
+};                      \r
+\r
+class MATROSKA_DLL_API KaxTagPlaylistDelay : public EbmlUInteger {\r
+       public:\r
+               KaxTagPlaylistDelay() {}\r
+               KaxTagPlaylistDelay(const KaxTagPlaylistDelay & ElementToClone) :EbmlUInteger(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTagPlaylistDelay)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTagPopularimeter : public EbmlSInteger {\r
+       public:\r
+               KaxTagPopularimeter() {}\r
+               KaxTagPopularimeter(const KaxTagPopularimeter & ElementToClone) :EbmlSInteger(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTagPopularimeter)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTagProduct : public EbmlUnicodeString {\r
+       public:\r
+               KaxTagProduct() {}\r
+               KaxTagProduct(const KaxTagProduct & ElementToClone) :EbmlUnicodeString(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTagProduct)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTagRating : public EbmlBinary {\r
+       public:\r
+               KaxTagRating() {}\r
+               KaxTagRating(const KaxTagRating & ElementToClone) :EbmlBinary(ElementToClone){}\r
+               bool ValidateSize() const {return true;} // we don't mind about what's inside\r
+\r
+        EBML_CONCRETE_CLASS(KaxTagRating)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTagRecordLocation : public EbmlString {\r
+       public:\r
+               KaxTagRecordLocation() {}\r
+               KaxTagRecordLocation(const KaxTagRecordLocation & ElementToClone) :EbmlString(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTagRecordLocation)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTagSetPart : public EbmlUInteger {\r
+       public:\r
+               KaxTagSetPart() {}\r
+               KaxTagSetPart(const KaxTagSetPart & ElementToClone) :EbmlUInteger(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTagSetPart)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTagSource : public EbmlUnicodeString {\r
+       public:\r
+               KaxTagSource() {}\r
+               KaxTagSource(const KaxTagSource & ElementToClone) :EbmlUnicodeString(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTagSource)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTagSourceForm : public EbmlUnicodeString {\r
+       public:\r
+               KaxTagSourceForm() {}\r
+               KaxTagSourceForm(const KaxTagSourceForm & ElementToClone) :EbmlUnicodeString(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTagSourceForm)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTagSubGenre : public EbmlString {\r
+       public:\r
+               KaxTagSubGenre() {}\r
+               KaxTagSubGenre(const KaxTagSubGenre & ElementToClone) :EbmlString(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTagSubGenre)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTagSubject : public EbmlUnicodeString {\r
+       public:\r
+               KaxTagSubject() {}\r
+               KaxTagSubject(const KaxTagSubject & ElementToClone) :EbmlUnicodeString(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTagSubject)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTagUnsynchronisedText : public EbmlUnicodeString {\r
+       public:\r
+               KaxTagUnsynchronisedText() {}\r
+               KaxTagUnsynchronisedText(const KaxTagUnsynchronisedText & ElementToClone) :EbmlUnicodeString(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTagUnsynchronisedText)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTagUserDefinedURL : public EbmlString {\r
+       public:\r
+               KaxTagUserDefinedURL() {}\r
+               KaxTagUserDefinedURL(const KaxTagUserDefinedURL & ElementToClone) :EbmlString(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTagUserDefinedURL)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTagVideoGenre : public EbmlBinary {\r
+       public:\r
+               KaxTagVideoGenre() {}\r
+               KaxTagVideoGenre(const KaxTagVideoGenre & ElementToClone) :EbmlBinary(ElementToClone){}\r
+               bool ValidateSize() const {return (GetSize() >= 2);}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTagVideoGenre)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTagSimple : public EbmlMaster {\r
+       public:\r
+               KaxTagSimple();\r
+               KaxTagSimple(const KaxTagSimple & ElementToClone) :EbmlMaster(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTagSimple)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTagName : public EbmlUnicodeString {\r
+       public:\r
+               KaxTagName() {}\r
+               KaxTagName(const KaxTagName & ElementToClone) :EbmlUnicodeString(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTagName)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTagLangue : public EbmlString {\r
+       public:\r
+               KaxTagLangue(): EbmlString("und") {}\r
+               KaxTagLangue(const KaxTagLangue & ElementToClone) :EbmlString(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTagLangue)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTagDefault : public EbmlUInteger {\r
+       public:\r
+               KaxTagDefault() :EbmlUInteger(1) {}\r
+               KaxTagDefault(const KaxTagTrackUID & ElementToClone) :EbmlUInteger(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTagDefault)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTagString : public EbmlUnicodeString {\r
+       public:\r
+               KaxTagString() {}\r
+               KaxTagString(const KaxTagString & ElementToClone) :EbmlUnicodeString(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTagString)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTagBinary : public EbmlBinary {\r
+       public:\r
+               KaxTagBinary() {}\r
+               KaxTagBinary(const KaxTagBinary & ElementToClone) :EbmlBinary(ElementToClone){}\r
+               bool ValidateSize() const {return true;} // {return (GetSize() >= 0);}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTagBinary)\r
+};\r
+\r
+END_LIBMATROSKA_NAMESPACE\r
+\r
+#endif // LIBMATROSKA_TAG_H\r
index 09cd3a018c307933aee8c0b21473944b2797ac6d..83ef460b8b6ab37d967f7ed6f93e561186c06594 100644 (file)
-/****************************************************************************
-** libmatroska : parse Matroska files, see http://www.matroska.org/
-**
-** <file/class MATROSKA_DLL_API description>
-**
-** Copyright (C) 2002-2004 Steve Lhomme.  All rights reserved.
-**
-** This file is part of libmatroska.
-**
-** This library is free software; you can redistribute it and/or
-** modify it under the terms of the GNU Lesser General Public
-** License as published by the Free Software Foundation; either
-** version 2.1 of the License, or (at your option) any later version.
-** 
-** This library is distributed in the hope that it will be useful,
-** but WITHOUT ANY WARRANTY; without even the implied warranty of
-** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-** Lesser General Public License for more details.
-** 
-** You should have received a copy of the GNU Lesser General Public
-** License along with this library; if not, write to the Free Software
-** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-**
-** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**
-** Contact license@matroska.org if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-/*!
-       \file
-       \version \$Id: KaxTagMulti.h,v 1.9 2004/04/14 23:26:17 robux4 Exp $
-       \author Jory Stone     <jcsston @ toughguy.net>
-       \author Steve Lhomme   <robux4 @ users.sf.net>
-*/
-#ifndef LIBMATROSKA_TAGMULTI_H
-#define LIBMATROSKA_TAGMULTI_H
-
-#include "matroska/KaxTypes.h"
-#include "ebml/EbmlMaster.h"
-#include "ebml/EbmlDate.h"
-#include "ebml/EbmlFloat.h"
-#include "ebml/EbmlSInteger.h"
-#include "ebml/EbmlUInteger.h"
-#include "ebml/EbmlString.h"
-#include "ebml/EbmlUnicodeString.h"
-#include "ebml/EbmlBinary.h"
-
-using namespace LIBEBML_NAMESPACE;
-
-START_LIBMATROSKA_NAMESPACE
-
-enum KaxTagMultiCommercialTypes {
-       KaxTagMultiCommercialType_FilePurchase = 1, //Information on where to purchase this file. This is akin to the WPAY tag in ID3.
-       KaxTagMultiCommercialType_ItemPurchase, //Information on where to purchase this album. This is akin to the WCOM tag in ID3.
-       KaxTagMultiCommercialType_Owner  //Information on the purchase that occurred for this file. This is akin to the OWNE tag in ID3.
-};
-enum KaxTagMultiDateTypes {
-       KaxTagMultiDateType_EncodingDate = 1, //The time that the encoding of this item was completed. This is akin to the TDEN tag in ID3.
-       KaxTagMultiDateType_RecordingDate, //The time that the recording began, and finished. This is akin to the TDRC tag in ID3.
-       KaxTagMultiDateType_ReleaseDate, //The time that the item was originaly released. This is akin to the TDRL tag in ID3.
-       KaxTagMultiDateType_OriginalReleaseDate, //The time that the item was originaly released if it is a remake. This is akin to the TDOR tag in ID3.
-       KaxTagMultiDateType_TaggingDate, //The time that the tags were done for this item. This is akin to the TDTG tag in ID3.
-       KaxTagMultiDateType_DigitizingDate  //The time that the item was tranfered to a digital medium. This is akin to the IDIT tag in RIFF
-};
-enum KaxTagMultiEntitiesTypes {
-       KaxTagMultiEntitiesType_LyricistTextWriter = 1, //The person that wrote the words/script for this item. This is akin to the TEXT tag in ID3.
-       KaxTagMultiEntitiesType_Composer, //The name of the composer of this item. This is akin to the TCOM tag in ID3.
-       KaxTagMultiEntitiesType_LeadPerformerSoloist, //This is akin to the TPE1 tag in ID3.
-       KaxTagMultiEntitiesType_BandOrchestraAccompaniment, //This is akin to the TPE2 tag in ID3.
-       KaxTagMultiEntitiesType_OriginalLyricistTextWriter, //This is akin to the TOLY tag in ID3.
-       KaxTagMultiEntitiesType_OriginalArtistPerformer, //This is akin to the TOPE tag in ID3.
-       KaxTagMultiEntitiesType_OriginalAlbumMovieShowTitle, //This is akin to the TOAL tag in ID3.
-       KaxTagMultiEntitiesType_ConductorPerformerRefinement, //This is akin to the TPE3 tag in ID3.
-       KaxTagMultiEntitiesType_InterpretedRemixedBy, //This is akin to the TPE4 tag in ID3.
-       KaxTagMultiEntitiesType_Director, //This is akin to the IART tag in RIFF
-       KaxTagMultiEntitiesType_ProducedBy, //This is akin to the IPRO tag in Extended RIFF
-       KaxTagMultiEntitiesType_Cinematographer, //This is akin to the ICNM tag in Extended RIFF
-       KaxTagMultiEntitiesType_ProductionDesigner, //This is akin to the IPDS tag in Extended RIFF
-       KaxTagMultiEntitiesType_CostumeDesigner, //This is akin to the ICDS tag in Extended RIFF
-       KaxTagMultiEntitiesType_ProductionStudio, //This is akin to the ISTD tag in Extended RIFF
-       KaxTagMultiEntitiesType_DistributedBy, //This is akin to the IDST tag in Extended RIFF
-       KaxTagMultiEntitiesType_CommissionedBy, //This is akin to the ICMS tag in RIFF
-       KaxTagMultiEntitiesType_Engineer, //This is akin to the IENG tag in RIFF
-       KaxTagMultiEntitiesType_EditedBy, //This is akin to the IEDT tag in Extended RIFF
-       KaxTagMultiEntitiesType_EncodedBy, //This is akin to the TENC tag in ID3.
-       KaxTagMultiEntitiesType_RippedBy, //This is akin to the IRIP tag in Extended RIFF
-       KaxTagMultiEntitiesType_InvolvedPeopleList, //A very general tag for everyone else that wants to be listed. This is akin to the TMCL tag in ID3.
-       KaxTagMultiEntitiesType_InternetRadioStationName, //This is akin to the TSRN tag in ID3.
-       KaxTagMultiEntitiesType_Publisher  //This is akin to the TPUB tag in ID3.
-};
-
-enum KaxTagMultiIdentifierTypes {
-       KaxTagMultiIdentifierType_ISRC = 1, //String, The International Standard Recording Code
-       KaxTagMultiIdentifierType_CDIdentifier, //Binary, This is a binary dump of the TOC of the CDROM that this item was taken from. This holds the same information as the MCDI in ID3.
-       KaxTagMultiIdentifierType_ISBN, //String, International Standard Book Number
-       KaxTagMultiIdentifierType_Catalog, //String, sometimes the EAN/UPC, often some letters followed by some numbers
-       KaxTagMultiIdentifierType_EAN, //String, EAN-13 bar code identifier
-       KaxTagMultiIdentifierType_UPC, //String, UPC-A bar code identifier
-       KaxTagMultiIdentifierType_LabelCode, //String, Typically printed as ________ (LC) xxxx) ~~~~~~~~ or _________ (LC) 0xxxx) ~~~~~~~~~ on CDs medias or covers, where xxxx is a 4-digit number.
-       KaxTagMultiIdentifierType_LCCN, //String, Library of Congress Control Number
-       KaxTagMultiIdentifierType_UniqueFileIdentifier, //Binary, This used for a dump of the UFID field in ID3. This field would only be used if the item was pulled from an MP3.
-       CDROM_CD_TEXT_PACK_TOC_INFO2  //Binary
-};
-
-enum KaxTagMultiLegalTypes {
-       KaxTagMultiLegalType_Copyright = 1, //The copyright information as per the copyright holder. This is akin to the TCOP tag in ID3.
-       KaxTagMultiLegalType_ProductionCopyright, //The copyright information as per the production copyright holder. This is akin to the TPRO tag in ID3.
-       KaxTagMultiLegalType_TermsOfUse  //The terms of use for this item. This is akin to the USER tag in ID3.
-};
-
-enum KaxTagMultiTitleTypes {
-       KaxTagMultiTitleType_TrackTitle = 1,
-               //The title of this item. In the case of a track, the Name element should be identical to the Name element.
-               //For example, for music you might label this "Canon in D", or for video's audio track you might use "English 5.1" This is akin to the TIT2 tag in ID3.
-       KaxTagMultiTitleType_AlbumMovieShowTitle,
-               //This is the name given to a grouping of tracks and/or chapters. 
-               //For example, all video, audio, and subtitle tracks for a movie would be grouped under this and be given the name of the movie. 
-               //All tracks for a particular CD would be grouped together under the title of the CD, or if all tracks for a CD were recorded as a single track, seperated by chapters, the same would apply.
-               //You could use this to label episode 3 of The Simpsons. This is akin to the TALB tag in ID3.
-       KaxTagMultiTitleType_SetTitle,  //This would be used to label a set of ID 2. For example, season 13 of The Simpsons.
-       KaxTagMultiTitleType_Series  //This would be used to label a set of ID 3. For example, The Simpsons.
-};
-
-class MATROSKA_DLL_API KaxTagMultiComment : public EbmlMaster {
-       public:
-               KaxTagMultiComment();
-               KaxTagMultiComment(const KaxTagMultiComment & ElementToClone) :EbmlMaster(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxTagMultiComment)
-};
-
-class MATROSKA_DLL_API KaxTagMultiCommentName : public EbmlString {
-       public:
-               KaxTagMultiCommentName() {}
-               KaxTagMultiCommentName(const KaxTagMultiCommentName & ElementToClone) :EbmlString(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxTagMultiCommentName)
-};
-
-class MATROSKA_DLL_API KaxTagMultiCommentComments : public EbmlUnicodeString {
-       public:
-               KaxTagMultiCommentComments() {}
-               KaxTagMultiCommentComments(const KaxTagMultiCommentComments & ElementToClone) :EbmlUnicodeString(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxTagMultiCommentComments)
-};
-
-class MATROSKA_DLL_API KaxTagMultiCommentLanguage : public EbmlString {
-       public:
-               KaxTagMultiCommentLanguage() {}
-               KaxTagMultiCommentLanguage(const KaxTagMultiCommentLanguage & ElementToClone) :EbmlString(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxTagMultiCommentLanguage)
-};
-
-class MATROSKA_DLL_API KaxTagMultiCommercial : public EbmlMaster {
-       public:
-               KaxTagMultiCommercial();
-               KaxTagMultiCommercial(const KaxTagMultiCommercial & ElementToClone) :EbmlMaster(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxTagMultiCommercial)
-};
-
-class MATROSKA_DLL_API KaxTagCommercial : public EbmlMaster {
-       public:
-               KaxTagCommercial();
-               KaxTagCommercial(const KaxTagCommercial & ElementToClone) :EbmlMaster(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxTagCommercial)
-};
-
-class MATROSKA_DLL_API KaxTagMultiCommercialType : public EbmlUInteger {
-       public:
-               KaxTagMultiCommercialType() {}
-               KaxTagMultiCommercialType(const KaxTagMultiCommercialType & ElementToClone) :EbmlUInteger(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxTagMultiCommercialType)
-};
-
-class MATROSKA_DLL_API KaxTagMultiCommercialAddress : public EbmlUnicodeString {
-       public:
-               KaxTagMultiCommercialAddress() {}
-               KaxTagMultiCommercialAddress(const KaxTagMultiCommercialAddress & ElementToClone) :EbmlUnicodeString(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxTagMultiCommercialAddress)
-};
-
-class MATROSKA_DLL_API KaxTagMultiCommercialURL : public EbmlString {
-       public:
-               KaxTagMultiCommercialURL() {}
-               KaxTagMultiCommercialURL(const KaxTagMultiCommercialURL & ElementToClone) :EbmlString(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxTagMultiCommercialURL)
-};
-
-class MATROSKA_DLL_API KaxTagMultiCommercialEmail : public EbmlString {
-       public:
-               KaxTagMultiCommercialEmail() {}
-               KaxTagMultiCommercialEmail(const KaxTagMultiCommercialEmail & ElementToClone) :EbmlString(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxTagMultiCommercialEmail)
-};
-
-class MATROSKA_DLL_API KaxTagMultiPrice : public EbmlMaster {
-       public:
-               KaxTagMultiPrice();
-               KaxTagMultiPrice(const KaxTagMultiPrice & ElementToClone) :EbmlMaster(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxTagMultiPrice)
-};
-
-class MATROSKA_DLL_API KaxTagMultiPriceCurrency : public EbmlString {
-       public:
-               KaxTagMultiPriceCurrency() {}
-               KaxTagMultiPriceCurrency(const KaxTagMultiPriceCurrency & ElementToClone) :EbmlString(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxTagMultiPriceCurrency)
-};
-
-class MATROSKA_DLL_API KaxTagMultiPriceAmount : public EbmlFloat {
-       public:
-               KaxTagMultiPriceAmount() :EbmlFloat() {}
-               KaxTagMultiPriceAmount(const KaxTagMultiPriceAmount & ElementToClone) :EbmlFloat(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxTagMultiPriceAmount)
-};
-
-class MATROSKA_DLL_API KaxTagMultiPricePriceDate : public EbmlDate {
-       public:
-               KaxTagMultiPricePriceDate() :EbmlDate() {}
-               KaxTagMultiPricePriceDate(const KaxTagMultiPricePriceDate & ElementToClone) :EbmlDate(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxTagMultiPricePriceDate)
-};
-
-class MATROSKA_DLL_API KaxTagMultiDate : public EbmlMaster {
-       public:
-               KaxTagMultiDate();
-               KaxTagMultiDate(const KaxTagMultiDate & ElementToClone) :EbmlMaster(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxTagMultiDate)
-};
-
-class MATROSKA_DLL_API KaxTagDate : public EbmlMaster {
-       public:
-               KaxTagDate();
-               KaxTagDate(const KaxTagDate & ElementToClone) :EbmlMaster(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxTagDate)
-};
-
-class MATROSKA_DLL_API KaxTagMultiDateType : public EbmlUInteger {
-       public:
-               KaxTagMultiDateType() {}
-               KaxTagMultiDateType(const KaxTagMultiDateType & ElementToClone) :EbmlUInteger(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxTagMultiDateType)
-};
-
-class MATROSKA_DLL_API KaxTagMultiDateDateBegin : public EbmlDate {
-       public:
-               KaxTagMultiDateDateBegin() :EbmlDate() {}
-               KaxTagMultiDateDateBegin(const KaxTagMultiDateDateBegin & ElementToClone) :EbmlDate(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxTagMultiDateDateBegin)
-};
-
-class MATROSKA_DLL_API KaxTagMultiDateDateEnd : public EbmlDate {
-       public:
-               KaxTagMultiDateDateEnd() :EbmlDate() {}
-               KaxTagMultiDateDateEnd(const KaxTagMultiDateDateEnd & ElementToClone) :EbmlDate(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxTagMultiDateDateEnd)
-};
-
-class MATROSKA_DLL_API KaxTagMultiEntity : public EbmlMaster {
-       public:
-               KaxTagMultiEntity();
-               KaxTagMultiEntity(const KaxTagMultiEntity & ElementToClone) :EbmlMaster(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxTagMultiEntity)
-};
-
-class MATROSKA_DLL_API KaxTagEntity : public EbmlMaster {
-       public:
-               KaxTagEntity();
-               KaxTagEntity(const KaxTagEntity & ElementToClone) :EbmlMaster(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxTagEntity)
-};
-
-class MATROSKA_DLL_API KaxTagMultiEntityType : public EbmlUInteger {
-       public:
-               KaxTagMultiEntityType() {}
-               KaxTagMultiEntityType(const KaxTagMultiEntityType & ElementToClone) :EbmlUInteger(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxTagMultiEntityType)
-};
-
-class MATROSKA_DLL_API KaxTagMultiEntityName : public EbmlUnicodeString {
-       public:
-               KaxTagMultiEntityName() {}
-               KaxTagMultiEntityName(const KaxTagMultiEntityName & ElementToClone) :EbmlUnicodeString(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxTagMultiEntityName)
-};
-
-class MATROSKA_DLL_API KaxTagMultiEntityAddress : public EbmlUnicodeString {
-       public:
-               KaxTagMultiEntityAddress() {}
-               KaxTagMultiEntityAddress(const KaxTagMultiEntityAddress & ElementToClone) :EbmlUnicodeString(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxTagMultiEntityAddress)
-};
-
-class MATROSKA_DLL_API KaxTagMultiEntityURL : public EbmlString {
-       public:
-               KaxTagMultiEntityURL() {}
-               KaxTagMultiEntityURL(const KaxTagMultiEntityURL & ElementToClone) :EbmlString(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxTagMultiEntityURL)
-};
-
-class MATROSKA_DLL_API KaxTagMultiEntityEmail : public EbmlString {
-       public:
-               KaxTagMultiEntityEmail() {}
-               KaxTagMultiEntityEmail(const KaxTagMultiEntityEmail & ElementToClone) :EbmlString(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxTagMultiEntityEmail)
-};
-
-class MATROSKA_DLL_API KaxTagMultiIdentifier : public EbmlMaster {
-       public:
-               KaxTagMultiIdentifier();
-               KaxTagMultiIdentifier(const KaxTagMultiIdentifier & ElementToClone) :EbmlMaster(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxTagMultiIdentifier)
-};
-
-class MATROSKA_DLL_API KaxTagIdentifier : public EbmlMaster {
-       public:
-               KaxTagIdentifier();
-               KaxTagIdentifier(const KaxTagIdentifier & ElementToClone) :EbmlMaster(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxTagIdentifier)
-};
-
-class MATROSKA_DLL_API KaxTagMultiIdentifierType : public EbmlUInteger {
-       public:
-               KaxTagMultiIdentifierType() {}
-               KaxTagMultiIdentifierType(const KaxTagMultiIdentifierType & ElementToClone) :EbmlUInteger(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxTagMultiIdentifierType)
-};
-
-class MATROSKA_DLL_API KaxTagMultiIdentifierBinary : public EbmlBinary {
-       public:
-               KaxTagMultiIdentifierBinary() {}
-               KaxTagMultiIdentifierBinary(const KaxTagMultiIdentifierBinary & ElementToClone) :EbmlBinary(ElementToClone){}
-               bool ValidateSize() const {return true;} // we don't mind about what's inside
-
-        EBML_CONCRETE_CLASS(KaxTagMultiIdentifierBinary)
-};
-
-class MATROSKA_DLL_API KaxTagMultiIdentifierString : public EbmlUnicodeString {
-       public:
-               KaxTagMultiIdentifierString() {}
-               KaxTagMultiIdentifierString(const KaxTagMultiIdentifierString & ElementToClone) :EbmlUnicodeString(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxTagMultiIdentifierString)
-};
-
-class MATROSKA_DLL_API KaxTagMultiLegal : public EbmlMaster {
-       public:
-               KaxTagMultiLegal();
-               KaxTagMultiLegal(const KaxTagMultiLegal & ElementToClone) :EbmlMaster(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxTagMultiLegal)
-};
-
-class MATROSKA_DLL_API KaxTagLegal : public EbmlMaster {
-       public:
-               KaxTagLegal();
-               KaxTagLegal(const KaxTagLegal & ElementToClone) :EbmlMaster(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxTagLegal)
-};
-
-class MATROSKA_DLL_API KaxTagMultiLegalType : public EbmlUInteger {
-       public:
-               KaxTagMultiLegalType() {}
-               KaxTagMultiLegalType(const KaxTagMultiLegalType & ElementToClone) :EbmlUInteger(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxTagMultiLegalType)
-};
-
-class MATROSKA_DLL_API KaxTagMultiLegalContent : public EbmlUnicodeString {
-       public:
-               KaxTagMultiLegalContent() {}
-               KaxTagMultiLegalContent(const KaxTagMultiLegalContent & ElementToClone) :EbmlUnicodeString(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxTagMultiLegalContent)
-};
-
-class MATROSKA_DLL_API KaxTagMultiLegalURL : public EbmlString {
-       public:
-               KaxTagMultiLegalURL() {}
-               KaxTagMultiLegalURL(const KaxTagMultiLegalURL & ElementToClone) :EbmlString(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxTagMultiLegalURL)
-};
-
-class MATROSKA_DLL_API KaxTagMultiLegalAddress : public EbmlUnicodeString {
-       public:
-               KaxTagMultiLegalAddress() {}
-               KaxTagMultiLegalAddress(const KaxTagMultiLegalAddress & ElementToClone) :EbmlUnicodeString(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxTagMultiLegalAddress)
-};
-
-class MATROSKA_DLL_API KaxTagMultiTitle : public EbmlMaster {
-       public:
-               KaxTagMultiTitle();
-               KaxTagMultiTitle(const KaxTagMultiTitle & ElementToClone) :EbmlMaster(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxTagMultiTitle)
-};
-
-class MATROSKA_DLL_API KaxTagTitle : public EbmlMaster {
-       public:
-               KaxTagTitle();
-               KaxTagTitle(const KaxTagTitle & ElementToClone) :EbmlMaster(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxTagTitle)
-};
-
-class MATROSKA_DLL_API KaxTagMultiTitleType : public EbmlUInteger {
-       public:
-               KaxTagMultiTitleType() {}
-               KaxTagMultiTitleType(const KaxTagMultiTitleType & ElementToClone) :EbmlUInteger(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxTagMultiTitleType)
-};
-
-
-class MATROSKA_DLL_API KaxTagMultiTitleName : public EbmlUnicodeString {
-       public:
-               KaxTagMultiTitleName() {}
-               KaxTagMultiTitleName(const KaxTagMultiTitleName & ElementToClone) :EbmlUnicodeString(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxTagMultiTitleName)
-};
-
-class MATROSKA_DLL_API KaxTagMultiTitleSubTitle : public EbmlUnicodeString {
-       public:
-               KaxTagMultiTitleSubTitle() {}
-               KaxTagMultiTitleSubTitle(const KaxTagMultiTitleSubTitle & ElementToClone) :EbmlUnicodeString(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxTagMultiTitleSubTitle)
-};
-
-class MATROSKA_DLL_API KaxTagMultiTitleEdition : public EbmlUnicodeString {
-       public:
-               KaxTagMultiTitleEdition() {}
-               KaxTagMultiTitleEdition(const KaxTagMultiTitleEdition & ElementToClone) :EbmlUnicodeString(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxTagMultiTitleEdition)
-};
-
-class MATROSKA_DLL_API KaxTagMultiTitleAddress : public EbmlUnicodeString {
-       public:
-               KaxTagMultiTitleAddress() {}
-               KaxTagMultiTitleAddress(const KaxTagMultiTitleAddress & ElementToClone) :EbmlUnicodeString(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxTagMultiTitleAddress)
-};
-
-class MATROSKA_DLL_API KaxTagMultiTitleURL : public EbmlString {
-       public:
-               KaxTagMultiTitleURL() {}
-               KaxTagMultiTitleURL(const KaxTagMultiTitleURL & ElementToClone) :EbmlString(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxTagMultiTitleURL)
-};
-
-class MATROSKA_DLL_API KaxTagMultiTitleEmail : public EbmlString {
-       public:
-               KaxTagMultiTitleEmail() {}
-               KaxTagMultiTitleEmail(const KaxTagMultiTitleEmail & ElementToClone) :EbmlString(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxTagMultiTitleEmail)
-};
-
-class MATROSKA_DLL_API KaxTagMultiTitleLanguage : public EbmlString {
-       public:
-               KaxTagMultiTitleLanguage() {}
-               KaxTagMultiTitleLanguage(const KaxTagMultiTitleLanguage & ElementToClone) :EbmlString(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxTagMultiTitleLanguage)
-};
-
-class MATROSKA_DLL_API KaxTagMultiAttachment : public EbmlMaster {
-       public:
-               KaxTagMultiAttachment();
-               KaxTagMultiAttachment(const KaxTagMultiAttachment & ElementToClone) :EbmlMaster(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxTagMultiAttachment)
-};
-
-class MATROSKA_DLL_API KaxTagAttachment : public EbmlMaster {
-       public:
-               KaxTagAttachment();
-               KaxTagAttachment(const KaxTagAttachment & ElementToClone) :EbmlMaster(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxTagAttachment)
-};
-
-class MATROSKA_DLL_API KaxTagAttachmentID : public EbmlUInteger {
-       public:
-               KaxTagAttachmentID() {}
-               KaxTagAttachmentID(const KaxTagAttachmentID & ElementToClone) :EbmlUInteger(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxTagAttachmentID)
-};
-
-#if 0
-class MATROSKA_DLL_API KaxTagBPM : public EbmlFloat {
-       public:
-               KaxTagBPM() :EbmlFloat() {}
-
-        EBML_CONCRETE_CLASS(KaxTagBPM)
-};
-
-class MATROSKA_DLL_API KaxTagPopularimeter : public EbmlSInteger {
-       public:
-               KaxTagPopularimeter() {}
-
-        EBML_CONCRETE_CLASS(KaxTagPopularimeter)
-};
-
-class MATROSKA_DLL_API KaxTagRating : public EbmlBinary {
-       public:
-               KaxTagRating() {}
-               bool ValidateSize() const {return true;} // we don't mind about what's inside
-
-        EBML_CONCRETE_CLASS(KaxTagRating)
-};
-
-class MATROSKA_DLL_API KaxTagSetPart : public EbmlUInteger {
-       public:
-               KaxTagSetPart() {}
-
-        EBML_CONCRETE_CLASS(KaxTagSetPart)
-};
-
-class MATROSKA_DLL_API KaxTagUserDefinedURL : public EbmlString {
-       public:
-               KaxTagUserDefinedURL() {}
-
-        EBML_CONCRETE_CLASS(KaxTagUserDefinedURL)
-};
-
-class MATROSKA_DLL_API KaxTagVideoSecondaryGenre : public EbmlBinary {
-       public:
-               KaxTagVideoSecondaryGenre() {}
-               bool ValidateSize() const {return (Size >= 4);}
-
-        EBML_CONCRETE_CLASS(KaxTagVideoSecondaryGenre)
-};
-
-class MATROSKA_DLL_API KaxWritingApp : public EbmlUnicodeString {
-       public:
-               KaxWritingApp() {}
-
-        EBML_CONCRETE_CLASS(KaxWritingApp)
-};
-#endif
-
-END_LIBMATROSKA_NAMESPACE
-
-#endif // LIBMATROSKA_TAGMULTI_H
+/****************************************************************************\r
+** libmatroska : parse Matroska files, see http://www.matroska.org/\r
+**\r
+** <file/class MATROSKA_DLL_API description>\r
+**\r
+** Copyright (C) 2002-2010 Steve Lhomme.  All rights reserved.\r
+**\r
+** This file is part of libmatroska.\r
+**\r
+** This library is free software; you can redistribute it and/or\r
+** modify it under the terms of the GNU Lesser General Public\r
+** License as published by the Free Software Foundation; either\r
+** version 2.1 of the License, or (at your option) any later version.\r
+** \r
+** This library is distributed in the hope that it will be useful,\r
+** but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
+** Lesser General Public License for more details.\r
+** \r
+** You should have received a copy of the GNU Lesser General Public\r
+** License along with this library; if not, write to the Free Software\r
+** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\r
+**\r
+** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**\r
+** Contact license@matroska.org if any conditions of this licensing are\r
+** not clear to you.\r
+**\r
+**********************************************************************/\r
+\r
+/*!\r
+       \file\r
+       \version \$Id: KaxTagMulti.h,v 1.9 2004/04/14 23:26:17 robux4 Exp $\r
+       \author Jory Stone     <jcsston @ toughguy.net>\r
+       \author Steve Lhomme   <robux4 @ users.sf.net>\r
+*/\r
+#ifndef LIBMATROSKA_TAGMULTI_H\r
+#define LIBMATROSKA_TAGMULTI_H\r
+\r
+#include "matroska/KaxTypes.h"\r
+#include "ebml/EbmlMaster.h"\r
+#include "ebml/EbmlDate.h"\r
+#include "ebml/EbmlFloat.h"\r
+#include "ebml/EbmlSInteger.h"\r
+#include "ebml/EbmlUInteger.h"\r
+#include "ebml/EbmlString.h"\r
+#include "ebml/EbmlUnicodeString.h"\r
+#include "ebml/EbmlBinary.h"\r
+\r
+using namespace LIBEBML_NAMESPACE;\r
+\r
+START_LIBMATROSKA_NAMESPACE\r
+\r
+enum KaxTagMultiCommercialTypes {\r
+       KaxTagMultiCommercialType_FilePurchase = 1, //Information on where to purchase this file. This is akin to the WPAY tag in ID3.\r
+       KaxTagMultiCommercialType_ItemPurchase, //Information on where to purchase this album. This is akin to the WCOM tag in ID3.\r
+       KaxTagMultiCommercialType_Owner  //Information on the purchase that occurred for this file. This is akin to the OWNE tag in ID3.\r
+};\r
+enum KaxTagMultiDateTypes {\r
+       KaxTagMultiDateType_EncodingDate = 1, //The time that the encoding of this item was completed. This is akin to the TDEN tag in ID3.\r
+       KaxTagMultiDateType_RecordingDate, //The time that the recording began, and finished. This is akin to the TDRC tag in ID3.\r
+       KaxTagMultiDateType_ReleaseDate, //The time that the item was originaly released. This is akin to the TDRL tag in ID3.\r
+       KaxTagMultiDateType_OriginalReleaseDate, //The time that the item was originaly released if it is a remake. This is akin to the TDOR tag in ID3.\r
+       KaxTagMultiDateType_TaggingDate, //The time that the tags were done for this item. This is akin to the TDTG tag in ID3.\r
+       KaxTagMultiDateType_DigitizingDate  //The time that the item was tranfered to a digital medium. This is akin to the IDIT tag in RIFF\r
+};\r
+enum KaxTagMultiEntitiesTypes {\r
+       KaxTagMultiEntitiesType_LyricistTextWriter = 1, //The person that wrote the words/script for this item. This is akin to the TEXT tag in ID3.\r
+       KaxTagMultiEntitiesType_Composer, //The name of the composer of this item. This is akin to the TCOM tag in ID3.\r
+       KaxTagMultiEntitiesType_LeadPerformerSoloist, //This is akin to the TPE1 tag in ID3.\r
+       KaxTagMultiEntitiesType_BandOrchestraAccompaniment, //This is akin to the TPE2 tag in ID3.\r
+       KaxTagMultiEntitiesType_OriginalLyricistTextWriter, //This is akin to the TOLY tag in ID3.\r
+       KaxTagMultiEntitiesType_OriginalArtistPerformer, //This is akin to the TOPE tag in ID3.\r
+       KaxTagMultiEntitiesType_OriginalAlbumMovieShowTitle, //This is akin to the TOAL tag in ID3.\r
+       KaxTagMultiEntitiesType_ConductorPerformerRefinement, //This is akin to the TPE3 tag in ID3.\r
+       KaxTagMultiEntitiesType_InterpretedRemixedBy, //This is akin to the TPE4 tag in ID3.\r
+       KaxTagMultiEntitiesType_Director, //This is akin to the IART tag in RIFF\r
+       KaxTagMultiEntitiesType_ProducedBy, //This is akin to the IPRO tag in Extended RIFF\r
+       KaxTagMultiEntitiesType_Cinematographer, //This is akin to the ICNM tag in Extended RIFF\r
+       KaxTagMultiEntitiesType_ProductionDesigner, //This is akin to the IPDS tag in Extended RIFF\r
+       KaxTagMultiEntitiesType_CostumeDesigner, //This is akin to the ICDS tag in Extended RIFF\r
+       KaxTagMultiEntitiesType_ProductionStudio, //This is akin to the ISTD tag in Extended RIFF\r
+       KaxTagMultiEntitiesType_DistributedBy, //This is akin to the IDST tag in Extended RIFF\r
+       KaxTagMultiEntitiesType_CommissionedBy, //This is akin to the ICMS tag in RIFF\r
+       KaxTagMultiEntitiesType_Engineer, //This is akin to the IENG tag in RIFF\r
+       KaxTagMultiEntitiesType_EditedBy, //This is akin to the IEDT tag in Extended RIFF\r
+       KaxTagMultiEntitiesType_EncodedBy, //This is akin to the TENC tag in ID3.\r
+       KaxTagMultiEntitiesType_RippedBy, //This is akin to the IRIP tag in Extended RIFF\r
+       KaxTagMultiEntitiesType_InvolvedPeopleList, //A very general tag for everyone else that wants to be listed. This is akin to the TMCL tag in ID3.\r
+       KaxTagMultiEntitiesType_InternetRadioStationName, //This is akin to the TSRN tag in ID3.\r
+       KaxTagMultiEntitiesType_Publisher  //This is akin to the TPUB tag in ID3.\r
+};\r
+\r
+enum KaxTagMultiIdentifierTypes {\r
+       KaxTagMultiIdentifierType_ISRC = 1, //String, The International Standard Recording Code\r
+       KaxTagMultiIdentifierType_CDIdentifier, //Binary, This is a binary dump of the TOC of the CDROM that this item was taken from. This holds the same information as the MCDI in ID3.\r
+       KaxTagMultiIdentifierType_ISBN, //String, International Standard Book Number\r
+       KaxTagMultiIdentifierType_Catalog, //String, sometimes the EAN/UPC, often some letters followed by some numbers\r
+       KaxTagMultiIdentifierType_EAN, //String, EAN-13 bar code identifier\r
+       KaxTagMultiIdentifierType_UPC, //String, UPC-A bar code identifier\r
+       KaxTagMultiIdentifierType_LabelCode, //String, Typically printed as ________ (LC) xxxx) ~~~~~~~~ or _________ (LC) 0xxxx) ~~~~~~~~~ on CDs medias or covers, where xxxx is a 4-digit number.\r
+       KaxTagMultiIdentifierType_LCCN, //String, Library of Congress Control Number\r
+       KaxTagMultiIdentifierType_UniqueFileIdentifier, //Binary, This used for a dump of the UFID field in ID3. This field would only be used if the item was pulled from an MP3.\r
+       CDROM_CD_TEXT_PACK_TOC_INFO2  //Binary\r
+};\r
+\r
+enum KaxTagMultiLegalTypes {\r
+       KaxTagMultiLegalType_Copyright = 1, //The copyright information as per the copyright holder. This is akin to the TCOP tag in ID3.\r
+       KaxTagMultiLegalType_ProductionCopyright, //The copyright information as per the production copyright holder. This is akin to the TPRO tag in ID3.\r
+       KaxTagMultiLegalType_TermsOfUse  //The terms of use for this item. This is akin to the USER tag in ID3.\r
+};\r
+\r
+enum KaxTagMultiTitleTypes {\r
+       KaxTagMultiTitleType_TrackTitle = 1,\r
+               //The title of this item. In the case of a track, the Name element should be identical to the Name element.\r
+               //For example, for music you might label this "Canon in D", or for video's audio track you might use "English 5.1" This is akin to the TIT2 tag in ID3.\r
+       KaxTagMultiTitleType_AlbumMovieShowTitle,\r
+               //This is the name given to a grouping of tracks and/or chapters. \r
+               //For example, all video, audio, and subtitle tracks for a movie would be grouped under this and be given the name of the movie. \r
+               //All tracks for a particular CD would be grouped together under the title of the CD, or if all tracks for a CD were recorded as a single track, seperated by chapters, the same would apply.\r
+               //You could use this to label episode 3 of The Simpsons. This is akin to the TALB tag in ID3.\r
+       KaxTagMultiTitleType_SetTitle,  //This would be used to label a set of ID 2. For example, season 13 of The Simpsons.\r
+       KaxTagMultiTitleType_Series  //This would be used to label a set of ID 3. For example, The Simpsons.\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTagMultiComment : public EbmlMaster {\r
+       public:\r
+               KaxTagMultiComment();\r
+               KaxTagMultiComment(const KaxTagMultiComment & ElementToClone) :EbmlMaster(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTagMultiComment)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTagMultiCommentName : public EbmlString {\r
+       public:\r
+               KaxTagMultiCommentName() {}\r
+               KaxTagMultiCommentName(const KaxTagMultiCommentName & ElementToClone) :EbmlString(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTagMultiCommentName)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTagMultiCommentComments : public EbmlUnicodeString {\r
+       public:\r
+               KaxTagMultiCommentComments() {}\r
+               KaxTagMultiCommentComments(const KaxTagMultiCommentComments & ElementToClone) :EbmlUnicodeString(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTagMultiCommentComments)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTagMultiCommentLanguage : public EbmlString {\r
+       public:\r
+               KaxTagMultiCommentLanguage() {}\r
+               KaxTagMultiCommentLanguage(const KaxTagMultiCommentLanguage & ElementToClone) :EbmlString(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTagMultiCommentLanguage)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTagMultiCommercial : public EbmlMaster {\r
+       public:\r
+               KaxTagMultiCommercial();\r
+               KaxTagMultiCommercial(const KaxTagMultiCommercial & ElementToClone) :EbmlMaster(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTagMultiCommercial)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTagCommercial : public EbmlMaster {\r
+       public:\r
+               KaxTagCommercial();\r
+               KaxTagCommercial(const KaxTagCommercial & ElementToClone) :EbmlMaster(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTagCommercial)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTagMultiCommercialType : public EbmlUInteger {\r
+       public:\r
+               KaxTagMultiCommercialType() {}\r
+               KaxTagMultiCommercialType(const KaxTagMultiCommercialType & ElementToClone) :EbmlUInteger(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTagMultiCommercialType)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTagMultiCommercialAddress : public EbmlUnicodeString {\r
+       public:\r
+               KaxTagMultiCommercialAddress() {}\r
+               KaxTagMultiCommercialAddress(const KaxTagMultiCommercialAddress & ElementToClone) :EbmlUnicodeString(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTagMultiCommercialAddress)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTagMultiCommercialURL : public EbmlString {\r
+       public:\r
+               KaxTagMultiCommercialURL() {}\r
+               KaxTagMultiCommercialURL(const KaxTagMultiCommercialURL & ElementToClone) :EbmlString(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTagMultiCommercialURL)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTagMultiCommercialEmail : public EbmlString {\r
+       public:\r
+               KaxTagMultiCommercialEmail() {}\r
+               KaxTagMultiCommercialEmail(const KaxTagMultiCommercialEmail & ElementToClone) :EbmlString(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTagMultiCommercialEmail)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTagMultiPrice : public EbmlMaster {\r
+       public:\r
+               KaxTagMultiPrice();\r
+               KaxTagMultiPrice(const KaxTagMultiPrice & ElementToClone) :EbmlMaster(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTagMultiPrice)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTagMultiPriceCurrency : public EbmlString {\r
+       public:\r
+               KaxTagMultiPriceCurrency() {}\r
+               KaxTagMultiPriceCurrency(const KaxTagMultiPriceCurrency & ElementToClone) :EbmlString(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTagMultiPriceCurrency)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTagMultiPriceAmount : public EbmlFloat {\r
+       public:\r
+               KaxTagMultiPriceAmount() :EbmlFloat() {}\r
+               KaxTagMultiPriceAmount(const KaxTagMultiPriceAmount & ElementToClone) :EbmlFloat(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTagMultiPriceAmount)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTagMultiPricePriceDate : public EbmlDate {\r
+       public:\r
+               KaxTagMultiPricePriceDate() :EbmlDate() {}\r
+               KaxTagMultiPricePriceDate(const KaxTagMultiPricePriceDate & ElementToClone) :EbmlDate(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTagMultiPricePriceDate)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTagMultiDate : public EbmlMaster {\r
+       public:\r
+               KaxTagMultiDate();\r
+               KaxTagMultiDate(const KaxTagMultiDate & ElementToClone) :EbmlMaster(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTagMultiDate)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTagDate : public EbmlMaster {\r
+       public:\r
+               KaxTagDate();\r
+               KaxTagDate(const KaxTagDate & ElementToClone) :EbmlMaster(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTagDate)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTagMultiDateType : public EbmlUInteger {\r
+       public:\r
+               KaxTagMultiDateType() {}\r
+               KaxTagMultiDateType(const KaxTagMultiDateType & ElementToClone) :EbmlUInteger(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTagMultiDateType)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTagMultiDateDateBegin : public EbmlDate {\r
+       public:\r
+               KaxTagMultiDateDateBegin() :EbmlDate() {}\r
+               KaxTagMultiDateDateBegin(const KaxTagMultiDateDateBegin & ElementToClone) :EbmlDate(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTagMultiDateDateBegin)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTagMultiDateDateEnd : public EbmlDate {\r
+       public:\r
+               KaxTagMultiDateDateEnd() :EbmlDate() {}\r
+               KaxTagMultiDateDateEnd(const KaxTagMultiDateDateEnd & ElementToClone) :EbmlDate(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTagMultiDateDateEnd)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTagMultiEntity : public EbmlMaster {\r
+       public:\r
+               KaxTagMultiEntity();\r
+               KaxTagMultiEntity(const KaxTagMultiEntity & ElementToClone) :EbmlMaster(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTagMultiEntity)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTagEntity : public EbmlMaster {\r
+       public:\r
+               KaxTagEntity();\r
+               KaxTagEntity(const KaxTagEntity & ElementToClone) :EbmlMaster(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTagEntity)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTagMultiEntityType : public EbmlUInteger {\r
+       public:\r
+               KaxTagMultiEntityType() {}\r
+               KaxTagMultiEntityType(const KaxTagMultiEntityType & ElementToClone) :EbmlUInteger(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTagMultiEntityType)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTagMultiEntityName : public EbmlUnicodeString {\r
+       public:\r
+               KaxTagMultiEntityName() {}\r
+               KaxTagMultiEntityName(const KaxTagMultiEntityName & ElementToClone) :EbmlUnicodeString(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTagMultiEntityName)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTagMultiEntityAddress : public EbmlUnicodeString {\r
+       public:\r
+               KaxTagMultiEntityAddress() {}\r
+               KaxTagMultiEntityAddress(const KaxTagMultiEntityAddress & ElementToClone) :EbmlUnicodeString(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTagMultiEntityAddress)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTagMultiEntityURL : public EbmlString {\r
+       public:\r
+               KaxTagMultiEntityURL() {}\r
+               KaxTagMultiEntityURL(const KaxTagMultiEntityURL & ElementToClone) :EbmlString(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTagMultiEntityURL)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTagMultiEntityEmail : public EbmlString {\r
+       public:\r
+               KaxTagMultiEntityEmail() {}\r
+               KaxTagMultiEntityEmail(const KaxTagMultiEntityEmail & ElementToClone) :EbmlString(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTagMultiEntityEmail)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTagMultiIdentifier : public EbmlMaster {\r
+       public:\r
+               KaxTagMultiIdentifier();\r
+               KaxTagMultiIdentifier(const KaxTagMultiIdentifier & ElementToClone) :EbmlMaster(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTagMultiIdentifier)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTagIdentifier : public EbmlMaster {\r
+       public:\r
+               KaxTagIdentifier();\r
+               KaxTagIdentifier(const KaxTagIdentifier & ElementToClone) :EbmlMaster(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTagIdentifier)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTagMultiIdentifierType : public EbmlUInteger {\r
+       public:\r
+               KaxTagMultiIdentifierType() {}\r
+               KaxTagMultiIdentifierType(const KaxTagMultiIdentifierType & ElementToClone) :EbmlUInteger(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTagMultiIdentifierType)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTagMultiIdentifierBinary : public EbmlBinary {\r
+       public:\r
+               KaxTagMultiIdentifierBinary() {}\r
+               KaxTagMultiIdentifierBinary(const KaxTagMultiIdentifierBinary & ElementToClone) :EbmlBinary(ElementToClone){}\r
+               bool ValidateSize() const {return true;} // we don't mind about what's inside\r
+\r
+        EBML_CONCRETE_CLASS(KaxTagMultiIdentifierBinary)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTagMultiIdentifierString : public EbmlUnicodeString {\r
+       public:\r
+               KaxTagMultiIdentifierString() {}\r
+               KaxTagMultiIdentifierString(const KaxTagMultiIdentifierString & ElementToClone) :EbmlUnicodeString(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTagMultiIdentifierString)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTagMultiLegal : public EbmlMaster {\r
+       public:\r
+               KaxTagMultiLegal();\r
+               KaxTagMultiLegal(const KaxTagMultiLegal & ElementToClone) :EbmlMaster(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTagMultiLegal)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTagLegal : public EbmlMaster {\r
+       public:\r
+               KaxTagLegal();\r
+               KaxTagLegal(const KaxTagLegal & ElementToClone) :EbmlMaster(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTagLegal)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTagMultiLegalType : public EbmlUInteger {\r
+       public:\r
+               KaxTagMultiLegalType() {}\r
+               KaxTagMultiLegalType(const KaxTagMultiLegalType & ElementToClone) :EbmlUInteger(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTagMultiLegalType)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTagMultiLegalContent : public EbmlUnicodeString {\r
+       public:\r
+               KaxTagMultiLegalContent() {}\r
+               KaxTagMultiLegalContent(const KaxTagMultiLegalContent & ElementToClone) :EbmlUnicodeString(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTagMultiLegalContent)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTagMultiLegalURL : public EbmlString {\r
+       public:\r
+               KaxTagMultiLegalURL() {}\r
+               KaxTagMultiLegalURL(const KaxTagMultiLegalURL & ElementToClone) :EbmlString(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTagMultiLegalURL)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTagMultiLegalAddress : public EbmlUnicodeString {\r
+       public:\r
+               KaxTagMultiLegalAddress() {}\r
+               KaxTagMultiLegalAddress(const KaxTagMultiLegalAddress & ElementToClone) :EbmlUnicodeString(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTagMultiLegalAddress)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTagMultiTitle : public EbmlMaster {\r
+       public:\r
+               KaxTagMultiTitle();\r
+               KaxTagMultiTitle(const KaxTagMultiTitle & ElementToClone) :EbmlMaster(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTagMultiTitle)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTagTitle : public EbmlMaster {\r
+       public:\r
+               KaxTagTitle();\r
+               KaxTagTitle(const KaxTagTitle & ElementToClone) :EbmlMaster(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTagTitle)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTagMultiTitleType : public EbmlUInteger {\r
+       public:\r
+               KaxTagMultiTitleType() {}\r
+               KaxTagMultiTitleType(const KaxTagMultiTitleType & ElementToClone) :EbmlUInteger(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTagMultiTitleType)\r
+};\r
+\r
+\r
+class MATROSKA_DLL_API KaxTagMultiTitleName : public EbmlUnicodeString {\r
+       public:\r
+               KaxTagMultiTitleName() {}\r
+               KaxTagMultiTitleName(const KaxTagMultiTitleName & ElementToClone) :EbmlUnicodeString(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTagMultiTitleName)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTagMultiTitleSubTitle : public EbmlUnicodeString {\r
+       public:\r
+               KaxTagMultiTitleSubTitle() {}\r
+               KaxTagMultiTitleSubTitle(const KaxTagMultiTitleSubTitle & ElementToClone) :EbmlUnicodeString(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTagMultiTitleSubTitle)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTagMultiTitleEdition : public EbmlUnicodeString {\r
+       public:\r
+               KaxTagMultiTitleEdition() {}\r
+               KaxTagMultiTitleEdition(const KaxTagMultiTitleEdition & ElementToClone) :EbmlUnicodeString(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTagMultiTitleEdition)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTagMultiTitleAddress : public EbmlUnicodeString {\r
+       public:\r
+               KaxTagMultiTitleAddress() {}\r
+               KaxTagMultiTitleAddress(const KaxTagMultiTitleAddress & ElementToClone) :EbmlUnicodeString(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTagMultiTitleAddress)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTagMultiTitleURL : public EbmlString {\r
+       public:\r
+               KaxTagMultiTitleURL() {}\r
+               KaxTagMultiTitleURL(const KaxTagMultiTitleURL & ElementToClone) :EbmlString(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTagMultiTitleURL)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTagMultiTitleEmail : public EbmlString {\r
+       public:\r
+               KaxTagMultiTitleEmail() {}\r
+               KaxTagMultiTitleEmail(const KaxTagMultiTitleEmail & ElementToClone) :EbmlString(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTagMultiTitleEmail)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTagMultiTitleLanguage : public EbmlString {\r
+       public:\r
+               KaxTagMultiTitleLanguage() {}\r
+               KaxTagMultiTitleLanguage(const KaxTagMultiTitleLanguage & ElementToClone) :EbmlString(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTagMultiTitleLanguage)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTagMultiAttachment : public EbmlMaster {\r
+       public:\r
+               KaxTagMultiAttachment();\r
+               KaxTagMultiAttachment(const KaxTagMultiAttachment & ElementToClone) :EbmlMaster(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTagMultiAttachment)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTagAttachment : public EbmlMaster {\r
+       public:\r
+               KaxTagAttachment();\r
+               KaxTagAttachment(const KaxTagAttachment & ElementToClone) :EbmlMaster(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTagAttachment)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTagAttachmentID : public EbmlUInteger {\r
+       public:\r
+               KaxTagAttachmentID() {}\r
+               KaxTagAttachmentID(const KaxTagAttachmentID & ElementToClone) :EbmlUInteger(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTagAttachmentID)\r
+};\r
+\r
+#if 0\r
+class MATROSKA_DLL_API KaxTagBPM : public EbmlFloat {\r
+       public:\r
+               KaxTagBPM() :EbmlFloat() {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTagBPM)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTagPopularimeter : public EbmlSInteger {\r
+       public:\r
+               KaxTagPopularimeter() {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTagPopularimeter)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTagRating : public EbmlBinary {\r
+       public:\r
+               KaxTagRating() {}\r
+               bool ValidateSize() const {return true;} // we don't mind about what's inside\r
+\r
+        EBML_CONCRETE_CLASS(KaxTagRating)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTagSetPart : public EbmlUInteger {\r
+       public:\r
+               KaxTagSetPart() {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTagSetPart)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTagUserDefinedURL : public EbmlString {\r
+       public:\r
+               KaxTagUserDefinedURL() {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTagUserDefinedURL)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTagVideoSecondaryGenre : public EbmlBinary {\r
+       public:\r
+               KaxTagVideoSecondaryGenre() {}\r
+               bool ValidateSize() const {return (Size >= 4);}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTagVideoSecondaryGenre)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxWritingApp : public EbmlUnicodeString {\r
+       public:\r
+               KaxWritingApp() {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxWritingApp)\r
+};\r
+#endif\r
+\r
+END_LIBMATROSKA_NAMESPACE\r
+\r
+#endif // LIBMATROSKA_TAGMULTI_H\r
index 87acaae395f91c9cbf2ab3bbffe7f9ed4e03d397..1801ba0dd6b4a831ba3ad9e7a81b8735743307d6 100644 (file)
@@ -1,55 +1,55 @@
-/****************************************************************************
-** libmatroska : parse Matroska files, see http://www.matroska.org/
-**
-** <file/class MATROSKA_DLL_API description>
-**
-** Copyright (C) 2002-2004 Steve Lhomme.  All rights reserved.
-**
-** This file is part of libmatroska.
-**
-** This library is free software; you can redistribute it and/or
-** modify it under the terms of the GNU Lesser General Public
-** License as published by the Free Software Foundation; either
-** version 2.1 of the License, or (at your option) any later version.
-** 
-** This library is distributed in the hope that it will be useful,
-** but WITHOUT ANY WARRANTY; without even the implied warranty of
-** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-** Lesser General Public License for more details.
-** 
-** You should have received a copy of the GNU Lesser General Public
-** License along with this library; if not, write to the Free Software
-** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-**
-** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**
-** Contact license@matroska.org if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-/*!
-       \file
-       \version \$Id: KaxTags.h,v 1.7 2004/04/14 23:26:17 robux4 Exp $
-       \author Steve Lhomme     <robux4 @ users.sf.net>
-*/
-#ifndef LIBMATROSKA_TAGS_H
-#define LIBMATROSKA_TAGS_H
-
-#include "matroska/KaxTypes.h"
-#include "ebml/EbmlMaster.h"
-
-using namespace LIBEBML_NAMESPACE;
-
-START_LIBMATROSKA_NAMESPACE
-
-class MATROSKA_DLL_API KaxTags : public EbmlMaster {
-       public:
-               KaxTags();
-               KaxTags(const KaxTags & ElementToClone) :EbmlMaster(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxTags)
-};
-
-END_LIBMATROSKA_NAMESPACE
-
-#endif // LIBMATROSKA_TAGS_H
+/****************************************************************************\r
+** libmatroska : parse Matroska files, see http://www.matroska.org/\r
+**\r
+** <file/class MATROSKA_DLL_API description>\r
+**\r
+** Copyright (C) 2002-2010 Steve Lhomme.  All rights reserved.\r
+**\r
+** This file is part of libmatroska.\r
+**\r
+** This library is free software; you can redistribute it and/or\r
+** modify it under the terms of the GNU Lesser General Public\r
+** License as published by the Free Software Foundation; either\r
+** version 2.1 of the License, or (at your option) any later version.\r
+** \r
+** This library is distributed in the hope that it will be useful,\r
+** but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
+** Lesser General Public License for more details.\r
+** \r
+** You should have received a copy of the GNU Lesser General Public\r
+** License along with this library; if not, write to the Free Software\r
+** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\r
+**\r
+** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**\r
+** Contact license@matroska.org if any conditions of this licensing are\r
+** not clear to you.\r
+**\r
+**********************************************************************/\r
+\r
+/*!\r
+       \file\r
+       \version \$Id: KaxTags.h,v 1.7 2004/04/14 23:26:17 robux4 Exp $\r
+       \author Steve Lhomme     <robux4 @ users.sf.net>\r
+*/\r
+#ifndef LIBMATROSKA_TAGS_H\r
+#define LIBMATROSKA_TAGS_H\r
+\r
+#include "matroska/KaxTypes.h"\r
+#include "ebml/EbmlMaster.h"\r
+\r
+using namespace LIBEBML_NAMESPACE;\r
+\r
+START_LIBMATROSKA_NAMESPACE\r
+\r
+class MATROSKA_DLL_API KaxTags : public EbmlMaster {\r
+       public:\r
+               KaxTags();\r
+               KaxTags(const KaxTags & ElementToClone) :EbmlMaster(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTags)\r
+};\r
+\r
+END_LIBMATROSKA_NAMESPACE\r
+\r
+#endif // LIBMATROSKA_TAGS_H\r
index 7c02a1fa0c34d1d89116168dae04dec8a99d94df..e2ace45fe46cb4ba9f43a8d289a982b85c23f2e2 100644 (file)
-/****************************************************************************
-** libmatroska : parse Matroska files, see http://www.matroska.org/
-**
-** <file/class MATROSKA_DLL_API description>
-**
-** Copyright (C) 2002-2004 Steve Lhomme.  All rights reserved.
-**
-** This file is part of libmatroska.
-**
-** This library is free software; you can redistribute it and/or
-** modify it under the terms of the GNU Lesser General Public
-** License as published by the Free Software Foundation; either
-** version 2.1 of the License, or (at your option) any later version.
-** 
-** This library is distributed in the hope that it will be useful,
-** but WITHOUT ANY WARRANTY; without even the implied warranty of
-** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-** Lesser General Public License for more details.
-** 
-** You should have received a copy of the GNU Lesser General Public
-** License along with this library; if not, write to the Free Software
-** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-**
-** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**
-** Contact license@matroska.org if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-/*!
-       \file
-       \version \$Id: KaxTrackAudio.h,v 1.11 2004/04/14 23:26:17 robux4 Exp $
-       \author Steve Lhomme     <robux4 @ users.sf.net>
-*/
-#ifndef LIBMATROSKA_TRACK_AUDIO_H
-#define LIBMATROSKA_TRACK_AUDIO_H
-
-#include "matroska/KaxTypes.h"
-#include "ebml/EbmlMaster.h"
-#include "ebml/EbmlFloat.h"
-#include "ebml/EbmlUInteger.h"
-#include "ebml/EbmlBinary.h"
-
-using namespace LIBEBML_NAMESPACE;
-
-START_LIBMATROSKA_NAMESPACE
-
-class MATROSKA_DLL_API KaxTrackAudio : public EbmlMaster {
-       public:
-               KaxTrackAudio();
-               KaxTrackAudio(const KaxTrackAudio & ElementToClone) :EbmlMaster(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxTrackAudio)
-};
-
-class MATROSKA_DLL_API KaxAudioSamplingFreq : public EbmlFloat {
-       public:
-               KaxAudioSamplingFreq() :EbmlFloat(8000.0) {}
-               KaxAudioSamplingFreq(const KaxAudioSamplingFreq & ElementToClone) :EbmlFloat(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxAudioSamplingFreq)
-};
-
-class MATROSKA_DLL_API KaxAudioOutputSamplingFreq : public EbmlFloat {
-       public:
-               KaxAudioOutputSamplingFreq() :EbmlFloat() {}
-               KaxAudioOutputSamplingFreq(const KaxAudioOutputSamplingFreq & ElementToClone) :EbmlFloat(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxAudioOutputSamplingFreq)
-};
-
-class MATROSKA_DLL_API KaxAudioChannels : public EbmlUInteger {
-       public:
-               KaxAudioChannels() :EbmlUInteger(1) {}
-               KaxAudioChannels(const KaxAudioChannels & ElementToClone) :EbmlUInteger(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxAudioChannels)
-};
-
-#if MATROSKA_VERSION >= 2
-class MATROSKA_DLL_API KaxAudioPosition : public EbmlBinary {
-       public:
-               KaxAudioPosition() {}
-               KaxAudioPosition(const KaxAudioPosition & ElementToClone) :EbmlBinary(ElementToClone){}
-        bool ValidateSize(void) const {return true;}
-               
-        EBML_CONCRETE_CLASS(KaxAudioPosition)
-};
-#endif // MATROSKA_VERSION
-
-class MATROSKA_DLL_API KaxAudioBitDepth : public EbmlUInteger {
-       public:
-               KaxAudioBitDepth() {}
-               KaxAudioBitDepth(const KaxAudioBitDepth & ElementToClone) :EbmlUInteger(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxAudioBitDepth)
-};
-
-END_LIBMATROSKA_NAMESPACE
-
-#endif // LIBMATROSKA_TRACK_AUDIO_H
+/****************************************************************************\r
+** libmatroska : parse Matroska files, see http://www.matroska.org/\r
+**\r
+** <file/class MATROSKA_DLL_API description>\r
+**\r
+** Copyright (C) 2002-2010 Steve Lhomme.  All rights reserved.\r
+**\r
+** This file is part of libmatroska.\r
+**\r
+** This library is free software; you can redistribute it and/or\r
+** modify it under the terms of the GNU Lesser General Public\r
+** License as published by the Free Software Foundation; either\r
+** version 2.1 of the License, or (at your option) any later version.\r
+** \r
+** This library is distributed in the hope that it will be useful,\r
+** but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
+** Lesser General Public License for more details.\r
+** \r
+** You should have received a copy of the GNU Lesser General Public\r
+** License along with this library; if not, write to the Free Software\r
+** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\r
+**\r
+** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**\r
+** Contact license@matroska.org if any conditions of this licensing are\r
+** not clear to you.\r
+**\r
+**********************************************************************/\r
+\r
+/*!\r
+       \file\r
+       \version \$Id: KaxTrackAudio.h,v 1.11 2004/04/14 23:26:17 robux4 Exp $\r
+       \author Steve Lhomme     <robux4 @ users.sf.net>\r
+*/\r
+#ifndef LIBMATROSKA_TRACK_AUDIO_H\r
+#define LIBMATROSKA_TRACK_AUDIO_H\r
+\r
+#include "matroska/KaxTypes.h"\r
+#include "ebml/EbmlMaster.h"\r
+#include "ebml/EbmlFloat.h"\r
+#include "ebml/EbmlUInteger.h"\r
+#include "ebml/EbmlBinary.h"\r
+\r
+using namespace LIBEBML_NAMESPACE;\r
+\r
+START_LIBMATROSKA_NAMESPACE\r
+\r
+class MATROSKA_DLL_API KaxTrackAudio : public EbmlMaster {\r
+       public:\r
+               KaxTrackAudio();\r
+               KaxTrackAudio(const KaxTrackAudio & ElementToClone) :EbmlMaster(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTrackAudio)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxAudioSamplingFreq : public EbmlFloat {\r
+       public:\r
+               KaxAudioSamplingFreq() :EbmlFloat(8000.0) {}\r
+               KaxAudioSamplingFreq(const KaxAudioSamplingFreq & ElementToClone) :EbmlFloat(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxAudioSamplingFreq)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxAudioOutputSamplingFreq : public EbmlFloat {\r
+       public:\r
+               KaxAudioOutputSamplingFreq() :EbmlFloat() {}\r
+               KaxAudioOutputSamplingFreq(const KaxAudioOutputSamplingFreq & ElementToClone) :EbmlFloat(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxAudioOutputSamplingFreq)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxAudioChannels : public EbmlUInteger {\r
+       public:\r
+               KaxAudioChannels() :EbmlUInteger(1) {}\r
+               KaxAudioChannels(const KaxAudioChannels & ElementToClone) :EbmlUInteger(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxAudioChannels)\r
+};\r
+\r
+#if MATROSKA_VERSION >= 2\r
+class MATROSKA_DLL_API KaxAudioPosition : public EbmlBinary {\r
+       public:\r
+               KaxAudioPosition() {}\r
+               KaxAudioPosition(const KaxAudioPosition & ElementToClone) :EbmlBinary(ElementToClone){}\r
+        bool ValidateSize(void) const {return true;}\r
+               \r
+        EBML_CONCRETE_CLASS(KaxAudioPosition)\r
+};\r
+#endif // MATROSKA_VERSION\r
+\r
+class MATROSKA_DLL_API KaxAudioBitDepth : public EbmlUInteger {\r
+       public:\r
+               KaxAudioBitDepth() {}\r
+               KaxAudioBitDepth(const KaxAudioBitDepth & ElementToClone) :EbmlUInteger(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxAudioBitDepth)\r
+};\r
+\r
+END_LIBMATROSKA_NAMESPACE\r
+\r
+#endif // LIBMATROSKA_TRACK_AUDIO_H\r
index 155fa0e3433a1a86127051babaf4b389892503e5..53c22dfebcd874d1b3a660747f241d073d5289be 100644 (file)
-/****************************************************************************
-** libmatroska : parse Matroska files, see http://www.matroska.org/
-**
-** <file/class description>
-**
-** Copyright (C) 2002-2005 Steve Lhomme.  All rights reserved.
-**
-** This file is part of libmatroska.
-**
-** This library is free software; you can redistribute it and/or
-** modify it under the terms of the GNU Lesser General Public
-** License as published by the Free Software Foundation; either
-** version 2.1 of the License, or (at your option) any later version.
-** 
-** This library is distributed in the hope that it will be useful,
-** but WITHOUT ANY WARRANTY; without even the implied warranty of
-** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-** Lesser General Public License for more details.
-** 
-** You should have received a copy of the GNU Lesser General Public
-** License along with this library; if not, write to the Free Software
-** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-**
-** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**
-** Contact license@matroska.org if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-/*!
-       \file
-       \version \$Id: KaxTrackEntryData.h,v 1.9 2004/04/14 23:26:17 robux4 Exp $
-       \author Steve Lhomme     <robux4 @ users.sf.net>
-       \author John Cannon      <spyder2555 @ users.sf.net>
-*/
-#ifndef LIBMATROSKA_TRACK_ENTRY_DATA_H
-#define LIBMATROSKA_TRACK_ENTRY_DATA_H
-
-#include "matroska/KaxTypes.h"
-#include "ebml/EbmlUInteger.h"
-#include "ebml/EbmlFloat.h"
-#include "ebml/EbmlString.h"
-#include "ebml/EbmlUnicodeString.h"
-#include "ebml/EbmlBinary.h"
-#include "ebml/EbmlMaster.h"
-
-using namespace LIBEBML_NAMESPACE;
-
-START_LIBMATROSKA_NAMESPACE
-
-class MATROSKA_DLL_API KaxTrackNumber : public EbmlUInteger {
-       public:
-               KaxTrackNumber() {}
-               KaxTrackNumber(const KaxTrackNumber & ElementToClone) :EbmlUInteger(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxTrackNumber)
-};
-
-class MATROSKA_DLL_API KaxTrackUID : public EbmlUInteger {
-       public:
-               KaxTrackUID() {}
-               KaxTrackUID(const KaxTrackUID & ElementToClone) :EbmlUInteger(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxTrackUID)
-};
-
-class MATROSKA_DLL_API KaxTrackType : public EbmlUInteger {
-       public:
-               KaxTrackType() {}
-               KaxTrackType(const KaxTrackType & ElementToClone) :EbmlUInteger(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxTrackType)
-};
-
-#if MATROSKA_VERSION >= 2
-class MATROSKA_DLL_API KaxTrackFlagEnabled : public EbmlUInteger {
-       public:
-               KaxTrackFlagEnabled() :EbmlUInteger(1) {}
-               KaxTrackFlagEnabled(const KaxTrackFlagEnabled & ElementToClone) :EbmlUInteger(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxTrackFlagEnabled)
-};
-#endif // MATROSKA_VERSION
-
-class MATROSKA_DLL_API KaxTrackFlagDefault : public EbmlUInteger {
-       public:
-               KaxTrackFlagDefault() :EbmlUInteger(1) {}
-               KaxTrackFlagDefault(const KaxTrackFlagDefault & ElementToClone) :EbmlUInteger(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxTrackFlagDefault)
-};
-
-class MATROSKA_DLL_API KaxTrackFlagForced : public EbmlUInteger {
-       public:
-               KaxTrackFlagForced() :EbmlUInteger(0) {}
-               KaxTrackFlagForced(const KaxTrackFlagForced & ElementToClone) :EbmlUInteger(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxTrackFlagForced)
-};
-
-class MATROSKA_DLL_API KaxTrackFlagLacing : public EbmlUInteger {
-       public:
-               KaxTrackFlagLacing() :EbmlUInteger(1) {}
-               KaxTrackFlagLacing(const KaxTrackFlagLacing & ElementToClone) :EbmlUInteger(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxTrackFlagLacing)
-};
-
-class MATROSKA_DLL_API KaxTrackMinCache : public EbmlUInteger {
-       public:
-               KaxTrackMinCache() :EbmlUInteger(0) {}
-               KaxTrackMinCache(const KaxTrackMinCache & ElementToClone) :EbmlUInteger(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxTrackMinCache)
-};
-
-class MATROSKA_DLL_API KaxTrackMaxCache : public EbmlUInteger {
-       public:
-               KaxTrackMaxCache() {}
-               KaxTrackMaxCache(const KaxTrackMaxCache & ElementToClone) :EbmlUInteger(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxTrackMaxCache)
-};
-
-class MATROSKA_DLL_API KaxTrackDefaultDuration : public EbmlUInteger {
-       public:
-               KaxTrackDefaultDuration() {}
-               KaxTrackDefaultDuration(const KaxTrackDefaultDuration & ElementToClone) :EbmlUInteger(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxTrackDefaultDuration)
-};
-
-class MATROSKA_DLL_API KaxTrackTimecodeScale : public EbmlFloat {
-       public:
-               KaxTrackTimecodeScale() :EbmlFloat(1.0) {}
-               KaxTrackTimecodeScale(const KaxTrackTimecodeScale & ElementToClone) :EbmlFloat(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxTrackTimecodeScale)
-};
-
-class MATROSKA_DLL_API KaxMaxBlockAdditionID : public EbmlUInteger {
-       public:
-               KaxMaxBlockAdditionID() :EbmlUInteger(0) {}
-               KaxMaxBlockAdditionID(const KaxMaxBlockAdditionID & ElementToClone) :EbmlUInteger(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxMaxBlockAdditionID)
-};
-
-class MATROSKA_DLL_API KaxTrackName : public EbmlUnicodeString {
-       public:
-               KaxTrackName() {}
-               KaxTrackName(const KaxTrackName & ElementToClone) :EbmlUnicodeString(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxTrackName)
-};
-
-class MATROSKA_DLL_API KaxTrackLanguage : public EbmlString {
-       public:
-               KaxTrackLanguage() :EbmlString("eng") {}
-               KaxTrackLanguage(const KaxTrackLanguage & ElementToClone) :EbmlString(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxTrackLanguage)
-};
-
-class MATROSKA_DLL_API KaxCodecID : public EbmlString {
-       public:
-               KaxCodecID() {}
-               KaxCodecID(const KaxCodecID & ElementToClone) :EbmlString(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxCodecID)
-};
-
-class MATROSKA_DLL_API KaxCodecPrivate : public EbmlBinary {
-       public:
-               KaxCodecPrivate() {}
-               KaxCodecPrivate(const KaxCodecPrivate & ElementToClone) :EbmlBinary(ElementToClone){}
-               bool ValidateSize() const {return true;} // we don't mind about what's inside
-
-        EBML_CONCRETE_CLASS(KaxCodecPrivate)
-};
-
-class MATROSKA_DLL_API KaxCodecName : public EbmlUnicodeString {
-       public:
-               KaxCodecName() {}
-               KaxCodecName(const KaxCodecName & ElementToClone) :EbmlUnicodeString(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxCodecName)
-};
-
-class MATROSKA_DLL_API KaxTrackAttachmentLink : public EbmlBinary {
-       public:
-               KaxTrackAttachmentLink() {}
-               KaxTrackAttachmentLink(const KaxTrackAttachmentLink & ElementToClone) :EbmlBinary(ElementToClone){}
-               bool ValidateSize() const {return true;} // we don't mind about what's inside
-
-        EBML_CONCRETE_CLASS(KaxTrackAttachmentLink)
-};
-
-class MATROSKA_DLL_API KaxTrackOverlay : public EbmlUInteger {
-       public:
-               KaxTrackOverlay() {}
-               KaxTrackOverlay(const KaxTrackOverlay & ElementToClone) :EbmlUInteger(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxTrackOverlay)
-};
-
-class MATROSKA_DLL_API KaxTrackTranslate : public EbmlMaster {
-       public:
-               KaxTrackTranslate();
-               KaxTrackTranslate(const KaxTrackTranslate & ElementToClone) :EbmlMaster(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxTrackTranslate)
-};
-
-class MATROSKA_DLL_API KaxTrackTranslateCodec : public EbmlUInteger {
-       public:
-               KaxTrackTranslateCodec() {}
-               KaxTrackTranslateCodec(const KaxTrackTranslateCodec & ElementToClone) :EbmlUInteger(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxTrackTranslateCodec)
-};
-
-class MATROSKA_DLL_API KaxTrackTranslateEditionUID : public EbmlUInteger {
-       public:
-               KaxTrackTranslateEditionUID() {}
-               KaxTrackTranslateEditionUID(const KaxTrackTranslateEditionUID & ElementToClone) :EbmlUInteger(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxTrackTranslateEditionUID)
-};
-
-class MATROSKA_DLL_API KaxTrackTranslateTrackID : public EbmlBinary {
-       public:
-               KaxTrackTranslateTrackID() {}
-               KaxTrackTranslateTrackID(const KaxTrackTranslateTrackID & ElementToClone) :EbmlBinary(ElementToClone){}
-               bool ValidateSize() const { return true;}
-
-        EBML_CONCRETE_CLASS(KaxTrackTranslateTrackID)
-};
-
-#if MATROSKA_VERSION >= 2
-class MATROSKA_DLL_API KaxCodecSettings : public EbmlUnicodeString {
-       public:
-               KaxCodecSettings() {}
-               KaxCodecSettings(const KaxCodecSettings & ElementToClone) :EbmlUnicodeString(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxCodecSettings)
-};
-
-class MATROSKA_DLL_API KaxCodecInfoURL : public EbmlString {
-       public:
-               KaxCodecInfoURL() {}
-               KaxCodecInfoURL(const KaxCodecInfoURL & ElementToClone) :EbmlString(ElementToClone) {}
-               
-        EBML_CONCRETE_CLASS(KaxCodecInfoURL)
-};
-
-class MATROSKA_DLL_API KaxCodecDownloadURL : public EbmlString {
-       public:
-               KaxCodecDownloadURL() {}
-               KaxCodecDownloadURL(const KaxCodecDownloadURL & ElementToClone) :EbmlString(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxCodecDownloadURL)
-};
-
-class MATROSKA_DLL_API KaxCodecDecodeAll : public EbmlUInteger {
-       public:
-               KaxCodecDecodeAll() :EbmlUInteger(1) {}
-               KaxCodecDecodeAll(const KaxCodecDecodeAll & ElementToClone) :EbmlUInteger(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxCodecDecodeAll)
-};
-#endif // MATROSKA_VERSION
-
-END_LIBMATROSKA_NAMESPACE
-
-#endif // LIBMATROSKA_TRACK_ENTRY_DATA_H
+/****************************************************************************\r
+** libmatroska : parse Matroska files, see http://www.matroska.org/\r
+**\r
+** <file/class description>\r
+**\r
+** Copyright (C) 2002-2010 Steve Lhomme.  All rights reserved.\r
+**\r
+** This file is part of libmatroska.\r
+**\r
+** This library is free software; you can redistribute it and/or\r
+** modify it under the terms of the GNU Lesser General Public\r
+** License as published by the Free Software Foundation; either\r
+** version 2.1 of the License, or (at your option) any later version.\r
+** \r
+** This library is distributed in the hope that it will be useful,\r
+** but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
+** Lesser General Public License for more details.\r
+** \r
+** You should have received a copy of the GNU Lesser General Public\r
+** License along with this library; if not, write to the Free Software\r
+** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\r
+**\r
+** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**\r
+** Contact license@matroska.org if any conditions of this licensing are\r
+** not clear to you.\r
+**\r
+**********************************************************************/\r
+\r
+/*!\r
+       \file\r
+       \version \$Id: KaxTrackEntryData.h,v 1.9 2004/04/14 23:26:17 robux4 Exp $\r
+       \author Steve Lhomme     <robux4 @ users.sf.net>\r
+       \author John Cannon      <spyder2555 @ users.sf.net>\r
+*/\r
+#ifndef LIBMATROSKA_TRACK_ENTRY_DATA_H\r
+#define LIBMATROSKA_TRACK_ENTRY_DATA_H\r
+\r
+#include "matroska/KaxTypes.h"\r
+#include "ebml/EbmlUInteger.h"\r
+#include "ebml/EbmlFloat.h"\r
+#include "ebml/EbmlString.h"\r
+#include "ebml/EbmlUnicodeString.h"\r
+#include "ebml/EbmlBinary.h"\r
+#include "ebml/EbmlMaster.h"\r
+\r
+using namespace LIBEBML_NAMESPACE;\r
+\r
+START_LIBMATROSKA_NAMESPACE\r
+\r
+class MATROSKA_DLL_API KaxTrackNumber : public EbmlUInteger {\r
+       public:\r
+               KaxTrackNumber() {}\r
+               KaxTrackNumber(const KaxTrackNumber & ElementToClone) :EbmlUInteger(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTrackNumber)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTrackUID : public EbmlUInteger {\r
+       public:\r
+               KaxTrackUID() {}\r
+               KaxTrackUID(const KaxTrackUID & ElementToClone) :EbmlUInteger(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTrackUID)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTrackType : public EbmlUInteger {\r
+       public:\r
+               KaxTrackType() {}\r
+               KaxTrackType(const KaxTrackType & ElementToClone) :EbmlUInteger(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTrackType)\r
+};\r
+\r
+#if MATROSKA_VERSION >= 2\r
+class MATROSKA_DLL_API KaxTrackFlagEnabled : public EbmlUInteger {\r
+       public:\r
+               KaxTrackFlagEnabled() :EbmlUInteger(1) {}\r
+               KaxTrackFlagEnabled(const KaxTrackFlagEnabled & ElementToClone) :EbmlUInteger(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTrackFlagEnabled)\r
+};\r
+#endif // MATROSKA_VERSION\r
+\r
+class MATROSKA_DLL_API KaxTrackFlagDefault : public EbmlUInteger {\r
+       public:\r
+               KaxTrackFlagDefault() :EbmlUInteger(1) {}\r
+               KaxTrackFlagDefault(const KaxTrackFlagDefault & ElementToClone) :EbmlUInteger(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTrackFlagDefault)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTrackFlagForced : public EbmlUInteger {\r
+       public:\r
+               KaxTrackFlagForced() :EbmlUInteger(0) {}\r
+               KaxTrackFlagForced(const KaxTrackFlagForced & ElementToClone) :EbmlUInteger(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTrackFlagForced)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTrackFlagLacing : public EbmlUInteger {\r
+       public:\r
+               KaxTrackFlagLacing() :EbmlUInteger(1) {}\r
+               KaxTrackFlagLacing(const KaxTrackFlagLacing & ElementToClone) :EbmlUInteger(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTrackFlagLacing)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTrackMinCache : public EbmlUInteger {\r
+       public:\r
+               KaxTrackMinCache() :EbmlUInteger(0) {}\r
+               KaxTrackMinCache(const KaxTrackMinCache & ElementToClone) :EbmlUInteger(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTrackMinCache)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTrackMaxCache : public EbmlUInteger {\r
+       public:\r
+               KaxTrackMaxCache() {}\r
+               KaxTrackMaxCache(const KaxTrackMaxCache & ElementToClone) :EbmlUInteger(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTrackMaxCache)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTrackDefaultDuration : public EbmlUInteger {\r
+       public:\r
+               KaxTrackDefaultDuration() {}\r
+               KaxTrackDefaultDuration(const KaxTrackDefaultDuration & ElementToClone) :EbmlUInteger(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTrackDefaultDuration)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTrackTimecodeScale : public EbmlFloat {\r
+       public:\r
+               KaxTrackTimecodeScale() :EbmlFloat(1.0) {}\r
+               KaxTrackTimecodeScale(const KaxTrackTimecodeScale & ElementToClone) :EbmlFloat(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTrackTimecodeScale)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxMaxBlockAdditionID : public EbmlUInteger {\r
+       public:\r
+               KaxMaxBlockAdditionID() :EbmlUInteger(0) {}\r
+               KaxMaxBlockAdditionID(const KaxMaxBlockAdditionID & ElementToClone) :EbmlUInteger(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxMaxBlockAdditionID)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTrackName : public EbmlUnicodeString {\r
+       public:\r
+               KaxTrackName() {}\r
+               KaxTrackName(const KaxTrackName & ElementToClone) :EbmlUnicodeString(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTrackName)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTrackLanguage : public EbmlString {\r
+       public:\r
+               KaxTrackLanguage() :EbmlString("eng") {}\r
+               KaxTrackLanguage(const KaxTrackLanguage & ElementToClone) :EbmlString(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTrackLanguage)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxCodecID : public EbmlString {\r
+       public:\r
+               KaxCodecID() {}\r
+               KaxCodecID(const KaxCodecID & ElementToClone) :EbmlString(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxCodecID)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxCodecPrivate : public EbmlBinary {\r
+       public:\r
+               KaxCodecPrivate() {}\r
+               KaxCodecPrivate(const KaxCodecPrivate & ElementToClone) :EbmlBinary(ElementToClone){}\r
+               bool ValidateSize() const {return true;} // we don't mind about what's inside\r
+\r
+        EBML_CONCRETE_CLASS(KaxCodecPrivate)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxCodecName : public EbmlUnicodeString {\r
+       public:\r
+               KaxCodecName() {}\r
+               KaxCodecName(const KaxCodecName & ElementToClone) :EbmlUnicodeString(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxCodecName)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTrackAttachmentLink : public EbmlBinary {\r
+       public:\r
+               KaxTrackAttachmentLink() {}\r
+               KaxTrackAttachmentLink(const KaxTrackAttachmentLink & ElementToClone) :EbmlBinary(ElementToClone){}\r
+               bool ValidateSize() const {return true;} // we don't mind about what's inside\r
+\r
+        EBML_CONCRETE_CLASS(KaxTrackAttachmentLink)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTrackOverlay : public EbmlUInteger {\r
+       public:\r
+               KaxTrackOverlay() {}\r
+               KaxTrackOverlay(const KaxTrackOverlay & ElementToClone) :EbmlUInteger(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTrackOverlay)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTrackTranslate : public EbmlMaster {\r
+       public:\r
+               KaxTrackTranslate();\r
+               KaxTrackTranslate(const KaxTrackTranslate & ElementToClone) :EbmlMaster(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTrackTranslate)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTrackTranslateCodec : public EbmlUInteger {\r
+       public:\r
+               KaxTrackTranslateCodec() {}\r
+               KaxTrackTranslateCodec(const KaxTrackTranslateCodec & ElementToClone) :EbmlUInteger(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTrackTranslateCodec)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTrackTranslateEditionUID : public EbmlUInteger {\r
+       public:\r
+               KaxTrackTranslateEditionUID() {}\r
+               KaxTrackTranslateEditionUID(const KaxTrackTranslateEditionUID & ElementToClone) :EbmlUInteger(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTrackTranslateEditionUID)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTrackTranslateTrackID : public EbmlBinary {\r
+       public:\r
+               KaxTrackTranslateTrackID() {}\r
+               KaxTrackTranslateTrackID(const KaxTrackTranslateTrackID & ElementToClone) :EbmlBinary(ElementToClone){}\r
+               bool ValidateSize() const { return true;}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTrackTranslateTrackID)\r
+};\r
+\r
+#if MATROSKA_VERSION >= 2\r
+class MATROSKA_DLL_API KaxCodecSettings : public EbmlUnicodeString {\r
+       public:\r
+               KaxCodecSettings() {}\r
+               KaxCodecSettings(const KaxCodecSettings & ElementToClone) :EbmlUnicodeString(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxCodecSettings)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxCodecInfoURL : public EbmlString {\r
+       public:\r
+               KaxCodecInfoURL() {}\r
+               KaxCodecInfoURL(const KaxCodecInfoURL & ElementToClone) :EbmlString(ElementToClone) {}\r
+               \r
+        EBML_CONCRETE_CLASS(KaxCodecInfoURL)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxCodecDownloadURL : public EbmlString {\r
+       public:\r
+               KaxCodecDownloadURL() {}\r
+               KaxCodecDownloadURL(const KaxCodecDownloadURL & ElementToClone) :EbmlString(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxCodecDownloadURL)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxCodecDecodeAll : public EbmlUInteger {\r
+       public:\r
+               KaxCodecDecodeAll() :EbmlUInteger(1) {}\r
+               KaxCodecDecodeAll(const KaxCodecDecodeAll & ElementToClone) :EbmlUInteger(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxCodecDecodeAll)\r
+};\r
+#endif // MATROSKA_VERSION\r
+\r
+END_LIBMATROSKA_NAMESPACE\r
+\r
+#endif // LIBMATROSKA_TRACK_ENTRY_DATA_H\r
index e50d2fbb7cdb9c8fb13229c4ae4f36a6ef753f6f..9d5edb86a76e1c6e486cd69b44a5050bcc94da83 100644 (file)
-/****************************************************************************
-** libmatroska : parse Matroska files, see http://www.matroska.org/
-**
-** <file/class MATROSKA_DLL_API description>
-**
-** Copyright (C) 2002-2004 Steve Lhomme.  All rights reserved.
-**
-** This file is part of libmatroska.
-**
-** This library is free software; you can redistribute it and/or
-** modify it under the terms of the GNU Lesser General Public
-** License as published by the Free Software Foundation; either
-** version 2.1 of the License, or (at your option) any later version.
-** 
-** This library is distributed in the hope that it will be useful,
-** but WITHOUT ANY WARRANTY; without even the implied warranty of
-** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-** Lesser General Public License for more details.
-** 
-** You should have received a copy of the GNU Lesser General Public
-** License along with this library; if not, write to the Free Software
-** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-**
-** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**
-** Contact license@matroska.org if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-/*!
-       \file
-       \version \$Id: KaxTrackVideo.h,v 1.9 2004/04/14 23:26:17 robux4 Exp $
-       \author Steve Lhomme     <robux4 @ users.sf.net>
-*/
-#ifndef LIBMATROSKA_TRACK_VIDEO_H
-#define LIBMATROSKA_TRACK_VIDEO_H
-
-#include "matroska/KaxTypes.h"
-#include "ebml/EbmlMaster.h"
-#include "ebml/EbmlUInteger.h"
-#include "ebml/EbmlBinary.h"
-#include "ebml/EbmlFloat.h"
-
-using namespace LIBEBML_NAMESPACE;
-
-START_LIBMATROSKA_NAMESPACE
-
-class MATROSKA_DLL_API KaxTrackVideo : public EbmlMaster {
-       public:
-               KaxTrackVideo();
-               KaxTrackVideo(const KaxTrackVideo & ElementToClone) :EbmlMaster(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxTrackVideo)
-};
-
-#if MATROSKA_VERSION >= 2
-class MATROSKA_DLL_API KaxVideoFlagInterlaced : public EbmlUInteger {
-       public:
-               KaxVideoFlagInterlaced() :EbmlUInteger(0) {}
-               KaxVideoFlagInterlaced(const KaxVideoFlagInterlaced & ElementToClone) :EbmlUInteger(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxVideoFlagInterlaced)
-};
-
-class MATROSKA_DLL_API KaxVideoStereoMode : public EbmlUInteger {
-       public:
-               KaxVideoStereoMode() :EbmlUInteger(0) {}
-               KaxVideoStereoMode(const KaxVideoStereoMode & ElementToClone) :EbmlUInteger(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxVideoStereoMode)
-};
-#endif // MATROSKA_VERSION
-
-class MATROSKA_DLL_API KaxVideoPixelWidth : public EbmlUInteger {
-       public:
-               KaxVideoPixelWidth() {}
-               KaxVideoPixelWidth(const KaxVideoPixelWidth & ElementToClone) :EbmlUInteger(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxVideoPixelWidth)
-};
-
-class MATROSKA_DLL_API KaxVideoPixelHeight : public EbmlUInteger {
-       public:
-               KaxVideoPixelHeight() {}
-               KaxVideoPixelHeight(const KaxVideoPixelHeight & ElementToClone) :EbmlUInteger(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxVideoPixelHeight)
-};
-
-class MATROSKA_DLL_API KaxVideoPixelCropBottom : public EbmlUInteger {
-       public:
-               KaxVideoPixelCropBottom(): EbmlUInteger(0) {}
-               KaxVideoPixelCropBottom(const KaxVideoPixelCropBottom & ElementToClone) :EbmlUInteger(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxVideoPixelCropBottom)
-};
-
-class MATROSKA_DLL_API KaxVideoPixelCropTop : public EbmlUInteger {
-       public:
-               KaxVideoPixelCropTop(): EbmlUInteger(0) {}
-               KaxVideoPixelCropTop(const KaxVideoPixelCropTop & ElementToClone) :EbmlUInteger(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxVideoPixelCropTop)
-};
-
-class MATROSKA_DLL_API KaxVideoPixelCropLeft : public EbmlUInteger {
-       public:
-               KaxVideoPixelCropLeft(): EbmlUInteger(0) {}
-               KaxVideoPixelCropLeft(const KaxVideoPixelCropLeft & ElementToClone) :EbmlUInteger(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxVideoPixelCropLeft)
-};
-
-class MATROSKA_DLL_API KaxVideoPixelCropRight : public EbmlUInteger {
-       public:
-               KaxVideoPixelCropRight(): EbmlUInteger(0) {}
-               KaxVideoPixelCropRight(const KaxVideoPixelCropRight & ElementToClone) :EbmlUInteger(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxVideoPixelCropRight)
-};
-
-class MATROSKA_DLL_API KaxVideoDisplayWidth : public EbmlUInteger {
-       public:
-               KaxVideoDisplayWidth() {}
-               KaxVideoDisplayWidth(const KaxVideoDisplayWidth & ElementToClone) :EbmlUInteger(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxVideoDisplayWidth)
-};
-
-class MATROSKA_DLL_API KaxVideoDisplayHeight : public EbmlUInteger {
-       public:
-               KaxVideoDisplayHeight() {}
-               KaxVideoDisplayHeight(const KaxVideoDisplayHeight & ElementToClone) :EbmlUInteger(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxVideoDisplayHeight)
-};
-
-#if MATROSKA_VERSION >= 2
-class MATROSKA_DLL_API KaxVideoDisplayUnit : public EbmlUInteger {
-       public:
-               KaxVideoDisplayUnit() {}
-               KaxVideoDisplayUnit(const KaxVideoDisplayUnit & ElementToClone) :EbmlUInteger(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxVideoDisplayUnit)
-};
-
-class MATROSKA_DLL_API KaxVideoAspectRatio : public EbmlUInteger {
-       public:
-               KaxVideoAspectRatio() {}
-               KaxVideoAspectRatio(const KaxVideoAspectRatio & ElementToClone) :EbmlUInteger(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxVideoAspectRatio)
-};
-#endif // MATROSKA_VERSION
-
-class MATROSKA_DLL_API KaxVideoColourSpace : public EbmlBinary {
-       public:
-               KaxVideoColourSpace() {}
-               KaxVideoColourSpace(const KaxVideoColourSpace & ElementToClone) :EbmlBinary(ElementToClone){}
-        bool ValidateSize(void) const {return (GetSize() == 4);}
-
-        EBML_CONCRETE_CLASS(KaxVideoColourSpace)
-};
-
-#if MATROSKA_VERSION >= 2
-class MATROSKA_DLL_API KaxVideoGamma : public EbmlFloat {
-       public:
-               KaxVideoGamma() {}
-               KaxVideoGamma(const KaxVideoGamma & ElementToClone) :EbmlFloat(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxVideoGamma)
-};
-#endif // MATROSKA_VERSION
-
-class MATROSKA_DLL_API KaxVideoFrameRate : public EbmlFloat {
-       public:
-               KaxVideoFrameRate() {}
-               KaxVideoFrameRate(const KaxVideoFrameRate & ElementToClone) :EbmlFloat(ElementToClone) {}
-               uint32 RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault);
-
-        EBML_CONCRETE_CLASS(KaxVideoFrameRate)
-};
-
-
-END_LIBMATROSKA_NAMESPACE
-
-#endif // LIBMATROSKA_TRACK_VIDEO_H
+/****************************************************************************\r
+** libmatroska : parse Matroska files, see http://www.matroska.org/\r
+**\r
+** <file/class MATROSKA_DLL_API description>\r
+**\r
+** Copyright (C) 2002-2010 Steve Lhomme.  All rights reserved.\r
+**\r
+** This file is part of libmatroska.\r
+**\r
+** This library is free software; you can redistribute it and/or\r
+** modify it under the terms of the GNU Lesser General Public\r
+** License as published by the Free Software Foundation; either\r
+** version 2.1 of the License, or (at your option) any later version.\r
+** \r
+** This library is distributed in the hope that it will be useful,\r
+** but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
+** Lesser General Public License for more details.\r
+** \r
+** You should have received a copy of the GNU Lesser General Public\r
+** License along with this library; if not, write to the Free Software\r
+** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\r
+**\r
+** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**\r
+** Contact license@matroska.org if any conditions of this licensing are\r
+** not clear to you.\r
+**\r
+**********************************************************************/\r
+\r
+/*!\r
+       \file\r
+       \version \$Id: KaxTrackVideo.h,v 1.9 2004/04/14 23:26:17 robux4 Exp $\r
+       \author Steve Lhomme     <robux4 @ users.sf.net>\r
+*/\r
+#ifndef LIBMATROSKA_TRACK_VIDEO_H\r
+#define LIBMATROSKA_TRACK_VIDEO_H\r
+\r
+#include "matroska/KaxTypes.h"\r
+#include "ebml/EbmlMaster.h"\r
+#include "ebml/EbmlUInteger.h"\r
+#include "ebml/EbmlBinary.h"\r
+#include "ebml/EbmlFloat.h"\r
+\r
+using namespace LIBEBML_NAMESPACE;\r
+\r
+START_LIBMATROSKA_NAMESPACE\r
+\r
+class MATROSKA_DLL_API KaxTrackVideo : public EbmlMaster {\r
+       public:\r
+               KaxTrackVideo();\r
+               KaxTrackVideo(const KaxTrackVideo & ElementToClone) :EbmlMaster(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTrackVideo)\r
+};\r
+\r
+#if MATROSKA_VERSION >= 2\r
+class MATROSKA_DLL_API KaxVideoFlagInterlaced : public EbmlUInteger {\r
+       public:\r
+               KaxVideoFlagInterlaced() :EbmlUInteger(0) {}\r
+               KaxVideoFlagInterlaced(const KaxVideoFlagInterlaced & ElementToClone) :EbmlUInteger(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxVideoFlagInterlaced)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxVideoStereoMode : public EbmlUInteger {\r
+       public:\r
+               KaxVideoStereoMode() :EbmlUInteger(0) {}\r
+               KaxVideoStereoMode(const KaxVideoStereoMode & ElementToClone) :EbmlUInteger(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxVideoStereoMode)\r
+};\r
+#endif // MATROSKA_VERSION\r
+\r
+class MATROSKA_DLL_API KaxVideoPixelWidth : public EbmlUInteger {\r
+       public:\r
+               KaxVideoPixelWidth() {}\r
+               KaxVideoPixelWidth(const KaxVideoPixelWidth & ElementToClone) :EbmlUInteger(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxVideoPixelWidth)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxVideoPixelHeight : public EbmlUInteger {\r
+       public:\r
+               KaxVideoPixelHeight() {}\r
+               KaxVideoPixelHeight(const KaxVideoPixelHeight & ElementToClone) :EbmlUInteger(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxVideoPixelHeight)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxVideoPixelCropBottom : public EbmlUInteger {\r
+       public:\r
+               KaxVideoPixelCropBottom(): EbmlUInteger(0) {}\r
+               KaxVideoPixelCropBottom(const KaxVideoPixelCropBottom & ElementToClone) :EbmlUInteger(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxVideoPixelCropBottom)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxVideoPixelCropTop : public EbmlUInteger {\r
+       public:\r
+               KaxVideoPixelCropTop(): EbmlUInteger(0) {}\r
+               KaxVideoPixelCropTop(const KaxVideoPixelCropTop & ElementToClone) :EbmlUInteger(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxVideoPixelCropTop)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxVideoPixelCropLeft : public EbmlUInteger {\r
+       public:\r
+               KaxVideoPixelCropLeft(): EbmlUInteger(0) {}\r
+               KaxVideoPixelCropLeft(const KaxVideoPixelCropLeft & ElementToClone) :EbmlUInteger(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxVideoPixelCropLeft)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxVideoPixelCropRight : public EbmlUInteger {\r
+       public:\r
+               KaxVideoPixelCropRight(): EbmlUInteger(0) {}\r
+               KaxVideoPixelCropRight(const KaxVideoPixelCropRight & ElementToClone) :EbmlUInteger(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxVideoPixelCropRight)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxVideoDisplayWidth : public EbmlUInteger {\r
+       public:\r
+               KaxVideoDisplayWidth() {}\r
+               KaxVideoDisplayWidth(const KaxVideoDisplayWidth & ElementToClone) :EbmlUInteger(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxVideoDisplayWidth)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxVideoDisplayHeight : public EbmlUInteger {\r
+       public:\r
+               KaxVideoDisplayHeight() {}\r
+               KaxVideoDisplayHeight(const KaxVideoDisplayHeight & ElementToClone) :EbmlUInteger(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxVideoDisplayHeight)\r
+};\r
+\r
+#if MATROSKA_VERSION >= 2\r
+class MATROSKA_DLL_API KaxVideoDisplayUnit : public EbmlUInteger {\r
+       public:\r
+               KaxVideoDisplayUnit() {}\r
+               KaxVideoDisplayUnit(const KaxVideoDisplayUnit & ElementToClone) :EbmlUInteger(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxVideoDisplayUnit)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxVideoAspectRatio : public EbmlUInteger {\r
+       public:\r
+               KaxVideoAspectRatio() {}\r
+               KaxVideoAspectRatio(const KaxVideoAspectRatio & ElementToClone) :EbmlUInteger(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxVideoAspectRatio)\r
+};\r
+#endif // MATROSKA_VERSION\r
+\r
+class MATROSKA_DLL_API KaxVideoColourSpace : public EbmlBinary {\r
+       public:\r
+               KaxVideoColourSpace() {}\r
+               KaxVideoColourSpace(const KaxVideoColourSpace & ElementToClone) :EbmlBinary(ElementToClone){}\r
+        bool ValidateSize(void) const {return (GetSize() == 4);}\r
+\r
+        EBML_CONCRETE_CLASS(KaxVideoColourSpace)\r
+};\r
+\r
+#if MATROSKA_VERSION >= 2\r
+class MATROSKA_DLL_API KaxVideoGamma : public EbmlFloat {\r
+       public:\r
+               KaxVideoGamma() {}\r
+               KaxVideoGamma(const KaxVideoGamma & ElementToClone) :EbmlFloat(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxVideoGamma)\r
+};\r
+#endif // MATROSKA_VERSION\r
+\r
+class MATROSKA_DLL_API KaxVideoFrameRate : public EbmlFloat {\r
+       public:\r
+               KaxVideoFrameRate() {}\r
+               KaxVideoFrameRate(const KaxVideoFrameRate & ElementToClone) :EbmlFloat(ElementToClone) {}\r
+               uint32 RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault);\r
+\r
+        EBML_CONCRETE_CLASS(KaxVideoFrameRate)\r
+};\r
+\r
+\r
+END_LIBMATROSKA_NAMESPACE\r
+\r
+#endif // LIBMATROSKA_TRACK_VIDEO_H\r
index 3b52524ca39f5c71301f28b753d00e1c547d2bc1..b1294cc75d36ad8c51248e32fc2f8afcc4145217 100644 (file)
@@ -1,90 +1,90 @@
-/****************************************************************************
-** libmatroska : parse Matroska files, see http://www.matroska.org/
-**
-** <file/class description>
-**
-** Copyright (C) 2002-2004 Steve Lhomme.  All rights reserved.
-**
-** This file is part of libmatroska.
-**
-** This library is free software; you can redistribute it and/or
-** modify it under the terms of the GNU Lesser General Public
-** License as published by the Free Software Foundation; either
-** version 2.1 of the License, or (at your option) any later version.
-** 
-** This library is distributed in the hope that it will be useful,
-** but WITHOUT ANY WARRANTY; without even the implied warranty of
-** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-** Lesser General Public License for more details.
-** 
-** You should have received a copy of the GNU Lesser General Public
-** License along with this library; if not, write to the Free Software
-** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-**
-** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**
-** Contact license@matroska.org if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-/*!
-       \file
-       \version \$Id: KaxTracks.h,v 1.7 2004/04/14 23:26:17 robux4 Exp $
-       \author Steve Lhomme     <robux4 @ users.sf.net>
-*/
-#ifndef LIBMATROSKA_TRACKS_H
-#define LIBMATROSKA_TRACKS_H
-
-#include "matroska/KaxTypes.h"
-#include "ebml/EbmlMaster.h"
-#include "ebml/EbmlUInteger.h"
-#include "matroska/KaxTrackEntryData.h"
-
-using namespace LIBEBML_NAMESPACE;
-
-START_LIBMATROSKA_NAMESPACE
-
-class MATROSKA_DLL_API KaxTracks : public EbmlMaster {
-       public:
-               KaxTracks();
-               KaxTracks(const KaxTracks & ElementToClone) :EbmlMaster(ElementToClone) {}
-
-        EBML_CONCRETE_CLASS(KaxTracks)
-};
-
-class MATROSKA_DLL_API KaxTrackEntry : public EbmlMaster {
-       public:
-               KaxTrackEntry();
-               KaxTrackEntry(const KaxTrackEntry & ElementToClone) :EbmlMaster(ElementToClone) {}
-
-               EbmlUInteger & TrackNumber() const { return *(static_cast<EbmlUInteger *>(FindElt(EBML_INFO(KaxTrackNumber)))); }
-
-               void EnableLacing(bool bEnable = true);
-
-               /*!
-                       \note lacing set by default
-               */
-               inline bool LacingEnabled() const {
-                       KaxTrackFlagLacing * myLacing = static_cast<KaxTrackFlagLacing *>(FindFirstElt(EBML_INFO(KaxTrackFlagLacing)));
-                       return((myLacing == NULL) || (uint8(*myLacing) != 0));
-               }
-
-               void SetGlobalTimecodeScale(uint64 aGlobalTimecodeScale) {
-                       mGlobalTimecodeScale = aGlobalTimecodeScale;
-                       bGlobalTimecodeScaleIsSet = true;
-               }
-               uint64 GlobalTimecodeScale() const {
-                       assert(bGlobalTimecodeScaleIsSet); 
-                       return mGlobalTimecodeScale;
-               }
-
-       protected:
-               bool   bGlobalTimecodeScaleIsSet;
-               uint64 mGlobalTimecodeScale;
-
-        EBML_CONCRETE_CLASS(KaxTrackEntry)
-};
-
-END_LIBMATROSKA_NAMESPACE
-
-#endif // LIBMATROSKA_TRACKS_H
+/****************************************************************************\r
+** libmatroska : parse Matroska files, see http://www.matroska.org/\r
+**\r
+** <file/class description>\r
+**\r
+** Copyright (C) 2002-2010 Steve Lhomme.  All rights reserved.\r
+**\r
+** This file is part of libmatroska.\r
+**\r
+** This library is free software; you can redistribute it and/or\r
+** modify it under the terms of the GNU Lesser General Public\r
+** License as published by the Free Software Foundation; either\r
+** version 2.1 of the License, or (at your option) any later version.\r
+** \r
+** This library is distributed in the hope that it will be useful,\r
+** but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
+** Lesser General Public License for more details.\r
+** \r
+** You should have received a copy of the GNU Lesser General Public\r
+** License along with this library; if not, write to the Free Software\r
+** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\r
+**\r
+** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**\r
+** Contact license@matroska.org if any conditions of this licensing are\r
+** not clear to you.\r
+**\r
+**********************************************************************/\r
+\r
+/*!\r
+       \file\r
+       \version \$Id: KaxTracks.h,v 1.7 2004/04/14 23:26:17 robux4 Exp $\r
+       \author Steve Lhomme     <robux4 @ users.sf.net>\r
+*/\r
+#ifndef LIBMATROSKA_TRACKS_H\r
+#define LIBMATROSKA_TRACKS_H\r
+\r
+#include "matroska/KaxTypes.h"\r
+#include "ebml/EbmlMaster.h"\r
+#include "ebml/EbmlUInteger.h"\r
+#include "matroska/KaxTrackEntryData.h"\r
+\r
+using namespace LIBEBML_NAMESPACE;\r
+\r
+START_LIBMATROSKA_NAMESPACE\r
+\r
+class MATROSKA_DLL_API KaxTracks : public EbmlMaster {\r
+       public:\r
+               KaxTracks();\r
+               KaxTracks(const KaxTracks & ElementToClone) :EbmlMaster(ElementToClone) {}\r
+\r
+        EBML_CONCRETE_CLASS(KaxTracks)\r
+};\r
+\r
+class MATROSKA_DLL_API KaxTrackEntry : public EbmlMaster {\r
+       public:\r
+               KaxTrackEntry();\r
+               KaxTrackEntry(const KaxTrackEntry & ElementToClone) :EbmlMaster(ElementToClone) {}\r
+\r
+               EbmlUInteger & TrackNumber() const { return *(static_cast<EbmlUInteger *>(FindElt(EBML_INFO(KaxTrackNumber)))); }\r
+\r
+               void EnableLacing(bool bEnable = true);\r
+\r
+               /*!\r
+                       \note lacing set by default\r
+               */\r
+               inline bool LacingEnabled() const {\r
+                       KaxTrackFlagLacing * myLacing = static_cast<KaxTrackFlagLacing *>(FindFirstElt(EBML_INFO(KaxTrackFlagLacing)));\r
+                       return((myLacing == NULL) || (uint8(*myLacing) != 0));\r
+               }\r
+\r
+               void SetGlobalTimecodeScale(uint64 aGlobalTimecodeScale) {\r
+                       mGlobalTimecodeScale = aGlobalTimecodeScale;\r
+                       bGlobalTimecodeScaleIsSet = true;\r
+               }\r
+               uint64 GlobalTimecodeScale() const {\r
+                       assert(bGlobalTimecodeScaleIsSet); \r
+                       return mGlobalTimecodeScale;\r
+               }\r
+\r
+       protected:\r
+               bool   bGlobalTimecodeScaleIsSet;\r
+               uint64 mGlobalTimecodeScale;\r
+\r
+        EBML_CONCRETE_CLASS(KaxTrackEntry)\r
+};\r
+\r
+END_LIBMATROSKA_NAMESPACE\r
+\r
+#endif // LIBMATROSKA_TRACKS_H\r
index cbb90b90c2539837afa917bcd348cc2b0039018e..4fbcb0b947adf9ec6323ef7200e3870fd37a9bbc 100644 (file)
@@ -1,59 +1,59 @@
-/****************************************************************************
-** libmatroska : parse Matroska files, see http://www.matroska.org/
-**
-** <file/class description>
-**
-** Copyright (C) 2002-2005 Steve Lhomme.  All rights reserved.
-**
-** This file is part of libmatroska.
-**
-** This library is free software; you can redistribute it and/or
-** modify it under the terms of the GNU Lesser General Public
-** License as published by the Free Software Foundation; either
-** version 2.1 of the License, or (at your option) any later version.
-** 
-** This library is distributed in the hope that it will be useful,
-** but WITHOUT ANY WARRANTY; without even the implied warranty of
-** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-** Lesser General Public License for more details.
-** 
-** You should have received a copy of the GNU Lesser General Public
-** License along with this library; if not, write to the Free Software
-** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-**
-** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**
-** Contact license@matroska.org if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-/*!
-       \file
-       \version \$Id: KaxTypes.h,v 1.4 2004/04/14 23:26:17 robux4 Exp $
-*/
-#ifndef LIBMATROSKA_TYPES_H
-#define LIBMATROSKA_TYPES_H
-
-#include "matroska/KaxConfig.h"
-#include "ebml/EbmlTypes.h"
-#include "matroska/c/libmatroska_t.h"
-
-START_LIBMATROSKA_NAMESPACE
-
-enum LacingType {
-       LACING_NONE = 0,
-       LACING_XIPH,
-       LACING_FIXED,
-       LACING_EBML,
-       LACING_AUTO
-};
-
-enum BlockBlobType {
-       BLOCK_BLOB_NO_SIMPLE = 0,
-       BLOCK_BLOB_SIMPLE_AUTO,
-       BLOCK_BLOB_ALWAYS_SIMPLE,
-};
-
-END_LIBMATROSKA_NAMESPACE
-
-#endif // LIBMATROSKA_TYPES_H
+/****************************************************************************\r
+** libmatroska : parse Matroska files, see http://www.matroska.org/\r
+**\r
+** <file/class description>\r
+**\r
+** Copyright (C) 2002-2010 Steve Lhomme.  All rights reserved.\r
+**\r
+** This file is part of libmatroska.\r
+**\r
+** This library is free software; you can redistribute it and/or\r
+** modify it under the terms of the GNU Lesser General Public\r
+** License as published by the Free Software Foundation; either\r
+** version 2.1 of the License, or (at your option) any later version.\r
+** \r
+** This library is distributed in the hope that it will be useful,\r
+** but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
+** Lesser General Public License for more details.\r
+** \r
+** You should have received a copy of the GNU Lesser General Public\r
+** License along with this library; if not, write to the Free Software\r
+** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\r
+**\r
+** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**\r
+** Contact license@matroska.org if any conditions of this licensing are\r
+** not clear to you.\r
+**\r
+**********************************************************************/\r
+\r
+/*!\r
+       \file\r
+       \version \$Id: KaxTypes.h,v 1.4 2004/04/14 23:26:17 robux4 Exp $\r
+*/\r
+#ifndef LIBMATROSKA_TYPES_H\r
+#define LIBMATROSKA_TYPES_H\r
+\r
+#include "matroska/KaxConfig.h"\r
+#include "ebml/EbmlTypes.h"\r
+#include "matroska/c/libmatroska_t.h"\r
+\r
+START_LIBMATROSKA_NAMESPACE\r
+\r
+enum LacingType {\r
+       LACING_NONE = 0,\r
+       LACING_XIPH,\r
+       LACING_FIXED,\r
+       LACING_EBML,\r
+       LACING_AUTO\r
+};\r
+\r
+enum BlockBlobType {\r
+       BLOCK_BLOB_NO_SIMPLE = 0,\r
+       BLOCK_BLOB_SIMPLE_AUTO,\r
+       BLOCK_BLOB_ALWAYS_SIMPLE,\r
+};\r
+\r
+END_LIBMATROSKA_NAMESPACE\r
+\r
+#endif // LIBMATROSKA_TYPES_H\r
index 9e7d6186af2f938f3c8b4511b0635bd26ac2bc2b..e877330fc2ed47f19693afd42b96dc792ff38e2a 100644 (file)
@@ -1,54 +1,54 @@
-/****************************************************************************
-** <file/class description>
-**
-** Copyright (C) 2002-2005 Steve Lhomme.  All rights reserved.
-**
-** This file is part of libmatroska.
-**
-** This library is free software; you can redistribute it and/or
-** modify it under the terms of the GNU Lesser General Public
-** License as published by the Free Software Foundation; either
-** version 2.1 of the License, or (at your option) any later version.
-** 
-** This library is distributed in the hope that it will be useful,
-** but WITHOUT ANY WARRANTY; without even the implied warranty of
-** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-** Lesser General Public License for more details.
-** 
-** You should have received a copy of the GNU Lesser General Public
-** License along with this library; if not, write to the Free Software
-** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-**
-** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**
-** Contact license@matroska.org if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-/*!
-       \file
-       \version \$Id: KaxVersion.h,v 1.13 2004/04/23 16:46:07 mosu Exp $
-       \author Steve Lhomme     <robux4 @ users.sf.net>
-*/
-#ifndef LIBMATROSKA_VERSION_H
-#define LIBMATROSKA_VERSION_H
-
-#include <string>
-
-#include "ebml/EbmlConfig.h"
-#include "matroska/KaxConfig.h"
-
-START_LIBMATROSKA_NAMESPACE
-
-#define LIBMATROSKA_VERSION 0x000900
-
-static const std::string KaxCodeVersion = "0.9.0";
-static const std::string KaxCodeDate    = __TIMESTAMP__;
-
-/*!
-       \todo Improve the CRC/ECC system (backward and forward possible ?) to fit streaming/live writing/simple reading
-*/
-
-END_LIBMATROSKA_NAMESPACE
-
-#endif // LIBMATROSKA_VERSION_H
+/****************************************************************************\r
+** <file/class description>\r
+**\r
+** Copyright (C) 2002-2010 Steve Lhomme.  All rights reserved.\r
+**\r
+** This file is part of libmatroska.\r
+**\r
+** This library is free software; you can redistribute it and/or\r
+** modify it under the terms of the GNU Lesser General Public\r
+** License as published by the Free Software Foundation; either\r
+** version 2.1 of the License, or (at your option) any later version.\r
+** \r
+** This library is distributed in the hope that it will be useful,\r
+** but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
+** Lesser General Public License for more details.\r
+** \r
+** You should have received a copy of the GNU Lesser General Public\r
+** License along with this library; if not, write to the Free Software\r
+** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\r
+**\r
+** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**\r
+** Contact license@matroska.org if any conditions of this licensing are\r
+** not clear to you.\r
+**\r
+**********************************************************************/\r
+\r
+/*!\r
+       \file\r
+       \version \$Id: KaxVersion.h,v 1.13 2004/04/23 16:46:07 mosu Exp $\r
+       \author Steve Lhomme     <robux4 @ users.sf.net>\r
+*/\r
+#ifndef LIBMATROSKA_VERSION_H\r
+#define LIBMATROSKA_VERSION_H\r
+\r
+#include <string>\r
+\r
+#include "ebml/EbmlConfig.h"\r
+#include "matroska/KaxConfig.h"\r
+\r
+START_LIBMATROSKA_NAMESPACE\r
+\r
+#define LIBMATROSKA_VERSION 0x000900\r
+\r
+static const std::string KaxCodeVersion = "0.9.0";\r
+static const std::string KaxCodeDate    = __TIMESTAMP__;\r
+\r
+/*!\r
+       \todo Improve the CRC/ECC system (backward and forward possible ?) to fit streaming/live writing/simple reading\r
+*/\r
+\r
+END_LIBMATROSKA_NAMESPACE\r
+\r
+#endif // LIBMATROSKA_VERSION_H\r
index 03ecc4c686b76486178f5d3904c2253e145476cc..69fb1baf7b5fcac34cd5b1461f09987a27124754 100644 (file)
@@ -1,96 +1,96 @@
-/****************************************************************************
-** libmatroska : parse Matroska files, see http://www.matroska.org/
-**
-** <file/class description>
-**
-** Copyright (C) 2002-2004 Steve Lhomme.  All rights reserved.
-**
-** This file is part of libmatroska.
-**
-** This library is free software; you can redistribute it and/or
-** modify it under the terms of the GNU Lesser General Public
-** License as published by the Free Software Foundation; either
-** version 2.1 of the License, or (at your option) any later version.
-** 
-** This library is distributed in the hope that it will be useful,
-** but WITHOUT ANY WARRANTY; without even the implied warranty of
-** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-** Lesser General Public License for more details.
-** 
-** You should have received a copy of the GNU Lesser General Public
-** License along with this library; if not, write to the Free Software
-** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-**
-** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**
-** Contact license@matroska.org if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-/*!
-       \file
-       \version \$Id: KaxAttached.cpp 1202 2005-08-30 14:39:01Z robux4 $
-       \author Steve Lhomme     <robux4 @ users.sf.net>
-*/
-#include "matroska/KaxAttached.h"
-#include "matroska/KaxContexts.h"
-
-// sub elements
-
-using namespace LIBEBML_NAMESPACE;
-
-START_LIBMATROSKA_NAMESPACE
-
-#if MATROSKA_VERSION == 1
-EbmlSemantic KaxAttached_ContextList[5] =
-#else // MATROSKA_VERSION
-EbmlSemantic KaxAttached_ContextList[6] =
-#endif // MATROSKA_VERSION
-{
-       EbmlSemantic(true,  true, EBML_INFO(KaxFileName)),
-       EbmlSemantic(true,  true, EBML_INFO(KaxMimeType)),
-       EbmlSemantic(true,  true, EBML_INFO(KaxFileData)),
-       EbmlSemantic(false, true, EBML_INFO(KaxFileDescription)),
-       EbmlSemantic(true,  true, EBML_INFO(KaxFileUID)),
-#if MATROSKA_VERSION >= 2
-       EbmlSemantic(false, true, EBML_INFO(KaxFileReferral)),
-#endif // MATROSKA_VERSION
-};
-
-EbmlId KaxAttached_TheId       (0x61A7, 2);
-EbmlId KaxFileDescription_TheId(0x467E, 2);
-EbmlId KaxFileName_TheId       (0x466E, 2);
-EbmlId KaxMimeType_TheId       (0x4660, 2);
-EbmlId KaxFileData_TheId       (0x465C, 2);
-EbmlId KaxFileUID_TheId        (0x46AE, 2);
-#if MATROSKA_VERSION >= 2
-EbmlId KaxFileReferral_TheId   (0x4675, 2);
-#endif // MATROSKA_VERSION
-
-const EbmlSemanticContext KaxAttached_Context = EbmlSemanticContext(countof(KaxAttached_ContextList), KaxAttached_ContextList, &KaxAttachments_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxAttached));
-const EbmlSemanticContext KaxFileDescription_Context = EbmlSemanticContext(0, NULL, &KaxAttachments_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxFileDescription));
-const EbmlSemanticContext KaxFileName_Context        = EbmlSemanticContext(0, NULL, &KaxAttachments_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxFileName));
-const EbmlSemanticContext KaxMimeType_Context        = EbmlSemanticContext(0, NULL, &KaxAttachments_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxMimeType));
-const EbmlSemanticContext KaxFileData_Context        = EbmlSemanticContext(0, NULL, &KaxAttachments_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxFileData));
-const EbmlSemanticContext KaxFileUID_Context         = EbmlSemanticContext(0, NULL, &KaxAttachments_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxFileUID));
-#if MATROSKA_VERSION >= 2
-const EbmlSemanticContext KaxFileReferral_Context    = EbmlSemanticContext(0, NULL, &KaxAttachments_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxFileReferral));
-#endif // MATROSKA_VERSION
-
-const EbmlCallbacks KaxAttached::ClassInfos(KaxAttached::Create, KaxAttached_TheId, "AttachedFile", KaxAttached_Context);
-const EbmlCallbacks KaxFileDescription::ClassInfos(KaxFileDescription::Create, KaxFileDescription_TheId, "FileDescription", KaxFileDescription_Context);
-const EbmlCallbacks KaxFileName::ClassInfos(KaxFileName::Create, KaxFileName_TheId, "FileName", KaxFileName_Context);
-const EbmlCallbacks KaxMimeType::ClassInfos(KaxMimeType::Create, KaxMimeType_TheId, "FileMimeType", KaxMimeType_Context);
-const EbmlCallbacks KaxFileData::ClassInfos(KaxFileData::Create, KaxFileData_TheId, "FileData", KaxFileData_Context);
-const EbmlCallbacks KaxFileUID::ClassInfos(KaxFileUID::Create, KaxFileUID_TheId, "FileUID", KaxFileUID_Context);
-#if MATROSKA_VERSION >= 2
-const EbmlCallbacks KaxFileReferral::ClassInfos(KaxFileReferral::Create, KaxFileReferral_TheId, "FileReferral", KaxFileReferral_Context);
-#endif // MATROSKA_VERSION
-
-KaxAttached::KaxAttached()
- :EbmlMaster(KaxAttached_Context)
-{
-       SetSizeLength(2); // mandatory min size support (for easier updating) (2^(7*2)-2 = 16Ko)
-}
-
-END_LIBMATROSKA_NAMESPACE
+/****************************************************************************\r
+** libmatroska : parse Matroska files, see http://www.matroska.org/\r
+**\r
+** <file/class description>\r
+**\r
+** Copyright (C) 2002-2010 Steve Lhomme.  All rights reserved.\r
+**\r
+** This file is part of libmatroska.\r
+**\r
+** This library is free software; you can redistribute it and/or\r
+** modify it under the terms of the GNU Lesser General Public\r
+** License as published by the Free Software Foundation; either\r
+** version 2.1 of the License, or (at your option) any later version.\r
+** \r
+** This library is distributed in the hope that it will be useful,\r
+** but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
+** Lesser General Public License for more details.\r
+** \r
+** You should have received a copy of the GNU Lesser General Public\r
+** License along with this library; if not, write to the Free Software\r
+** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\r
+**\r
+** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**\r
+** Contact license@matroska.org if any conditions of this licensing are\r
+** not clear to you.\r
+**\r
+**********************************************************************/\r
+\r
+/*!\r
+       \file\r
+       \version \$Id: KaxAttached.cpp 1202 2005-08-30 14:39:01Z robux4 $\r
+       \author Steve Lhomme     <robux4 @ users.sf.net>\r
+*/\r
+#include "matroska/KaxAttached.h"\r
+#include "matroska/KaxContexts.h"\r
+\r
+// sub elements\r
+\r
+using namespace LIBEBML_NAMESPACE;\r
+\r
+START_LIBMATROSKA_NAMESPACE\r
+\r
+#if MATROSKA_VERSION == 1\r
+EbmlSemantic KaxAttached_ContextList[5] =\r
+#else // MATROSKA_VERSION\r
+EbmlSemantic KaxAttached_ContextList[6] =\r
+#endif // MATROSKA_VERSION\r
+{\r
+       EbmlSemantic(true,  true, EBML_INFO(KaxFileName)),\r
+       EbmlSemantic(true,  true, EBML_INFO(KaxMimeType)),\r
+       EbmlSemantic(true,  true, EBML_INFO(KaxFileData)),\r
+       EbmlSemantic(false, true, EBML_INFO(KaxFileDescription)),\r
+       EbmlSemantic(true,  true, EBML_INFO(KaxFileUID)),\r
+#if MATROSKA_VERSION >= 2\r
+       EbmlSemantic(false, true, EBML_INFO(KaxFileReferral)),\r
+#endif // MATROSKA_VERSION\r
+};\r
+\r
+EbmlId KaxAttached_TheId       (0x61A7, 2);\r
+EbmlId KaxFileDescription_TheId(0x467E, 2);\r
+EbmlId KaxFileName_TheId       (0x466E, 2);\r
+EbmlId KaxMimeType_TheId       (0x4660, 2);\r
+EbmlId KaxFileData_TheId       (0x465C, 2);\r
+EbmlId KaxFileUID_TheId        (0x46AE, 2);\r
+#if MATROSKA_VERSION >= 2\r
+EbmlId KaxFileReferral_TheId   (0x4675, 2);\r
+#endif // MATROSKA_VERSION\r
+\r
+const EbmlSemanticContext KaxAttached_Context = EbmlSemanticContext(countof(KaxAttached_ContextList), KaxAttached_ContextList, &KaxAttachments_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxAttached));\r
+const EbmlSemanticContext KaxFileDescription_Context = EbmlSemanticContext(0, NULL, &KaxAttachments_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxFileDescription));\r
+const EbmlSemanticContext KaxFileName_Context        = EbmlSemanticContext(0, NULL, &KaxAttachments_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxFileName));\r
+const EbmlSemanticContext KaxMimeType_Context        = EbmlSemanticContext(0, NULL, &KaxAttachments_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxMimeType));\r
+const EbmlSemanticContext KaxFileData_Context        = EbmlSemanticContext(0, NULL, &KaxAttachments_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxFileData));\r
+const EbmlSemanticContext KaxFileUID_Context         = EbmlSemanticContext(0, NULL, &KaxAttachments_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxFileUID));\r
+#if MATROSKA_VERSION >= 2\r
+const EbmlSemanticContext KaxFileReferral_Context    = EbmlSemanticContext(0, NULL, &KaxAttachments_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxFileReferral));\r
+#endif // MATROSKA_VERSION\r
+\r
+const EbmlCallbacks KaxAttached::ClassInfos(KaxAttached::Create, KaxAttached_TheId, "AttachedFile", KaxAttached_Context);\r
+const EbmlCallbacks KaxFileDescription::ClassInfos(KaxFileDescription::Create, KaxFileDescription_TheId, "FileDescription", KaxFileDescription_Context);\r
+const EbmlCallbacks KaxFileName::ClassInfos(KaxFileName::Create, KaxFileName_TheId, "FileName", KaxFileName_Context);\r
+const EbmlCallbacks KaxMimeType::ClassInfos(KaxMimeType::Create, KaxMimeType_TheId, "FileMimeType", KaxMimeType_Context);\r
+const EbmlCallbacks KaxFileData::ClassInfos(KaxFileData::Create, KaxFileData_TheId, "FileData", KaxFileData_Context);\r
+const EbmlCallbacks KaxFileUID::ClassInfos(KaxFileUID::Create, KaxFileUID_TheId, "FileUID", KaxFileUID_Context);\r
+#if MATROSKA_VERSION >= 2\r
+const EbmlCallbacks KaxFileReferral::ClassInfos(KaxFileReferral::Create, KaxFileReferral_TheId, "FileReferral", KaxFileReferral_Context);\r
+#endif // MATROSKA_VERSION\r
+\r
+KaxAttached::KaxAttached()\r
+ :EbmlMaster(KaxAttached_Context)\r
+{\r
+       SetSizeLength(2); // mandatory min size support (for easier updating) (2^(7*2)-2 = 16Ko)\r
+}\r
+\r
+END_LIBMATROSKA_NAMESPACE\r
index 2dca49e38423858ba8145307235a51b8318fb931..6d69f0231646b3eda5f35a3b353995565a906566 100644 (file)
@@ -1,60 +1,60 @@
-/****************************************************************************
-** libmatroska : parse Matroska files, see http://www.matroska.org/
-**
-** <file/class description>
-**
-** Copyright (C) 2002-2004 Steve Lhomme.  All rights reserved.
-**
-** This file is part of libmatroska.
-**
-** This library is free software; you can redistribute it and/or
-** modify it under the terms of the GNU Lesser General Public
-** License as published by the Free Software Foundation; either
-** version 2.1 of the License, or (at your option) any later version.
-** 
-** This library is distributed in the hope that it will be useful,
-** but WITHOUT ANY WARRANTY; without even the implied warranty of
-** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-** Lesser General Public License for more details.
-** 
-** You should have received a copy of the GNU Lesser General Public
-** License along with this library; if not, write to the Free Software
-** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-**
-** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**
-** Contact license@matroska.org if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-/*!
-       \file
-       \version \$Id: KaxAttachments.cpp 640 2004-07-09 21:05:36Z mosu $
-       \author Steve Lhomme     <robux4 @ users.sf.net>
-*/
-#include "matroska/KaxAttachments.h"
-#include "matroska/KaxAttached.h"
-#include "matroska/KaxContexts.h"
-
-using namespace LIBEBML_NAMESPACE;
-
-// sub elements
-START_LIBMATROSKA_NAMESPACE
-
-EbmlSemantic KaxAttachments_ContextList[1] =
-{
-       EbmlSemantic(true, false, EBML_INFO(KaxAttached)),        ///< EBMLVersion
-};
-
-const EbmlSemanticContext KaxAttachments_Context = EbmlSemanticContext(countof(KaxAttachments_ContextList), KaxAttachments_ContextList, &KaxSegment_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxAttachments));
-
-EbmlId KaxAttachments_TheId(0x1941A469, 4);
-const EbmlCallbacks KaxAttachments::ClassInfos(KaxAttachments::Create, KaxAttachments_TheId, "Attachments", KaxAttachments_Context);
-
-KaxAttachments::KaxAttachments()
- :EbmlMaster(KaxAttachments_Context)
-{
-       SetSizeLength(2); // mandatory min size support (for easier updating) (2^(7*2)-2 = 16Ko)
-}
-
-END_LIBMATROSKA_NAMESPACE
+/****************************************************************************\r
+** libmatroska : parse Matroska files, see http://www.matroska.org/\r
+**\r
+** <file/class description>\r
+**\r
+** Copyright (C) 2002-2010 Steve Lhomme.  All rights reserved.\r
+**\r
+** This file is part of libmatroska.\r
+**\r
+** This library is free software; you can redistribute it and/or\r
+** modify it under the terms of the GNU Lesser General Public\r
+** License as published by the Free Software Foundation; either\r
+** version 2.1 of the License, or (at your option) any later version.\r
+** \r
+** This library is distributed in the hope that it will be useful,\r
+** but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
+** Lesser General Public License for more details.\r
+** \r
+** You should have received a copy of the GNU Lesser General Public\r
+** License along with this library; if not, write to the Free Software\r
+** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\r
+**\r
+** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**\r
+** Contact license@matroska.org if any conditions of this licensing are\r
+** not clear to you.\r
+**\r
+**********************************************************************/\r
+\r
+/*!\r
+       \file\r
+       \version \$Id: KaxAttachments.cpp 640 2004-07-09 21:05:36Z mosu $\r
+       \author Steve Lhomme     <robux4 @ users.sf.net>\r
+*/\r
+#include "matroska/KaxAttachments.h"\r
+#include "matroska/KaxAttached.h"\r
+#include "matroska/KaxContexts.h"\r
+\r
+using namespace LIBEBML_NAMESPACE;\r
+\r
+// sub elements\r
+START_LIBMATROSKA_NAMESPACE\r
+\r
+EbmlSemantic KaxAttachments_ContextList[1] =\r
+{\r
+       EbmlSemantic(true, false, EBML_INFO(KaxAttached)),        ///< EBMLVersion\r
+};\r
+\r
+const EbmlSemanticContext KaxAttachments_Context = EbmlSemanticContext(countof(KaxAttachments_ContextList), KaxAttachments_ContextList, &KaxSegment_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxAttachments));\r
+\r
+EbmlId KaxAttachments_TheId(0x1941A469, 4);\r
+const EbmlCallbacks KaxAttachments::ClassInfos(KaxAttachments::Create, KaxAttachments_TheId, "Attachments", KaxAttachments_Context);\r
+\r
+KaxAttachments::KaxAttachments()\r
+ :EbmlMaster(KaxAttachments_Context)\r
+{\r
+       SetSizeLength(2); // mandatory min size support (for easier updating) (2^(7*2)-2 = 16Ko)\r
+}\r
+\r
+END_LIBMATROSKA_NAMESPACE\r
index 33c8be3a9a332894250bc594cb7f931444b7ec55..81a9f0c7f1c428f94f0b10dca2995aa7a6244c64 100644 (file)
-/****************************************************************************
-** libmatroska : parse Matroska files, see http://www.matroska.org/
-**
-** <file/class description>
-**
-** Copyright (C) 2002-2005 Steve Lhomme.  All rights reserved.
-**
-** This library is free software; you can redistribute it and/or
-** modify it under the terms of the GNU Lesser General Public
-** License as published by the Free Software Foundation; either
-** version 2.1 of the License, or (at your option) any later version.
-** 
-** This library is distributed in the hope that it will be useful,
-** but WITHOUT ANY WARRANTY; without even the implied warranty of
-** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-** Lesser General Public License for more details.
-** 
-** You should have received a copy of the GNU Lesser General Public
-** License along with this library; if not, write to the Free Software
-** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-**
-** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**
-** Contact license@matroska.org if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-/*!
-       \file
-       \version \$Id: KaxBlock.cpp 1265 2007-01-14 17:20:35Z mosu $
-       \author Steve Lhomme     <robux4 @ users.sf.net>
-       \author Julien Coloos    <suiryc @ users.sf.net>
-*/
-#include <cassert>
-
-//#include <streams.h>
-
-#include "matroska/KaxBlock.h"
-#include "matroska/KaxContexts.h"
-#include "matroska/KaxBlockData.h"
-#include "matroska/KaxCluster.h"
-
-START_LIBMATROSKA_NAMESPACE
-
-#if MATROSKA_VERSION == 1
-const EbmlSemantic KaxBlockGroup_ContextList[6] =
-#else // MATROSKA_VERSION
-const EbmlSemantic KaxBlockGroup_ContextList[9] =
-#endif // MATROSKA_VERSION
-{
-       EbmlSemantic(true,  true,  EBML_INFO(KaxBlock)),
-#if MATROSKA_VERSION >= 2
-       EbmlSemantic(false, true,  EBML_INFO(KaxBlockVirtual)),
-#endif // MATROSKA_VERSION
-       EbmlSemantic(false, true,  EBML_INFO(KaxBlockDuration)),
-       EbmlSemantic(false, true,  EBML_INFO(KaxSlices)),
-       EbmlSemantic(true,  true,  EBML_INFO(KaxReferencePriority)),
-       EbmlSemantic(false, false, EBML_INFO(KaxReferenceBlock)),
-#if MATROSKA_VERSION >= 2
-       EbmlSemantic(false, true,  EBML_INFO(KaxReferenceVirtual)),
-       EbmlSemantic(false, true,  EBML_INFO(KaxCodecState)),
-#endif // MATROSKA_VERSION
-       EbmlSemantic(false, true,  EBML_INFO(KaxBlockAdditions)),
-};
-
-const EbmlSemantic KaxBlockAdditions_ContextList[1] =
-{
-       EbmlSemantic(true,  false,  EBML_INFO(KaxBlockMore))
-};
-
-const EbmlSemantic KaxBlockMore_ContextList[2] =
-{
-       EbmlSemantic(true,  true,  EBML_INFO(KaxBlockAddID)),
-       EbmlSemantic(true,  true,  EBML_INFO(KaxBlockAdditional))
-};
-
-EbmlId KaxBlockGroup_TheId     (0xA0, 1);
-EbmlId KaxBlock_TheId          (0xA1, 1);
-EbmlId KaxSimpleBlock_TheId    (0xA3, 1);
-EbmlId KaxBlockDuration_TheId  (0x9B, 1);
-#if MATROSKA_VERSION >= 2
-EbmlId KaxBlockVirtual_TheId   (0xA2, 1);
-EbmlId KaxCodecState_TheId     (0xA4, 1);
-#endif // MATROSKA_VERSION
-EbmlId KaxBlockAdditions_TheId (0x75A1, 2);
-EbmlId KaxBlockMore_TheId      (0xA6, 1);
-EbmlId KaxBlockAddID_TheId     (0xEE, 1);
-EbmlId KaxBlockAdditional_TheId(0xA5, 1);
-
-const EbmlSemanticContext KaxBlockGroup_Context = EbmlSemanticContext(countof(KaxBlockGroup_ContextList), KaxBlockGroup_ContextList, &KaxCluster_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxBlockGroup));
-const EbmlSemanticContext KaxBlock_Context = EbmlSemanticContext(0, NULL, &KaxBlockGroup_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxBlock));
-const EbmlSemanticContext KaxBlockDuration_Context = EbmlSemanticContext(0, NULL, &KaxBlockGroup_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxBlockDuration));
-#if MATROSKA_VERSION >= 2
-const EbmlSemanticContext KaxSimpleBlock_Context = EbmlSemanticContext(0, NULL, &KaxCluster_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxSimpleBlock));
-const EbmlSemanticContext KaxBlockVirtual_Context = EbmlSemanticContext(0, NULL, &KaxBlockGroup_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxBlockVirtual));
-const EbmlSemanticContext KaxCodecState_Context = EbmlSemanticContext(0, NULL, &KaxBlockGroup_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxCodecState));
-#endif // MATROSKA_VERSION
-const EbmlSemanticContext KaxBlockAdditions_Context = EbmlSemanticContext(countof(KaxBlockAdditions_ContextList), KaxBlockAdditions_ContextList, &KaxBlockGroup_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxBlockAdditions));
-const EbmlSemanticContext KaxBlockMore_Context = EbmlSemanticContext(countof(KaxBlockMore_ContextList), KaxBlockMore_ContextList, &KaxBlockAdditions_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxBlockMore));
-const EbmlSemanticContext KaxBlockAddID_Context = EbmlSemanticContext(0, NULL, &KaxBlockMore_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxBlockAddID));
-const EbmlSemanticContext KaxBlockAdditional_Context = EbmlSemanticContext(0, NULL, &KaxBlockMore_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxBlockAdditional));
-
-const EbmlCallbacks KaxBlockGroup::ClassInfos(KaxBlockGroup::Create, KaxBlockGroup_TheId, "BlockGroup", KaxBlockGroup_Context);
-const EbmlCallbacks KaxBlock::ClassInfos(KaxBlock::Create, KaxBlock_TheId, "Block", KaxBlock_Context);
-const EbmlCallbacks KaxBlockDuration::ClassInfos(KaxBlockDuration::Create, KaxBlockDuration_TheId, "BlockDuration", KaxBlockDuration_Context);
-#if MATROSKA_VERSION >= 2
-const EbmlCallbacks KaxSimpleBlock::ClassInfos(KaxSimpleBlock::Create, KaxSimpleBlock_TheId, "SimpleBlock", KaxSimpleBlock_Context);
-const EbmlCallbacks KaxBlockVirtual::ClassInfos(KaxBlockVirtual::Create, KaxBlockVirtual_TheId, "BlockVirtual", KaxBlockVirtual_Context);
-const EbmlCallbacks KaxCodecState::ClassInfos(KaxCodecState::Create, KaxCodecState_TheId, "CodecState", KaxCodecState_Context);
-#endif // MATROSKA_VERSION
-const EbmlCallbacks KaxBlockAdditions::ClassInfos(KaxBlockAdditions::Create, KaxBlockAdditions_TheId, "BlockAdditions", KaxBlockAdditions_Context);
-const EbmlCallbacks KaxBlockMore::ClassInfos(KaxBlockMore::Create, KaxBlockMore_TheId, "BlockMore", KaxBlockMore_Context);
-const EbmlCallbacks KaxBlockAddID::ClassInfos(KaxBlockAddID::Create, KaxBlockAddID_TheId, "BlockAddID", KaxBlockAddID_Context);
-const EbmlCallbacks KaxBlockAdditional::ClassInfos(KaxBlockAdditional::Create, KaxBlockAdditional_TheId, "BlockAdditional", KaxBlockAdditional_Context);
-
-DataBuffer * DataBuffer::Clone()
-{
-       binary *ClonedData = (binary *)malloc(mySize * sizeof(binary));
-       assert(ClonedData != NULL);
-       memcpy(ClonedData, myBuffer ,mySize );
-
-       SimpleDataBuffer * result = new SimpleDataBuffer(ClonedData, mySize, 0);
-       result->bValidValue = bValidValue;
-       return result;
-}
-
-SimpleDataBuffer::SimpleDataBuffer(const SimpleDataBuffer & ToClone)
- :DataBuffer((binary *)malloc(ToClone.mySize * sizeof(binary)), ToClone.mySize, myFreeBuffer)
-{
-       assert(myBuffer != NULL);
-       memcpy(myBuffer, ToClone.myBuffer ,mySize );
-       bValidValue = ToClone.bValidValue;
-}
-
-bool KaxInternalBlock::ValidateSize() const
-{
-       return (GetSize() >= 4); /// for the moment
-}
-
-KaxInternalBlock::~KaxInternalBlock()
-{
-       ReleaseFrames();
-}
-
-KaxInternalBlock::KaxInternalBlock(const KaxInternalBlock & ElementToClone)
- :EbmlBinary(ElementToClone)
- ,myBuffers(ElementToClone.myBuffers.size())
- ,Timecode(ElementToClone.Timecode)
- ,LocalTimecode(ElementToClone.LocalTimecode)
- ,bLocalTimecodeUsed(ElementToClone.bLocalTimecodeUsed)
- ,TrackNumber(ElementToClone.TrackNumber)
- ,ParentCluster(ElementToClone.ParentCluster) ///< \todo not exactly
-{
-       // add a clone of the list
-       std::vector<DataBuffer *>::const_iterator Itr = ElementToClone.myBuffers.begin();
-       std::vector<DataBuffer *>::iterator myItr = myBuffers.begin();
-       while (Itr != ElementToClone.myBuffers.end())
-       {
-               *myItr = (*Itr)->Clone();
-               Itr++; myItr++;
-       }
-}
-
-
-KaxBlockGroup::~KaxBlockGroup()
-{
-//NOTE("KaxBlockGroup::~KaxBlockGroup");
-}
-
-KaxBlockGroup::KaxBlockGroup()
- :EbmlMaster(KaxBlockGroup_Context)
- ,ParentCluster(NULL)
- ,ParentTrack(NULL)
-{}
-
-KaxBlockAdditions::KaxBlockAdditions()
- :EbmlMaster(KaxBlockAdditions_Context)
-{}
-
-KaxBlockMore::KaxBlockMore()
- :EbmlMaster(KaxBlockMore_Context)
-{}
-
-/*!
-       \todo handle flags
-       \todo hardcoded limit of the number of frames in a lace should be a parameter
-       \return true if more frames can be added to this Block
-*/
-bool KaxInternalBlock::AddFrame(const KaxTrackEntry & track, uint64 timecode, DataBuffer & buffer, LacingType lacing, bool invisible)
-{
-       SetValueIsSet();
-       if (myBuffers.size() == 0) {
-               // first frame
-               Timecode = timecode;
-               TrackNumber = track.TrackNumber();
-               mInvisible = invisible;
-               mLacing = lacing;
-       }
-       myBuffers.push_back(&buffer);
-
-       // we don't allow more than 8 frames in a Block because the overhead improvement is minimal
-       if (myBuffers.size() >= 8 || lacing == LACING_NONE)
-               return false;
-
-       if (lacing == LACING_XIPH)
-               // decide wether a new frame can be added or not
-               // a frame in a lace is not efficient when the place necessary to code it in a lace is bigger 
-               // than the size of a simple Block. That means more than 6 bytes (4 in struct + 2 for EBML) to code the size
-               return (buffer.Size() < 6*0xFF);
-       else
-               return true;
-}
-
-/*!
-       \return Returns the lacing type that produces the smallest footprint.
-*/
-LacingType KaxInternalBlock::GetBestLacingType() const {
-       int XiphLacingSize, EbmlLacingSize, i;
-       bool SameSize = true;
-
-       if (myBuffers.size() <= 1)
-               return LACING_NONE;
-
-       XiphLacingSize = 1; // Number of laces is stored in 1 byte.
-       EbmlLacingSize = 1;
-       for (i = 0; i < (int)myBuffers.size() - 1; i++) {
-               if (myBuffers[i]->Size() != myBuffers[i + 1]->Size())
-                       SameSize = false;
-               XiphLacingSize += myBuffers[i]->Size() / 255 + 1;
-       }
-       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)
-               return LACING_FIXED;
-       else if (XiphLacingSize < EbmlLacingSize)
-               return LACING_XIPH;
-       else
-               return LACING_EBML;
-}
-
-uint64 KaxInternalBlock::UpdateSize(bool bSaveDefault, bool bForceRender)
-{
-       LacingType LacingHere;
-       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:
-                       SetSize_(0);
-                       break;
-               case 1:
-                       SetSize_(4 + myBuffers[0]->Size());
-                       break;
-               default:
-                       SetSize_(4 + 1); // 1 for the lacing head
-                       if (mLacing == LACING_AUTO)
-                               LacingHere = GetBestLacingType();
-                       else
-                               LacingHere = mLacing;
-                       switch (LacingHere)
-                       {
-                       case LACING_XIPH:
-                               for (i=0; i<myBuffers.size()-1; i++) {
-                                       SetSize_(GetSize() + myBuffers[i]->Size() + (myBuffers[i]->Size() / 0xFF + 1));
-                               }
-                               break;
-                       case LACING_EBML:
-                               SetSize_(GetSize() + myBuffers[0]->Size() + CodedSizeLength(myBuffers[0]->Size(), 0, IsFiniteSize()));
-                               for (i=1; i<myBuffers.size()-1; i++) {
-                                       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++) {
-                                       SetSize_(GetSize() + myBuffers[i]->Size());
-                               }
-                               break;
-                       default:
-                               assert(0);
-                       }
-                       // Size of the last frame (not in lace)
-                       SetSize_(GetSize() + myBuffers[i]->Size());
-                       break;
-       }
-
-       if (TrackNumber >= 0x80)
-               SetSize_(GetSize() + 1); // the size will be coded with one more octet
-
-       return GetSize();
-}
-
-#if MATROSKA_VERSION >= 2
-KaxBlockVirtual::KaxBlockVirtual(const KaxBlockVirtual & ElementToClone)
- :EbmlBinary(ElementToClone)
- ,Timecode(ElementToClone.Timecode)
- ,TrackNumber(ElementToClone.TrackNumber)
- ,ParentCluster(ElementToClone.ParentCluster) ///< \todo not exactly
-{
-    SetBuffer(DataBlock,sizeof(DataBlock));
-    SetValueIsSet(false);
-}
-
-uint64 KaxBlockVirtual::UpdateSize(bool bSaveDefault, bool bForceRender)
-{
-       assert(TrackNumber < 0x4000);
-       binary *cursor = GetData();
-       // fill data
-       if (TrackNumber < 0x80) {
-               *cursor++ = TrackNumber | 0x80; // set the first bit to 1 
-       } else {
-               *cursor++ = (TrackNumber >> 8) | 0x40; // set the second bit to 1
-               *cursor++ = TrackNumber & 0xFF;
-       }
-
-       assert(ParentCluster != NULL);
-       int16 ActualTimecode = ParentCluster->GetBlockLocalTimecode(Timecode);
-       big_int16 b16(ActualTimecode);
-       b16.Fill(cursor);
-       cursor += 2;
-
-       *cursor++ = 0; // flags
-
-       return GetSize();
-}
-#endif // MATROSKA_VERSION
-
-/*!
-       \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
-*/
-uint32 KaxInternalBlock::RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault)
-{
-       if (myBuffers.size() == 0) {
-               return 0;
-       } else {
-               assert(TrackNumber < 0x4000);
-               binary BlockHead[5], *cursor = BlockHead;
-               unsigned int i;
-
-               if (myBuffers.size() == 1) {
-                       SetSize_(4);
-                       mLacing = LACING_NONE;
-               } else {
-                       if (mLacing == LACING_NONE)
-                               mLacing = LACING_EBML; // supposedly the best of all
-                       SetSize_(4 + 1); // 1 for the lacing head (number of laced elements)
-               }
-               if (TrackNumber > 0x80)
-                       SetSize_(GetSize() + 1);
-
-               // write Block Head
-               if (TrackNumber < 0x80) {
-                       *cursor++ = TrackNumber | 0x80; // set the first bit to 1 
-               } else {
-                       *cursor++ = (TrackNumber >> 8) | 0x40; // set the second bit to 1
-                       *cursor++ = TrackNumber & 0xFF;
-               }
-
-               assert(ParentCluster != NULL);
-               int16 ActualTimecode = ParentCluster->GetBlockLocalTimecode(Timecode);
-               big_int16 b16(ActualTimecode);
-               b16.Fill(cursor);
-               cursor += 2;
-
-               *cursor = 0; // flags
-
-               if (mLacing == LACING_AUTO) {
-                       mLacing = GetBestLacingType();
-               }
-
-               // invisible flag
-               if (mInvisible)
-                       *cursor = 0x08;
-
-               if (bIsSimple) {
-                       if (bIsKeyframe)
-                               *cursor |= 0x80;
-                       if (bIsDiscardable)
-                               *cursor |= 0x01;
-               }
-               
-               // lacing flag
-               switch (mLacing)
-               {
-               case LACING_XIPH:
-                       *cursor++ |= 0x02;
-                       break;
-               case LACING_EBML:
-                       *cursor++ |= 0x06;
-                       break;
-               case LACING_FIXED:
-                       *cursor++ |= 0x04;
-                       break;
-               case LACING_NONE:
-                       break;
-           default:
-                       assert(0);
-               }
-
-               output.writeFully(BlockHead, 4 + ((TrackNumber > 0x80) ? 1 : 0));
-
-               binary tmpValue;
-               switch (mLacing)
-               {
-               case LACING_XIPH:
-                       // number of laces
-                       tmpValue = myBuffers.size()-1;
-                       output.writeFully(&tmpValue, 1);
-
-                       // set the size of each member in the lace
-                       for (i=0; i<myBuffers.size()-1; i++) {
-                               tmpValue = 0xFF;
-                               uint16 tmpSize = myBuffers[i]->Size();
-                               while (tmpSize >= 0xFF) {
-                                       output.writeFully(&tmpValue, 1);
-                                       SetSize_(GetSize() + 1);
-                                       tmpSize -= 0xFF;
-                               }
-                               tmpValue = binary(tmpSize);
-                               output.writeFully(&tmpValue, 1);
-                               SetSize_(GetSize() + 1);
-                       }
-                       break;
-               case LACING_EBML:
-                       // number of laces
-                       tmpValue = myBuffers.size()-1;
-                       output.writeFully(&tmpValue, 1);
-
-                       {
-                               int64 _Size;
-                               int _CodedSize;
-                               binary _FinalHead[8]; // 64 bits max coded size
-
-                               _Size = myBuffers[0]->Size();
-
-                               _CodedSize = CodedSizeLength(_Size, 0, IsFiniteSize());
-
-                               // first size in the lace is not a signed
-                               CodedValueLength(_Size, _CodedSize, _FinalHead);
-                               output.writeFully(_FinalHead, _CodedSize);
-                               SetSize_(GetSize() + _CodedSize);
-
-                               // set the size of each member in the lace
-                               for (i=1; i<myBuffers.size()-1; i++) {
-                                       _Size = int64(myBuffers[i]->Size()) - int64(myBuffers[i-1]->Size());
-                                       _CodedSize = CodedSizeLengthSigned(_Size, 0);
-                                       CodedValueLengthSigned(_Size, _CodedSize, _FinalHead);
-                                       output.writeFully(_FinalHead, _CodedSize);
-                                       SetSize_(GetSize() + _CodedSize);
-                               }
-                       }
-                       break;
-               case LACING_FIXED:
-                       // number of laces
-                       tmpValue = myBuffers.size()-1;
-                       output.writeFully(&tmpValue, 1);
-                       break;
-               case LACING_NONE:
-                       break;
-           default:
-                       assert(0);
-               }
-
-               // put the data of each frame
-               for (i=0; i<myBuffers.size(); i++) {
-                       output.writeFully(myBuffers[i]->Buffer(), myBuffers[i]->Size());
-                       SetSize_(GetSize() + myBuffers[i]->Size());
-               }
-       }
-
-       return GetSize();
-}
-
-uint64 KaxInternalBlock::ReadInternalHead(IOCallback & input)
-{
-       binary Buffer[5], *cursor = Buffer;
-       uint64 Result = input.read(cursor, 4);
-       if (Result != 4)
-               return Result;
-       
-       // update internal values
-       TrackNumber = *cursor++;
-       if ((TrackNumber & 0x80) == 0) {
-               // there is extra data
-               if ((TrackNumber & 0x40) == 0) {
-                       // We don't support track numbers that large !
-                       return Result;
-               }
-               Result += input.read(&Buffer[4], 1);
-               TrackNumber = (TrackNumber & 0x3F) << 8;
-               TrackNumber += *cursor++;
-       } else {
-               TrackNumber &= 0x7F;
-       }
-
-    
-       big_int16 b16;
-       b16.Eval(cursor);
-       assert(ParentCluster != NULL);
-       Timecode = ParentCluster->GetBlockGlobalTimecode(int16(b16));
-       bLocalTimecodeUsed = false;
-       cursor += 2;
-
-       return Result;
-}
-
-/*!
-       \todo better zero copy handling
-*/
-uint64 KaxInternalBlock::ReadData(IOCallback & input, ScopeMode ReadFully)
-{
-       uint64 Result;
-
-       FirstFrameLocation = input.getFilePointer(); // will be updated accordingly below
-
-       if (ReadFully == SCOPE_ALL_DATA)
-       {
-               Result = EbmlBinary::ReadData(input, ReadFully);
-               binary *cursor = GetData();
-               uint8 BlockHeadSize = 4;
-
-               // update internal values
-               TrackNumber = *cursor++;
-               if ((TrackNumber & 0x80) == 0) {
-                       // there is extra data
-                       if ((TrackNumber & 0x40) == 0) {
-                               // We don't support track numbers that large !
-                               return Result;
-                       }
-                       TrackNumber = (TrackNumber & 0x3F) << 8;
-                       TrackNumber += *cursor++;
-                       BlockHeadSize++;
-               } else {
-                       TrackNumber &= 0x7F;
-               }
-
-               big_int16 b16;
-               b16.Eval(cursor);
-               LocalTimecode = int16(b16);
-               bLocalTimecodeUsed = true;
-               cursor += 2;
-
-               if (EbmlId(*this) == EBML_ID(KaxSimpleBlock)) {
-                       bIsKeyframe = (*cursor & 0x80) != 0;
-                       bIsDiscardable = (*cursor & 0x01) != 0;
-               }
-               mInvisible = (*cursor & 0x08) >> 3;
-               mLacing = LacingType((*cursor++ & 0x06) >> 1);
-
-               // put all Frames in the list
-               if (mLacing == LACING_NONE) {
-                       FirstFrameLocation += cursor - GetData();
-                       DataBuffer * soloFrame = new DataBuffer(cursor, GetSize() - BlockHeadSize);
-                       myBuffers.push_back(soloFrame);
-                       SizeList.resize(1);
-                       SizeList[0] = GetSize() - BlockHeadSize;
-               } else {
-                       // read the number of frames in the lace
-                       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;
-                       int32 FrameSize;
-                       uint32 SizeRead;
-                       uint64 SizeUnknown;
-
-                       SizeList.resize(FrameNum + 1);
-
-                       switch (mLacing)
-                       {
-                       case LACING_XIPH:
-                               for (Index=0; Index<FrameNum; Index++) {
-                                       // get the size of the frame
-                                       FrameSize = 0;
-                                       do {
-                                               FrameSize += uint8(*cursor);
-                                               LastBufferSize--;
-                                       } while (*cursor++ == 0xFF);
-                                       SizeList[Index] = FrameSize;
-                                       LastBufferSize -= FrameSize;
-                               }
-                               SizeList[Index] = LastBufferSize;
-                               break;
-                       case LACING_EBML:
-                               SizeRead = LastBufferSize;
-                               FrameSize = ReadCodedSizeValue(cursor, SizeRead, SizeUnknown);
-                               SizeList[0] = FrameSize;
-                               cursor += SizeRead;
-                               LastBufferSize -= FrameSize + SizeRead;
-
-                               for (Index=1; Index<FrameNum; Index++) {
-                                       // get the size of the frame
-                                       SizeRead = LastBufferSize;
-                                       FrameSize += ReadCodedSizeSignedValue(cursor, SizeRead, SizeUnknown);
-                                       SizeList[Index] = FrameSize;
-                                       cursor += SizeRead;
-                                       LastBufferSize -= FrameSize + SizeRead;
-                               }
-                               SizeList[Index] = LastBufferSize;
-                               break;
-                       case LACING_FIXED:
-                               for (Index=0; Index<=FrameNum; Index++) {
-                                       // get the size of the frame
-                                       SizeList[Index] = LastBufferSize / (FrameNum + 1);
-                               }
-                               break;
-                       default: // other lacing not supported
-                               assert(0);
-                       }
-
-                       FirstFrameLocation += cursor - GetData();
-
-                       for (Index=0; Index<=FrameNum; Index++) {
-                               DataBuffer * lacedFrame = new DataBuffer(cursor, SizeList[Index]);
-                               myBuffers.push_back(lacedFrame);
-                               cursor += SizeList[Index];
-                       }
-               }
-               SetValueIsSet();
-       }
-       else if (ReadFully == SCOPE_PARTIAL_DATA)
-       {
-               binary _TempHead[5];
-               Result = input.read(_TempHead, 5);
-               binary *cursor = _TempHead;
-               binary *_tmpBuf;
-               uint8 BlockHeadSize = 4;
-
-               // update internal values
-               TrackNumber = *cursor++;
-               if ((TrackNumber & 0x80) == 0) {
-                       // there is extra data
-                       if ((TrackNumber & 0x40) == 0) {
-                               // We don't support track numbers that large !
-                               return Result;
-                       }
-                       TrackNumber = (TrackNumber & 0x3F) << 8;
-                       TrackNumber += *cursor++;
-                       BlockHeadSize++;
-               } else {
-                       TrackNumber &= 0x7F;
-               }
-
-               big_int16 b16;
-               b16.Eval(cursor);
-               LocalTimecode = int16(b16);
-               bLocalTimecodeUsed = true;
-               cursor += 2;
-
-               if (EbmlId(*this) == EBML_ID(KaxSimpleBlock)) {
-                       bIsKeyframe = (*cursor & 0x80) != 0;
-                       bIsDiscardable = (*cursor & 0x01) != 0;
-               }
-               mInvisible = (*cursor & 0x08) >> 3;
-               mLacing = LacingType((*cursor++ & 0x06) >> 1);
-               if (cursor == &_TempHead[4])
-               {
-                       _TempHead[0] = _TempHead[4];
-               } else {
-                       Result += input.read(_TempHead, 1);
-               }
-
-               FirstFrameLocation += cursor - _TempHead;
-
-               // put all Frames in the list
-               if (mLacing != LACING_NONE) {
-                       // read the number of frames in the lace
-                       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;
-                       int32 FrameSize;
-                       uint32 SizeRead;
-                       uint64 SizeUnknown;
-
-                       SizeList.resize(FrameNum + 1);
-
-                       switch (mLacing)
-                       {
-                       case LACING_XIPH:
-                               for (Index=0; Index<FrameNum; Index++) {
-                                       // get the size of the frame
-                                       FrameSize = 0;
-                                       do {
-                                               Result += input.read(_TempHead, 1);
-                                               FrameSize += uint8(_TempHead[0]);
-                                               LastBufferSize--;
-
-                                               FirstFrameLocation++;
-                                       } while (_TempHead[0] == 0xFF);
-
-                                       FirstFrameLocation++;
-                                       SizeList[Index] = FrameSize;
-                                       LastBufferSize -= FrameSize;
-                               }
-                               SizeList[Index] = LastBufferSize;
-                               break;
-                       case LACING_EBML:
-                               SizeRead = LastBufferSize;
-                               cursor = _tmpBuf = new binary[FrameNum*4]; /// \warning assume the mean size will be coded in less than 4 bytes
-                               Result += input.read(cursor, FrameNum*4);
-                               FrameSize = ReadCodedSizeValue(cursor, SizeRead, SizeUnknown);
-                               SizeList[0] = FrameSize;
-                               cursor += SizeRead;
-                               LastBufferSize -= FrameSize + SizeRead;
-
-                               for (Index=1; Index<FrameNum; Index++) {
-                                       // get the size of the frame
-                                       SizeRead = LastBufferSize;
-                                       FrameSize += ReadCodedSizeSignedValue(cursor, SizeRead, SizeUnknown);
-                                       SizeList[Index] = FrameSize;
-                                       cursor += SizeRead;
-                                       LastBufferSize -= FrameSize + SizeRead;
-                               }
-
-                               FirstFrameLocation += cursor - _tmpBuf;
-
-                               SizeList[Index] = LastBufferSize;
-                               delete [] _tmpBuf;
-                               break;
-                       case LACING_FIXED:
-                               for (Index=0; Index<=FrameNum; Index++) {
-                                       // get the size of the frame
-                                       SizeList[Index] = LastBufferSize / (FrameNum + 1);
-                               }
-                               break;
-                       default: // other lacing not supported
-                               assert(0);
-                       }
-               } else {
-                       SizeList.resize(1);
-                       SizeList[0] = GetSize() - BlockHeadSize;
-               }
-               SetValueIsSet(false);
-               Result = GetSize();
-       } else {
-               SetValueIsSet(false);
-               Result = GetSize();
-       }
-
-       return Result;
-}
-
-bool KaxBlockGroup::AddFrame(const KaxTrackEntry & track, uint64 timecode, DataBuffer & buffer, LacingType lacing)
-{
-       KaxBlock & theBlock = GetChild<KaxBlock>(*this);
-       assert(ParentCluster != NULL);
-       theBlock.SetParent(*ParentCluster);
-       ParentTrack = &track;
-       return theBlock.AddFrame(track, timecode, buffer, lacing);
-}
-
-bool KaxBlockGroup::AddFrame(const KaxTrackEntry & track, uint64 timecode, DataBuffer & buffer, const KaxBlockGroup & PastBlock, LacingType lacing)
-{
-//     assert(past_timecode < 0);
-
-       KaxBlock & theBlock = GetChild<KaxBlock>(*this);
-       assert(ParentCluster != NULL);
-       theBlock.SetParent(*ParentCluster);
-       ParentTrack = &track;
-       bool bRes = theBlock.AddFrame(track, timecode, buffer, lacing);
-
-       KaxReferenceBlock & thePastRef = GetChild<KaxReferenceBlock>(*this);
-       thePastRef.SetReferencedBlock(PastBlock);
-       thePastRef.SetParentBlock(*this);
-
-       return bRes;
-}
-
-bool KaxBlockGroup::AddFrame(const KaxTrackEntry & track, uint64 timecode, DataBuffer & buffer, const KaxBlockGroup & PastBlock, const KaxBlockGroup & ForwBlock, LacingType lacing)
-{
-//     assert(past_timecode < 0);
-
-//     assert(forw_timecode > 0);
-       
-       KaxBlock & theBlock = GetChild<KaxBlock>(*this);
-       assert(ParentCluster != NULL);
-       theBlock.SetParent(*ParentCluster);
-       ParentTrack = &track;
-       bool bRes = theBlock.AddFrame(track, timecode, buffer, lacing);
-
-       KaxReferenceBlock & thePastRef = GetChild<KaxReferenceBlock>(*this);
-       thePastRef.SetReferencedBlock(PastBlock);
-       thePastRef.SetParentBlock(*this);
-
-       KaxReferenceBlock & theFutureRef = AddNewChild<KaxReferenceBlock>(*this);
-       theFutureRef.SetReferencedBlock(ForwBlock);
-       theFutureRef.SetParentBlock(*this);
-
-       return bRes;
-}
-
-bool KaxBlockGroup::AddFrame(const KaxTrackEntry & track, uint64 timecode, DataBuffer & buffer, const KaxBlockBlob * PastBlock, const KaxBlockBlob * ForwBlock, LacingType lacing)
-{
-       KaxBlock & theBlock = GetChild<KaxBlock>(*this);
-       assert(ParentCluster != NULL);
-       theBlock.SetParent(*ParentCluster);
-       ParentTrack = &track;
-       bool bRes = theBlock.AddFrame(track, timecode, buffer, lacing);
-
-       if (PastBlock != NULL)
-       {
-               KaxReferenceBlock & thePastRef = GetChild<KaxReferenceBlock>(*this);
-               thePastRef.SetReferencedBlock(PastBlock);
-               thePastRef.SetParentBlock(*this);
-       }
-
-       if (ForwBlock != NULL)
-       {
-               KaxReferenceBlock & theFutureRef = AddNewChild<KaxReferenceBlock>(*this);
-               theFutureRef.SetReferencedBlock(ForwBlock);
-               theFutureRef.SetParentBlock(*this);
-       }
-
-       return bRes;
-}
-
-/*!
-       \todo we may cache the reference to the timecode block
-*/
-uint64 KaxBlockGroup::GlobalTimecode() const
-{
-       assert(ParentCluster != NULL); // impossible otherwise
-       KaxInternalBlock & MyBlock = *static_cast<KaxBlock *>(this->FindElt(EBML_INFO(KaxBlock)));
-       return MyBlock.GlobalTimecode();
-
-}
-
-uint16 KaxBlockGroup::TrackNumber() const
-{
-       KaxInternalBlock & MyBlock = *static_cast<KaxBlock *>(this->FindElt(EBML_INFO(KaxBlock)));
-       return MyBlock.TrackNum();
-}
-
-uint64 KaxBlockGroup::ClusterPosition() const
-{
-       assert(ParentCluster != NULL); // impossible otherwise
-       return ParentCluster->GetPosition();
-}
-
-uint64 KaxInternalBlock::ClusterPosition() const
-{
-       assert(ParentCluster != NULL); // impossible otherwise
-       return ParentCluster->GetPosition();
-}
-
-unsigned int KaxBlockGroup::ReferenceCount() const
-{
-       unsigned int Result = 0;
-       KaxReferenceBlock * MyBlockAdds = static_cast<KaxReferenceBlock *>(FindFirstElt(EBML_INFO(KaxReferenceBlock)));
-       if (MyBlockAdds != NULL) {
-               Result++;
-               while ((MyBlockAdds = static_cast<KaxReferenceBlock *>(FindNextElt(*MyBlockAdds))) != NULL)
-               {
-                       Result++;
-               }
-       }
-       return Result;
-}
-
-const KaxReferenceBlock & KaxBlockGroup::Reference(unsigned int Index) const
-{
-       KaxReferenceBlock * MyBlockAdds = static_cast<KaxReferenceBlock *>(FindFirstElt(EBML_INFO(KaxReferenceBlock)));
-       assert(MyBlockAdds != NULL); // call of a non existing reference
-       
-       while (Index != 0) {
-               MyBlockAdds = static_cast<KaxReferenceBlock *>(FindNextElt(*MyBlockAdds));
-               assert(MyBlockAdds != NULL);
-               Index--;
-       }
-       return *MyBlockAdds;
-}
-
-void KaxBlockGroup::ReleaseFrames()
-{
-       KaxInternalBlock & MyBlock = *static_cast<KaxBlock *>(this->FindElt(EBML_INFO(KaxBlock)));
-       MyBlock.ReleaseFrames();
-}
-
-void KaxInternalBlock::ReleaseFrames()
-{
-       // free the allocated Frames
-       int i;
-       for (i=myBuffers.size()-1; i>=0; i--) {
-               if (myBuffers[i] != NULL) {
-                       myBuffers[i]->FreeBuffer(*myBuffers[i]);
-                       delete myBuffers[i];
-                       myBuffers[i] = NULL;
-               }
-       }
-}
-
-void KaxBlockGroup::SetBlockDuration(uint64 TimeLength)
-{
-       assert(ParentTrack != NULL);
-       int64 scale = ParentTrack->GlobalTimecodeScale();
-       KaxBlockDuration & myDuration = *static_cast<KaxBlockDuration *>(FindFirstElt(EBML_INFO(KaxBlockDuration), true));
-       *(static_cast<EbmlUInteger *>(&myDuration)) = TimeLength / uint64(scale);
-}
-
-bool KaxBlockGroup::GetBlockDuration(uint64 &TheTimecode) const
-{
-       KaxBlockDuration * myDuration = static_cast<KaxBlockDuration *>(FindElt(EBML_INFO(KaxBlockDuration)));
-       if (myDuration == NULL) {
-               return false;
-       }
-
-       assert(ParentTrack != NULL);
-       TheTimecode = uint64(*myDuration) * ParentTrack->GlobalTimecodeScale();
-       return true;
-}
-
-KaxBlockGroup::operator KaxInternalBlock &() {
-       KaxBlock & theBlock = GetChild<KaxBlock>(*this);
-       return theBlock;
-}
-
-void KaxBlockGroup::SetParent(KaxCluster & aParentCluster) {
-       ParentCluster = &aParentCluster;
-       KaxBlock & theBlock = GetChild<KaxBlock>(*this);
-       theBlock.SetParent( aParentCluster );
-}
-
-void KaxInternalBlock::SetParent(KaxCluster & aParentCluster)
-{
-       ParentCluster = &aParentCluster;
-       if (bLocalTimecodeUsed) {
-               Timecode = aParentCluster.GetBlockGlobalTimecode(LocalTimecode);
-               bLocalTimecodeUsed = false;
-       }
-}
-
-int64 KaxInternalBlock::GetDataPosition(size_t FrameNumber)
-{
-       int64 _Result = -1;
-
-       if (ValueIsSet() && FrameNumber < SizeList.size())
-       {
-               _Result = FirstFrameLocation;
-       
-               size_t _Idx = 0;
-               while(FrameNumber--)
-               {
-                       _Result += SizeList[_Idx++];
-               }
-       }
-
-       return _Result;
-}
-
-int64 KaxInternalBlock::GetFrameSize(size_t FrameNumber)
-{
-       int64 _Result = -1;
-
-       if (/*bValueIsSet &&*/ FrameNumber < SizeList.size())
-       {
-               _Result = SizeList[FrameNumber];
-       }
-
-       return _Result;
-}
-
-KaxBlockBlob::operator KaxBlockGroup &()
-{
-       assert(!bUseSimpleBlock);
-       assert(Block.group);
-       return *Block.group;
-}
-
-KaxBlockBlob::operator const KaxBlockGroup &() const
-{
-       assert(!bUseSimpleBlock);
-       assert(Block.group);
-       return *Block.group;
-}
-
-KaxBlockBlob::operator KaxInternalBlock &()
-{
-       assert(Block.group);
-#if MATROSKA_VERSION >= 2
-       if (bUseSimpleBlock)
-               return *Block.simpleblock;
-       else
-#endif
-               return *Block.group;
-}
-
-KaxBlockBlob::operator const KaxInternalBlock &() const
-{
-       assert(Block.group);
-#if MATROSKA_VERSION >= 2
-       if (bUseSimpleBlock)
-               return *Block.simpleblock;
-       else
-#endif
-               return *Block.group;
-}
-
-#if MATROSKA_VERSION >= 2
-KaxBlockBlob::operator KaxSimpleBlock &()
-{
-       assert(bUseSimpleBlock);
-       assert(Block.simpleblock);
-       return *Block.simpleblock;
-}
-#endif
-
-bool KaxBlockBlob::AddFrameAuto(const KaxTrackEntry & track, uint64 timecode, DataBuffer & buffer, LacingType lacing, const KaxBlockBlob * PastBlock, const KaxBlockBlob * ForwBlock)
-{
-       bool bResult = false;
-#if MATROSKA_VERSION >= 2
-       if ((SimpleBlockMode == BLOCK_BLOB_ALWAYS_SIMPLE) || (SimpleBlockMode == BLOCK_BLOB_SIMPLE_AUTO && PastBlock == NULL && ForwBlock == NULL)) {
-               assert(bUseSimpleBlock == true);
-               if (Block.simpleblock == NULL) {
-                       Block.simpleblock = new KaxSimpleBlock();
-                       Block.simpleblock->SetParent(*ParentCluster);
-               }
-
-               bResult = Block.simpleblock->AddFrame(track, timecode, buffer, lacing);
-               if (PastBlock == NULL && ForwBlock == NULL) {
-                       Block.simpleblock->SetKeyframe(true);
-                       Block.simpleblock->SetDiscardable(false);
-               } else {
-                       Block.simpleblock->SetKeyframe(false);
-                       if ((ForwBlock == NULL || ((const KaxInternalBlock &)*ForwBlock).GlobalTimecode() <= timecode) &&
-                               (PastBlock == NULL || ((const KaxInternalBlock &)*PastBlock).GlobalTimecode() <= timecode))
-                               Block.simpleblock->SetDiscardable(false);
-                       else
-                               Block.simpleblock->SetDiscardable(true);
-               }
-       }
-       else
-#endif
-       {
-               if (ReplaceSimpleByGroup()) {
-                       bResult = Block.group->AddFrame(track, timecode, buffer, PastBlock, ForwBlock, lacing);
-               }
-       }
-
-       return bResult;
-}
-
-void KaxBlockBlob::SetParent(KaxCluster & parent_clust)
-{
-       ParentCluster = &parent_clust;
-}
-
-void KaxBlockBlob::SetBlockDuration(uint64 TimeLength)
-{
-       if (ReplaceSimpleByGroup())
-               Block.group->SetBlockDuration(TimeLength);
-}
-
-bool KaxBlockBlob::ReplaceSimpleByGroup()
-{
-       if (SimpleBlockMode== BLOCK_BLOB_ALWAYS_SIMPLE)
-               return false;
-
-       if (!bUseSimpleBlock) {
-               if (Block.group == NULL) {
-                       Block.group = new KaxBlockGroup();
-               }
-       }
-#if MATROSKA_VERSION >= 2
-       else 
-       {
-
-               if (Block.simpleblock != NULL) {
-                       KaxSimpleBlock *old_simpleblock = Block.simpleblock;
-                       Block.group = new KaxBlockGroup();
-                       // _TODO_ : move all the data to the blockgroup
-                       assert(false);
-                       // -> while(frame) AddFrame(myBuffer)
-                       delete old_simpleblock;
-               } else {
-                       Block.group = new KaxBlockGroup();
-               }
-       }
-#endif
-       if (ParentCluster != NULL)
-               Block.group->SetParent(*ParentCluster);
-
-       bUseSimpleBlock = false;
-       return true;
-}
-
-void KaxBlockBlob::SetBlockGroup( KaxBlockGroup &BlockRef )
-{
-       assert(!bUseSimpleBlock);
-       Block.group = &BlockRef;
-}
-
-END_LIBMATROSKA_NAMESPACE
+/****************************************************************************\r
+** libmatroska : parse Matroska files, see http://www.matroska.org/\r
+**\r
+** <file/class description>\r
+**\r
+** Copyright (C) 2002-2010 Steve Lhomme.  All rights reserved.\r
+**\r
+** This library is free software; you can redistribute it and/or\r
+** modify it under the terms of the GNU Lesser General Public\r
+** License as published by the Free Software Foundation; either\r
+** version 2.1 of the License, or (at your option) any later version.\r
+** \r
+** This library is distributed in the hope that it will be useful,\r
+** but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
+** Lesser General Public License for more details.\r
+** \r
+** You should have received a copy of the GNU Lesser General Public\r
+** License along with this library; if not, write to the Free Software\r
+** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\r
+**\r
+** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**\r
+** Contact license@matroska.org if any conditions of this licensing are\r
+** not clear to you.\r
+**\r
+**********************************************************************/\r
+\r
+/*!\r
+       \file\r
+       \version \$Id: KaxBlock.cpp 1265 2007-01-14 17:20:35Z mosu $\r
+       \author Steve Lhomme     <robux4 @ users.sf.net>\r
+       \author Julien Coloos    <suiryc @ users.sf.net>\r
+*/\r
+#include <cassert>\r
+\r
+//#include <streams.h>\r
+\r
+#include "matroska/KaxBlock.h"\r
+#include "matroska/KaxContexts.h"\r
+#include "matroska/KaxBlockData.h"\r
+#include "matroska/KaxCluster.h"\r
+\r
+START_LIBMATROSKA_NAMESPACE\r
+\r
+#if MATROSKA_VERSION == 1\r
+const EbmlSemantic KaxBlockGroup_ContextList[6] =\r
+#else // MATROSKA_VERSION\r
+const EbmlSemantic KaxBlockGroup_ContextList[9] =\r
+#endif // MATROSKA_VERSION\r
+{\r
+       EbmlSemantic(true,  true,  EBML_INFO(KaxBlock)),\r
+#if MATROSKA_VERSION >= 2\r
+       EbmlSemantic(false, true,  EBML_INFO(KaxBlockVirtual)),\r
+#endif // MATROSKA_VERSION\r
+       EbmlSemantic(false, true,  EBML_INFO(KaxBlockDuration)),\r
+       EbmlSemantic(false, true,  EBML_INFO(KaxSlices)),\r
+       EbmlSemantic(true,  true,  EBML_INFO(KaxReferencePriority)),\r
+       EbmlSemantic(false, false, EBML_INFO(KaxReferenceBlock)),\r
+#if MATROSKA_VERSION >= 2\r
+       EbmlSemantic(false, true,  EBML_INFO(KaxReferenceVirtual)),\r
+       EbmlSemantic(false, true,  EBML_INFO(KaxCodecState)),\r
+#endif // MATROSKA_VERSION\r
+       EbmlSemantic(false, true,  EBML_INFO(KaxBlockAdditions)),\r
+};\r
+\r
+const EbmlSemantic KaxBlockAdditions_ContextList[1] =\r
+{\r
+       EbmlSemantic(true,  false,  EBML_INFO(KaxBlockMore))\r
+};\r
+\r
+const EbmlSemantic KaxBlockMore_ContextList[2] =\r
+{\r
+       EbmlSemantic(true,  true,  EBML_INFO(KaxBlockAddID)),\r
+       EbmlSemantic(true,  true,  EBML_INFO(KaxBlockAdditional))\r
+};\r
+\r
+EbmlId KaxBlockGroup_TheId     (0xA0, 1);\r
+EbmlId KaxBlock_TheId          (0xA1, 1);\r
+EbmlId KaxSimpleBlock_TheId    (0xA3, 1);\r
+EbmlId KaxBlockDuration_TheId  (0x9B, 1);\r
+#if MATROSKA_VERSION >= 2\r
+EbmlId KaxBlockVirtual_TheId   (0xA2, 1);\r
+EbmlId KaxCodecState_TheId     (0xA4, 1);\r
+#endif // MATROSKA_VERSION\r
+EbmlId KaxBlockAdditions_TheId (0x75A1, 2);\r
+EbmlId KaxBlockMore_TheId      (0xA6, 1);\r
+EbmlId KaxBlockAddID_TheId     (0xEE, 1);\r
+EbmlId KaxBlockAdditional_TheId(0xA5, 1);\r
+\r
+const EbmlSemanticContext KaxBlockGroup_Context = EbmlSemanticContext(countof(KaxBlockGroup_ContextList), KaxBlockGroup_ContextList, &KaxCluster_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxBlockGroup));\r
+const EbmlSemanticContext KaxBlock_Context = EbmlSemanticContext(0, NULL, &KaxBlockGroup_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxBlock));\r
+const EbmlSemanticContext KaxBlockDuration_Context = EbmlSemanticContext(0, NULL, &KaxBlockGroup_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxBlockDuration));\r
+#if MATROSKA_VERSION >= 2\r
+const EbmlSemanticContext KaxSimpleBlock_Context = EbmlSemanticContext(0, NULL, &KaxCluster_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxSimpleBlock));\r
+const EbmlSemanticContext KaxBlockVirtual_Context = EbmlSemanticContext(0, NULL, &KaxBlockGroup_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxBlockVirtual));\r
+const EbmlSemanticContext KaxCodecState_Context = EbmlSemanticContext(0, NULL, &KaxBlockGroup_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxCodecState));\r
+#endif // MATROSKA_VERSION\r
+const EbmlSemanticContext KaxBlockAdditions_Context = EbmlSemanticContext(countof(KaxBlockAdditions_ContextList), KaxBlockAdditions_ContextList, &KaxBlockGroup_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxBlockAdditions));\r
+const EbmlSemanticContext KaxBlockMore_Context = EbmlSemanticContext(countof(KaxBlockMore_ContextList), KaxBlockMore_ContextList, &KaxBlockAdditions_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxBlockMore));\r
+const EbmlSemanticContext KaxBlockAddID_Context = EbmlSemanticContext(0, NULL, &KaxBlockMore_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxBlockAddID));\r
+const EbmlSemanticContext KaxBlockAdditional_Context = EbmlSemanticContext(0, NULL, &KaxBlockMore_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxBlockAdditional));\r
+\r
+const EbmlCallbacks KaxBlockGroup::ClassInfos(KaxBlockGroup::Create, KaxBlockGroup_TheId, "BlockGroup", KaxBlockGroup_Context);\r
+const EbmlCallbacks KaxBlock::ClassInfos(KaxBlock::Create, KaxBlock_TheId, "Block", KaxBlock_Context);\r
+const EbmlCallbacks KaxBlockDuration::ClassInfos(KaxBlockDuration::Create, KaxBlockDuration_TheId, "BlockDuration", KaxBlockDuration_Context);\r
+#if MATROSKA_VERSION >= 2\r
+const EbmlCallbacks KaxSimpleBlock::ClassInfos(KaxSimpleBlock::Create, KaxSimpleBlock_TheId, "SimpleBlock", KaxSimpleBlock_Context);\r
+const EbmlCallbacks KaxBlockVirtual::ClassInfos(KaxBlockVirtual::Create, KaxBlockVirtual_TheId, "BlockVirtual", KaxBlockVirtual_Context);\r
+const EbmlCallbacks KaxCodecState::ClassInfos(KaxCodecState::Create, KaxCodecState_TheId, "CodecState", KaxCodecState_Context);\r
+#endif // MATROSKA_VERSION\r
+const EbmlCallbacks KaxBlockAdditions::ClassInfos(KaxBlockAdditions::Create, KaxBlockAdditions_TheId, "BlockAdditions", KaxBlockAdditions_Context);\r
+const EbmlCallbacks KaxBlockMore::ClassInfos(KaxBlockMore::Create, KaxBlockMore_TheId, "BlockMore", KaxBlockMore_Context);\r
+const EbmlCallbacks KaxBlockAddID::ClassInfos(KaxBlockAddID::Create, KaxBlockAddID_TheId, "BlockAddID", KaxBlockAddID_Context);\r
+const EbmlCallbacks KaxBlockAdditional::ClassInfos(KaxBlockAdditional::Create, KaxBlockAdditional_TheId, "BlockAdditional", KaxBlockAdditional_Context);\r
+\r
+DataBuffer * DataBuffer::Clone()\r
+{\r
+       binary *ClonedData = (binary *)malloc(mySize * sizeof(binary));\r
+       assert(ClonedData != NULL);\r
+       memcpy(ClonedData, myBuffer ,mySize );\r
+\r
+       SimpleDataBuffer * result = new SimpleDataBuffer(ClonedData, mySize, 0);\r
+       result->bValidValue = bValidValue;\r
+       return result;\r
+}\r
+\r
+SimpleDataBuffer::SimpleDataBuffer(const SimpleDataBuffer & ToClone)\r
+ :DataBuffer((binary *)malloc(ToClone.mySize * sizeof(binary)), ToClone.mySize, myFreeBuffer)\r
+{\r
+       assert(myBuffer != NULL);\r
+       memcpy(myBuffer, ToClone.myBuffer ,mySize );\r
+       bValidValue = ToClone.bValidValue;\r
+}\r
+\r
+bool KaxInternalBlock::ValidateSize() const\r
+{\r
+       return (GetSize() >= 4); /// for the moment\r
+}\r
+\r
+KaxInternalBlock::~KaxInternalBlock()\r
+{\r
+       ReleaseFrames();\r
+}\r
+\r
+KaxInternalBlock::KaxInternalBlock(const KaxInternalBlock & ElementToClone)\r
+ :EbmlBinary(ElementToClone)\r
+ ,myBuffers(ElementToClone.myBuffers.size())\r
+ ,Timecode(ElementToClone.Timecode)\r
+ ,LocalTimecode(ElementToClone.LocalTimecode)\r
+ ,bLocalTimecodeUsed(ElementToClone.bLocalTimecodeUsed)\r
+ ,TrackNumber(ElementToClone.TrackNumber)\r
+ ,ParentCluster(ElementToClone.ParentCluster) ///< \todo not exactly\r
+{\r
+       // add a clone of the list\r
+       std::vector<DataBuffer *>::const_iterator Itr = ElementToClone.myBuffers.begin();\r
+       std::vector<DataBuffer *>::iterator myItr = myBuffers.begin();\r
+       while (Itr != ElementToClone.myBuffers.end())\r
+       {\r
+               *myItr = (*Itr)->Clone();\r
+               Itr++; myItr++;\r
+       }\r
+}\r
+\r
+\r
+KaxBlockGroup::~KaxBlockGroup()\r
+{\r
+//NOTE("KaxBlockGroup::~KaxBlockGroup");\r
+}\r
+\r
+KaxBlockGroup::KaxBlockGroup()\r
+ :EbmlMaster(KaxBlockGroup_Context)\r
+ ,ParentCluster(NULL)\r
+ ,ParentTrack(NULL)\r
+{}\r
+\r
+KaxBlockAdditions::KaxBlockAdditions()\r
+ :EbmlMaster(KaxBlockAdditions_Context)\r
+{}\r
+\r
+KaxBlockMore::KaxBlockMore()\r
+ :EbmlMaster(KaxBlockMore_Context)\r
+{}\r
+\r
+/*!\r
+       \todo handle flags\r
+       \todo hardcoded limit of the number of frames in a lace should be a parameter\r
+       \return true if more frames can be added to this Block\r
+*/\r
+bool KaxInternalBlock::AddFrame(const KaxTrackEntry & track, uint64 timecode, DataBuffer & buffer, LacingType lacing, bool invisible)\r
+{\r
+       SetValueIsSet();\r
+       if (myBuffers.size() == 0) {\r
+               // first frame\r
+               Timecode = timecode;\r
+               TrackNumber = track.TrackNumber();\r
+               mInvisible = invisible;\r
+               mLacing = lacing;\r
+       }\r
+       myBuffers.push_back(&buffer);\r
+\r
+       // we don't allow more than 8 frames in a Block because the overhead improvement is minimal\r
+       if (myBuffers.size() >= 8 || lacing == LACING_NONE)\r
+               return false;\r
+\r
+       if (lacing == LACING_XIPH)\r
+               // decide wether a new frame can be added or not\r
+               // a frame in a lace is not efficient when the place necessary to code it in a lace is bigger \r
+               // than the size of a simple Block. That means more than 6 bytes (4 in struct + 2 for EBML) to code the size\r
+               return (buffer.Size() < 6*0xFF);\r
+       else\r
+               return true;\r
+}\r
+\r
+/*!\r
+       \return Returns the lacing type that produces the smallest footprint.\r
+*/\r
+LacingType KaxInternalBlock::GetBestLacingType() const {\r
+       int XiphLacingSize, EbmlLacingSize, i;\r
+       bool SameSize = true;\r
+\r
+       if (myBuffers.size() <= 1)\r
+               return LACING_NONE;\r
+\r
+       XiphLacingSize = 1; // Number of laces is stored in 1 byte.\r
+       EbmlLacingSize = 1;\r
+       for (i = 0; i < (int)myBuffers.size() - 1; i++) {\r
+               if (myBuffers[i]->Size() != myBuffers[i + 1]->Size())\r
+                       SameSize = false;\r
+               XiphLacingSize += myBuffers[i]->Size() / 255 + 1;\r
+       }\r
+       EbmlLacingSize += CodedSizeLength(myBuffers[0]->Size(), 0, IsFiniteSize());\r
+       for (i = 1; i < (int)myBuffers.size() - 1; i++)\r
+               EbmlLacingSize += CodedSizeLengthSigned(int64(myBuffers[i]->Size()) - int64(myBuffers[i - 1]->Size()), 0);\r
+       if (SameSize)\r
+               return LACING_FIXED;\r
+       else if (XiphLacingSize < EbmlLacingSize)\r
+               return LACING_XIPH;\r
+       else\r
+               return LACING_EBML;\r
+}\r
+\r
+uint64 KaxInternalBlock::UpdateSize(bool bSaveDefault, bool bForceRender)\r
+{\r
+       LacingType LacingHere;\r
+       assert(GetData() == NULL); // Data is not used for KaxInternalBlock\r
+       assert(TrackNumber < 0x4000); // no more allowed for the moment\r
+       unsigned int i;\r
+\r
+       // compute the final size of the data\r
+       switch (myBuffers.size()) {\r
+               case 0:\r
+                       SetSize_(0);\r
+                       break;\r
+               case 1:\r
+                       SetSize_(4 + myBuffers[0]->Size());\r
+                       break;\r
+               default:\r
+                       SetSize_(4 + 1); // 1 for the lacing head\r
+                       if (mLacing == LACING_AUTO)\r
+                               LacingHere = GetBestLacingType();\r
+                       else\r
+                               LacingHere = mLacing;\r
+                       switch (LacingHere)\r
+                       {\r
+                       case LACING_XIPH:\r
+                               for (i=0; i<myBuffers.size()-1; i++) {\r
+                                       SetSize_(GetSize() + myBuffers[i]->Size() + (myBuffers[i]->Size() / 0xFF + 1));\r
+                               }\r
+                               break;\r
+                       case LACING_EBML:\r
+                               SetSize_(GetSize() + myBuffers[0]->Size() + CodedSizeLength(myBuffers[0]->Size(), 0, IsFiniteSize()));\r
+                               for (i=1; i<myBuffers.size()-1; i++) {\r
+                                       SetSize_(GetSize() + myBuffers[i]->Size() + CodedSizeLengthSigned(int64(myBuffers[i]->Size()) - int64(myBuffers[i-1]->Size()), 0));\r
+                               }\r
+                               break;\r
+                       case LACING_FIXED:\r
+                               for (i=0; i<myBuffers.size()-1; i++) {\r
+                                       SetSize_(GetSize() + myBuffers[i]->Size());\r
+                               }\r
+                               break;\r
+                       default:\r
+                               assert(0);\r
+                       }\r
+                       // Size of the last frame (not in lace)\r
+                       SetSize_(GetSize() + myBuffers[i]->Size());\r
+                       break;\r
+       }\r
+\r
+       if (TrackNumber >= 0x80)\r
+               SetSize_(GetSize() + 1); // the size will be coded with one more octet\r
+\r
+       return GetSize();\r
+}\r
+\r
+#if MATROSKA_VERSION >= 2\r
+KaxBlockVirtual::KaxBlockVirtual(const KaxBlockVirtual & ElementToClone)\r
+ :EbmlBinary(ElementToClone)\r
+ ,Timecode(ElementToClone.Timecode)\r
+ ,TrackNumber(ElementToClone.TrackNumber)\r
+ ,ParentCluster(ElementToClone.ParentCluster) ///< \todo not exactly\r
+{\r
+    SetBuffer(DataBlock,sizeof(DataBlock));\r
+    SetValueIsSet(false);\r
+}\r
+\r
+uint64 KaxBlockVirtual::UpdateSize(bool bSaveDefault, bool bForceRender)\r
+{\r
+       assert(TrackNumber < 0x4000);\r
+       binary *cursor = GetData();\r
+       // fill data\r
+       if (TrackNumber < 0x80) {\r
+               *cursor++ = TrackNumber | 0x80; // set the first bit to 1 \r
+       } else {\r
+               *cursor++ = (TrackNumber >> 8) | 0x40; // set the second bit to 1\r
+               *cursor++ = TrackNumber & 0xFF;\r
+       }\r
+\r
+       assert(ParentCluster != NULL);\r
+       int16 ActualTimecode = ParentCluster->GetBlockLocalTimecode(Timecode);\r
+       big_int16 b16(ActualTimecode);\r
+       b16.Fill(cursor);\r
+       cursor += 2;\r
+\r
+       *cursor++ = 0; // flags\r
+\r
+       return GetSize();\r
+}\r
+#endif // MATROSKA_VERSION\r
+\r
+/*!\r
+       \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)\r
+       \todo the actual timecode to write should be retrieved from the Cluster from here\r
+*/\r
+uint32 KaxInternalBlock::RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault)\r
+{\r
+       if (myBuffers.size() == 0) {\r
+               return 0;\r
+       } else {\r
+               assert(TrackNumber < 0x4000);\r
+               binary BlockHead[5], *cursor = BlockHead;\r
+               unsigned int i;\r
+\r
+               if (myBuffers.size() == 1) {\r
+                       SetSize_(4);\r
+                       mLacing = LACING_NONE;\r
+               } else {\r
+                       if (mLacing == LACING_NONE)\r
+                               mLacing = LACING_EBML; // supposedly the best of all\r
+                       SetSize_(4 + 1); // 1 for the lacing head (number of laced elements)\r
+               }\r
+               if (TrackNumber > 0x80)\r
+                       SetSize_(GetSize() + 1);\r
+\r
+               // write Block Head\r
+               if (TrackNumber < 0x80) {\r
+                       *cursor++ = TrackNumber | 0x80; // set the first bit to 1 \r
+               } else {\r
+                       *cursor++ = (TrackNumber >> 8) | 0x40; // set the second bit to 1\r
+                       *cursor++ = TrackNumber & 0xFF;\r
+               }\r
+\r
+               assert(ParentCluster != NULL);\r
+               int16 ActualTimecode = ParentCluster->GetBlockLocalTimecode(Timecode);\r
+               big_int16 b16(ActualTimecode);\r
+               b16.Fill(cursor);\r
+               cursor += 2;\r
+\r
+               *cursor = 0; // flags\r
+\r
+               if (mLacing == LACING_AUTO) {\r
+                       mLacing = GetBestLacingType();\r
+               }\r
+\r
+               // invisible flag\r
+               if (mInvisible)\r
+                       *cursor = 0x08;\r
+\r
+               if (bIsSimple) {\r
+                       if (bIsKeyframe)\r
+                               *cursor |= 0x80;\r
+                       if (bIsDiscardable)\r
+                               *cursor |= 0x01;\r
+               }\r
+               \r
+               // lacing flag\r
+               switch (mLacing)\r
+               {\r
+               case LACING_XIPH:\r
+                       *cursor++ |= 0x02;\r
+                       break;\r
+               case LACING_EBML:\r
+                       *cursor++ |= 0x06;\r
+                       break;\r
+               case LACING_FIXED:\r
+                       *cursor++ |= 0x04;\r
+                       break;\r
+               case LACING_NONE:\r
+                       break;\r
+           default:\r
+                       assert(0);\r
+               }\r
+\r
+               output.writeFully(BlockHead, 4 + ((TrackNumber > 0x80) ? 1 : 0));\r
+\r
+               binary tmpValue;\r
+               switch (mLacing)\r
+               {\r
+               case LACING_XIPH:\r
+                       // number of laces\r
+                       tmpValue = myBuffers.size()-1;\r
+                       output.writeFully(&tmpValue, 1);\r
+\r
+                       // set the size of each member in the lace\r
+                       for (i=0; i<myBuffers.size()-1; i++) {\r
+                               tmpValue = 0xFF;\r
+                               uint16 tmpSize = myBuffers[i]->Size();\r
+                               while (tmpSize >= 0xFF) {\r
+                                       output.writeFully(&tmpValue, 1);\r
+                                       SetSize_(GetSize() + 1);\r
+                                       tmpSize -= 0xFF;\r
+                               }\r
+                               tmpValue = binary(tmpSize);\r
+                               output.writeFully(&tmpValue, 1);\r
+                               SetSize_(GetSize() + 1);\r
+                       }\r
+                       break;\r
+               case LACING_EBML:\r
+                       // number of laces\r
+                       tmpValue = myBuffers.size()-1;\r
+                       output.writeFully(&tmpValue, 1);\r
+\r
+                       {\r
+                               int64 _Size;\r
+                               int _CodedSize;\r
+                               binary _FinalHead[8]; // 64 bits max coded size\r
+\r
+                               _Size = myBuffers[0]->Size();\r
+\r
+                               _CodedSize = CodedSizeLength(_Size, 0, IsFiniteSize());\r
+\r
+                               // first size in the lace is not a signed\r
+                               CodedValueLength(_Size, _CodedSize, _FinalHead);\r
+                               output.writeFully(_FinalHead, _CodedSize);\r
+                               SetSize_(GetSize() + _CodedSize);\r
+\r
+                               // set the size of each member in the lace\r
+                               for (i=1; i<myBuffers.size()-1; i++) {\r
+                                       _Size = int64(myBuffers[i]->Size()) - int64(myBuffers[i-1]->Size());\r
+                                       _CodedSize = CodedSizeLengthSigned(_Size, 0);\r
+                                       CodedValueLengthSigned(_Size, _CodedSize, _FinalHead);\r
+                                       output.writeFully(_FinalHead, _CodedSize);\r
+                                       SetSize_(GetSize() + _CodedSize);\r
+                               }\r
+                       }\r
+                       break;\r
+               case LACING_FIXED:\r
+                       // number of laces\r
+                       tmpValue = myBuffers.size()-1;\r
+                       output.writeFully(&tmpValue, 1);\r
+                       break;\r
+               case LACING_NONE:\r
+                       break;\r
+           default:\r
+                       assert(0);\r
+               }\r
+\r
+               // put the data of each frame\r
+               for (i=0; i<myBuffers.size(); i++) {\r
+                       output.writeFully(myBuffers[i]->Buffer(), myBuffers[i]->Size());\r
+                       SetSize_(GetSize() + myBuffers[i]->Size());\r
+               }\r
+       }\r
+\r
+       return GetSize();\r
+}\r
+\r
+uint64 KaxInternalBlock::ReadInternalHead(IOCallback & input)\r
+{\r
+       binary Buffer[5], *cursor = Buffer;\r
+       uint64 Result = input.read(cursor, 4);\r
+       if (Result != 4)\r
+               return Result;\r
+       \r
+       // update internal values\r
+       TrackNumber = *cursor++;\r
+       if ((TrackNumber & 0x80) == 0) {\r
+               // there is extra data\r
+               if ((TrackNumber & 0x40) == 0) {\r
+                       // We don't support track numbers that large !\r
+                       return Result;\r
+               }\r
+               Result += input.read(&Buffer[4], 1);\r
+               TrackNumber = (TrackNumber & 0x3F) << 8;\r
+               TrackNumber += *cursor++;\r
+       } else {\r
+               TrackNumber &= 0x7F;\r
+       }\r
+\r
+    \r
+       big_int16 b16;\r
+       b16.Eval(cursor);\r
+       assert(ParentCluster != NULL);\r
+       Timecode = ParentCluster->GetBlockGlobalTimecode(int16(b16));\r
+       bLocalTimecodeUsed = false;\r
+       cursor += 2;\r
+\r
+       return Result;\r
+}\r
+\r
+/*!\r
+       \todo better zero copy handling\r
+*/\r
+uint64 KaxInternalBlock::ReadData(IOCallback & input, ScopeMode ReadFully)\r
+{\r
+       uint64 Result;\r
+\r
+       FirstFrameLocation = input.getFilePointer(); // will be updated accordingly below\r
+\r
+       if (ReadFully == SCOPE_ALL_DATA)\r
+       {\r
+               Result = EbmlBinary::ReadData(input, ReadFully);\r
+               binary *cursor = GetData();\r
+               uint8 BlockHeadSize = 4;\r
+\r
+               // update internal values\r
+               TrackNumber = *cursor++;\r
+               if ((TrackNumber & 0x80) == 0) {\r
+                       // there is extra data\r
+                       if ((TrackNumber & 0x40) == 0) {\r
+                               // We don't support track numbers that large !\r
+                               return Result;\r
+                       }\r
+                       TrackNumber = (TrackNumber & 0x3F) << 8;\r
+                       TrackNumber += *cursor++;\r
+                       BlockHeadSize++;\r
+               } else {\r
+                       TrackNumber &= 0x7F;\r
+               }\r
+\r
+               big_int16 b16;\r
+               b16.Eval(cursor);\r
+               LocalTimecode = int16(b16);\r
+               bLocalTimecodeUsed = true;\r
+               cursor += 2;\r
+\r
+               if (EbmlId(*this) == EBML_ID(KaxSimpleBlock)) {\r
+                       bIsKeyframe = (*cursor & 0x80) != 0;\r
+                       bIsDiscardable = (*cursor & 0x01) != 0;\r
+               }\r
+               mInvisible = (*cursor & 0x08) >> 3;\r
+               mLacing = LacingType((*cursor++ & 0x06) >> 1);\r
+\r
+               // put all Frames in the list\r
+               if (mLacing == LACING_NONE) {\r
+                       FirstFrameLocation += cursor - GetData();\r
+                       DataBuffer * soloFrame = new DataBuffer(cursor, GetSize() - BlockHeadSize);\r
+                       myBuffers.push_back(soloFrame);\r
+                       SizeList.resize(1);\r
+                       SizeList[0] = GetSize() - BlockHeadSize;\r
+               } else {\r
+                       // read the number of frames in the lace\r
+                       uint32 LastBufferSize = GetSize() - BlockHeadSize - 1; // 1 for number of frame\r
+                       uint8 FrameNum = *cursor++; // number of frames in the lace - 1\r
+                       // read the list of frame sizes\r
+                       uint8 Index;\r
+                       int32 FrameSize;\r
+                       uint32 SizeRead;\r
+                       uint64 SizeUnknown;\r
+\r
+                       SizeList.resize(FrameNum + 1);\r
+\r
+                       switch (mLacing)\r
+                       {\r
+                       case LACING_XIPH:\r
+                               for (Index=0; Index<FrameNum; Index++) {\r
+                                       // get the size of the frame\r
+                                       FrameSize = 0;\r
+                                       do {\r
+                                               FrameSize += uint8(*cursor);\r
+                                               LastBufferSize--;\r
+                                       } while (*cursor++ == 0xFF);\r
+                                       SizeList[Index] = FrameSize;\r
+                                       LastBufferSize -= FrameSize;\r
+                               }\r
+                               SizeList[Index] = LastBufferSize;\r
+                               break;\r
+                       case LACING_EBML:\r
+                               SizeRead = LastBufferSize;\r
+                               FrameSize = ReadCodedSizeValue(cursor, SizeRead, SizeUnknown);\r
+                               SizeList[0] = FrameSize;\r
+                               cursor += SizeRead;\r
+                               LastBufferSize -= FrameSize + SizeRead;\r
+\r
+                               for (Index=1; Index<FrameNum; Index++) {\r
+                                       // get the size of the frame\r
+                                       SizeRead = LastBufferSize;\r
+                                       FrameSize += ReadCodedSizeSignedValue(cursor, SizeRead, SizeUnknown);\r
+                                       SizeList[Index] = FrameSize;\r
+                                       cursor += SizeRead;\r
+                                       LastBufferSize -= FrameSize + SizeRead;\r
+                               }\r
+                               SizeList[Index] = LastBufferSize;\r
+                               break;\r
+                       case LACING_FIXED:\r
+                               for (Index=0; Index<=FrameNum; Index++) {\r
+                                       // get the size of the frame\r
+                                       SizeList[Index] = LastBufferSize / (FrameNum + 1);\r
+                               }\r
+                               break;\r
+                       default: // other lacing not supported\r
+                               assert(0);\r
+                       }\r
+\r
+                       FirstFrameLocation += cursor - GetData();\r
+\r
+                       for (Index=0; Index<=FrameNum; Index++) {\r
+                               DataBuffer * lacedFrame = new DataBuffer(cursor, SizeList[Index]);\r
+                               myBuffers.push_back(lacedFrame);\r
+                               cursor += SizeList[Index];\r
+                       }\r
+               }\r
+               SetValueIsSet();\r
+       }\r
+       else if (ReadFully == SCOPE_PARTIAL_DATA)\r
+       {\r
+               binary _TempHead[5];\r
+               Result = input.read(_TempHead, 5);\r
+               binary *cursor = _TempHead;\r
+               binary *_tmpBuf;\r
+               uint8 BlockHeadSize = 4;\r
+\r
+               // update internal values\r
+               TrackNumber = *cursor++;\r
+               if ((TrackNumber & 0x80) == 0) {\r
+                       // there is extra data\r
+                       if ((TrackNumber & 0x40) == 0) {\r
+                               // We don't support track numbers that large !\r
+                               return Result;\r
+                       }\r
+                       TrackNumber = (TrackNumber & 0x3F) << 8;\r
+                       TrackNumber += *cursor++;\r
+                       BlockHeadSize++;\r
+               } else {\r
+                       TrackNumber &= 0x7F;\r
+               }\r
+\r
+               big_int16 b16;\r
+               b16.Eval(cursor);\r
+               LocalTimecode = int16(b16);\r
+               bLocalTimecodeUsed = true;\r
+               cursor += 2;\r
+\r
+               if (EbmlId(*this) == EBML_ID(KaxSimpleBlock)) {\r
+                       bIsKeyframe = (*cursor & 0x80) != 0;\r
+                       bIsDiscardable = (*cursor & 0x01) != 0;\r
+               }\r
+               mInvisible = (*cursor & 0x08) >> 3;\r
+               mLacing = LacingType((*cursor++ & 0x06) >> 1);\r
+               if (cursor == &_TempHead[4])\r
+               {\r
+                       _TempHead[0] = _TempHead[4];\r
+               } else {\r
+                       Result += input.read(_TempHead, 1);\r
+               }\r
+\r
+               FirstFrameLocation += cursor - _TempHead;\r
+\r
+               // put all Frames in the list\r
+               if (mLacing != LACING_NONE) {\r
+                       // read the number of frames in the lace\r
+                       uint32 LastBufferSize = GetSize() - BlockHeadSize - 1; // 1 for number of frame\r
+                       uint8 FrameNum = _TempHead[0]; // number of frames in the lace - 1\r
+                       // read the list of frame sizes\r
+                       uint8 Index;\r
+                       int32 FrameSize;\r
+                       uint32 SizeRead;\r
+                       uint64 SizeUnknown;\r
+\r
+                       SizeList.resize(FrameNum + 1);\r
+\r
+                       switch (mLacing)\r
+                       {\r
+                       case LACING_XIPH:\r
+                               for (Index=0; Index<FrameNum; Index++) {\r
+                                       // get the size of the frame\r
+                                       FrameSize = 0;\r
+                                       do {\r
+                                               Result += input.read(_TempHead, 1);\r
+                                               FrameSize += uint8(_TempHead[0]);\r
+                                               LastBufferSize--;\r
+\r
+                                               FirstFrameLocation++;\r
+                                       } while (_TempHead[0] == 0xFF);\r
+\r
+                                       FirstFrameLocation++;\r
+                                       SizeList[Index] = FrameSize;\r
+                                       LastBufferSize -= FrameSize;\r
+                               }\r
+                               SizeList[Index] = LastBufferSize;\r
+                               break;\r
+                       case LACING_EBML:\r
+                               SizeRead = LastBufferSize;\r
+                               cursor = _tmpBuf = new binary[FrameNum*4]; /// \warning assume the mean size will be coded in less than 4 bytes\r
+                               Result += input.read(cursor, FrameNum*4);\r
+                               FrameSize = ReadCodedSizeValue(cursor, SizeRead, SizeUnknown);\r
+                               SizeList[0] = FrameSize;\r
+                               cursor += SizeRead;\r
+                               LastBufferSize -= FrameSize + SizeRead;\r
+\r
+                               for (Index=1; Index<FrameNum; Index++) {\r
+                                       // get the size of the frame\r
+                                       SizeRead = LastBufferSize;\r
+                                       FrameSize += ReadCodedSizeSignedValue(cursor, SizeRead, SizeUnknown);\r
+                                       SizeList[Index] = FrameSize;\r
+                                       cursor += SizeRead;\r
+                                       LastBufferSize -= FrameSize + SizeRead;\r
+                               }\r
+\r
+                               FirstFrameLocation += cursor - _tmpBuf;\r
+\r
+                               SizeList[Index] = LastBufferSize;\r
+                               delete [] _tmpBuf;\r
+                               break;\r
+                       case LACING_FIXED:\r
+                               for (Index=0; Index<=FrameNum; Index++) {\r
+                                       // get the size of the frame\r
+                                       SizeList[Index] = LastBufferSize / (FrameNum + 1);\r
+                               }\r
+                               break;\r
+                       default: // other lacing not supported\r
+                               assert(0);\r
+                       }\r
+               } else {\r
+                       SizeList.resize(1);\r
+                       SizeList[0] = GetSize() - BlockHeadSize;\r
+               }\r
+               SetValueIsSet(false);\r
+               Result = GetSize();\r
+       } else {\r
+               SetValueIsSet(false);\r
+               Result = GetSize();\r
+       }\r
+\r
+       return Result;\r
+}\r
+\r
+bool KaxBlockGroup::AddFrame(const KaxTrackEntry & track, uint64 timecode, DataBuffer & buffer, LacingType lacing)\r
+{\r
+       KaxBlock & theBlock = GetChild<KaxBlock>(*this);\r
+       assert(ParentCluster != NULL);\r
+       theBlock.SetParent(*ParentCluster);\r
+       ParentTrack = &track;\r
+       return theBlock.AddFrame(track, timecode, buffer, lacing);\r
+}\r
+\r
+bool KaxBlockGroup::AddFrame(const KaxTrackEntry & track, uint64 timecode, DataBuffer & buffer, const KaxBlockGroup & PastBlock, LacingType lacing)\r
+{\r
+//     assert(past_timecode < 0);\r
+\r
+       KaxBlock & theBlock = GetChild<KaxBlock>(*this);\r
+       assert(ParentCluster != NULL);\r
+       theBlock.SetParent(*ParentCluster);\r
+       ParentTrack = &track;\r
+       bool bRes = theBlock.AddFrame(track, timecode, buffer, lacing);\r
+\r
+       KaxReferenceBlock & thePastRef = GetChild<KaxReferenceBlock>(*this);\r
+       thePastRef.SetReferencedBlock(PastBlock);\r
+       thePastRef.SetParentBlock(*this);\r
+\r
+       return bRes;\r
+}\r
+\r
+bool KaxBlockGroup::AddFrame(const KaxTrackEntry & track, uint64 timecode, DataBuffer & buffer, const KaxBlockGroup & PastBlock, const KaxBlockGroup & ForwBlock, LacingType lacing)\r
+{\r
+//     assert(past_timecode < 0);\r
+\r
+//     assert(forw_timecode > 0);\r
+       \r
+       KaxBlock & theBlock = GetChild<KaxBlock>(*this);\r
+       assert(ParentCluster != NULL);\r
+       theBlock.SetParent(*ParentCluster);\r
+       ParentTrack = &track;\r
+       bool bRes = theBlock.AddFrame(track, timecode, buffer, lacing);\r
+\r
+       KaxReferenceBlock & thePastRef = GetChild<KaxReferenceBlock>(*this);\r
+       thePastRef.SetReferencedBlock(PastBlock);\r
+       thePastRef.SetParentBlock(*this);\r
+\r
+       KaxReferenceBlock & theFutureRef = AddNewChild<KaxReferenceBlock>(*this);\r
+       theFutureRef.SetReferencedBlock(ForwBlock);\r
+       theFutureRef.SetParentBlock(*this);\r
+\r
+       return bRes;\r
+}\r
+\r
+bool KaxBlockGroup::AddFrame(const KaxTrackEntry & track, uint64 timecode, DataBuffer & buffer, const KaxBlockBlob * PastBlock, const KaxBlockBlob * ForwBlock, LacingType lacing)\r
+{\r
+       KaxBlock & theBlock = GetChild<KaxBlock>(*this);\r
+       assert(ParentCluster != NULL);\r
+       theBlock.SetParent(*ParentCluster);\r
+       ParentTrack = &track;\r
+       bool bRes = theBlock.AddFrame(track, timecode, buffer, lacing);\r
+\r
+       if (PastBlock != NULL)\r
+       {\r
+               KaxReferenceBlock & thePastRef = GetChild<KaxReferenceBlock>(*this);\r
+               thePastRef.SetReferencedBlock(PastBlock);\r
+               thePastRef.SetParentBlock(*this);\r
+       }\r
+\r
+       if (ForwBlock != NULL)\r
+       {\r
+               KaxReferenceBlock & theFutureRef = AddNewChild<KaxReferenceBlock>(*this);\r
+               theFutureRef.SetReferencedBlock(ForwBlock);\r
+               theFutureRef.SetParentBlock(*this);\r
+       }\r
+\r
+       return bRes;\r
+}\r
+\r
+/*!\r
+       \todo we may cache the reference to the timecode block\r
+*/\r
+uint64 KaxBlockGroup::GlobalTimecode() const\r
+{\r
+       assert(ParentCluster != NULL); // impossible otherwise\r
+       KaxInternalBlock & MyBlock = *static_cast<KaxBlock *>(this->FindElt(EBML_INFO(KaxBlock)));\r
+       return MyBlock.GlobalTimecode();\r
+\r
+}\r
+\r
+uint16 KaxBlockGroup::TrackNumber() const\r
+{\r
+       KaxInternalBlock & MyBlock = *static_cast<KaxBlock *>(this->FindElt(EBML_INFO(KaxBlock)));\r
+       return MyBlock.TrackNum();\r
+}\r
+\r
+uint64 KaxBlockGroup::ClusterPosition() const\r
+{\r
+       assert(ParentCluster != NULL); // impossible otherwise\r
+       return ParentCluster->GetPosition();\r
+}\r
+\r
+uint64 KaxInternalBlock::ClusterPosition() const\r
+{\r
+       assert(ParentCluster != NULL); // impossible otherwise\r
+       return ParentCluster->GetPosition();\r
+}\r
+\r
+unsigned int KaxBlockGroup::ReferenceCount() const\r
+{\r
+       unsigned int Result = 0;\r
+       KaxReferenceBlock * MyBlockAdds = static_cast<KaxReferenceBlock *>(FindFirstElt(EBML_INFO(KaxReferenceBlock)));\r
+       if (MyBlockAdds != NULL) {\r
+               Result++;\r
+               while ((MyBlockAdds = static_cast<KaxReferenceBlock *>(FindNextElt(*MyBlockAdds))) != NULL)\r
+               {\r
+                       Result++;\r
+               }\r
+       }\r
+       return Result;\r
+}\r
+\r
+const KaxReferenceBlock & KaxBlockGroup::Reference(unsigned int Index) const\r
+{\r
+       KaxReferenceBlock * MyBlockAdds = static_cast<KaxReferenceBlock *>(FindFirstElt(EBML_INFO(KaxReferenceBlock)));\r
+       assert(MyBlockAdds != NULL); // call of a non existing reference\r
+       \r
+       while (Index != 0) {\r
+               MyBlockAdds = static_cast<KaxReferenceBlock *>(FindNextElt(*MyBlockAdds));\r
+               assert(MyBlockAdds != NULL);\r
+               Index--;\r
+       }\r
+       return *MyBlockAdds;\r
+}\r
+\r
+void KaxBlockGroup::ReleaseFrames()\r
+{\r
+       KaxInternalBlock & MyBlock = *static_cast<KaxBlock *>(this->FindElt(EBML_INFO(KaxBlock)));\r
+       MyBlock.ReleaseFrames();\r
+}\r
+\r
+void KaxInternalBlock::ReleaseFrames()\r
+{\r
+       // free the allocated Frames\r
+       int i;\r
+       for (i=myBuffers.size()-1; i>=0; i--) {\r
+               if (myBuffers[i] != NULL) {\r
+                       myBuffers[i]->FreeBuffer(*myBuffers[i]);\r
+                       delete myBuffers[i];\r
+                       myBuffers[i] = NULL;\r
+               }\r
+       }\r
+}\r
+\r
+void KaxBlockGroup::SetBlockDuration(uint64 TimeLength)\r
+{\r
+       assert(ParentTrack != NULL);\r
+       int64 scale = ParentTrack->GlobalTimecodeScale();\r
+       KaxBlockDuration & myDuration = *static_cast<KaxBlockDuration *>(FindFirstElt(EBML_INFO(KaxBlockDuration), true));\r
+       *(static_cast<EbmlUInteger *>(&myDuration)) = TimeLength / uint64(scale);\r
+}\r
+\r
+bool KaxBlockGroup::GetBlockDuration(uint64 &TheTimecode) const\r
+{\r
+       KaxBlockDuration * myDuration = static_cast<KaxBlockDuration *>(FindElt(EBML_INFO(KaxBlockDuration)));\r
+       if (myDuration == NULL) {\r
+               return false;\r
+       }\r
+\r
+       assert(ParentTrack != NULL);\r
+       TheTimecode = uint64(*myDuration) * ParentTrack->GlobalTimecodeScale();\r
+       return true;\r
+}\r
+\r
+KaxBlockGroup::operator KaxInternalBlock &() {\r
+       KaxBlock & theBlock = GetChild<KaxBlock>(*this);\r
+       return theBlock;\r
+}\r
+\r
+void KaxBlockGroup::SetParent(KaxCluster & aParentCluster) {\r
+       ParentCluster = &aParentCluster;\r
+       KaxBlock & theBlock = GetChild<KaxBlock>(*this);\r
+       theBlock.SetParent( aParentCluster );\r
+}\r
+\r
+void KaxInternalBlock::SetParent(KaxCluster & aParentCluster)\r
+{\r
+       ParentCluster = &aParentCluster;\r
+       if (bLocalTimecodeUsed) {\r
+               Timecode = aParentCluster.GetBlockGlobalTimecode(LocalTimecode);\r
+               bLocalTimecodeUsed = false;\r
+       }\r
+}\r
+\r
+int64 KaxInternalBlock::GetDataPosition(size_t FrameNumber)\r
+{\r
+       int64 _Result = -1;\r
+\r
+       if (ValueIsSet() && FrameNumber < SizeList.size())\r
+       {\r
+               _Result = FirstFrameLocation;\r
+       \r
+               size_t _Idx = 0;\r
+               while(FrameNumber--)\r
+               {\r
+                       _Result += SizeList[_Idx++];\r
+               }\r
+       }\r
+\r
+       return _Result;\r
+}\r
+\r
+int64 KaxInternalBlock::GetFrameSize(size_t FrameNumber)\r
+{\r
+       int64 _Result = -1;\r
+\r
+       if (/*bValueIsSet &&*/ FrameNumber < SizeList.size())\r
+       {\r
+               _Result = SizeList[FrameNumber];\r
+       }\r
+\r
+       return _Result;\r
+}\r
+\r
+KaxBlockBlob::operator KaxBlockGroup &()\r
+{\r
+       assert(!bUseSimpleBlock);\r
+       assert(Block.group);\r
+       return *Block.group;\r
+}\r
+\r
+KaxBlockBlob::operator const KaxBlockGroup &() const\r
+{\r
+       assert(!bUseSimpleBlock);\r
+       assert(Block.group);\r
+       return *Block.group;\r
+}\r
+\r
+KaxBlockBlob::operator KaxInternalBlock &()\r
+{\r
+       assert(Block.group);\r
+#if MATROSKA_VERSION >= 2\r
+       if (bUseSimpleBlock)\r
+               return *Block.simpleblock;\r
+       else\r
+#endif\r
+               return *Block.group;\r
+}\r
+\r
+KaxBlockBlob::operator const KaxInternalBlock &() const\r
+{\r
+       assert(Block.group);\r
+#if MATROSKA_VERSION >= 2\r
+       if (bUseSimpleBlock)\r
+               return *Block.simpleblock;\r
+       else\r
+#endif\r
+               return *Block.group;\r
+}\r
+\r
+#if MATROSKA_VERSION >= 2\r
+KaxBlockBlob::operator KaxSimpleBlock &()\r
+{\r
+       assert(bUseSimpleBlock);\r
+       assert(Block.simpleblock);\r
+       return *Block.simpleblock;\r
+}\r
+#endif\r
+\r
+bool KaxBlockBlob::AddFrameAuto(const KaxTrackEntry & track, uint64 timecode, DataBuffer & buffer, LacingType lacing, const KaxBlockBlob * PastBlock, const KaxBlockBlob * ForwBlock)\r
+{\r
+       bool bResult = false;\r
+#if MATROSKA_VERSION >= 2\r
+       if ((SimpleBlockMode == BLOCK_BLOB_ALWAYS_SIMPLE) || (SimpleBlockMode == BLOCK_BLOB_SIMPLE_AUTO && PastBlock == NULL && ForwBlock == NULL)) {\r
+               assert(bUseSimpleBlock == true);\r
+               if (Block.simpleblock == NULL) {\r
+                       Block.simpleblock = new KaxSimpleBlock();\r
+                       Block.simpleblock->SetParent(*ParentCluster);\r
+               }\r
+\r
+               bResult = Block.simpleblock->AddFrame(track, timecode, buffer, lacing);\r
+               if (PastBlock == NULL && ForwBlock == NULL) {\r
+                       Block.simpleblock->SetKeyframe(true);\r
+                       Block.simpleblock->SetDiscardable(false);\r
+               } else {\r
+                       Block.simpleblock->SetKeyframe(false);\r
+                       if ((ForwBlock == NULL || ((const KaxInternalBlock &)*ForwBlock).GlobalTimecode() <= timecode) &&\r
+                               (PastBlock == NULL || ((const KaxInternalBlock &)*PastBlock).GlobalTimecode() <= timecode))\r
+                               Block.simpleblock->SetDiscardable(false);\r
+                       else\r
+                               Block.simpleblock->SetDiscardable(true);\r
+               }\r
+       }\r
+       else\r
+#endif\r
+       {\r
+               if (ReplaceSimpleByGroup()) {\r
+                       bResult = Block.group->AddFrame(track, timecode, buffer, PastBlock, ForwBlock, lacing);\r
+               }\r
+       }\r
+\r
+       return bResult;\r
+}\r
+\r
+void KaxBlockBlob::SetParent(KaxCluster & parent_clust)\r
+{\r
+       ParentCluster = &parent_clust;\r
+}\r
+\r
+void KaxBlockBlob::SetBlockDuration(uint64 TimeLength)\r
+{\r
+       if (ReplaceSimpleByGroup())\r
+               Block.group->SetBlockDuration(TimeLength);\r
+}\r
+\r
+bool KaxBlockBlob::ReplaceSimpleByGroup()\r
+{\r
+       if (SimpleBlockMode== BLOCK_BLOB_ALWAYS_SIMPLE)\r
+               return false;\r
+\r
+       if (!bUseSimpleBlock) {\r
+               if (Block.group == NULL) {\r
+                       Block.group = new KaxBlockGroup();\r
+               }\r
+       }\r
+#if MATROSKA_VERSION >= 2\r
+       else \r
+       {\r
+\r
+               if (Block.simpleblock != NULL) {\r
+                       KaxSimpleBlock *old_simpleblock = Block.simpleblock;\r
+                       Block.group = new KaxBlockGroup();\r
+                       // _TODO_ : move all the data to the blockgroup\r
+                       assert(false);\r
+                       // -> while(frame) AddFrame(myBuffer)\r
+                       delete old_simpleblock;\r
+               } else {\r
+                       Block.group = new KaxBlockGroup();\r
+               }\r
+       }\r
+#endif\r
+       if (ParentCluster != NULL)\r
+               Block.group->SetParent(*ParentCluster);\r
+\r
+       bUseSimpleBlock = false;\r
+       return true;\r
+}\r
+\r
+void KaxBlockBlob::SetBlockGroup( KaxBlockGroup &BlockRef )\r
+{\r
+       assert(!bUseSimpleBlock);\r
+       Block.group = &BlockRef;\r
+}\r
+\r
+END_LIBMATROSKA_NAMESPACE\r
index a66b793affc3fe3e1204ef65eeeae780efe17e20..31533b86bdee3d56507a226e2c70bd6bad02b23a 100644 (file)
-/****************************************************************************
-** libmatroska : parse Matroska files, see http://www.matroska.org/
-**
-** <file/class description>
-**
-** Copyright (C) 2002-2005 Steve Lhomme.  All rights reserved.
-**
-** This library is free software; you can redistribute it and/or
-** modify it under the terms of the GNU Lesser General Public
-** License as published by the Free Software Foundation; either
-** version 2.1 of the License, or (at your option) any later version.
-** 
-** This library is distributed in the hope that it will be useful,
-** but WITHOUT ANY WARRANTY; without even the implied warranty of
-** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-** Lesser General Public License for more details.
-** 
-** You should have received a copy of the GNU Lesser General Public
-** License along with this library; if not, write to the Free Software
-** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-**
-** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**
-** Contact license@matroska.org if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-/*!
-       \file
-       \version \$Id: KaxBlockData.cpp 1226 2005-10-13 21:16:43Z robux4 $
-       \author Steve Lhomme     <robux4 @ users.sf.net>
-*/
-#include <cassert>
-
-#include "matroska/KaxBlockData.h"
-#include "matroska/KaxContexts.h"
-#include "matroska/KaxBlock.h"
-
-using namespace LIBEBML_NAMESPACE;
-
-START_LIBMATROSKA_NAMESPACE
-
-const EbmlSemantic KaxSlices_ContextList[1] =
-{
-       EbmlSemantic(false, false,  EBML_INFO(KaxTimeSlice)),
-};
-
-const EbmlSemantic KaxTimeSlice_ContextList[5] =
-{
-       EbmlSemantic(false, true,  EBML_INFO(KaxSliceLaceNumber)),
-       EbmlSemantic(false, true,  EBML_INFO(KaxSliceFrameNumber)),
-       EbmlSemantic(false, true,  EBML_INFO(KaxSliceBlockAddID)),
-       EbmlSemantic(false, true,  EBML_INFO(KaxSliceDelay)),
-       EbmlSemantic(false, true,  EBML_INFO(KaxSliceDuration)),
-};
-
-EbmlId KaxReferencePriority_TheId(0xFA, 1);
-EbmlId KaxReferenceBlock_TheId   (0xFB, 1);
-EbmlId KaxSlices_TheId           (0x8E, 1);
-EbmlId KaxTimeSlice_TheId        (0xE8, 1);
-EbmlId KaxSliceLaceNumber_TheId  (0xCC, 1);
-EbmlId KaxSliceFrameNumber_TheId (0xCD, 1);
-EbmlId KaxSliceBlockAddID_TheId  (0xCB, 1);
-EbmlId KaxSliceDelay_TheId       (0xCE, 1);
-EbmlId KaxSliceDuration_TheId    (0xCF, 1);
-#if MATROSKA_VERSION >= 2
-EbmlId KaxReferenceVirtual_TheId (0xFD, 1);
-#endif // MATROSKA_VERSION
-
-const EbmlSemanticContext KaxReferencePriority_Context = EbmlSemanticContext(0, NULL, &KaxBlockGroup_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxReferencePriority));
-const EbmlSemanticContext KaxReferenceBlock_Context = EbmlSemanticContext(0, NULL, &KaxBlockGroup_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxReferenceBlock));
-const EbmlSemanticContext KaxSlices_Context = EbmlSemanticContext(countof(KaxSlices_ContextList), KaxSlices_ContextList, &KaxBlockGroup_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxSlices));
-const EbmlSemanticContext KaxTimeSlice_Context = EbmlSemanticContext(countof(KaxTimeSlice_ContextList), KaxTimeSlice_ContextList, &KaxSlices_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTimeSlice));
-const EbmlSemanticContext KaxSliceLaceNumber_Context = EbmlSemanticContext(0, NULL, &KaxTimeSlice_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxSliceLaceNumber));
-const EbmlSemanticContext KaxSliceFrameNumber_Context = EbmlSemanticContext(0, NULL, &KaxTimeSlice_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxSliceFrameNumber));
-const EbmlSemanticContext KaxSliceBlockAddID_Context = EbmlSemanticContext(0, NULL, &KaxTimeSlice_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxSliceBlockAddID));
-const EbmlSemanticContext KaxSliceDelay_Context = EbmlSemanticContext(0, NULL, &KaxTimeSlice_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxSliceDelay));
-const EbmlSemanticContext KaxSliceDuration_Context = EbmlSemanticContext(0, NULL, &KaxTimeSlice_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxSliceDuration));
-#if MATROSKA_VERSION >= 2
-const EbmlSemanticContext KaxReferenceVirtual_Context = EbmlSemanticContext(0, NULL, &KaxBlockGroup_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxReferenceVirtual));
-#endif // MATROSKA_VERSION
-
-const EbmlCallbacks KaxReferencePriority::ClassInfos(KaxReferencePriority::Create, KaxReferencePriority_TheId, "FlagReferenced", KaxReferencePriority_Context);
-const EbmlCallbacks KaxReferenceBlock::ClassInfos(KaxReferenceBlock::Create, KaxReferenceBlock_TheId, "ReferenceBlock", KaxReferenceBlock_Context);
-const EbmlCallbacks KaxSlices::ClassInfos(KaxSlices::Create, KaxSlices_TheId, "Slices", KaxSlices_Context);
-const EbmlCallbacks KaxTimeSlice::ClassInfos(KaxTimeSlice::Create, KaxTimeSlice_TheId, "TimeSlice", KaxTimeSlice_Context);
-const EbmlCallbacks KaxSliceLaceNumber::ClassInfos(KaxSliceLaceNumber::Create, KaxSliceLaceNumber_TheId, "SliceLaceNumber", KaxSliceLaceNumber_Context);
-const EbmlCallbacks KaxSliceFrameNumber::ClassInfos(KaxSliceFrameNumber::Create, KaxSliceFrameNumber_TheId, "SliceFrameNumber", KaxSliceFrameNumber_Context);
-const EbmlCallbacks KaxSliceBlockAddID::ClassInfos(KaxSliceBlockAddID::Create, KaxSliceBlockAddID_TheId, "SliceBlockAddID", KaxSliceBlockAddID_Context);
-const EbmlCallbacks KaxSliceDelay::ClassInfos(KaxSliceDelay::Create, KaxSliceDelay_TheId, "SliceDelay", KaxSliceDelay_Context);
-const EbmlCallbacks KaxSliceDuration::ClassInfos(KaxSliceDuration::Create, KaxSliceDuration_TheId, "SliceDuration", KaxSliceDuration_Context);
-#if MATROSKA_VERSION >= 2
-const EbmlCallbacks KaxReferenceVirtual::ClassInfos(KaxReferenceVirtual::Create, KaxReferenceVirtual_TheId, "ReferenceVirtual", KaxReferenceVirtual_Context);
-#endif // MATROSKA_VERSION
-
-KaxSlices::KaxSlices()
- :EbmlMaster(KaxSlices_Context)
-{}
-
-KaxTimeSlice::KaxTimeSlice()
- :EbmlMaster(KaxTimeSlice_Context)
-{}
-
-const KaxBlockBlob & KaxReferenceBlock::RefBlock() const
-{
-       assert(RefdBlock != NULL);
-       return *RefdBlock;
-}
-
-uint64 KaxReferenceBlock::UpdateSize(bool bSaveDefault, bool bForceRender)
-{
-       if (!bTimecodeSet) {
-               assert(RefdBlock != NULL);
-               assert(ParentBlock != NULL);
-
-               const KaxInternalBlock &block = *RefdBlock;
-               *static_cast<EbmlSInteger*>(this) = (int64(block.GlobalTimecode()) - int64(ParentBlock->GlobalTimecode())) / int64(ParentBlock->GlobalTimecodeScale());
-       }
-       return EbmlSInteger::UpdateSize(bSaveDefault, bForceRender);
-}
-
-void KaxReferenceBlock::SetReferencedBlock(const KaxBlockBlob * aRefdBlock)
-{
-       assert(RefdBlock == NULL);
-       assert(aRefdBlock != NULL);
-       RefdBlock = aRefdBlock; 
-       SetValueIsSet();
-}
-
-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; 
-       SetValueIsSet();
-}
-
-END_LIBMATROSKA_NAMESPACE
+/****************************************************************************\r
+** libmatroska : parse Matroska files, see http://www.matroska.org/\r
+**\r
+** <file/class description>\r
+**\r
+** Copyright (C) 2002-2010 Steve Lhomme.  All rights reserved.\r
+**\r
+** This library is free software; you can redistribute it and/or\r
+** modify it under the terms of the GNU Lesser General Public\r
+** License as published by the Free Software Foundation; either\r
+** version 2.1 of the License, or (at your option) any later version.\r
+** \r
+** This library is distributed in the hope that it will be useful,\r
+** but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
+** Lesser General Public License for more details.\r
+** \r
+** You should have received a copy of the GNU Lesser General Public\r
+** License along with this library; if not, write to the Free Software\r
+** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\r
+**\r
+** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**\r
+** Contact license@matroska.org if any conditions of this licensing are\r
+** not clear to you.\r
+**\r
+**********************************************************************/\r
+\r
+/*!\r
+       \file\r
+       \version \$Id: KaxBlockData.cpp 1226 2005-10-13 21:16:43Z robux4 $\r
+       \author Steve Lhomme     <robux4 @ users.sf.net>\r
+*/\r
+#include <cassert>\r
+\r
+#include "matroska/KaxBlockData.h"\r
+#include "matroska/KaxContexts.h"\r
+#include "matroska/KaxBlock.h"\r
+\r
+using namespace LIBEBML_NAMESPACE;\r
+\r
+START_LIBMATROSKA_NAMESPACE\r
+\r
+const EbmlSemantic KaxSlices_ContextList[1] =\r
+{\r
+       EbmlSemantic(false, false,  EBML_INFO(KaxTimeSlice)),\r
+};\r
+\r
+const EbmlSemantic KaxTimeSlice_ContextList[5] =\r
+{\r
+       EbmlSemantic(false, true,  EBML_INFO(KaxSliceLaceNumber)),\r
+       EbmlSemantic(false, true,  EBML_INFO(KaxSliceFrameNumber)),\r
+       EbmlSemantic(false, true,  EBML_INFO(KaxSliceBlockAddID)),\r
+       EbmlSemantic(false, true,  EBML_INFO(KaxSliceDelay)),\r
+       EbmlSemantic(false, true,  EBML_INFO(KaxSliceDuration)),\r
+};\r
+\r
+EbmlId KaxReferencePriority_TheId(0xFA, 1);\r
+EbmlId KaxReferenceBlock_TheId   (0xFB, 1);\r
+EbmlId KaxSlices_TheId           (0x8E, 1);\r
+EbmlId KaxTimeSlice_TheId        (0xE8, 1);\r
+EbmlId KaxSliceLaceNumber_TheId  (0xCC, 1);\r
+EbmlId KaxSliceFrameNumber_TheId (0xCD, 1);\r
+EbmlId KaxSliceBlockAddID_TheId  (0xCB, 1);\r
+EbmlId KaxSliceDelay_TheId       (0xCE, 1);\r
+EbmlId KaxSliceDuration_TheId    (0xCF, 1);\r
+#if MATROSKA_VERSION >= 2\r
+EbmlId KaxReferenceVirtual_TheId (0xFD, 1);\r
+#endif // MATROSKA_VERSION\r
+\r
+const EbmlSemanticContext KaxReferencePriority_Context = EbmlSemanticContext(0, NULL, &KaxBlockGroup_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxReferencePriority));\r
+const EbmlSemanticContext KaxReferenceBlock_Context = EbmlSemanticContext(0, NULL, &KaxBlockGroup_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxReferenceBlock));\r
+const EbmlSemanticContext KaxSlices_Context = EbmlSemanticContext(countof(KaxSlices_ContextList), KaxSlices_ContextList, &KaxBlockGroup_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxSlices));\r
+const EbmlSemanticContext KaxTimeSlice_Context = EbmlSemanticContext(countof(KaxTimeSlice_ContextList), KaxTimeSlice_ContextList, &KaxSlices_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTimeSlice));\r
+const EbmlSemanticContext KaxSliceLaceNumber_Context = EbmlSemanticContext(0, NULL, &KaxTimeSlice_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxSliceLaceNumber));\r
+const EbmlSemanticContext KaxSliceFrameNumber_Context = EbmlSemanticContext(0, NULL, &KaxTimeSlice_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxSliceFrameNumber));\r
+const EbmlSemanticContext KaxSliceBlockAddID_Context = EbmlSemanticContext(0, NULL, &KaxTimeSlice_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxSliceBlockAddID));\r
+const EbmlSemanticContext KaxSliceDelay_Context = EbmlSemanticContext(0, NULL, &KaxTimeSlice_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxSliceDelay));\r
+const EbmlSemanticContext KaxSliceDuration_Context = EbmlSemanticContext(0, NULL, &KaxTimeSlice_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxSliceDuration));\r
+#if MATROSKA_VERSION >= 2\r
+const EbmlSemanticContext KaxReferenceVirtual_Context = EbmlSemanticContext(0, NULL, &KaxBlockGroup_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxReferenceVirtual));\r
+#endif // MATROSKA_VERSION\r
+\r
+const EbmlCallbacks KaxReferencePriority::ClassInfos(KaxReferencePriority::Create, KaxReferencePriority_TheId, "FlagReferenced", KaxReferencePriority_Context);\r
+const EbmlCallbacks KaxReferenceBlock::ClassInfos(KaxReferenceBlock::Create, KaxReferenceBlock_TheId, "ReferenceBlock", KaxReferenceBlock_Context);\r
+const EbmlCallbacks KaxSlices::ClassInfos(KaxSlices::Create, KaxSlices_TheId, "Slices", KaxSlices_Context);\r
+const EbmlCallbacks KaxTimeSlice::ClassInfos(KaxTimeSlice::Create, KaxTimeSlice_TheId, "TimeSlice", KaxTimeSlice_Context);\r
+const EbmlCallbacks KaxSliceLaceNumber::ClassInfos(KaxSliceLaceNumber::Create, KaxSliceLaceNumber_TheId, "SliceLaceNumber", KaxSliceLaceNumber_Context);\r
+const EbmlCallbacks KaxSliceFrameNumber::ClassInfos(KaxSliceFrameNumber::Create, KaxSliceFrameNumber_TheId, "SliceFrameNumber", KaxSliceFrameNumber_Context);\r
+const EbmlCallbacks KaxSliceBlockAddID::ClassInfos(KaxSliceBlockAddID::Create, KaxSliceBlockAddID_TheId, "SliceBlockAddID", KaxSliceBlockAddID_Context);\r
+const EbmlCallbacks KaxSliceDelay::ClassInfos(KaxSliceDelay::Create, KaxSliceDelay_TheId, "SliceDelay", KaxSliceDelay_Context);\r
+const EbmlCallbacks KaxSliceDuration::ClassInfos(KaxSliceDuration::Create, KaxSliceDuration_TheId, "SliceDuration", KaxSliceDuration_Context);\r
+#if MATROSKA_VERSION >= 2\r
+const EbmlCallbacks KaxReferenceVirtual::ClassInfos(KaxReferenceVirtual::Create, KaxReferenceVirtual_TheId, "ReferenceVirtual", KaxReferenceVirtual_Context);\r
+#endif // MATROSKA_VERSION\r
+\r
+KaxSlices::KaxSlices()\r
+ :EbmlMaster(KaxSlices_Context)\r
+{}\r
+\r
+KaxTimeSlice::KaxTimeSlice()\r
+ :EbmlMaster(KaxTimeSlice_Context)\r
+{}\r
+\r
+const KaxBlockBlob & KaxReferenceBlock::RefBlock() const\r
+{\r
+       assert(RefdBlock != NULL);\r
+       return *RefdBlock;\r
+}\r
+\r
+uint64 KaxReferenceBlock::UpdateSize(bool bSaveDefault, bool bForceRender)\r
+{\r
+       if (!bTimecodeSet) {\r
+               assert(RefdBlock != NULL);\r
+               assert(ParentBlock != NULL);\r
+\r
+               const KaxInternalBlock &block = *RefdBlock;\r
+               *static_cast<EbmlSInteger*>(this) = (int64(block.GlobalTimecode()) - int64(ParentBlock->GlobalTimecode())) / int64(ParentBlock->GlobalTimecodeScale());\r
+       }\r
+       return EbmlSInteger::UpdateSize(bSaveDefault, bForceRender);\r
+}\r
+\r
+void KaxReferenceBlock::SetReferencedBlock(const KaxBlockBlob * aRefdBlock)\r
+{\r
+       assert(RefdBlock == NULL);\r
+       assert(aRefdBlock != NULL);\r
+       RefdBlock = aRefdBlock; \r
+       SetValueIsSet();\r
+}\r
+\r
+void KaxReferenceBlock::SetReferencedBlock(const KaxBlockGroup & aRefdBlock)\r
+{\r
+       KaxBlockBlob *block_blob = new KaxBlockBlob(BLOCK_BLOB_NO_SIMPLE);\r
+       block_blob->SetBlockGroup(*const_cast<KaxBlockGroup*>(&aRefdBlock));\r
+       RefdBlock = block_blob; \r
+       SetValueIsSet();\r
+}\r
+\r
+END_LIBMATROSKA_NAMESPACE\r
index 7281b2a017eebd3d4c98cdbb4a45249dd9c29c5c..e9933abf12eaf0f3199a2bec95d86ca6aebe6543 100644 (file)
-/****************************************************************************
-** libmatroska : parse Matroska files, see http://www.matroska.org/
-**
-** <file/class description>
-**
-** Copyright (C) 2002-2005 Steve Lhomme.  All rights reserved.
-**
-** This file is part of libmatroska.
-**
-** This library is free software; you can redistribute it and/or
-** modify it under the terms of the GNU Lesser General Public
-** License as published by the Free Software Foundation; either
-** version 2.1 of the License, or (at your option) any later version.
-** 
-** This library is distributed in the hope that it will be useful,
-** but WITHOUT ANY WARRANTY; without even the implied warranty of
-** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-** Lesser General Public License for more details.
-** 
-** You should have received a copy of the GNU Lesser General Public
-** License along with this library; if not, write to the Free Software
-** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-**
-** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**
-** Contact license@matroska.org if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-/*!
-       \file
-       \version \$Id: KaxChapters.cpp 1201 2005-08-30 14:28:27Z robux4 $
-       \author Steve Lhomme     <robux4 @ users.sf.net>
-*/
-#include "matroska/KaxChapters.h"
-#include "matroska/KaxContexts.h"
-
-// sub elements
-START_LIBMATROSKA_NAMESPACE
-
-EbmlSemantic KaxChapters_ContextList[1] =
-{
-    EbmlSemantic(true, false,  EBML_INFO(KaxEditionEntry)),
-};
-
-EbmlSemantic KaxEditionEntry_ContextList[5] =
-{
-    EbmlSemantic(false, true , EBML_INFO(KaxEditionUID)),
-    EbmlSemantic(true , true , EBML_INFO(KaxEditionFlagHidden)),
-    EbmlSemantic(true , true , EBML_INFO(KaxEditionFlagDefault)),
-    EbmlSemantic(false, true , EBML_INFO(KaxEditionFlagOrdered)),
-    EbmlSemantic(true , false, EBML_INFO(KaxChapterAtom)),
-};
-
-EbmlSemantic KaxChapterAtom_ContextList[12] =
-{
-    EbmlSemantic(false, false, EBML_INFO(KaxChapterAtom)),
-    EbmlSemantic(true,  true,  EBML_INFO(KaxChapterUID)),
-    EbmlSemantic(true,  true,  EBML_INFO(KaxChapterTimeStart)),
-    EbmlSemantic(false, true,  EBML_INFO(KaxChapterTimeEnd)),
-    EbmlSemantic(true , true,  EBML_INFO(KaxChapterFlagHidden)),
-    EbmlSemantic(true , true,  EBML_INFO(KaxChapterFlagEnabled)),
-    EbmlSemantic(false, true,  EBML_INFO(KaxChapterSegmentUID)),
-    EbmlSemantic(false, true,  EBML_INFO(KaxChapterSegmentEditionUID)),
-    EbmlSemantic(false, true,  EBML_INFO(KaxChapterPhysicalEquiv)),
-    EbmlSemantic(false, true,  EBML_INFO(KaxChapterTrack)),
-    EbmlSemantic(false, false, EBML_INFO(KaxChapterDisplay)),
-    EbmlSemantic(false, false, EBML_INFO(KaxChapterProcess)),
-};
-
-EbmlSemantic KaxChapterTrack_ContextList[1] =
-{
-    EbmlSemantic(true, false, EBML_INFO(KaxChapterTrackNumber)),
-};
-
-EbmlSemantic KaxChapterDisplay_ContextList[3] =
-{
-    EbmlSemantic(true,  true,  EBML_INFO(KaxChapterString)),
-    EbmlSemantic(true,  false, EBML_INFO(KaxChapterLanguage)),
-    EbmlSemantic(false, false, EBML_INFO(KaxChapterCountry)),
-};
-
-EbmlSemantic KaxChapterProcess_ContextList[3] =
-{
-    EbmlSemantic(true,  true,  EBML_INFO(KaxChapterProcessCodecID)),
-    EbmlSemantic(false, true,  EBML_INFO(KaxChapterProcessPrivate)),
-    EbmlSemantic(false, false, EBML_INFO(KaxChapterProcessCommand)),
-};
-
-EbmlSemantic KaxChapterProcessCommand_ContextList[2] =
-{
-    EbmlSemantic(true,  true,  EBML_INFO(KaxChapterProcessTime)),
-    EbmlSemantic(true,  true,  EBML_INFO(KaxChapterProcessData)),
-};
-
-const EbmlSemanticContext KaxChapters_Context = EbmlSemanticContext(countof(KaxChapters_ContextList), KaxChapters_ContextList, &KaxSegment_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxChapters));
-const EbmlSemanticContext KaxEditionEntry_Context = EbmlSemanticContext(countof(KaxEditionEntry_ContextList), KaxEditionEntry_ContextList, &KaxChapters_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxEditionEntry));
-const EbmlSemanticContext KaxEditionUID_Context = EbmlSemanticContext(0, NULL, &KaxEditionEntry_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxEditionUID));
-const EbmlSemanticContext KaxEditionFlagHidden_Context = EbmlSemanticContext(0, NULL, &KaxEditionEntry_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxEditionFlagHidden));
-const EbmlSemanticContext KaxEditionFlagDefault_Context = EbmlSemanticContext(0, NULL, &KaxEditionEntry_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxEditionFlagDefault));
-const EbmlSemanticContext KaxEditionFlagOrdered_Context = EbmlSemanticContext(0, NULL, &KaxEditionEntry_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxEditionFlagOrdered));
-const EbmlSemanticContext KaxChapterAtom_Context = EbmlSemanticContext(countof(KaxChapterAtom_ContextList), KaxChapterAtom_ContextList, &KaxEditionEntry_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxChapterAtom));
-const EbmlSemanticContext KaxChapterTrack_Context = EbmlSemanticContext(countof(KaxChapterTrack_ContextList), KaxChapterTrack_ContextList, &KaxChapterAtom_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxChapterTrack));
-const EbmlSemanticContext KaxChapterDisplay_Context = EbmlSemanticContext(countof(KaxChapterDisplay_ContextList), KaxChapterDisplay_ContextList, &KaxChapterAtom_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxChapterDisplay));
-const EbmlSemanticContext KaxChapterUID_Context = EbmlSemanticContext(0, NULL, &KaxChapterAtom_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxChapterUID));
-const EbmlSemanticContext KaxChapterTimeStart_Context = EbmlSemanticContext(0, NULL, &KaxChapterAtom_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxChapterTimeStart));
-const EbmlSemanticContext KaxChapterTimeEnd_Context = EbmlSemanticContext(0, NULL, &KaxChapterAtom_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxChapterTimeEnd));
-const EbmlSemanticContext KaxChapterFlagHidden_Context = EbmlSemanticContext(0, NULL, &KaxChapterAtom_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxChapterFlagHidden));
-const EbmlSemanticContext KaxChapterFlagEnabled_Context = EbmlSemanticContext(0, NULL, &KaxChapterAtom_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxChapterFlagEnabled));
-const EbmlSemanticContext KaxChapterSegmentUID_Context = EbmlSemanticContext(0, NULL, &KaxChapterAtom_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxChapterSegmentUID));
-const EbmlSemanticContext KaxChapterSegmentEditionUID_Context = EbmlSemanticContext(0, NULL, &KaxChapterAtom_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxChapterSegmentEditionUID));
-const EbmlSemanticContext KaxChapterPhysicalEquiv_Context = EbmlSemanticContext(0, NULL, &KaxChapterAtom_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxChapterPhysicalEquiv));
-const EbmlSemanticContext KaxChapterTrackNumber_Context = EbmlSemanticContext(0, NULL, &KaxChapterTrack_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxChapterTrackNumber));
-const EbmlSemanticContext KaxChapterString_Context = EbmlSemanticContext(0, NULL, &KaxChapterDisplay_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxChapterString));
-const EbmlSemanticContext KaxChapterLanguage_Context = EbmlSemanticContext(0, NULL, &KaxChapterLanguage_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxChapterLanguage));
-const EbmlSemanticContext KaxChapterCountry_Context = EbmlSemanticContext(0, NULL, &KaxChapterCountry_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxChapterCountry));
-const EbmlSemanticContext KaxChapterProcess_Context = EbmlSemanticContext(countof(KaxChapterProcess_ContextList), KaxChapterProcess_ContextList, &KaxChapterAtom_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxChapterProcess));
-const EbmlSemanticContext KaxChapterProcessCodecID_Context = EbmlSemanticContext(0, NULL, &KaxChapterProcess_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxChapterProcessCodecID));
-const EbmlSemanticContext KaxChapterProcessPrivate_Context = EbmlSemanticContext(0, NULL, &KaxChapterProcess_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxChapterProcessPrivate));
-const EbmlSemanticContext KaxChapterProcessCommand_Context = EbmlSemanticContext(countof(KaxChapterProcessCommand_ContextList), KaxChapterProcessCommand_ContextList, &KaxChapterProcess_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxChapterProcessCommand));
-const EbmlSemanticContext KaxChapterProcessTime_Context = EbmlSemanticContext(0, NULL, &KaxChapterProcessCommand_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxChapterProcessTime));
-const EbmlSemanticContext KaxChapterProcessData_Context = EbmlSemanticContext(0, NULL, &KaxChapterProcessCommand_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxChapterProcessData));
-
-EbmlId KaxChapters_TheId               (0x1043A770, 4);
-EbmlId KaxEditionEntry_TheId           (0x45B9, 2);
-EbmlId KaxEditionUID_TheId             (0x45BC, 2);
-EbmlId KaxEditionFlagHidden_TheId      (0x45BD, 2);
-EbmlId KaxEditionFlagDefault_TheId     (0x45DB, 2);
-EbmlId KaxEditionFlagOrdered_TheId     (0x45DD, 2);
-EbmlId KaxChapterAtom_TheId            (0xB6, 1);
-EbmlId KaxChapterUID_TheId             (0x73C4, 2);
-EbmlId KaxChapterTimeStart_TheId       (0x91, 1);
-EbmlId KaxChapterTimeEnd_TheId         (0x92, 1);
-EbmlId KaxChapterFlagHidden_TheId      (0x98, 1);
-EbmlId KaxChapterFlagEnabled_TheId     (0x4598, 2);
-EbmlId KaxChapterSegmentUID_TheId      (0x6E67, 2);
-EbmlId KaxChapterSegmentEditionUID_TheId(0x6EBC, 2);
-EbmlId KaxChapterPhysicalEquiv_TheId   (0x63C3, 2);
-EbmlId KaxChapterTrack_TheId           (0x8F, 1);
-EbmlId KaxChapterTrackNumber_TheId     (0x89, 1);
-EbmlId KaxChapterDisplay_TheId         (0x80, 1);
-EbmlId KaxChapterString_TheId          (0x85, 1);
-EbmlId KaxChapterLanguage_TheId        (0x437C, 2);
-EbmlId KaxChapterCountry_TheId         (0x437E, 2);
-EbmlId KaxChapterProcess_TheId         (0x6944, 2);
-EbmlId KaxChapterProcessCodecID_TheId  (0x6955, 2);
-EbmlId KaxChapterProcessPrivate_TheId  (0x450D, 2);
-EbmlId KaxChapterProcessCommand_TheId  (0x6911, 2);
-EbmlId KaxChapterProcessTime_TheId     (0x6922, 2);
-EbmlId KaxChapterProcessData_TheId     (0x6933, 2);
-
-const EbmlCallbacks KaxChapters::ClassInfos(KaxChapters::Create, KaxChapters_TheId, "Chapters", KaxChapters_Context);
-const EbmlCallbacks KaxEditionEntry::ClassInfos(KaxEditionEntry::Create, KaxEditionEntry_TheId, "EditionEntry", KaxEditionEntry_Context);
-const EbmlCallbacks KaxEditionUID::ClassInfos(KaxEditionUID::Create, KaxEditionUID_TheId, "EditionUID", KaxEditionUID_Context);
-const EbmlCallbacks KaxEditionFlagHidden::ClassInfos(KaxEditionFlagHidden::Create, KaxEditionFlagHidden_TheId, "EditionFlagHidden", KaxEditionFlagHidden_Context);
-const EbmlCallbacks KaxEditionFlagDefault::ClassInfos(KaxEditionFlagDefault::Create, KaxEditionFlagDefault_TheId, "EditionFlagDefault", KaxEditionFlagDefault_Context);
-const EbmlCallbacks KaxEditionFlagOrdered::ClassInfos(KaxEditionFlagOrdered::Create, KaxEditionFlagOrdered_TheId, "EditionFlagOrdered", KaxEditionFlagOrdered_Context);
-const EbmlCallbacks KaxChapterAtom::ClassInfos(KaxChapterAtom::Create, KaxChapterAtom_TheId, "ChapterAtom", KaxChapterAtom_Context);
-const EbmlCallbacks KaxChapterUID::ClassInfos(KaxChapterUID::Create, KaxChapterUID_TheId, "ChapterUID", KaxChapterUID_Context);
-const EbmlCallbacks KaxChapterTimeStart::ClassInfos(KaxChapterTimeStart::Create, KaxChapterTimeStart_TheId, "ChapterTimeStart", KaxChapterTimeStart_Context);
-const EbmlCallbacks KaxChapterTimeEnd::ClassInfos(KaxChapterTimeEnd::Create, KaxChapterTimeEnd_TheId, "ChapterTimeEnd", KaxChapterTimeEnd_Context);
-const EbmlCallbacks KaxChapterFlagHidden::ClassInfos(KaxChapterFlagHidden::Create, KaxChapterFlagHidden_TheId, "ChapterFlagHidden", KaxChapterFlagHidden_Context);
-const EbmlCallbacks KaxChapterFlagEnabled::ClassInfos(KaxChapterFlagEnabled::Create, KaxChapterFlagEnabled_TheId, "ChapterFlagEnabled", KaxChapterFlagEnabled_Context);
-const EbmlCallbacks KaxChapterSegmentUID::ClassInfos(KaxChapterSegmentUID::Create, KaxChapterSegmentUID_TheId, "ChapterSegmentUID", KaxChapterSegmentUID_Context);
-const EbmlCallbacks KaxChapterSegmentEditionUID::ClassInfos(KaxChapterSegmentEditionUID::Create, KaxChapterSegmentEditionUID_TheId, "ChapterSegmentEditionUID", KaxChapterSegmentEditionUID_Context);
-const EbmlCallbacks KaxChapterPhysicalEquiv::ClassInfos(KaxChapterPhysicalEquiv::Create, KaxChapterPhysicalEquiv_TheId, "ChapterPhysicalEquiv", KaxChapterPhysicalEquiv_Context);
-const EbmlCallbacks KaxChapterTrack::ClassInfos(KaxChapterTrack::Create, KaxChapterTrack_TheId, "ChapterTrack", KaxChapterTrack_Context);
-const EbmlCallbacks KaxChapterTrackNumber::ClassInfos(KaxChapterTrackNumber::Create, KaxChapterTrackNumber_TheId, "ChapterTrackNumber", KaxChapterTrackNumber_Context);
-const EbmlCallbacks KaxChapterDisplay::ClassInfos(KaxChapterDisplay::Create, KaxChapterDisplay_TheId, "ChapterDisplay", KaxChapterDisplay_Context);
-const EbmlCallbacks KaxChapterString::ClassInfos(KaxChapterString::Create, KaxChapterString_TheId, "ChapterString", KaxChapterString_Context);
-const EbmlCallbacks KaxChapterLanguage::ClassInfos(KaxChapterLanguage::Create, KaxChapterLanguage_TheId, "ChapterLanguage", KaxChapterLanguage_Context);
-const EbmlCallbacks KaxChapterCountry::ClassInfos(KaxChapterCountry::Create, KaxChapterCountry_TheId, "ChapterCountry", KaxChapterCountry_Context);
-const EbmlCallbacks KaxChapterProcess::ClassInfos(KaxChapterProcess::Create, KaxChapterProcess_TheId, "ChapterProcess", KaxChapterProcess_Context);
-const EbmlCallbacks KaxChapterProcessCodecID::ClassInfos(KaxChapterProcessCodecID::Create, KaxChapterProcessCodecID_TheId, "ChapterProcessCodecID", KaxChapterProcessCodecID_Context);
-const EbmlCallbacks KaxChapterProcessPrivate::ClassInfos(KaxChapterProcessPrivate::Create, KaxChapterProcessPrivate_TheId, "ChapterProcessPrivate", KaxChapterProcessPrivate_Context);
-const EbmlCallbacks KaxChapterProcessCommand::ClassInfos(KaxChapterProcessCommand::Create, KaxChapterProcessCommand_TheId, "ChapterProcessCommand", KaxChapterProcessCommand_Context);
-const EbmlCallbacks KaxChapterProcessTime::ClassInfos(KaxChapterProcessTime::Create, KaxChapterProcessTime_TheId, "ChapterProcessTime", KaxChapterProcessTime_Context);
-const EbmlCallbacks KaxChapterProcessData::ClassInfos(KaxChapterProcessData::Create, KaxChapterProcessData_TheId, "ChapterProcessData", KaxChapterProcessData_Context);
-
-KaxChapters::KaxChapters()
- :EbmlMaster(KaxChapters_Context)
-{}
-
-KaxEditionEntry::KaxEditionEntry()
-:EbmlMaster(KaxEditionEntry_Context)
-{}
-
-KaxChapterAtom::KaxChapterAtom()
-:EbmlMaster(KaxChapterAtom_Context)
-{}
-
-KaxChapterTrack::KaxChapterTrack()
-:EbmlMaster(KaxChapterTrack_Context)
-{}
-
-KaxChapterDisplay::KaxChapterDisplay()
-:EbmlMaster(KaxChapterDisplay_Context)
-{}
-
-KaxChapterProcess::KaxChapterProcess()
-:EbmlMaster(KaxChapterProcess_Context)
-{}
-
-KaxChapterProcessCommand::KaxChapterProcessCommand()
-:EbmlMaster(KaxChapterProcessCommand_Context)
-{}
-
-END_LIBMATROSKA_NAMESPACE
+/****************************************************************************\r
+** libmatroska : parse Matroska files, see http://www.matroska.org/\r
+**\r
+** <file/class description>\r
+**\r
+** Copyright (C) 2002-2010 Steve Lhomme.  All rights reserved.\r
+**\r
+** This file is part of libmatroska.\r
+**\r
+** This library is free software; you can redistribute it and/or\r
+** modify it under the terms of the GNU Lesser General Public\r
+** License as published by the Free Software Foundation; either\r
+** version 2.1 of the License, or (at your option) any later version.\r
+** \r
+** This library is distributed in the hope that it will be useful,\r
+** but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
+** Lesser General Public License for more details.\r
+** \r
+** You should have received a copy of the GNU Lesser General Public\r
+** License along with this library; if not, write to the Free Software\r
+** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\r
+**\r
+** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**\r
+** Contact license@matroska.org if any conditions of this licensing are\r
+** not clear to you.\r
+**\r
+**********************************************************************/\r
+\r
+/*!\r
+       \file\r
+       \version \$Id: KaxChapters.cpp 1201 2005-08-30 14:28:27Z robux4 $\r
+       \author Steve Lhomme     <robux4 @ users.sf.net>\r
+*/\r
+#include "matroska/KaxChapters.h"\r
+#include "matroska/KaxContexts.h"\r
+\r
+// sub elements\r
+START_LIBMATROSKA_NAMESPACE\r
+\r
+EbmlSemantic KaxChapters_ContextList[1] =\r
+{\r
+    EbmlSemantic(true, false,  EBML_INFO(KaxEditionEntry)),\r
+};\r
+\r
+EbmlSemantic KaxEditionEntry_ContextList[5] =\r
+{\r
+    EbmlSemantic(false, true , EBML_INFO(KaxEditionUID)),\r
+    EbmlSemantic(true , true , EBML_INFO(KaxEditionFlagHidden)),\r
+    EbmlSemantic(true , true , EBML_INFO(KaxEditionFlagDefault)),\r
+    EbmlSemantic(false, true , EBML_INFO(KaxEditionFlagOrdered)),\r
+    EbmlSemantic(true , false, EBML_INFO(KaxChapterAtom)),\r
+};\r
+\r
+EbmlSemantic KaxChapterAtom_ContextList[12] =\r
+{\r
+    EbmlSemantic(false, false, EBML_INFO(KaxChapterAtom)),\r
+    EbmlSemantic(true,  true,  EBML_INFO(KaxChapterUID)),\r
+    EbmlSemantic(true,  true,  EBML_INFO(KaxChapterTimeStart)),\r
+    EbmlSemantic(false, true,  EBML_INFO(KaxChapterTimeEnd)),\r
+    EbmlSemantic(true , true,  EBML_INFO(KaxChapterFlagHidden)),\r
+    EbmlSemantic(true , true,  EBML_INFO(KaxChapterFlagEnabled)),\r
+    EbmlSemantic(false, true,  EBML_INFO(KaxChapterSegmentUID)),\r
+    EbmlSemantic(false, true,  EBML_INFO(KaxChapterSegmentEditionUID)),\r
+    EbmlSemantic(false, true,  EBML_INFO(KaxChapterPhysicalEquiv)),\r
+    EbmlSemantic(false, true,  EBML_INFO(KaxChapterTrack)),\r
+    EbmlSemantic(false, false, EBML_INFO(KaxChapterDisplay)),\r
+    EbmlSemantic(false, false, EBML_INFO(KaxChapterProcess)),\r
+};\r
+\r
+EbmlSemantic KaxChapterTrack_ContextList[1] =\r
+{\r
+    EbmlSemantic(true, false, EBML_INFO(KaxChapterTrackNumber)),\r
+};\r
+\r
+EbmlSemantic KaxChapterDisplay_ContextList[3] =\r
+{\r
+    EbmlSemantic(true,  true,  EBML_INFO(KaxChapterString)),\r
+    EbmlSemantic(true,  false, EBML_INFO(KaxChapterLanguage)),\r
+    EbmlSemantic(false, false, EBML_INFO(KaxChapterCountry)),\r
+};\r
+\r
+EbmlSemantic KaxChapterProcess_ContextList[3] =\r
+{\r
+    EbmlSemantic(true,  true,  EBML_INFO(KaxChapterProcessCodecID)),\r
+    EbmlSemantic(false, true,  EBML_INFO(KaxChapterProcessPrivate)),\r
+    EbmlSemantic(false, false, EBML_INFO(KaxChapterProcessCommand)),\r
+};\r
+\r
+EbmlSemantic KaxChapterProcessCommand_ContextList[2] =\r
+{\r
+    EbmlSemantic(true,  true,  EBML_INFO(KaxChapterProcessTime)),\r
+    EbmlSemantic(true,  true,  EBML_INFO(KaxChapterProcessData)),\r
+};\r
+\r
+const EbmlSemanticContext KaxChapters_Context = EbmlSemanticContext(countof(KaxChapters_ContextList), KaxChapters_ContextList, &KaxSegment_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxChapters));\r
+const EbmlSemanticContext KaxEditionEntry_Context = EbmlSemanticContext(countof(KaxEditionEntry_ContextList), KaxEditionEntry_ContextList, &KaxChapters_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxEditionEntry));\r
+const EbmlSemanticContext KaxEditionUID_Context = EbmlSemanticContext(0, NULL, &KaxEditionEntry_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxEditionUID));\r
+const EbmlSemanticContext KaxEditionFlagHidden_Context = EbmlSemanticContext(0, NULL, &KaxEditionEntry_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxEditionFlagHidden));\r
+const EbmlSemanticContext KaxEditionFlagDefault_Context = EbmlSemanticContext(0, NULL, &KaxEditionEntry_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxEditionFlagDefault));\r
+const EbmlSemanticContext KaxEditionFlagOrdered_Context = EbmlSemanticContext(0, NULL, &KaxEditionEntry_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxEditionFlagOrdered));\r
+const EbmlSemanticContext KaxChapterAtom_Context = EbmlSemanticContext(countof(KaxChapterAtom_ContextList), KaxChapterAtom_ContextList, &KaxEditionEntry_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxChapterAtom));\r
+const EbmlSemanticContext KaxChapterTrack_Context = EbmlSemanticContext(countof(KaxChapterTrack_ContextList), KaxChapterTrack_ContextList, &KaxChapterAtom_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxChapterTrack));\r
+const EbmlSemanticContext KaxChapterDisplay_Context = EbmlSemanticContext(countof(KaxChapterDisplay_ContextList), KaxChapterDisplay_ContextList, &KaxChapterAtom_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxChapterDisplay));\r
+const EbmlSemanticContext KaxChapterUID_Context = EbmlSemanticContext(0, NULL, &KaxChapterAtom_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxChapterUID));\r
+const EbmlSemanticContext KaxChapterTimeStart_Context = EbmlSemanticContext(0, NULL, &KaxChapterAtom_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxChapterTimeStart));\r
+const EbmlSemanticContext KaxChapterTimeEnd_Context = EbmlSemanticContext(0, NULL, &KaxChapterAtom_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxChapterTimeEnd));\r
+const EbmlSemanticContext KaxChapterFlagHidden_Context = EbmlSemanticContext(0, NULL, &KaxChapterAtom_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxChapterFlagHidden));\r
+const EbmlSemanticContext KaxChapterFlagEnabled_Context = EbmlSemanticContext(0, NULL, &KaxChapterAtom_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxChapterFlagEnabled));\r
+const EbmlSemanticContext KaxChapterSegmentUID_Context = EbmlSemanticContext(0, NULL, &KaxChapterAtom_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxChapterSegmentUID));\r
+const EbmlSemanticContext KaxChapterSegmentEditionUID_Context = EbmlSemanticContext(0, NULL, &KaxChapterAtom_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxChapterSegmentEditionUID));\r
+const EbmlSemanticContext KaxChapterPhysicalEquiv_Context = EbmlSemanticContext(0, NULL, &KaxChapterAtom_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxChapterPhysicalEquiv));\r
+const EbmlSemanticContext KaxChapterTrackNumber_Context = EbmlSemanticContext(0, NULL, &KaxChapterTrack_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxChapterTrackNumber));\r
+const EbmlSemanticContext KaxChapterString_Context = EbmlSemanticContext(0, NULL, &KaxChapterDisplay_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxChapterString));\r
+const EbmlSemanticContext KaxChapterLanguage_Context = EbmlSemanticContext(0, NULL, &KaxChapterLanguage_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxChapterLanguage));\r
+const EbmlSemanticContext KaxChapterCountry_Context = EbmlSemanticContext(0, NULL, &KaxChapterCountry_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxChapterCountry));\r
+const EbmlSemanticContext KaxChapterProcess_Context = EbmlSemanticContext(countof(KaxChapterProcess_ContextList), KaxChapterProcess_ContextList, &KaxChapterAtom_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxChapterProcess));\r
+const EbmlSemanticContext KaxChapterProcessCodecID_Context = EbmlSemanticContext(0, NULL, &KaxChapterProcess_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxChapterProcessCodecID));\r
+const EbmlSemanticContext KaxChapterProcessPrivate_Context = EbmlSemanticContext(0, NULL, &KaxChapterProcess_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxChapterProcessPrivate));\r
+const EbmlSemanticContext KaxChapterProcessCommand_Context = EbmlSemanticContext(countof(KaxChapterProcessCommand_ContextList), KaxChapterProcessCommand_ContextList, &KaxChapterProcess_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxChapterProcessCommand));\r
+const EbmlSemanticContext KaxChapterProcessTime_Context = EbmlSemanticContext(0, NULL, &KaxChapterProcessCommand_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxChapterProcessTime));\r
+const EbmlSemanticContext KaxChapterProcessData_Context = EbmlSemanticContext(0, NULL, &KaxChapterProcessCommand_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxChapterProcessData));\r
+\r
+EbmlId KaxChapters_TheId               (0x1043A770, 4);\r
+EbmlId KaxEditionEntry_TheId           (0x45B9, 2);\r
+EbmlId KaxEditionUID_TheId             (0x45BC, 2);\r
+EbmlId KaxEditionFlagHidden_TheId      (0x45BD, 2);\r
+EbmlId KaxEditionFlagDefault_TheId     (0x45DB, 2);\r
+EbmlId KaxEditionFlagOrdered_TheId     (0x45DD, 2);\r
+EbmlId KaxChapterAtom_TheId            (0xB6, 1);\r
+EbmlId KaxChapterUID_TheId             (0x73C4, 2);\r
+EbmlId KaxChapterTimeStart_TheId       (0x91, 1);\r
+EbmlId KaxChapterTimeEnd_TheId         (0x92, 1);\r
+EbmlId KaxChapterFlagHidden_TheId      (0x98, 1);\r
+EbmlId KaxChapterFlagEnabled_TheId     (0x4598, 2);\r
+EbmlId KaxChapterSegmentUID_TheId      (0x6E67, 2);\r
+EbmlId KaxChapterSegmentEditionUID_TheId(0x6EBC, 2);\r
+EbmlId KaxChapterPhysicalEquiv_TheId   (0x63C3, 2);\r
+EbmlId KaxChapterTrack_TheId           (0x8F, 1);\r
+EbmlId KaxChapterTrackNumber_TheId     (0x89, 1);\r
+EbmlId KaxChapterDisplay_TheId         (0x80, 1);\r
+EbmlId KaxChapterString_TheId          (0x85, 1);\r
+EbmlId KaxChapterLanguage_TheId        (0x437C, 2);\r
+EbmlId KaxChapterCountry_TheId         (0x437E, 2);\r
+EbmlId KaxChapterProcess_TheId         (0x6944, 2);\r
+EbmlId KaxChapterProcessCodecID_TheId  (0x6955, 2);\r
+EbmlId KaxChapterProcessPrivate_TheId  (0x450D, 2);\r
+EbmlId KaxChapterProcessCommand_TheId  (0x6911, 2);\r
+EbmlId KaxChapterProcessTime_TheId     (0x6922, 2);\r
+EbmlId KaxChapterProcessData_TheId     (0x6933, 2);\r
+\r
+const EbmlCallbacks KaxChapters::ClassInfos(KaxChapters::Create, KaxChapters_TheId, "Chapters", KaxChapters_Context);\r
+const EbmlCallbacks KaxEditionEntry::ClassInfos(KaxEditionEntry::Create, KaxEditionEntry_TheId, "EditionEntry", KaxEditionEntry_Context);\r
+const EbmlCallbacks KaxEditionUID::ClassInfos(KaxEditionUID::Create, KaxEditionUID_TheId, "EditionUID", KaxEditionUID_Context);\r
+const EbmlCallbacks KaxEditionFlagHidden::ClassInfos(KaxEditionFlagHidden::Create, KaxEditionFlagHidden_TheId, "EditionFlagHidden", KaxEditionFlagHidden_Context);\r
+const EbmlCallbacks KaxEditionFlagDefault::ClassInfos(KaxEditionFlagDefault::Create, KaxEditionFlagDefault_TheId, "EditionFlagDefault", KaxEditionFlagDefault_Context);\r
+const EbmlCallbacks KaxEditionFlagOrdered::ClassInfos(KaxEditionFlagOrdered::Create, KaxEditionFlagOrdered_TheId, "EditionFlagOrdered", KaxEditionFlagOrdered_Context);\r
+const EbmlCallbacks KaxChapterAtom::ClassInfos(KaxChapterAtom::Create, KaxChapterAtom_TheId, "ChapterAtom", KaxChapterAtom_Context);\r
+const EbmlCallbacks KaxChapterUID::ClassInfos(KaxChapterUID::Create, KaxChapterUID_TheId, "ChapterUID", KaxChapterUID_Context);\r
+const EbmlCallbacks KaxChapterTimeStart::ClassInfos(KaxChapterTimeStart::Create, KaxChapterTimeStart_TheId, "ChapterTimeStart", KaxChapterTimeStart_Context);\r
+const EbmlCallbacks KaxChapterTimeEnd::ClassInfos(KaxChapterTimeEnd::Create, KaxChapterTimeEnd_TheId, "ChapterTimeEnd", KaxChapterTimeEnd_Context);\r
+const EbmlCallbacks KaxChapterFlagHidden::ClassInfos(KaxChapterFlagHidden::Create, KaxChapterFlagHidden_TheId, "ChapterFlagHidden", KaxChapterFlagHidden_Context);\r
+const EbmlCallbacks KaxChapterFlagEnabled::ClassInfos(KaxChapterFlagEnabled::Create, KaxChapterFlagEnabled_TheId, "ChapterFlagEnabled", KaxChapterFlagEnabled_Context);\r
+const EbmlCallbacks KaxChapterSegmentUID::ClassInfos(KaxChapterSegmentUID::Create, KaxChapterSegmentUID_TheId, "ChapterSegmentUID", KaxChapterSegmentUID_Context);\r
+const EbmlCallbacks KaxChapterSegmentEditionUID::ClassInfos(KaxChapterSegmentEditionUID::Create, KaxChapterSegmentEditionUID_TheId, "ChapterSegmentEditionUID", KaxChapterSegmentEditionUID_Context);\r
+const EbmlCallbacks KaxChapterPhysicalEquiv::ClassInfos(KaxChapterPhysicalEquiv::Create, KaxChapterPhysicalEquiv_TheId, "ChapterPhysicalEquiv", KaxChapterPhysicalEquiv_Context);\r
+const EbmlCallbacks KaxChapterTrack::ClassInfos(KaxChapterTrack::Create, KaxChapterTrack_TheId, "ChapterTrack", KaxChapterTrack_Context);\r
+const EbmlCallbacks KaxChapterTrackNumber::ClassInfos(KaxChapterTrackNumber::Create, KaxChapterTrackNumber_TheId, "ChapterTrackNumber", KaxChapterTrackNumber_Context);\r
+const EbmlCallbacks KaxChapterDisplay::ClassInfos(KaxChapterDisplay::Create, KaxChapterDisplay_TheId, "ChapterDisplay", KaxChapterDisplay_Context);\r
+const EbmlCallbacks KaxChapterString::ClassInfos(KaxChapterString::Create, KaxChapterString_TheId, "ChapterString", KaxChapterString_Context);\r
+const EbmlCallbacks KaxChapterLanguage::ClassInfos(KaxChapterLanguage::Create, KaxChapterLanguage_TheId, "ChapterLanguage", KaxChapterLanguage_Context);\r
+const EbmlCallbacks KaxChapterCountry::ClassInfos(KaxChapterCountry::Create, KaxChapterCountry_TheId, "ChapterCountry", KaxChapterCountry_Context);\r
+const EbmlCallbacks KaxChapterProcess::ClassInfos(KaxChapterProcess::Create, KaxChapterProcess_TheId, "ChapterProcess", KaxChapterProcess_Context);\r
+const EbmlCallbacks KaxChapterProcessCodecID::ClassInfos(KaxChapterProcessCodecID::Create, KaxChapterProcessCodecID_TheId, "ChapterProcessCodecID", KaxChapterProcessCodecID_Context);\r
+const EbmlCallbacks KaxChapterProcessPrivate::ClassInfos(KaxChapterProcessPrivate::Create, KaxChapterProcessPrivate_TheId, "ChapterProcessPrivate", KaxChapterProcessPrivate_Context);\r
+const EbmlCallbacks KaxChapterProcessCommand::ClassInfos(KaxChapterProcessCommand::Create, KaxChapterProcessCommand_TheId, "ChapterProcessCommand", KaxChapterProcessCommand_Context);\r
+const EbmlCallbacks KaxChapterProcessTime::ClassInfos(KaxChapterProcessTime::Create, KaxChapterProcessTime_TheId, "ChapterProcessTime", KaxChapterProcessTime_Context);\r
+const EbmlCallbacks KaxChapterProcessData::ClassInfos(KaxChapterProcessData::Create, KaxChapterProcessData_TheId, "ChapterProcessData", KaxChapterProcessData_Context);\r
+\r
+KaxChapters::KaxChapters()\r
+ :EbmlMaster(KaxChapters_Context)\r
+{}\r
+\r
+KaxEditionEntry::KaxEditionEntry()\r
+:EbmlMaster(KaxEditionEntry_Context)\r
+{}\r
+\r
+KaxChapterAtom::KaxChapterAtom()\r
+:EbmlMaster(KaxChapterAtom_Context)\r
+{}\r
+\r
+KaxChapterTrack::KaxChapterTrack()\r
+:EbmlMaster(KaxChapterTrack_Context)\r
+{}\r
+\r
+KaxChapterDisplay::KaxChapterDisplay()\r
+:EbmlMaster(KaxChapterDisplay_Context)\r
+{}\r
+\r
+KaxChapterProcess::KaxChapterProcess()\r
+:EbmlMaster(KaxChapterProcess_Context)\r
+{}\r
+\r
+KaxChapterProcessCommand::KaxChapterProcessCommand()\r
+:EbmlMaster(KaxChapterProcessCommand_Context)\r
+{}\r
+\r
+END_LIBMATROSKA_NAMESPACE\r
index df0ce9175b821bcd96c90f1288ae2c107d8ce8b4..394ff53c77ac609269ab1aba4ca4ea167f7e2c1a 100644 (file)
-/****************************************************************************
-** libmatroska : parse Matroska files, see http://www.matroska.org/
-**
-** <file/class description>
-**
-** Copyright (C) 2002-2005 Steve Lhomme.  All rights reserved.
-**
-** This library is free software; you can redistribute it and/or
-** modify it under the terms of the GNU Lesser General Public
-** License as published by the Free Software Foundation; either
-** version 2.1 of the License, or (at your option) any later version.
-** 
-** This library is distributed in the hope that it will be useful,
-** but WITHOUT ANY WARRANTY; without even the implied warranty of
-** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-** Lesser General Public License for more details.
-** 
-** You should have received a copy of the GNU Lesser General Public
-** License along with this library; if not, write to the Free Software
-** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-**
-** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**
-** Contact license@matroska.org if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-/*!
-       \file
-       \version \$Id: KaxCluster.cpp 1228 2005-10-14 19:36:51Z robux4 $
-       \author Steve Lhomme     <robux4 @ users.sf.net>
-*/
-#include "matroska/KaxCluster.h"
-#include "matroska/KaxClusterData.h"
-#include "matroska/KaxBlock.h"
-#include "matroska/KaxContexts.h"
-#include "matroska/KaxSegment.h"
-
-// sub elements
-START_LIBMATROSKA_NAMESPACE
-
-#if MATROSKA_VERSION == 1
-EbmlSemantic KaxCluster_ContextList[5] =
-#else // MATROSKA_VERSION
-EbmlSemantic KaxCluster_ContextList[6] =
-#endif // MATROSKA_VERSION
-{
-       EbmlSemantic(true,  true,  EBML_INFO(KaxClusterTimecode)),
-       EbmlSemantic(false, true,  EBML_INFO(KaxClusterSilentTracks)),
-       EbmlSemantic(false, true,  EBML_INFO(KaxClusterPrevSize)),
-       EbmlSemantic(false, false, EBML_INFO(KaxBlockGroup)),
-#if MATROSKA_VERSION == 2
-       EbmlSemantic(false, false, EBML_INFO(KaxSimpleBlock)),
-#endif
-       EbmlSemantic(false, true,  EBML_INFO(KaxClusterPosition)),
-};
-
-const EbmlSemanticContext KaxCluster_Context = EbmlSemanticContext(countof(KaxCluster_ContextList), KaxCluster_ContextList, &KaxSegment_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxCluster));
-
-EbmlId KaxCluster_TheId(0x1F43B675, 4);
-const EbmlCallbacks KaxCluster::ClassInfos(KaxCluster::Create, KaxCluster_TheId, "Cluster", KaxCluster_Context);
-
-KaxCluster::KaxCluster()
-       :EbmlMaster(KaxCluster_Context)
-       ,currentNewBlock(NULL)
-       ,ParentSegment(NULL)
-       ,bFirstFrameInside(false)
-       ,bPreviousTimecodeIsSet(false)
-       ,bTimecodeScaleIsSet(false)
-       ,bSilentTracksUsed(false)
-{}
-
-KaxCluster::KaxCluster(const KaxCluster & ElementToClone) 
- :EbmlMaster(ElementToClone)
- ,bSilentTracksUsed(ElementToClone.bSilentTracksUsed)
-{
-       // update the parent of each children
-       std::vector<EbmlElement *>::const_iterator Itr = begin();
-       while (Itr != end())
-       {
-               if (EbmlId(**Itr) == EBML_ID(KaxBlockGroup)) {
-                       static_cast<KaxBlockGroup   *>(*Itr)->SetParent(*this);
-               } else if (EbmlId(**Itr) == EBML_ID(KaxBlock)) {
-                       static_cast<KaxBlock        *>(*Itr)->SetParent(*this);
-#if MATROSKA_VERSION >= 2
-               } else if (EbmlId(**Itr) == EBML_ID(KaxBlockVirtual)) {
-                       static_cast<KaxBlockVirtual *>(*Itr)->SetParent(*this);
-#endif // MATROSKA_VERSION
-               }
-       }
-}
-
-bool KaxCluster::AddBlockBlob(KaxBlockBlob * NewBlob)
-{
-       Blobs.push_back(NewBlob);
-       return true;
-}
-
-bool KaxCluster::AddFrameInternal(const KaxTrackEntry & track, uint64 timecode, DataBuffer & buffer, KaxBlockGroup * & MyNewBlock, const KaxBlockGroup * PastBlock, const KaxBlockGroup * ForwBlock, LacingType lacing)
-{
-       if (!bFirstFrameInside) {
-               bFirstFrameInside = true;
-               MinTimecode = MaxTimecode = timecode;
-       } else {
-               if (timecode < MinTimecode)
-                       MinTimecode = timecode;
-               if (timecode > MaxTimecode)
-                       MaxTimecode = timecode;
-       }
-
-       MyNewBlock = NULL;
-
-       if (lacing == LACING_NONE || !track.LacingEnabled()) {
-               currentNewBlock = NULL;
-       }
-
-       // force creation of a new block
-       if (currentNewBlock == NULL || uint32(track.TrackNumber()) != uint32(currentNewBlock->TrackNumber()) || PastBlock != NULL || ForwBlock != NULL) {
-               KaxBlockGroup & aNewBlock = GetNewBlock();
-               MyNewBlock = currentNewBlock = &aNewBlock;
-               currentNewBlock = &aNewBlock;
-       }
-
-       if (PastBlock != NULL) {
-               if (ForwBlock != NULL) {
-                       if (currentNewBlock->AddFrame(track, timecode, buffer, *PastBlock, *ForwBlock, lacing)) {
-                               // more data are allowed in this Block
-                               return true;
-                       } else {
-                               currentNewBlock = NULL;
-                               return false;
-                       }
-               } else {
-                       if (currentNewBlock->AddFrame(track, timecode, buffer, *PastBlock, lacing)) {
-                               // more data are allowed in this Block
-                               return true;
-                       } else {
-                               currentNewBlock = NULL;
-                               return false;
-                       }
-               }
-       } else {
-               if (currentNewBlock->AddFrame(track, timecode, buffer, lacing)) {
-                       // more data are allowed in this Block
-                       return true;
-               } else {
-                       currentNewBlock = NULL;
-                       return false;
-               }
-       }
-}
-
-bool KaxCluster::AddFrame(const KaxTrackEntry & track, uint64 timecode, DataBuffer & buffer, KaxBlockGroup * & MyNewBlock, LacingType lacing)
-{
-       assert(Blobs.size() == 0); // mutually exclusive for the moment
-       return AddFrameInternal(track, timecode, buffer, MyNewBlock, NULL, NULL, lacing);
-}
-
-bool KaxCluster::AddFrame(const KaxTrackEntry & track, uint64 timecode, DataBuffer & buffer, KaxBlockGroup * & MyNewBlock, const KaxBlockGroup & PastBlock, LacingType lacing)
-{
-       assert(Blobs.size() == 0); // mutually exclusive for the moment
-       return AddFrameInternal(track, timecode, buffer, MyNewBlock, &PastBlock, NULL, lacing);
-}
-
-bool KaxCluster::AddFrame(const KaxTrackEntry & track, uint64 timecode, DataBuffer & buffer, KaxBlockGroup * & MyNewBlock, const KaxBlockGroup & PastBlock, const KaxBlockGroup & ForwBlock, LacingType lacing)
-{
-       assert(Blobs.size() == 0); // mutually exclusive for the moment
-       return AddFrameInternal(track, timecode, buffer, MyNewBlock, &PastBlock, &ForwBlock, lacing);
-}
-
-/*!
-       \todo only put the Blocks written in the cue entries
-*/
-uint32 KaxCluster::Render(IOCallback & output, KaxCues & CueToUpdate, bool bSaveDefault)
-{
-       uint32 Result = 0;
-       size_t TrkIndex, Index;
-
-       // update the Timecode of the Cluster before writing
-       KaxClusterTimecode * Timecode = static_cast<KaxClusterTimecode *>(this->FindElt(EBML_INFO(KaxClusterTimecode)));
-       *static_cast<EbmlUInteger *>(Timecode) = GlobalTimecode() / GlobalTimecodeScale();
-
-       if (Blobs.size() == 0) {
-               // old-school direct KaxBlockGroup
-
-               // SilentTracks handling
-               // check the parent cluster for existing tracks and see if they are contained in this cluster or not
-               if (bSilentTracksUsed)
-               {
-                       KaxTracks & MyTracks = *static_cast<KaxTracks *>(ParentSegment->FindElt(EBML_INFO(KaxTracks)));
-                       for (TrkIndex = 0; TrkIndex < MyTracks.ListSize(); TrkIndex++) {
-                               if (EbmlId(*MyTracks[TrkIndex]) == EBML_ID(KaxTrackEntry))
-                               {
-                                       KaxTrackEntry & entry = *static_cast<KaxTrackEntry *>(MyTracks[TrkIndex]);
-                                       uint32 tracknum = entry.TrackNumber();
-                                       for (Index = 0; Index < ListSize(); Index++) {
-                                               if (EbmlId(*(*this)[Index]) == EBML_ID(KaxBlockGroup)) {
-                                                       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 == ListSize())
-                                       {
-                                               KaxClusterSilentTracks * SilentTracks = static_cast<KaxClusterSilentTracks *>(this->FindFirstElt(EBML_INFO(KaxClusterSilentTracks)));
-                                               assert(SilentTracks != NULL); // the flag bSilentTracksUsed should be set when creating the Cluster
-                                               KaxClusterSilentTrackNumber * trackelt = static_cast<KaxClusterSilentTrackNumber *>(SilentTracks->AddNewElt(EBML_INFO(KaxClusterSilentTrackNumber)));
-                                               *static_cast<EbmlUInteger *>(trackelt) = tracknum;
-                                       }
-                               }
-                       }
-               }
-
-               Result = EbmlMaster::Render(output, bSaveDefault);
-               // For all Blocks add their position on the CueEntry
-               
-               for (Index = 0; Index < ListSize(); Index++) {
-                       if (EbmlId(*(*this)[Index]) == EBML_ID(KaxBlockGroup)) {
-                               CueToUpdate.PositionSet(*static_cast<const KaxBlockGroup *>((*this)[Index]));
-                       }
-               }
-       } else {
-               // new school, using KaxBlockBlob
-               for (Index = 0; Index<Blobs.size(); Index++)
-               {
-#if MATROSKA_VERSION >= 2
-                       if (Blobs[Index]->IsSimpleBlock())
-                               PushElement( (KaxSimpleBlock&) *Blobs[Index] );
-                       else
-#endif
-                               PushElement( (KaxBlockGroup&) *Blobs[Index] );
-               }
-
-               // SilentTracks handling
-               // check the parent cluster for existing tracks and see if they are contained in this cluster or not
-               if (bSilentTracksUsed)
-               {
-                       KaxTracks & MyTracks = *static_cast<KaxTracks *>(ParentSegment->FindElt(EBML_INFO(KaxTracks)));
-                       for (TrkIndex = 0; TrkIndex < MyTracks.ListSize(); TrkIndex++) {
-                               if (EbmlId(*MyTracks[TrkIndex]) == EBML_ID(KaxTrackEntry))
-                               {
-                                       KaxTrackEntry & entry = *static_cast<KaxTrackEntry *>(MyTracks[TrkIndex]);
-                                       uint32 tracknum = entry.TrackNumber();
-                                       for (Index = 0; Index<Blobs.size(); Index++) {
-                                               if (((KaxInternalBlock&)*Blobs[Index]).TrackNum() == tracknum)
-                                                               break; // this track is used
-                                       }
-                                       // the track wasn't found in this cluster
-                                       if (Index == ListSize())
-                                       {
-                                               KaxClusterSilentTracks * SilentTracks = static_cast<KaxClusterSilentTracks *>(this->FindFirstElt(EBML_INFO(KaxClusterSilentTracks)));
-                                               assert(SilentTracks != NULL); // the flag bSilentTracksUsed should be set when creating the Cluster
-                                               KaxClusterSilentTrackNumber * trackelt = static_cast<KaxClusterSilentTrackNumber *>(SilentTracks->AddNewElt(EBML_INFO(KaxClusterSilentTrackNumber)));
-                                               *static_cast<EbmlUInteger *>(trackelt) = tracknum;
-                                       }
-                               }
-                       }
-               }
-
-               Result = EbmlMaster::Render(output, bSaveDefault);
-
-               // For all Blocks add their position on the CueEntry
-               for (Index = 0; Index<Blobs.size(); Index++) {
-                       CueToUpdate.PositionSet(*Blobs[Index]);
-               }
-
-               Blobs.clear();
-       }
-
-       return Result;
-}
-
-/*!
-       \todo automatically choose valid timecode for the Cluster based on the previous cluster timecode (must be incremental)
-*/
-uint64 KaxCluster::GlobalTimecode() const
-{
-       assert(bPreviousTimecodeIsSet);
-       uint64 result = MinTimecode;
-
-       if (result < PreviousTimecode)
-               result = PreviousTimecode + 1;
-       
-       return result;
-}
-
-/*!
-       \brief retrieve the relative 
-       \todo !!! We need a way to know the TimecodeScale
-*/
-int16 KaxCluster::GetBlockLocalTimecode(uint64 aGlobalTimecode) const
-{
-       int64 TimecodeDelay = (int64(aGlobalTimecode) - int64(GlobalTimecode())) / int64(GlobalTimecodeScale());
-       assert(TimecodeDelay >= int16(0x8000) && TimecodeDelay <= int16(0x7FFF));
-       return int16(TimecodeDelay);
-}
-
-uint64 KaxCluster::GetBlockGlobalTimecode(int16 GlobalSavedTimecode)
-{
-       if (!bFirstFrameInside) {
-               KaxClusterTimecode * Timecode = static_cast<KaxClusterTimecode *>(this->FindElt(EBML_INFO(KaxClusterTimecode)));
-               assert (bFirstFrameInside); // use the InitTimecode() hack for now
-               MinTimecode = MaxTimecode = PreviousTimecode = *static_cast<EbmlUInteger *>(Timecode);
-               bFirstFrameInside = true;
-               bPreviousTimecodeIsSet = true;
-       }
-       return int64(GlobalSavedTimecode * GlobalTimecodeScale()) + GlobalTimecode();
-}
-
-KaxBlockGroup & KaxCluster::GetNewBlock()
-{
-       KaxBlockGroup & MyBlock = AddNewChild<KaxBlockGroup>(*this);
-       MyBlock.SetParent(*this);
-       return MyBlock;
-}
-
-void KaxCluster::ReleaseFrames()
-{
-       size_t Index;
-       
-       for (Index = 0; Index < ListSize(); Index++) {
-               if (EbmlId(*(*this)[Index]) == EBML_ID(KaxBlockGroup)) {
-                       static_cast<KaxBlockGroup*>((*this)[Index])->ReleaseFrames();
-               }
-       }
-}
-
-uint64 KaxCluster::GetPosition() const
-{
-       assert(ParentSegment != NULL);
-       return ParentSegment->GetRelativePosition(*this);
-}
-
-END_LIBMATROSKA_NAMESPACE
+/****************************************************************************\r
+** libmatroska : parse Matroska files, see http://www.matroska.org/\r
+**\r
+** <file/class description>\r
+**\r
+** Copyright (C) 2002-2010 Steve Lhomme.  All rights reserved.\r
+**\r
+** This library is free software; you can redistribute it and/or\r
+** modify it under the terms of the GNU Lesser General Public\r
+** License as published by the Free Software Foundation; either\r
+** version 2.1 of the License, or (at your option) any later version.\r
+** \r
+** This library is distributed in the hope that it will be useful,\r
+** but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
+** Lesser General Public License for more details.\r
+** \r
+** You should have received a copy of the GNU Lesser General Public\r
+** License along with this library; if not, write to the Free Software\r
+** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\r
+**\r
+** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**\r
+** Contact license@matroska.org if any conditions of this licensing are\r
+** not clear to you.\r
+**\r
+**********************************************************************/\r
+\r
+/*!\r
+       \file\r
+       \version \$Id: KaxCluster.cpp 1228 2005-10-14 19:36:51Z robux4 $\r
+       \author Steve Lhomme     <robux4 @ users.sf.net>\r
+*/\r
+#include "matroska/KaxCluster.h"\r
+#include "matroska/KaxClusterData.h"\r
+#include "matroska/KaxBlock.h"\r
+#include "matroska/KaxContexts.h"\r
+#include "matroska/KaxSegment.h"\r
+\r
+// sub elements\r
+START_LIBMATROSKA_NAMESPACE\r
+\r
+#if MATROSKA_VERSION == 1\r
+EbmlSemantic KaxCluster_ContextList[5] =\r
+#else // MATROSKA_VERSION\r
+EbmlSemantic KaxCluster_ContextList[6] =\r
+#endif // MATROSKA_VERSION\r
+{\r
+       EbmlSemantic(true,  true,  EBML_INFO(KaxClusterTimecode)),\r
+       EbmlSemantic(false, true,  EBML_INFO(KaxClusterSilentTracks)),\r
+       EbmlSemantic(false, true,  EBML_INFO(KaxClusterPrevSize)),\r
+       EbmlSemantic(false, false, EBML_INFO(KaxBlockGroup)),\r
+#if MATROSKA_VERSION == 2\r
+       EbmlSemantic(false, false, EBML_INFO(KaxSimpleBlock)),\r
+#endif\r
+       EbmlSemantic(false, true,  EBML_INFO(KaxClusterPosition)),\r
+};\r
+\r
+const EbmlSemanticContext KaxCluster_Context = EbmlSemanticContext(countof(KaxCluster_ContextList), KaxCluster_ContextList, &KaxSegment_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxCluster));\r
+\r
+EbmlId KaxCluster_TheId(0x1F43B675, 4);\r
+const EbmlCallbacks KaxCluster::ClassInfos(KaxCluster::Create, KaxCluster_TheId, "Cluster", KaxCluster_Context);\r
+\r
+KaxCluster::KaxCluster()\r
+       :EbmlMaster(KaxCluster_Context)\r
+       ,currentNewBlock(NULL)\r
+       ,ParentSegment(NULL)\r
+       ,bFirstFrameInside(false)\r
+       ,bPreviousTimecodeIsSet(false)\r
+       ,bTimecodeScaleIsSet(false)\r
+       ,bSilentTracksUsed(false)\r
+{}\r
+\r
+KaxCluster::KaxCluster(const KaxCluster & ElementToClone) \r
+ :EbmlMaster(ElementToClone)\r
+ ,bSilentTracksUsed(ElementToClone.bSilentTracksUsed)\r
+{\r
+       // update the parent of each children\r
+       std::vector<EbmlElement *>::const_iterator Itr = begin();\r
+       while (Itr != end())\r
+       {\r
+               if (EbmlId(**Itr) == EBML_ID(KaxBlockGroup)) {\r
+                       static_cast<KaxBlockGroup   *>(*Itr)->SetParent(*this);\r
+               } else if (EbmlId(**Itr) == EBML_ID(KaxBlock)) {\r
+                       static_cast<KaxBlock        *>(*Itr)->SetParent(*this);\r
+#if MATROSKA_VERSION >= 2\r
+               } else if (EbmlId(**Itr) == EBML_ID(KaxBlockVirtual)) {\r
+                       static_cast<KaxBlockVirtual *>(*Itr)->SetParent(*this);\r
+#endif // MATROSKA_VERSION\r
+               }\r
+       }\r
+}\r
+\r
+bool KaxCluster::AddBlockBlob(KaxBlockBlob * NewBlob)\r
+{\r
+       Blobs.push_back(NewBlob);\r
+       return true;\r
+}\r
+\r
+bool KaxCluster::AddFrameInternal(const KaxTrackEntry & track, uint64 timecode, DataBuffer & buffer, KaxBlockGroup * & MyNewBlock, const KaxBlockGroup * PastBlock, const KaxBlockGroup * ForwBlock, LacingType lacing)\r
+{\r
+       if (!bFirstFrameInside) {\r
+               bFirstFrameInside = true;\r
+               MinTimecode = MaxTimecode = timecode;\r
+       } else {\r
+               if (timecode < MinTimecode)\r
+                       MinTimecode = timecode;\r
+               if (timecode > MaxTimecode)\r
+                       MaxTimecode = timecode;\r
+       }\r
+\r
+       MyNewBlock = NULL;\r
+\r
+       if (lacing == LACING_NONE || !track.LacingEnabled()) {\r
+               currentNewBlock = NULL;\r
+       }\r
+\r
+       // force creation of a new block\r
+       if (currentNewBlock == NULL || uint32(track.TrackNumber()) != uint32(currentNewBlock->TrackNumber()) || PastBlock != NULL || ForwBlock != NULL) {\r
+               KaxBlockGroup & aNewBlock = GetNewBlock();\r
+               MyNewBlock = currentNewBlock = &aNewBlock;\r
+               currentNewBlock = &aNewBlock;\r
+       }\r
+\r
+       if (PastBlock != NULL) {\r
+               if (ForwBlock != NULL) {\r
+                       if (currentNewBlock->AddFrame(track, timecode, buffer, *PastBlock, *ForwBlock, lacing)) {\r
+                               // more data are allowed in this Block\r
+                               return true;\r
+                       } else {\r
+                               currentNewBlock = NULL;\r
+                               return false;\r
+                       }\r
+               } else {\r
+                       if (currentNewBlock->AddFrame(track, timecode, buffer, *PastBlock, lacing)) {\r
+                               // more data are allowed in this Block\r
+                               return true;\r
+                       } else {\r
+                               currentNewBlock = NULL;\r
+                               return false;\r
+                       }\r
+               }\r
+       } else {\r
+               if (currentNewBlock->AddFrame(track, timecode, buffer, lacing)) {\r
+                       // more data are allowed in this Block\r
+                       return true;\r
+               } else {\r
+                       currentNewBlock = NULL;\r
+                       return false;\r
+               }\r
+       }\r
+}\r
+\r
+bool KaxCluster::AddFrame(const KaxTrackEntry & track, uint64 timecode, DataBuffer & buffer, KaxBlockGroup * & MyNewBlock, LacingType lacing)\r
+{\r
+       assert(Blobs.size() == 0); // mutually exclusive for the moment\r
+       return AddFrameInternal(track, timecode, buffer, MyNewBlock, NULL, NULL, lacing);\r
+}\r
+\r
+bool KaxCluster::AddFrame(const KaxTrackEntry & track, uint64 timecode, DataBuffer & buffer, KaxBlockGroup * & MyNewBlock, const KaxBlockGroup & PastBlock, LacingType lacing)\r
+{\r
+       assert(Blobs.size() == 0); // mutually exclusive for the moment\r
+       return AddFrameInternal(track, timecode, buffer, MyNewBlock, &PastBlock, NULL, lacing);\r
+}\r
+\r
+bool KaxCluster::AddFrame(const KaxTrackEntry & track, uint64 timecode, DataBuffer & buffer, KaxBlockGroup * & MyNewBlock, const KaxBlockGroup & PastBlock, const KaxBlockGroup & ForwBlock, LacingType lacing)\r
+{\r
+       assert(Blobs.size() == 0); // mutually exclusive for the moment\r
+       return AddFrameInternal(track, timecode, buffer, MyNewBlock, &PastBlock, &ForwBlock, lacing);\r
+}\r
+\r
+/*!\r
+       \todo only put the Blocks written in the cue entries\r
+*/\r
+uint32 KaxCluster::Render(IOCallback & output, KaxCues & CueToUpdate, bool bSaveDefault)\r
+{\r
+       uint32 Result = 0;\r
+       size_t TrkIndex, Index;\r
+\r
+       // update the Timecode of the Cluster before writing\r
+       KaxClusterTimecode * Timecode = static_cast<KaxClusterTimecode *>(this->FindElt(EBML_INFO(KaxClusterTimecode)));\r
+       *static_cast<EbmlUInteger *>(Timecode) = GlobalTimecode() / GlobalTimecodeScale();\r
+\r
+       if (Blobs.size() == 0) {\r
+               // old-school direct KaxBlockGroup\r
+\r
+               // SilentTracks handling\r
+               // check the parent cluster for existing tracks and see if they are contained in this cluster or not\r
+               if (bSilentTracksUsed)\r
+               {\r
+                       KaxTracks & MyTracks = *static_cast<KaxTracks *>(ParentSegment->FindElt(EBML_INFO(KaxTracks)));\r
+                       for (TrkIndex = 0; TrkIndex < MyTracks.ListSize(); TrkIndex++) {\r
+                               if (EbmlId(*MyTracks[TrkIndex]) == EBML_ID(KaxTrackEntry))\r
+                               {\r
+                                       KaxTrackEntry & entry = *static_cast<KaxTrackEntry *>(MyTracks[TrkIndex]);\r
+                                       uint32 tracknum = entry.TrackNumber();\r
+                                       for (Index = 0; Index < ListSize(); Index++) {\r
+                                               if (EbmlId(*(*this)[Index]) == EBML_ID(KaxBlockGroup)) {\r
+                                                       KaxBlockGroup & group = *static_cast<KaxBlockGroup *>((*this)[Index]);\r
+                                                       if (group.TrackNumber() == tracknum)\r
+                                                               break; // this track is used\r
+                                               }\r
+                                       }\r
+                                       // the track wasn't found in this cluster\r
+                                       if (Index == ListSize())\r
+                                       {\r
+                                               KaxClusterSilentTracks * SilentTracks = static_cast<KaxClusterSilentTracks *>(this->FindFirstElt(EBML_INFO(KaxClusterSilentTracks)));\r
+                                               assert(SilentTracks != NULL); // the flag bSilentTracksUsed should be set when creating the Cluster\r
+                                               KaxClusterSilentTrackNumber * trackelt = static_cast<KaxClusterSilentTrackNumber *>(SilentTracks->AddNewElt(EBML_INFO(KaxClusterSilentTrackNumber)));\r
+                                               *static_cast<EbmlUInteger *>(trackelt) = tracknum;\r
+                                       }\r
+                               }\r
+                       }\r
+               }\r
+\r
+               Result = EbmlMaster::Render(output, bSaveDefault);\r
+               // For all Blocks add their position on the CueEntry\r
+               \r
+               for (Index = 0; Index < ListSize(); Index++) {\r
+                       if (EbmlId(*(*this)[Index]) == EBML_ID(KaxBlockGroup)) {\r
+                               CueToUpdate.PositionSet(*static_cast<const KaxBlockGroup *>((*this)[Index]));\r
+                       }\r
+               }\r
+       } else {\r
+               // new school, using KaxBlockBlob\r
+               for (Index = 0; Index<Blobs.size(); Index++)\r
+               {\r
+#if MATROSKA_VERSION >= 2\r
+                       if (Blobs[Index]->IsSimpleBlock())\r
+                               PushElement( (KaxSimpleBlock&) *Blobs[Index] );\r
+                       else\r
+#endif\r
+                               PushElement( (KaxBlockGroup&) *Blobs[Index] );\r
+               }\r
+\r
+               // SilentTracks handling\r
+               // check the parent cluster for existing tracks and see if they are contained in this cluster or not\r
+               if (bSilentTracksUsed)\r
+               {\r
+                       KaxTracks & MyTracks = *static_cast<KaxTracks *>(ParentSegment->FindElt(EBML_INFO(KaxTracks)));\r
+                       for (TrkIndex = 0; TrkIndex < MyTracks.ListSize(); TrkIndex++) {\r
+                               if (EbmlId(*MyTracks[TrkIndex]) == EBML_ID(KaxTrackEntry))\r
+                               {\r
+                                       KaxTrackEntry & entry = *static_cast<KaxTrackEntry *>(MyTracks[TrkIndex]);\r
+                                       uint32 tracknum = entry.TrackNumber();\r
+                                       for (Index = 0; Index<Blobs.size(); Index++) {\r
+                                               if (((KaxInternalBlock&)*Blobs[Index]).TrackNum() == tracknum)\r
+                                                               break; // this track is used\r
+                                       }\r
+                                       // the track wasn't found in this cluster\r
+                                       if (Index == ListSize())\r
+                                       {\r
+                                               KaxClusterSilentTracks * SilentTracks = static_cast<KaxClusterSilentTracks *>(this->FindFirstElt(EBML_INFO(KaxClusterSilentTracks)));\r
+                                               assert(SilentTracks != NULL); // the flag bSilentTracksUsed should be set when creating the Cluster\r
+                                               KaxClusterSilentTrackNumber * trackelt = static_cast<KaxClusterSilentTrackNumber *>(SilentTracks->AddNewElt(EBML_INFO(KaxClusterSilentTrackNumber)));\r
+                                               *static_cast<EbmlUInteger *>(trackelt) = tracknum;\r
+                                       }\r
+                               }\r
+                       }\r
+               }\r
+\r
+               Result = EbmlMaster::Render(output, bSaveDefault);\r
+\r
+               // For all Blocks add their position on the CueEntry\r
+               for (Index = 0; Index<Blobs.size(); Index++) {\r
+                       CueToUpdate.PositionSet(*Blobs[Index]);\r
+               }\r
+\r
+               Blobs.clear();\r
+       }\r
+\r
+       return Result;\r
+}\r
+\r
+/*!\r
+       \todo automatically choose valid timecode for the Cluster based on the previous cluster timecode (must be incremental)\r
+*/\r
+uint64 KaxCluster::GlobalTimecode() const\r
+{\r
+       assert(bPreviousTimecodeIsSet);\r
+       uint64 result = MinTimecode;\r
+\r
+       if (result < PreviousTimecode)\r
+               result = PreviousTimecode + 1;\r
+       \r
+       return result;\r
+}\r
+\r
+/*!\r
+       \brief retrieve the relative \r
+       \todo !!! We need a way to know the TimecodeScale\r
+*/\r
+int16 KaxCluster::GetBlockLocalTimecode(uint64 aGlobalTimecode) const\r
+{\r
+       int64 TimecodeDelay = (int64(aGlobalTimecode) - int64(GlobalTimecode())) / int64(GlobalTimecodeScale());\r
+       assert(TimecodeDelay >= int16(0x8000) && TimecodeDelay <= int16(0x7FFF));\r
+       return int16(TimecodeDelay);\r
+}\r
+\r
+uint64 KaxCluster::GetBlockGlobalTimecode(int16 GlobalSavedTimecode)\r
+{\r
+       if (!bFirstFrameInside) {\r
+               KaxClusterTimecode * Timecode = static_cast<KaxClusterTimecode *>(this->FindElt(EBML_INFO(KaxClusterTimecode)));\r
+               assert (bFirstFrameInside); // use the InitTimecode() hack for now\r
+               MinTimecode = MaxTimecode = PreviousTimecode = *static_cast<EbmlUInteger *>(Timecode);\r
+               bFirstFrameInside = true;\r
+               bPreviousTimecodeIsSet = true;\r
+       }\r
+       return int64(GlobalSavedTimecode * GlobalTimecodeScale()) + GlobalTimecode();\r
+}\r
+\r
+KaxBlockGroup & KaxCluster::GetNewBlock()\r
+{\r
+       KaxBlockGroup & MyBlock = AddNewChild<KaxBlockGroup>(*this);\r
+       MyBlock.SetParent(*this);\r
+       return MyBlock;\r
+}\r
+\r
+void KaxCluster::ReleaseFrames()\r
+{\r
+       size_t Index;\r
+       \r
+       for (Index = 0; Index < ListSize(); Index++) {\r
+               if (EbmlId(*(*this)[Index]) == EBML_ID(KaxBlockGroup)) {\r
+                       static_cast<KaxBlockGroup*>((*this)[Index])->ReleaseFrames();\r
+               }\r
+       }\r
+}\r
+\r
+uint64 KaxCluster::GetPosition() const\r
+{\r
+       assert(ParentSegment != NULL);\r
+       return ParentSegment->GetRelativePosition(*this);\r
+}\r
+\r
+END_LIBMATROSKA_NAMESPACE\r
index 68b08f31c0db0c426750241d5e9a8f23e254db64..9bf6b99f13c30a3c4e5a0b5058e516e2ea418ab8 100644 (file)
@@ -1,67 +1,67 @@
-/****************************************************************************
-** libmatroska : parse Matroska files, see http://www.matroska.org/
-**
-** <file/class description>
-**
-** Copyright (C) 2002-2004 Steve Lhomme.  All rights reserved.
-**
-** This file is part of libmatroska.
-**
-** This library is free software; you can redistribute it and/or
-** modify it under the terms of the GNU Lesser General Public
-** License as published by the Free Software Foundation; either
-** version 2.1 of the License, or (at your option) any later version.
-** 
-** This library is distributed in the hope that it will be useful,
-** but WITHOUT ANY WARRANTY; without even the implied warranty of
-** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-** Lesser General Public License for more details.
-** 
-** You should have received a copy of the GNU Lesser General Public
-** License along with this library; if not, write to the Free Software
-** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-**
-** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**
-** Contact license@matroska.org if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-/*!
-       \file
-       \version \$Id: KaxClusterData.cpp 955 2004-11-28 15:24:37Z robux4 $
-       \author Steve Lhomme     <robux4 @ users.sf.net>
-*/
-#include "matroska/KaxClusterData.h"
-#include "matroska/KaxContexts.h"
-
-START_LIBMATROSKA_NAMESPACE
-
-EbmlId KaxClusterTimecode_TheId         (0xE7, 1);
-EbmlId KaxClusterSilentTracks_TheId     (0x5854, 2);
-EbmlId KaxClusterSilentTrackNumber_TheId(0x58D7, 2);
-EbmlId KaxClusterPrevSize_TheId         (0xAB, 1);
-EbmlId KaxClusterPosition_TheId         (0xA7, 1);
-
-EbmlSemantic KaxClusterSilentTracks_ContextList[1] =
-{
-       EbmlSemantic(false,  false, EBML_INFO(KaxClusterSilentTrackNumber)),
-};
-
-const EbmlSemanticContext KaxClusterTimecode_Context = EbmlSemanticContext(0, NULL, &KaxCluster_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxClusterTimecode));
-const EbmlSemanticContext KaxClusterSilentTracks_Context = EbmlSemanticContext(countof(KaxClusterSilentTracks_ContextList), KaxClusterSilentTracks_ContextList, &KaxCluster_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxClusterSilentTracks));
-const EbmlSemanticContext KaxClusterSilentTrackNumber_Context = EbmlSemanticContext(0, NULL, &KaxClusterSilentTracks_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxClusterSilentTrackNumber));
-const EbmlSemanticContext KaxClusterPosition_Context = EbmlSemanticContext(0, NULL, &KaxCluster_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxClusterPosition));
-const EbmlSemanticContext KaxClusterPrevSize_Context = EbmlSemanticContext(0, NULL, &KaxCluster_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxClusterPrevSize));
-
-const EbmlCallbacks KaxClusterTimecode::ClassInfos(KaxClusterTimecode::Create, KaxClusterTimecode_TheId, "ClusterTimecode", KaxClusterTimecode_Context);
-const EbmlCallbacks KaxClusterSilentTracks::ClassInfos(KaxClusterSilentTracks::Create, KaxClusterSilentTracks_TheId, "ClusterSilentTracks", KaxClusterSilentTracks_Context);
-const EbmlCallbacks KaxClusterSilentTrackNumber::ClassInfos(KaxClusterSilentTrackNumber::Create, KaxClusterSilentTrackNumber_TheId, "ClusterSilentTrackNumber", KaxClusterSilentTrackNumber_Context);
-const EbmlCallbacks KaxClusterPrevSize::ClassInfos(KaxClusterPrevSize::Create, KaxClusterPrevSize_TheId, "ClusterPrevSize", KaxClusterPrevSize_Context);
-const EbmlCallbacks KaxClusterPosition::ClassInfos(KaxClusterPosition::Create, KaxClusterPosition_TheId, "ClusterPosition", KaxClusterPosition_Context);
-
-KaxClusterSilentTracks::KaxClusterSilentTracks()
-:EbmlMaster(KaxClusterSilentTracks_Context)
-{}
-
-END_LIBMATROSKA_NAMESPACE
+/****************************************************************************\r
+** libmatroska : parse Matroska files, see http://www.matroska.org/\r
+**\r
+** <file/class description>\r
+**\r
+** Copyright (C) 2002-2010 Steve Lhomme.  All rights reserved.\r
+**\r
+** This file is part of libmatroska.\r
+**\r
+** This library is free software; you can redistribute it and/or\r
+** modify it under the terms of the GNU Lesser General Public\r
+** License as published by the Free Software Foundation; either\r
+** version 2.1 of the License, or (at your option) any later version.\r
+** \r
+** This library is distributed in the hope that it will be useful,\r
+** but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
+** Lesser General Public License for more details.\r
+** \r
+** You should have received a copy of the GNU Lesser General Public\r
+** License along with this library; if not, write to the Free Software\r
+** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\r
+**\r
+** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**\r
+** Contact license@matroska.org if any conditions of this licensing are\r
+** not clear to you.\r
+**\r
+**********************************************************************/\r
+\r
+/*!\r
+       \file\r
+       \version \$Id: KaxClusterData.cpp 955 2004-11-28 15:24:37Z robux4 $\r
+       \author Steve Lhomme     <robux4 @ users.sf.net>\r
+*/\r
+#include "matroska/KaxClusterData.h"\r
+#include "matroska/KaxContexts.h"\r
+\r
+START_LIBMATROSKA_NAMESPACE\r
+\r
+EbmlId KaxClusterTimecode_TheId         (0xE7, 1);\r
+EbmlId KaxClusterSilentTracks_TheId     (0x5854, 2);\r
+EbmlId KaxClusterSilentTrackNumber_TheId(0x58D7, 2);\r
+EbmlId KaxClusterPrevSize_TheId         (0xAB, 1);\r
+EbmlId KaxClusterPosition_TheId         (0xA7, 1);\r
+\r
+EbmlSemantic KaxClusterSilentTracks_ContextList[1] =\r
+{\r
+       EbmlSemantic(false,  false, EBML_INFO(KaxClusterSilentTrackNumber)),\r
+};\r
+\r
+const EbmlSemanticContext KaxClusterTimecode_Context = EbmlSemanticContext(0, NULL, &KaxCluster_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxClusterTimecode));\r
+const EbmlSemanticContext KaxClusterSilentTracks_Context = EbmlSemanticContext(countof(KaxClusterSilentTracks_ContextList), KaxClusterSilentTracks_ContextList, &KaxCluster_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxClusterSilentTracks));\r
+const EbmlSemanticContext KaxClusterSilentTrackNumber_Context = EbmlSemanticContext(0, NULL, &KaxClusterSilentTracks_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxClusterSilentTrackNumber));\r
+const EbmlSemanticContext KaxClusterPosition_Context = EbmlSemanticContext(0, NULL, &KaxCluster_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxClusterPosition));\r
+const EbmlSemanticContext KaxClusterPrevSize_Context = EbmlSemanticContext(0, NULL, &KaxCluster_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxClusterPrevSize));\r
+\r
+const EbmlCallbacks KaxClusterTimecode::ClassInfos(KaxClusterTimecode::Create, KaxClusterTimecode_TheId, "ClusterTimecode", KaxClusterTimecode_Context);\r
+const EbmlCallbacks KaxClusterSilentTracks::ClassInfos(KaxClusterSilentTracks::Create, KaxClusterSilentTracks_TheId, "ClusterSilentTracks", KaxClusterSilentTracks_Context);\r
+const EbmlCallbacks KaxClusterSilentTrackNumber::ClassInfos(KaxClusterSilentTrackNumber::Create, KaxClusterSilentTrackNumber_TheId, "ClusterSilentTrackNumber", KaxClusterSilentTrackNumber_Context);\r
+const EbmlCallbacks KaxClusterPrevSize::ClassInfos(KaxClusterPrevSize::Create, KaxClusterPrevSize_TheId, "ClusterPrevSize", KaxClusterPrevSize_Context);\r
+const EbmlCallbacks KaxClusterPosition::ClassInfos(KaxClusterPosition::Create, KaxClusterPosition_TheId, "ClusterPosition", KaxClusterPosition_Context);\r
+\r
+KaxClusterSilentTracks::KaxClusterSilentTracks()\r
+:EbmlMaster(KaxClusterSilentTracks_Context)\r
+{}\r
+\r
+END_LIBMATROSKA_NAMESPACE\r
index d6f698ccb3aca40d22f5f5efb3bf32e8b720709e..6d54da552e3cf85a91c56671486222ad55b84c38 100644 (file)
-/****************************************************************************
-** libmatroska : parse Matroska files, see http://www.matroska.org/
-**
-** <file/class description>
-**
-** Copyright (C) 2002-2004 Steve Lhomme.  All rights reserved.
-**
-** This file is part of libmatroska.
-**
-** This library is free software; you can redistribute it and/or
-** modify it under the terms of the GNU Lesser General Public
-** License as published by the Free Software Foundation; either
-** version 2.1 of the License, or (at your option) any later version.
-** 
-** This library is distributed in the hope that it will be useful,
-** but WITHOUT ANY WARRANTY; without even the implied warranty of
-** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-** Lesser General Public License for more details.
-** 
-** You should have received a copy of the GNU Lesser General Public
-** License along with this library; if not, write to the Free Software
-** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-**
-** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**
-** Contact license@matroska.org if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-/*!
-       \file
-       \version \$Id: KaxContentEncoding.cpp 640 2004-07-09 21:05:36Z mosu $
-       \author Moritz Bunkus <moritz @ bunkus.org>
-*/
-#include "matroska/KaxContentEncoding.h"
-#include "matroska/KaxContexts.h"
-
-START_LIBMATROSKA_NAMESPACE
-
-const EbmlSemantic KaxContentEncodings_ContextList[1] = {
-  EbmlSemantic(true, true, EBML_INFO(KaxContentEncoding)),
-};
-
-const EbmlSemantic KaxContentEncoding_ContextList[5] = {
-  EbmlSemantic(true, true, EBML_INFO(KaxContentEncodingOrder)),
-  EbmlSemantic(true, true, EBML_INFO(KaxContentEncodingScope)),
-  EbmlSemantic(true, true, EBML_INFO(KaxContentEncodingType)),
-  EbmlSemantic(false, true, EBML_INFO(KaxContentCompression)),
-  EbmlSemantic(false, true, EBML_INFO(KaxContentEncryption)),
-};
-
-const EbmlSemantic KaxContentCompression_ContextList[2] = {
-  EbmlSemantic(true, true, EBML_INFO(KaxContentCompAlgo)),
-  EbmlSemantic(false, true, EBML_INFO(KaxContentCompSettings)),
-};
-
-const EbmlSemantic KaxContentEncryption_ContextList[6] = {
-  EbmlSemantic(false, true, EBML_INFO(KaxContentEncAlgo)),
-  EbmlSemantic(false, true, EBML_INFO(KaxContentEncKeyID)),
-  EbmlSemantic(false, true, EBML_INFO(KaxContentSignature)),
-  EbmlSemantic(false, true, EBML_INFO(KaxContentSigKeyID)),
-  EbmlSemantic(false, true, EBML_INFO(KaxContentSigAlgo)),
-  EbmlSemantic(false, true, EBML_INFO(KaxContentSigHashAlgo)),
-};
-
-EbmlId KaxContentEncodings_TheId       (0x6d80, 2);
-EbmlId KaxContentEncoding_TheId        (0x6240, 2);
-EbmlId KaxContentEncodingOrder_TheId   (0x5031, 2);
-EbmlId KaxContentEncodingScope_TheId   (0x5032, 2);
-EbmlId KaxContentEncodingType_TheId    (0x5033, 2);
-EbmlId KaxContentCompression_TheId     (0x5034, 2);
-EbmlId KaxContentCompAlgo_TheId        (0x4254, 2);
-EbmlId KaxContentCompSettings_TheId    (0x4255, 2);
-EbmlId KaxContentEncryption_TheId      (0x5035, 2);
-EbmlId KaxContentEncAlgo_TheId         (0x47e1, 2);
-EbmlId KaxContentEncKeyID_TheId        (0x47e2, 2);
-EbmlId KaxContentSignature_TheId       (0x47e3, 2);
-EbmlId KaxContentSigKeyID_TheId        (0x47e4, 2);
-EbmlId KaxContentSigAlgo_TheId         (0x47e5, 2);
-EbmlId KaxContentSigHashAlgo_TheId     (0x47e6, 2);
-const EbmlSemanticContext KaxContentEncodings_Context =
-EbmlSemanticContext(countof(KaxContentEncodings_ContextList),
-                    KaxContentEncodings_ContextList, &KaxTrackEntry_Context,
-                    *GetKaxGlobal_Context,
-                    &EBML_INFO(KaxContentEncodings));
-
-const EbmlSemanticContext KaxContentEncoding_Context =
-EbmlSemanticContext(countof(KaxContentEncoding_ContextList),
-                    KaxContentEncoding_ContextList,
-                    &KaxContentEncodings_Context,
-                    *GetKaxGlobal_Context,
-                    &EBML_INFO(KaxContentEncoding));
-
-const EbmlSemanticContext KaxContentEncodingOrder_Context =
-EbmlSemanticContext(0, NULL, &KaxContentEncoding_Context,
-                    *GetKaxGlobal_Context,
-                    &EBML_INFO(KaxContentEncodingOrder));
-
-const EbmlSemanticContext KaxContentEncodingScope_Context =
-EbmlSemanticContext(0, NULL, &KaxContentEncoding_Context,
-                    *GetKaxGlobal_Context,
-                    &EBML_INFO(KaxContentEncodingScope));
-
-const EbmlSemanticContext KaxContentEncodingType_Context =
-EbmlSemanticContext(0, NULL, &KaxContentEncoding_Context,
-                    *GetKaxGlobal_Context,
-                    &EBML_INFO(KaxContentEncodingType));
-
-const EbmlSemanticContext KaxContentCompression_Context =
-EbmlSemanticContext(countof(KaxContentCompression_ContextList),
-                    KaxContentCompression_ContextList,
-                    &KaxContentEncoding_Context, *GetKaxGlobal_Context,
-                    &EBML_INFO(KaxContentCompression));
-
-const EbmlSemanticContext KaxContentCompAlgo_Context =
-EbmlSemanticContext(0, NULL, &KaxContentCompression_Context,
-                    *GetKaxGlobal_Context,
-                    &EBML_INFO(KaxContentCompAlgo));
-
-const EbmlSemanticContext KaxContentCompSettings_Context =
-EbmlSemanticContext(0, NULL, &KaxContentCompression_Context,
-                    *GetKaxGlobal_Context,
-                    &EBML_INFO(KaxContentCompSettings));
-
-const EbmlSemanticContext KaxContentEncryption_Context =
-EbmlSemanticContext(countof(KaxContentEncryption_ContextList),
-                    KaxContentEncryption_ContextList,
-                    &KaxContentEncoding_Context, *GetKaxGlobal_Context,
-                    &EBML_INFO(KaxContentEncryption));
-
-const EbmlSemanticContext KaxContentEncAlgo_Context =
-EbmlSemanticContext(0, NULL, &KaxContentEncryption_Context,
-                    *GetKaxGlobal_Context,
-                    &EBML_INFO(KaxContentEncAlgo));
-
-const EbmlSemanticContext KaxContentEncKeyID_Context =
-EbmlSemanticContext(0, NULL, &KaxContentEncryption_Context,
-                    *GetKaxGlobal_Context,
-                    &EBML_INFO(KaxContentEncKeyID));
-
-const EbmlSemanticContext KaxContentSignature_Context =
-EbmlSemanticContext(0, NULL, &KaxContentEncryption_Context,
-                    *GetKaxGlobal_Context,
-                    &EBML_INFO(KaxContentSignature));
-
-const EbmlSemanticContext KaxContentSigAlgo_Context =
-EbmlSemanticContext(0, NULL, &KaxContentEncryption_Context,
-                    *GetKaxGlobal_Context,
-                    &EBML_INFO(KaxContentSigKeyID));
-
-const EbmlSemanticContext KaxContentSigHashAlgo_Context =
-EbmlSemanticContext(0, NULL, &KaxContentEncryption_Context,
-                    *GetKaxGlobal_Context,
-                    &EBML_INFO(KaxContentSigKeyID));
-
-const EbmlSemanticContext KaxContentSigKeyID_Context =
-EbmlSemanticContext(0, NULL, &KaxContentEncryption_Context,
-                    *GetKaxGlobal_Context,
-                    &EBML_INFO(KaxContentSigKeyID));
-
-const EbmlCallbacks
-KaxContentEncodings::ClassInfos(KaxContentEncodings::Create,
-                                KaxContentEncodings_TheId,
-                                "ContentEncodings",
-                                KaxContentEncodings_Context);
-const EbmlCallbacks
-KaxContentEncoding::ClassInfos(KaxContentEncoding::Create,
-                               KaxContentEncoding_TheId,
-                               "ContentEncoding",
-                               KaxContentEncoding_Context);
-const EbmlCallbacks
-KaxContentEncodingOrder::ClassInfos(KaxContentEncodingOrder::Create,
-                                    KaxContentEncodingOrder_TheId,
-                                    "ContentEncodingOrder",
-                                    KaxContentEncodingOrder_Context);
-const EbmlCallbacks
-KaxContentEncodingScope::ClassInfos(KaxContentEncodingScope::Create,
-                                    KaxContentEncodingScope_TheId,
-                                    "ContentEncodingScope",
-                                    KaxContentEncodingScope_Context);
-const EbmlCallbacks
-KaxContentEncodingType::ClassInfos(KaxContentEncodingType::Create,
-                                   KaxContentEncodingType_TheId,
-                                   "ContentEncodingType",
-                                   KaxContentEncodingType_Context);
-const EbmlCallbacks
-KaxContentCompression::ClassInfos(KaxContentCompression::Create,
-                                  KaxContentCompression_TheId,
-                                  "ContentCompression",
-                                  KaxContentCompression_Context);
-const EbmlCallbacks
-KaxContentCompAlgo::ClassInfos(KaxContentCompAlgo::Create,
-                               KaxContentCompAlgo_TheId,
-                               "ContentCompAlgo",
-                               KaxContentCompAlgo_Context);
-const EbmlCallbacks
-KaxContentCompSettings::ClassInfos(KaxContentCompSettings::Create,
-                                   KaxContentCompSettings_TheId,
-                                   "ContentCompSettings",
-                                   KaxContentCompSettings_Context);
-const EbmlCallbacks
-KaxContentEncryption::ClassInfos(KaxContentEncryption::Create,
-                                 KaxContentEncryption_TheId,
-                                 "ContentEncryption",
-                                 KaxContentEncryption_Context);
-const EbmlCallbacks
-KaxContentEncAlgo::ClassInfos(KaxContentEncAlgo::Create,
-                              KaxContentEncAlgo_TheId,
-                              "ContentEncAlgo",
-                              KaxContentEncAlgo_Context);
-const EbmlCallbacks
-KaxContentEncKeyID::ClassInfos(KaxContentEncKeyID::Create,
-                               KaxContentEncKeyID_TheId,
-                               "ContentEncKeyID",
-                               KaxContentEncKeyID_Context);
-const EbmlCallbacks
-KaxContentSignature::ClassInfos(KaxContentSignature::Create,
-                                KaxContentSignature_TheId,
-                                "ContentSignature",
-                                KaxContentSignature_Context);
-const EbmlCallbacks
-KaxContentSigAlgo::ClassInfos(KaxContentSigAlgo::Create,
-                              KaxContentSigAlgo_TheId,
-                              "ContentSigAlgo",
-                              KaxContentSigAlgo_Context);
-const EbmlCallbacks
-KaxContentSigHashAlgo::ClassInfos(KaxContentSigHashAlgo::Create,
-                                  KaxContentSigHashAlgo_TheId,
-                                  "ContentSigHashAlgo",
-                                  KaxContentSigHashAlgo_Context);
-const EbmlCallbacks
-KaxContentSigKeyID::ClassInfos(KaxContentSigKeyID::Create,
-                               KaxContentSigKeyID_TheId,
-                               "ContentSigKeyID",
-                               KaxContentSigKeyID_Context);
-
-KaxContentEncodings::KaxContentEncodings():
-  EbmlMaster(KaxContentEncodings_Context) {
-}
-
-KaxContentEncoding::KaxContentEncoding():
-  EbmlMaster(KaxContentEncoding_Context) {
-}
-
-KaxContentCompression::KaxContentCompression():
-  EbmlMaster(KaxContentCompression_Context) {
-}
-
-KaxContentEncryption::KaxContentEncryption():
-  EbmlMaster(KaxContentEncryption_Context) {
-}
-
-END_LIBMATROSKA_NAMESPACE
+/****************************************************************************\r
+** libmatroska : parse Matroska files, see http://www.matroska.org/\r
+**\r
+** <file/class description>\r
+**\r
+** Copyright (C) 2002-2010 Steve Lhomme.  All rights reserved.\r
+**\r
+** This file is part of libmatroska.\r
+**\r
+** This library is free software; you can redistribute it and/or\r
+** modify it under the terms of the GNU Lesser General Public\r
+** License as published by the Free Software Foundation; either\r
+** version 2.1 of the License, or (at your option) any later version.\r
+** \r
+** This library is distributed in the hope that it will be useful,\r
+** but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
+** Lesser General Public License for more details.\r
+** \r
+** You should have received a copy of the GNU Lesser General Public\r
+** License along with this library; if not, write to the Free Software\r
+** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\r
+**\r
+** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**\r
+** Contact license@matroska.org if any conditions of this licensing are\r
+** not clear to you.\r
+**\r
+**********************************************************************/\r
+\r
+/*!\r
+       \file\r
+       \version \$Id: KaxContentEncoding.cpp 640 2004-07-09 21:05:36Z mosu $\r
+       \author Moritz Bunkus <moritz @ bunkus.org>\r
+*/\r
+#include "matroska/KaxContentEncoding.h"\r
+#include "matroska/KaxContexts.h"\r
+\r
+START_LIBMATROSKA_NAMESPACE\r
+\r
+const EbmlSemantic KaxContentEncodings_ContextList[1] = {\r
+  EbmlSemantic(true, true, EBML_INFO(KaxContentEncoding)),\r
+};\r
+\r
+const EbmlSemantic KaxContentEncoding_ContextList[5] = {\r
+  EbmlSemantic(true, true, EBML_INFO(KaxContentEncodingOrder)),\r
+  EbmlSemantic(true, true, EBML_INFO(KaxContentEncodingScope)),\r
+  EbmlSemantic(true, true, EBML_INFO(KaxContentEncodingType)),\r
+  EbmlSemantic(false, true, EBML_INFO(KaxContentCompression)),\r
+  EbmlSemantic(false, true, EBML_INFO(KaxContentEncryption)),\r
+};\r
+\r
+const EbmlSemantic KaxContentCompression_ContextList[2] = {\r
+  EbmlSemantic(true, true, EBML_INFO(KaxContentCompAlgo)),\r
+  EbmlSemantic(false, true, EBML_INFO(KaxContentCompSettings)),\r
+};\r
+\r
+const EbmlSemantic KaxContentEncryption_ContextList[6] = {\r
+  EbmlSemantic(false, true, EBML_INFO(KaxContentEncAlgo)),\r
+  EbmlSemantic(false, true, EBML_INFO(KaxContentEncKeyID)),\r
+  EbmlSemantic(false, true, EBML_INFO(KaxContentSignature)),\r
+  EbmlSemantic(false, true, EBML_INFO(KaxContentSigKeyID)),\r
+  EbmlSemantic(false, true, EBML_INFO(KaxContentSigAlgo)),\r
+  EbmlSemantic(false, true, EBML_INFO(KaxContentSigHashAlgo)),\r
+};\r
+\r
+EbmlId KaxContentEncodings_TheId       (0x6d80, 2);\r
+EbmlId KaxContentEncoding_TheId        (0x6240, 2);\r
+EbmlId KaxContentEncodingOrder_TheId   (0x5031, 2);\r
+EbmlId KaxContentEncodingScope_TheId   (0x5032, 2);\r
+EbmlId KaxContentEncodingType_TheId    (0x5033, 2);\r
+EbmlId KaxContentCompression_TheId     (0x5034, 2);\r
+EbmlId KaxContentCompAlgo_TheId        (0x4254, 2);\r
+EbmlId KaxContentCompSettings_TheId    (0x4255, 2);\r
+EbmlId KaxContentEncryption_TheId      (0x5035, 2);\r
+EbmlId KaxContentEncAlgo_TheId         (0x47e1, 2);\r
+EbmlId KaxContentEncKeyID_TheId        (0x47e2, 2);\r
+EbmlId KaxContentSignature_TheId       (0x47e3, 2);\r
+EbmlId KaxContentSigKeyID_TheId        (0x47e4, 2);\r
+EbmlId KaxContentSigAlgo_TheId         (0x47e5, 2);\r
+EbmlId KaxContentSigHashAlgo_TheId     (0x47e6, 2);\r
\r
+const EbmlSemanticContext KaxContentEncodings_Context =\r
+EbmlSemanticContext(countof(KaxContentEncodings_ContextList),\r
+                    KaxContentEncodings_ContextList, &KaxTrackEntry_Context,\r
+                    *GetKaxGlobal_Context,\r
+                    &EBML_INFO(KaxContentEncodings));\r
+\r
+const EbmlSemanticContext KaxContentEncoding_Context =\r
+EbmlSemanticContext(countof(KaxContentEncoding_ContextList),\r
+                    KaxContentEncoding_ContextList,\r
+                    &KaxContentEncodings_Context,\r
+                    *GetKaxGlobal_Context,\r
+                    &EBML_INFO(KaxContentEncoding));\r
+\r
+const EbmlSemanticContext KaxContentEncodingOrder_Context =\r
+EbmlSemanticContext(0, NULL, &KaxContentEncoding_Context,\r
+                    *GetKaxGlobal_Context,\r
+                    &EBML_INFO(KaxContentEncodingOrder));\r
+\r
+const EbmlSemanticContext KaxContentEncodingScope_Context =\r
+EbmlSemanticContext(0, NULL, &KaxContentEncoding_Context,\r
+                    *GetKaxGlobal_Context,\r
+                    &EBML_INFO(KaxContentEncodingScope));\r
+\r
+const EbmlSemanticContext KaxContentEncodingType_Context =\r
+EbmlSemanticContext(0, NULL, &KaxContentEncoding_Context,\r
+                    *GetKaxGlobal_Context,\r
+                    &EBML_INFO(KaxContentEncodingType));\r
+\r
+const EbmlSemanticContext KaxContentCompression_Context =\r
+EbmlSemanticContext(countof(KaxContentCompression_ContextList),\r
+                    KaxContentCompression_ContextList,\r
+                    &KaxContentEncoding_Context, *GetKaxGlobal_Context,\r
+                    &EBML_INFO(KaxContentCompression));\r
+\r
+const EbmlSemanticContext KaxContentCompAlgo_Context =\r
+EbmlSemanticContext(0, NULL, &KaxContentCompression_Context,\r
+                    *GetKaxGlobal_Context,\r
+                    &EBML_INFO(KaxContentCompAlgo));\r
+\r
+const EbmlSemanticContext KaxContentCompSettings_Context =\r
+EbmlSemanticContext(0, NULL, &KaxContentCompression_Context,\r
+                    *GetKaxGlobal_Context,\r
+                    &EBML_INFO(KaxContentCompSettings));\r
+\r
+const EbmlSemanticContext KaxContentEncryption_Context =\r
+EbmlSemanticContext(countof(KaxContentEncryption_ContextList),\r
+                    KaxContentEncryption_ContextList,\r
+                    &KaxContentEncoding_Context, *GetKaxGlobal_Context,\r
+                    &EBML_INFO(KaxContentEncryption));\r
+\r
+const EbmlSemanticContext KaxContentEncAlgo_Context =\r
+EbmlSemanticContext(0, NULL, &KaxContentEncryption_Context,\r
+                    *GetKaxGlobal_Context,\r
+                    &EBML_INFO(KaxContentEncAlgo));\r
+\r
+const EbmlSemanticContext KaxContentEncKeyID_Context =\r
+EbmlSemanticContext(0, NULL, &KaxContentEncryption_Context,\r
+                    *GetKaxGlobal_Context,\r
+                    &EBML_INFO(KaxContentEncKeyID));\r
+\r
+const EbmlSemanticContext KaxContentSignature_Context =\r
+EbmlSemanticContext(0, NULL, &KaxContentEncryption_Context,\r
+                    *GetKaxGlobal_Context,\r
+                    &EBML_INFO(KaxContentSignature));\r
+\r
+const EbmlSemanticContext KaxContentSigAlgo_Context =\r
+EbmlSemanticContext(0, NULL, &KaxContentEncryption_Context,\r
+                    *GetKaxGlobal_Context,\r
+                    &EBML_INFO(KaxContentSigKeyID));\r
+\r
+const EbmlSemanticContext KaxContentSigHashAlgo_Context =\r
+EbmlSemanticContext(0, NULL, &KaxContentEncryption_Context,\r
+                    *GetKaxGlobal_Context,\r
+                    &EBML_INFO(KaxContentSigKeyID));\r
+\r
+const EbmlSemanticContext KaxContentSigKeyID_Context =\r
+EbmlSemanticContext(0, NULL, &KaxContentEncryption_Context,\r
+                    *GetKaxGlobal_Context,\r
+                    &EBML_INFO(KaxContentSigKeyID));\r
+\r
+const EbmlCallbacks\r
+KaxContentEncodings::ClassInfos(KaxContentEncodings::Create,\r
+                                KaxContentEncodings_TheId,\r
+                                "ContentEncodings",\r
+                                KaxContentEncodings_Context);\r
+const EbmlCallbacks\r
+KaxContentEncoding::ClassInfos(KaxContentEncoding::Create,\r
+                               KaxContentEncoding_TheId,\r
+                               "ContentEncoding",\r
+                               KaxContentEncoding_Context);\r
+const EbmlCallbacks\r
+KaxContentEncodingOrder::ClassInfos(KaxContentEncodingOrder::Create,\r
+                                    KaxContentEncodingOrder_TheId,\r
+                                    "ContentEncodingOrder",\r
+                                    KaxContentEncodingOrder_Context);\r
+const EbmlCallbacks\r
+KaxContentEncodingScope::ClassInfos(KaxContentEncodingScope::Create,\r
+                                    KaxContentEncodingScope_TheId,\r
+                                    "ContentEncodingScope",\r
+                                    KaxContentEncodingScope_Context);\r
+const EbmlCallbacks\r
+KaxContentEncodingType::ClassInfos(KaxContentEncodingType::Create,\r
+                                   KaxContentEncodingType_TheId,\r
+                                   "ContentEncodingType",\r
+                                   KaxContentEncodingType_Context);\r
+const EbmlCallbacks\r
+KaxContentCompression::ClassInfos(KaxContentCompression::Create,\r
+                                  KaxContentCompression_TheId,\r
+                                  "ContentCompression",\r
+                                  KaxContentCompression_Context);\r
+const EbmlCallbacks\r
+KaxContentCompAlgo::ClassInfos(KaxContentCompAlgo::Create,\r
+                               KaxContentCompAlgo_TheId,\r
+                               "ContentCompAlgo",\r
+                               KaxContentCompAlgo_Context);\r
+const EbmlCallbacks\r
+KaxContentCompSettings::ClassInfos(KaxContentCompSettings::Create,\r
+                                   KaxContentCompSettings_TheId,\r
+                                   "ContentCompSettings",\r
+                                   KaxContentCompSettings_Context);\r
+const EbmlCallbacks\r
+KaxContentEncryption::ClassInfos(KaxContentEncryption::Create,\r
+                                 KaxContentEncryption_TheId,\r
+                                 "ContentEncryption",\r
+                                 KaxContentEncryption_Context);\r
+const EbmlCallbacks\r
+KaxContentEncAlgo::ClassInfos(KaxContentEncAlgo::Create,\r
+                              KaxContentEncAlgo_TheId,\r
+                              "ContentEncAlgo",\r
+                              KaxContentEncAlgo_Context);\r
+const EbmlCallbacks\r
+KaxContentEncKeyID::ClassInfos(KaxContentEncKeyID::Create,\r
+                               KaxContentEncKeyID_TheId,\r
+                               "ContentEncKeyID",\r
+                               KaxContentEncKeyID_Context);\r
+const EbmlCallbacks\r
+KaxContentSignature::ClassInfos(KaxContentSignature::Create,\r
+                                KaxContentSignature_TheId,\r
+                                "ContentSignature",\r
+                                KaxContentSignature_Context);\r
+const EbmlCallbacks\r
+KaxContentSigAlgo::ClassInfos(KaxContentSigAlgo::Create,\r
+                              KaxContentSigAlgo_TheId,\r
+                              "ContentSigAlgo",\r
+                              KaxContentSigAlgo_Context);\r
+const EbmlCallbacks\r
+KaxContentSigHashAlgo::ClassInfos(KaxContentSigHashAlgo::Create,\r
+                                  KaxContentSigHashAlgo_TheId,\r
+                                  "ContentSigHashAlgo",\r
+                                  KaxContentSigHashAlgo_Context);\r
+const EbmlCallbacks\r
+KaxContentSigKeyID::ClassInfos(KaxContentSigKeyID::Create,\r
+                               KaxContentSigKeyID_TheId,\r
+                               "ContentSigKeyID",\r
+                               KaxContentSigKeyID_Context);\r
+\r
+KaxContentEncodings::KaxContentEncodings():\r
+  EbmlMaster(KaxContentEncodings_Context) {\r
+}\r
+\r
+KaxContentEncoding::KaxContentEncoding():\r
+  EbmlMaster(KaxContentEncoding_Context) {\r
+}\r
+\r
+KaxContentCompression::KaxContentCompression():\r
+  EbmlMaster(KaxContentCompression_Context) {\r
+}\r
+\r
+KaxContentEncryption::KaxContentEncryption():\r
+  EbmlMaster(KaxContentEncryption_Context) {\r
+}\r
+\r
+END_LIBMATROSKA_NAMESPACE\r
index 2e128ce17181b58b04991867de7f2ad3344df2ce..af8651fc97a2268fc4f7a785e5f6f5b17721d58c 100644 (file)
@@ -1,48 +1,48 @@
-/****************************************************************************
-** libmatroska : parse Matroska files, see http://www.matroska.org/
-**
-** <file/class description>
-**
-** Copyright (C) 2002-2004 Steve Lhomme.  All rights reserved.
-**
-** This file is part of libmatroska.
-**
-** This library is free software; you can redistribute it and/or
-** modify it under the terms of the GNU Lesser General Public
-** License as published by the Free Software Foundation; either
-** version 2.1 of the License, or (at your option) any later version.
-** 
-** This library is distributed in the hope that it will be useful,
-** but WITHOUT ANY WARRANTY; without even the implied warranty of
-** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-** Lesser General Public License for more details.
-** 
-** You should have received a copy of the GNU Lesser General Public
-** License along with this library; if not, write to the Free Software
-** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-**
-** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**
-** Contact license@matroska.org if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-/*!
-       \file
-       \version \$Id: KaxContexts.cpp 640 2004-07-09 21:05:36Z mosu $
-       \author Steve Lhomme     <robux4 @ users.sf.net>
-*/
-#include "ebml/EbmlContexts.h"
-#include "matroska/KaxContexts.h"
-
-using namespace LIBEBML_NAMESPACE;
-
-START_LIBMATROSKA_NAMESPACE
-
-// for the moment
-const EbmlSemanticContext & GetKaxGlobal_Context()
-{
-       return GetEbmlGlobal_Context();
-}
-
-END_LIBMATROSKA_NAMESPACE
+/****************************************************************************\r
+** libmatroska : parse Matroska files, see http://www.matroska.org/\r
+**\r
+** <file/class description>\r
+**\r
+** Copyright (C) 2002-2010 Steve Lhomme.  All rights reserved.\r
+**\r
+** This file is part of libmatroska.\r
+**\r
+** This library is free software; you can redistribute it and/or\r
+** modify it under the terms of the GNU Lesser General Public\r
+** License as published by the Free Software Foundation; either\r
+** version 2.1 of the License, or (at your option) any later version.\r
+** \r
+** This library is distributed in the hope that it will be useful,\r
+** but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
+** Lesser General Public License for more details.\r
+** \r
+** You should have received a copy of the GNU Lesser General Public\r
+** License along with this library; if not, write to the Free Software\r
+** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\r
+**\r
+** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**\r
+** Contact license@matroska.org if any conditions of this licensing are\r
+** not clear to you.\r
+**\r
+**********************************************************************/\r
+\r
+/*!\r
+       \file\r
+       \version \$Id: KaxContexts.cpp 640 2004-07-09 21:05:36Z mosu $\r
+       \author Steve Lhomme     <robux4 @ users.sf.net>\r
+*/\r
+#include "ebml/EbmlContexts.h"\r
+#include "matroska/KaxContexts.h"\r
+\r
+using namespace LIBEBML_NAMESPACE;\r
+\r
+START_LIBMATROSKA_NAMESPACE\r
+\r
+// for the moment\r
+const EbmlSemanticContext & GetKaxGlobal_Context()\r
+{\r
+       return GetEbmlGlobal_Context();\r
+}\r
+\r
+END_LIBMATROSKA_NAMESPACE\r
index e3007d54b7f5cd6adf6ac23ea25cf80bcca44f70..e998eb3d7c5cb1371954de6a7341f4bc08dec859 100644 (file)
-/****************************************************************************
-** libmatroska : parse Matroska files, see http://www.matroska.org/
-**
-** <file/class description>
-**
-** Copyright (C) 2002-2005 Steve Lhomme.  All rights reserved.
-**
-** This library is free software; you can redistribute it and/or
-** modify it under the terms of the GNU Lesser General Public
-** License as published by the Free Software Foundation; either
-** version 2.1 of the License, or (at your option) any later version.
-** 
-** This library is distributed in the hope that it will be useful,
-** but WITHOUT ANY WARRANTY; without even the implied warranty of
-** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-** Lesser General Public License for more details.
-** 
-** You should have received a copy of the GNU Lesser General Public
-** License along with this library; if not, write to the Free Software
-** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-**
-** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**
-** Contact license@matroska.org if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-/*!
-       \file
-       \version \$Id: KaxCues.cpp 1265 2007-01-14 17:20:35Z mosu $
-       \author Steve Lhomme     <robux4 @ users.sf.net>
-*/
-#include <cassert>
-
-#include "matroska/KaxCues.h"
-#include "matroska/KaxCuesData.h"
-#include "matroska/KaxContexts.h"
-#include "ebml/EbmlStream.h"
-
-// sub elements
-START_LIBMATROSKA_NAMESPACE
-
-EbmlSemantic KaxCues_ContextList[1] = 
-{
-       EbmlSemantic(true,  false,  EBML_INFO(KaxCuePoint)),
-};
-
-const EbmlSemanticContext KaxCues_Context = EbmlSemanticContext(countof(KaxCues_ContextList), KaxCues_ContextList, &KaxSegment_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxCues));
-
-EbmlId KaxCues_TheId(0x1C53BB6B, 4);
-const EbmlCallbacks KaxCues::ClassInfos(KaxCues::Create, KaxCues_TheId, "Cues", KaxCues_Context);
-
-KaxCues::KaxCues()
-       :EbmlMaster(KaxCues_Context)
-{}
-
-KaxCues::~KaxCues()
-{
-       assert(myTempReferences.size() == 0); // otherwise that means you have added references and forgot to set the position
-}
-
-bool KaxCues::AddBlockGroup(const KaxBlockGroup & BlockRef)
-{
-       // Do not add the element if it's already present.
-       std::vector<const KaxBlockBlob *>::iterator ListIdx;
-       KaxBlockBlob &BlockReference = *(new KaxBlockBlob(BLOCK_BLOB_NO_SIMPLE));
-       BlockReference.SetBlockGroup(*const_cast<KaxBlockGroup*>(&BlockRef));
-
-       for (ListIdx = myTempReferences.begin(); ListIdx != myTempReferences.end(); ListIdx++)
-               if (*ListIdx == &BlockReference)
-                       return true;
-
-       myTempReferences.push_back(&BlockReference);
-       return true;
-}
-
-bool KaxCues::AddBlockBlob(const KaxBlockBlob & BlockReference)
-{
-       // Do not add the element if it's already present.
-       std::vector<const KaxBlockBlob *>::iterator ListIdx;
-
-       for (ListIdx = myTempReferences.begin(); ListIdx != myTempReferences.end(); ListIdx++)
-               if (*ListIdx == &BlockReference)
-                       return true;
-
-       myTempReferences.push_back(&BlockReference);
-       return true;
-}
-
-void KaxCues::PositionSet(const KaxBlockBlob & BlockReference)
-{
-       // look for the element in the temporary references
-       std::vector<const KaxBlockBlob *>::iterator ListIdx;
-
-       for (ListIdx = myTempReferences.begin(); ListIdx != myTempReferences.end(); ListIdx++) {
-               if (*ListIdx == &BlockReference) {
-                       // found, now add the element to the entry list
-                       KaxCuePoint & NewPoint = AddNewChild<KaxCuePoint>(*this);
-                       NewPoint.PositionSet(BlockReference, GlobalTimecodeScale());
-                       myTempReferences.erase(ListIdx);
-                       break;
-               }
-       }
-}
-
-void KaxCues::PositionSet(const KaxBlockGroup & BlockRef)
-{
-       // look for the element in the temporary references
-       std::vector<const KaxBlockBlob *>::iterator ListIdx;
-
-       for (ListIdx = myTempReferences.begin(); ListIdx != myTempReferences.end(); ListIdx++) {
-               const KaxInternalBlock &refTmp = **ListIdx;
-               if (refTmp.GlobalTimecode() == BlockRef.GlobalTimecode() &&
-                       refTmp.TrackNum() == BlockRef.TrackNumber()) {
-                       // found, now add the element to the entry list
-                       KaxCuePoint & NewPoint = AddNewChild<KaxCuePoint>(*this);
-                       NewPoint.PositionSet(**ListIdx, GlobalTimecodeScale());
-                       myTempReferences.erase(ListIdx);
-                       break;
-               }
-       }
-}
-
-/*!
-       \warning Assume that the list has been sorted (Sort())
-*/
-const KaxCuePoint * KaxCues::GetTimecodePoint(uint64 aTimecode) const
-{
-       uint64 TimecodeToLocate = aTimecode / GlobalTimecodeScale();
-       const KaxCuePoint * aPointPrev = NULL;
-       uint64 aPrevTime = 0;
-       const KaxCuePoint * aPointNext = NULL;
-       uint64 aNextTime = EBML_PRETTYLONGINT(0xFFFFFFFFFFFF);
-
-       for (unsigned int i=0; i<ListSize(); i++)
-       {
-               if (EbmlId(*(*this)[i]) == EBML_ID(KaxCuePoint)) {
-                       const KaxCuePoint *tmp = static_cast<const KaxCuePoint *>((*this)[i]);
-                       // check the tile
-                       const KaxCueTime *aTime = static_cast<const KaxCueTime *>(tmp->FindFirstElt(EBML_INFO(KaxCueTime)));
-                       if (aTime != NULL)
-                       {
-                               uint64 _Time = uint64(*aTime);
-                               if (_Time > aPrevTime && _Time < TimecodeToLocate) {
-                                       aPrevTime = _Time;
-                                       aPointPrev = tmp;
-                               }
-                               if (_Time < aNextTime && _Time > TimecodeToLocate) {
-                                       aNextTime= _Time;
-                                       aPointNext = tmp;
-                               }
-                       }
-               }
-       }
-
-       return aPointPrev;
-}
-
-uint64 KaxCues::GetTimecodePosition(uint64 aTimecode) const
-{
-       const KaxCuePoint * aPoint = GetTimecodePoint(aTimecode);
-       if (aPoint == NULL)
-               return 0;
-
-       const KaxCueTrackPositions * aTrack = aPoint->GetSeekPosition();
-       if (aTrack == NULL)
-               return 0;
-
-       return aTrack->ClusterPosition();
-}
-
-END_LIBMATROSKA_NAMESPACE
+/****************************************************************************\r
+** libmatroska : parse Matroska files, see http://www.matroska.org/\r
+**\r
+** <file/class description>\r
+**\r
+** Copyright (C) 2002-2010 Steve Lhomme.  All rights reserved.\r
+**\r
+** This library is free software; you can redistribute it and/or\r
+** modify it under the terms of the GNU Lesser General Public\r
+** License as published by the Free Software Foundation; either\r
+** version 2.1 of the License, or (at your option) any later version.\r
+** \r
+** This library is distributed in the hope that it will be useful,\r
+** but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
+** Lesser General Public License for more details.\r
+** \r
+** You should have received a copy of the GNU Lesser General Public\r
+** License along with this library; if not, write to the Free Software\r
+** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\r
+**\r
+** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**\r
+** Contact license@matroska.org if any conditions of this licensing are\r
+** not clear to you.\r
+**\r
+**********************************************************************/\r
+\r
+/*!\r
+       \file\r
+       \version \$Id: KaxCues.cpp 1265 2007-01-14 17:20:35Z mosu $\r
+       \author Steve Lhomme     <robux4 @ users.sf.net>\r
+*/\r
+#include <cassert>\r
+\r
+#include "matroska/KaxCues.h"\r
+#include "matroska/KaxCuesData.h"\r
+#include "matroska/KaxContexts.h"\r
+#include "ebml/EbmlStream.h"\r
+\r
+// sub elements\r
+START_LIBMATROSKA_NAMESPACE\r
+\r
+EbmlSemantic KaxCues_ContextList[1] = \r
+{\r
+       EbmlSemantic(true,  false,  EBML_INFO(KaxCuePoint)),\r
+};\r
+\r
+const EbmlSemanticContext KaxCues_Context = EbmlSemanticContext(countof(KaxCues_ContextList), KaxCues_ContextList, &KaxSegment_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxCues));\r
+\r
+EbmlId KaxCues_TheId(0x1C53BB6B, 4);\r
+const EbmlCallbacks KaxCues::ClassInfos(KaxCues::Create, KaxCues_TheId, "Cues", KaxCues_Context);\r
+\r
+KaxCues::KaxCues()\r
+       :EbmlMaster(KaxCues_Context)\r
+{}\r
+\r
+KaxCues::~KaxCues()\r
+{\r
+       assert(myTempReferences.size() == 0); // otherwise that means you have added references and forgot to set the position\r
+}\r
+\r
+bool KaxCues::AddBlockGroup(const KaxBlockGroup & BlockRef)\r
+{\r
+       // Do not add the element if it's already present.\r
+       std::vector<const KaxBlockBlob *>::iterator ListIdx;\r
+       KaxBlockBlob &BlockReference = *(new KaxBlockBlob(BLOCK_BLOB_NO_SIMPLE));\r
+       BlockReference.SetBlockGroup(*const_cast<KaxBlockGroup*>(&BlockRef));\r
+\r
+       for (ListIdx = myTempReferences.begin(); ListIdx != myTempReferences.end(); ListIdx++)\r
+               if (*ListIdx == &BlockReference)\r
+                       return true;\r
+\r
+       myTempReferences.push_back(&BlockReference);\r
+       return true;\r
+}\r
+\r
+bool KaxCues::AddBlockBlob(const KaxBlockBlob & BlockReference)\r
+{\r
+       // Do not add the element if it's already present.\r
+       std::vector<const KaxBlockBlob *>::iterator ListIdx;\r
+\r
+       for (ListIdx = myTempReferences.begin(); ListIdx != myTempReferences.end(); ListIdx++)\r
+               if (*ListIdx == &BlockReference)\r
+                       return true;\r
+\r
+       myTempReferences.push_back(&BlockReference);\r
+       return true;\r
+}\r
+\r
+void KaxCues::PositionSet(const KaxBlockBlob & BlockReference)\r
+{\r
+       // look for the element in the temporary references\r
+       std::vector<const KaxBlockBlob *>::iterator ListIdx;\r
+\r
+       for (ListIdx = myTempReferences.begin(); ListIdx != myTempReferences.end(); ListIdx++) {\r
+               if (*ListIdx == &BlockReference) {\r
+                       // found, now add the element to the entry list\r
+                       KaxCuePoint & NewPoint = AddNewChild<KaxCuePoint>(*this);\r
+                       NewPoint.PositionSet(BlockReference, GlobalTimecodeScale());\r
+                       myTempReferences.erase(ListIdx);\r
+                       break;\r
+               }\r
+       }\r
+}\r
+\r
+void KaxCues::PositionSet(const KaxBlockGroup & BlockRef)\r
+{\r
+       // look for the element in the temporary references\r
+       std::vector<const KaxBlockBlob *>::iterator ListIdx;\r
+\r
+       for (ListIdx = myTempReferences.begin(); ListIdx != myTempReferences.end(); ListIdx++) {\r
+               const KaxInternalBlock &refTmp = **ListIdx;\r
+               if (refTmp.GlobalTimecode() == BlockRef.GlobalTimecode() &&\r
+                       refTmp.TrackNum() == BlockRef.TrackNumber()) {\r
+                       // found, now add the element to the entry list\r
+                       KaxCuePoint & NewPoint = AddNewChild<KaxCuePoint>(*this);\r
+                       NewPoint.PositionSet(**ListIdx, GlobalTimecodeScale());\r
+                       myTempReferences.erase(ListIdx);\r
+                       break;\r
+               }\r
+       }\r
+}\r
+\r
+/*!\r
+       \warning Assume that the list has been sorted (Sort())\r
+*/\r
+const KaxCuePoint * KaxCues::GetTimecodePoint(uint64 aTimecode) const\r
+{\r
+       uint64 TimecodeToLocate = aTimecode / GlobalTimecodeScale();\r
+       const KaxCuePoint * aPointPrev = NULL;\r
+       uint64 aPrevTime = 0;\r
+       const KaxCuePoint * aPointNext = NULL;\r
+       uint64 aNextTime = EBML_PRETTYLONGINT(0xFFFFFFFFFFFF);\r
+\r
+       for (unsigned int i=0; i<ListSize(); i++)\r
+       {\r
+               if (EbmlId(*(*this)[i]) == EBML_ID(KaxCuePoint)) {\r
+                       const KaxCuePoint *tmp = static_cast<const KaxCuePoint *>((*this)[i]);\r
+                       // check the tile\r
+                       const KaxCueTime *aTime = static_cast<const KaxCueTime *>(tmp->FindFirstElt(EBML_INFO(KaxCueTime)));\r
+                       if (aTime != NULL)\r
+                       {\r
+                               uint64 _Time = uint64(*aTime);\r
+                               if (_Time > aPrevTime && _Time < TimecodeToLocate) {\r
+                                       aPrevTime = _Time;\r
+                                       aPointPrev = tmp;\r
+                               }\r
+                               if (_Time < aNextTime && _Time > TimecodeToLocate) {\r
+                                       aNextTime= _Time;\r
+                                       aPointNext = tmp;\r
+                               }\r
+                       }\r
+               }\r
+       }\r
+\r
+       return aPointPrev;\r
+}\r
+\r
+uint64 KaxCues::GetTimecodePosition(uint64 aTimecode) const\r
+{\r
+       const KaxCuePoint * aPoint = GetTimecodePoint(aTimecode);\r
+       if (aPoint == NULL)\r
+               return 0;\r
+\r
+       const KaxCueTrackPositions * aTrack = aPoint->GetSeekPosition();\r
+       if (aTrack == NULL)\r
+               return 0;\r
+\r
+       return aTrack->ClusterPosition();\r
+}\r
+\r
+END_LIBMATROSKA_NAMESPACE\r
index db68faafb8852fbb0eb2a284cae7e4e974c33899..a6148f1204f3f87477fbc2055c33584fe1a10052 100644 (file)
-/****************************************************************************
-** libmatroska : parse Matroska files, see http://www.matroska.org/
-**
-** <file/class description>
-**
-** Copyright (C) 2002-2005 Steve Lhomme.  All rights reserved.
-**
-** This library is free software; you can redistribute it and/or
-** modify it under the terms of the GNU Lesser General Public
-** License as published by the Free Software Foundation; either
-** version 2.1 of the License, or (at your option) any later version.
-** 
-** This library is distributed in the hope that it will be useful,
-** but WITHOUT ANY WARRANTY; without even the implied warranty of
-** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-** Lesser General Public License for more details.
-** 
-** You should have received a copy of the GNU Lesser General Public
-** License along with this library; if not, write to the Free Software
-** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-**
-** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**
-** Contact license@matroska.org if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-/*!
-       \file
-       \version \$Id: KaxCuesData.cpp 1265 2007-01-14 17:20:35Z mosu $
-       \author Steve Lhomme     <robux4 @ users.sf.net>
-*/
-#include <cassert>
-
-#include "matroska/KaxCuesData.h"
-#include "matroska/KaxContexts.h"
-#include "matroska/KaxBlock.h"
-#include "matroska/KaxBlockData.h"
-#include "matroska/KaxCluster.h"
-#include "matroska/KaxSegment.h"
-
-START_LIBMATROSKA_NAMESPACE
-
-EbmlSemantic KaxCuePoint_ContextList[2] =
-{
-       EbmlSemantic(true,  true,  EBML_INFO(KaxCueTime)),
-       EbmlSemantic(true,  false, EBML_INFO(KaxCueTrackPositions)),
-};
-
-#if MATROSKA_VERSION == 1
-EbmlSemantic KaxCueTrackPositions_ContextList[3] =
-#else // MATROSKA_VERSION
-EbmlSemantic KaxCueTrackPositions_ContextList[5] =
-#endif // MATROSKA_VERSION
-{
-       EbmlSemantic(true,  true,  EBML_INFO(KaxCueTrack)),
-       EbmlSemantic(true,  true,  EBML_INFO(KaxCueClusterPosition)),
-       EbmlSemantic(false, true,  EBML_INFO(KaxCueBlockNumber)),
-#if MATROSKA_VERSION >= 2
-       EbmlSemantic(false, true,  EBML_INFO(KaxCueCodecState)),
-       EbmlSemantic(false, false, EBML_INFO(KaxCueReference)),
-#endif // MATROSKA_VERSION
-};
-
-#if MATROSKA_VERSION >= 2
-EbmlSemantic KaxCueReference_ContextList[4] =
-{
-       EbmlSemantic(true,  true,  EBML_INFO(KaxCueRefTime)),
-       EbmlSemantic(true,  true,  EBML_INFO(KaxCueRefCluster)),
-       EbmlSemantic(false, true,  EBML_INFO(KaxCueRefNumber)),
-       EbmlSemantic(false, true,  EBML_INFO(KaxCueRefCodecState)),
-};
-#endif // MATROSKA_VERSION
-
-EbmlId KaxCuePoint_TheId          (0xBB, 1);
-EbmlId KaxCueTime_TheId           (0xB3, 1);
-EbmlId KaxCueTrackPositions_TheId (0xB7, 1);
-EbmlId KaxCueTrack_TheId          (0xF7, 1);
-EbmlId KaxCueClusterPosition_TheId(0xF1, 1);
-EbmlId KaxCueBlockNumber_TheId    (0x5378, 2);
-#if MATROSKA_VERSION >= 2
-EbmlId KaxCueCodecState_TheId     (0xEA, 1);
-EbmlId KaxCueReference_TheId      (0xDB, 1);
-EbmlId KaxCueRefTime_TheId        (0x96, 1);
-EbmlId KaxCueRefCluster_TheId     (0x97, 1);
-EbmlId KaxCueRefNumber_TheId      (0x535F, 2);
-EbmlId KaxCueRefCodecState_TheId  (0xEB, 1);
-#endif // MATROSKA_VERSION
-
-const EbmlSemanticContext KaxCuePoint_Context = EbmlSemanticContext(countof(KaxCuePoint_ContextList), KaxCuePoint_ContextList, &KaxCues_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxCuePoint));
-const EbmlSemanticContext KaxCueTime_Context = EbmlSemanticContext(0, NULL, &KaxCuePoint_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxCueTime));
-const EbmlSemanticContext KaxCueTrackPositions_Context = EbmlSemanticContext(countof(KaxCueTrackPositions_ContextList), KaxCueTrackPositions_ContextList, &KaxCuePoint_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxCueTrackPositions));
-const EbmlSemanticContext KaxCueTrack_Context = EbmlSemanticContext(0, NULL, &KaxCueTrackPositions_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxCueTrack));
-const EbmlSemanticContext KaxCueClusterPosition_Context = EbmlSemanticContext(0, NULL, &KaxCueTrackPositions_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxCueClusterPosition));
-const EbmlSemanticContext KaxCueBlockNumber_Context = EbmlSemanticContext(0, NULL, &KaxCueTrackPositions_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxCueBlockNumber));
-#if MATROSKA_VERSION >= 2
-const EbmlSemanticContext KaxCueCodecState_Context = EbmlSemanticContext(0, NULL, &KaxCueTrackPositions_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxCueCodecState));
-const EbmlSemanticContext KaxCueReference_Context = EbmlSemanticContext(countof(KaxCueReference_ContextList), KaxCueReference_ContextList, &KaxCueTrackPositions_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxCueReference));
-const EbmlSemanticContext KaxCueRefTime_Context = EbmlSemanticContext(0, NULL, &KaxCueReference_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxCueRefTime));
-const EbmlSemanticContext KaxCueRefCluster_Context = EbmlSemanticContext(0, NULL, &KaxCueRefTime_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxCueRefCluster));
-const EbmlSemanticContext KaxCueRefNumber_Context = EbmlSemanticContext(0, NULL, &KaxCueRefTime_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxCueRefNumber));
-const EbmlSemanticContext KaxCueRefCodecState_Context = EbmlSemanticContext(0, NULL, &KaxCueRefTime_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxCueRefCodecState));
-#endif // MATROSKA_VERSION
-
-const EbmlCallbacks KaxCuePoint::ClassInfos(KaxCuePoint::Create, KaxCuePoint_TheId, "CuePoint", KaxCuePoint_Context);
-const EbmlCallbacks KaxCueTime::ClassInfos(KaxCueTime::Create, KaxCueTime_TheId, "CueTime", KaxCueTime_Context);
-const EbmlCallbacks KaxCueTrackPositions::ClassInfos(KaxCueTrackPositions::Create, KaxCueTrackPositions_TheId, "CueTrackPositions", KaxCueTrackPositions_Context);
-const EbmlCallbacks KaxCueTrack::ClassInfos(KaxCueTrack::Create, KaxCueTrack_TheId, "CueTrack", KaxCueTrack_Context);
-const EbmlCallbacks KaxCueClusterPosition::ClassInfos(KaxCueClusterPosition::Create, KaxCueClusterPosition_TheId, "CueClusterPosition", KaxCueClusterPosition_Context);
-const EbmlCallbacks KaxCueBlockNumber::ClassInfos(KaxCueBlockNumber::Create, KaxCueBlockNumber_TheId, "CueBlockNumber", KaxCueBlockNumber_Context);
-#if MATROSKA_VERSION >= 2
-const EbmlCallbacks KaxCueCodecState::ClassInfos(KaxCueCodecState::Create, KaxCueCodecState_TheId, "CueCodecState", KaxCueCodecState_Context);
-const EbmlCallbacks KaxCueReference::ClassInfos(KaxCueReference::Create, KaxCueReference_TheId, "CueReference", KaxCueReference_Context);
-const EbmlCallbacks KaxCueRefTime::ClassInfos(KaxCueRefTime::Create, KaxCueRefTime_TheId, "CueRefTime", KaxCueRefTime_Context);
-const EbmlCallbacks KaxCueRefCluster::ClassInfos(KaxCueRefCluster::Create, KaxCueRefCluster_TheId, "CueRefCluster", KaxCueRefCluster_Context);
-const EbmlCallbacks KaxCueRefNumber::ClassInfos(KaxCueRefNumber::Create, KaxCueRefNumber_TheId, "CueRefNumber", KaxCueRefNumber_Context);
-const EbmlCallbacks KaxCueRefCodecState::ClassInfos(KaxCueRefCodecState::Create, KaxCueRefCodecState_TheId, "CueRefCodecState", KaxCueRefCodecState_Context);
-#endif // MATROSKA_VERSION
-
-KaxCuePoint::KaxCuePoint() 
- :EbmlMaster(KaxCuePoint_Context)
-{}
-
-KaxCueTrackPositions::KaxCueTrackPositions()
- :EbmlMaster(KaxCueTrackPositions_Context)
-{}
-
-#if MATROSKA_VERSION >= 2
-KaxCueReference::KaxCueReference()
- :EbmlMaster(KaxCueReference_Context)
-{}
-#endif // MATROSKA_VERSION
-
-/*!
-       \todo handle codec state checking
-       \todo remove duplicate references (reference to 2 frames that each reference the same frame)
-*/
-void KaxCuePoint::PositionSet(const KaxBlockGroup & BlockReference, uint64 GlobalTimecodeScale)
-{
-       // fill me
-       KaxCueTime & NewTime = GetChild<KaxCueTime>(*this);
-       *static_cast<EbmlUInteger*>(&NewTime) = BlockReference.GlobalTimecode() / GlobalTimecodeScale;
-
-       KaxCueTrackPositions & NewPositions = AddNewChild<KaxCueTrackPositions>(*this);
-       KaxCueTrack & TheTrack = GetChild<KaxCueTrack>(NewPositions);
-       *static_cast<EbmlUInteger*>(&TheTrack) = BlockReference.TrackNumber();
-       
-       KaxCueClusterPosition & TheClustPos = GetChild<KaxCueClusterPosition>(NewPositions);
-       *static_cast<EbmlUInteger*>(&TheClustPos) = BlockReference.ClusterPosition();
-
-#if MATROSKA_VERSION >= 2
-       // handle reference use
-       if (BlockReference.ReferenceCount() != 0)
-       {
-               unsigned int i;
-               for (i=0; i<BlockReference.ReferenceCount(); i++) {
-                       KaxCueReference & NewRefs = AddNewChild<KaxCueReference>(NewPositions);
-                       NewRefs.AddReference(BlockReference.Reference(i).RefBlock(), GlobalTimecodeScale);
-               }
-       }
-
-       KaxCodecState *CodecState = static_cast<KaxCodecState *>(BlockReference.FindFirstElt(EBML_INFO(KaxCodecState)));
-       if (CodecState != NULL) {
-               KaxCueCodecState &CueCodecState = AddNewChild<KaxCueCodecState>(NewPositions);
-               *static_cast<EbmlUInteger*>(&CueCodecState) = BlockReference.GetParentCluster()->GetParentSegment()->GetRelativePosition(CodecState->GetElementPosition());
-       }
-#endif // MATROSKA_VERSION
-
-       SetValueIsSet();
-}
-
-void KaxCuePoint::PositionSet(const KaxBlockBlob & BlobReference, uint64 GlobalTimecodeScale)
-{
-       const KaxInternalBlock &BlockReference = BlobReference;
-
-       // fill me
-       KaxCueTime & NewTime = GetChild<KaxCueTime>(*this);
-       *static_cast<EbmlUInteger*>(&NewTime) = BlockReference.GlobalTimecode() / GlobalTimecodeScale;
-
-       KaxCueTrackPositions & NewPositions = AddNewChild<KaxCueTrackPositions>(*this);
-       KaxCueTrack & TheTrack = GetChild<KaxCueTrack>(NewPositions);
-       *static_cast<EbmlUInteger*>(&TheTrack) = BlockReference.TrackNum();
-       
-       KaxCueClusterPosition & TheClustPos = GetChild<KaxCueClusterPosition>(NewPositions);
-       *static_cast<EbmlUInteger*>(&TheClustPos) = BlockReference.ClusterPosition();
-
-#if 0 // MATROSKA_VERSION >= 2
-       // handle reference use
-       if (BlockReference.ReferenceCount() != 0)
-       {
-               unsigned int i;
-               for (i=0; i<BlockReference.ReferenceCount(); i++) {
-                       KaxCueReference & NewRefs = AddNewChild<KaxCueReference>(NewPositions);
-                       NewRefs.AddReference(BlockReference.Reference(i).RefBlock(), GlobalTimecodeScale);
-               }
-       }
-#endif // MATROSKA_VERSION
-
-#if MATROSKA_VERSION >= 2
-       if (!BlobReference.IsSimpleBlock()) {
-               const KaxBlockGroup &BlockGroup = BlobReference;
-               const KaxCodecState *CodecState = static_cast<KaxCodecState *>(BlockGroup.FindFirstElt(EBML_INFO(KaxCodecState)));
-               if (CodecState != NULL) {
-                       KaxCueCodecState &CueCodecState = AddNewChild<KaxCueCodecState>(NewPositions);
-                       *static_cast<EbmlUInteger*>(&CueCodecState) = BlockGroup.GetParentCluster()->GetParentSegment()->GetRelativePosition(CodecState->GetElementPosition());
-               }
-       }
-#endif // MATROSKA_VERSION
-
-       SetValueIsSet();
-}
-
-#if MATROSKA_VERSION >= 2
-/*!
-       \todo handle codec state checking
-*/
-void KaxCueReference::AddReference(const KaxBlockBlob & BlockReference, uint64 GlobalTimecodeScale)
-{
-       const KaxInternalBlock & theBlock = BlockReference;
-       KaxCueRefTime & NewTime = GetChild<KaxCueRefTime>(*this);
-       *static_cast<EbmlUInteger*>(&NewTime) = theBlock.GlobalTimecode() / GlobalTimecodeScale;
-
-       KaxCueRefCluster & TheClustPos = GetChild<KaxCueRefCluster>(*this);
-       *static_cast<EbmlUInteger*>(&TheClustPos) = theBlock.ClusterPosition();
-
-#ifdef OLD
-       // handle recursive reference use
-       if (BlockReference.ReferenceCount() != 0)
-       {
-               unsigned int i;
-               for (i=0; i<BlockReference.ReferenceCount(); i++) {
-                       AddReference(BlockReference.Reference(i).RefBlock());
-               }
-       }
-#endif /* OLD */
-}
-#endif
-
-bool KaxCuePoint::operator<(const EbmlElement & EltB) const
-{
-       assert(EbmlId(*this) == KaxCuePoint_TheId);
-       assert(EbmlId(EltB) == KaxCuePoint_TheId);
-
-       const KaxCuePoint & theEltB = *static_cast<const KaxCuePoint *>(&EltB);
-
-       // compare timecode
-       const KaxCueTime * TimeCodeA = static_cast<const KaxCueTime *>(FindElt(EBML_INFO(KaxCueTime)));
-       if (TimeCodeA == NULL)
-               return false;
-
-       const KaxCueTime * TimeCodeB = static_cast<const KaxCueTime *>(theEltB.FindElt(EBML_INFO(KaxCueTime)));
-       if (TimeCodeB == NULL)
-               return false;
-
-       if (*TimeCodeA < *TimeCodeB)
-               return true;
-
-       if (*TimeCodeB < *TimeCodeA)
-               return false;
-
-       // compare tracks (timecodes are equal)
-       const KaxCueTrack * TrackA = static_cast<const KaxCueTrack *>(FindElt(EBML_INFO(KaxCueTrack)));
-       if (TrackA == NULL)
-               return false;
-
-       const KaxCueTrack * TrackB = static_cast<const KaxCueTrack *>(theEltB.FindElt(EBML_INFO(KaxCueTrack)));
-       if (TrackB == NULL)
-               return false;
-
-       if (*TrackA < *TrackB)
-               return true;
-
-       if (*TrackB < *TrackA)
-               return false;
-
-       return false;
-}
-
-bool KaxCuePoint::Timecode(uint64 & aTimecode, uint64 GlobalTimecodeScale) const
-{
-       const KaxCueTime *aTime = static_cast<const KaxCueTime *>(FindFirstElt(EBML_INFO(KaxCueTime)));
-       if (aTime == NULL)
-               return false;
-       aTimecode = uint64(*aTime) * GlobalTimecodeScale;
-       return true;
-}
-
-/*!
-       \brief return the position of the Cluster to load
-*/
-const KaxCueTrackPositions * KaxCuePoint::GetSeekPosition() const
-{
-       const KaxCueTrackPositions * result = NULL;
-       uint64 aPosition = EBML_PRETTYLONGINT(0xFFFFFFFFFFFFFFF);
-       // find the position of the "earlier" Cluster
-       const KaxCueTrackPositions *aPoss = static_cast<const KaxCueTrackPositions *>(FindFirstElt(EBML_INFO(KaxCueTrackPositions)));
-       while (aPoss != NULL)
-       {
-               const KaxCueClusterPosition *aPos = static_cast<const KaxCueClusterPosition *>(aPoss->FindFirstElt(EBML_INFO(KaxCueClusterPosition)));
-               if (aPos != NULL && uint64(*aPos) < aPosition) {
-                       aPosition = uint64(*aPos);
-                       result = aPoss;
-               }
-               
-               aPoss = static_cast<const KaxCueTrackPositions *>(FindNextElt(*aPoss));
-       }
-       return result;
-}
-
-uint64 KaxCueTrackPositions::ClusterPosition() const
-{
-       const KaxCueClusterPosition *aPos = static_cast<const KaxCueClusterPosition *>(FindFirstElt(EBML_INFO(KaxCueClusterPosition)));
-       if (aPos == NULL)
-               return 0;
-
-       return uint64(*aPos);
-}
-
-uint16 KaxCueTrackPositions::TrackNumber() const
-{
-       const KaxCueTrack *aTrack = static_cast<const KaxCueTrack *>(FindFirstElt(EBML_INFO(KaxCueTrack)));
-       if (aTrack == NULL)
-               return 0;
-
-       return uint16(*aTrack);
-}
-
-
-END_LIBMATROSKA_NAMESPACE
+/****************************************************************************\r
+** libmatroska : parse Matroska files, see http://www.matroska.org/\r
+**\r
+** <file/class description>\r
+**\r
+** Copyright (C) 2002-2010 Steve Lhomme.  All rights reserved.\r
+**\r
+** This library is free software; you can redistribute it and/or\r
+** modify it under the terms of the GNU Lesser General Public\r
+** License as published by the Free Software Foundation; either\r
+** version 2.1 of the License, or (at your option) any later version.\r
+** \r
+** This library is distributed in the hope that it will be useful,\r
+** but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
+** Lesser General Public License for more details.\r
+** \r
+** You should have received a copy of the GNU Lesser General Public\r
+** License along with this library; if not, write to the Free Software\r
+** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\r
+**\r
+** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**\r
+** Contact license@matroska.org if any conditions of this licensing are\r
+** not clear to you.\r
+**\r
+**********************************************************************/\r
+\r
+/*!\r
+       \file\r
+       \version \$Id: KaxCuesData.cpp 1265 2007-01-14 17:20:35Z mosu $\r
+       \author Steve Lhomme     <robux4 @ users.sf.net>\r
+*/\r
+#include <cassert>\r
+\r
+#include "matroska/KaxCuesData.h"\r
+#include "matroska/KaxContexts.h"\r
+#include "matroska/KaxBlock.h"\r
+#include "matroska/KaxBlockData.h"\r
+#include "matroska/KaxCluster.h"\r
+#include "matroska/KaxSegment.h"\r
+\r
+START_LIBMATROSKA_NAMESPACE\r
+\r
+EbmlSemantic KaxCuePoint_ContextList[2] =\r
+{\r
+       EbmlSemantic(true,  true,  EBML_INFO(KaxCueTime)),\r
+       EbmlSemantic(true,  false, EBML_INFO(KaxCueTrackPositions)),\r
+};\r
+\r
+#if MATROSKA_VERSION == 1\r
+EbmlSemantic KaxCueTrackPositions_ContextList[3] =\r
+#else // MATROSKA_VERSION\r
+EbmlSemantic KaxCueTrackPositions_ContextList[5] =\r
+#endif // MATROSKA_VERSION\r
+{\r
+       EbmlSemantic(true,  true,  EBML_INFO(KaxCueTrack)),\r
+       EbmlSemantic(true,  true,  EBML_INFO(KaxCueClusterPosition)),\r
+       EbmlSemantic(false, true,  EBML_INFO(KaxCueBlockNumber)),\r
+#if MATROSKA_VERSION >= 2\r
+       EbmlSemantic(false, true,  EBML_INFO(KaxCueCodecState)),\r
+       EbmlSemantic(false, false, EBML_INFO(KaxCueReference)),\r
+#endif // MATROSKA_VERSION\r
+};\r
+\r
+#if MATROSKA_VERSION >= 2\r
+EbmlSemantic KaxCueReference_ContextList[4] =\r
+{\r
+       EbmlSemantic(true,  true,  EBML_INFO(KaxCueRefTime)),\r
+       EbmlSemantic(true,  true,  EBML_INFO(KaxCueRefCluster)),\r
+       EbmlSemantic(false, true,  EBML_INFO(KaxCueRefNumber)),\r
+       EbmlSemantic(false, true,  EBML_INFO(KaxCueRefCodecState)),\r
+};\r
+#endif // MATROSKA_VERSION\r
+\r
+EbmlId KaxCuePoint_TheId          (0xBB, 1);\r
+EbmlId KaxCueTime_TheId           (0xB3, 1);\r
+EbmlId KaxCueTrackPositions_TheId (0xB7, 1);\r
+EbmlId KaxCueTrack_TheId          (0xF7, 1);\r
+EbmlId KaxCueClusterPosition_TheId(0xF1, 1);\r
+EbmlId KaxCueBlockNumber_TheId    (0x5378, 2);\r
+#if MATROSKA_VERSION >= 2\r
+EbmlId KaxCueCodecState_TheId     (0xEA, 1);\r
+EbmlId KaxCueReference_TheId      (0xDB, 1);\r
+EbmlId KaxCueRefTime_TheId        (0x96, 1);\r
+EbmlId KaxCueRefCluster_TheId     (0x97, 1);\r
+EbmlId KaxCueRefNumber_TheId      (0x535F, 2);\r
+EbmlId KaxCueRefCodecState_TheId  (0xEB, 1);\r
+#endif // MATROSKA_VERSION\r
+\r
+const EbmlSemanticContext KaxCuePoint_Context = EbmlSemanticContext(countof(KaxCuePoint_ContextList), KaxCuePoint_ContextList, &KaxCues_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxCuePoint));\r
+const EbmlSemanticContext KaxCueTime_Context = EbmlSemanticContext(0, NULL, &KaxCuePoint_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxCueTime));\r
+const EbmlSemanticContext KaxCueTrackPositions_Context = EbmlSemanticContext(countof(KaxCueTrackPositions_ContextList), KaxCueTrackPositions_ContextList, &KaxCuePoint_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxCueTrackPositions));\r
+const EbmlSemanticContext KaxCueTrack_Context = EbmlSemanticContext(0, NULL, &KaxCueTrackPositions_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxCueTrack));\r
+const EbmlSemanticContext KaxCueClusterPosition_Context = EbmlSemanticContext(0, NULL, &KaxCueTrackPositions_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxCueClusterPosition));\r
+const EbmlSemanticContext KaxCueBlockNumber_Context = EbmlSemanticContext(0, NULL, &KaxCueTrackPositions_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxCueBlockNumber));\r
+#if MATROSKA_VERSION >= 2\r
+const EbmlSemanticContext KaxCueCodecState_Context = EbmlSemanticContext(0, NULL, &KaxCueTrackPositions_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxCueCodecState));\r
+const EbmlSemanticContext KaxCueReference_Context = EbmlSemanticContext(countof(KaxCueReference_ContextList), KaxCueReference_ContextList, &KaxCueTrackPositions_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxCueReference));\r
+const EbmlSemanticContext KaxCueRefTime_Context = EbmlSemanticContext(0, NULL, &KaxCueReference_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxCueRefTime));\r
+const EbmlSemanticContext KaxCueRefCluster_Context = EbmlSemanticContext(0, NULL, &KaxCueRefTime_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxCueRefCluster));\r
+const EbmlSemanticContext KaxCueRefNumber_Context = EbmlSemanticContext(0, NULL, &KaxCueRefTime_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxCueRefNumber));\r
+const EbmlSemanticContext KaxCueRefCodecState_Context = EbmlSemanticContext(0, NULL, &KaxCueRefTime_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxCueRefCodecState));\r
+#endif // MATROSKA_VERSION\r
+\r
+const EbmlCallbacks KaxCuePoint::ClassInfos(KaxCuePoint::Create, KaxCuePoint_TheId, "CuePoint", KaxCuePoint_Context);\r
+const EbmlCallbacks KaxCueTime::ClassInfos(KaxCueTime::Create, KaxCueTime_TheId, "CueTime", KaxCueTime_Context);\r
+const EbmlCallbacks KaxCueTrackPositions::ClassInfos(KaxCueTrackPositions::Create, KaxCueTrackPositions_TheId, "CueTrackPositions", KaxCueTrackPositions_Context);\r
+const EbmlCallbacks KaxCueTrack::ClassInfos(KaxCueTrack::Create, KaxCueTrack_TheId, "CueTrack", KaxCueTrack_Context);\r
+const EbmlCallbacks KaxCueClusterPosition::ClassInfos(KaxCueClusterPosition::Create, KaxCueClusterPosition_TheId, "CueClusterPosition", KaxCueClusterPosition_Context);\r
+const EbmlCallbacks KaxCueBlockNumber::ClassInfos(KaxCueBlockNumber::Create, KaxCueBlockNumber_TheId, "CueBlockNumber", KaxCueBlockNumber_Context);\r
+#if MATROSKA_VERSION >= 2\r
+const EbmlCallbacks KaxCueCodecState::ClassInfos(KaxCueCodecState::Create, KaxCueCodecState_TheId, "CueCodecState", KaxCueCodecState_Context);\r
+const EbmlCallbacks KaxCueReference::ClassInfos(KaxCueReference::Create, KaxCueReference_TheId, "CueReference", KaxCueReference_Context);\r
+const EbmlCallbacks KaxCueRefTime::ClassInfos(KaxCueRefTime::Create, KaxCueRefTime_TheId, "CueRefTime", KaxCueRefTime_Context);\r
+const EbmlCallbacks KaxCueRefCluster::ClassInfos(KaxCueRefCluster::Create, KaxCueRefCluster_TheId, "CueRefCluster", KaxCueRefCluster_Context);\r
+const EbmlCallbacks KaxCueRefNumber::ClassInfos(KaxCueRefNumber::Create, KaxCueRefNumber_TheId, "CueRefNumber", KaxCueRefNumber_Context);\r
+const EbmlCallbacks KaxCueRefCodecState::ClassInfos(KaxCueRefCodecState::Create, KaxCueRefCodecState_TheId, "CueRefCodecState", KaxCueRefCodecState_Context);\r
+#endif // MATROSKA_VERSION\r
+\r
+KaxCuePoint::KaxCuePoint() \r
+ :EbmlMaster(KaxCuePoint_Context)\r
+{}\r
+\r
+KaxCueTrackPositions::KaxCueTrackPositions()\r
+ :EbmlMaster(KaxCueTrackPositions_Context)\r
+{}\r
+\r
+#if MATROSKA_VERSION >= 2\r
+KaxCueReference::KaxCueReference()\r
+ :EbmlMaster(KaxCueReference_Context)\r
+{}\r
+#endif // MATROSKA_VERSION\r
+\r
+/*!\r
+       \todo handle codec state checking\r
+       \todo remove duplicate references (reference to 2 frames that each reference the same frame)\r
+*/\r
+void KaxCuePoint::PositionSet(const KaxBlockGroup & BlockReference, uint64 GlobalTimecodeScale)\r
+{\r
+       // fill me\r
+       KaxCueTime & NewTime = GetChild<KaxCueTime>(*this);\r
+       *static_cast<EbmlUInteger*>(&NewTime) = BlockReference.GlobalTimecode() / GlobalTimecodeScale;\r
+\r
+       KaxCueTrackPositions & NewPositions = AddNewChild<KaxCueTrackPositions>(*this);\r
+       KaxCueTrack & TheTrack = GetChild<KaxCueTrack>(NewPositions);\r
+       *static_cast<EbmlUInteger*>(&TheTrack) = BlockReference.TrackNumber();\r
+       \r
+       KaxCueClusterPosition & TheClustPos = GetChild<KaxCueClusterPosition>(NewPositions);\r
+       *static_cast<EbmlUInteger*>(&TheClustPos) = BlockReference.ClusterPosition();\r
+\r
+#if MATROSKA_VERSION >= 2\r
+       // handle reference use\r
+       if (BlockReference.ReferenceCount() != 0)\r
+       {\r
+               unsigned int i;\r
+               for (i=0; i<BlockReference.ReferenceCount(); i++) {\r
+                       KaxCueReference & NewRefs = AddNewChild<KaxCueReference>(NewPositions);\r
+                       NewRefs.AddReference(BlockReference.Reference(i).RefBlock(), GlobalTimecodeScale);\r
+               }\r
+       }\r
+\r
+       KaxCodecState *CodecState = static_cast<KaxCodecState *>(BlockReference.FindFirstElt(EBML_INFO(KaxCodecState)));\r
+       if (CodecState != NULL) {\r
+               KaxCueCodecState &CueCodecState = AddNewChild<KaxCueCodecState>(NewPositions);\r
+               *static_cast<EbmlUInteger*>(&CueCodecState) = BlockReference.GetParentCluster()->GetParentSegment()->GetRelativePosition(CodecState->GetElementPosition());\r
+       }\r
+#endif // MATROSKA_VERSION\r
+\r
+       SetValueIsSet();\r
+}\r
+\r
+void KaxCuePoint::PositionSet(const KaxBlockBlob & BlobReference, uint64 GlobalTimecodeScale)\r
+{\r
+       const KaxInternalBlock &BlockReference = BlobReference;\r
+\r
+       // fill me\r
+       KaxCueTime & NewTime = GetChild<KaxCueTime>(*this);\r
+       *static_cast<EbmlUInteger*>(&NewTime) = BlockReference.GlobalTimecode() / GlobalTimecodeScale;\r
+\r
+       KaxCueTrackPositions & NewPositions = AddNewChild<KaxCueTrackPositions>(*this);\r
+       KaxCueTrack & TheTrack = GetChild<KaxCueTrack>(NewPositions);\r
+       *static_cast<EbmlUInteger*>(&TheTrack) = BlockReference.TrackNum();\r
+       \r
+       KaxCueClusterPosition & TheClustPos = GetChild<KaxCueClusterPosition>(NewPositions);\r
+       *static_cast<EbmlUInteger*>(&TheClustPos) = BlockReference.ClusterPosition();\r
+\r
+#if 0 // MATROSKA_VERSION >= 2\r
+       // handle reference use\r
+       if (BlockReference.ReferenceCount() != 0)\r
+       {\r
+               unsigned int i;\r
+               for (i=0; i<BlockReference.ReferenceCount(); i++) {\r
+                       KaxCueReference & NewRefs = AddNewChild<KaxCueReference>(NewPositions);\r
+                       NewRefs.AddReference(BlockReference.Reference(i).RefBlock(), GlobalTimecodeScale);\r
+               }\r
+       }\r
+#endif // MATROSKA_VERSION\r
+\r
+#if MATROSKA_VERSION >= 2\r
+       if (!BlobReference.IsSimpleBlock()) {\r
+               const KaxBlockGroup &BlockGroup = BlobReference;\r
+               const KaxCodecState *CodecState = static_cast<KaxCodecState *>(BlockGroup.FindFirstElt(EBML_INFO(KaxCodecState)));\r
+               if (CodecState != NULL) {\r
+                       KaxCueCodecState &CueCodecState = AddNewChild<KaxCueCodecState>(NewPositions);\r
+                       *static_cast<EbmlUInteger*>(&CueCodecState) = BlockGroup.GetParentCluster()->GetParentSegment()->GetRelativePosition(CodecState->GetElementPosition());\r
+               }\r
+       }\r
+#endif // MATROSKA_VERSION\r
+\r
+       SetValueIsSet();\r
+}\r
+\r
+#if MATROSKA_VERSION >= 2\r
+/*!\r
+       \todo handle codec state checking\r
+*/\r
+void KaxCueReference::AddReference(const KaxBlockBlob & BlockReference, uint64 GlobalTimecodeScale)\r
+{\r
+       const KaxInternalBlock & theBlock = BlockReference;\r
+       KaxCueRefTime & NewTime = GetChild<KaxCueRefTime>(*this);\r
+       *static_cast<EbmlUInteger*>(&NewTime) = theBlock.GlobalTimecode() / GlobalTimecodeScale;\r
+\r
+       KaxCueRefCluster & TheClustPos = GetChild<KaxCueRefCluster>(*this);\r
+       *static_cast<EbmlUInteger*>(&TheClustPos) = theBlock.ClusterPosition();\r
+\r
+#ifdef OLD\r
+       // handle recursive reference use\r
+       if (BlockReference.ReferenceCount() != 0)\r
+       {\r
+               unsigned int i;\r
+               for (i=0; i<BlockReference.ReferenceCount(); i++) {\r
+                       AddReference(BlockReference.Reference(i).RefBlock());\r
+               }\r
+       }\r
+#endif /* OLD */\r
+}\r
+#endif\r
+\r
+bool KaxCuePoint::operator<(const EbmlElement & EltB) const\r
+{\r
+       assert(EbmlId(*this) == KaxCuePoint_TheId);\r
+       assert(EbmlId(EltB) == KaxCuePoint_TheId);\r
+\r
+       const KaxCuePoint & theEltB = *static_cast<const KaxCuePoint *>(&EltB);\r
+\r
+       // compare timecode\r
+       const KaxCueTime * TimeCodeA = static_cast<const KaxCueTime *>(FindElt(EBML_INFO(KaxCueTime)));\r
+       if (TimeCodeA == NULL)\r
+               return false;\r
+\r
+       const KaxCueTime * TimeCodeB = static_cast<const KaxCueTime *>(theEltB.FindElt(EBML_INFO(KaxCueTime)));\r
+       if (TimeCodeB == NULL)\r
+               return false;\r
+\r
+       if (*TimeCodeA < *TimeCodeB)\r
+               return true;\r
+\r
+       if (*TimeCodeB < *TimeCodeA)\r
+               return false;\r
+\r
+       // compare tracks (timecodes are equal)\r
+       const KaxCueTrack * TrackA = static_cast<const KaxCueTrack *>(FindElt(EBML_INFO(KaxCueTrack)));\r
+       if (TrackA == NULL)\r
+               return false;\r
+\r
+       const KaxCueTrack * TrackB = static_cast<const KaxCueTrack *>(theEltB.FindElt(EBML_INFO(KaxCueTrack)));\r
+       if (TrackB == NULL)\r
+               return false;\r
+\r
+       if (*TrackA < *TrackB)\r
+               return true;\r
+\r
+       if (*TrackB < *TrackA)\r
+               return false;\r
+\r
+       return false;\r
+}\r
+\r
+bool KaxCuePoint::Timecode(uint64 & aTimecode, uint64 GlobalTimecodeScale) const\r
+{\r
+       const KaxCueTime *aTime = static_cast<const KaxCueTime *>(FindFirstElt(EBML_INFO(KaxCueTime)));\r
+       if (aTime == NULL)\r
+               return false;\r
+       aTimecode = uint64(*aTime) * GlobalTimecodeScale;\r
+       return true;\r
+}\r
+\r
+/*!\r
+       \brief return the position of the Cluster to load\r
+*/\r
+const KaxCueTrackPositions * KaxCuePoint::GetSeekPosition() const\r
+{\r
+       const KaxCueTrackPositions * result = NULL;\r
+       uint64 aPosition = EBML_PRETTYLONGINT(0xFFFFFFFFFFFFFFF);\r
+       // find the position of the "earlier" Cluster\r
+       const KaxCueTrackPositions *aPoss = static_cast<const KaxCueTrackPositions *>(FindFirstElt(EBML_INFO(KaxCueTrackPositions)));\r
+       while (aPoss != NULL)\r
+       {\r
+               const KaxCueClusterPosition *aPos = static_cast<const KaxCueClusterPosition *>(aPoss->FindFirstElt(EBML_INFO(KaxCueClusterPosition)));\r
+               if (aPos != NULL && uint64(*aPos) < aPosition) {\r
+                       aPosition = uint64(*aPos);\r
+                       result = aPoss;\r
+               }\r
+               \r
+               aPoss = static_cast<const KaxCueTrackPositions *>(FindNextElt(*aPoss));\r
+       }\r
+       return result;\r
+}\r
+\r
+uint64 KaxCueTrackPositions::ClusterPosition() const\r
+{\r
+       const KaxCueClusterPosition *aPos = static_cast<const KaxCueClusterPosition *>(FindFirstElt(EBML_INFO(KaxCueClusterPosition)));\r
+       if (aPos == NULL)\r
+               return 0;\r
+\r
+       return uint64(*aPos);\r
+}\r
+\r
+uint16 KaxCueTrackPositions::TrackNumber() const\r
+{\r
+       const KaxCueTrack *aTrack = static_cast<const KaxCueTrack *>(FindFirstElt(EBML_INFO(KaxCueTrack)));\r
+       if (aTrack == NULL)\r
+               return 0;\r
+\r
+       return uint16(*aTrack);\r
+}\r
+\r
+\r
+END_LIBMATROSKA_NAMESPACE\r
index b33bace0d959281432859c837c10e5c383c19131..3e66c965059b39a916edcb309df6a1d42b345881 100644 (file)
@@ -1,77 +1,77 @@
-/****************************************************************************
-** libmatroska : parse Matroska files, see http://www.matroska.org/
-**
-** <file/class description>
-**
-** Copyright (C) 2002-2005 Steve Lhomme.  All rights reserved.
-**
-** This file is part of libmatroska.
-**
-** This library is free software; you can redistribute it and/or
-** modify it under the terms of the GNU Lesser General Public
-** License as published by the Free Software Foundation; either
-** version 2.1 of the License, or (at your option) any later version.
-** 
-** This library is distributed in the hope that it will be useful,
-** but WITHOUT ANY WARRANTY; without even the implied warranty of
-** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-** Lesser General Public License for more details.
-** 
-** You should have received a copy of the GNU Lesser General Public
-** License along with this library; if not, write to the Free Software
-** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-**
-** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**
-** Contact license@matroska.org if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-/*!
-       \file
-       \version \$Id: KaxInfo.cpp 1078 2005-03-03 13:13:04Z robux4 $
-       \author Steve Lhomme     <robux4 @ users.sf.net>
-*/
-#include "matroska/KaxInfo.h"
-#include "matroska/KaxInfoData.h"
-
-#include "matroska/KaxContexts.h"
-
-// sub elements
-START_LIBMATROSKA_NAMESPACE
-
-const EbmlSemantic KaxInfo_ContextList[14] =
-{
-       EbmlSemantic(false, true,  EBML_INFO(KaxSegmentUID)),
-       EbmlSemantic(false, true,  EBML_INFO(KaxSegmentFilename)),
-       EbmlSemantic(false, true,  EBML_INFO(KaxPrevUID)),
-       EbmlSemantic(false, true,  EBML_INFO(KaxPrevFilename)),
-       EbmlSemantic(false, true,  EBML_INFO(KaxNextUID)),
-       EbmlSemantic(false, true,  EBML_INFO(KaxNextFilename)),
-       EbmlSemantic(false, false, EBML_INFO(KaxSegmentFamily)),
-       EbmlSemantic(false, false, EBML_INFO(KaxChapterTranslate)),
-       EbmlSemantic(true,  true,  EBML_INFO(KaxTimecodeScale)),
-       EbmlSemantic(false, true,  EBML_INFO(KaxDuration)),
-       EbmlSemantic(false, true,  EBML_INFO(KaxDateUTC)),
-       EbmlSemantic(false, true,  EBML_INFO(KaxTitle)),
-       EbmlSemantic(true,  true,  EBML_INFO(KaxMuxingApp)),
-       EbmlSemantic(true,  true,  EBML_INFO(KaxWritingApp)),
-};
-
-const EbmlSemanticContext KaxInfo_Context = EbmlSemanticContext(countof(KaxInfo_ContextList), KaxInfo_ContextList, &KaxSegment_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxInfo));
-const EbmlSemanticContext KaxMuxingApp_Context = EbmlSemanticContext(0, NULL, &KaxInfo_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxMuxingApp));
-const EbmlSemanticContext KaxWritingApp_Context = EbmlSemanticContext(0, NULL, &KaxInfo_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxWritingApp));
-
-EbmlId KaxInfo_TheId      (0x1549A966, 4);
-EbmlId KaxMuxingApp_TheId (0x4D80, 2);
-EbmlId KaxWritingApp_TheId(0x5741, 2);
-
-const EbmlCallbacks KaxInfo::ClassInfos(KaxInfo::Create, KaxInfo_TheId, "Info", KaxInfo_Context);
-const EbmlCallbacks KaxMuxingApp::ClassInfos(KaxMuxingApp::Create, KaxMuxingApp_TheId, "MuxingApp", KaxMuxingApp_Context);
-const EbmlCallbacks KaxWritingApp::ClassInfos(KaxWritingApp::Create, KaxWritingApp_TheId, "WritingApp", KaxWritingApp_Context);
-
-KaxInfo::KaxInfo()
-       :EbmlMaster(KaxInfo_Context)
-{}
-
-END_LIBMATROSKA_NAMESPACE
+/****************************************************************************\r
+** libmatroska : parse Matroska files, see http://www.matroska.org/\r
+**\r
+** <file/class description>\r
+**\r
+** Copyright (C) 2002-2010 Steve Lhomme.  All rights reserved.\r
+**\r
+** This file is part of libmatroska.\r
+**\r
+** This library is free software; you can redistribute it and/or\r
+** modify it under the terms of the GNU Lesser General Public\r
+** License as published by the Free Software Foundation; either\r
+** version 2.1 of the License, or (at your option) any later version.\r
+** \r
+** This library is distributed in the hope that it will be useful,\r
+** but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
+** Lesser General Public License for more details.\r
+** \r
+** You should have received a copy of the GNU Lesser General Public\r
+** License along with this library; if not, write to the Free Software\r
+** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\r
+**\r
+** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**\r
+** Contact license@matroska.org if any conditions of this licensing are\r
+** not clear to you.\r
+**\r
+**********************************************************************/\r
+\r
+/*!\r
+       \file\r
+       \version \$Id: KaxInfo.cpp 1078 2005-03-03 13:13:04Z robux4 $\r
+       \author Steve Lhomme     <robux4 @ users.sf.net>\r
+*/\r
+#include "matroska/KaxInfo.h"\r
+#include "matroska/KaxInfoData.h"\r
+\r
+#include "matroska/KaxContexts.h"\r
+\r
+// sub elements\r
+START_LIBMATROSKA_NAMESPACE\r
+\r
+const EbmlSemantic KaxInfo_ContextList[14] =\r
+{\r
+       EbmlSemantic(false, true,  EBML_INFO(KaxSegmentUID)),\r
+       EbmlSemantic(false, true,  EBML_INFO(KaxSegmentFilename)),\r
+       EbmlSemantic(false, true,  EBML_INFO(KaxPrevUID)),\r
+       EbmlSemantic(false, true,  EBML_INFO(KaxPrevFilename)),\r
+       EbmlSemantic(false, true,  EBML_INFO(KaxNextUID)),\r
+       EbmlSemantic(false, true,  EBML_INFO(KaxNextFilename)),\r
+       EbmlSemantic(false, false, EBML_INFO(KaxSegmentFamily)),\r
+       EbmlSemantic(false, false, EBML_INFO(KaxChapterTranslate)),\r
+       EbmlSemantic(true,  true,  EBML_INFO(KaxTimecodeScale)),\r
+       EbmlSemantic(false, true,  EBML_INFO(KaxDuration)),\r
+       EbmlSemantic(false, true,  EBML_INFO(KaxDateUTC)),\r
+       EbmlSemantic(false, true,  EBML_INFO(KaxTitle)),\r
+       EbmlSemantic(true,  true,  EBML_INFO(KaxMuxingApp)),\r
+       EbmlSemantic(true,  true,  EBML_INFO(KaxWritingApp)),\r
+};\r
+\r
+const EbmlSemanticContext KaxInfo_Context = EbmlSemanticContext(countof(KaxInfo_ContextList), KaxInfo_ContextList, &KaxSegment_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxInfo));\r
+const EbmlSemanticContext KaxMuxingApp_Context = EbmlSemanticContext(0, NULL, &KaxInfo_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxMuxingApp));\r
+const EbmlSemanticContext KaxWritingApp_Context = EbmlSemanticContext(0, NULL, &KaxInfo_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxWritingApp));\r
+\r
+EbmlId KaxInfo_TheId      (0x1549A966, 4);\r
+EbmlId KaxMuxingApp_TheId (0x4D80, 2);\r
+EbmlId KaxWritingApp_TheId(0x5741, 2);\r
+\r
+const EbmlCallbacks KaxInfo::ClassInfos(KaxInfo::Create, KaxInfo_TheId, "Info", KaxInfo_Context);\r
+const EbmlCallbacks KaxMuxingApp::ClassInfos(KaxMuxingApp::Create, KaxMuxingApp_TheId, "MuxingApp", KaxMuxingApp_Context);\r
+const EbmlCallbacks KaxWritingApp::ClassInfos(KaxWritingApp::Create, KaxWritingApp_TheId, "WritingApp", KaxWritingApp_Context);\r
+\r
+KaxInfo::KaxInfo()\r
+       :EbmlMaster(KaxInfo_Context)\r
+{}\r
+\r
+END_LIBMATROSKA_NAMESPACE\r
index ef6a7aa2cebbfa4c834231e140b16c476efcb325..aad60a4cd2c401d5a5f2cc575714ec7928f121b5 100644 (file)
-/****************************************************************************
-** libmatroska : parse Matroska files, see http://www.matroska.org/
-**
-** <file/class description>
-**
-** Copyright (C) 2002-2005 Steve Lhomme.  All rights reserved.
-**
-** This file is part of libmatroska.
-**
-** This library is free software; you can redistribute it and/or
-** modify it under the terms of the GNU Lesser General Public
-** License as published by the Free Software Foundation; either
-** version 2.1 of the License, or (at your option) any later version.
-** 
-** This library is distributed in the hope that it will be useful,
-** but WITHOUT ANY WARRANTY; without even the implied warranty of
-** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-** Lesser General Public License for more details.
-** 
-** You should have received a copy of the GNU Lesser General Public
-** License along with this library; if not, write to the Free Software
-** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-**
-** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**
-** Contact license@matroska.org if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-/*!
-       \file
-       \version \$Id: KaxInfoData.cpp 1078 2005-03-03 13:13:04Z robux4 $
-       \author Steve Lhomme     <robux4 @ users.sf.net>
-       \author John Cannon      <spyder2555 @ users.sf.net>
-*/
-#include "matroska/KaxInfoData.h"
-#include "matroska/KaxContexts.h"
-
-START_LIBMATROSKA_NAMESPACE
-
-const EbmlSemantic KaxChapterTranslate_ContextList[3] =
-{
-       EbmlSemantic(false, false, EBML_INFO(KaxChapterTranslateEditionUID)),
-       EbmlSemantic(true,  true,  EBML_INFO(KaxChapterTranslateCodec)),
-       EbmlSemantic(true,  true,  EBML_INFO(KaxChapterTranslateID)),
-};
-
-EbmlId KaxSegmentUID_TheId      (0x73A4, 2);
-EbmlId KaxSegmentFilename_TheId (0x7384, 2);
-EbmlId KaxPrevUID_TheId         (0x3CB923, 3);
-EbmlId KaxPrevFilename_TheId    (0x3C83AB, 3);
-EbmlId KaxNextUID_TheId         (0x3EB923, 3);
-EbmlId KaxNextFilename_TheId    (0x3E83BB, 3);
-EbmlId KaxSegmentFamily_TheId   (0x4444, 2);
-EbmlId KaxChapterTranslate_TheId(0x6924, 2);
-EbmlId KaxChapterTranslateEditionUID_TheId(0x69FC, 2);
-EbmlId KaxChapterTranslateCodec_TheId(0x69BF, 2);
-EbmlId KaxChapterTranslateID_TheId(0x69A5, 2);
-EbmlId KaxTimecodeScale_TheId   (0x2AD7B1, 3);
-EbmlId KaxDuration_TheId        (0x4489, 2);
-EbmlId KaxDateUTC_TheId         (0x4461, 2);
-EbmlId KaxTitle_TheId           (0x7BA9, 2);
-
-const EbmlSemanticContext KaxSegmentUID_Context = EbmlSemanticContext(0, NULL, &KaxInfo_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxSegmentUID));
-const EbmlSemanticContext KaxSegmentFilename_Context = EbmlSemanticContext(0, NULL, &KaxInfo_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxSegmentFilename));
-const EbmlSemanticContext KaxPrevUID_Context = EbmlSemanticContext(0, NULL, &KaxInfo_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxPrevUID));
-const EbmlSemanticContext KaxPrevFilename_Context = EbmlSemanticContext(0, NULL, &KaxInfo_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxPrevFilename));
-const EbmlSemanticContext KaxNextUID_Context = EbmlSemanticContext(0, NULL, &KaxInfo_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxNextUID));
-const EbmlSemanticContext KaxNextFilename_Context = EbmlSemanticContext(0, NULL, &KaxInfo_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxNextFilename));
-const EbmlSemanticContext KaxSegmentFamily_Context = EbmlSemanticContext(0, NULL, &KaxInfo_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxSegmentFamily));
-const EbmlSemanticContext KaxChapterTranslate_Context = EbmlSemanticContext(countof(KaxChapterTranslate_ContextList), KaxChapterTranslate_ContextList, &KaxInfo_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxChapterTranslate));
-const EbmlSemanticContext KaxChapterTranslateEditionUID_Context = EbmlSemanticContext(0, NULL, &KaxChapterTranslate_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxChapterTranslateEditionUID));
-const EbmlSemanticContext KaxChapterTranslateCodec_Context = EbmlSemanticContext(0, NULL, &KaxChapterTranslate_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxChapterTranslateCodec));
-const EbmlSemanticContext KaxChapterTranslateID_Context = EbmlSemanticContext(0, NULL, &KaxChapterTranslate_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxChapterTranslateID));
-const EbmlSemanticContext KaxTimecodeScale_Context = EbmlSemanticContext(0, NULL, &KaxInfo_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTimecodeScale));
-const EbmlSemanticContext KaxDuration_Context = EbmlSemanticContext(0, NULL, &KaxInfo_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxDuration));
-const EbmlSemanticContext KaxDateUTC_Context = EbmlSemanticContext(0, NULL, &KaxInfo_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxDateUTC));
-const EbmlSemanticContext KaxTitle_Context = EbmlSemanticContext(0, NULL, &KaxInfo_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTitle));
-
-
-const EbmlCallbacks KaxSegmentUID::ClassInfos(KaxSegmentUID::Create, KaxSegmentUID_TheId, "SegmentUID", KaxSegmentUID_Context);
-const EbmlCallbacks KaxSegmentFilename::ClassInfos(KaxSegmentFilename::Create, KaxSegmentFilename_TheId, "SegmentFilename", KaxSegmentFilename_Context);
-const EbmlCallbacks KaxPrevUID::ClassInfos(KaxPrevUID::Create, KaxPrevUID_TheId, "PrevUID", KaxPrevUID_Context);
-const EbmlCallbacks KaxPrevFilename::ClassInfos(KaxPrevFilename::Create, KaxPrevFilename_TheId, "PrevFilename", KaxPrevFilename_Context);
-const EbmlCallbacks KaxNextUID::ClassInfos(KaxNextUID::Create, KaxNextUID_TheId, "NextUID", KaxNextUID_Context);
-const EbmlCallbacks KaxNextFilename::ClassInfos(KaxNextFilename::Create, KaxNextFilename_TheId, "NextFilename", KaxNextFilename_Context);
-const EbmlCallbacks KaxSegmentFamily::ClassInfos(KaxSegmentFamily::Create, KaxSegmentFamily_TheId, "SegmentFamily", KaxSegmentFamily_Context);
-const EbmlCallbacks KaxChapterTranslate::ClassInfos(KaxChapterTranslate::Create, KaxChapterTranslate_TheId, "ChapterTranslate", KaxChapterTranslate_Context);
-const EbmlCallbacks KaxChapterTranslateEditionUID::ClassInfos(KaxChapterTranslateEditionUID::Create, KaxChapterTranslateEditionUID_TheId, "ChapterTranslateEditionUID", KaxChapterTranslateEditionUID_Context);
-const EbmlCallbacks KaxChapterTranslateCodec::ClassInfos(KaxChapterTranslateCodec::Create, KaxChapterTranslateCodec_TheId, "ChapterTranslateCodec", KaxChapterTranslateCodec_Context);
-const EbmlCallbacks KaxChapterTranslateID::ClassInfos(KaxChapterTranslateID::Create, KaxChapterTranslateID_TheId, "ChapterTranslateID", KaxChapterTranslateID_Context);
-const EbmlCallbacks KaxTimecodeScale::ClassInfos(KaxTimecodeScale::Create, KaxTimecodeScale_TheId, "TimecodeScale", KaxTimecodeScale_Context);
-const EbmlCallbacks KaxDuration::ClassInfos(KaxDuration::Create, KaxDuration_TheId, "Duration", KaxDuration_Context);
-const EbmlCallbacks KaxDateUTC::ClassInfos(KaxDateUTC::Create, KaxDateUTC_TheId, "DateUTC", KaxDateUTC_Context);
-const EbmlCallbacks KaxTitle::ClassInfos(KaxTitle::Create, KaxTitle_TheId, "Title", KaxTitle_Context);
-
-KaxChapterTranslate::KaxChapterTranslate()
-       :EbmlMaster(KaxChapterTranslate_Context)
-{}
-
-END_LIBMATROSKA_NAMESPACE
+/****************************************************************************\r
+** libmatroska : parse Matroska files, see http://www.matroska.org/\r
+**\r
+** <file/class description>\r
+**\r
+** Copyright (C) 2002-2010 Steve Lhomme.  All rights reserved.\r
+**\r
+** This file is part of libmatroska.\r
+**\r
+** This library is free software; you can redistribute it and/or\r
+** modify it under the terms of the GNU Lesser General Public\r
+** License as published by the Free Software Foundation; either\r
+** version 2.1 of the License, or (at your option) any later version.\r
+** \r
+** This library is distributed in the hope that it will be useful,\r
+** but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
+** Lesser General Public License for more details.\r
+** \r
+** You should have received a copy of the GNU Lesser General Public\r
+** License along with this library; if not, write to the Free Software\r
+** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\r
+**\r
+** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**\r
+** Contact license@matroska.org if any conditions of this licensing are\r
+** not clear to you.\r
+**\r
+**********************************************************************/\r
+\r
+/*!\r
+       \file\r
+       \version \$Id: KaxInfoData.cpp 1078 2005-03-03 13:13:04Z robux4 $\r
+       \author Steve Lhomme     <robux4 @ users.sf.net>\r
+       \author John Cannon      <spyder2555 @ users.sf.net>\r
+*/\r
+#include "matroska/KaxInfoData.h"\r
+#include "matroska/KaxContexts.h"\r
+\r
+START_LIBMATROSKA_NAMESPACE\r
+\r
+const EbmlSemantic KaxChapterTranslate_ContextList[3] =\r
+{\r
+       EbmlSemantic(false, false, EBML_INFO(KaxChapterTranslateEditionUID)),\r
+       EbmlSemantic(true,  true,  EBML_INFO(KaxChapterTranslateCodec)),\r
+       EbmlSemantic(true,  true,  EBML_INFO(KaxChapterTranslateID)),\r
+};\r
+\r
+EbmlId KaxSegmentUID_TheId      (0x73A4, 2);\r
+EbmlId KaxSegmentFilename_TheId (0x7384, 2);\r
+EbmlId KaxPrevUID_TheId         (0x3CB923, 3);\r
+EbmlId KaxPrevFilename_TheId    (0x3C83AB, 3);\r
+EbmlId KaxNextUID_TheId         (0x3EB923, 3);\r
+EbmlId KaxNextFilename_TheId    (0x3E83BB, 3);\r
+EbmlId KaxSegmentFamily_TheId   (0x4444, 2);\r
+EbmlId KaxChapterTranslate_TheId(0x6924, 2);\r
+EbmlId KaxChapterTranslateEditionUID_TheId(0x69FC, 2);\r
+EbmlId KaxChapterTranslateCodec_TheId(0x69BF, 2);\r
+EbmlId KaxChapterTranslateID_TheId(0x69A5, 2);\r
+EbmlId KaxTimecodeScale_TheId   (0x2AD7B1, 3);\r
+EbmlId KaxDuration_TheId        (0x4489, 2);\r
+EbmlId KaxDateUTC_TheId         (0x4461, 2);\r
+EbmlId KaxTitle_TheId           (0x7BA9, 2);\r
+\r
+const EbmlSemanticContext KaxSegmentUID_Context = EbmlSemanticContext(0, NULL, &KaxInfo_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxSegmentUID));\r
+const EbmlSemanticContext KaxSegmentFilename_Context = EbmlSemanticContext(0, NULL, &KaxInfo_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxSegmentFilename));\r
+const EbmlSemanticContext KaxPrevUID_Context = EbmlSemanticContext(0, NULL, &KaxInfo_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxPrevUID));\r
+const EbmlSemanticContext KaxPrevFilename_Context = EbmlSemanticContext(0, NULL, &KaxInfo_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxPrevFilename));\r
+const EbmlSemanticContext KaxNextUID_Context = EbmlSemanticContext(0, NULL, &KaxInfo_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxNextUID));\r
+const EbmlSemanticContext KaxNextFilename_Context = EbmlSemanticContext(0, NULL, &KaxInfo_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxNextFilename));\r
+const EbmlSemanticContext KaxSegmentFamily_Context = EbmlSemanticContext(0, NULL, &KaxInfo_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxSegmentFamily));\r
+const EbmlSemanticContext KaxChapterTranslate_Context = EbmlSemanticContext(countof(KaxChapterTranslate_ContextList), KaxChapterTranslate_ContextList, &KaxInfo_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxChapterTranslate));\r
+const EbmlSemanticContext KaxChapterTranslateEditionUID_Context = EbmlSemanticContext(0, NULL, &KaxChapterTranslate_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxChapterTranslateEditionUID));\r
+const EbmlSemanticContext KaxChapterTranslateCodec_Context = EbmlSemanticContext(0, NULL, &KaxChapterTranslate_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxChapterTranslateCodec));\r
+const EbmlSemanticContext KaxChapterTranslateID_Context = EbmlSemanticContext(0, NULL, &KaxChapterTranslate_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxChapterTranslateID));\r
+const EbmlSemanticContext KaxTimecodeScale_Context = EbmlSemanticContext(0, NULL, &KaxInfo_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTimecodeScale));\r
+const EbmlSemanticContext KaxDuration_Context = EbmlSemanticContext(0, NULL, &KaxInfo_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxDuration));\r
+const EbmlSemanticContext KaxDateUTC_Context = EbmlSemanticContext(0, NULL, &KaxInfo_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxDateUTC));\r
+const EbmlSemanticContext KaxTitle_Context = EbmlSemanticContext(0, NULL, &KaxInfo_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTitle));\r
+\r
+\r
+const EbmlCallbacks KaxSegmentUID::ClassInfos(KaxSegmentUID::Create, KaxSegmentUID_TheId, "SegmentUID", KaxSegmentUID_Context);\r
+const EbmlCallbacks KaxSegmentFilename::ClassInfos(KaxSegmentFilename::Create, KaxSegmentFilename_TheId, "SegmentFilename", KaxSegmentFilename_Context);\r
+const EbmlCallbacks KaxPrevUID::ClassInfos(KaxPrevUID::Create, KaxPrevUID_TheId, "PrevUID", KaxPrevUID_Context);\r
+const EbmlCallbacks KaxPrevFilename::ClassInfos(KaxPrevFilename::Create, KaxPrevFilename_TheId, "PrevFilename", KaxPrevFilename_Context);\r
+const EbmlCallbacks KaxNextUID::ClassInfos(KaxNextUID::Create, KaxNextUID_TheId, "NextUID", KaxNextUID_Context);\r
+const EbmlCallbacks KaxNextFilename::ClassInfos(KaxNextFilename::Create, KaxNextFilename_TheId, "NextFilename", KaxNextFilename_Context);\r
+const EbmlCallbacks KaxSegmentFamily::ClassInfos(KaxSegmentFamily::Create, KaxSegmentFamily_TheId, "SegmentFamily", KaxSegmentFamily_Context);\r
+const EbmlCallbacks KaxChapterTranslate::ClassInfos(KaxChapterTranslate::Create, KaxChapterTranslate_TheId, "ChapterTranslate", KaxChapterTranslate_Context);\r
+const EbmlCallbacks KaxChapterTranslateEditionUID::ClassInfos(KaxChapterTranslateEditionUID::Create, KaxChapterTranslateEditionUID_TheId, "ChapterTranslateEditionUID", KaxChapterTranslateEditionUID_Context);\r
+const EbmlCallbacks KaxChapterTranslateCodec::ClassInfos(KaxChapterTranslateCodec::Create, KaxChapterTranslateCodec_TheId, "ChapterTranslateCodec", KaxChapterTranslateCodec_Context);\r
+const EbmlCallbacks KaxChapterTranslateID::ClassInfos(KaxChapterTranslateID::Create, KaxChapterTranslateID_TheId, "ChapterTranslateID", KaxChapterTranslateID_Context);\r
+const EbmlCallbacks KaxTimecodeScale::ClassInfos(KaxTimecodeScale::Create, KaxTimecodeScale_TheId, "TimecodeScale", KaxTimecodeScale_Context);\r
+const EbmlCallbacks KaxDuration::ClassInfos(KaxDuration::Create, KaxDuration_TheId, "Duration", KaxDuration_Context);\r
+const EbmlCallbacks KaxDateUTC::ClassInfos(KaxDateUTC::Create, KaxDateUTC_TheId, "DateUTC", KaxDateUTC_Context);\r
+const EbmlCallbacks KaxTitle::ClassInfos(KaxTitle::Create, KaxTitle_TheId, "Title", KaxTitle_Context);\r
+\r
+KaxChapterTranslate::KaxChapterTranslate()\r
+       :EbmlMaster(KaxChapterTranslate_Context)\r
+{}\r
+\r
+END_LIBMATROSKA_NAMESPACE\r
index 3f9aac6ca097ff30f10807215a8c13ed567f1a8d..8cbfc6f33873607ac4b4d1fa7c8044c82c4694e6 100644 (file)
-/****************************************************************************
-** libmatroska : parse Matroska files, see http://www.matroska.org/
-**
-** <file/class description>
-**
-** Copyright (C) 2002-2004 Steve Lhomme.  All rights reserved.
-**
-** This file is part of libmatroska.
-**
-** This library is free software; you can redistribute it and/or
-** modify it under the terms of the GNU Lesser General Public
-** License as published by the Free Software Foundation; either
-** version 2.1 of the License, or (at your option) any later version.
-** 
-** This library is distributed in the hope that it will be useful,
-** but WITHOUT ANY WARRANTY; without even the implied warranty of
-** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-** Lesser General Public License for more details.
-** 
-** You should have received a copy of the GNU Lesser General Public
-** License along with this library; if not, write to the Free Software
-** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-**
-** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**
-** Contact license@matroska.org if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-/*!
-       \file
-       \version \$Id: KaxSeekHead.cpp 640 2004-07-09 21:05:36Z mosu $
-       \author Steve Lhomme     <robux4 @ users.sf.net>
-*/
-#include "matroska/KaxSeekHead.h"
-#include "matroska/KaxContexts.h"
-#include "matroska/KaxSegment.h"
-#include "matroska/KaxCues.h"
-
-using namespace LIBEBML_NAMESPACE;
-
-// sub elements
-START_LIBMATROSKA_NAMESPACE
-
-EbmlSemantic KaxSeekHead_ContextList[1] = 
-{
-       EbmlSemantic(true,  false,  EBML_INFO(KaxSeek)),
-};
-
-EbmlSemantic KaxSeek_ContextList[2] = 
-{
-       EbmlSemantic(true,  true,  EBML_INFO(KaxSeekID)),
-       EbmlSemantic(true,  true,  EBML_INFO(KaxSeekPosition)),
-};
-
-const EbmlSemanticContext KaxSeekHead_Context = EbmlSemanticContext(countof(KaxSeekHead_ContextList), KaxSeekHead_ContextList, &KaxSegment_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxSeekHead));
-const EbmlSemanticContext KaxSeek_Context = EbmlSemanticContext(countof(KaxSeek_ContextList), KaxSeek_ContextList, &KaxSeekHead_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxSeek));
-const EbmlSemanticContext KaxSeekID_Context = EbmlSemanticContext(0, NULL, &KaxSeek_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxSeekID));
-const EbmlSemanticContext KaxSeekPosition_Context = EbmlSemanticContext(0, NULL, &KaxSeek_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxSeekPosition));
-
-EbmlId KaxSeekHead_TheId    (0x114D9B74, 4);
-EbmlId KaxSeek_TheId        (0x4DBB, 2);
-EbmlId KaxSeekID_TheId      (0x53AB, 2);
-EbmlId KaxSeekPosition_TheId(0x53AC, 2);
-
-const EbmlCallbacks KaxSeekHead::ClassInfos(KaxSeekHead::Create, KaxSeekHead_TheId, "SeekHeader", KaxSeekHead_Context);
-const EbmlCallbacks KaxSeek::ClassInfos(KaxSeek::Create, KaxSeek_TheId, "SeekPoint", KaxSeek_Context);
-const EbmlCallbacks KaxSeekID::ClassInfos(KaxSeekID::Create, KaxSeekID_TheId, "SeekID", KaxSeekID_Context);
-const EbmlCallbacks KaxSeekPosition::ClassInfos(KaxSeekPosition::Create, KaxSeekPosition_TheId, "SeekPosition", KaxSeekPosition_Context);
-
-KaxSeekHead::KaxSeekHead()
-       :EbmlMaster(KaxSeekHead_Context)
-{}
-
-KaxSeek::KaxSeek()
-       :EbmlMaster(KaxSeek_Context)
-{}
-
-/*!
-       \todo verify that the element is not already in the list
-*/
-void KaxSeekHead::IndexThis(const EbmlElement & aElt, const KaxSegment & ParentSegment)
-{
-       // create a new point
-       KaxSeek & aNewPoint = AddNewChild<KaxSeek>(*this);
-
-       // add the informations to this element
-       KaxSeekPosition & aNewPos = GetChild<KaxSeekPosition>(aNewPoint);
-       *static_cast<EbmlUInteger *>(&aNewPos) = ParentSegment.GetRelativePosition(aElt);
-
-       KaxSeekID & aNewID = GetChild<KaxSeekID>(aNewPoint);
-       binary ID[4];
-       for (int i=EBML_ID_LENGTH(EbmlId(aElt)); i>0; i--) {
-               ID[4-i] = (EBML_ID_VALUE(EbmlId(aElt)) >> 8*(i-1)) & 0xFF;
-       }
-       aNewID.CopyBuffer(ID, EBML_ID_LENGTH(EbmlId(aElt)));
-}
-
-KaxSeek * KaxSeekHead::FindFirstOf(const EbmlCallbacks & Callbacks) const
-{
-       // parse all the Entries and find the first to match the type
-       KaxSeek * aElt = static_cast<KaxSeek *>(FindFirstElt(EBML_INFO(KaxSeek)));
-       while (aElt != NULL)
-       {
-               KaxSeekID * aId = NULL;
-               for (unsigned int i = 0; i<aElt->ListSize(); i++) {
-                       if (EbmlId(*(*aElt)[i]) == EBML_ID(KaxSeekID)) {
-                               aId = static_cast<KaxSeekID*>((*aElt)[i]);
-                               EbmlId aEbmlId(aId->GetBuffer(), aId->GetSize());
-                               if (aEbmlId == Callbacks.GlobalId)
-                               {
-                                       return aElt;
-                               }
-                               break;
-                       }
-               }
-               aElt = static_cast<KaxSeek *>(FindNextElt(*aElt));
-       }
-
-       return NULL;
-}
-
-KaxSeek * KaxSeekHead::FindNextOf(const KaxSeek &aPrev) const
-{
-       unsigned int iIndex;
-       KaxSeek *tmp;
-       
-       // look for the previous in the list
-       for (iIndex = 0; iIndex<ListSize(); iIndex++)
-       {
-               if ((*this)[iIndex] == static_cast<const EbmlElement*>(&aPrev))
-                       break;
-       }
-
-       if (iIndex <ListSize()) {
-               iIndex++;
-               for (; iIndex<ListSize(); iIndex++)
-               {
-                       if (EbmlId(*((*this)[iIndex])) == EBML_ID(KaxSeek))
-                       {
-                               tmp = (KaxSeek *)((*this)[iIndex]);
-                               if (tmp->IsEbmlId(aPrev))
-                                       return tmp;
-                       }
-               }
-       }
-
-       return NULL;
-}
-
-int64 KaxSeek::Location() const
-{
-       KaxSeekPosition *aPos = static_cast<KaxSeekPosition*>(FindFirstElt(EBML_INFO(KaxSeekPosition)));
-       if (aPos == NULL)
-               return 0;
-       return uint64(*aPos);
-}
-
-bool KaxSeek::IsEbmlId(const EbmlId & aId) const
-{
-       KaxSeekID *_Id = static_cast<KaxSeekID*>(FindFirstElt(EBML_INFO(KaxSeekID)));
-       if (_Id == NULL)
-               return false;
-       EbmlId aEbmlId(_Id->GetBuffer(), _Id->GetSize());
-       return (aId == aEbmlId);
-}
-
-bool KaxSeek::IsEbmlId(const KaxSeek & aPoint) const
-{
-       KaxSeekID *_IdA = static_cast<KaxSeekID*>(FindFirstElt(EBML_INFO(KaxSeekID)));
-       if (_IdA == NULL)
-               return false;
-       KaxSeekID *_IdB = static_cast<KaxSeekID*>(aPoint.FindFirstElt(EBML_INFO(KaxSeekID)));
-       if (_IdB == NULL)
-               return false;
-       EbmlId aEbmlIdA(_IdA->GetBuffer(), _IdA->GetSize());
-       EbmlId aEbmlIdB(_IdB->GetBuffer(), _IdB->GetSize());
-       return (aEbmlIdA == aEbmlIdB);
-}
-
-END_LIBMATROSKA_NAMESPACE
+/****************************************************************************\r
+** libmatroska : parse Matroska files, see http://www.matroska.org/\r
+**\r
+** <file/class description>\r
+**\r
+** Copyright (C) 2002-2010 Steve Lhomme.  All rights reserved.\r
+**\r
+** This file is part of libmatroska.\r
+**\r
+** This library is free software; you can redistribute it and/or\r
+** modify it under the terms of the GNU Lesser General Public\r
+** License as published by the Free Software Foundation; either\r
+** version 2.1 of the License, or (at your option) any later version.\r
+** \r
+** This library is distributed in the hope that it will be useful,\r
+** but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
+** Lesser General Public License for more details.\r
+** \r
+** You should have received a copy of the GNU Lesser General Public\r
+** License along with this library; if not, write to the Free Software\r
+** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\r
+**\r
+** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**\r
+** Contact license@matroska.org if any conditions of this licensing are\r
+** not clear to you.\r
+**\r
+**********************************************************************/\r
+\r
+/*!\r
+       \file\r
+       \version \$Id: KaxSeekHead.cpp 640 2004-07-09 21:05:36Z mosu $\r
+       \author Steve Lhomme     <robux4 @ users.sf.net>\r
+*/\r
+#include "matroska/KaxSeekHead.h"\r
+#include "matroska/KaxContexts.h"\r
+#include "matroska/KaxSegment.h"\r
+#include "matroska/KaxCues.h"\r
+\r
+using namespace LIBEBML_NAMESPACE;\r
+\r
+// sub elements\r
+START_LIBMATROSKA_NAMESPACE\r
+\r
+EbmlSemantic KaxSeekHead_ContextList[1] = \r
+{\r
+       EbmlSemantic(true,  false,  EBML_INFO(KaxSeek)),\r
+};\r
+\r
+EbmlSemantic KaxSeek_ContextList[2] = \r
+{\r
+       EbmlSemantic(true,  true,  EBML_INFO(KaxSeekID)),\r
+       EbmlSemantic(true,  true,  EBML_INFO(KaxSeekPosition)),\r
+};\r
+\r
+const EbmlSemanticContext KaxSeekHead_Context = EbmlSemanticContext(countof(KaxSeekHead_ContextList), KaxSeekHead_ContextList, &KaxSegment_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxSeekHead));\r
+const EbmlSemanticContext KaxSeek_Context = EbmlSemanticContext(countof(KaxSeek_ContextList), KaxSeek_ContextList, &KaxSeekHead_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxSeek));\r
+const EbmlSemanticContext KaxSeekID_Context = EbmlSemanticContext(0, NULL, &KaxSeek_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxSeekID));\r
+const EbmlSemanticContext KaxSeekPosition_Context = EbmlSemanticContext(0, NULL, &KaxSeek_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxSeekPosition));\r
+\r
+EbmlId KaxSeekHead_TheId    (0x114D9B74, 4);\r
+EbmlId KaxSeek_TheId        (0x4DBB, 2);\r
+EbmlId KaxSeekID_TheId      (0x53AB, 2);\r
+EbmlId KaxSeekPosition_TheId(0x53AC, 2);\r
+\r
+const EbmlCallbacks KaxSeekHead::ClassInfos(KaxSeekHead::Create, KaxSeekHead_TheId, "SeekHeader", KaxSeekHead_Context);\r
+const EbmlCallbacks KaxSeek::ClassInfos(KaxSeek::Create, KaxSeek_TheId, "SeekPoint", KaxSeek_Context);\r
+const EbmlCallbacks KaxSeekID::ClassInfos(KaxSeekID::Create, KaxSeekID_TheId, "SeekID", KaxSeekID_Context);\r
+const EbmlCallbacks KaxSeekPosition::ClassInfos(KaxSeekPosition::Create, KaxSeekPosition_TheId, "SeekPosition", KaxSeekPosition_Context);\r
+\r
+KaxSeekHead::KaxSeekHead()\r
+       :EbmlMaster(KaxSeekHead_Context)\r
+{}\r
+\r
+KaxSeek::KaxSeek()\r
+       :EbmlMaster(KaxSeek_Context)\r
+{}\r
+\r
+/*!\r
+       \todo verify that the element is not already in the list\r
+*/\r
+void KaxSeekHead::IndexThis(const EbmlElement & aElt, const KaxSegment & ParentSegment)\r
+{\r
+       // create a new point\r
+       KaxSeek & aNewPoint = AddNewChild<KaxSeek>(*this);\r
+\r
+       // add the informations to this element\r
+       KaxSeekPosition & aNewPos = GetChild<KaxSeekPosition>(aNewPoint);\r
+       *static_cast<EbmlUInteger *>(&aNewPos) = ParentSegment.GetRelativePosition(aElt);\r
+\r
+       KaxSeekID & aNewID = GetChild<KaxSeekID>(aNewPoint);\r
+       binary ID[4];\r
+       for (int i=EBML_ID_LENGTH(EbmlId(aElt)); i>0; i--) {\r
+               ID[4-i] = (EBML_ID_VALUE(EbmlId(aElt)) >> 8*(i-1)) & 0xFF;\r
+       }\r
+       aNewID.CopyBuffer(ID, EBML_ID_LENGTH(EbmlId(aElt)));\r
+}\r
+\r
+KaxSeek * KaxSeekHead::FindFirstOf(const EbmlCallbacks & Callbacks) const\r
+{\r
+       // parse all the Entries and find the first to match the type\r
+       KaxSeek * aElt = static_cast<KaxSeek *>(FindFirstElt(EBML_INFO(KaxSeek)));\r
+       while (aElt != NULL)\r
+       {\r
+               KaxSeekID * aId = NULL;\r
+               for (unsigned int i = 0; i<aElt->ListSize(); i++) {\r
+                       if (EbmlId(*(*aElt)[i]) == EBML_ID(KaxSeekID)) {\r
+                               aId = static_cast<KaxSeekID*>((*aElt)[i]);\r
+                               EbmlId aEbmlId(aId->GetBuffer(), aId->GetSize());\r
+                               if (aEbmlId == Callbacks.GlobalId)\r
+                               {\r
+                                       return aElt;\r
+                               }\r
+                               break;\r
+                       }\r
+               }\r
+               aElt = static_cast<KaxSeek *>(FindNextElt(*aElt));\r
+       }\r
+\r
+       return NULL;\r
+}\r
+\r
+KaxSeek * KaxSeekHead::FindNextOf(const KaxSeek &aPrev) const\r
+{\r
+       unsigned int iIndex;\r
+       KaxSeek *tmp;\r
+       \r
+       // look for the previous in the list\r
+       for (iIndex = 0; iIndex<ListSize(); iIndex++)\r
+       {\r
+               if ((*this)[iIndex] == static_cast<const EbmlElement*>(&aPrev))\r
+                       break;\r
+       }\r
+\r
+       if (iIndex <ListSize()) {\r
+               iIndex++;\r
+               for (; iIndex<ListSize(); iIndex++)\r
+               {\r
+                       if (EbmlId(*((*this)[iIndex])) == EBML_ID(KaxSeek))\r
+                       {\r
+                               tmp = (KaxSeek *)((*this)[iIndex]);\r
+                               if (tmp->IsEbmlId(aPrev))\r
+                                       return tmp;\r
+                       }\r
+               }\r
+       }\r
+\r
+       return NULL;\r
+}\r
+\r
+int64 KaxSeek::Location() const\r
+{\r
+       KaxSeekPosition *aPos = static_cast<KaxSeekPosition*>(FindFirstElt(EBML_INFO(KaxSeekPosition)));\r
+       if (aPos == NULL)\r
+               return 0;\r
+       return uint64(*aPos);\r
+}\r
+\r
+bool KaxSeek::IsEbmlId(const EbmlId & aId) const\r
+{\r
+       KaxSeekID *_Id = static_cast<KaxSeekID*>(FindFirstElt(EBML_INFO(KaxSeekID)));\r
+       if (_Id == NULL)\r
+               return false;\r
+       EbmlId aEbmlId(_Id->GetBuffer(), _Id->GetSize());\r
+       return (aId == aEbmlId);\r
+}\r
+\r
+bool KaxSeek::IsEbmlId(const KaxSeek & aPoint) const\r
+{\r
+       KaxSeekID *_IdA = static_cast<KaxSeekID*>(FindFirstElt(EBML_INFO(KaxSeekID)));\r
+       if (_IdA == NULL)\r
+               return false;\r
+       KaxSeekID *_IdB = static_cast<KaxSeekID*>(aPoint.FindFirstElt(EBML_INFO(KaxSeekID)));\r
+       if (_IdB == NULL)\r
+               return false;\r
+       EbmlId aEbmlIdA(_IdA->GetBuffer(), _IdA->GetSize());\r
+       EbmlId aEbmlIdB(_IdB->GetBuffer(), _IdB->GetSize());\r
+       return (aEbmlIdA == aEbmlIdB);\r
+}\r
+\r
+END_LIBMATROSKA_NAMESPACE\r
index c947366311a093c82c894581f4eaff7e18eeba6d..1262118bd00ccf49bf021c790aa383f6dc24e62a 100644 (file)
-/****************************************************************************
-** libmatroska : parse Matroska files, see http://www.matroska.org/
-**
-** <file/class description>
-**
-** Copyright (C) 2002-2004 Steve Lhomme.  All rights reserved.
-**
-** This file is part of libmatroska.
-**
-** This library is free software; you can redistribute it and/or
-** modify it under the terms of the GNU Lesser General Public
-** License as published by the Free Software Foundation; either
-** version 2.1 of the License, or (at your option) any later version.
-** 
-** This library is distributed in the hope that it will be useful,
-** but WITHOUT ANY WARRANTY; without even the implied warranty of
-** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-** Lesser General Public License for more details.
-** 
-** You should have received a copy of the GNU Lesser General Public
-** License along with this library; if not, write to the Free Software
-** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-**
-** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**
-** Contact license@matroska.org if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-/*!
-       \file
-       \version \$Id: KaxSegment.cpp 1096 2005-03-17 09:14:52Z robux4 $
-       \author Steve Lhomme     <robux4 @ users.sf.net>
-*/
-#include "matroska/KaxSegment.h"
-#include "ebml/EbmlHead.h"
-
-// sub elements
-#include "matroska/KaxCluster.h"
-#include "matroska/KaxSeekHead.h"
-#include "matroska/KaxCues.h"
-#include "matroska/KaxTracks.h"
-#include "matroska/KaxInfo.h"
-#include "matroska/KaxChapters.h"
-#include "matroska/KaxAttachments.h"
-#include "matroska/KaxTags.h"
-#include "matroska/KaxContexts.h"
-
-START_LIBMATROSKA_NAMESPACE
-
-EbmlSemantic KaxMatroska_ContextList[2] =
-{
-       EbmlSemantic(true, true,  EBML_INFO(EbmlHead)),
-       EbmlSemantic(true, false, EBML_INFO(KaxSegment)),
-};
-
-EbmlSemantic KaxSegment_ContextList[8] =
-{
-       EbmlSemantic(false, false, EBML_INFO(KaxCluster)),
-       EbmlSemantic(false, false, EBML_INFO(KaxSeekHead)),
-       EbmlSemantic(false, true,  EBML_INFO(KaxCues)),
-       EbmlSemantic(false, false, EBML_INFO(KaxTracks)),
-       EbmlSemantic(true,  true,  EBML_INFO(KaxInfo)),
-       EbmlSemantic(false, true,  EBML_INFO(KaxChapters)),
-       EbmlSemantic(false, true,  EBML_INFO(KaxAttachments)),
-       EbmlSemantic(false, true,  EBML_INFO(KaxTags)),
-};
-
-const EbmlSemanticContext KaxMatroska_Context = EbmlSemanticContext(countof(KaxMatroska_ContextList), KaxMatroska_ContextList, NULL, *GetKaxGlobal_Context, NULL);
-const EbmlSemanticContext KaxSegment_Context = EbmlSemanticContext(countof(KaxSegment_ContextList), KaxSegment_ContextList, NULL, *GetKaxGlobal_Context, &EBML_INFO(KaxSegment));
-
-EbmlId KaxSegment_TheId(0x18538067, 4);
-const EbmlCallbacks KaxSegment::ClassInfos(KaxSegment::Create, KaxSegment_TheId, "Segment\0rotomopogo", KaxSegment_Context);
-
-KaxSegment::KaxSegment()
-       :EbmlMaster(KaxSegment_Context)
-{
-       SetSizeLength(5); // mandatory min size support (for easier updating) (2^(7*5)-2 = 32Go)
-       SetSizeInfinite(); // by default a segment is big and the size is unknown in advance
-}
-
-KaxSegment::KaxSegment(const KaxSegment & ElementToClone)
- :EbmlMaster(ElementToClone)
-{
-       // update the parent of each children
-       std::vector<EbmlElement *>::const_iterator Itr = begin();
-       while (Itr != end())
-       {
-               if (EbmlId(**Itr) == EBML_ID(KaxCluster)) {
-                       static_cast<KaxCluster *>(*Itr)->SetParent(*this);
-               }
-       }
-}
-
-
-uint64 KaxSegment::GetRelativePosition(uint64 aGlobalPosition) const
-{
-       return aGlobalPosition - GetElementPosition() - HeadSize();
-}
-
-uint64 KaxSegment::GetRelativePosition(const EbmlElement & Elt) const
-{
-       return GetRelativePosition(Elt.GetElementPosition());
-}
-
-uint64 KaxSegment::GetGlobalPosition(uint64 aRelativePosition) const
-{
-       return aRelativePosition + GetElementPosition() + HeadSize();
-}
-
-END_LIBMATROSKA_NAMESPACE
+/****************************************************************************\r
+** libmatroska : parse Matroska files, see http://www.matroska.org/\r
+**\r
+** <file/class description>\r
+**\r
+** Copyright (C) 2002-2010 Steve Lhomme.  All rights reserved.\r
+**\r
+** This file is part of libmatroska.\r
+**\r
+** This library is free software; you can redistribute it and/or\r
+** modify it under the terms of the GNU Lesser General Public\r
+** License as published by the Free Software Foundation; either\r
+** version 2.1 of the License, or (at your option) any later version.\r
+** \r
+** This library is distributed in the hope that it will be useful,\r
+** but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
+** Lesser General Public License for more details.\r
+** \r
+** You should have received a copy of the GNU Lesser General Public\r
+** License along with this library; if not, write to the Free Software\r
+** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\r
+**\r
+** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**\r
+** Contact license@matroska.org if any conditions of this licensing are\r
+** not clear to you.\r
+**\r
+**********************************************************************/\r
+\r
+/*!\r
+       \file\r
+       \version \$Id: KaxSegment.cpp 1096 2005-03-17 09:14:52Z robux4 $\r
+       \author Steve Lhomme     <robux4 @ users.sf.net>\r
+*/\r
+#include "matroska/KaxSegment.h"\r
+#include "ebml/EbmlHead.h"\r
+\r
+// sub elements\r
+#include "matroska/KaxCluster.h"\r
+#include "matroska/KaxSeekHead.h"\r
+#include "matroska/KaxCues.h"\r
+#include "matroska/KaxTracks.h"\r
+#include "matroska/KaxInfo.h"\r
+#include "matroska/KaxChapters.h"\r
+#include "matroska/KaxAttachments.h"\r
+#include "matroska/KaxTags.h"\r
+#include "matroska/KaxContexts.h"\r
+\r
+START_LIBMATROSKA_NAMESPACE\r
+\r
+EbmlSemantic KaxMatroska_ContextList[2] =\r
+{\r
+       EbmlSemantic(true, true,  EBML_INFO(EbmlHead)),\r
+       EbmlSemantic(true, false, EBML_INFO(KaxSegment)),\r
+};\r
+\r
+EbmlSemantic KaxSegment_ContextList[8] =\r
+{\r
+       EbmlSemantic(false, false, EBML_INFO(KaxCluster)),\r
+       EbmlSemantic(false, false, EBML_INFO(KaxSeekHead)),\r
+       EbmlSemantic(false, true,  EBML_INFO(KaxCues)),\r
+       EbmlSemantic(false, false, EBML_INFO(KaxTracks)),\r
+       EbmlSemantic(true,  true,  EBML_INFO(KaxInfo)),\r
+       EbmlSemantic(false, true,  EBML_INFO(KaxChapters)),\r
+       EbmlSemantic(false, true,  EBML_INFO(KaxAttachments)),\r
+       EbmlSemantic(false, true,  EBML_INFO(KaxTags)),\r
+};\r
+\r
+const EbmlSemanticContext KaxMatroska_Context = EbmlSemanticContext(countof(KaxMatroska_ContextList), KaxMatroska_ContextList, NULL, *GetKaxGlobal_Context, NULL);\r
+const EbmlSemanticContext KaxSegment_Context = EbmlSemanticContext(countof(KaxSegment_ContextList), KaxSegment_ContextList, NULL, *GetKaxGlobal_Context, &EBML_INFO(KaxSegment));\r
+\r
+EbmlId KaxSegment_TheId(0x18538067, 4);\r
+const EbmlCallbacks KaxSegment::ClassInfos(KaxSegment::Create, KaxSegment_TheId, "Segment\0rotomopogo", KaxSegment_Context);\r
+\r
+KaxSegment::KaxSegment()\r
+       :EbmlMaster(KaxSegment_Context)\r
+{\r
+       SetSizeLength(5); // mandatory min size support (for easier updating) (2^(7*5)-2 = 32Go)\r
+       SetSizeInfinite(); // by default a segment is big and the size is unknown in advance\r
+}\r
+\r
+KaxSegment::KaxSegment(const KaxSegment & ElementToClone)\r
+ :EbmlMaster(ElementToClone)\r
+{\r
+       // update the parent of each children\r
+       std::vector<EbmlElement *>::const_iterator Itr = begin();\r
+       while (Itr != end())\r
+       {\r
+               if (EbmlId(**Itr) == EBML_ID(KaxCluster)) {\r
+                       static_cast<KaxCluster *>(*Itr)->SetParent(*this);\r
+               }\r
+       }\r
+}\r
+\r
+\r
+uint64 KaxSegment::GetRelativePosition(uint64 aGlobalPosition) const\r
+{\r
+       return aGlobalPosition - GetElementPosition() - HeadSize();\r
+}\r
+\r
+uint64 KaxSegment::GetRelativePosition(const EbmlElement & Elt) const\r
+{\r
+       return GetRelativePosition(Elt.GetElementPosition());\r
+}\r
+\r
+uint64 KaxSegment::GetGlobalPosition(uint64 aRelativePosition) const\r
+{\r
+       return aRelativePosition + GetElementPosition() + HeadSize();\r
+}\r
+\r
+END_LIBMATROSKA_NAMESPACE\r
index 172095943ec4e8e814b1654c612d09bdd765ba2b..ff2bc68ddf1898885db33a5daecd3f025bafe49f 100644 (file)
-/****************************************************************************
-** libmatroska : parse Matroska files, see http://www.matroska.org/
-**
-** <file/class description>
-**
-** Copyright (C) 2002-2004 Steve Lhomme.  All rights reserved.
-**
-** This file is part of libmatroska.
-**
-** This library is free software; you can redistribute it and/or
-** modify it under the terms of the GNU Lesser General Public
-** License as published by the Free Software Foundation; either
-** version 2.1 of the License, or (at your option) any later version.
-** 
-** This library is distributed in the hope that it will be useful,
-** but WITHOUT ANY WARRANTY; without even the implied warranty of
-** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-** Lesser General Public License for more details.
-** 
-** You should have received a copy of the GNU Lesser General Public
-** License along with this library; if not, write to the Free Software
-** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-**
-** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**
-** Contact license@matroska.org if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-/*!
-       \file
-       \version \$Id: KaxTag.cpp 1325 2009-03-30 07:56:54Z robux4 $
-       \author Jory Stone       <jcsston @ toughguy.net>
-       \author Steve Lhomme     <robux4 @ users.sf.net>
-*/
-#include "matroska/KaxTag.h"
-#include "matroska/KaxTagMulti.h"
-#include "matroska/KaxContexts.h"
-
-using namespace LIBEBML_NAMESPACE;
-
-// sub elements
-START_LIBMATROSKA_NAMESPACE
-
-EbmlSemantic KaxTag_ContextList[14] =
-{      
-       EbmlSemantic(true,  true,  EBML_INFO(KaxTagTargets)),
-       EbmlSemantic(false, true,  EBML_INFO(KaxTagGeneral)),
-       EbmlSemantic(false, true,  EBML_INFO(KaxTagGenres)),
-       EbmlSemantic(false, true,  EBML_INFO(KaxTagAudioSpecific)),
-       EbmlSemantic(false, true,  EBML_INFO(KaxTagImageSpecific)),
-       EbmlSemantic(false, true,  EBML_INFO(KaxTagMultiCommercial)),
-       EbmlSemantic(false, true,  EBML_INFO(KaxTagMultiDate)),
-       EbmlSemantic(false, true,  EBML_INFO(KaxTagMultiEntity)),
-       EbmlSemantic(false, true,  EBML_INFO(KaxTagMultiIdentifier)),
-       EbmlSemantic(false, true,  EBML_INFO(KaxTagMultiLegal)),
-       EbmlSemantic(false, true,  EBML_INFO(KaxTagMultiTitle)),
-       EbmlSemantic(false, true,  EBML_INFO(KaxTagMultiAttachment)),
-//     EbmlSemantic(false, false, EBML_INFO(KaxTagLength)),
-//     EbmlSemantic(false, false, EBML_INFO(KaxTagPlaylistDelay)),
-//     EbmlSemantic(false, false, EBML_INFO(KaxTagUnsynchronisedText)),
-//     EbmlSemantic(false, false, EBML_INFO(KaxTagUserDefinedURL)),
-       EbmlSemantic(false, false, EBML_INFO(KaxTagMultiComment)),
-       EbmlSemantic(true,  false, EBML_INFO(KaxTagSimple)),
-};
-
-EbmlSemantic KaxTagTargets_ContextList[6] =
-{      
-       EbmlSemantic(false, true,  EBML_INFO(KaxTagTargetTypeValue)),
-       EbmlSemantic(false, true,  EBML_INFO(KaxTagTargetType)),
-       EbmlSemantic(false, false, EBML_INFO(KaxTagTrackUID)),
-       EbmlSemantic(false, false, EBML_INFO(KaxTagEditionUID)),
-       EbmlSemantic(false, false, EBML_INFO(KaxTagChapterUID)),
-       EbmlSemantic(false, false, EBML_INFO(KaxTagAttachmentUID)),
-};
-
-EbmlSemantic KaxTagGeneral_ContextList[17] =
-{      
-       EbmlSemantic(false, true,  EBML_INFO(KaxTagArchivalLocation)),
-       EbmlSemantic(false, true,  EBML_INFO(KaxTagFile)),
-       EbmlSemantic(false, false, EBML_INFO(KaxTagKeywords)),
-       EbmlSemantic(false, true,  EBML_INFO(KaxTagMood)),
-       EbmlSemantic(false, false, EBML_INFO(KaxTagRecordLocation)),
-       EbmlSemantic(false, true,  EBML_INFO(KaxTagSource)),
-       EbmlSemantic(false, true,  EBML_INFO(KaxTagSourceForm)),
-       EbmlSemantic(false, true,  EBML_INFO(KaxTagProduct)),
-       EbmlSemantic(false, true,  EBML_INFO(KaxTagOriginalMediaType)),
-       EbmlSemantic(false, true,  EBML_INFO(KaxTagPlayCounter)),
-       EbmlSemantic(false, true,  EBML_INFO(KaxTagPopularimeter)),
-       EbmlSemantic(false, true,  EBML_INFO(KaxTagSubject)),
-       EbmlSemantic(false, true,  EBML_INFO(KaxTagBibliography)),
-       EbmlSemantic(false, true,  EBML_INFO(KaxTagLanguage)),
-       EbmlSemantic(false, true,  EBML_INFO(KaxTagRating)),
-       EbmlSemantic(false, true,  EBML_INFO(KaxTagEncoder)),
-       EbmlSemantic(false, true,  EBML_INFO(KaxTagEncodeSettings)),
-};
-
-EbmlSemantic KaxTagGenres_ContextList[3] =
-{      
-       EbmlSemantic(false, false, EBML_INFO(KaxTagAudioGenre)),
-       EbmlSemantic(false, false, EBML_INFO(KaxTagVideoGenre)),
-       EbmlSemantic(false, true,  EBML_INFO(KaxTagSubGenre)),
-};
-
-EbmlSemantic KaxTagAudioSpecific_ContextList[10] =
-{      
-       EbmlSemantic(false, true, EBML_INFO(KaxTagAudioPeak)),
-       EbmlSemantic(false, true, EBML_INFO(KaxTagAudioEncryption)),
-       EbmlSemantic(false, true, EBML_INFO(KaxTagAudioGain)),
-       EbmlSemantic(false, true, EBML_INFO(KaxTagBPM)),
-       EbmlSemantic(false, true, EBML_INFO(KaxTagDiscTrack)),
-       EbmlSemantic(false, true, EBML_INFO(KaxTagSetPart)),
-       EbmlSemantic(false, true, EBML_INFO(KaxTagEqualisation)),
-       EbmlSemantic(false, true, EBML_INFO(KaxTagInitialKey)),
-       EbmlSemantic(false, true, EBML_INFO(KaxTagOfficialAudioFileURL)),
-       EbmlSemantic(false, true, EBML_INFO(KaxTagOfficialAudioSourceURL)),
-};
-
-EbmlSemantic KaxTagImageSpecific_ContextList[6] =
-{
-       EbmlSemantic(false, true, EBML_INFO(KaxTagCaptureDPI)),
-       EbmlSemantic(false, true, EBML_INFO(KaxTagCaptureLightness)),
-       EbmlSemantic(false, true, EBML_INFO(KaxTagCapturePaletteSetting)),
-       EbmlSemantic(false, true, EBML_INFO(KaxTagCaptureSharpness)),
-       EbmlSemantic(false, true, EBML_INFO(KaxTagCropped)),
-       EbmlSemantic(false, true, EBML_INFO(KaxTagOriginalDimensions)),
-};
-
-EbmlSemantic KaxTagSimple_ContextList[6] =
-{      
-       EbmlSemantic(true,  true,  EBML_INFO(KaxTagName)),
-       EbmlSemantic(true,  true,  EBML_INFO(KaxTagLangue)),
-       EbmlSemantic(true,  true,  EBML_INFO(KaxTagDefault)),
-       EbmlSemantic(false, true,  EBML_INFO(KaxTagString)),
-       EbmlSemantic(false, true,  EBML_INFO(KaxTagBinary)),
-       EbmlSemantic(false, false, EBML_INFO(KaxTagSimple)),
-};
-
-const EbmlSemanticContext KaxTag_Context = EbmlSemanticContext(countof(KaxTag_ContextList), KaxTag_ContextList, &KaxTags_Context, *GetKaxTagsGlobal_Context, &EBML_INFO(KaxTag));
-const EbmlSemanticContext KaxTagTargets_Context = EbmlSemanticContext(countof(KaxTagTargets_ContextList), KaxTagTargets_ContextList, &KaxTag_Context, *GetKaxTagsGlobal_Context, &EBML_INFO(KaxTagTargets));
-const EbmlSemanticContext KaxTagGeneral_Context = EbmlSemanticContext(countof(KaxTagGeneral_ContextList), KaxTagGeneral_ContextList, &KaxTag_Context, *GetKaxTagsGlobal_Context, &EBML_INFO(KaxTagGeneral));
-const EbmlSemanticContext KaxTagGenres_Context = EbmlSemanticContext(countof(KaxTagGenres_ContextList), KaxTagGenres_ContextList, &KaxTag_Context, *GetKaxTagsGlobal_Context, &EBML_INFO(KaxTagGenres));
-const EbmlSemanticContext KaxTagAudioSpecific_Context = EbmlSemanticContext(countof(KaxTagAudioSpecific_ContextList), KaxTagAudioSpecific_ContextList, &KaxTag_Context, *GetKaxTagsGlobal_Context, &EBML_INFO(KaxTagAudioSpecific));
-const EbmlSemanticContext KaxTagImageSpecific_Context = EbmlSemanticContext(countof(KaxTagImageSpecific_ContextList), KaxTagImageSpecific_ContextList, &KaxTag_Context, *GetKaxTagsGlobal_Context, &EBML_INFO(KaxTagImageSpecific));
-const EbmlSemanticContext KaxTagBibliography_Context = EbmlSemanticContext(0, NULL, &KaxTag_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagBibliography));
-const EbmlSemanticContext KaxTagEncoder_Context = EbmlSemanticContext(0, NULL, &KaxTag_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagEncoder));
-const EbmlSemanticContext KaxTagEncodeSettings_Context = EbmlSemanticContext(0, NULL, &KaxTag_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagEncodeSettings));
-const EbmlSemanticContext KaxTagLanguage_Context = EbmlSemanticContext(0, NULL, &KaxTag_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagLanguage));
-const EbmlSemanticContext KaxTagLength_Context = EbmlSemanticContext(0, NULL, &KaxTag_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagLength));
-const EbmlSemanticContext KaxTagPlaylistDelay_Context = EbmlSemanticContext(0, NULL, &KaxTag_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagPlaylistDelay));
-const EbmlSemanticContext KaxTagRating_Context = EbmlSemanticContext(0, NULL, &KaxTag_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagRating));
-const EbmlSemanticContext KaxTagSubject_Context = EbmlSemanticContext(0, NULL, &KaxTag_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagSubject));
-const EbmlSemanticContext KaxTagUnsynchronisedText_Context = EbmlSemanticContext(0, NULL, &KaxTag_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagUnsynchronisedText));
-const EbmlSemanticContext KaxTagUserDefinedURL_Context = EbmlSemanticContext(0, NULL, &KaxTag_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagUserDefinedURL));
-const EbmlSemanticContext KaxTagTargetTypeValue_Context = EbmlSemanticContext(0, NULL, &KaxTagTargets_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagTargetTypeValue));
-const EbmlSemanticContext KaxTagTargetType_Context = EbmlSemanticContext(0, NULL, &KaxTagTargets_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagTargetType));
-const EbmlSemanticContext KaxTagTrackUID_Context = EbmlSemanticContext(0, NULL, &KaxTagTargets_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagTrackUID));
-const EbmlSemanticContext KaxTagEditionUID_Context = EbmlSemanticContext(0, NULL, &KaxTagTargets_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagEditionUID));
-const EbmlSemanticContext KaxTagChapterUID_Context = EbmlSemanticContext(0, NULL, &KaxTagTargets_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagChapterUID));
-const EbmlSemanticContext KaxTagAttachmentUID_Context = EbmlSemanticContext(0, NULL, &KaxTagTargets_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagAttachmentUID));
-const EbmlSemanticContext KaxTagArchivalLocation_Context = EbmlSemanticContext(0, NULL, &KaxTagGeneral_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagArchivalLocation));
-const EbmlSemanticContext KaxTagFile_Context = EbmlSemanticContext(0, NULL, &KaxTagGeneral_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagFile));
-const EbmlSemanticContext KaxTagKeywords_Context = EbmlSemanticContext(0, NULL, &KaxTagGeneral_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagKeywords));
-const EbmlSemanticContext KaxTagMood_Context = EbmlSemanticContext(0, NULL, &KaxTagGeneral_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagMood));
-const EbmlSemanticContext KaxTagRecordLocation_Context = EbmlSemanticContext(0, NULL, &KaxTagGeneral_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagRecordLocation));
-const EbmlSemanticContext KaxTagSource_Context = EbmlSemanticContext(0, NULL, &KaxTagGeneral_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagSource));
-const EbmlSemanticContext KaxTagSourceForm_Context = EbmlSemanticContext(0, NULL, &KaxTagGeneral_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagSourceForm));
-const EbmlSemanticContext KaxTagProduct_Context = EbmlSemanticContext(0, NULL, &KaxTagGeneral_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagProduct));
-const EbmlSemanticContext KaxTagOriginalMediaType_Context = EbmlSemanticContext(0, NULL, &KaxTagGeneral_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagOriginalMediaType));
-const EbmlSemanticContext KaxTagPlayCounter_Context = EbmlSemanticContext(0, NULL, &KaxTagGeneral_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagPlayCounter));
-const EbmlSemanticContext KaxTagPopularimeter_Context = EbmlSemanticContext(0, NULL, &KaxTagGeneral_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagPopularimeter));
-const EbmlSemanticContext KaxTagAudioGenre_Context = EbmlSemanticContext(0, NULL, &KaxTagGenres_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagAudioGenre));
-const EbmlSemanticContext KaxTagVideoGenre_Context = EbmlSemanticContext(0, NULL, &KaxTagGenres_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagVideoGenre));
-const EbmlSemanticContext KaxTagSubGenre_Context = EbmlSemanticContext(0, NULL, &KaxTagGenres_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagSubGenre));
-const EbmlSemanticContext KaxTagAudioEncryption_Context = EbmlSemanticContext(0, NULL, &KaxTagAudioSpecific_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagAudioEncryption));
-const EbmlSemanticContext KaxTagAudioGain_Context = EbmlSemanticContext(0, NULL, &KaxTagAudioSpecific_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagAudioGain));
-const EbmlSemanticContext KaxTagAudioPeak_Context = EbmlSemanticContext(0, NULL, &KaxTagAudioSpecific_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagAudioPeak));
-const EbmlSemanticContext KaxTagBPM_Context = EbmlSemanticContext(0, NULL, &KaxTagAudioSpecific_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagBPM));
-const EbmlSemanticContext KaxTagDiscTrack_Context = EbmlSemanticContext(0, NULL, &KaxTagAudioSpecific_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagDiscTrack));
-const EbmlSemanticContext KaxTagSetPart_Context = EbmlSemanticContext(0, NULL, &KaxTagAudioSpecific_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagSetPart));
-const EbmlSemanticContext KaxTagEqualisation_Context = EbmlSemanticContext(0, NULL, &KaxTagAudioSpecific_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagEqualisation));
-const EbmlSemanticContext KaxTagInitialKey_Context = EbmlSemanticContext(0, NULL, &KaxTagAudioSpecific_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagInitialKey));
-const EbmlSemanticContext KaxTagOfficialAudioFileURL_Context = EbmlSemanticContext(0, NULL, &KaxTagAudioSpecific_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagOfficialAudioFileURL));
-const EbmlSemanticContext KaxTagOfficialAudioSourceURL_Context = EbmlSemanticContext(0, NULL, &KaxTagAudioSpecific_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagOfficialAudioSourceURL));
-const EbmlSemanticContext KaxTagCaptureDPI_Context = EbmlSemanticContext(0, NULL, &KaxTagImageSpecific_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagCaptureDPI));
-const EbmlSemanticContext KaxTagCaptureLightness_Context = EbmlSemanticContext(0, NULL, &KaxTagImageSpecific_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagCaptureLightness));
-const EbmlSemanticContext KaxTagCapturePaletteSetting_Context = EbmlSemanticContext(0, NULL, &KaxTagImageSpecific_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagCapturePaletteSetting));
-const EbmlSemanticContext KaxTagCaptureSharpness_Context = EbmlSemanticContext(0, NULL, &KaxTagImageSpecific_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagCaptureSharpness));
-const EbmlSemanticContext KaxTagCropped_Context = EbmlSemanticContext(0, NULL, &KaxTagImageSpecific_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagCropped));
-const EbmlSemanticContext KaxTagOriginalDimensions_Context = EbmlSemanticContext(0, NULL, &KaxTagImageSpecific_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagOriginalDimensions));
-
-const EbmlSemanticContext KaxTagSimple_Context = EbmlSemanticContext(countof(KaxTagSimple_ContextList), KaxTagSimple_ContextList, &KaxTag_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagSimple));
-const EbmlSemanticContext KaxTagName_Context = EbmlSemanticContext(0, NULL, &KaxTagSimple_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagName));
-const EbmlSemanticContext KaxTagLangue_Context = EbmlSemanticContext(0, NULL, &KaxTagSimple_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagLangue));
-const EbmlSemanticContext KaxTagDefault_Context = EbmlSemanticContext(0, NULL, &KaxTagSimple_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagDefault));
-const EbmlSemanticContext KaxTagString_Context = EbmlSemanticContext(0, NULL, &KaxTagSimple_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagString));
-const EbmlSemanticContext KaxTagBinary_Context = EbmlSemanticContext(0, NULL, &KaxTagSimple_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagBinary));
-
-EbmlId KaxTag_TheId                      (0x7373, 2);
-EbmlId KaxTagTargets_TheId               (0x63C0, 2);
-EbmlId KaxTagGeneral_TheId               (0x67C9, 2);
-EbmlId KaxTagGenres_TheId                (0x6583, 2);
-EbmlId KaxTagAudioSpecific_TheId         (0x41C5, 2);
-EbmlId KaxTagImageSpecific_TheId         (0x4990, 2);
-EbmlId KaxTagBibliography_TheId          (0x4488, 2);
-EbmlId KaxTagEncoder_TheId               (0x4431, 2);
-EbmlId KaxTagEncodeSettings_TheId        (0x6526, 2);
-EbmlId KaxTagLanguage_TheId              (0x22B59F, 3);
-EbmlId KaxTagLength_TheId                (0x5243, 2);
-EbmlId KaxTagPlaylistDelay_TheId         (0x72CC, 2);
-EbmlId KaxTagRating_TheId                (0x52BC, 2);
-EbmlId KaxTagSubject_TheId               (0x49C1, 2);
-EbmlId KaxTagUnsynchronisedText_TheId    (0x874B, 2);
-EbmlId KaxTagUserDefinedURL_TheId        (0x434A, 2);
-EbmlId KaxTagTargetTypeValue_TheId       (0x68CA, 2);
-EbmlId KaxTagTargetType_TheId            (0x63CA, 2);
-EbmlId KaxTagTrackUID_TheId              (0x63C5, 2);
-EbmlId KaxTagEditionUID_TheId            (0x63C9, 2);
-EbmlId KaxTagChapterUID_TheId            (0x63C4, 2);
-EbmlId KaxTagAttachmentUID_TheId         (0x63C6, 2);
-EbmlId KaxTagAudioGenre_TheId            (0x65C2, 2);
-EbmlId KaxTagVideoGenre_TheId            (0x65A1, 2);
-EbmlId KaxTagSubGenre_TheId              (0x65AC, 2);
-EbmlId KaxTagAudioEncryption_TheId       (0x41B4, 2);
-EbmlId KaxTagAudioGain_TheId             (0x4199, 2);
-EbmlId KaxTagAudioPeak_TheId             (0x4189, 2);
-EbmlId KaxTagBPM_TheId                   (0x41A1, 2);
-EbmlId KaxTagDiscTrack_TheId             (0x41B6, 2);
-EbmlId KaxTagSetPart_TheId               (0x416E, 2);
-EbmlId KaxTagEqualisation_TheId          (0x41B1, 2);
-EbmlId KaxTagInitialKey_TheId            (0x413A, 2);
-EbmlId KaxTagOfficialAudioFileURL_TheId         (0x4133, 2);
-EbmlId KaxTagOfficialAudioSourceURL_TheId(0x413E, 2);
-EbmlId KaxTagArchivalLocation_TheId      (0x45A4, 2);
-EbmlId KaxTagFile_TheId                  (0x454E, 2);
-EbmlId KaxTagKeywords_TheId              (0x458C, 2);
-EbmlId KaxTagMood_TheId                  (0x45AE, 2);
-EbmlId KaxTagRecordLocation_TheId        (0x457E, 2);
-EbmlId KaxTagSource_TheId                (0x458A, 2);
-EbmlId KaxTagSourceForm_TheId            (0x45B5, 2);
-EbmlId KaxTagProduct_TheId               (0x45E3, 2);
-EbmlId KaxTagOriginalMediaType_TheId     (0x45A7, 2);
-EbmlId KaxTagPlayCounter_TheId           (0x4566, 2);
-EbmlId KaxTagPopularimeter_TheId         (0x4532, 2);
-EbmlId KaxTagCaptureDPI_TheId            (0x49C7, 2);
-EbmlId KaxTagCaptureLightness_TheId      (0x49E1, 2);
-EbmlId KaxTagCapturePaletteSetting_TheId (0x4934, 2);
-EbmlId KaxTagCaptureSharpness_TheId      (0x4922, 2);
-EbmlId KaxTagCropped_TheId               (0x4987, 2);
-EbmlId KaxTagOriginalDimensions_TheId    (0x4933, 2);
-
-EbmlId KaxTagSimple_TheId                                                               (0x67C8, 2);
-EbmlId KaxTagName_TheId                                                                         (0x45A3, 2);
-EbmlId KaxTagLangue_TheId                                                               (0x447A, 2);
-EbmlId KaxTagDefault_TheId                                                              (0x4484, 2);
-EbmlId KaxTagString_TheId                                                               (0x4487, 2);
-EbmlId KaxTagBinary_TheId                                                               (0x4485, 2);
-
-const EbmlCallbacks KaxTag::ClassInfos(KaxTag::Create, KaxTag_TheId, "Tag", KaxTag_Context);
-const EbmlCallbacks KaxTagTargets::ClassInfos(KaxTagTargets::Create, KaxTagTargets_TheId, "TagTargets", KaxTagTargets_Context);
-const EbmlCallbacks KaxTagGeneral::ClassInfos(KaxTagGeneral::Create, KaxTagGeneral_TheId, "TagGeneral", KaxTagGeneral_Context);
-const EbmlCallbacks KaxTagGenres::ClassInfos(KaxTagGenres::Create, KaxTagGenres_TheId, "TagGenres", KaxTagGenres_Context);
-const EbmlCallbacks KaxTagAudioSpecific::ClassInfos(KaxTagAudioSpecific::Create, KaxTagAudioSpecific_TheId, "TagAudioSpecific", KaxTagAudioSpecific_Context);
-const EbmlCallbacks KaxTagImageSpecific::ClassInfos(KaxTagImageSpecific::Create, KaxTagImageSpecific_TheId, "TagImageSpecific", KaxTagImageSpecific_Context);
-const EbmlCallbacks KaxTagBibliography::ClassInfos(KaxTagBibliography::Create, KaxTagBibliography_TheId, "Bibliography", KaxTagBibliography_Context);
-const EbmlCallbacks KaxTagCaptureDPI::ClassInfos(KaxTagCaptureDPI::Create, KaxTagCaptureDPI_TheId, "CaptureDPI", KaxTagCaptureDPI_Context);
-const EbmlCallbacks KaxTagCaptureLightness::ClassInfos(KaxTagCaptureLightness::Create, KaxTagCaptureLightness_TheId, "CaptureLightness", KaxTagCaptureLightness_Context);
-const EbmlCallbacks KaxTagCapturePaletteSetting::ClassInfos(KaxTagCapturePaletteSetting::Create, KaxTagCapturePaletteSetting_TheId, "CapturePaletteSetting", KaxTagCapturePaletteSetting_Context);
-const EbmlCallbacks KaxTagCaptureSharpness::ClassInfos(KaxTagCaptureSharpness::Create, KaxTagCaptureSharpness_TheId, "CaptureSharpness", KaxTagCaptureSharpness_Context);
-const EbmlCallbacks KaxTagCropped::ClassInfos(KaxTagCropped::Create, KaxTagCropped_TheId, "Cropped", KaxTagCropped_Context);
-const EbmlCallbacks KaxTagEncoder::ClassInfos(KaxTagEncoder::Create, KaxTagEncoder_TheId, "Encoder", KaxTagEncoder_Context);
-const EbmlCallbacks KaxTagEncodeSettings::ClassInfos(KaxTagEncodeSettings::Create, KaxTagEncodeSettings_TheId, "EncodeSettings", KaxTagEncodeSettings_Context);
-const EbmlCallbacks KaxTagLanguage::ClassInfos(KaxTagLanguage::Create, KaxTagLanguage_TheId, "Language", KaxTagLanguage_Context);
-const EbmlCallbacks KaxTagLength::ClassInfos(KaxTagLength::Create, KaxTagLength_TheId, "Length", KaxTagLength_Context);
-const EbmlCallbacks KaxTagOriginalDimensions::ClassInfos(KaxTagOriginalDimensions::Create, KaxTagOriginalDimensions_TheId, "OriginalDimensions", KaxTagOriginalDimensions_Context);
-const EbmlCallbacks KaxTagPlaylistDelay::ClassInfos(KaxTagPlaylistDelay::Create, KaxTagPlaylistDelay_TheId, "PlaylistDelay", KaxTagPlaylistDelay_Context);
-const EbmlCallbacks KaxTagRating::ClassInfos(KaxTagRating::Create, KaxTagRating_TheId, "Rating", KaxTagRating_Context);
-const EbmlCallbacks KaxTagSubject::ClassInfos(KaxTagSubject::Create, KaxTagSubject_TheId, "Subject", KaxTagSubject_Context);
-const EbmlCallbacks KaxTagUnsynchronisedText::ClassInfos(KaxTagUnsynchronisedText::Create, KaxTagUnsynchronisedText_TheId, "UnsynchronisedText", KaxTagUnsynchronisedText_Context);
-const EbmlCallbacks KaxTagUserDefinedURL::ClassInfos(KaxTagUserDefinedURL::Create, KaxTagUserDefinedURL_TheId, "UserDefinedURL", KaxTagUserDefinedURL_Context);
-const EbmlCallbacks KaxTagTargetTypeValue::ClassInfos(KaxTagTargetTypeValue::Create, KaxTagTargetTypeValue_TheId, "TagTargetTypeValue", KaxTagTargetTypeValue_Context);
-const EbmlCallbacks KaxTagTargetType::ClassInfos(KaxTagTargetType::Create, KaxTagTargetType_TheId, "TagTargetType", KaxTagTargetType_Context);
-const EbmlCallbacks KaxTagTrackUID::ClassInfos(KaxTagTrackUID::Create, KaxTagTrackUID_TheId, "TagTrackUID", KaxTagTrackUID_Context);
-const EbmlCallbacks KaxTagEditionUID::ClassInfos(KaxTagEditionUID::Create, KaxTagEditionUID_TheId, "TagEditionUID", KaxTagEditionUID_Context);
-const EbmlCallbacks KaxTagChapterUID::ClassInfos(KaxTagChapterUID::Create, KaxTagChapterUID_TheId, "TagChapterUID", KaxTagChapterUID_Context);
-const EbmlCallbacks KaxTagAttachmentUID::ClassInfos(KaxTagAttachmentUID::Create, KaxTagAttachmentUID_TheId, "TagAttachmentUID", KaxTagAttachmentUID_Context);
-const EbmlCallbacks KaxTagAudioGenre::ClassInfos(KaxTagAudioGenre::Create, KaxTagAudioGenre_TheId, "AudioGenre", KaxTagAudioGenre_Context);
-const EbmlCallbacks KaxTagVideoGenre::ClassInfos(KaxTagVideoGenre::Create, KaxTagVideoGenre_TheId, "VideoGenre", KaxTagVideoGenre_Context);
-const EbmlCallbacks KaxTagSubGenre::ClassInfos(KaxTagSubGenre::Create, KaxTagSubGenre_TheId, "SubGenre", KaxTagSubGenre_Context);
-const EbmlCallbacks KaxTagAudioEncryption::ClassInfos(KaxTagAudioEncryption::Create, KaxTagAudioEncryption_TheId, "AudioEncryption", KaxTagAudioEncryption_Context);
-const EbmlCallbacks KaxTagAudioGain::ClassInfos(KaxTagAudioGain::Create, KaxTagAudioGain_TheId, "AudioGain", KaxTagAudioGain_Context);
-const EbmlCallbacks KaxTagAudioPeak::ClassInfos(KaxTagAudioPeak::Create, KaxTagAudioPeak_TheId, "AudioPeak", KaxTagAudioPeak_Context);
-const EbmlCallbacks KaxTagBPM::ClassInfos(KaxTagBPM::Create, KaxTagBPM_TheId, "BPM", KaxTagBPM_Context);
-const EbmlCallbacks KaxTagDiscTrack::ClassInfos(KaxTagDiscTrack::Create, KaxTagDiscTrack_TheId, "DiscTrack", KaxTagDiscTrack_Context);
-const EbmlCallbacks KaxTagSetPart::ClassInfos(KaxTagSetPart::Create, KaxTagSetPart_TheId, "SetPart", KaxTagSetPart_Context);
-const EbmlCallbacks KaxTagEqualisation::ClassInfos(KaxTagEqualisation::Create, KaxTagEqualisation_TheId, "Equalisation", KaxTagEqualisation_Context);
-const EbmlCallbacks KaxTagInitialKey::ClassInfos(KaxTagInitialKey::Create, KaxTagInitialKey_TheId, "InitialKey", KaxTagInitialKey_Context);
-const EbmlCallbacks KaxTagOfficialAudioFileURL::ClassInfos(KaxTagOfficialAudioFileURL::Create, KaxTagOfficialAudioFileURL_TheId, "OfficialAudioFileURL", KaxTagOfficialAudioFileURL_Context);
-const EbmlCallbacks KaxTagOfficialAudioSourceURL::ClassInfos(KaxTagOfficialAudioSourceURL::Create, KaxTagOfficialAudioSourceURL_TheId, "AudioSourceURL", KaxTagOfficialAudioSourceURL_Context);
-const EbmlCallbacks KaxTagArchivalLocation::ClassInfos(KaxTagArchivalLocation::Create, KaxTagArchivalLocation_TheId, "ArchivalLocation", KaxTagArchivalLocation_Context);
-const EbmlCallbacks KaxTagFile::ClassInfos(KaxTagFile::Create, KaxTagFile_TheId, "File", KaxTagFile_Context);
-const EbmlCallbacks KaxTagKeywords::ClassInfos(KaxTagKeywords::Create, KaxTagKeywords_TheId, "Keywords", KaxTagKeywords_Context);
-const EbmlCallbacks KaxTagMood::ClassInfos(KaxTagMood::Create, KaxTagMood_TheId, "Mood", KaxTagMood_Context);
-const EbmlCallbacks KaxTagRecordLocation::ClassInfos(KaxTagRecordLocation::Create, KaxTagRecordLocation_TheId, "RecordLocation", KaxTagRecordLocation_Context);
-const EbmlCallbacks KaxTagSource::ClassInfos(KaxTagSource::Create, KaxTagSource_TheId, "Source", KaxTagSource_Context);
-const EbmlCallbacks KaxTagSourceForm::ClassInfos(KaxTagSourceForm::Create, KaxTagSourceForm_TheId, "SourceForm", KaxTagSourceForm_Context);
-const EbmlCallbacks KaxTagProduct::ClassInfos(KaxTagProduct::Create, KaxTagProduct_TheId, "Product", KaxTagProduct_Context);
-const EbmlCallbacks KaxTagOriginalMediaType::ClassInfos(KaxTagOriginalMediaType::Create, KaxTagOriginalMediaType_TheId, "OriginalMediaType", KaxTagOriginalMediaType_Context);
-const EbmlCallbacks KaxTagPlayCounter::ClassInfos(KaxTagPlayCounter::Create, KaxTagPlayCounter_TheId, "PlayCounter", KaxTagPlayCounter_Context);
-const EbmlCallbacks KaxTagPopularimeter::ClassInfos(KaxTagPopularimeter::Create, KaxTagPopularimeter_TheId, "Popularimeter", KaxTagPopularimeter_Context);
-
-const EbmlCallbacks KaxTagSimple::ClassInfos(KaxTagSimple::Create, KaxTagSimple_TheId, "TagSimple", KaxTagSimple_Context);
-const EbmlCallbacks KaxTagName::ClassInfos(KaxTagName::Create, KaxTagName_TheId, "TagName", KaxTagName_Context);
-const EbmlCallbacks KaxTagLangue::ClassInfos(KaxTagLangue::Create, KaxTagLangue_TheId, "TagLanguage", KaxTagLangue_Context);
-const EbmlCallbacks KaxTagDefault::ClassInfos(KaxTagDefault::Create, KaxTagDefault_TheId, "TagDefault", KaxTagDefault_Context);
-const EbmlCallbacks KaxTagString::ClassInfos(KaxTagString::Create, KaxTagString_TheId, "TagString", KaxTagString_Context);
-const EbmlCallbacks KaxTagBinary::ClassInfos(KaxTagBinary::Create, KaxTagBinary_TheId, "TagBinary", KaxTagBinary_Context);
-
-KaxTag::KaxTag()
-       :EbmlMaster(KaxTag_Context)
-{}
-
-KaxTagTargets::KaxTagTargets()
-       :EbmlMaster(KaxTagTargets_Context)
-{}
-
-KaxTagGeneral::KaxTagGeneral()
-       :EbmlMaster(KaxTagGeneral_Context)
-{}
-
-KaxTagGenres::KaxTagGenres()
-       :EbmlMaster(KaxTagGenres_Context)
-{}
-
-KaxTagAudioSpecific::KaxTagAudioSpecific()
-       :EbmlMaster(KaxTagAudioSpecific_Context)
-{}
-
-KaxTagImageSpecific::KaxTagImageSpecific()
-       :EbmlMaster(KaxTagImageSpecific_Context)
-{}
-
-KaxTagSimple::KaxTagSimple()
-       :EbmlMaster(KaxTagSimple_Context)
-{}
-
-END_LIBMATROSKA_NAMESPACE
+/****************************************************************************\r
+** libmatroska : parse Matroska files, see http://www.matroska.org/\r
+**\r
+** <file/class description>\r
+**\r
+** Copyright (C) 2002-2010 Steve Lhomme.  All rights reserved.\r
+**\r
+** This file is part of libmatroska.\r
+**\r
+** This library is free software; you can redistribute it and/or\r
+** modify it under the terms of the GNU Lesser General Public\r
+** License as published by the Free Software Foundation; either\r
+** version 2.1 of the License, or (at your option) any later version.\r
+** \r
+** This library is distributed in the hope that it will be useful,\r
+** but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
+** Lesser General Public License for more details.\r
+** \r
+** You should have received a copy of the GNU Lesser General Public\r
+** License along with this library; if not, write to the Free Software\r
+** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\r
+**\r
+** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**\r
+** Contact license@matroska.org if any conditions of this licensing are\r
+** not clear to you.\r
+**\r
+**********************************************************************/\r
+\r
+/*!\r
+       \file\r
+       \version \$Id: KaxTag.cpp 1325 2009-03-30 07:56:54Z robux4 $\r
+       \author Jory Stone       <jcsston @ toughguy.net>\r
+       \author Steve Lhomme     <robux4 @ users.sf.net>\r
+*/\r
+#include "matroska/KaxTag.h"\r
+#include "matroska/KaxTagMulti.h"\r
+#include "matroska/KaxContexts.h"\r
+\r
+using namespace LIBEBML_NAMESPACE;\r
+\r
+// sub elements\r
+START_LIBMATROSKA_NAMESPACE\r
+\r
+EbmlSemantic KaxTag_ContextList[14] =\r
+{      \r
+       EbmlSemantic(true,  true,  EBML_INFO(KaxTagTargets)),\r
+       EbmlSemantic(false, true,  EBML_INFO(KaxTagGeneral)),\r
+       EbmlSemantic(false, true,  EBML_INFO(KaxTagGenres)),\r
+       EbmlSemantic(false, true,  EBML_INFO(KaxTagAudioSpecific)),\r
+       EbmlSemantic(false, true,  EBML_INFO(KaxTagImageSpecific)),\r
+       EbmlSemantic(false, true,  EBML_INFO(KaxTagMultiCommercial)),\r
+       EbmlSemantic(false, true,  EBML_INFO(KaxTagMultiDate)),\r
+       EbmlSemantic(false, true,  EBML_INFO(KaxTagMultiEntity)),\r
+       EbmlSemantic(false, true,  EBML_INFO(KaxTagMultiIdentifier)),\r
+       EbmlSemantic(false, true,  EBML_INFO(KaxTagMultiLegal)),\r
+       EbmlSemantic(false, true,  EBML_INFO(KaxTagMultiTitle)),\r
+       EbmlSemantic(false, true,  EBML_INFO(KaxTagMultiAttachment)),\r
+//     EbmlSemantic(false, false, EBML_INFO(KaxTagLength)),\r
+//     EbmlSemantic(false, false, EBML_INFO(KaxTagPlaylistDelay)),\r
+//     EbmlSemantic(false, false, EBML_INFO(KaxTagUnsynchronisedText)),\r
+//     EbmlSemantic(false, false, EBML_INFO(KaxTagUserDefinedURL)),\r
+       EbmlSemantic(false, false, EBML_INFO(KaxTagMultiComment)),\r
+       EbmlSemantic(true,  false, EBML_INFO(KaxTagSimple)),\r
+};\r
+\r
+EbmlSemantic KaxTagTargets_ContextList[6] =\r
+{      \r
+       EbmlSemantic(false, true,  EBML_INFO(KaxTagTargetTypeValue)),\r
+       EbmlSemantic(false, true,  EBML_INFO(KaxTagTargetType)),\r
+       EbmlSemantic(false, false, EBML_INFO(KaxTagTrackUID)),\r
+       EbmlSemantic(false, false, EBML_INFO(KaxTagEditionUID)),\r
+       EbmlSemantic(false, false, EBML_INFO(KaxTagChapterUID)),\r
+       EbmlSemantic(false, false, EBML_INFO(KaxTagAttachmentUID)),\r
+};\r
+\r
+EbmlSemantic KaxTagGeneral_ContextList[17] =\r
+{      \r
+       EbmlSemantic(false, true,  EBML_INFO(KaxTagArchivalLocation)),\r
+       EbmlSemantic(false, true,  EBML_INFO(KaxTagFile)),\r
+       EbmlSemantic(false, false, EBML_INFO(KaxTagKeywords)),\r
+       EbmlSemantic(false, true,  EBML_INFO(KaxTagMood)),\r
+       EbmlSemantic(false, false, EBML_INFO(KaxTagRecordLocation)),\r
+       EbmlSemantic(false, true,  EBML_INFO(KaxTagSource)),\r
+       EbmlSemantic(false, true,  EBML_INFO(KaxTagSourceForm)),\r
+       EbmlSemantic(false, true,  EBML_INFO(KaxTagProduct)),\r
+       EbmlSemantic(false, true,  EBML_INFO(KaxTagOriginalMediaType)),\r
+       EbmlSemantic(false, true,  EBML_INFO(KaxTagPlayCounter)),\r
+       EbmlSemantic(false, true,  EBML_INFO(KaxTagPopularimeter)),\r
+       EbmlSemantic(false, true,  EBML_INFO(KaxTagSubject)),\r
+       EbmlSemantic(false, true,  EBML_INFO(KaxTagBibliography)),\r
+       EbmlSemantic(false, true,  EBML_INFO(KaxTagLanguage)),\r
+       EbmlSemantic(false, true,  EBML_INFO(KaxTagRating)),\r
+       EbmlSemantic(false, true,  EBML_INFO(KaxTagEncoder)),\r
+       EbmlSemantic(false, true,  EBML_INFO(KaxTagEncodeSettings)),\r
+};\r
+\r
+EbmlSemantic KaxTagGenres_ContextList[3] =\r
+{      \r
+       EbmlSemantic(false, false, EBML_INFO(KaxTagAudioGenre)),\r
+       EbmlSemantic(false, false, EBML_INFO(KaxTagVideoGenre)),\r
+       EbmlSemantic(false, true,  EBML_INFO(KaxTagSubGenre)),\r
+};\r
+\r
+EbmlSemantic KaxTagAudioSpecific_ContextList[10] =\r
+{      \r
+       EbmlSemantic(false, true, EBML_INFO(KaxTagAudioPeak)),\r
+       EbmlSemantic(false, true, EBML_INFO(KaxTagAudioEncryption)),\r
+       EbmlSemantic(false, true, EBML_INFO(KaxTagAudioGain)),\r
+       EbmlSemantic(false, true, EBML_INFO(KaxTagBPM)),\r
+       EbmlSemantic(false, true, EBML_INFO(KaxTagDiscTrack)),\r
+       EbmlSemantic(false, true, EBML_INFO(KaxTagSetPart)),\r
+       EbmlSemantic(false, true, EBML_INFO(KaxTagEqualisation)),\r
+       EbmlSemantic(false, true, EBML_INFO(KaxTagInitialKey)),\r
+       EbmlSemantic(false, true, EBML_INFO(KaxTagOfficialAudioFileURL)),\r
+       EbmlSemantic(false, true, EBML_INFO(KaxTagOfficialAudioSourceURL)),\r
+};\r
+\r
+EbmlSemantic KaxTagImageSpecific_ContextList[6] =\r
+{\r
+       EbmlSemantic(false, true, EBML_INFO(KaxTagCaptureDPI)),\r
+       EbmlSemantic(false, true, EBML_INFO(KaxTagCaptureLightness)),\r
+       EbmlSemantic(false, true, EBML_INFO(KaxTagCapturePaletteSetting)),\r
+       EbmlSemantic(false, true, EBML_INFO(KaxTagCaptureSharpness)),\r
+       EbmlSemantic(false, true, EBML_INFO(KaxTagCropped)),\r
+       EbmlSemantic(false, true, EBML_INFO(KaxTagOriginalDimensions)),\r
+};\r
+\r
+EbmlSemantic KaxTagSimple_ContextList[6] =\r
+{      \r
+       EbmlSemantic(true,  true,  EBML_INFO(KaxTagName)),\r
+       EbmlSemantic(true,  true,  EBML_INFO(KaxTagLangue)),\r
+       EbmlSemantic(true,  true,  EBML_INFO(KaxTagDefault)),\r
+       EbmlSemantic(false, true,  EBML_INFO(KaxTagString)),\r
+       EbmlSemantic(false, true,  EBML_INFO(KaxTagBinary)),\r
+       EbmlSemantic(false, false, EBML_INFO(KaxTagSimple)),\r
+};\r
+\r
+const EbmlSemanticContext KaxTag_Context = EbmlSemanticContext(countof(KaxTag_ContextList), KaxTag_ContextList, &KaxTags_Context, *GetKaxTagsGlobal_Context, &EBML_INFO(KaxTag));\r
+const EbmlSemanticContext KaxTagTargets_Context = EbmlSemanticContext(countof(KaxTagTargets_ContextList), KaxTagTargets_ContextList, &KaxTag_Context, *GetKaxTagsGlobal_Context, &EBML_INFO(KaxTagTargets));\r
+const EbmlSemanticContext KaxTagGeneral_Context = EbmlSemanticContext(countof(KaxTagGeneral_ContextList), KaxTagGeneral_ContextList, &KaxTag_Context, *GetKaxTagsGlobal_Context, &EBML_INFO(KaxTagGeneral));\r
+const EbmlSemanticContext KaxTagGenres_Context = EbmlSemanticContext(countof(KaxTagGenres_ContextList), KaxTagGenres_ContextList, &KaxTag_Context, *GetKaxTagsGlobal_Context, &EBML_INFO(KaxTagGenres));\r
+const EbmlSemanticContext KaxTagAudioSpecific_Context = EbmlSemanticContext(countof(KaxTagAudioSpecific_ContextList), KaxTagAudioSpecific_ContextList, &KaxTag_Context, *GetKaxTagsGlobal_Context, &EBML_INFO(KaxTagAudioSpecific));\r
+const EbmlSemanticContext KaxTagImageSpecific_Context = EbmlSemanticContext(countof(KaxTagImageSpecific_ContextList), KaxTagImageSpecific_ContextList, &KaxTag_Context, *GetKaxTagsGlobal_Context, &EBML_INFO(KaxTagImageSpecific));\r
+const EbmlSemanticContext KaxTagBibliography_Context = EbmlSemanticContext(0, NULL, &KaxTag_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagBibliography));\r
+const EbmlSemanticContext KaxTagEncoder_Context = EbmlSemanticContext(0, NULL, &KaxTag_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagEncoder));\r
+const EbmlSemanticContext KaxTagEncodeSettings_Context = EbmlSemanticContext(0, NULL, &KaxTag_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagEncodeSettings));\r
+const EbmlSemanticContext KaxTagLanguage_Context = EbmlSemanticContext(0, NULL, &KaxTag_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagLanguage));\r
+const EbmlSemanticContext KaxTagLength_Context = EbmlSemanticContext(0, NULL, &KaxTag_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagLength));\r
+const EbmlSemanticContext KaxTagPlaylistDelay_Context = EbmlSemanticContext(0, NULL, &KaxTag_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagPlaylistDelay));\r
+const EbmlSemanticContext KaxTagRating_Context = EbmlSemanticContext(0, NULL, &KaxTag_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagRating));\r
+const EbmlSemanticContext KaxTagSubject_Context = EbmlSemanticContext(0, NULL, &KaxTag_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagSubject));\r
+const EbmlSemanticContext KaxTagUnsynchronisedText_Context = EbmlSemanticContext(0, NULL, &KaxTag_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagUnsynchronisedText));\r
+const EbmlSemanticContext KaxTagUserDefinedURL_Context = EbmlSemanticContext(0, NULL, &KaxTag_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagUserDefinedURL));\r
+const EbmlSemanticContext KaxTagTargetTypeValue_Context = EbmlSemanticContext(0, NULL, &KaxTagTargets_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagTargetTypeValue));\r
+const EbmlSemanticContext KaxTagTargetType_Context = EbmlSemanticContext(0, NULL, &KaxTagTargets_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagTargetType));\r
+const EbmlSemanticContext KaxTagTrackUID_Context = EbmlSemanticContext(0, NULL, &KaxTagTargets_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagTrackUID));\r
+const EbmlSemanticContext KaxTagEditionUID_Context = EbmlSemanticContext(0, NULL, &KaxTagTargets_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagEditionUID));\r
+const EbmlSemanticContext KaxTagChapterUID_Context = EbmlSemanticContext(0, NULL, &KaxTagTargets_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagChapterUID));\r
+const EbmlSemanticContext KaxTagAttachmentUID_Context = EbmlSemanticContext(0, NULL, &KaxTagTargets_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagAttachmentUID));\r
+const EbmlSemanticContext KaxTagArchivalLocation_Context = EbmlSemanticContext(0, NULL, &KaxTagGeneral_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagArchivalLocation));\r
+const EbmlSemanticContext KaxTagFile_Context = EbmlSemanticContext(0, NULL, &KaxTagGeneral_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagFile));\r
+const EbmlSemanticContext KaxTagKeywords_Context = EbmlSemanticContext(0, NULL, &KaxTagGeneral_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagKeywords));\r
+const EbmlSemanticContext KaxTagMood_Context = EbmlSemanticContext(0, NULL, &KaxTagGeneral_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagMood));\r
+const EbmlSemanticContext KaxTagRecordLocation_Context = EbmlSemanticContext(0, NULL, &KaxTagGeneral_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagRecordLocation));\r
+const EbmlSemanticContext KaxTagSource_Context = EbmlSemanticContext(0, NULL, &KaxTagGeneral_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagSource));\r
+const EbmlSemanticContext KaxTagSourceForm_Context = EbmlSemanticContext(0, NULL, &KaxTagGeneral_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagSourceForm));\r
+const EbmlSemanticContext KaxTagProduct_Context = EbmlSemanticContext(0, NULL, &KaxTagGeneral_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagProduct));\r
+const EbmlSemanticContext KaxTagOriginalMediaType_Context = EbmlSemanticContext(0, NULL, &KaxTagGeneral_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagOriginalMediaType));\r
+const EbmlSemanticContext KaxTagPlayCounter_Context = EbmlSemanticContext(0, NULL, &KaxTagGeneral_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagPlayCounter));\r
+const EbmlSemanticContext KaxTagPopularimeter_Context = EbmlSemanticContext(0, NULL, &KaxTagGeneral_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagPopularimeter));\r
+const EbmlSemanticContext KaxTagAudioGenre_Context = EbmlSemanticContext(0, NULL, &KaxTagGenres_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagAudioGenre));\r
+const EbmlSemanticContext KaxTagVideoGenre_Context = EbmlSemanticContext(0, NULL, &KaxTagGenres_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagVideoGenre));\r
+const EbmlSemanticContext KaxTagSubGenre_Context = EbmlSemanticContext(0, NULL, &KaxTagGenres_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagSubGenre));\r
+const EbmlSemanticContext KaxTagAudioEncryption_Context = EbmlSemanticContext(0, NULL, &KaxTagAudioSpecific_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagAudioEncryption));\r
+const EbmlSemanticContext KaxTagAudioGain_Context = EbmlSemanticContext(0, NULL, &KaxTagAudioSpecific_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagAudioGain));\r
+const EbmlSemanticContext KaxTagAudioPeak_Context = EbmlSemanticContext(0, NULL, &KaxTagAudioSpecific_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagAudioPeak));\r
+const EbmlSemanticContext KaxTagBPM_Context = EbmlSemanticContext(0, NULL, &KaxTagAudioSpecific_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagBPM));\r
+const EbmlSemanticContext KaxTagDiscTrack_Context = EbmlSemanticContext(0, NULL, &KaxTagAudioSpecific_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagDiscTrack));\r
+const EbmlSemanticContext KaxTagSetPart_Context = EbmlSemanticContext(0, NULL, &KaxTagAudioSpecific_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagSetPart));\r
+const EbmlSemanticContext KaxTagEqualisation_Context = EbmlSemanticContext(0, NULL, &KaxTagAudioSpecific_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagEqualisation));\r
+const EbmlSemanticContext KaxTagInitialKey_Context = EbmlSemanticContext(0, NULL, &KaxTagAudioSpecific_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagInitialKey));\r
+const EbmlSemanticContext KaxTagOfficialAudioFileURL_Context = EbmlSemanticContext(0, NULL, &KaxTagAudioSpecific_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagOfficialAudioFileURL));\r
+const EbmlSemanticContext KaxTagOfficialAudioSourceURL_Context = EbmlSemanticContext(0, NULL, &KaxTagAudioSpecific_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagOfficialAudioSourceURL));\r
+const EbmlSemanticContext KaxTagCaptureDPI_Context = EbmlSemanticContext(0, NULL, &KaxTagImageSpecific_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagCaptureDPI));\r
+const EbmlSemanticContext KaxTagCaptureLightness_Context = EbmlSemanticContext(0, NULL, &KaxTagImageSpecific_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagCaptureLightness));\r
+const EbmlSemanticContext KaxTagCapturePaletteSetting_Context = EbmlSemanticContext(0, NULL, &KaxTagImageSpecific_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagCapturePaletteSetting));\r
+const EbmlSemanticContext KaxTagCaptureSharpness_Context = EbmlSemanticContext(0, NULL, &KaxTagImageSpecific_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagCaptureSharpness));\r
+const EbmlSemanticContext KaxTagCropped_Context = EbmlSemanticContext(0, NULL, &KaxTagImageSpecific_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagCropped));\r
+const EbmlSemanticContext KaxTagOriginalDimensions_Context = EbmlSemanticContext(0, NULL, &KaxTagImageSpecific_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagOriginalDimensions));\r
+\r
+const EbmlSemanticContext KaxTagSimple_Context = EbmlSemanticContext(countof(KaxTagSimple_ContextList), KaxTagSimple_ContextList, &KaxTag_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagSimple));\r
+const EbmlSemanticContext KaxTagName_Context = EbmlSemanticContext(0, NULL, &KaxTagSimple_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagName));\r
+const EbmlSemanticContext KaxTagLangue_Context = EbmlSemanticContext(0, NULL, &KaxTagSimple_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagLangue));\r
+const EbmlSemanticContext KaxTagDefault_Context = EbmlSemanticContext(0, NULL, &KaxTagSimple_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagDefault));\r
+const EbmlSemanticContext KaxTagString_Context = EbmlSemanticContext(0, NULL, &KaxTagSimple_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagString));\r
+const EbmlSemanticContext KaxTagBinary_Context = EbmlSemanticContext(0, NULL, &KaxTagSimple_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagBinary));\r
+\r
+EbmlId KaxTag_TheId                      (0x7373, 2);\r
+EbmlId KaxTagTargets_TheId               (0x63C0, 2);\r
+EbmlId KaxTagGeneral_TheId               (0x67C9, 2);\r
+EbmlId KaxTagGenres_TheId                (0x6583, 2);\r
+EbmlId KaxTagAudioSpecific_TheId         (0x41C5, 2);\r
+EbmlId KaxTagImageSpecific_TheId         (0x4990, 2);\r
+EbmlId KaxTagBibliography_TheId          (0x4488, 2);\r
+EbmlId KaxTagEncoder_TheId               (0x4431, 2);\r
+EbmlId KaxTagEncodeSettings_TheId        (0x6526, 2);\r
+EbmlId KaxTagLanguage_TheId              (0x22B59F, 3);\r
+EbmlId KaxTagLength_TheId                (0x5243, 2);\r
+EbmlId KaxTagPlaylistDelay_TheId         (0x72CC, 2);\r
+EbmlId KaxTagRating_TheId                (0x52BC, 2);\r
+EbmlId KaxTagSubject_TheId               (0x49C1, 2);\r
+EbmlId KaxTagUnsynchronisedText_TheId    (0x874B, 2);\r
+EbmlId KaxTagUserDefinedURL_TheId        (0x434A, 2);\r
+EbmlId KaxTagTargetTypeValue_TheId       (0x68CA, 2);\r
+EbmlId KaxTagTargetType_TheId            (0x63CA, 2);\r
+EbmlId KaxTagTrackUID_TheId              (0x63C5, 2);\r
+EbmlId KaxTagEditionUID_TheId            (0x63C9, 2);\r
+EbmlId KaxTagChapterUID_TheId            (0x63C4, 2);\r
+EbmlId KaxTagAttachmentUID_TheId         (0x63C6, 2);\r
+EbmlId KaxTagAudioGenre_TheId            (0x65C2, 2);\r
+EbmlId KaxTagVideoGenre_TheId            (0x65A1, 2);\r
+EbmlId KaxTagSubGenre_TheId              (0x65AC, 2);\r
+EbmlId KaxTagAudioEncryption_TheId       (0x41B4, 2);\r
+EbmlId KaxTagAudioGain_TheId             (0x4199, 2);\r
+EbmlId KaxTagAudioPeak_TheId             (0x4189, 2);\r
+EbmlId KaxTagBPM_TheId                   (0x41A1, 2);\r
+EbmlId KaxTagDiscTrack_TheId             (0x41B6, 2);\r
+EbmlId KaxTagSetPart_TheId               (0x416E, 2);\r
+EbmlId KaxTagEqualisation_TheId          (0x41B1, 2);\r
+EbmlId KaxTagInitialKey_TheId            (0x413A, 2);\r
+EbmlId KaxTagOfficialAudioFileURL_TheId         (0x4133, 2);\r
+EbmlId KaxTagOfficialAudioSourceURL_TheId(0x413E, 2);\r
+EbmlId KaxTagArchivalLocation_TheId      (0x45A4, 2);\r
+EbmlId KaxTagFile_TheId                  (0x454E, 2);\r
+EbmlId KaxTagKeywords_TheId              (0x458C, 2);\r
+EbmlId KaxTagMood_TheId                  (0x45AE, 2);\r
+EbmlId KaxTagRecordLocation_TheId        (0x457E, 2);\r
+EbmlId KaxTagSource_TheId                (0x458A, 2);\r
+EbmlId KaxTagSourceForm_TheId            (0x45B5, 2);\r
+EbmlId KaxTagProduct_TheId               (0x45E3, 2);\r
+EbmlId KaxTagOriginalMediaType_TheId     (0x45A7, 2);\r
+EbmlId KaxTagPlayCounter_TheId           (0x4566, 2);\r
+EbmlId KaxTagPopularimeter_TheId         (0x4532, 2);\r
+EbmlId KaxTagCaptureDPI_TheId            (0x49C7, 2);\r
+EbmlId KaxTagCaptureLightness_TheId      (0x49E1, 2);\r
+EbmlId KaxTagCapturePaletteSetting_TheId (0x4934, 2);\r
+EbmlId KaxTagCaptureSharpness_TheId      (0x4922, 2);\r
+EbmlId KaxTagCropped_TheId               (0x4987, 2);\r
+EbmlId KaxTagOriginalDimensions_TheId    (0x4933, 2);\r
+\r
+EbmlId KaxTagSimple_TheId                                                               (0x67C8, 2);\r
+EbmlId KaxTagName_TheId                                                                         (0x45A3, 2);\r
+EbmlId KaxTagLangue_TheId                                                               (0x447A, 2);\r
+EbmlId KaxTagDefault_TheId                                                              (0x4484, 2);\r
+EbmlId KaxTagString_TheId                                                               (0x4487, 2);\r
+EbmlId KaxTagBinary_TheId                                                               (0x4485, 2);\r
+\r
+const EbmlCallbacks KaxTag::ClassInfos(KaxTag::Create, KaxTag_TheId, "Tag", KaxTag_Context);\r
+const EbmlCallbacks KaxTagTargets::ClassInfos(KaxTagTargets::Create, KaxTagTargets_TheId, "TagTargets", KaxTagTargets_Context);\r
+const EbmlCallbacks KaxTagGeneral::ClassInfos(KaxTagGeneral::Create, KaxTagGeneral_TheId, "TagGeneral", KaxTagGeneral_Context);\r
+const EbmlCallbacks KaxTagGenres::ClassInfos(KaxTagGenres::Create, KaxTagGenres_TheId, "TagGenres", KaxTagGenres_Context);\r
+const EbmlCallbacks KaxTagAudioSpecific::ClassInfos(KaxTagAudioSpecific::Create, KaxTagAudioSpecific_TheId, "TagAudioSpecific", KaxTagAudioSpecific_Context);\r
+const EbmlCallbacks KaxTagImageSpecific::ClassInfos(KaxTagImageSpecific::Create, KaxTagImageSpecific_TheId, "TagImageSpecific", KaxTagImageSpecific_Context);\r
+const EbmlCallbacks KaxTagBibliography::ClassInfos(KaxTagBibliography::Create, KaxTagBibliography_TheId, "Bibliography", KaxTagBibliography_Context);\r
+const EbmlCallbacks KaxTagCaptureDPI::ClassInfos(KaxTagCaptureDPI::Create, KaxTagCaptureDPI_TheId, "CaptureDPI", KaxTagCaptureDPI_Context);\r
+const EbmlCallbacks KaxTagCaptureLightness::ClassInfos(KaxTagCaptureLightness::Create, KaxTagCaptureLightness_TheId, "CaptureLightness", KaxTagCaptureLightness_Context);\r
+const EbmlCallbacks KaxTagCapturePaletteSetting::ClassInfos(KaxTagCapturePaletteSetting::Create, KaxTagCapturePaletteSetting_TheId, "CapturePaletteSetting", KaxTagCapturePaletteSetting_Context);\r
+const EbmlCallbacks KaxTagCaptureSharpness::ClassInfos(KaxTagCaptureSharpness::Create, KaxTagCaptureSharpness_TheId, "CaptureSharpness", KaxTagCaptureSharpness_Context);\r
+const EbmlCallbacks KaxTagCropped::ClassInfos(KaxTagCropped::Create, KaxTagCropped_TheId, "Cropped", KaxTagCropped_Context);\r
+const EbmlCallbacks KaxTagEncoder::ClassInfos(KaxTagEncoder::Create, KaxTagEncoder_TheId, "Encoder", KaxTagEncoder_Context);\r
+const EbmlCallbacks KaxTagEncodeSettings::ClassInfos(KaxTagEncodeSettings::Create, KaxTagEncodeSettings_TheId, "EncodeSettings", KaxTagEncodeSettings_Context);\r
+const EbmlCallbacks KaxTagLanguage::ClassInfos(KaxTagLanguage::Create, KaxTagLanguage_TheId, "Language", KaxTagLanguage_Context);\r
+const EbmlCallbacks KaxTagLength::ClassInfos(KaxTagLength::Create, KaxTagLength_TheId, "Length", KaxTagLength_Context);\r
+const EbmlCallbacks KaxTagOriginalDimensions::ClassInfos(KaxTagOriginalDimensions::Create, KaxTagOriginalDimensions_TheId, "OriginalDimensions", KaxTagOriginalDimensions_Context);\r
+const EbmlCallbacks KaxTagPlaylistDelay::ClassInfos(KaxTagPlaylistDelay::Create, KaxTagPlaylistDelay_TheId, "PlaylistDelay", KaxTagPlaylistDelay_Context);\r
+const EbmlCallbacks KaxTagRating::ClassInfos(KaxTagRating::Create, KaxTagRating_TheId, "Rating", KaxTagRating_Context);\r
+const EbmlCallbacks KaxTagSubject::ClassInfos(KaxTagSubject::Create, KaxTagSubject_TheId, "Subject", KaxTagSubject_Context);\r
+const EbmlCallbacks KaxTagUnsynchronisedText::ClassInfos(KaxTagUnsynchronisedText::Create, KaxTagUnsynchronisedText_TheId, "UnsynchronisedText", KaxTagUnsynchronisedText_Context);\r
+const EbmlCallbacks KaxTagUserDefinedURL::ClassInfos(KaxTagUserDefinedURL::Create, KaxTagUserDefinedURL_TheId, "UserDefinedURL", KaxTagUserDefinedURL_Context);\r
+const EbmlCallbacks KaxTagTargetTypeValue::ClassInfos(KaxTagTargetTypeValue::Create, KaxTagTargetTypeValue_TheId, "TagTargetTypeValue", KaxTagTargetTypeValue_Context);\r
+const EbmlCallbacks KaxTagTargetType::ClassInfos(KaxTagTargetType::Create, KaxTagTargetType_TheId, "TagTargetType", KaxTagTargetType_Context);\r
+const EbmlCallbacks KaxTagTrackUID::ClassInfos(KaxTagTrackUID::Create, KaxTagTrackUID_TheId, "TagTrackUID", KaxTagTrackUID_Context);\r
+const EbmlCallbacks KaxTagEditionUID::ClassInfos(KaxTagEditionUID::Create, KaxTagEditionUID_TheId, "TagEditionUID", KaxTagEditionUID_Context);\r
+const EbmlCallbacks KaxTagChapterUID::ClassInfos(KaxTagChapterUID::Create, KaxTagChapterUID_TheId, "TagChapterUID", KaxTagChapterUID_Context);\r
+const EbmlCallbacks KaxTagAttachmentUID::ClassInfos(KaxTagAttachmentUID::Create, KaxTagAttachmentUID_TheId, "TagAttachmentUID", KaxTagAttachmentUID_Context);\r
+const EbmlCallbacks KaxTagAudioGenre::ClassInfos(KaxTagAudioGenre::Create, KaxTagAudioGenre_TheId, "AudioGenre", KaxTagAudioGenre_Context);\r
+const EbmlCallbacks KaxTagVideoGenre::ClassInfos(KaxTagVideoGenre::Create, KaxTagVideoGenre_TheId, "VideoGenre", KaxTagVideoGenre_Context);\r
+const EbmlCallbacks KaxTagSubGenre::ClassInfos(KaxTagSubGenre::Create, KaxTagSubGenre_TheId, "SubGenre", KaxTagSubGenre_Context);\r
+const EbmlCallbacks KaxTagAudioEncryption::ClassInfos(KaxTagAudioEncryption::Create, KaxTagAudioEncryption_TheId, "AudioEncryption", KaxTagAudioEncryption_Context);\r
+const EbmlCallbacks KaxTagAudioGain::ClassInfos(KaxTagAudioGain::Create, KaxTagAudioGain_TheId, "AudioGain", KaxTagAudioGain_Context);\r
+const EbmlCallbacks KaxTagAudioPeak::ClassInfos(KaxTagAudioPeak::Create, KaxTagAudioPeak_TheId, "AudioPeak", KaxTagAudioPeak_Context);\r
+const EbmlCallbacks KaxTagBPM::ClassInfos(KaxTagBPM::Create, KaxTagBPM_TheId, "BPM", KaxTagBPM_Context);\r
+const EbmlCallbacks KaxTagDiscTrack::ClassInfos(KaxTagDiscTrack::Create, KaxTagDiscTrack_TheId, "DiscTrack", KaxTagDiscTrack_Context);\r
+const EbmlCallbacks KaxTagSetPart::ClassInfos(KaxTagSetPart::Create, KaxTagSetPart_TheId, "SetPart", KaxTagSetPart_Context);\r
+const EbmlCallbacks KaxTagEqualisation::ClassInfos(KaxTagEqualisation::Create, KaxTagEqualisation_TheId, "Equalisation", KaxTagEqualisation_Context);\r
+const EbmlCallbacks KaxTagInitialKey::ClassInfos(KaxTagInitialKey::Create, KaxTagInitialKey_TheId, "InitialKey", KaxTagInitialKey_Context);\r
+const EbmlCallbacks KaxTagOfficialAudioFileURL::ClassInfos(KaxTagOfficialAudioFileURL::Create, KaxTagOfficialAudioFileURL_TheId, "OfficialAudioFileURL", KaxTagOfficialAudioFileURL_Context);\r
+const EbmlCallbacks KaxTagOfficialAudioSourceURL::ClassInfos(KaxTagOfficialAudioSourceURL::Create, KaxTagOfficialAudioSourceURL_TheId, "AudioSourceURL", KaxTagOfficialAudioSourceURL_Context);\r
+const EbmlCallbacks KaxTagArchivalLocation::ClassInfos(KaxTagArchivalLocation::Create, KaxTagArchivalLocation_TheId, "ArchivalLocation", KaxTagArchivalLocation_Context);\r
+const EbmlCallbacks KaxTagFile::ClassInfos(KaxTagFile::Create, KaxTagFile_TheId, "File", KaxTagFile_Context);\r
+const EbmlCallbacks KaxTagKeywords::ClassInfos(KaxTagKeywords::Create, KaxTagKeywords_TheId, "Keywords", KaxTagKeywords_Context);\r
+const EbmlCallbacks KaxTagMood::ClassInfos(KaxTagMood::Create, KaxTagMood_TheId, "Mood", KaxTagMood_Context);\r
+const EbmlCallbacks KaxTagRecordLocation::ClassInfos(KaxTagRecordLocation::Create, KaxTagRecordLocation_TheId, "RecordLocation", KaxTagRecordLocation_Context);\r
+const EbmlCallbacks KaxTagSource::ClassInfos(KaxTagSource::Create, KaxTagSource_TheId, "Source", KaxTagSource_Context);\r
+const EbmlCallbacks KaxTagSourceForm::ClassInfos(KaxTagSourceForm::Create, KaxTagSourceForm_TheId, "SourceForm", KaxTagSourceForm_Context);\r
+const EbmlCallbacks KaxTagProduct::ClassInfos(KaxTagProduct::Create, KaxTagProduct_TheId, "Product", KaxTagProduct_Context);\r
+const EbmlCallbacks KaxTagOriginalMediaType::ClassInfos(KaxTagOriginalMediaType::Create, KaxTagOriginalMediaType_TheId, "OriginalMediaType", KaxTagOriginalMediaType_Context);\r
+const EbmlCallbacks KaxTagPlayCounter::ClassInfos(KaxTagPlayCounter::Create, KaxTagPlayCounter_TheId, "PlayCounter", KaxTagPlayCounter_Context);\r
+const EbmlCallbacks KaxTagPopularimeter::ClassInfos(KaxTagPopularimeter::Create, KaxTagPopularimeter_TheId, "Popularimeter", KaxTagPopularimeter_Context);\r
+\r
+const EbmlCallbacks KaxTagSimple::ClassInfos(KaxTagSimple::Create, KaxTagSimple_TheId, "TagSimple", KaxTagSimple_Context);\r
+const EbmlCallbacks KaxTagName::ClassInfos(KaxTagName::Create, KaxTagName_TheId, "TagName", KaxTagName_Context);\r
+const EbmlCallbacks KaxTagLangue::ClassInfos(KaxTagLangue::Create, KaxTagLangue_TheId, "TagLanguage", KaxTagLangue_Context);\r
+const EbmlCallbacks KaxTagDefault::ClassInfos(KaxTagDefault::Create, KaxTagDefault_TheId, "TagDefault", KaxTagDefault_Context);\r
+const EbmlCallbacks KaxTagString::ClassInfos(KaxTagString::Create, KaxTagString_TheId, "TagString", KaxTagString_Context);\r
+const EbmlCallbacks KaxTagBinary::ClassInfos(KaxTagBinary::Create, KaxTagBinary_TheId, "TagBinary", KaxTagBinary_Context);\r
+\r
+KaxTag::KaxTag()\r
+       :EbmlMaster(KaxTag_Context)\r
+{}\r
+\r
+KaxTagTargets::KaxTagTargets()\r
+       :EbmlMaster(KaxTagTargets_Context)\r
+{}\r
+\r
+KaxTagGeneral::KaxTagGeneral()\r
+       :EbmlMaster(KaxTagGeneral_Context)\r
+{}\r
+\r
+KaxTagGenres::KaxTagGenres()\r
+       :EbmlMaster(KaxTagGenres_Context)\r
+{}\r
+\r
+KaxTagAudioSpecific::KaxTagAudioSpecific()\r
+       :EbmlMaster(KaxTagAudioSpecific_Context)\r
+{}\r
+\r
+KaxTagImageSpecific::KaxTagImageSpecific()\r
+       :EbmlMaster(KaxTagImageSpecific_Context)\r
+{}\r
+\r
+KaxTagSimple::KaxTagSimple()\r
+       :EbmlMaster(KaxTagSimple_Context)\r
+{}\r
+\r
+END_LIBMATROSKA_NAMESPACE\r
index 3eb1da6a3a5d5c73c4897dc7072e4a07b379fc40..148b911c0cbe9bb3f7c52c8f22d2327a74504e83 100644 (file)
-/****************************************************************************
-** libmatroska : parse Matroska files, see http://www.matroska.org/
-**
-** <file/class description>
-**
-** Copyright (C) 2002-2004 Steve Lhomme.  All rights reserved.
-**
-** This file is part of libmatroska.
-**
-** This library is free software; you can redistribute it and/or
-** modify it under the terms of the GNU Lesser General Public
-** License as published by the Free Software Foundation; either
-** version 2.1 of the License, or (at your option) any later version.
-** 
-** This library is distributed in the hope that it will be useful,
-** but WITHOUT ANY WARRANTY; without even the implied warranty of
-** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-** Lesser General Public License for more details.
-** 
-** You should have received a copy of the GNU Lesser General Public
-** License along with this library; if not, write to the Free Software
-** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-**
-** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**
-** Contact license@matroska.org if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-/*!
-       \file
-       \version \$Id: KaxTagMulti.cpp 640 2004-07-09 21:05:36Z mosu $
-       \author Jory Stone       <jcsston @ toughguy.net>
-       \author Steve Lhomme     <robux4 @ users.sf.net>
-*/
-#include "matroska/KaxTagMulti.h"
-#include "matroska/KaxContexts.h"
-
-using namespace LIBEBML_NAMESPACE;
-
-START_LIBMATROSKA_NAMESPACE
-
-EbmlSemantic KaxTagMultiGlobal_ContextList[1] =
-{
-       EbmlSemantic(false, false, EBML_INFO(KaxTagMultiComment)),
-};
-
-EbmlSemantic KaxTagMultiComment_ContextList[3] =
-{
-       EbmlSemantic(false, true, EBML_INFO(KaxTagMultiCommentName)),
-       EbmlSemantic(false, true, EBML_INFO(KaxTagMultiCommentComments)),
-       EbmlSemantic(false, true, EBML_INFO(KaxTagMultiCommentLanguage)),
-};
-
-EbmlSemantic KaxTagMultiCommercial_ContextList[1] =
-{
-       EbmlSemantic(true, false, EBML_INFO(KaxTagCommercial)),
-};
-
-EbmlSemantic KaxTagCommercial_ContextList[5] =
-{
-       EbmlSemantic(true,  true,  EBML_INFO(KaxTagMultiCommercialType)),
-       EbmlSemantic(false, true,  EBML_INFO(KaxTagMultiCommercialAddress)),
-       EbmlSemantic(false, false, EBML_INFO(KaxTagMultiCommercialURL)),
-       EbmlSemantic(false, false, EBML_INFO(KaxTagMultiCommercialEmail)),
-       EbmlSemantic(false, false, EBML_INFO(KaxTagMultiPrice)),
-};
-
-EbmlSemantic KaxTagMultiPrice_ContextList[3] =
-{
-       EbmlSemantic(false, true, EBML_INFO(KaxTagMultiPriceCurrency)),
-       EbmlSemantic(false, true, EBML_INFO(KaxTagMultiPriceAmount)),
-       EbmlSemantic(false, true, EBML_INFO(KaxTagMultiPricePriceDate)),
-};
-
-EbmlSemantic KaxTagMultiDate_ContextList[1] =
-{
-       EbmlSemantic(true, false, EBML_INFO(KaxTagDate)),
-};
-
-EbmlSemantic KaxTagDate_ContextList[3] =
-{
-       EbmlSemantic(true,  true, EBML_INFO(KaxTagMultiDateType)),
-       EbmlSemantic(false, true, EBML_INFO(KaxTagMultiDateDateBegin)),
-       EbmlSemantic(false, true, EBML_INFO(KaxTagMultiDateDateEnd)),
-};
-
-EbmlSemantic KaxTagMultiEntity_ContextList[1] =
-{
-       EbmlSemantic(true, false, EBML_INFO(KaxTagEntity)),
-};
-
-EbmlSemantic KaxTagEntity_ContextList[5] =
-{
-       EbmlSemantic(true,  true,  EBML_INFO(KaxTagMultiEntityType)),
-       EbmlSemantic(false, true,  EBML_INFO(KaxTagMultiEntityName)),
-       EbmlSemantic(false, false, EBML_INFO(KaxTagMultiEntityURL)),
-       EbmlSemantic(false, false, EBML_INFO(KaxTagMultiEntityEmail)),
-       EbmlSemantic(false, true,  EBML_INFO(KaxTagMultiEntityAddress)),
-};
-
-EbmlSemantic KaxTagMultiIdentifier_ContextList[1] =
-{
-       EbmlSemantic(true, false, EBML_INFO(KaxTagIdentifier)),
-};
-
-EbmlSemantic KaxTagIdentifier_ContextList[3] =
-{
-       EbmlSemantic(true,  true, EBML_INFO(KaxTagMultiIdentifierType)),
-       EbmlSemantic(false, true, EBML_INFO(KaxTagMultiIdentifierBinary)),
-       EbmlSemantic(false, true, EBML_INFO(KaxTagMultiIdentifierString)),
-};
-
-EbmlSemantic KaxTagMultiLegal_ContextList[1] =
-{
-       EbmlSemantic(true, false, EBML_INFO(KaxTagLegal)),
-};
-
-EbmlSemantic KaxTagLegal_ContextList[4] =
-{
-       EbmlSemantic(true,  true,  EBML_INFO(KaxTagMultiLegalType)),
-       EbmlSemantic(false, true,  EBML_INFO(KaxTagMultiLegalContent)),
-       EbmlSemantic(false, false, EBML_INFO(KaxTagMultiLegalURL)),
-       EbmlSemantic(false, true,  EBML_INFO(KaxTagMultiLegalAddress)),
-};
-
-EbmlSemantic KaxTagMultiTitle_ContextList[1] =
-{
-       EbmlSemantic(true, false, EBML_INFO(KaxTagTitle)),
-};
-
-EbmlSemantic KaxTagTitle_ContextList[8] =
-{
-       EbmlSemantic(true,  true,  EBML_INFO(KaxTagMultiTitleType)),
-       EbmlSemantic(false, true,  EBML_INFO(KaxTagMultiTitleName)),
-       EbmlSemantic(false, true,  EBML_INFO(KaxTagMultiTitleSubTitle)),
-       EbmlSemantic(false, true,  EBML_INFO(KaxTagMultiTitleEdition)),
-       EbmlSemantic(false, true,  EBML_INFO(KaxTagMultiTitleAddress)),
-       EbmlSemantic(false, false, EBML_INFO(KaxTagMultiTitleURL)),
-       EbmlSemantic(false, false, EBML_INFO(KaxTagMultiTitleEmail)),
-       EbmlSemantic(false, true,  EBML_INFO(KaxTagMultiTitleLanguage)),
-};
-
-EbmlSemantic KaxTagMultiAttachment_ContextList[1] =
-{
-       EbmlSemantic(true, false, EBML_INFO(KaxTagAttachment)),
-};
-
-EbmlSemantic KaxTagAttachment_ContextList[1] =
-{
-       EbmlSemantic(false, true,  EBML_INFO(KaxTagAttachmentID)),
-};
-
-const EbmlSemanticContext KaxTagMultiGlobal_Context = EbmlSemanticContext(countof(KaxTagMultiGlobal_ContextList), KaxTagMultiGlobal_ContextList, NULL, *GetKaxGlobal_Context, NULL);
-
-const EbmlSemanticContext KaxTagMultiComment_Context = EbmlSemanticContext(countof(KaxTagMultiComment_ContextList), KaxTagMultiComment_ContextList, &KaxTag_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagMultiComment));
-const EbmlSemanticContext KaxTagMultiCommentName_Context = EbmlSemanticContext(0, NULL, &KaxTagMultiComment_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagMultiCommentName));
-const EbmlSemanticContext KaxTagMultiCommentComments_Context = EbmlSemanticContext(0, NULL, &KaxTagMultiComment_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagMultiCommentComments));
-const EbmlSemanticContext KaxTagMultiCommentLanguage_Context = EbmlSemanticContext(0, NULL, &KaxTagMultiComment_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagMultiCommentLanguage));
-
-const EbmlSemanticContext KaxTagMultiCommercial_Context = EbmlSemanticContext(countof(KaxTagMultiCommercial_ContextList), KaxTagMultiCommercial_ContextList, &KaxTag_Context, *GetKaxTagsGlobal_Context, &EBML_INFO(KaxTagMultiCommercial));
-const EbmlSemanticContext KaxTagCommercial_Context = EbmlSemanticContext(countof(KaxTagCommercial_ContextList), KaxTagCommercial_ContextList, &KaxTagMultiCommercial_Context, *GetKaxTagsGlobal_Context, &EBML_INFO(KaxTagCommercial));
-const EbmlSemanticContext KaxTagMultiCommercialType_Context = EbmlSemanticContext(0, NULL, &KaxTagCommercial_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagMultiCommercialType));
-const EbmlSemanticContext KaxTagMultiCommercialAddress_Context = EbmlSemanticContext(0, NULL, &KaxTagCommercial_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagMultiCommercialAddress));
-const EbmlSemanticContext KaxTagMultiCommercialURL_Context = EbmlSemanticContext(0, NULL, &KaxTagCommercial_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagMultiCommercialURL));
-const EbmlSemanticContext KaxTagMultiCommercialEmail_Context = EbmlSemanticContext(0, NULL, &KaxTagCommercial_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagMultiCommercialEmail));
-
-const EbmlSemanticContext KaxTagMultiPrice_Context = EbmlSemanticContext(countof(KaxTagMultiPrice_ContextList), KaxTagMultiPrice_ContextList, &KaxTagCommercial_Context, *GetKaxTagsGlobal_Context, &EBML_INFO(KaxTagMultiPrice));
-const EbmlSemanticContext KaxTagMultiPriceCurrency_Context = EbmlSemanticContext(0, NULL, &KaxTagMultiPrice_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagMultiPriceCurrency));
-const EbmlSemanticContext KaxTagMultiPriceAmount_Context = EbmlSemanticContext(0, NULL, &KaxTagMultiPrice_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagMultiPriceAmount));
-const EbmlSemanticContext KaxTagMultiPricePriceDate_Context = EbmlSemanticContext(0, NULL, &KaxTagMultiPrice_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagMultiPricePriceDate));
-
-const EbmlSemanticContext KaxTagMultiDate_Context = EbmlSemanticContext(countof(KaxTagMultiDate_ContextList), KaxTagMultiDate_ContextList, &KaxTag_Context, *GetKaxTagsGlobal_Context, &EBML_INFO(KaxTagMultiDate));
-const EbmlSemanticContext KaxTagDate_Context = EbmlSemanticContext(countof(KaxTagDate_ContextList), KaxTagDate_ContextList, &KaxTagMultiDate_Context, *GetKaxTagsGlobal_Context, &EBML_INFO(KaxTagDate));
-const EbmlSemanticContext KaxTagMultiDateType_Context = EbmlSemanticContext(0, NULL, &KaxTagDate_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagMultiDateType));
-const EbmlSemanticContext KaxTagMultiDateDateBegin_Context = EbmlSemanticContext(0, NULL, &KaxTagDate_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagMultiDateDateBegin));
-const EbmlSemanticContext KaxTagMultiDateDateEnd_Context = EbmlSemanticContext(0, NULL, &KaxTagDate_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagMultiDateDateEnd));
-
-const EbmlSemanticContext KaxTagMultiEntity_Context = EbmlSemanticContext(countof(KaxTagMultiEntity_ContextList), KaxTagMultiEntity_ContextList, &KaxTag_Context, *GetKaxTagsGlobal_Context, &EBML_INFO(KaxTagMultiEntity));
-const EbmlSemanticContext KaxTagEntity_Context = EbmlSemanticContext(countof(KaxTagEntity_ContextList), KaxTagEntity_ContextList, &KaxTagMultiEntity_Context, *GetKaxTagsGlobal_Context, &EBML_INFO(KaxTagEntity));
-const EbmlSemanticContext KaxTagMultiEntityType_Context = EbmlSemanticContext(0, NULL, &KaxTagEntity_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagMultiEntityType));
-const EbmlSemanticContext KaxTagMultiEntityName_Context = EbmlSemanticContext(0, NULL, &KaxTagEntity_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagMultiEntityName));
-const EbmlSemanticContext KaxTagMultiEntityURL_Context = EbmlSemanticContext(0, NULL, &KaxTagEntity_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagMultiEntityURL));
-const EbmlSemanticContext KaxTagMultiEntityEmail_Context = EbmlSemanticContext(0, NULL, &KaxTagEntity_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagMultiEntityEmail));
-const EbmlSemanticContext KaxTagMultiEntityAddress_Context = EbmlSemanticContext(0, NULL, &KaxTagEntity_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagMultiEntityAddress));
-
-const EbmlSemanticContext KaxTagMultiIdentifier_Context = EbmlSemanticContext(countof(KaxTagMultiIdentifier_ContextList), KaxTagMultiIdentifier_ContextList, &KaxTag_Context, *GetKaxTagsGlobal_Context, &EBML_INFO(KaxTagMultiIdentifier));
-const EbmlSemanticContext KaxTagIdentifier_Context = EbmlSemanticContext(countof(KaxTagIdentifier_ContextList), KaxTagIdentifier_ContextList, &KaxTagMultiIdentifier_Context, *GetKaxTagsGlobal_Context, &EBML_INFO(KaxTagIdentifier));
-const EbmlSemanticContext KaxTagMultiIdentifierType_Context = EbmlSemanticContext(0, NULL, &KaxTagIdentifier_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagMultiIdentifierType));
-const EbmlSemanticContext KaxTagMultiIdentifierBinary_Context = EbmlSemanticContext(0, NULL, &KaxTagIdentifier_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagMultiIdentifierBinary));
-const EbmlSemanticContext KaxTagMultiIdentifierString_Context = EbmlSemanticContext(0, NULL, &KaxTagIdentifier_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagMultiIdentifierString));
-
-const EbmlSemanticContext KaxTagMultiLegal_Context = EbmlSemanticContext(countof(KaxTagMultiLegal_ContextList), KaxTagMultiLegal_ContextList, &KaxTag_Context, *GetKaxTagsGlobal_Context, &EBML_INFO(KaxTagMultiLegal));
-const EbmlSemanticContext KaxTagLegal_Context = EbmlSemanticContext(countof(KaxTagLegal_ContextList), KaxTagLegal_ContextList, &KaxTagMultiLegal_Context, *GetKaxTagsGlobal_Context, &EBML_INFO(KaxTagLegal));
-const EbmlSemanticContext KaxTagMultiLegalType_Context = EbmlSemanticContext(0, NULL, &KaxTagLegal_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagMultiLegalType));
-const EbmlSemanticContext KaxTagMultiLegalContent_Context = EbmlSemanticContext(0, NULL, &KaxTagLegal_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagMultiLegalContent));
-const EbmlSemanticContext KaxTagMultiLegalURL_Context = EbmlSemanticContext(0, NULL, &KaxTagLegal_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagMultiLegalURL));
-const EbmlSemanticContext KaxTagMultiLegalAddress_Context = EbmlSemanticContext(0, NULL, &KaxTagLegal_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagMultiLegalAddress));
-
-const EbmlSemanticContext KaxTagMultiTitle_Context = EbmlSemanticContext(countof(KaxTagMultiTitle_ContextList), KaxTagMultiTitle_ContextList, &KaxTag_Context, *GetKaxTagsGlobal_Context, &EBML_INFO(KaxTagMultiTitle));
-const EbmlSemanticContext KaxTagTitle_Context = EbmlSemanticContext(countof(KaxTagTitle_ContextList), KaxTagTitle_ContextList, &KaxTagMultiTitle_Context, *GetKaxTagsGlobal_Context, &EBML_INFO(KaxTagTitle));
-const EbmlSemanticContext KaxTagMultiTitleType_Context = EbmlSemanticContext(0, NULL, &KaxTagTitle_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagMultiTitleType));
-const EbmlSemanticContext KaxTagMultiTitleName_Context = EbmlSemanticContext(0, NULL, &KaxTagTitle_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagMultiTitleName));
-const EbmlSemanticContext KaxTagMultiTitleSubTitle_Context = EbmlSemanticContext(0, NULL, &KaxTagTitle_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagMultiTitleSubTitle));
-const EbmlSemanticContext KaxTagMultiTitleEdition_Context = EbmlSemanticContext(0, NULL, &KaxTagTitle_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagMultiTitleEdition));
-const EbmlSemanticContext KaxTagMultiTitleAddress_Context = EbmlSemanticContext(0, NULL, &KaxTagTitle_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagMultiTitleAddress));
-const EbmlSemanticContext KaxTagMultiTitleURL_Context = EbmlSemanticContext(0, NULL, &KaxTagTitle_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagMultiTitleURL));
-const EbmlSemanticContext KaxTagMultiTitleEmail_Context = EbmlSemanticContext(0, NULL, &KaxTagTitle_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagMultiTitleEmail));
-const EbmlSemanticContext KaxTagMultiTitleLanguage_Context = EbmlSemanticContext(0, NULL, &KaxTagTitle_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagMultiTitleLanguage));
-
-const EbmlSemanticContext KaxTagMultiAttachment_Context = EbmlSemanticContext(countof(KaxTagMultiAttachment_ContextList), KaxTagMultiAttachment_ContextList, &KaxTag_Context, *GetKaxTagsGlobal_Context, &EBML_INFO(KaxTagMultiAttachment));
-const EbmlSemanticContext KaxTagAttachment_Context = EbmlSemanticContext(countof(KaxTagAttachment_ContextList), KaxTagAttachment_ContextList, &KaxTagMultiAttachment_Context, *GetKaxTagsGlobal_Context, &EBML_INFO(KaxTagAttachment));
-const EbmlSemanticContext KaxTagAttachmentID_Context = EbmlSemanticContext(0, NULL, &KaxTagAttachment_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagAttachmentID));
-
-//The Muti Elements
-EbmlId KaxTagMultiComment_TheId             (0x5B7B, 2);
-EbmlId KaxTagMultiCommentName_TheId         (0x5F7D, 2);
-EbmlId KaxTagMultiCommentComments_TheId     (0x5F7C, 2);
-EbmlId KaxTagMultiCommentLanguage_TheId     (0x22B59D, 3);
-
-EbmlId KaxTagMultiCommercial_TheId          (0x4DC7, 2);
-EbmlId KaxTagCommercial_TheId               (0x4EC7, 2);
-EbmlId KaxTagMultiCommercialType_TheId      (0x5BD7, 2);
-EbmlId KaxTagMultiCommercialAddress_TheId   (0x5BBB, 2);
-EbmlId KaxTagMultiCommercialURL_TheId       (0x5BDA, 2);
-EbmlId KaxTagMultiCommercialEmail_TheId     (0x5BC0, 2);
-
-EbmlId KaxTagMultiPrice_TheId               (0x5BC3, 2);
-EbmlId KaxTagMultiPriceCurrency_TheId       (0x5B6C, 2);
-EbmlId KaxTagMultiPriceAmount_TheId         (0x5B6E, 2);
-EbmlId KaxTagMultiPricePriceDate_TheId      (0x5B6F, 2);
-
-EbmlId KaxTagMultiDate_TheId                (0x4DC8, 2);
-EbmlId KaxTagDate_TheId                     (0x4EC8, 2);
-EbmlId KaxTagMultiDateType_TheId            (0x5BD8, 2);
-EbmlId KaxTagMultiDateDateBegin_TheId       (0x4460, 2);
-EbmlId KaxTagMultiDateDateEnd_TheId         (0x4462, 2);
-
-EbmlId KaxTagMultiEntity_TheId              (0x4DC9, 2);
-EbmlId KaxTagEntity_TheId                   (0x4EC9, 2);
-EbmlId KaxTagMultiEntityType_TheId          (0x5BD9, 2);
-EbmlId KaxTagMultiEntityName_TheId          (0x5BED, 2);
-EbmlId KaxTagMultiEntityAddress_TheId       (0x5BDC, 2);
-EbmlId KaxTagMultiEntityURL_TheId           (0x5BDB, 2);
-EbmlId KaxTagMultiEntityEmail_TheId         (0x5BC1, 2);
-
-EbmlId KaxTagMultiIdentifier_TheId          (0x4DC6, 2);
-EbmlId KaxTagIdentifier_TheId               (0x4EC6, 2);
-EbmlId KaxTagMultiIdentifierType_TheId      (0x5BAD, 2);
-EbmlId KaxTagMultiIdentifierBinary_TheId    (0x6B67, 2);
-EbmlId KaxTagMultiIdentifierString_TheId    (0x6B68, 2);
-
-EbmlId KaxTagMultiLegal_TheId               (0x4DC5, 2);
-EbmlId KaxTagLegal_TheId                    (0x4EC5, 2);
-EbmlId KaxTagMultiLegalType_TheId           (0x5BBD, 2);
-EbmlId KaxTagMultiLegalContent_TheId        (0x5BB2, 2);
-EbmlId KaxTagMultiLegalURL_TheId            (0x5B34, 2);
-EbmlId KaxTagMultiLegalAddress_TheId        (0x5B9B, 2);
-
-EbmlId KaxTagMultiTitle_TheId               (0x4DC4, 2);
-EbmlId KaxTagTitle_TheId                    (0x4EC4, 2);
-EbmlId KaxTagMultiTitleType_TheId           (0x5B7D, 2);
-EbmlId KaxTagMultiTitleName_TheId           (0x5BB9, 2);
-EbmlId KaxTagMultiTitleSubTitle_TheId       (0x5B5B, 2);
-EbmlId KaxTagMultiTitleEdition_TheId        (0x5BAE, 2);
-EbmlId KaxTagMultiTitleAddress_TheId        (0x5B33, 2);
-EbmlId KaxTagMultiTitleURL_TheId            (0x5BA9, 2);
-EbmlId KaxTagMultiTitleEmail_TheId          (0x5BC9, 2);
-EbmlId KaxTagMultiTitleLanguage_TheId       (0x22B59E, 3);
-
-EbmlId KaxTagMultiAttachment_TheId          (0x4DC3, 2);
-EbmlId KaxTagAttachment_TheId               (0x4EC3, 2);
-EbmlId KaxTagAttachmentID_TheId             (0x5BA0, 2);
-
-const EbmlCallbacks KaxTagMultiComment::ClassInfos(KaxTagMultiComment::Create, KaxTagMultiComment_TheId, "MultiComment", KaxTagMultiComment_Context);
-const EbmlCallbacks KaxTagMultiCommentName::ClassInfos(KaxTagMultiCommentName::Create, KaxTagMultiCommentName_TheId, "MultiCommentName", KaxTagMultiCommentName_Context);
-const EbmlCallbacks KaxTagMultiCommentComments::ClassInfos(KaxTagMultiCommentComments::Create, KaxTagMultiCommentComments_TheId, "MultiCommentComments", KaxTagMultiCommentComments_Context);
-const EbmlCallbacks KaxTagMultiCommentLanguage::ClassInfos(KaxTagMultiCommentLanguage::Create, KaxTagMultiCommentLanguage_TheId, "MultiCommentLanguage", KaxTagMultiCommentLanguage_Context);
-
-const EbmlCallbacks KaxTagMultiCommercial::ClassInfos(KaxTagMultiCommercial::Create, KaxTagMultiCommercial_TheId, "MultiCommercial", KaxTagMultiCommercial_Context);
-const EbmlCallbacks KaxTagCommercial::ClassInfos(KaxTagCommercial::Create, KaxTagCommercial_TheId, "Commercial", KaxTagCommercial_Context);
-const EbmlCallbacks KaxTagMultiCommercialType::ClassInfos(KaxTagMultiCommercialType::Create, KaxTagMultiCommercialType_TheId, "MultiCommercialType", KaxTagMultiCommercialType_Context);
-const EbmlCallbacks KaxTagMultiCommercialAddress::ClassInfos(KaxTagMultiCommercialAddress::Create, KaxTagMultiCommercialAddress_TheId, "MultiCommercialAddress", KaxTagMultiCommercialAddress_Context);
-const EbmlCallbacks KaxTagMultiCommercialURL::ClassInfos(KaxTagMultiCommercialURL::Create, KaxTagMultiCommercialURL_TheId, "MultiCommercialURL", KaxTagMultiCommercialURL_Context);
-const EbmlCallbacks KaxTagMultiCommercialEmail::ClassInfos(KaxTagMultiCommercialEmail::Create, KaxTagMultiCommercialEmail_TheId, "MultiCommercialEmail", KaxTagMultiCommercialEmail_Context);
-
-const EbmlCallbacks KaxTagMultiPrice::ClassInfos(KaxTagMultiPrice::Create, KaxTagMultiPrice_TheId, "MultiPrice", KaxTagMultiPrice_Context);
-const EbmlCallbacks KaxTagMultiPriceCurrency::ClassInfos(KaxTagMultiPriceCurrency::Create, KaxTagMultiPriceCurrency_TheId, "MultiPriceCurrency", KaxTagMultiPriceCurrency_Context);
-const EbmlCallbacks KaxTagMultiPriceAmount::ClassInfos(KaxTagMultiPriceAmount::Create, KaxTagMultiPriceAmount_TheId, "MultiPriceAmount", KaxTagMultiPriceAmount_Context);
-const EbmlCallbacks KaxTagMultiPricePriceDate::ClassInfos(KaxTagMultiPricePriceDate::Create, KaxTagMultiPricePriceDate_TheId, "MultiPricePriceDate", KaxTagMultiPricePriceDate_Context);
-
-const EbmlCallbacks KaxTagMultiDate::ClassInfos(KaxTagMultiDate::Create, KaxTagMultiDate_TheId, "MultiDate", KaxTagMultiDate_Context);
-const EbmlCallbacks KaxTagDate::ClassInfos(KaxTagDate::Create, KaxTagDate_TheId, "Date", KaxTagDate_Context);
-const EbmlCallbacks KaxTagMultiDateType::ClassInfos(KaxTagMultiDateType::Create, KaxTagMultiDateType_TheId, "MultiDateType", KaxTagMultiDateType_Context);
-const EbmlCallbacks KaxTagMultiDateDateBegin::ClassInfos(KaxTagMultiDateDateBegin::Create, KaxTagMultiDateDateBegin_TheId, "MultiDateDateBegin", KaxTagMultiDateDateBegin_Context);
-const EbmlCallbacks KaxTagMultiDateDateEnd::ClassInfos(KaxTagMultiDateDateEnd::Create, KaxTagMultiDateDateEnd_TheId, "MultiDateDateEnd", KaxTagMultiDateDateEnd_Context);
-
-const EbmlCallbacks KaxTagMultiEntity::ClassInfos(KaxTagMultiEntity::Create, KaxTagMultiEntity_TheId, "MultiEntity", KaxTagMultiEntity_Context);
-const EbmlCallbacks KaxTagEntity::ClassInfos(KaxTagEntity::Create, KaxTagEntity_TheId, "Entity", KaxTagEntity_Context);
-const EbmlCallbacks KaxTagMultiEntityType::ClassInfos(KaxTagMultiEntityType::Create, KaxTagMultiEntityType_TheId, "MultiEntityType", KaxTagMultiEntityType_Context);
-const EbmlCallbacks KaxTagMultiEntityName::ClassInfos(KaxTagMultiEntityName::Create, KaxTagMultiEntityName_TheId, "MultiEntityName", KaxTagMultiEntityName_Context);
-const EbmlCallbacks KaxTagMultiEntityURL::ClassInfos(KaxTagMultiEntityURL::Create, KaxTagMultiEntityURL_TheId, "MultiEntityURL", KaxTagMultiEntityURL_Context);
-const EbmlCallbacks KaxTagMultiEntityEmail::ClassInfos(KaxTagMultiEntityEmail::Create, KaxTagMultiEntityEmail_TheId, "MultiEntityEmail", KaxTagMultiEntityEmail_Context);
-const EbmlCallbacks KaxTagMultiEntityAddress::ClassInfos(KaxTagMultiEntityAddress::Create, KaxTagMultiEntityAddress_TheId, "MultiEntityAddress", KaxTagMultiEntityAddress_Context);
-
-const EbmlCallbacks KaxTagMultiIdentifier::ClassInfos(KaxTagMultiIdentifier::Create, KaxTagMultiIdentifier_TheId, "MultiIdentifier", KaxTagMultiIdentifier_Context);
-const EbmlCallbacks KaxTagIdentifier::ClassInfos(KaxTagIdentifier::Create, KaxTagIdentifier_TheId, "Identifier", KaxTagIdentifier_Context);
-const EbmlCallbacks KaxTagMultiIdentifierType::ClassInfos(KaxTagMultiIdentifierType::Create, KaxTagMultiIdentifierType_TheId, "TagMultiIdentifierType", KaxTagMultiIdentifierType_Context);
-const EbmlCallbacks KaxTagMultiIdentifierBinary::ClassInfos(KaxTagMultiIdentifierBinary::Create, KaxTagMultiIdentifierBinary_TheId, "MultiIdentifierBinary", KaxTagMultiIdentifierBinary_Context);
-const EbmlCallbacks KaxTagMultiIdentifierString::ClassInfos(KaxTagMultiIdentifierString::Create, KaxTagMultiIdentifierString_TheId, "MultiIdentifierString", KaxTagMultiIdentifierString_Context);
-
-const EbmlCallbacks KaxTagMultiLegal::ClassInfos(KaxTagMultiLegal::Create, KaxTagMultiLegal_TheId, "MultiLegal", KaxTagMultiLegal_Context);
-const EbmlCallbacks KaxTagLegal::ClassInfos(KaxTagLegal::Create, KaxTagLegal_TheId, "Legal", KaxTagLegal_Context);
-const EbmlCallbacks KaxTagMultiLegalType::ClassInfos(KaxTagMultiLegalType::Create, KaxTagMultiLegalType_TheId, "KaxTagMultiLegalType", KaxTagMultiLegalType_Context);
-const EbmlCallbacks KaxTagMultiLegalContent::ClassInfos(KaxTagMultiLegalContent::Create, KaxTagMultiLegalContent_TheId, "TagMultiLegalContent", KaxTagMultiLegalContent_Context);
-const EbmlCallbacks KaxTagMultiLegalURL::ClassInfos(KaxTagMultiLegalURL::Create, KaxTagMultiLegalURL_TheId, "KaxTagMultiLegalURL", KaxTagMultiLegalURL_Context);
-const EbmlCallbacks KaxTagMultiLegalAddress::ClassInfos(KaxTagMultiLegalAddress::Create, KaxTagMultiLegalAddress_TheId, "KaxTagMultiLegalAddress", KaxTagMultiLegalAddress_Context);
-
-const EbmlCallbacks KaxTagMultiTitle::ClassInfos(KaxTagMultiTitle::Create, KaxTagMultiTitle_TheId, "MultiEntity", KaxTagMultiTitle_Context);
-const EbmlCallbacks KaxTagTitle::ClassInfos(KaxTagTitle::Create, KaxTagTitle_TheId, "Entity", KaxTagTitle_Context);
-const EbmlCallbacks KaxTagMultiTitleType::ClassInfos(KaxTagMultiTitleType::Create, KaxTagMultiTitleType_TheId, "MultiTitleType", KaxTagMultiTitleType_Context);
-const EbmlCallbacks KaxTagMultiTitleName::ClassInfos(KaxTagMultiTitleName::Create, KaxTagMultiTitleName_TheId, "MultiTitleName", KaxTagMultiTitleName_Context);
-const EbmlCallbacks KaxTagMultiTitleSubTitle::ClassInfos(KaxTagMultiTitleSubTitle::Create, KaxTagMultiTitleSubTitle_TheId, "MultiTitleSubTitle", KaxTagMultiTitleSubTitle_Context);
-const EbmlCallbacks KaxTagMultiTitleEdition::ClassInfos(KaxTagMultiTitleEdition::Create, KaxTagMultiTitleEdition_TheId, "MultiTitleEdition", KaxTagMultiTitleEdition_Context);
-const EbmlCallbacks KaxTagMultiTitleAddress::ClassInfos(KaxTagMultiTitleAddress::Create, KaxTagMultiTitleAddress_TheId, "MultiTitleAddress", KaxTagMultiTitleAddress_Context);
-const EbmlCallbacks KaxTagMultiTitleURL::ClassInfos(KaxTagMultiTitleURL::Create, KaxTagMultiTitleURL_TheId, "MultiTitleURL", KaxTagMultiTitleURL_Context);
-const EbmlCallbacks KaxTagMultiTitleEmail::ClassInfos(KaxTagMultiTitleEmail::Create, KaxTagMultiTitleEmail_TheId, "MultiTitleEmail", KaxTagMultiTitleEmail_Context);
-const EbmlCallbacks KaxTagMultiTitleLanguage::ClassInfos(KaxTagMultiTitleLanguage::Create, KaxTagMultiTitleLanguage_TheId, "MultiTitleLanguage", KaxTagMultiTitleLanguage_Context);
-
-const EbmlCallbacks KaxTagMultiAttachment::ClassInfos(KaxTagMultiAttachment::Create, KaxTagMultiAttachment_TheId, "TagMultiAttachment", KaxTagMultiAttachment_Context);
-const EbmlCallbacks KaxTagAttachment::ClassInfos(KaxTagAttachment::Create, KaxTagAttachment_TheId, "TagAttachment", KaxTagAttachment_Context);
-const EbmlCallbacks KaxTagAttachmentID::ClassInfos(KaxTagAttachmentID::Create, KaxTagAttachmentID_TheId, "TagAttachmentID", KaxTagAttachmentID_Context);
-
-KaxTagMultiComment::KaxTagMultiComment()
-       :EbmlMaster(KaxTagMultiComment_Context)
-{}
-
-
-KaxTagMultiCommercial::KaxTagMultiCommercial()
-       :EbmlMaster(KaxTagMultiCommercial_Context)
-{}
-
-KaxTagCommercial::KaxTagCommercial()
-       :EbmlMaster(KaxTagCommercial_Context)
-{}
-
-KaxTagMultiPrice::KaxTagMultiPrice()
-       :EbmlMaster(KaxTagMultiPrice_Context)
-{}
-
-KaxTagMultiDate::KaxTagMultiDate()
-       :EbmlMaster(KaxTagMultiDate_Context)
-{}
-
-KaxTagDate::KaxTagDate()
-       :EbmlMaster(KaxTagDate_Context)
-{}
-
-KaxTagMultiEntity::KaxTagMultiEntity()
-       :EbmlMaster(KaxTagMultiEntity_Context)
-{}
-       
-KaxTagEntity::KaxTagEntity()
-       :EbmlMaster(KaxTagEntity_Context)
-{}
-       
-KaxTagMultiLegal::KaxTagMultiLegal()
-       :EbmlMaster(KaxTagMultiLegal_Context)
-{}
-
-KaxTagLegal::KaxTagLegal()
-       :EbmlMaster(KaxTagLegal_Context)
-{}
-
-KaxTagMultiIdentifier::KaxTagMultiIdentifier()
-       :EbmlMaster(KaxTagMultiIdentifier_Context)
-{}
-
-KaxTagIdentifier::KaxTagIdentifier()
-       :EbmlMaster(KaxTagIdentifier_Context)
-{}
-
-KaxTagMultiTitle::KaxTagMultiTitle()
-       :EbmlMaster(KaxTagMultiTitle_Context)
-{}
-
-KaxTagTitle::KaxTagTitle()
-       :EbmlMaster(KaxTagTitle_Context)
-{}
-
-KaxTagMultiAttachment::KaxTagMultiAttachment()
-       :EbmlMaster(KaxTagMultiAttachment_Context)
-{}
-
-KaxTagAttachment::KaxTagAttachment()
-       :EbmlMaster(KaxTagAttachment_Context)
-{}
-
-const EbmlSemanticContext & GetKaxTagsGlobal_Context()
-{
-       return KaxTagMultiGlobal_Context;
-}
-
-END_LIBMATROSKA_NAMESPACE
+/****************************************************************************\r
+** libmatroska : parse Matroska files, see http://www.matroska.org/\r
+**\r
+** <file/class description>\r
+**\r
+** Copyright (C) 2002-2010 Steve Lhomme.  All rights reserved.\r
+**\r
+** This file is part of libmatroska.\r
+**\r
+** This library is free software; you can redistribute it and/or\r
+** modify it under the terms of the GNU Lesser General Public\r
+** License as published by the Free Software Foundation; either\r
+** version 2.1 of the License, or (at your option) any later version.\r
+** \r
+** This library is distributed in the hope that it will be useful,\r
+** but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
+** Lesser General Public License for more details.\r
+** \r
+** You should have received a copy of the GNU Lesser General Public\r
+** License along with this library; if not, write to the Free Software\r
+** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\r
+**\r
+** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**\r
+** Contact license@matroska.org if any conditions of this licensing are\r
+** not clear to you.\r
+**\r
+**********************************************************************/\r
+\r
+/*!\r
+       \file\r
+       \version \$Id: KaxTagMulti.cpp 640 2004-07-09 21:05:36Z mosu $\r
+       \author Jory Stone       <jcsston @ toughguy.net>\r
+       \author Steve Lhomme     <robux4 @ users.sf.net>\r
+*/\r
+#include "matroska/KaxTagMulti.h"\r
+#include "matroska/KaxContexts.h"\r
+\r
+using namespace LIBEBML_NAMESPACE;\r
+\r
+START_LIBMATROSKA_NAMESPACE\r
+\r
+EbmlSemantic KaxTagMultiGlobal_ContextList[1] =\r
+{\r
+       EbmlSemantic(false, false, EBML_INFO(KaxTagMultiComment)),\r
+};\r
+\r
+EbmlSemantic KaxTagMultiComment_ContextList[3] =\r
+{\r
+       EbmlSemantic(false, true, EBML_INFO(KaxTagMultiCommentName)),\r
+       EbmlSemantic(false, true, EBML_INFO(KaxTagMultiCommentComments)),\r
+       EbmlSemantic(false, true, EBML_INFO(KaxTagMultiCommentLanguage)),\r
+};\r
+\r
+EbmlSemantic KaxTagMultiCommercial_ContextList[1] =\r
+{\r
+       EbmlSemantic(true, false, EBML_INFO(KaxTagCommercial)),\r
+};\r
+\r
+EbmlSemantic KaxTagCommercial_ContextList[5] =\r
+{\r
+       EbmlSemantic(true,  true,  EBML_INFO(KaxTagMultiCommercialType)),\r
+       EbmlSemantic(false, true,  EBML_INFO(KaxTagMultiCommercialAddress)),\r
+       EbmlSemantic(false, false, EBML_INFO(KaxTagMultiCommercialURL)),\r
+       EbmlSemantic(false, false, EBML_INFO(KaxTagMultiCommercialEmail)),\r
+       EbmlSemantic(false, false, EBML_INFO(KaxTagMultiPrice)),\r
+};\r
+\r
+EbmlSemantic KaxTagMultiPrice_ContextList[3] =\r
+{\r
+       EbmlSemantic(false, true, EBML_INFO(KaxTagMultiPriceCurrency)),\r
+       EbmlSemantic(false, true, EBML_INFO(KaxTagMultiPriceAmount)),\r
+       EbmlSemantic(false, true, EBML_INFO(KaxTagMultiPricePriceDate)),\r
+};\r
+\r
+EbmlSemantic KaxTagMultiDate_ContextList[1] =\r
+{\r
+       EbmlSemantic(true, false, EBML_INFO(KaxTagDate)),\r
+};\r
+\r
+EbmlSemantic KaxTagDate_ContextList[3] =\r
+{\r
+       EbmlSemantic(true,  true, EBML_INFO(KaxTagMultiDateType)),\r
+       EbmlSemantic(false, true, EBML_INFO(KaxTagMultiDateDateBegin)),\r
+       EbmlSemantic(false, true, EBML_INFO(KaxTagMultiDateDateEnd)),\r
+};\r
+\r
+EbmlSemantic KaxTagMultiEntity_ContextList[1] =\r
+{\r
+       EbmlSemantic(true, false, EBML_INFO(KaxTagEntity)),\r
+};\r
+\r
+EbmlSemantic KaxTagEntity_ContextList[5] =\r
+{\r
+       EbmlSemantic(true,  true,  EBML_INFO(KaxTagMultiEntityType)),\r
+       EbmlSemantic(false, true,  EBML_INFO(KaxTagMultiEntityName)),\r
+       EbmlSemantic(false, false, EBML_INFO(KaxTagMultiEntityURL)),\r
+       EbmlSemantic(false, false, EBML_INFO(KaxTagMultiEntityEmail)),\r
+       EbmlSemantic(false, true,  EBML_INFO(KaxTagMultiEntityAddress)),\r
+};\r
+\r
+EbmlSemantic KaxTagMultiIdentifier_ContextList[1] =\r
+{\r
+       EbmlSemantic(true, false, EBML_INFO(KaxTagIdentifier)),\r
+};\r
+\r
+EbmlSemantic KaxTagIdentifier_ContextList[3] =\r
+{\r
+       EbmlSemantic(true,  true, EBML_INFO(KaxTagMultiIdentifierType)),\r
+       EbmlSemantic(false, true, EBML_INFO(KaxTagMultiIdentifierBinary)),\r
+       EbmlSemantic(false, true, EBML_INFO(KaxTagMultiIdentifierString)),\r
+};\r
+\r
+EbmlSemantic KaxTagMultiLegal_ContextList[1] =\r
+{\r
+       EbmlSemantic(true, false, EBML_INFO(KaxTagLegal)),\r
+};\r
+\r
+EbmlSemantic KaxTagLegal_ContextList[4] =\r
+{\r
+       EbmlSemantic(true,  true,  EBML_INFO(KaxTagMultiLegalType)),\r
+       EbmlSemantic(false, true,  EBML_INFO(KaxTagMultiLegalContent)),\r
+       EbmlSemantic(false, false, EBML_INFO(KaxTagMultiLegalURL)),\r
+       EbmlSemantic(false, true,  EBML_INFO(KaxTagMultiLegalAddress)),\r
+};\r
+\r
+EbmlSemantic KaxTagMultiTitle_ContextList[1] =\r
+{\r
+       EbmlSemantic(true, false, EBML_INFO(KaxTagTitle)),\r
+};\r
+\r
+EbmlSemantic KaxTagTitle_ContextList[8] =\r
+{\r
+       EbmlSemantic(true,  true,  EBML_INFO(KaxTagMultiTitleType)),\r
+       EbmlSemantic(false, true,  EBML_INFO(KaxTagMultiTitleName)),\r
+       EbmlSemantic(false, true,  EBML_INFO(KaxTagMultiTitleSubTitle)),\r
+       EbmlSemantic(false, true,  EBML_INFO(KaxTagMultiTitleEdition)),\r
+       EbmlSemantic(false, true,  EBML_INFO(KaxTagMultiTitleAddress)),\r
+       EbmlSemantic(false, false, EBML_INFO(KaxTagMultiTitleURL)),\r
+       EbmlSemantic(false, false, EBML_INFO(KaxTagMultiTitleEmail)),\r
+       EbmlSemantic(false, true,  EBML_INFO(KaxTagMultiTitleLanguage)),\r
+};\r
+\r
+EbmlSemantic KaxTagMultiAttachment_ContextList[1] =\r
+{\r
+       EbmlSemantic(true, false, EBML_INFO(KaxTagAttachment)),\r
+};\r
+\r
+EbmlSemantic KaxTagAttachment_ContextList[1] =\r
+{\r
+       EbmlSemantic(false, true,  EBML_INFO(KaxTagAttachmentID)),\r
+};\r
+\r
+const EbmlSemanticContext KaxTagMultiGlobal_Context = EbmlSemanticContext(countof(KaxTagMultiGlobal_ContextList), KaxTagMultiGlobal_ContextList, NULL, *GetKaxGlobal_Context, NULL);\r
+\r
+const EbmlSemanticContext KaxTagMultiComment_Context = EbmlSemanticContext(countof(KaxTagMultiComment_ContextList), KaxTagMultiComment_ContextList, &KaxTag_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagMultiComment));\r
+const EbmlSemanticContext KaxTagMultiCommentName_Context = EbmlSemanticContext(0, NULL, &KaxTagMultiComment_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagMultiCommentName));\r
+const EbmlSemanticContext KaxTagMultiCommentComments_Context = EbmlSemanticContext(0, NULL, &KaxTagMultiComment_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagMultiCommentComments));\r
+const EbmlSemanticContext KaxTagMultiCommentLanguage_Context = EbmlSemanticContext(0, NULL, &KaxTagMultiComment_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagMultiCommentLanguage));\r
+\r
+const EbmlSemanticContext KaxTagMultiCommercial_Context = EbmlSemanticContext(countof(KaxTagMultiCommercial_ContextList), KaxTagMultiCommercial_ContextList, &KaxTag_Context, *GetKaxTagsGlobal_Context, &EBML_INFO(KaxTagMultiCommercial));\r
+const EbmlSemanticContext KaxTagCommercial_Context = EbmlSemanticContext(countof(KaxTagCommercial_ContextList), KaxTagCommercial_ContextList, &KaxTagMultiCommercial_Context, *GetKaxTagsGlobal_Context, &EBML_INFO(KaxTagCommercial));\r
+const EbmlSemanticContext KaxTagMultiCommercialType_Context = EbmlSemanticContext(0, NULL, &KaxTagCommercial_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagMultiCommercialType));\r
+const EbmlSemanticContext KaxTagMultiCommercialAddress_Context = EbmlSemanticContext(0, NULL, &KaxTagCommercial_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagMultiCommercialAddress));\r
+const EbmlSemanticContext KaxTagMultiCommercialURL_Context = EbmlSemanticContext(0, NULL, &KaxTagCommercial_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagMultiCommercialURL));\r
+const EbmlSemanticContext KaxTagMultiCommercialEmail_Context = EbmlSemanticContext(0, NULL, &KaxTagCommercial_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagMultiCommercialEmail));\r
+\r
+const EbmlSemanticContext KaxTagMultiPrice_Context = EbmlSemanticContext(countof(KaxTagMultiPrice_ContextList), KaxTagMultiPrice_ContextList, &KaxTagCommercial_Context, *GetKaxTagsGlobal_Context, &EBML_INFO(KaxTagMultiPrice));\r
+const EbmlSemanticContext KaxTagMultiPriceCurrency_Context = EbmlSemanticContext(0, NULL, &KaxTagMultiPrice_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagMultiPriceCurrency));\r
+const EbmlSemanticContext KaxTagMultiPriceAmount_Context = EbmlSemanticContext(0, NULL, &KaxTagMultiPrice_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagMultiPriceAmount));\r
+const EbmlSemanticContext KaxTagMultiPricePriceDate_Context = EbmlSemanticContext(0, NULL, &KaxTagMultiPrice_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagMultiPricePriceDate));\r
+\r
+const EbmlSemanticContext KaxTagMultiDate_Context = EbmlSemanticContext(countof(KaxTagMultiDate_ContextList), KaxTagMultiDate_ContextList, &KaxTag_Context, *GetKaxTagsGlobal_Context, &EBML_INFO(KaxTagMultiDate));\r
+const EbmlSemanticContext KaxTagDate_Context = EbmlSemanticContext(countof(KaxTagDate_ContextList), KaxTagDate_ContextList, &KaxTagMultiDate_Context, *GetKaxTagsGlobal_Context, &EBML_INFO(KaxTagDate));\r
+const EbmlSemanticContext KaxTagMultiDateType_Context = EbmlSemanticContext(0, NULL, &KaxTagDate_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagMultiDateType));\r
+const EbmlSemanticContext KaxTagMultiDateDateBegin_Context = EbmlSemanticContext(0, NULL, &KaxTagDate_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagMultiDateDateBegin));\r
+const EbmlSemanticContext KaxTagMultiDateDateEnd_Context = EbmlSemanticContext(0, NULL, &KaxTagDate_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagMultiDateDateEnd));\r
+\r
+const EbmlSemanticContext KaxTagMultiEntity_Context = EbmlSemanticContext(countof(KaxTagMultiEntity_ContextList), KaxTagMultiEntity_ContextList, &KaxTag_Context, *GetKaxTagsGlobal_Context, &EBML_INFO(KaxTagMultiEntity));\r
+const EbmlSemanticContext KaxTagEntity_Context = EbmlSemanticContext(countof(KaxTagEntity_ContextList), KaxTagEntity_ContextList, &KaxTagMultiEntity_Context, *GetKaxTagsGlobal_Context, &EBML_INFO(KaxTagEntity));\r
+const EbmlSemanticContext KaxTagMultiEntityType_Context = EbmlSemanticContext(0, NULL, &KaxTagEntity_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagMultiEntityType));\r
+const EbmlSemanticContext KaxTagMultiEntityName_Context = EbmlSemanticContext(0, NULL, &KaxTagEntity_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagMultiEntityName));\r
+const EbmlSemanticContext KaxTagMultiEntityURL_Context = EbmlSemanticContext(0, NULL, &KaxTagEntity_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagMultiEntityURL));\r
+const EbmlSemanticContext KaxTagMultiEntityEmail_Context = EbmlSemanticContext(0, NULL, &KaxTagEntity_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagMultiEntityEmail));\r
+const EbmlSemanticContext KaxTagMultiEntityAddress_Context = EbmlSemanticContext(0, NULL, &KaxTagEntity_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagMultiEntityAddress));\r
+\r
+const EbmlSemanticContext KaxTagMultiIdentifier_Context = EbmlSemanticContext(countof(KaxTagMultiIdentifier_ContextList), KaxTagMultiIdentifier_ContextList, &KaxTag_Context, *GetKaxTagsGlobal_Context, &EBML_INFO(KaxTagMultiIdentifier));\r
+const EbmlSemanticContext KaxTagIdentifier_Context = EbmlSemanticContext(countof(KaxTagIdentifier_ContextList), KaxTagIdentifier_ContextList, &KaxTagMultiIdentifier_Context, *GetKaxTagsGlobal_Context, &EBML_INFO(KaxTagIdentifier));\r
+const EbmlSemanticContext KaxTagMultiIdentifierType_Context = EbmlSemanticContext(0, NULL, &KaxTagIdentifier_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagMultiIdentifierType));\r
+const EbmlSemanticContext KaxTagMultiIdentifierBinary_Context = EbmlSemanticContext(0, NULL, &KaxTagIdentifier_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagMultiIdentifierBinary));\r
+const EbmlSemanticContext KaxTagMultiIdentifierString_Context = EbmlSemanticContext(0, NULL, &KaxTagIdentifier_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagMultiIdentifierString));\r
+\r
+const EbmlSemanticContext KaxTagMultiLegal_Context = EbmlSemanticContext(countof(KaxTagMultiLegal_ContextList), KaxTagMultiLegal_ContextList, &KaxTag_Context, *GetKaxTagsGlobal_Context, &EBML_INFO(KaxTagMultiLegal));\r
+const EbmlSemanticContext KaxTagLegal_Context = EbmlSemanticContext(countof(KaxTagLegal_ContextList), KaxTagLegal_ContextList, &KaxTagMultiLegal_Context, *GetKaxTagsGlobal_Context, &EBML_INFO(KaxTagLegal));\r
+const EbmlSemanticContext KaxTagMultiLegalType_Context = EbmlSemanticContext(0, NULL, &KaxTagLegal_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagMultiLegalType));\r
+const EbmlSemanticContext KaxTagMultiLegalContent_Context = EbmlSemanticContext(0, NULL, &KaxTagLegal_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagMultiLegalContent));\r
+const EbmlSemanticContext KaxTagMultiLegalURL_Context = EbmlSemanticContext(0, NULL, &KaxTagLegal_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagMultiLegalURL));\r
+const EbmlSemanticContext KaxTagMultiLegalAddress_Context = EbmlSemanticContext(0, NULL, &KaxTagLegal_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagMultiLegalAddress));\r
+\r
+const EbmlSemanticContext KaxTagMultiTitle_Context = EbmlSemanticContext(countof(KaxTagMultiTitle_ContextList), KaxTagMultiTitle_ContextList, &KaxTag_Context, *GetKaxTagsGlobal_Context, &EBML_INFO(KaxTagMultiTitle));\r
+const EbmlSemanticContext KaxTagTitle_Context = EbmlSemanticContext(countof(KaxTagTitle_ContextList), KaxTagTitle_ContextList, &KaxTagMultiTitle_Context, *GetKaxTagsGlobal_Context, &EBML_INFO(KaxTagTitle));\r
+const EbmlSemanticContext KaxTagMultiTitleType_Context = EbmlSemanticContext(0, NULL, &KaxTagTitle_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagMultiTitleType));\r
+const EbmlSemanticContext KaxTagMultiTitleName_Context = EbmlSemanticContext(0, NULL, &KaxTagTitle_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagMultiTitleName));\r
+const EbmlSemanticContext KaxTagMultiTitleSubTitle_Context = EbmlSemanticContext(0, NULL, &KaxTagTitle_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagMultiTitleSubTitle));\r
+const EbmlSemanticContext KaxTagMultiTitleEdition_Context = EbmlSemanticContext(0, NULL, &KaxTagTitle_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagMultiTitleEdition));\r
+const EbmlSemanticContext KaxTagMultiTitleAddress_Context = EbmlSemanticContext(0, NULL, &KaxTagTitle_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagMultiTitleAddress));\r
+const EbmlSemanticContext KaxTagMultiTitleURL_Context = EbmlSemanticContext(0, NULL, &KaxTagTitle_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagMultiTitleURL));\r
+const EbmlSemanticContext KaxTagMultiTitleEmail_Context = EbmlSemanticContext(0, NULL, &KaxTagTitle_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagMultiTitleEmail));\r
+const EbmlSemanticContext KaxTagMultiTitleLanguage_Context = EbmlSemanticContext(0, NULL, &KaxTagTitle_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagMultiTitleLanguage));\r
+\r
+const EbmlSemanticContext KaxTagMultiAttachment_Context = EbmlSemanticContext(countof(KaxTagMultiAttachment_ContextList), KaxTagMultiAttachment_ContextList, &KaxTag_Context, *GetKaxTagsGlobal_Context, &EBML_INFO(KaxTagMultiAttachment));\r
+const EbmlSemanticContext KaxTagAttachment_Context = EbmlSemanticContext(countof(KaxTagAttachment_ContextList), KaxTagAttachment_ContextList, &KaxTagMultiAttachment_Context, *GetKaxTagsGlobal_Context, &EBML_INFO(KaxTagAttachment));\r
+const EbmlSemanticContext KaxTagAttachmentID_Context = EbmlSemanticContext(0, NULL, &KaxTagAttachment_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTagAttachmentID));\r
+\r
+//The Muti Elements\r
+EbmlId KaxTagMultiComment_TheId             (0x5B7B, 2);\r
+EbmlId KaxTagMultiCommentName_TheId         (0x5F7D, 2);\r
+EbmlId KaxTagMultiCommentComments_TheId     (0x5F7C, 2);\r
+EbmlId KaxTagMultiCommentLanguage_TheId     (0x22B59D, 3);\r
+\r
+EbmlId KaxTagMultiCommercial_TheId          (0x4DC7, 2);\r
+EbmlId KaxTagCommercial_TheId               (0x4EC7, 2);\r
+EbmlId KaxTagMultiCommercialType_TheId      (0x5BD7, 2);\r
+EbmlId KaxTagMultiCommercialAddress_TheId   (0x5BBB, 2);\r
+EbmlId KaxTagMultiCommercialURL_TheId       (0x5BDA, 2);\r
+EbmlId KaxTagMultiCommercialEmail_TheId     (0x5BC0, 2);\r
+\r
+EbmlId KaxTagMultiPrice_TheId               (0x5BC3, 2);\r
+EbmlId KaxTagMultiPriceCurrency_TheId       (0x5B6C, 2);\r
+EbmlId KaxTagMultiPriceAmount_TheId         (0x5B6E, 2);\r
+EbmlId KaxTagMultiPricePriceDate_TheId      (0x5B6F, 2);\r
+\r
+EbmlId KaxTagMultiDate_TheId                (0x4DC8, 2);\r
+EbmlId KaxTagDate_TheId                     (0x4EC8, 2);\r
+EbmlId KaxTagMultiDateType_TheId            (0x5BD8, 2);\r
+EbmlId KaxTagMultiDateDateBegin_TheId       (0x4460, 2);\r
+EbmlId KaxTagMultiDateDateEnd_TheId         (0x4462, 2);\r
+\r
+EbmlId KaxTagMultiEntity_TheId              (0x4DC9, 2);\r
+EbmlId KaxTagEntity_TheId                   (0x4EC9, 2);\r
+EbmlId KaxTagMultiEntityType_TheId          (0x5BD9, 2);\r
+EbmlId KaxTagMultiEntityName_TheId          (0x5BED, 2);\r
+EbmlId KaxTagMultiEntityAddress_TheId       (0x5BDC, 2);\r
+EbmlId KaxTagMultiEntityURL_TheId           (0x5BDB, 2);\r
+EbmlId KaxTagMultiEntityEmail_TheId         (0x5BC1, 2);\r
+\r
+EbmlId KaxTagMultiIdentifier_TheId          (0x4DC6, 2);\r
+EbmlId KaxTagIdentifier_TheId               (0x4EC6, 2);\r
+EbmlId KaxTagMultiIdentifierType_TheId      (0x5BAD, 2);\r
+EbmlId KaxTagMultiIdentifierBinary_TheId    (0x6B67, 2);\r
+EbmlId KaxTagMultiIdentifierString_TheId    (0x6B68, 2);\r
+\r
+EbmlId KaxTagMultiLegal_TheId               (0x4DC5, 2);\r
+EbmlId KaxTagLegal_TheId                    (0x4EC5, 2);\r
+EbmlId KaxTagMultiLegalType_TheId           (0x5BBD, 2);\r
+EbmlId KaxTagMultiLegalContent_TheId        (0x5BB2, 2);\r
+EbmlId KaxTagMultiLegalURL_TheId            (0x5B34, 2);\r
+EbmlId KaxTagMultiLegalAddress_TheId        (0x5B9B, 2);\r
+\r
+EbmlId KaxTagMultiTitle_TheId               (0x4DC4, 2);\r
+EbmlId KaxTagTitle_TheId                    (0x4EC4, 2);\r
+EbmlId KaxTagMultiTitleType_TheId           (0x5B7D, 2);\r
+EbmlId KaxTagMultiTitleName_TheId           (0x5BB9, 2);\r
+EbmlId KaxTagMultiTitleSubTitle_TheId       (0x5B5B, 2);\r
+EbmlId KaxTagMultiTitleEdition_TheId        (0x5BAE, 2);\r
+EbmlId KaxTagMultiTitleAddress_TheId        (0x5B33, 2);\r
+EbmlId KaxTagMultiTitleURL_TheId            (0x5BA9, 2);\r
+EbmlId KaxTagMultiTitleEmail_TheId          (0x5BC9, 2);\r
+EbmlId KaxTagMultiTitleLanguage_TheId       (0x22B59E, 3);\r
+\r
+EbmlId KaxTagMultiAttachment_TheId          (0x4DC3, 2);\r
+EbmlId KaxTagAttachment_TheId               (0x4EC3, 2);\r
+EbmlId KaxTagAttachmentID_TheId             (0x5BA0, 2);\r
+\r
+const EbmlCallbacks KaxTagMultiComment::ClassInfos(KaxTagMultiComment::Create, KaxTagMultiComment_TheId, "MultiComment", KaxTagMultiComment_Context);\r
+const EbmlCallbacks KaxTagMultiCommentName::ClassInfos(KaxTagMultiCommentName::Create, KaxTagMultiCommentName_TheId, "MultiCommentName", KaxTagMultiCommentName_Context);\r
+const EbmlCallbacks KaxTagMultiCommentComments::ClassInfos(KaxTagMultiCommentComments::Create, KaxTagMultiCommentComments_TheId, "MultiCommentComments", KaxTagMultiCommentComments_Context);\r
+const EbmlCallbacks KaxTagMultiCommentLanguage::ClassInfos(KaxTagMultiCommentLanguage::Create, KaxTagMultiCommentLanguage_TheId, "MultiCommentLanguage", KaxTagMultiCommentLanguage_Context);\r
+\r
+const EbmlCallbacks KaxTagMultiCommercial::ClassInfos(KaxTagMultiCommercial::Create, KaxTagMultiCommercial_TheId, "MultiCommercial", KaxTagMultiCommercial_Context);\r
+const EbmlCallbacks KaxTagCommercial::ClassInfos(KaxTagCommercial::Create, KaxTagCommercial_TheId, "Commercial", KaxTagCommercial_Context);\r
+const EbmlCallbacks KaxTagMultiCommercialType::ClassInfos(KaxTagMultiCommercialType::Create, KaxTagMultiCommercialType_TheId, "MultiCommercialType", KaxTagMultiCommercialType_Context);\r
+const EbmlCallbacks KaxTagMultiCommercialAddress::ClassInfos(KaxTagMultiCommercialAddress::Create, KaxTagMultiCommercialAddress_TheId, "MultiCommercialAddress", KaxTagMultiCommercialAddress_Context);\r
+const EbmlCallbacks KaxTagMultiCommercialURL::ClassInfos(KaxTagMultiCommercialURL::Create, KaxTagMultiCommercialURL_TheId, "MultiCommercialURL", KaxTagMultiCommercialURL_Context);\r
+const EbmlCallbacks KaxTagMultiCommercialEmail::ClassInfos(KaxTagMultiCommercialEmail::Create, KaxTagMultiCommercialEmail_TheId, "MultiCommercialEmail", KaxTagMultiCommercialEmail_Context);\r
+\r
+const EbmlCallbacks KaxTagMultiPrice::ClassInfos(KaxTagMultiPrice::Create, KaxTagMultiPrice_TheId, "MultiPrice", KaxTagMultiPrice_Context);\r
+const EbmlCallbacks KaxTagMultiPriceCurrency::ClassInfos(KaxTagMultiPriceCurrency::Create, KaxTagMultiPriceCurrency_TheId, "MultiPriceCurrency", KaxTagMultiPriceCurrency_Context);\r
+const EbmlCallbacks KaxTagMultiPriceAmount::ClassInfos(KaxTagMultiPriceAmount::Create, KaxTagMultiPriceAmount_TheId, "MultiPriceAmount", KaxTagMultiPriceAmount_Context);\r
+const EbmlCallbacks KaxTagMultiPricePriceDate::ClassInfos(KaxTagMultiPricePriceDate::Create, KaxTagMultiPricePriceDate_TheId, "MultiPricePriceDate", KaxTagMultiPricePriceDate_Context);\r
+\r
+const EbmlCallbacks KaxTagMultiDate::ClassInfos(KaxTagMultiDate::Create, KaxTagMultiDate_TheId, "MultiDate", KaxTagMultiDate_Context);\r
+const EbmlCallbacks KaxTagDate::ClassInfos(KaxTagDate::Create, KaxTagDate_TheId, "Date", KaxTagDate_Context);\r
+const EbmlCallbacks KaxTagMultiDateType::ClassInfos(KaxTagMultiDateType::Create, KaxTagMultiDateType_TheId, "MultiDateType", KaxTagMultiDateType_Context);\r
+const EbmlCallbacks KaxTagMultiDateDateBegin::ClassInfos(KaxTagMultiDateDateBegin::Create, KaxTagMultiDateDateBegin_TheId, "MultiDateDateBegin", KaxTagMultiDateDateBegin_Context);\r
+const EbmlCallbacks KaxTagMultiDateDateEnd::ClassInfos(KaxTagMultiDateDateEnd::Create, KaxTagMultiDateDateEnd_TheId, "MultiDateDateEnd", KaxTagMultiDateDateEnd_Context);\r
+\r
+const EbmlCallbacks KaxTagMultiEntity::ClassInfos(KaxTagMultiEntity::Create, KaxTagMultiEntity_TheId, "MultiEntity", KaxTagMultiEntity_Context);\r
+const EbmlCallbacks KaxTagEntity::ClassInfos(KaxTagEntity::Create, KaxTagEntity_TheId, "Entity", KaxTagEntity_Context);\r
+const EbmlCallbacks KaxTagMultiEntityType::ClassInfos(KaxTagMultiEntityType::Create, KaxTagMultiEntityType_TheId, "MultiEntityType", KaxTagMultiEntityType_Context);\r
+const EbmlCallbacks KaxTagMultiEntityName::ClassInfos(KaxTagMultiEntityName::Create, KaxTagMultiEntityName_TheId, "MultiEntityName", KaxTagMultiEntityName_Context);\r
+const EbmlCallbacks KaxTagMultiEntityURL::ClassInfos(KaxTagMultiEntityURL::Create, KaxTagMultiEntityURL_TheId, "MultiEntityURL", KaxTagMultiEntityURL_Context);\r
+const EbmlCallbacks KaxTagMultiEntityEmail::ClassInfos(KaxTagMultiEntityEmail::Create, KaxTagMultiEntityEmail_TheId, "MultiEntityEmail", KaxTagMultiEntityEmail_Context);\r
+const EbmlCallbacks KaxTagMultiEntityAddress::ClassInfos(KaxTagMultiEntityAddress::Create, KaxTagMultiEntityAddress_TheId, "MultiEntityAddress", KaxTagMultiEntityAddress_Context);\r
+\r
+const EbmlCallbacks KaxTagMultiIdentifier::ClassInfos(KaxTagMultiIdentifier::Create, KaxTagMultiIdentifier_TheId, "MultiIdentifier", KaxTagMultiIdentifier_Context);\r
+const EbmlCallbacks KaxTagIdentifier::ClassInfos(KaxTagIdentifier::Create, KaxTagIdentifier_TheId, "Identifier", KaxTagIdentifier_Context);\r
+const EbmlCallbacks KaxTagMultiIdentifierType::ClassInfos(KaxTagMultiIdentifierType::Create, KaxTagMultiIdentifierType_TheId, "TagMultiIdentifierType", KaxTagMultiIdentifierType_Context);\r
+const EbmlCallbacks KaxTagMultiIdentifierBinary::ClassInfos(KaxTagMultiIdentifierBinary::Create, KaxTagMultiIdentifierBinary_TheId, "MultiIdentifierBinary", KaxTagMultiIdentifierBinary_Context);\r
+const EbmlCallbacks KaxTagMultiIdentifierString::ClassInfos(KaxTagMultiIdentifierString::Create, KaxTagMultiIdentifierString_TheId, "MultiIdentifierString", KaxTagMultiIdentifierString_Context);\r
+\r
+const EbmlCallbacks KaxTagMultiLegal::ClassInfos(KaxTagMultiLegal::Create, KaxTagMultiLegal_TheId, "MultiLegal", KaxTagMultiLegal_Context);\r
+const EbmlCallbacks KaxTagLegal::ClassInfos(KaxTagLegal::Create, KaxTagLegal_TheId, "Legal", KaxTagLegal_Context);\r
+const EbmlCallbacks KaxTagMultiLegalType::ClassInfos(KaxTagMultiLegalType::Create, KaxTagMultiLegalType_TheId, "KaxTagMultiLegalType", KaxTagMultiLegalType_Context);\r
+const EbmlCallbacks KaxTagMultiLegalContent::ClassInfos(KaxTagMultiLegalContent::Create, KaxTagMultiLegalContent_TheId, "TagMultiLegalContent", KaxTagMultiLegalContent_Context);\r
+const EbmlCallbacks KaxTagMultiLegalURL::ClassInfos(KaxTagMultiLegalURL::Create, KaxTagMultiLegalURL_TheId, "KaxTagMultiLegalURL", KaxTagMultiLegalURL_Context);\r
+const EbmlCallbacks KaxTagMultiLegalAddress::ClassInfos(KaxTagMultiLegalAddress::Create, KaxTagMultiLegalAddress_TheId, "KaxTagMultiLegalAddress", KaxTagMultiLegalAddress_Context);\r
+\r
+const EbmlCallbacks KaxTagMultiTitle::ClassInfos(KaxTagMultiTitle::Create, KaxTagMultiTitle_TheId, "MultiEntity", KaxTagMultiTitle_Context);\r
+const EbmlCallbacks KaxTagTitle::ClassInfos(KaxTagTitle::Create, KaxTagTitle_TheId, "Entity", KaxTagTitle_Context);\r
+const EbmlCallbacks KaxTagMultiTitleType::ClassInfos(KaxTagMultiTitleType::Create, KaxTagMultiTitleType_TheId, "MultiTitleType", KaxTagMultiTitleType_Context);\r
+const EbmlCallbacks KaxTagMultiTitleName::ClassInfos(KaxTagMultiTitleName::Create, KaxTagMultiTitleName_TheId, "MultiTitleName", KaxTagMultiTitleName_Context);\r
+const EbmlCallbacks KaxTagMultiTitleSubTitle::ClassInfos(KaxTagMultiTitleSubTitle::Create, KaxTagMultiTitleSubTitle_TheId, "MultiTitleSubTitle", KaxTagMultiTitleSubTitle_Context);\r
+const EbmlCallbacks KaxTagMultiTitleEdition::ClassInfos(KaxTagMultiTitleEdition::Create, KaxTagMultiTitleEdition_TheId, "MultiTitleEdition", KaxTagMultiTitleEdition_Context);\r
+const EbmlCallbacks KaxTagMultiTitleAddress::ClassInfos(KaxTagMultiTitleAddress::Create, KaxTagMultiTitleAddress_TheId, "MultiTitleAddress", KaxTagMultiTitleAddress_Context);\r
+const EbmlCallbacks KaxTagMultiTitleURL::ClassInfos(KaxTagMultiTitleURL::Create, KaxTagMultiTitleURL_TheId, "MultiTitleURL", KaxTagMultiTitleURL_Context);\r
+const EbmlCallbacks KaxTagMultiTitleEmail::ClassInfos(KaxTagMultiTitleEmail::Create, KaxTagMultiTitleEmail_TheId, "MultiTitleEmail", KaxTagMultiTitleEmail_Context);\r
+const EbmlCallbacks KaxTagMultiTitleLanguage::ClassInfos(KaxTagMultiTitleLanguage::Create, KaxTagMultiTitleLanguage_TheId, "MultiTitleLanguage", KaxTagMultiTitleLanguage_Context);\r
+\r
+const EbmlCallbacks KaxTagMultiAttachment::ClassInfos(KaxTagMultiAttachment::Create, KaxTagMultiAttachment_TheId, "TagMultiAttachment", KaxTagMultiAttachment_Context);\r
+const EbmlCallbacks KaxTagAttachment::ClassInfos(KaxTagAttachment::Create, KaxTagAttachment_TheId, "TagAttachment", KaxTagAttachment_Context);\r
+const EbmlCallbacks KaxTagAttachmentID::ClassInfos(KaxTagAttachmentID::Create, KaxTagAttachmentID_TheId, "TagAttachmentID", KaxTagAttachmentID_Context);\r
+\r
+KaxTagMultiComment::KaxTagMultiComment()\r
+       :EbmlMaster(KaxTagMultiComment_Context)\r
+{}\r
+\r
+\r
+KaxTagMultiCommercial::KaxTagMultiCommercial()\r
+       :EbmlMaster(KaxTagMultiCommercial_Context)\r
+{}\r
+\r
+KaxTagCommercial::KaxTagCommercial()\r
+       :EbmlMaster(KaxTagCommercial_Context)\r
+{}\r
+\r
+KaxTagMultiPrice::KaxTagMultiPrice()\r
+       :EbmlMaster(KaxTagMultiPrice_Context)\r
+{}\r
+\r
+KaxTagMultiDate::KaxTagMultiDate()\r
+       :EbmlMaster(KaxTagMultiDate_Context)\r
+{}\r
+\r
+KaxTagDate::KaxTagDate()\r
+       :EbmlMaster(KaxTagDate_Context)\r
+{}\r
+\r
+KaxTagMultiEntity::KaxTagMultiEntity()\r
+       :EbmlMaster(KaxTagMultiEntity_Context)\r
+{}\r
+       \r
+KaxTagEntity::KaxTagEntity()\r
+       :EbmlMaster(KaxTagEntity_Context)\r
+{}\r
+       \r
+KaxTagMultiLegal::KaxTagMultiLegal()\r
+       :EbmlMaster(KaxTagMultiLegal_Context)\r
+{}\r
+\r
+KaxTagLegal::KaxTagLegal()\r
+       :EbmlMaster(KaxTagLegal_Context)\r
+{}\r
+\r
+KaxTagMultiIdentifier::KaxTagMultiIdentifier()\r
+       :EbmlMaster(KaxTagMultiIdentifier_Context)\r
+{}\r
+\r
+KaxTagIdentifier::KaxTagIdentifier()\r
+       :EbmlMaster(KaxTagIdentifier_Context)\r
+{}\r
+\r
+KaxTagMultiTitle::KaxTagMultiTitle()\r
+       :EbmlMaster(KaxTagMultiTitle_Context)\r
+{}\r
+\r
+KaxTagTitle::KaxTagTitle()\r
+       :EbmlMaster(KaxTagTitle_Context)\r
+{}\r
+\r
+KaxTagMultiAttachment::KaxTagMultiAttachment()\r
+       :EbmlMaster(KaxTagMultiAttachment_Context)\r
+{}\r
+\r
+KaxTagAttachment::KaxTagAttachment()\r
+       :EbmlMaster(KaxTagAttachment_Context)\r
+{}\r
+\r
+const EbmlSemanticContext & GetKaxTagsGlobal_Context()\r
+{\r
+       return KaxTagMultiGlobal_Context;\r
+}\r
+\r
+END_LIBMATROSKA_NAMESPACE\r
index 272f63dbc29d2c02770babd3ba1cb27ba22622ba..4beb39b9e6855cdca3bde39aab9831f944660b5e 100644 (file)
@@ -1,60 +1,60 @@
-/****************************************************************************
-** libmatroska : parse Matroska files, see http://www.matroska.org/
-**
-** <file/class description>
-**
-** Copyright (C) 2002-2004 Steve Lhomme.  All rights reserved.
-**
-** This file is part of libmatroska.
-**
-** This library is free software; you can redistribute it and/or
-** modify it under the terms of the GNU Lesser General Public
-** License as published by the Free Software Foundation; either
-** version 2.1 of the License, or (at your option) any later version.
-** 
-** This library is distributed in the hope that it will be useful,
-** but WITHOUT ANY WARRANTY; without even the implied warranty of
-** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-** Lesser General Public License for more details.
-** 
-** You should have received a copy of the GNU Lesser General Public
-** License along with this library; if not, write to the Free Software
-** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-**
-** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**
-** Contact license@matroska.org if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-/*!
-       \file
-       \version \$Id: KaxTags.cpp 711 2004-08-10 12:58:47Z robux4 $
-       \author Steve Lhomme     <robux4 @ users.sf.net>
-       \author Jory Stone       <jcsston @ toughguy.net>
-*/
-#include "matroska/KaxTags.h"
-#include "matroska/KaxTag.h"
-#include "matroska/KaxContexts.h"
-
-using namespace LIBEBML_NAMESPACE;
-
-// sub elements
-START_LIBMATROSKA_NAMESPACE
-
-EbmlSemantic KaxTags_ContextList[1] =
-{
-       EbmlSemantic(true, false, EBML_INFO(KaxTag)),
-};
-
-const EbmlSemanticContext KaxTags_Context = EbmlSemanticContext(countof(KaxTags_ContextList), KaxTags_ContextList, &KaxSegment_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTags));
-
-EbmlId KaxTags_TheId(0x1254C367, 4);
-
-const EbmlCallbacks KaxTags::ClassInfos(KaxTags::Create, KaxTags_TheId, "Tags", KaxTags_Context);
-
-KaxTags::KaxTags()
-       :EbmlMaster(KaxTags_Context)
-{}
-
-END_LIBMATROSKA_NAMESPACE
+/****************************************************************************\r
+** libmatroska : parse Matroska files, see http://www.matroska.org/\r
+**\r
+** <file/class description>\r
+**\r
+** Copyright (C) 2002-2010 Steve Lhomme.  All rights reserved.\r
+**\r
+** This file is part of libmatroska.\r
+**\r
+** This library is free software; you can redistribute it and/or\r
+** modify it under the terms of the GNU Lesser General Public\r
+** License as published by the Free Software Foundation; either\r
+** version 2.1 of the License, or (at your option) any later version.\r
+** \r
+** This library is distributed in the hope that it will be useful,\r
+** but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
+** Lesser General Public License for more details.\r
+** \r
+** You should have received a copy of the GNU Lesser General Public\r
+** License along with this library; if not, write to the Free Software\r
+** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\r
+**\r
+** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**\r
+** Contact license@matroska.org if any conditions of this licensing are\r
+** not clear to you.\r
+**\r
+**********************************************************************/\r
+\r
+/*!\r
+       \file\r
+       \version \$Id: KaxTags.cpp 711 2004-08-10 12:58:47Z robux4 $\r
+       \author Steve Lhomme     <robux4 @ users.sf.net>\r
+       \author Jory Stone       <jcsston @ toughguy.net>\r
+*/\r
+#include "matroska/KaxTags.h"\r
+#include "matroska/KaxTag.h"\r
+#include "matroska/KaxContexts.h"\r
+\r
+using namespace LIBEBML_NAMESPACE;\r
+\r
+// sub elements\r
+START_LIBMATROSKA_NAMESPACE\r
+\r
+EbmlSemantic KaxTags_ContextList[1] =\r
+{\r
+       EbmlSemantic(true, false, EBML_INFO(KaxTag)),\r
+};\r
+\r
+const EbmlSemanticContext KaxTags_Context = EbmlSemanticContext(countof(KaxTags_ContextList), KaxTags_ContextList, &KaxSegment_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTags));\r
+\r
+EbmlId KaxTags_TheId(0x1254C367, 4);\r
+\r
+const EbmlCallbacks KaxTags::ClassInfos(KaxTags::Create, KaxTags_TheId, "Tags", KaxTags_Context);\r
+\r
+KaxTags::KaxTags()\r
+       :EbmlMaster(KaxTags_Context)\r
+{}\r
+\r
+END_LIBMATROSKA_NAMESPACE\r
index 5671c359d823917d6823101a0e3a71a826d317e4..8cb7dd5eb89a84b2dbce38176a773cf4feb1b587 100644 (file)
@@ -1,88 +1,88 @@
-/****************************************************************************
-** libmatroska : parse Matroska files, see http://www.matroska.org/
-**
-** <file/class description>
-**
-** Copyright (C) 2002-2004 Steve Lhomme.  All rights reserved.
-**
-** This file is part of libmatroska.
-**
-** This library is free software; you can redistribute it and/or
-** modify it under the terms of the GNU Lesser General Public
-** License as published by the Free Software Foundation; either
-** version 2.1 of the License, or (at your option) any later version.
-** 
-** This library is distributed in the hope that it will be useful,
-** but WITHOUT ANY WARRANTY; without even the implied warranty of
-** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-** Lesser General Public License for more details.
-** 
-** You should have received a copy of the GNU Lesser General Public
-** License along with this library; if not, write to the Free Software
-** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-**
-** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**
-** Contact license@matroska.org if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-/*!
-       \file
-       \version \$Id: KaxTrackAudio.cpp 640 2004-07-09 21:05:36Z mosu $
-       \author Steve Lhomme     <robux4 @ users.sf.net>
-*/
-#include "matroska/KaxTrackAudio.h"
-
-// sub elements
-#include "matroska/KaxContexts.h"
-
-START_LIBMATROSKA_NAMESPACE
-
-#if MATROSKA_VERSION == 1
-const EbmlSemantic KaxTrackAudio_ContextList[4] =
-#else // MATROSKA_VERSION
-const EbmlSemantic KaxTrackAudio_ContextList[5] =
-#endif // MATROSKA_VERSION
-{
-       EbmlSemantic(true , true, EBML_INFO(KaxAudioSamplingFreq)),
-       EbmlSemantic(true , true, EBML_INFO(KaxAudioChannels)),
-       EbmlSemantic(false, true, EBML_INFO(KaxAudioBitDepth)),
-       EbmlSemantic(false, true, EBML_INFO(KaxAudioOutputSamplingFreq)),
-#if MATROSKA_VERSION >= 2
-       EbmlSemantic(false, true, EBML_INFO(KaxAudioPosition)),
-#endif // MATROSKA_VERSION
-};
-
-const EbmlSemanticContext KaxTrackAudio_Context = EbmlSemanticContext(countof(KaxTrackAudio_ContextList), KaxTrackAudio_ContextList, &KaxTrackEntry_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTrackAudio));
-const EbmlSemanticContext KaxAudioSamplingFreq_Context = EbmlSemanticContext(0, NULL, &KaxTrackAudio_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxAudioSamplingFreq));
-const EbmlSemanticContext KaxAudioOutputSamplingFreq_Context = EbmlSemanticContext(0, NULL, &KaxTrackAudio_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxAudioOutputSamplingFreq));
-const EbmlSemanticContext KaxAudioChannels_Context = EbmlSemanticContext(0, NULL, &KaxTrackAudio_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxAudioChannels));
-const EbmlSemanticContext KaxAudioBitDepth_Context = EbmlSemanticContext(0, NULL, &KaxTrackAudio_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxAudioBitDepth));
-#if MATROSKA_VERSION >= 2
-const EbmlSemanticContext KaxAudioPosition_Context = EbmlSemanticContext(0, NULL, &KaxTrackAudio_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxAudioPosition));
-#endif // MATROSKA_VERSION
-
-EbmlId KaxTrackAudio_TheId       (0xE1, 1);
-EbmlId KaxAudioSamplingFreq_TheId(0xB5, 1);
-EbmlId KaxAudioOutputSamplingFreq_TheId(0x78B5, 2);
-EbmlId KaxAudioChannels_TheId    (0x9F, 1);
-EbmlId KaxAudioBitDepth_TheId    (0x6264, 2);
-#if MATROSKA_VERSION >= 2
-EbmlId KaxAudioPosition_TheId    (0x7D7B, 2);
-#endif // MATROSKA_VERSION
-
-const EbmlCallbacks KaxTrackAudio::ClassInfos(KaxTrackAudio::Create, KaxTrackAudio_TheId, "TrackAudio", KaxTrackAudio_Context);
-const EbmlCallbacks KaxAudioSamplingFreq::ClassInfos(KaxAudioSamplingFreq::Create, KaxAudioSamplingFreq_TheId, "AudioSamplingFreq", KaxAudioSamplingFreq_Context);
-const EbmlCallbacks KaxAudioOutputSamplingFreq::ClassInfos(KaxAudioOutputSamplingFreq::Create, KaxAudioOutputSamplingFreq_TheId, "AudioOutputSamplingFreq", KaxAudioOutputSamplingFreq_Context);
-const EbmlCallbacks KaxAudioChannels::ClassInfos(KaxAudioChannels::Create, KaxAudioChannels_TheId, "AudioChannels", KaxAudioChannels_Context);
-const EbmlCallbacks KaxAudioBitDepth::ClassInfos(KaxAudioBitDepth::Create, KaxAudioBitDepth_TheId, "AudioBitDepth", KaxAudioBitDepth_Context);
-#if MATROSKA_VERSION >= 2
-const EbmlCallbacks KaxAudioPosition::ClassInfos(KaxAudioPosition::Create, KaxAudioPosition_TheId, "AudioPosition", KaxAudioPosition_Context);
-#endif // MATROSKA_VERSION
-
-KaxTrackAudio::KaxTrackAudio()
-       :EbmlMaster(KaxTrackAudio_Context)
-{}
-
-END_LIBMATROSKA_NAMESPACE
+/****************************************************************************\r
+** libmatroska : parse Matroska files, see http://www.matroska.org/\r
+**\r
+** <file/class description>\r
+**\r
+** Copyright (C) 2002-2010 Steve Lhomme.  All rights reserved.\r
+**\r
+** This file is part of libmatroska.\r
+**\r
+** This library is free software; you can redistribute it and/or\r
+** modify it under the terms of the GNU Lesser General Public\r
+** License as published by the Free Software Foundation; either\r
+** version 2.1 of the License, or (at your option) any later version.\r
+** \r
+** This library is distributed in the hope that it will be useful,\r
+** but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
+** Lesser General Public License for more details.\r
+** \r
+** You should have received a copy of the GNU Lesser General Public\r
+** License along with this library; if not, write to the Free Software\r
+** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\r
+**\r
+** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**\r
+** Contact license@matroska.org if any conditions of this licensing are\r
+** not clear to you.\r
+**\r
+**********************************************************************/\r
+\r
+/*!\r
+       \file\r
+       \version \$Id: KaxTrackAudio.cpp 640 2004-07-09 21:05:36Z mosu $\r
+       \author Steve Lhomme     <robux4 @ users.sf.net>\r
+*/\r
+#include "matroska/KaxTrackAudio.h"\r
+\r
+// sub elements\r
+#include "matroska/KaxContexts.h"\r
+\r
+START_LIBMATROSKA_NAMESPACE\r
+\r
+#if MATROSKA_VERSION == 1\r
+const EbmlSemantic KaxTrackAudio_ContextList[4] =\r
+#else // MATROSKA_VERSION\r
+const EbmlSemantic KaxTrackAudio_ContextList[5] =\r
+#endif // MATROSKA_VERSION\r
+{\r
+       EbmlSemantic(true , true, EBML_INFO(KaxAudioSamplingFreq)),\r
+       EbmlSemantic(true , true, EBML_INFO(KaxAudioChannels)),\r
+       EbmlSemantic(false, true, EBML_INFO(KaxAudioBitDepth)),\r
+       EbmlSemantic(false, true, EBML_INFO(KaxAudioOutputSamplingFreq)),\r
+#if MATROSKA_VERSION >= 2\r
+       EbmlSemantic(false, true, EBML_INFO(KaxAudioPosition)),\r
+#endif // MATROSKA_VERSION\r
+};\r
+\r
+const EbmlSemanticContext KaxTrackAudio_Context = EbmlSemanticContext(countof(KaxTrackAudio_ContextList), KaxTrackAudio_ContextList, &KaxTrackEntry_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTrackAudio));\r
+const EbmlSemanticContext KaxAudioSamplingFreq_Context = EbmlSemanticContext(0, NULL, &KaxTrackAudio_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxAudioSamplingFreq));\r
+const EbmlSemanticContext KaxAudioOutputSamplingFreq_Context = EbmlSemanticContext(0, NULL, &KaxTrackAudio_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxAudioOutputSamplingFreq));\r
+const EbmlSemanticContext KaxAudioChannels_Context = EbmlSemanticContext(0, NULL, &KaxTrackAudio_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxAudioChannels));\r
+const EbmlSemanticContext KaxAudioBitDepth_Context = EbmlSemanticContext(0, NULL, &KaxTrackAudio_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxAudioBitDepth));\r
+#if MATROSKA_VERSION >= 2\r
+const EbmlSemanticContext KaxAudioPosition_Context = EbmlSemanticContext(0, NULL, &KaxTrackAudio_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxAudioPosition));\r
+#endif // MATROSKA_VERSION\r
+\r
+EbmlId KaxTrackAudio_TheId       (0xE1, 1);\r
+EbmlId KaxAudioSamplingFreq_TheId(0xB5, 1);\r
+EbmlId KaxAudioOutputSamplingFreq_TheId(0x78B5, 2);\r
+EbmlId KaxAudioChannels_TheId    (0x9F, 1);\r
+EbmlId KaxAudioBitDepth_TheId    (0x6264, 2);\r
+#if MATROSKA_VERSION >= 2\r
+EbmlId KaxAudioPosition_TheId    (0x7D7B, 2);\r
+#endif // MATROSKA_VERSION\r
+\r
+const EbmlCallbacks KaxTrackAudio::ClassInfos(KaxTrackAudio::Create, KaxTrackAudio_TheId, "TrackAudio", KaxTrackAudio_Context);\r
+const EbmlCallbacks KaxAudioSamplingFreq::ClassInfos(KaxAudioSamplingFreq::Create, KaxAudioSamplingFreq_TheId, "AudioSamplingFreq", KaxAudioSamplingFreq_Context);\r
+const EbmlCallbacks KaxAudioOutputSamplingFreq::ClassInfos(KaxAudioOutputSamplingFreq::Create, KaxAudioOutputSamplingFreq_TheId, "AudioOutputSamplingFreq", KaxAudioOutputSamplingFreq_Context);\r
+const EbmlCallbacks KaxAudioChannels::ClassInfos(KaxAudioChannels::Create, KaxAudioChannels_TheId, "AudioChannels", KaxAudioChannels_Context);\r
+const EbmlCallbacks KaxAudioBitDepth::ClassInfos(KaxAudioBitDepth::Create, KaxAudioBitDepth_TheId, "AudioBitDepth", KaxAudioBitDepth_Context);\r
+#if MATROSKA_VERSION >= 2\r
+const EbmlCallbacks KaxAudioPosition::ClassInfos(KaxAudioPosition::Create, KaxAudioPosition_TheId, "AudioPosition", KaxAudioPosition_Context);\r
+#endif // MATROSKA_VERSION\r
+\r
+KaxTrackAudio::KaxTrackAudio()\r
+       :EbmlMaster(KaxTrackAudio_Context)\r
+{}\r
+\r
+END_LIBMATROSKA_NAMESPACE\r
index 7f8fce967f9c5f3b4700e81d3cbe16051057a679..6bccf8b94f8ff7431f6284524927d6805efa1d6a 100644 (file)
-/****************************************************************************
-** libmatroska : parse Matroska files, see http://www.matroska.org/
-**
-** <file/class description>
-**
-** Copyright (C) 2002-2005 Steve Lhomme.  All rights reserved.
-**
-** This file is part of libmatroska.
-**
-** This library is free software; you can redistribute it and/or
-** modify it under the terms of the GNU Lesser General Public
-** License as published by the Free Software Foundation; either
-** version 2.1 of the License, or (at your option) any later version.
-** 
-** This library is distributed in the hope that it will be useful,
-** but WITHOUT ANY WARRANTY; without even the implied warranty of
-** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-** Lesser General Public License for more details.
-** 
-** You should have received a copy of the GNU Lesser General Public
-** License along with this library; if not, write to the Free Software
-** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-**
-** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**
-** Contact license@matroska.org if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-/*!
-       \file
-       \version \$Id: KaxTrackEntryData.cpp 1201 2005-08-30 14:28:27Z robux4 $
-       \author Steve Lhomme     <robux4 @ users.sf.net>
-       \author John Cannon      <spyder2555 @ users.sf.net>
-*/
-#include "matroska/KaxTrackEntryData.h"
-#include "matroska/KaxContexts.h"
-
-START_LIBMATROSKA_NAMESPACE
-
-const EbmlSemantic KaxTrackTranslate_ContextList[3] =
-{
-       EbmlSemantic(false, false,EBML_INFO(KaxTrackTranslateEditionUID)),
-       EbmlSemantic(true , true, EBML_INFO(KaxTrackTranslateCodec)),
-       EbmlSemantic(true , true, EBML_INFO(KaxTrackTranslateTrackID)),
-};
-
-EbmlId KaxTrackNumber_TheId            (0xD7, 1);
-EbmlId KaxTrackUID_TheId               (0x73C5, 2);
-EbmlId KaxTrackType_TheId              (0x83, 1);
-EbmlId KaxTrackFlagDefault_TheId       (0x88, 1);
-EbmlId KaxTrackFlagForced_TheId        (0x55AA, 2);
-EbmlId KaxTrackFlagLacing_TheId        (0x9C, 1);
-EbmlId KaxTrackMinCache_TheId          (0x6DE7, 2);
-EbmlId KaxTrackMaxCache_TheId          (0x6DF8, 2);
-EbmlId KaxTrackDefaultDuration_TheId   (0x23E383, 3);
-EbmlId KaxTrackTimecodeScale_TheId     (0x23314F, 3);
-EbmlId KaxMaxBlockAdditionID_TheId     (0x55EE, 2);
-EbmlId KaxTrackName_TheId              (0x536E, 2);
-EbmlId KaxTrackLanguage_TheId          (0x22B59C, 3);
-EbmlId KaxCodecID_TheId                (0x86, 1);
-EbmlId KaxCodecPrivate_TheId           (0x63A2, 2);
-EbmlId KaxCodecName_TheId              (0x258688, 3);
-EbmlId KaxTrackAttachmentLink_TheId    (0x7446, 2);
-EbmlId KaxTrackOverlay_TheId           (0x6FAB, 2);
-EbmlId KaxTrackTranslate_TheId         (0x6624, 2);
-EbmlId KaxTrackTranslateEditionUID_TheId(0x66FC, 2);
-EbmlId KaxTrackTranslateCodec_TheId    (0x66BF, 2);
-EbmlId KaxTrackTranslateTrackID_TheId  (0x66A5, 2);
-#if MATROSKA_VERSION >= 2
-EbmlId KaxTrackFlagEnabled_TheId       (0xB9, 1);
-EbmlId KaxCodecSettings_TheId          (0x3A9697, 3);
-EbmlId KaxCodecInfoURL_TheId           (0x3B4040, 3);
-EbmlId KaxCodecDownloadURL_TheId       (0x26B240, 3);
-EbmlId KaxCodecDecodeAll_TheId         (0xAA, 1);
-#endif // MATROSKA_VERSION
-
-const EbmlSemanticContext KaxTrackNumber_Context = EbmlSemanticContext(0, NULL, &KaxTracks_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTrackNumber));
-const EbmlSemanticContext KaxTrackUID_Context = EbmlSemanticContext(0, NULL, &KaxTracks_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTrackUID));
-const EbmlSemanticContext KaxTrackType_Context = EbmlSemanticContext(0, NULL, &KaxTracks_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTrackType));
-const EbmlSemanticContext KaxTrackFlagDefault_Context = EbmlSemanticContext(0, NULL, &KaxTracks_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTrackFlagDefault));
-const EbmlSemanticContext KaxTrackFlagForced_Context = EbmlSemanticContext(0, NULL, &KaxTracks_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTrackFlagForced));
-const EbmlSemanticContext KaxTrackFlagLacing_Context = EbmlSemanticContext(0, NULL, &KaxTracks_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTrackFlagLacing));
-const EbmlSemanticContext KaxTrackMinCache_Context = EbmlSemanticContext(0, NULL, &KaxTracks_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTrackMinCache));
-const EbmlSemanticContext KaxTrackMaxCache_Context = EbmlSemanticContext(0, NULL, &KaxTracks_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTrackMaxCache));
-const EbmlSemanticContext KaxTrackDefaultDuration_Context = EbmlSemanticContext(0, NULL, &KaxTracks_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTrackDefaultDuration));
-const EbmlSemanticContext KaxTrackTimecodeScale_Context = EbmlSemanticContext(0, NULL, &KaxTracks_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTrackTimecodeScale));
-const EbmlSemanticContext KaxMaxBlockAdditionID_Context = EbmlSemanticContext(0, NULL, &KaxTracks_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxMaxBlockAdditionID));
-const EbmlSemanticContext KaxTrackName_Context = EbmlSemanticContext(0, NULL, &KaxTracks_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTrackName));
-const EbmlSemanticContext KaxTrackLanguage_Context = EbmlSemanticContext(0, NULL, &KaxTracks_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTrackLanguage));
-const EbmlSemanticContext KaxCodecID_Context = EbmlSemanticContext(0, NULL, &KaxTracks_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxCodecID));
-const EbmlSemanticContext KaxCodecPrivate_Context = EbmlSemanticContext(0, NULL, &KaxTracks_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxCodecPrivate));
-const EbmlSemanticContext KaxCodecName_Context = EbmlSemanticContext(0, NULL, &KaxTracks_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxCodecName));
-const EbmlSemanticContext KaxTrackAttachmentLink_Context = EbmlSemanticContext(0, NULL, &KaxTracks_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTrackAttachmentLink));
-const EbmlSemanticContext KaxTrackOverlay_Context = EbmlSemanticContext(0, NULL, &KaxTracks_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTrackOverlay));
-const EbmlSemanticContext KaxTrackTranslate_Context = EbmlSemanticContext(countof(KaxTrackTranslate_ContextList), KaxTrackTranslate_ContextList, &KaxTracks_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTrackTranslate));
-const EbmlSemanticContext KaxTrackTranslateEditionUID_Context = EbmlSemanticContext(0, NULL, &KaxTrackTranslate_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTrackTranslateEditionUID));
-const EbmlSemanticContext KaxTrackTranslateCodec_Context = EbmlSemanticContext(0, NULL, &KaxTrackTranslate_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTrackTranslateCodec));
-const EbmlSemanticContext KaxTrackTranslateTrackID_Context = EbmlSemanticContext(0, NULL, &KaxTrackTranslate_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTrackTranslateTrackID));
-#if MATROSKA_VERSION >= 2
-const EbmlSemanticContext KaxTrackFlagEnabled_Context = EbmlSemanticContext(0, NULL, &KaxTracks_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTrackFlagEnabled));
-const EbmlSemanticContext KaxCodecSettings_Context = EbmlSemanticContext(0, NULL, &KaxTracks_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxCodecSettings));
-const EbmlSemanticContext KaxCodecInfoURL_Context = EbmlSemanticContext(0, NULL, &KaxTracks_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxCodecInfoURL));
-const EbmlSemanticContext KaxCodecDownloadURL_Context = EbmlSemanticContext(0, NULL, &KaxTracks_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxCodecDownloadURL));
-const EbmlSemanticContext KaxCodecDecodeAll_Context = EbmlSemanticContext(0, NULL, &KaxTracks_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxCodecDecodeAll));
-#endif // MATROSKA_VERSION
-
-const EbmlCallbacks KaxTrackNumber::ClassInfos(KaxTrackNumber::Create, KaxTrackNumber_TheId, "TrackNumber", KaxTrackNumber_Context);
-const EbmlCallbacks KaxTrackUID::ClassInfos(KaxTrackUID::Create, KaxTrackUID_TheId, "TrackUID", KaxTrackUID_Context);
-const EbmlCallbacks KaxTrackType::ClassInfos(KaxTrackType::Create, KaxTrackType_TheId, "TrackType", KaxTrackType_Context);
-const EbmlCallbacks KaxTrackFlagDefault::ClassInfos(KaxTrackFlagDefault::Create, KaxTrackFlagDefault_TheId, "TrackFlagDefault", KaxTrackFlagDefault_Context);
-const EbmlCallbacks KaxTrackFlagForced::ClassInfos(KaxTrackFlagForced::Create, KaxTrackFlagForced_TheId, "TrackFlagForced", KaxTrackFlagForced_Context);
-const EbmlCallbacks KaxTrackFlagLacing::ClassInfos(KaxTrackFlagLacing::Create, KaxTrackFlagLacing_TheId, "TrackFlagLacing", KaxTrackFlagLacing_Context);
-const EbmlCallbacks KaxTrackMinCache::ClassInfos(KaxTrackMinCache::Create, KaxTrackMinCache_TheId, "TrackMinCache", KaxTrackMinCache_Context);
-const EbmlCallbacks KaxTrackMaxCache::ClassInfos(KaxTrackMaxCache::Create, KaxTrackMaxCache_TheId, "TrackMaxCache\0rotomodobopo", KaxTrackMaxCache_Context);
-const EbmlCallbacks KaxTrackDefaultDuration::ClassInfos(KaxTrackDefaultDuration::Create, KaxTrackDefaultDuration_TheId, "TrackDefaultDuration", KaxTrackDefaultDuration_Context);
-const EbmlCallbacks KaxTrackTimecodeScale::ClassInfos(KaxTrackTimecodeScale::Create, KaxTrackTimecodeScale_TheId, "TrackTimecodeScale", KaxTrackTimecodeScale_Context);
-const EbmlCallbacks KaxMaxBlockAdditionID::ClassInfos(KaxMaxBlockAdditionID::Create, KaxMaxBlockAdditionID_TheId, "MaxBlockAdditionID", KaxMaxBlockAdditionID_Context);
-const EbmlCallbacks KaxTrackName::ClassInfos(KaxTrackName::Create, KaxTrackName_TheId, "TrackName", KaxTrackName_Context);
-const EbmlCallbacks KaxTrackLanguage::ClassInfos(KaxTrackLanguage::Create, KaxTrackLanguage_TheId, "TrackLanguage", KaxTrackLanguage_Context);
-const EbmlCallbacks KaxCodecID::ClassInfos(KaxCodecID::Create, KaxCodecID_TheId, "CodecID", KaxCodecID_Context);
-const EbmlCallbacks KaxCodecPrivate::ClassInfos(KaxCodecPrivate::Create, KaxCodecPrivate_TheId, "CodecPrivate", KaxCodecPrivate_Context);
-const EbmlCallbacks KaxCodecName::ClassInfos(KaxCodecName::Create, KaxCodecName_TheId, "CodecName", KaxCodecName_Context);
-const EbmlCallbacks KaxTrackAttachmentLink::ClassInfos(KaxTrackAttachmentLink::Create, KaxTrackAttachmentLink_TheId, "TrackAttachmentLink", KaxTrackAttachmentLink_Context);
-const EbmlCallbacks KaxTrackOverlay::ClassInfos(KaxTrackOverlay::Create, KaxTrackOverlay_TheId, "TrackOverlay", KaxTrackOverlay_Context);
-const EbmlCallbacks KaxTrackTranslate::ClassInfos(KaxTrackTranslate::Create, KaxTrackTranslate_TheId, "TrackTranslate", KaxTrackTranslate_Context);
-const EbmlCallbacks KaxTrackTranslateEditionUID::ClassInfos(KaxTrackTranslateEditionUID::Create, KaxTrackTranslateEditionUID_TheId, "TrackTranslateEditionUID", KaxTrackTranslateEditionUID_Context);
-const EbmlCallbacks KaxTrackTranslateCodec::ClassInfos(KaxTrackTranslateCodec::Create, KaxTrackTranslateCodec_TheId, "TrackTranslateCodec", KaxTrackTranslateCodec_Context);
-const EbmlCallbacks KaxTrackTranslateTrackID::ClassInfos(KaxTrackTranslateTrackID::Create, KaxTrackTranslateTrackID_TheId, "TrackTranslateTrackID", KaxTrackTranslateTrackID_Context);
-#if MATROSKA_VERSION >= 2
-const EbmlCallbacks KaxTrackFlagEnabled::ClassInfos(KaxTrackFlagEnabled::Create, KaxTrackFlagEnabled_TheId, "TrackFlagEnabled", KaxTrackFlagEnabled_Context);
-const EbmlCallbacks KaxCodecSettings::ClassInfos(KaxCodecSettings::Create, KaxCodecSettings_TheId, "CodecSettings", KaxCodecSettings_Context);
-const EbmlCallbacks KaxCodecInfoURL::ClassInfos(KaxCodecInfoURL::Create, KaxCodecInfoURL_TheId, "CodecInfoURL", KaxCodecInfoURL_Context);
-const EbmlCallbacks KaxCodecDownloadURL::ClassInfos(KaxCodecDownloadURL::Create, KaxCodecDownloadURL_TheId, "CodecDownloadURL", KaxCodecDownloadURL_Context);
-const EbmlCallbacks KaxCodecDecodeAll::ClassInfos(KaxCodecDecodeAll::Create, KaxCodecDecodeAll_TheId, "CodecDecodeAll", KaxCodecDecodeAll_Context);
-#endif // MATROSKA_VERSION
-
-KaxTrackTranslate::KaxTrackTranslate()
-       :EbmlMaster(KaxTrackTranslate_Context)
-{}
-
-END_LIBMATROSKA_NAMESPACE
+/****************************************************************************\r
+** libmatroska : parse Matroska files, see http://www.matroska.org/\r
+**\r
+** <file/class description>\r
+**\r
+** Copyright (C) 2002-2010 Steve Lhomme.  All rights reserved.\r
+**\r
+** This file is part of libmatroska.\r
+**\r
+** This library is free software; you can redistribute it and/or\r
+** modify it under the terms of the GNU Lesser General Public\r
+** License as published by the Free Software Foundation; either\r
+** version 2.1 of the License, or (at your option) any later version.\r
+** \r
+** This library is distributed in the hope that it will be useful,\r
+** but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
+** Lesser General Public License for more details.\r
+** \r
+** You should have received a copy of the GNU Lesser General Public\r
+** License along with this library; if not, write to the Free Software\r
+** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\r
+**\r
+** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**\r
+** Contact license@matroska.org if any conditions of this licensing are\r
+** not clear to you.\r
+**\r
+**********************************************************************/\r
+\r
+/*!\r
+       \file\r
+       \version \$Id: KaxTrackEntryData.cpp 1201 2005-08-30 14:28:27Z robux4 $\r
+       \author Steve Lhomme     <robux4 @ users.sf.net>\r
+       \author John Cannon      <spyder2555 @ users.sf.net>\r
+*/\r
+#include "matroska/KaxTrackEntryData.h"\r
+#include "matroska/KaxContexts.h"\r
+\r
+START_LIBMATROSKA_NAMESPACE\r
+\r
+const EbmlSemantic KaxTrackTranslate_ContextList[3] =\r
+{\r
+       EbmlSemantic(false, false,EBML_INFO(KaxTrackTranslateEditionUID)),\r
+       EbmlSemantic(true , true, EBML_INFO(KaxTrackTranslateCodec)),\r
+       EbmlSemantic(true , true, EBML_INFO(KaxTrackTranslateTrackID)),\r
+};\r
+\r
+EbmlId KaxTrackNumber_TheId            (0xD7, 1);\r
+EbmlId KaxTrackUID_TheId               (0x73C5, 2);\r
+EbmlId KaxTrackType_TheId              (0x83, 1);\r
+EbmlId KaxTrackFlagDefault_TheId       (0x88, 1);\r
+EbmlId KaxTrackFlagForced_TheId        (0x55AA, 2);\r
+EbmlId KaxTrackFlagLacing_TheId        (0x9C, 1);\r
+EbmlId KaxTrackMinCache_TheId          (0x6DE7, 2);\r
+EbmlId KaxTrackMaxCache_TheId          (0x6DF8, 2);\r
+EbmlId KaxTrackDefaultDuration_TheId   (0x23E383, 3);\r
+EbmlId KaxTrackTimecodeScale_TheId     (0x23314F, 3);\r
+EbmlId KaxMaxBlockAdditionID_TheId     (0x55EE, 2);\r
+EbmlId KaxTrackName_TheId              (0x536E, 2);\r
+EbmlId KaxTrackLanguage_TheId          (0x22B59C, 3);\r
+EbmlId KaxCodecID_TheId                (0x86, 1);\r
+EbmlId KaxCodecPrivate_TheId           (0x63A2, 2);\r
+EbmlId KaxCodecName_TheId              (0x258688, 3);\r
+EbmlId KaxTrackAttachmentLink_TheId    (0x7446, 2);\r
+EbmlId KaxTrackOverlay_TheId           (0x6FAB, 2);\r
+EbmlId KaxTrackTranslate_TheId         (0x6624, 2);\r
+EbmlId KaxTrackTranslateEditionUID_TheId(0x66FC, 2);\r
+EbmlId KaxTrackTranslateCodec_TheId    (0x66BF, 2);\r
+EbmlId KaxTrackTranslateTrackID_TheId  (0x66A5, 2);\r
+#if MATROSKA_VERSION >= 2\r
+EbmlId KaxTrackFlagEnabled_TheId       (0xB9, 1);\r
+EbmlId KaxCodecSettings_TheId          (0x3A9697, 3);\r
+EbmlId KaxCodecInfoURL_TheId           (0x3B4040, 3);\r
+EbmlId KaxCodecDownloadURL_TheId       (0x26B240, 3);\r
+EbmlId KaxCodecDecodeAll_TheId         (0xAA, 1);\r
+#endif // MATROSKA_VERSION\r
+\r
+const EbmlSemanticContext KaxTrackNumber_Context = EbmlSemanticContext(0, NULL, &KaxTracks_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTrackNumber));\r
+const EbmlSemanticContext KaxTrackUID_Context = EbmlSemanticContext(0, NULL, &KaxTracks_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTrackUID));\r
+const EbmlSemanticContext KaxTrackType_Context = EbmlSemanticContext(0, NULL, &KaxTracks_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTrackType));\r
+const EbmlSemanticContext KaxTrackFlagDefault_Context = EbmlSemanticContext(0, NULL, &KaxTracks_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTrackFlagDefault));\r
+const EbmlSemanticContext KaxTrackFlagForced_Context = EbmlSemanticContext(0, NULL, &KaxTracks_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTrackFlagForced));\r
+const EbmlSemanticContext KaxTrackFlagLacing_Context = EbmlSemanticContext(0, NULL, &KaxTracks_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTrackFlagLacing));\r
+const EbmlSemanticContext KaxTrackMinCache_Context = EbmlSemanticContext(0, NULL, &KaxTracks_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTrackMinCache));\r
+const EbmlSemanticContext KaxTrackMaxCache_Context = EbmlSemanticContext(0, NULL, &KaxTracks_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTrackMaxCache));\r
+const EbmlSemanticContext KaxTrackDefaultDuration_Context = EbmlSemanticContext(0, NULL, &KaxTracks_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTrackDefaultDuration));\r
+const EbmlSemanticContext KaxTrackTimecodeScale_Context = EbmlSemanticContext(0, NULL, &KaxTracks_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTrackTimecodeScale));\r
+const EbmlSemanticContext KaxMaxBlockAdditionID_Context = EbmlSemanticContext(0, NULL, &KaxTracks_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxMaxBlockAdditionID));\r
+const EbmlSemanticContext KaxTrackName_Context = EbmlSemanticContext(0, NULL, &KaxTracks_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTrackName));\r
+const EbmlSemanticContext KaxTrackLanguage_Context = EbmlSemanticContext(0, NULL, &KaxTracks_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTrackLanguage));\r
+const EbmlSemanticContext KaxCodecID_Context = EbmlSemanticContext(0, NULL, &KaxTracks_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxCodecID));\r
+const EbmlSemanticContext KaxCodecPrivate_Context = EbmlSemanticContext(0, NULL, &KaxTracks_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxCodecPrivate));\r
+const EbmlSemanticContext KaxCodecName_Context = EbmlSemanticContext(0, NULL, &KaxTracks_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxCodecName));\r
+const EbmlSemanticContext KaxTrackAttachmentLink_Context = EbmlSemanticContext(0, NULL, &KaxTracks_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTrackAttachmentLink));\r
+const EbmlSemanticContext KaxTrackOverlay_Context = EbmlSemanticContext(0, NULL, &KaxTracks_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTrackOverlay));\r
+const EbmlSemanticContext KaxTrackTranslate_Context = EbmlSemanticContext(countof(KaxTrackTranslate_ContextList), KaxTrackTranslate_ContextList, &KaxTracks_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTrackTranslate));\r
+const EbmlSemanticContext KaxTrackTranslateEditionUID_Context = EbmlSemanticContext(0, NULL, &KaxTrackTranslate_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTrackTranslateEditionUID));\r
+const EbmlSemanticContext KaxTrackTranslateCodec_Context = EbmlSemanticContext(0, NULL, &KaxTrackTranslate_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTrackTranslateCodec));\r
+const EbmlSemanticContext KaxTrackTranslateTrackID_Context = EbmlSemanticContext(0, NULL, &KaxTrackTranslate_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTrackTranslateTrackID));\r
+#if MATROSKA_VERSION >= 2\r
+const EbmlSemanticContext KaxTrackFlagEnabled_Context = EbmlSemanticContext(0, NULL, &KaxTracks_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTrackFlagEnabled));\r
+const EbmlSemanticContext KaxCodecSettings_Context = EbmlSemanticContext(0, NULL, &KaxTracks_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxCodecSettings));\r
+const EbmlSemanticContext KaxCodecInfoURL_Context = EbmlSemanticContext(0, NULL, &KaxTracks_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxCodecInfoURL));\r
+const EbmlSemanticContext KaxCodecDownloadURL_Context = EbmlSemanticContext(0, NULL, &KaxTracks_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxCodecDownloadURL));\r
+const EbmlSemanticContext KaxCodecDecodeAll_Context = EbmlSemanticContext(0, NULL, &KaxTracks_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxCodecDecodeAll));\r
+#endif // MATROSKA_VERSION\r
+\r
+const EbmlCallbacks KaxTrackNumber::ClassInfos(KaxTrackNumber::Create, KaxTrackNumber_TheId, "TrackNumber", KaxTrackNumber_Context);\r
+const EbmlCallbacks KaxTrackUID::ClassInfos(KaxTrackUID::Create, KaxTrackUID_TheId, "TrackUID", KaxTrackUID_Context);\r
+const EbmlCallbacks KaxTrackType::ClassInfos(KaxTrackType::Create, KaxTrackType_TheId, "TrackType", KaxTrackType_Context);\r
+const EbmlCallbacks KaxTrackFlagDefault::ClassInfos(KaxTrackFlagDefault::Create, KaxTrackFlagDefault_TheId, "TrackFlagDefault", KaxTrackFlagDefault_Context);\r
+const EbmlCallbacks KaxTrackFlagForced::ClassInfos(KaxTrackFlagForced::Create, KaxTrackFlagForced_TheId, "TrackFlagForced", KaxTrackFlagForced_Context);\r
+const EbmlCallbacks KaxTrackFlagLacing::ClassInfos(KaxTrackFlagLacing::Create, KaxTrackFlagLacing_TheId, "TrackFlagLacing", KaxTrackFlagLacing_Context);\r
+const EbmlCallbacks KaxTrackMinCache::ClassInfos(KaxTrackMinCache::Create, KaxTrackMinCache_TheId, "TrackMinCache", KaxTrackMinCache_Context);\r
+const EbmlCallbacks KaxTrackMaxCache::ClassInfos(KaxTrackMaxCache::Create, KaxTrackMaxCache_TheId, "TrackMaxCache\0rotomodobopo", KaxTrackMaxCache_Context);\r
+const EbmlCallbacks KaxTrackDefaultDuration::ClassInfos(KaxTrackDefaultDuration::Create, KaxTrackDefaultDuration_TheId, "TrackDefaultDuration", KaxTrackDefaultDuration_Context);\r
+const EbmlCallbacks KaxTrackTimecodeScale::ClassInfos(KaxTrackTimecodeScale::Create, KaxTrackTimecodeScale_TheId, "TrackTimecodeScale", KaxTrackTimecodeScale_Context);\r
+const EbmlCallbacks KaxMaxBlockAdditionID::ClassInfos(KaxMaxBlockAdditionID::Create, KaxMaxBlockAdditionID_TheId, "MaxBlockAdditionID", KaxMaxBlockAdditionID_Context);\r
+const EbmlCallbacks KaxTrackName::ClassInfos(KaxTrackName::Create, KaxTrackName_TheId, "TrackName", KaxTrackName_Context);\r
+const EbmlCallbacks KaxTrackLanguage::ClassInfos(KaxTrackLanguage::Create, KaxTrackLanguage_TheId, "TrackLanguage", KaxTrackLanguage_Context);\r
+const EbmlCallbacks KaxCodecID::ClassInfos(KaxCodecID::Create, KaxCodecID_TheId, "CodecID", KaxCodecID_Context);\r
+const EbmlCallbacks KaxCodecPrivate::ClassInfos(KaxCodecPrivate::Create, KaxCodecPrivate_TheId, "CodecPrivate", KaxCodecPrivate_Context);\r
+const EbmlCallbacks KaxCodecName::ClassInfos(KaxCodecName::Create, KaxCodecName_TheId, "CodecName", KaxCodecName_Context);\r
+const EbmlCallbacks KaxTrackAttachmentLink::ClassInfos(KaxTrackAttachmentLink::Create, KaxTrackAttachmentLink_TheId, "TrackAttachmentLink", KaxTrackAttachmentLink_Context);\r
+const EbmlCallbacks KaxTrackOverlay::ClassInfos(KaxTrackOverlay::Create, KaxTrackOverlay_TheId, "TrackOverlay", KaxTrackOverlay_Context);\r
+const EbmlCallbacks KaxTrackTranslate::ClassInfos(KaxTrackTranslate::Create, KaxTrackTranslate_TheId, "TrackTranslate", KaxTrackTranslate_Context);\r
+const EbmlCallbacks KaxTrackTranslateEditionUID::ClassInfos(KaxTrackTranslateEditionUID::Create, KaxTrackTranslateEditionUID_TheId, "TrackTranslateEditionUID", KaxTrackTranslateEditionUID_Context);\r
+const EbmlCallbacks KaxTrackTranslateCodec::ClassInfos(KaxTrackTranslateCodec::Create, KaxTrackTranslateCodec_TheId, "TrackTranslateCodec", KaxTrackTranslateCodec_Context);\r
+const EbmlCallbacks KaxTrackTranslateTrackID::ClassInfos(KaxTrackTranslateTrackID::Create, KaxTrackTranslateTrackID_TheId, "TrackTranslateTrackID", KaxTrackTranslateTrackID_Context);\r
+#if MATROSKA_VERSION >= 2\r
+const EbmlCallbacks KaxTrackFlagEnabled::ClassInfos(KaxTrackFlagEnabled::Create, KaxTrackFlagEnabled_TheId, "TrackFlagEnabled", KaxTrackFlagEnabled_Context);\r
+const EbmlCallbacks KaxCodecSettings::ClassInfos(KaxCodecSettings::Create, KaxCodecSettings_TheId, "CodecSettings", KaxCodecSettings_Context);\r
+const EbmlCallbacks KaxCodecInfoURL::ClassInfos(KaxCodecInfoURL::Create, KaxCodecInfoURL_TheId, "CodecInfoURL", KaxCodecInfoURL_Context);\r
+const EbmlCallbacks KaxCodecDownloadURL::ClassInfos(KaxCodecDownloadURL::Create, KaxCodecDownloadURL_TheId, "CodecDownloadURL", KaxCodecDownloadURL_Context);\r
+const EbmlCallbacks KaxCodecDecodeAll::ClassInfos(KaxCodecDecodeAll::Create, KaxCodecDecodeAll_TheId, "CodecDecodeAll", KaxCodecDecodeAll_Context);\r
+#endif // MATROSKA_VERSION\r
+\r
+KaxTrackTranslate::KaxTrackTranslate()\r
+       :EbmlMaster(KaxTrackTranslate_Context)\r
+{}\r
+\r
+END_LIBMATROSKA_NAMESPACE\r
index c1fdd8fe44d5dd08c4e0bf475a464e537fc48102..89dd97758c2bdef6cc00e958e57f19c2be7a7a0c 100644 (file)
-/****************************************************************************
-** libmatroska : parse Matroska files, see http://www.matroska.org/
-**
-** <file/class description>
-**
-** Copyright (C) 2002-2004 Steve Lhomme.  All rights reserved.
-**
-** This file is part of libmatroska.
-**
-** This library is free software; you can redistribute it and/or
-** modify it under the terms of the GNU Lesser General Public
-** License as published by the Free Software Foundation; either
-** version 2.1 of the License, or (at your option) any later version.
-** 
-** This library is distributed in the hope that it will be useful,
-** but WITHOUT ANY WARRANTY; without even the implied warranty of
-** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-** Lesser General Public License for more details.
-** 
-** You should have received a copy of the GNU Lesser General Public
-** License along with this library; if not, write to the Free Software
-** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-**
-** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**
-** Contact license@matroska.org if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-/*!
-       \file
-       \version \$Id: KaxTrackVideo.cpp 738 2004-08-30 09:21:46Z robux4 $
-       \author Steve Lhomme     <robux4 @ users.sf.net>
-*/
-#include "matroska/KaxTrackVideo.h"
-
-// sub elements
-#include "matroska/KaxContexts.h"
-
-START_LIBMATROSKA_NAMESPACE
-
-#if MATROSKA_VERSION == 1
-const EbmlSemantic KaxTrackVideo_ContextList[10] =
-#else // MATROSKA_VERSION
-const EbmlSemantic KaxTrackVideo_ContextList[15] =
-#endif // MATROSKA_VERSION
-{
-       EbmlSemantic(true , true, EBML_INFO(KaxVideoPixelWidth)),
-       EbmlSemantic(true , true, EBML_INFO(KaxVideoPixelHeight)),
-       EbmlSemantic(false, true, EBML_INFO(KaxVideoPixelCropBottom)),
-       EbmlSemantic(false, true, EBML_INFO(KaxVideoPixelCropTop)),
-       EbmlSemantic(false, true, EBML_INFO(KaxVideoPixelCropLeft)),
-       EbmlSemantic(false, true, EBML_INFO(KaxVideoPixelCropRight)),
-       EbmlSemantic(false, true, EBML_INFO(KaxVideoDisplayWidth)),
-       EbmlSemantic(false, true, EBML_INFO(KaxVideoDisplayHeight)),
-       EbmlSemantic(false, true, EBML_INFO(KaxVideoColourSpace)),
-       EbmlSemantic(false, true, EBML_INFO(KaxVideoFrameRate)),
-#if MATROSKA_VERSION >= 2
-       EbmlSemantic(true , true, EBML_INFO(KaxVideoFlagInterlaced)),
-       EbmlSemantic(false, true, EBML_INFO(KaxVideoStereoMode)),
-       EbmlSemantic(false, true, EBML_INFO(KaxVideoDisplayUnit)),
-       EbmlSemantic(false, true, EBML_INFO(KaxVideoAspectRatio)),
-       EbmlSemantic(false, true, EBML_INFO(KaxVideoGamma)),
-#endif // MATROSKA_VERSION
-};
-
-const EbmlSemanticContext KaxTrackVideo_Context = EbmlSemanticContext(countof(KaxTrackVideo_ContextList), KaxTrackVideo_ContextList, &KaxTrackEntry_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTrackVideo));
-const EbmlSemanticContext KaxVideoPixelWidth_Context = EbmlSemanticContext(0, NULL, &KaxTrackVideo_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxVideoPixelWidth));
-const EbmlSemanticContext KaxVideoPixelHeight_Context = EbmlSemanticContext(0, NULL, &KaxTrackVideo_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxVideoPixelHeight));
-const EbmlSemanticContext KaxVideoPixelCropBottom_Context = EbmlSemanticContext(0, NULL, &KaxTrackVideo_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxVideoPixelCropBottom));
-const EbmlSemanticContext KaxVideoPixelCropTop_Context = EbmlSemanticContext(0, NULL, &KaxTrackVideo_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxVideoPixelCropTop));
-const EbmlSemanticContext KaxVideoPixelCropRight_Context = EbmlSemanticContext(0, NULL, &KaxTrackVideo_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxVideoPixelCropLeft));
-const EbmlSemanticContext KaxVideoPixelCropLeft_Context = EbmlSemanticContext(0, NULL, &KaxTrackVideo_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxVideoPixelCropRight));
-const EbmlSemanticContext KaxVideoDisplayWidth_Context = EbmlSemanticContext(0, NULL, &KaxTrackVideo_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxVideoDisplayWidth));
-const EbmlSemanticContext KaxVideoDisplayHeight_Context = EbmlSemanticContext(0, NULL, &KaxTrackVideo_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxVideoDisplayHeight));
-const EbmlSemanticContext KaxVideoColourSpace_Context = EbmlSemanticContext(0, NULL, &KaxTrackVideo_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxVideoColourSpace));
-const EbmlSemanticContext KaxVideoFrameRate_Context = EbmlSemanticContext(0, NULL, &KaxTrackVideo_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxVideoFrameRate));
-#if MATROSKA_VERSION >= 2
-const EbmlSemanticContext KaxVideoFlagInterlaced_Context = EbmlSemanticContext(0, NULL, &KaxTrackVideo_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxVideoFlagInterlaced));
-const EbmlSemanticContext KaxVideoStereoMode_Context = EbmlSemanticContext(0, NULL, &KaxTrackVideo_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxVideoStereoMode));
-const EbmlSemanticContext KaxVideoDisplayUnit_Context = EbmlSemanticContext(0, NULL, &KaxTrackVideo_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxVideoDisplayUnit));
-const EbmlSemanticContext KaxVideoAspectRatio_Context = EbmlSemanticContext(0, NULL, &KaxTrackVideo_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxVideoAspectRatio));
-const EbmlSemanticContext KaxVideoGamma_Context = EbmlSemanticContext(0, NULL, &KaxTrackVideo_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxVideoGamma));
-#endif // MATROSKA_VERSION
-
-EbmlId KaxTrackVideo_TheId          (0xE0, 1);
-EbmlId KaxVideoPixelWidth_TheId     (0xB0, 1);
-EbmlId KaxVideoPixelHeight_TheId    (0xBA, 1);
-EbmlId KaxVideoPixelCropBottom_TheId(0x54AA, 2);
-EbmlId KaxVideoPixelCropTop_TheId   (0x54BB, 2);
-EbmlId KaxVideoPixelCropLeft_TheId  (0x54CC, 2);
-EbmlId KaxVideoPixelCropRight_TheId (0x54DD, 2);
-EbmlId KaxVideoDisplayWidth_TheId   (0x54B0, 2);
-EbmlId KaxVideoDisplayHeight_TheId  (0x54BA, 2);
-EbmlId KaxVideoColourSpace_TheId    (0x2EB524, 3);
-EbmlId KaxVideoFrameRate_TheId      (0x2383E3, 3);
-#if MATROSKA_VERSION >= 2
-EbmlId KaxVideoFlagInterlaced_TheId (0x9A, 1);
-EbmlId KaxVideoStereoMode_TheId     (0x53B9, 2);
-EbmlId KaxVideoDisplayUnit_TheId    (0x54B2, 2);
-EbmlId KaxVideoAspectRatio_TheId    (0x54B3, 1);
-EbmlId KaxVideoGamma_TheId          (0x2FB523, 3);
-#endif // MATROSKA_VERSION
-
-const EbmlCallbacks KaxTrackVideo::ClassInfos(KaxTrackVideo::Create, KaxTrackVideo_TheId, "TrackAudio", KaxTrackVideo_Context);
-const EbmlCallbacks KaxVideoPixelWidth::ClassInfos(KaxVideoPixelWidth::Create, KaxVideoPixelWidth_TheId, "VideoPixelWidth", KaxVideoPixelWidth_Context);
-const EbmlCallbacks KaxVideoPixelHeight::ClassInfos(KaxVideoPixelHeight::Create, KaxVideoPixelHeight_TheId, "VideoPixelHeight", KaxVideoPixelHeight_Context);
-const EbmlCallbacks KaxVideoPixelCropBottom::ClassInfos(KaxVideoPixelCropBottom::Create, KaxVideoPixelCropBottom_TheId, "VideoPixelCropBottom", KaxVideoPixelCropBottom_Context);
-const EbmlCallbacks KaxVideoPixelCropTop::ClassInfos(KaxVideoPixelCropTop::Create, KaxVideoPixelCropTop_TheId, "VideoPixelCropTop", KaxVideoPixelCropTop_Context);
-const EbmlCallbacks KaxVideoPixelCropLeft::ClassInfos(KaxVideoPixelCropLeft::Create, KaxVideoPixelCropLeft_TheId, "VideoPixelCropLeft", KaxVideoPixelCropLeft_Context);
-const EbmlCallbacks KaxVideoPixelCropRight::ClassInfos(KaxVideoPixelCropRight::Create, KaxVideoPixelCropRight_TheId, "VideoPixelCropRight", KaxVideoPixelCropRight_Context);
-const EbmlCallbacks KaxVideoDisplayWidth::ClassInfos(KaxVideoDisplayWidth::Create, KaxVideoDisplayWidth_TheId, "VideoDisplayWidth", KaxVideoDisplayWidth_Context);
-const EbmlCallbacks KaxVideoDisplayHeight::ClassInfos(KaxVideoDisplayHeight::Create, KaxVideoDisplayHeight_TheId, "VideoDisplayHeight", KaxVideoDisplayHeight_Context);
-const EbmlCallbacks KaxVideoColourSpace::ClassInfos(KaxVideoColourSpace::Create, KaxVideoColourSpace_TheId, "VideoColourSpace", KaxVideoColourSpace_Context);
-const EbmlCallbacks KaxVideoFrameRate::ClassInfos(KaxVideoFrameRate::Create, KaxVideoFrameRate_TheId, "VideoFrameRate", KaxVideoFrameRate_Context);
-#if MATROSKA_VERSION >= 2
-const EbmlCallbacks KaxVideoFlagInterlaced::ClassInfos(KaxVideoFlagInterlaced::Create, KaxVideoFlagInterlaced_TheId, "VideoFlagInterlaced", KaxVideoFlagInterlaced_Context);
-const EbmlCallbacks KaxVideoStereoMode::ClassInfos(KaxVideoStereoMode::Create, KaxVideoStereoMode_TheId, "VideoStereoMode", KaxVideoStereoMode_Context);
-const EbmlCallbacks KaxVideoDisplayUnit::ClassInfos(KaxVideoDisplayUnit::Create, KaxVideoDisplayUnit_TheId, "VideoDisplayUnit", KaxVideoDisplayUnit_Context);
-const EbmlCallbacks KaxVideoAspectRatio::ClassInfos(KaxVideoAspectRatio::Create, KaxVideoAspectRatio_TheId, "VideoAspectRatio", KaxVideoAspectRatio_Context);
-const EbmlCallbacks KaxVideoGamma::ClassInfos(KaxVideoGamma::Create, KaxVideoGamma_TheId, "VideoGamma", KaxVideoGamma_Context);
-#endif // MATROSKA_VERSION
-
-KaxTrackVideo::KaxTrackVideo()
-       :EbmlMaster(KaxTrackVideo_Context)
-{}
-
-uint32 KaxVideoFrameRate::RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault)
-{
-       assert(false); // no you are not allowed to use this element !
-       return 0;
-}
-
-END_LIBMATROSKA_NAMESPACE
+/****************************************************************************\r
+** libmatroska : parse Matroska files, see http://www.matroska.org/\r
+**\r
+** <file/class description>\r
+**\r
+** Copyright (C) 2002-2010 Steve Lhomme.  All rights reserved.\r
+**\r
+** This file is part of libmatroska.\r
+**\r
+** This library is free software; you can redistribute it and/or\r
+** modify it under the terms of the GNU Lesser General Public\r
+** License as published by the Free Software Foundation; either\r
+** version 2.1 of the License, or (at your option) any later version.\r
+** \r
+** This library is distributed in the hope that it will be useful,\r
+** but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
+** Lesser General Public License for more details.\r
+** \r
+** You should have received a copy of the GNU Lesser General Public\r
+** License along with this library; if not, write to the Free Software\r
+** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\r
+**\r
+** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**\r
+** Contact license@matroska.org if any conditions of this licensing are\r
+** not clear to you.\r
+**\r
+**********************************************************************/\r
+\r
+/*!\r
+       \file\r
+       \version \$Id: KaxTrackVideo.cpp 738 2004-08-30 09:21:46Z robux4 $\r
+       \author Steve Lhomme     <robux4 @ users.sf.net>\r
+*/\r
+#include "matroska/KaxTrackVideo.h"\r
+\r
+// sub elements\r
+#include "matroska/KaxContexts.h"\r
+\r
+START_LIBMATROSKA_NAMESPACE\r
+\r
+#if MATROSKA_VERSION == 1\r
+const EbmlSemantic KaxTrackVideo_ContextList[10] =\r
+#else // MATROSKA_VERSION\r
+const EbmlSemantic KaxTrackVideo_ContextList[15] =\r
+#endif // MATROSKA_VERSION\r
+{\r
+       EbmlSemantic(true , true, EBML_INFO(KaxVideoPixelWidth)),\r
+       EbmlSemantic(true , true, EBML_INFO(KaxVideoPixelHeight)),\r
+       EbmlSemantic(false, true, EBML_INFO(KaxVideoPixelCropBottom)),\r
+       EbmlSemantic(false, true, EBML_INFO(KaxVideoPixelCropTop)),\r
+       EbmlSemantic(false, true, EBML_INFO(KaxVideoPixelCropLeft)),\r
+       EbmlSemantic(false, true, EBML_INFO(KaxVideoPixelCropRight)),\r
+       EbmlSemantic(false, true, EBML_INFO(KaxVideoDisplayWidth)),\r
+       EbmlSemantic(false, true, EBML_INFO(KaxVideoDisplayHeight)),\r
+       EbmlSemantic(false, true, EBML_INFO(KaxVideoColourSpace)),\r
+       EbmlSemantic(false, true, EBML_INFO(KaxVideoFrameRate)),\r
+#if MATROSKA_VERSION >= 2\r
+       EbmlSemantic(true , true, EBML_INFO(KaxVideoFlagInterlaced)),\r
+       EbmlSemantic(false, true, EBML_INFO(KaxVideoStereoMode)),\r
+       EbmlSemantic(false, true, EBML_INFO(KaxVideoDisplayUnit)),\r
+       EbmlSemantic(false, true, EBML_INFO(KaxVideoAspectRatio)),\r
+       EbmlSemantic(false, true, EBML_INFO(KaxVideoGamma)),\r
+#endif // MATROSKA_VERSION\r
+};\r
+\r
+const EbmlSemanticContext KaxTrackVideo_Context = EbmlSemanticContext(countof(KaxTrackVideo_ContextList), KaxTrackVideo_ContextList, &KaxTrackEntry_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTrackVideo));\r
+const EbmlSemanticContext KaxVideoPixelWidth_Context = EbmlSemanticContext(0, NULL, &KaxTrackVideo_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxVideoPixelWidth));\r
+const EbmlSemanticContext KaxVideoPixelHeight_Context = EbmlSemanticContext(0, NULL, &KaxTrackVideo_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxVideoPixelHeight));\r
+const EbmlSemanticContext KaxVideoPixelCropBottom_Context = EbmlSemanticContext(0, NULL, &KaxTrackVideo_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxVideoPixelCropBottom));\r
+const EbmlSemanticContext KaxVideoPixelCropTop_Context = EbmlSemanticContext(0, NULL, &KaxTrackVideo_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxVideoPixelCropTop));\r
+const EbmlSemanticContext KaxVideoPixelCropRight_Context = EbmlSemanticContext(0, NULL, &KaxTrackVideo_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxVideoPixelCropLeft));\r
+const EbmlSemanticContext KaxVideoPixelCropLeft_Context = EbmlSemanticContext(0, NULL, &KaxTrackVideo_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxVideoPixelCropRight));\r
+const EbmlSemanticContext KaxVideoDisplayWidth_Context = EbmlSemanticContext(0, NULL, &KaxTrackVideo_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxVideoDisplayWidth));\r
+const EbmlSemanticContext KaxVideoDisplayHeight_Context = EbmlSemanticContext(0, NULL, &KaxTrackVideo_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxVideoDisplayHeight));\r
+const EbmlSemanticContext KaxVideoColourSpace_Context = EbmlSemanticContext(0, NULL, &KaxTrackVideo_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxVideoColourSpace));\r
+const EbmlSemanticContext KaxVideoFrameRate_Context = EbmlSemanticContext(0, NULL, &KaxTrackVideo_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxVideoFrameRate));\r
+#if MATROSKA_VERSION >= 2\r
+const EbmlSemanticContext KaxVideoFlagInterlaced_Context = EbmlSemanticContext(0, NULL, &KaxTrackVideo_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxVideoFlagInterlaced));\r
+const EbmlSemanticContext KaxVideoStereoMode_Context = EbmlSemanticContext(0, NULL, &KaxTrackVideo_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxVideoStereoMode));\r
+const EbmlSemanticContext KaxVideoDisplayUnit_Context = EbmlSemanticContext(0, NULL, &KaxTrackVideo_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxVideoDisplayUnit));\r
+const EbmlSemanticContext KaxVideoAspectRatio_Context = EbmlSemanticContext(0, NULL, &KaxTrackVideo_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxVideoAspectRatio));\r
+const EbmlSemanticContext KaxVideoGamma_Context = EbmlSemanticContext(0, NULL, &KaxTrackVideo_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxVideoGamma));\r
+#endif // MATROSKA_VERSION\r
+\r
+EbmlId KaxTrackVideo_TheId          (0xE0, 1);\r
+EbmlId KaxVideoPixelWidth_TheId     (0xB0, 1);\r
+EbmlId KaxVideoPixelHeight_TheId    (0xBA, 1);\r
+EbmlId KaxVideoPixelCropBottom_TheId(0x54AA, 2);\r
+EbmlId KaxVideoPixelCropTop_TheId   (0x54BB, 2);\r
+EbmlId KaxVideoPixelCropLeft_TheId  (0x54CC, 2);\r
+EbmlId KaxVideoPixelCropRight_TheId (0x54DD, 2);\r
+EbmlId KaxVideoDisplayWidth_TheId   (0x54B0, 2);\r
+EbmlId KaxVideoDisplayHeight_TheId  (0x54BA, 2);\r
+EbmlId KaxVideoColourSpace_TheId    (0x2EB524, 3);\r
+EbmlId KaxVideoFrameRate_TheId      (0x2383E3, 3);\r
+#if MATROSKA_VERSION >= 2\r
+EbmlId KaxVideoFlagInterlaced_TheId (0x9A, 1);\r
+EbmlId KaxVideoStereoMode_TheId     (0x53B9, 2);\r
+EbmlId KaxVideoDisplayUnit_TheId    (0x54B2, 2);\r
+EbmlId KaxVideoAspectRatio_TheId    (0x54B3, 1);\r
+EbmlId KaxVideoGamma_TheId          (0x2FB523, 3);\r
+#endif // MATROSKA_VERSION\r
+\r
+const EbmlCallbacks KaxTrackVideo::ClassInfos(KaxTrackVideo::Create, KaxTrackVideo_TheId, "TrackAudio", KaxTrackVideo_Context);\r
+const EbmlCallbacks KaxVideoPixelWidth::ClassInfos(KaxVideoPixelWidth::Create, KaxVideoPixelWidth_TheId, "VideoPixelWidth", KaxVideoPixelWidth_Context);\r
+const EbmlCallbacks KaxVideoPixelHeight::ClassInfos(KaxVideoPixelHeight::Create, KaxVideoPixelHeight_TheId, "VideoPixelHeight", KaxVideoPixelHeight_Context);\r
+const EbmlCallbacks KaxVideoPixelCropBottom::ClassInfos(KaxVideoPixelCropBottom::Create, KaxVideoPixelCropBottom_TheId, "VideoPixelCropBottom", KaxVideoPixelCropBottom_Context);\r
+const EbmlCallbacks KaxVideoPixelCropTop::ClassInfos(KaxVideoPixelCropTop::Create, KaxVideoPixelCropTop_TheId, "VideoPixelCropTop", KaxVideoPixelCropTop_Context);\r
+const EbmlCallbacks KaxVideoPixelCropLeft::ClassInfos(KaxVideoPixelCropLeft::Create, KaxVideoPixelCropLeft_TheId, "VideoPixelCropLeft", KaxVideoPixelCropLeft_Context);\r
+const EbmlCallbacks KaxVideoPixelCropRight::ClassInfos(KaxVideoPixelCropRight::Create, KaxVideoPixelCropRight_TheId, "VideoPixelCropRight", KaxVideoPixelCropRight_Context);\r
+const EbmlCallbacks KaxVideoDisplayWidth::ClassInfos(KaxVideoDisplayWidth::Create, KaxVideoDisplayWidth_TheId, "VideoDisplayWidth", KaxVideoDisplayWidth_Context);\r
+const EbmlCallbacks KaxVideoDisplayHeight::ClassInfos(KaxVideoDisplayHeight::Create, KaxVideoDisplayHeight_TheId, "VideoDisplayHeight", KaxVideoDisplayHeight_Context);\r
+const EbmlCallbacks KaxVideoColourSpace::ClassInfos(KaxVideoColourSpace::Create, KaxVideoColourSpace_TheId, "VideoColourSpace", KaxVideoColourSpace_Context);\r
+const EbmlCallbacks KaxVideoFrameRate::ClassInfos(KaxVideoFrameRate::Create, KaxVideoFrameRate_TheId, "VideoFrameRate", KaxVideoFrameRate_Context);\r
+#if MATROSKA_VERSION >= 2\r
+const EbmlCallbacks KaxVideoFlagInterlaced::ClassInfos(KaxVideoFlagInterlaced::Create, KaxVideoFlagInterlaced_TheId, "VideoFlagInterlaced", KaxVideoFlagInterlaced_Context);\r
+const EbmlCallbacks KaxVideoStereoMode::ClassInfos(KaxVideoStereoMode::Create, KaxVideoStereoMode_TheId, "VideoStereoMode", KaxVideoStereoMode_Context);\r
+const EbmlCallbacks KaxVideoDisplayUnit::ClassInfos(KaxVideoDisplayUnit::Create, KaxVideoDisplayUnit_TheId, "VideoDisplayUnit", KaxVideoDisplayUnit_Context);\r
+const EbmlCallbacks KaxVideoAspectRatio::ClassInfos(KaxVideoAspectRatio::Create, KaxVideoAspectRatio_TheId, "VideoAspectRatio", KaxVideoAspectRatio_Context);\r
+const EbmlCallbacks KaxVideoGamma::ClassInfos(KaxVideoGamma::Create, KaxVideoGamma_TheId, "VideoGamma", KaxVideoGamma_Context);\r
+#endif // MATROSKA_VERSION\r
+\r
+KaxTrackVideo::KaxTrackVideo()\r
+       :EbmlMaster(KaxTrackVideo_Context)\r
+{}\r
+\r
+uint32 KaxVideoFrameRate::RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault)\r
+{\r
+       assert(false); // no you are not allowed to use this element !\r
+       return 0;\r
+}\r
+\r
+END_LIBMATROSKA_NAMESPACE\r
index 7813379bb30a8fe67dfab3abedaa0afd09ea5c2d..608ee6bdedc50cf32574eece04d146e1f920595c 100644 (file)
-/****************************************************************************
-** libmatroska : parse Matroska files, see http://www.matroska.org/
-**
-** <file/class description>
-**
-** Copyright (C) 2002-2005 Steve Lhomme.  All rights reserved.
-**
-** This file is part of libmatroska.
-**
-** This library is free software; you can redistribute it and/or
-** modify it under the terms of the GNU Lesser General Public
-** License as published by the Free Software Foundation; either
-** version 2.1 of the License, or (at your option) any later version.
-** 
-** This library is distributed in the hope that it will be useful,
-** but WITHOUT ANY WARRANTY; without even the implied warranty of
-** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-** Lesser General Public License for more details.
-** 
-** You should have received a copy of the GNU Lesser General Public
-** License along with this library; if not, write to the Free Software
-** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-**
-** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**
-** Contact license@matroska.org if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-/*!
-       \file
-       \version \$Id: KaxTracks.cpp 1202 2005-08-30 14:39:01Z robux4 $
-       \author Steve Lhomme     <robux4 @ users.sf.net>
-*/
-#include "matroska/KaxTracks.h"
-
-// sub elements
-#include "matroska/KaxTrackEntryData.h"
-#include "matroska/KaxTrackAudio.h"
-#include "matroska/KaxTrackVideo.h"
-#include "matroska/KaxContentEncoding.h"
-#include "matroska/KaxContexts.h"
-
-START_LIBMATROSKA_NAMESPACE
-
-const EbmlSemantic KaxTracks_ContextList[1] =
-{
-       EbmlSemantic(true, false, EBML_INFO(KaxTrackEntry)),
-};
-
-#if MATROSKA_VERSION == 1
-const EbmlSemantic KaxTrackEntry_ContextList[22] =
-#else // MATROSKA_VERSION
-const EbmlSemantic KaxTrackEntry_ContextList[27] =
-#endif // MATROSKA_VERSION
-{
-       EbmlSemantic(true , true, EBML_INFO(KaxTrackNumber)),
-       EbmlSemantic(true , true, EBML_INFO(KaxTrackUID)),
-       EbmlSemantic(true , true, EBML_INFO(KaxTrackType)),
-#if MATROSKA_VERSION >= 2
-       EbmlSemantic(true , true, EBML_INFO(KaxTrackFlagEnabled)),
-#endif // MATROSKA_VERSION
-       EbmlSemantic(true , true, EBML_INFO(KaxTrackFlagDefault)),
-       EbmlSemantic(true , true, EBML_INFO(KaxTrackFlagForced)),
-       EbmlSemantic(true , true, EBML_INFO(KaxTrackFlagLacing)),
-       EbmlSemantic(true , true, EBML_INFO(KaxTrackMinCache)),
-       EbmlSemantic(false, true, EBML_INFO(KaxTrackMaxCache)),
-       EbmlSemantic(false, true, EBML_INFO(KaxTrackDefaultDuration)),
-       EbmlSemantic(true , true, EBML_INFO(KaxTrackTimecodeScale)),
-       EbmlSemantic(true , true, EBML_INFO(KaxMaxBlockAdditionID)),
-       EbmlSemantic(false, true, EBML_INFO(KaxTrackName)),
-       EbmlSemantic(false, true, EBML_INFO(KaxTrackLanguage)),
-       EbmlSemantic(true , true, EBML_INFO(KaxCodecID)),
-       EbmlSemantic(false, true, EBML_INFO(KaxCodecPrivate)),
-       EbmlSemantic(false, true, EBML_INFO(KaxCodecName)),
-       EbmlSemantic(false, true, EBML_INFO(KaxTrackAttachmentLink)),
-#if MATROSKA_VERSION >= 2
-       EbmlSemantic(false, true, EBML_INFO(KaxCodecSettings)),
-       EbmlSemantic(false, false,EBML_INFO(KaxCodecInfoURL)),
-       EbmlSemantic(false, false,EBML_INFO(KaxCodecDownloadURL)),
-       EbmlSemantic(true , true, EBML_INFO(KaxCodecDecodeAll)),
-#endif // MATROSKA_VERSION
-       EbmlSemantic(false, false,EBML_INFO(KaxTrackOverlay)),
-       EbmlSemantic(false, false,EBML_INFO(KaxTrackTranslate)),
-       EbmlSemantic(false, true, EBML_INFO(KaxTrackAudio)),
-       EbmlSemantic(false, true, EBML_INFO(KaxTrackVideo)),
-       EbmlSemantic(false, true, EBML_INFO(KaxContentEncodings)),
-};
-
-const EbmlSemanticContext KaxTracks_Context = EbmlSemanticContext(countof(KaxTracks_ContextList), KaxTracks_ContextList, &KaxSegment_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTracks));
-const EbmlSemanticContext KaxTrackEntry_Context = EbmlSemanticContext(countof(KaxTrackEntry_ContextList), KaxTrackEntry_ContextList, &KaxTracks_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTrackEntry));
-
-EbmlId KaxTracks_TheId    (0x1654AE6B, 4);
-EbmlId KaxTrackEntry_TheId(0xAE, 1);
-
-const EbmlCallbacks KaxTracks::ClassInfos(KaxTracks::Create, KaxTracks_TheId, "Tracks", KaxTracks_Context);
-const EbmlCallbacks KaxTrackEntry::ClassInfos(KaxTrackEntry::Create, KaxTrackEntry_TheId, "TrackEntry", KaxTrackEntry_Context);
-
-KaxTracks::KaxTracks()
-       :EbmlMaster(KaxTracks_Context)
-{}
-
-KaxTrackEntry::KaxTrackEntry()
-       :EbmlMaster(KaxTrackEntry_Context)
-       ,bGlobalTimecodeScaleIsSet(false)
-{}
-
-void KaxTrackEntry::EnableLacing(bool bEnable)
-{
-       KaxTrackFlagLacing & myLacing = GetChild<KaxTrackFlagLacing>(*this);
-       *(static_cast<EbmlUInteger *>(&myLacing)) = bEnable ? 1 : 0;
-}
-
-END_LIBMATROSKA_NAMESPACE
+/****************************************************************************\r
+** libmatroska : parse Matroska files, see http://www.matroska.org/\r
+**\r
+** <file/class description>\r
+**\r
+** Copyright (C) 2002-2010 Steve Lhomme.  All rights reserved.\r
+**\r
+** This file is part of libmatroska.\r
+**\r
+** This library is free software; you can redistribute it and/or\r
+** modify it under the terms of the GNU Lesser General Public\r
+** License as published by the Free Software Foundation; either\r
+** version 2.1 of the License, or (at your option) any later version.\r
+** \r
+** This library is distributed in the hope that it will be useful,\r
+** but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
+** Lesser General Public License for more details.\r
+** \r
+** You should have received a copy of the GNU Lesser General Public\r
+** License along with this library; if not, write to the Free Software\r
+** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\r
+**\r
+** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**\r
+** Contact license@matroska.org if any conditions of this licensing are\r
+** not clear to you.\r
+**\r
+**********************************************************************/\r
+\r
+/*!\r
+       \file\r
+       \version \$Id: KaxTracks.cpp 1202 2005-08-30 14:39:01Z robux4 $\r
+       \author Steve Lhomme     <robux4 @ users.sf.net>\r
+*/\r
+#include "matroska/KaxTracks.h"\r
+\r
+// sub elements\r
+#include "matroska/KaxTrackEntryData.h"\r
+#include "matroska/KaxTrackAudio.h"\r
+#include "matroska/KaxTrackVideo.h"\r
+#include "matroska/KaxContentEncoding.h"\r
+#include "matroska/KaxContexts.h"\r
+\r
+START_LIBMATROSKA_NAMESPACE\r
+\r
+const EbmlSemantic KaxTracks_ContextList[1] =\r
+{\r
+       EbmlSemantic(true, false, EBML_INFO(KaxTrackEntry)),\r
+};\r
+\r
+#if MATROSKA_VERSION == 1\r
+const EbmlSemantic KaxTrackEntry_ContextList[22] =\r
+#else // MATROSKA_VERSION\r
+const EbmlSemantic KaxTrackEntry_ContextList[27] =\r
+#endif // MATROSKA_VERSION\r
+{\r
+       EbmlSemantic(true , true, EBML_INFO(KaxTrackNumber)),\r
+       EbmlSemantic(true , true, EBML_INFO(KaxTrackUID)),\r
+       EbmlSemantic(true , true, EBML_INFO(KaxTrackType)),\r
+#if MATROSKA_VERSION >= 2\r
+       EbmlSemantic(true , true, EBML_INFO(KaxTrackFlagEnabled)),\r
+#endif // MATROSKA_VERSION\r
+       EbmlSemantic(true , true, EBML_INFO(KaxTrackFlagDefault)),\r
+       EbmlSemantic(true , true, EBML_INFO(KaxTrackFlagForced)),\r
+       EbmlSemantic(true , true, EBML_INFO(KaxTrackFlagLacing)),\r
+       EbmlSemantic(true , true, EBML_INFO(KaxTrackMinCache)),\r
+       EbmlSemantic(false, true, EBML_INFO(KaxTrackMaxCache)),\r
+       EbmlSemantic(false, true, EBML_INFO(KaxTrackDefaultDuration)),\r
+       EbmlSemantic(true , true, EBML_INFO(KaxTrackTimecodeScale)),\r
+       EbmlSemantic(true , true, EBML_INFO(KaxMaxBlockAdditionID)),\r
+       EbmlSemantic(false, true, EBML_INFO(KaxTrackName)),\r
+       EbmlSemantic(false, true, EBML_INFO(KaxTrackLanguage)),\r
+       EbmlSemantic(true , true, EBML_INFO(KaxCodecID)),\r
+       EbmlSemantic(false, true, EBML_INFO(KaxCodecPrivate)),\r
+       EbmlSemantic(false, true, EBML_INFO(KaxCodecName)),\r
+       EbmlSemantic(false, true, EBML_INFO(KaxTrackAttachmentLink)),\r
+#if MATROSKA_VERSION >= 2\r
+       EbmlSemantic(false, true, EBML_INFO(KaxCodecSettings)),\r
+       EbmlSemantic(false, false,EBML_INFO(KaxCodecInfoURL)),\r
+       EbmlSemantic(false, false,EBML_INFO(KaxCodecDownloadURL)),\r
+       EbmlSemantic(true , true, EBML_INFO(KaxCodecDecodeAll)),\r
+#endif // MATROSKA_VERSION\r
+       EbmlSemantic(false, false,EBML_INFO(KaxTrackOverlay)),\r
+       EbmlSemantic(false, false,EBML_INFO(KaxTrackTranslate)),\r
+       EbmlSemantic(false, true, EBML_INFO(KaxTrackAudio)),\r
+       EbmlSemantic(false, true, EBML_INFO(KaxTrackVideo)),\r
+       EbmlSemantic(false, true, EBML_INFO(KaxContentEncodings)),\r
+};\r
+\r
+const EbmlSemanticContext KaxTracks_Context = EbmlSemanticContext(countof(KaxTracks_ContextList), KaxTracks_ContextList, &KaxSegment_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTracks));\r
+const EbmlSemanticContext KaxTrackEntry_Context = EbmlSemanticContext(countof(KaxTrackEntry_ContextList), KaxTrackEntry_ContextList, &KaxTracks_Context, *GetKaxGlobal_Context, &EBML_INFO(KaxTrackEntry));\r
+\r
+EbmlId KaxTracks_TheId    (0x1654AE6B, 4);\r
+EbmlId KaxTrackEntry_TheId(0xAE, 1);\r
+\r
+const EbmlCallbacks KaxTracks::ClassInfos(KaxTracks::Create, KaxTracks_TheId, "Tracks", KaxTracks_Context);\r
+const EbmlCallbacks KaxTrackEntry::ClassInfos(KaxTrackEntry::Create, KaxTrackEntry_TheId, "TrackEntry", KaxTrackEntry_Context);\r
+\r
+KaxTracks::KaxTracks()\r
+       :EbmlMaster(KaxTracks_Context)\r
+{}\r
+\r
+KaxTrackEntry::KaxTrackEntry()\r
+       :EbmlMaster(KaxTrackEntry_Context)\r
+       ,bGlobalTimecodeScaleIsSet(false)\r
+{}\r
+\r
+void KaxTrackEntry::EnableLacing(bool bEnable)\r
+{\r
+       KaxTrackFlagLacing & myLacing = GetChild<KaxTrackFlagLacing>(*this);\r
+       *(static_cast<EbmlUInteger *>(&myLacing)) = bEnable ? 1 : 0;\r
+}\r
+\r
+END_LIBMATROSKA_NAMESPACE\r
index 6ed03d2cf73bf2cb10ea47a2100d856e9e181961..992c2db277888930f629110b3b09aeb407aeb3ee 100644 (file)
@@ -1,40 +1,40 @@
-/****************************************************************************
-** libmatroska : parse Matroska files, see http://www.matroska.org/
-**
-** <file/class description>
-**
-** Copyright (C) 2002-2004 Steve Lhomme.  All rights reserved.
-**
-** This file is part of libmatroska.
-**
-** This library is free software; you can redistribute it and/or
-** modify it under the terms of the GNU Lesser General Public
-** License as published by the Free Software Foundation; either
-** version 2.1 of the License, or (at your option) any later version.
-** 
-** This library is distributed in the hope that it will be useful,
-** but WITHOUT ANY WARRANTY; without even the implied warranty of
-** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-** Lesser General Public License for more details.
-** 
-** You should have received a copy of the GNU Lesser General Public
-** License along with this library; if not, write to the Free Software
-** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-**
-** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**
-** Contact license@matroska.org if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-/*!
-       \file
-       \version \$Id: KaxVersion.cpp 640 2004-07-09 21:05:36Z mosu $
-       \author Steve Lhomme     <robux4 @ users.sf.net>
-*/
-
-#include "matroska/KaxVersion.h"
-
-START_LIBMATROSKA_NAMESPACE
-
-END_LIBMATROSKA_NAMESPACE
+/****************************************************************************\r
+** libmatroska : parse Matroska files, see http://www.matroska.org/\r
+**\r
+** <file/class description>\r
+**\r
+** Copyright (C) 2002-2010 Steve Lhomme.  All rights reserved.\r
+**\r
+** This file is part of libmatroska.\r
+**\r
+** This library is free software; you can redistribute it and/or\r
+** modify it under the terms of the GNU Lesser General Public\r
+** License as published by the Free Software Foundation; either\r
+** version 2.1 of the License, or (at your option) any later version.\r
+** \r
+** This library is distributed in the hope that it will be useful,\r
+** but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
+** Lesser General Public License for more details.\r
+** \r
+** You should have received a copy of the GNU Lesser General Public\r
+** License along with this library; if not, write to the Free Software\r
+** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\r
+**\r
+** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**\r
+** Contact license@matroska.org if any conditions of this licensing are\r
+** not clear to you.\r
+**\r
+**********************************************************************/\r
+\r
+/*!\r
+       \file\r
+       \version \$Id: KaxVersion.cpp 640 2004-07-09 21:05:36Z mosu $\r
+       \author Steve Lhomme     <robux4 @ users.sf.net>\r
+*/\r
+\r
+#include "matroska/KaxVersion.h"\r
+\r
+START_LIBMATROSKA_NAMESPACE\r
+\r
+END_LIBMATROSKA_NAMESPACE\r