]> granicus.if.org Git - libmatroska/commitdiff
libmatroska: use the generated semantic code instead of the manual one
authorSteve Lhomme <slhomme@matroska.org>
Sun, 27 Mar 2011 17:09:02 +0000 (17:09 +0000)
committerSteve Lhomme <slhomme@matroska.org>
Sun, 27 Mar 2011 17:09:02 +0000 (17:09 +0000)
+ don't allow writing not supported elements

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

46 files changed:
libmatroska.proj
matroska/KaxAttached.h
matroska/KaxAttachments.h
matroska/KaxBlock.h
matroska/KaxBlockData.h
matroska/KaxChapters.h
matroska/KaxCluster.h
matroska/KaxClusterData.h
matroska/KaxContentEncoding.h
matroska/KaxCuesData.h
matroska/KaxDefines.h
matroska/KaxInfo.h
matroska/KaxInfoData.h
matroska/KaxSeekHead.h
matroska/KaxSemantic.h [new file with mode: 0644]
matroska/KaxTag.h
matroska/KaxTags.h
matroska/KaxTrackAudio.h
matroska/KaxTrackEntryData.h
matroska/KaxTrackVideo.h
matroska/KaxTracks.h
src/KaxAttached.cpp
src/KaxAttachments.cpp
src/KaxBlock.cpp
src/KaxBlockData.cpp
src/KaxChapters.cpp [deleted file]
src/KaxCluster.cpp
src/KaxClusterData.cpp [deleted file]
src/KaxContentEncoding.cpp [deleted file]
src/KaxContexts.cpp
src/KaxCues.cpp
src/KaxCuesData.cpp
src/KaxInfo.cpp [deleted file]
src/KaxInfoData.cpp
src/KaxSeekHead.cpp
src/KaxSegment.cpp
src/KaxSemantic.cpp [new file with mode: 0644]
src/KaxTag.cpp [deleted file]
src/KaxTags.cpp [deleted file]
src/KaxTrackAudio.cpp [deleted file]
src/KaxTrackEntryData.cpp [deleted file]
src/KaxTrackVideo.cpp [deleted file]
src/KaxTracks.cpp
test/ebml/test00.cpp
test/mux/test6.cpp
test/mux/test8.cpp

index 09e0219572e2749a8a6542b0f224502a8b1d5a96..0d012041e181c820b6dfcfe78674c0c61a74a2f3 100644 (file)
@@ -24,48 +24,30 @@ LIB matroska
   SOURCE src/KaxAttachments.cpp
   SOURCE src/KaxBlock.cpp
   SOURCE src/KaxBlockData.cpp
-  SOURCE src/KaxChapters.cpp
   SOURCE src/KaxCluster.cpp
-  SOURCE src/KaxClusterData.cpp
-  SOURCE src/KaxContentEncoding.cpp
   SOURCE src/KaxContexts.cpp
   SOURCE src/KaxCues.cpp
   SOURCE src/KaxCuesData.cpp
-  SOURCE src/KaxInfo.cpp
   SOURCE src/KaxInfoData.cpp
   SOURCE src/KaxSeekHead.cpp
   SOURCE src/KaxSegment.cpp
-  SOURCE src/KaxTag.cpp
-  SOURCE src/KaxTags.cpp
-  SOURCE src/KaxTrackAudio.cpp
-  SOURCE src/KaxTrackEntryData.cpp
-  SOURCE src/KaxTrackVideo.cpp
+  SOURCE src/KaxSemantic.cpp
   SOURCE src/KaxTracks.cpp
   SOURCE src/KaxVersion.cpp
 
   HEADER matroska/FileKax.h
-  HEADER matroska/KaxAttached.h
-  HEADER matroska/KaxAttachments.h
   HEADER matroska/KaxBlock.h
   HEADER matroska/KaxBlockData.h
-  HEADER matroska/KaxChapters.h
   HEADER matroska/KaxCluster.h
-  HEADER matroska/KaxClusterData.h
   HEADER matroska/KaxConfig.h
-  HEADER matroska/KaxContentEncoding.h
   HEADER matroska/KaxContexts.h
   HEADER matroska/KaxCues.h
   HEADER matroska/KaxCuesData.h
   HEADER matroska/KaxDefines.h
-  HEADER matroska/KaxInfo.h
   HEADER matroska/KaxInfoData.h
   HEADER matroska/KaxSeekHead.h
   HEADER matroska/KaxSegment.h
-  HEADER matroska/KaxTag.h
-  HEADER matroska/KaxTags.h
-  HEADER matroska/KaxTrackAudio.h
-  HEADER matroska/KaxTrackEntryData.h
-  HEADER matroska/KaxTrackVideo.h
+  HEADER matroska/KaxSemantic.h
   HEADER matroska/KaxTracks.h
   HEADER matroska/KaxTypes.h
   HEADER matroska/KaxVersion.h
index a2b9c1c14cf492f6efa5102d45552c9f244f5da8..2e07752fae2284ee39ae187ee5fe94ecd4c79997 100644 (file)
@@ -1,73 +1,40 @@
-/****************************************************************************\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
-#include "matroska/KaxDefines.h"\r
-\r
-using namespace LIBEBML_NAMESPACE;\r
-\r
-START_LIBMATROSKA_NAMESPACE\r
-\r
-DECLARE_MKX_MASTER(KaxAttached)\r
-};\r
-\r
-DECLARE_MKX_UNISTRING(KaxFileDescription)\r
-};\r
-\r
-DECLARE_MKX_UNISTRING(KaxFileName)\r
-};\r
-\r
-DECLARE_MKX_STRING(KaxMimeType)\r
-};\r
-\r
-DECLARE_MKX_BINARY(KaxFileData)\r
-};\r
-\r
-DECLARE_MKX_BINARY(KaxFileReferral)\r
-};\r
-\r
-DECLARE_MKX_UINTEGER(KaxFileUID)\r
-};\r
-\r
-END_LIBMATROSKA_NAMESPACE\r
-\r
-#endif // LIBMATROSKA_ATTACHED_H\r
+/****************************************************************************
+** libmatroska : parse Matroska files, see http://www.matroska.org/
+**
+** <file/class MATROSKA_DLL_API description>
+**
+** Copyright (C) 2002-2010 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/KaxSemantic.h"
+
+#endif // LIBMATROSKA_ATTACHED_H
index 35124b0a85a4740d1990a094ee757f2cebf10409..feff215183e61ebeb228d38900e0ca330194e1e5 100644 (file)
@@ -1,51 +1,40 @@
-/****************************************************************************\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
-#include "matroska/KaxDefines.h"\r
-\r
-using namespace LIBEBML_NAMESPACE;\r
-\r
-START_LIBMATROSKA_NAMESPACE\r
-\r
-DECLARE_MKX_MASTER(KaxAttachments)\r
-};\r
-\r
-END_LIBMATROSKA_NAMESPACE\r
-\r
-#endif // LIBMATROSKA_ATTACHEMENTS_H\r
+/****************************************************************************
+** libmatroska : parse Matroska files, see http://www.matroska.org/
+**
+** <file/class description>
+**
+** Copyright (C) 2002-2010 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/KaxSemantic.h"
+
+#endif // LIBMATROSKA_ATTACHEMENTS_H
index 576ca1951bcc9a79a57afc4a57e3ebb4cbd58dad..03681c6cc923f0b7daa7efdfa867b5921569e93b 100644 (file)
@@ -359,9 +359,6 @@ protected:
        BlockBlobType SimpleBlockMode;
 };
 
-DECLARE_MKX_UINTEGER(KaxBlockDuration)
-};
-
 #if MATROSKA_VERSION >= 2
 DECLARE_MKX_BINARY_CONS(KaxBlockVirtual)
        public:
@@ -374,6 +371,8 @@ DECLARE_MKX_BINARY_CONS(KaxBlockVirtual)
 
                void SetParent(const KaxCluster & aParentCluster) {ParentCluster = &aParentCluster;}
 
+        filepos_t RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault);
+
        protected:
                uint64 Timecode; // temporary timecode of the first frame if there are more than one
                uint16 TrackNumber;
@@ -383,21 +382,6 @@ DECLARE_MKX_BINARY_CONS(KaxBlockVirtual)
 };
 #endif // MATROSKA_VERSION
 
-DECLARE_MKX_BINARY(KaxBlockAdditional)
-};
-
-DECLARE_MKX_MASTER(KaxBlockAdditions)
-};
-
-DECLARE_MKX_MASTER(KaxBlockMore)
-};
-
-DECLARE_MKX_UINTEGER(KaxBlockAddID)
-};
-
-DECLARE_MKX_BINARY(KaxCodecState)
-};
-
 END_LIBMATROSKA_NAMESPACE
 
 #endif // LIBMATROSKA_BLOCK_H
index 1980479aaee289b1f4e19ebda0ff6ffa594103e7..c8a0c25ed7fd01e697766f5337bfd42c1bb18174 100644 (file)
 #include "ebml/EbmlUInteger.h"
 #include "ebml/EbmlSInteger.h"
 #include "matroska/KaxDefines.h"
+#include "matroska/KaxBlock.h"
 
 using namespace LIBEBML_NAMESPACE;
 
 START_LIBMATROSKA_NAMESPACE
 
-class KaxReferenceBlock;
-class KaxBlockGroup;
-class KaxBlockBlob;
-
-DECLARE_MKX_UINTEGER(KaxReferencePriority)
-};
-
 /*!
        \brief element used for B frame-likes
 */
@@ -75,32 +69,6 @@ DECLARE_MKX_SINTEGER_CONS(KaxReferenceBlock)
         void FreeBlob();
 };
 
-#if MATROSKA_VERSION >= 2
-DECLARE_MKX_SINTEGER(KaxReferenceVirtual)
-};
-#endif // MATROSKA_VERSION
-
-DECLARE_MKX_MASTER(KaxTimeSlice)
-};
-
-DECLARE_MKX_MASTER(KaxSlices)
-};
-
-DECLARE_MKX_UINTEGER(KaxSliceLaceNumber)
-};
-
-DECLARE_MKX_UINTEGER(KaxSliceFrameNumber)
-};
-
-DECLARE_MKX_UINTEGER(KaxSliceBlockAddID)
-};
-
-DECLARE_MKX_UINTEGER(KaxSliceDelay)
-};
-
-DECLARE_MKX_UINTEGER(KaxSliceDuration)
-};
-
 END_LIBMATROSKA_NAMESPACE
 
 #endif // LIBMATROSKA_BLOCK_ADDITIONAL_H
index fc934d15800d80b5248d76f16bd9570129fc55d6..16560574f2871bf6dc19b1b3af26043f76be1473 100644 (file)
 #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"
-#include "matroska/KaxDefines.h"
-
-using namespace LIBEBML_NAMESPACE;
-
-START_LIBMATROSKA_NAMESPACE
-
-DECLARE_MKX_MASTER(KaxChapters)
-};
-
-DECLARE_MKX_MASTER(KaxEditionEntry)
-};
-
-DECLARE_MKX_UINTEGER(KaxEditionUID)
-};
-
-DECLARE_MKX_UINTEGER(KaxEditionFlagHidden)
-};
-
-DECLARE_MKX_UINTEGER(KaxEditionFlagDefault)
-};
-
-DECLARE_MKX_UINTEGER(KaxEditionFlagOrdered)
-};
-
-DECLARE_MKX_MASTER(KaxChapterAtom)
-};
-
-DECLARE_MKX_UINTEGER(KaxChapterUID)
-};
-
-DECLARE_MKX_UINTEGER(KaxChapterTimeStart)
-};
-
-DECLARE_MKX_UINTEGER(KaxChapterTimeEnd)
-};
-
-DECLARE_MKX_UINTEGER(KaxChapterFlagHidden)
-};
-
-DECLARE_MKX_UINTEGER(KaxChapterFlagEnabled)
-};
-
-DECLARE_MKX_BINARY(KaxChapterSegmentUID)
-    public:
-           virtual bool ValidateSize() const { return IsFiniteSize() && (GetSize() == 16);}
-};
-
-DECLARE_MKX_BINARY(KaxChapterSegmentEditionUID)
-    public:
-           virtual bool ValidateSize() const { return IsFiniteSize() && (GetSize() == 16);}
-};
-
-DECLARE_MKX_UINTEGER(KaxChapterPhysicalEquiv)
-};
-
-DECLARE_MKX_MASTER(KaxChapterTrack)
-};
-
-DECLARE_MKX_UINTEGER(KaxChapterTrackNumber)
-};
-
-DECLARE_MKX_MASTER(KaxChapterDisplay)
-};
-
-DECLARE_MKX_UNISTRING(KaxChapterString)
-};
-
-DECLARE_MKX_STRING(KaxChapterLanguage)
-};
-
-DECLARE_MKX_STRING(KaxChapterCountry)
-};
-
-DECLARE_MKX_MASTER(KaxChapterProcess)
-};
-
-DECLARE_MKX_UINTEGER(KaxChapterProcessCodecID)
-};
-
-DECLARE_MKX_BINARY(KaxChapterProcessPrivate)
-};
-
-DECLARE_MKX_MASTER(KaxChapterProcessCommand)
-};
-
-DECLARE_MKX_UINTEGER(KaxChapterProcessTime)
-};
-
-DECLARE_MKX_BINARY(KaxChapterProcessData)
-};
-
-END_LIBMATROSKA_NAMESPACE
+#include "matroska/KaxSemantic.h"
 
 #endif // LIBMATROSKA_CHAPTERS_H
index a8a676648a665b8e83263721d92b5c3ad4df171e..5b194ceeed52c81bca7f27cf92f875ecd77b73a6 100644 (file)
-/****************************************************************************\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
-#include "matroska/KaxDefines.h"\r
-\r
-using namespace LIBEBML_NAMESPACE;\r
-\r
-START_LIBMATROSKA_NAMESPACE\r
-\r
-class KaxSegment;\r
-\r
-DECLARE_MKX_MASTER_CONS(KaxCluster)\r
-       public:\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
-               filepos_t 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
-\r
-END_LIBMATROSKA_NAMESPACE\r
-\r
-#endif // LIBMATROSKA_CLUSTER_H\r
+/****************************************************************************
+** libmatroska : parse Matroska files, see http://www.matroska.org/
+**
+** <file/class description>
+**
+** Copyright (C) 2002-2010 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/KaxDefines.h"
+
+using namespace LIBEBML_NAMESPACE;
+
+START_LIBMATROSKA_NAMESPACE
+
+class KaxSegment;
+
+DECLARE_MKX_MASTER_CONS(KaxCluster)
+       public:
+               /*!
+                       \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
+               */
+               filepos_t 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);
+};
+
+END_LIBMATROSKA_NAMESPACE
+
+#endif // LIBMATROSKA_CLUSTER_H
index c2cbe3dab2d7653e5bd8ed3bef10bb3438526e59..1c314afa315937bda25444ddd74c96f6f3c0c507 100644 (file)
@@ -1,64 +1,40 @@
-/****************************************************************************\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
-#include "matroska/KaxDefines.h"\r
-\r
-using namespace LIBEBML_NAMESPACE;\r
-\r
-START_LIBMATROSKA_NAMESPACE\r
-\r
-DECLARE_MKX_UINTEGER(KaxClusterTimecode)\r
-};\r
-\r
-DECLARE_MKX_MASTER(KaxClusterSilentTracks)\r
-};\r
-\r
-DECLARE_MKX_UINTEGER(KaxClusterSilentTrackNumber)\r
-};\r
-\r
-DECLARE_MKX_UINTEGER(KaxClusterPosition)\r
-};\r
-\r
-DECLARE_MKX_UINTEGER(KaxClusterPrevSize)\r
-};\r
-\r
-END_LIBMATROSKA_NAMESPACE\r
-\r
-#endif // LIBMATROSKA_CLUSTER_DATA_H\r
+/****************************************************************************
+** libmatroska : parse Matroska files, see http://www.matroska.org/
+**
+** <file/class MATROSKA_DLL_API description>
+**
+** Copyright (C) 2002-2010 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/KaxSemantic.h"
+
+#endif // LIBMATROSKA_CLUSTER_DATA_H
index d31928458e2c21b68ea45634dd4c3820383f1bd7..933d9510a38ec693fae32957e74816607f382e15 100644 (file)
@@ -1,95 +1,40 @@
-/****************************************************************************\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
-#include "matroska/KaxDefines.h"\r
-\r
-using namespace LIBEBML_NAMESPACE;\r
-\r
-START_LIBMATROSKA_NAMESPACE\r
-\r
-DECLARE_MKX_MASTER(KaxContentEncodings)\r
-};\r
-\r
-DECLARE_MKX_MASTER(KaxContentEncoding)\r
-};\r
-\r
-DECLARE_MKX_UINTEGER(KaxContentEncodingOrder)\r
-};\r
-\r
-DECLARE_MKX_UINTEGER(KaxContentEncodingScope)\r
-};\r
-\r
-DECLARE_MKX_UINTEGER(KaxContentEncodingType)\r
-};\r
-\r
-DECLARE_MKX_MASTER(KaxContentCompression)\r
-};\r
-\r
-DECLARE_MKX_UINTEGER(KaxContentCompAlgo)\r
-};\r
-\r
-DECLARE_MKX_BINARY(KaxContentCompSettings)\r
-};\r
-\r
-DECLARE_MKX_MASTER(KaxContentEncryption)\r
-};\r
-\r
-DECLARE_MKX_UINTEGER(KaxContentEncAlgo)\r
-};\r
-\r
-DECLARE_MKX_BINARY(KaxContentEncKeyID)\r
-};\r
-\r
-DECLARE_MKX_BINARY(KaxContentSignature)\r
-};\r
-\r
-DECLARE_MKX_BINARY(KaxContentSigKeyID)\r
-};\r
-\r
-DECLARE_MKX_UINTEGER(KaxContentSigAlgo)\r
-};\r
-\r
-DECLARE_MKX_UINTEGER(KaxContentSigHashAlgo)\r
-};\r
-\r
-END_LIBMATROSKA_NAMESPACE\r
-\r
-#endif // LIBMATROSKA_CONTENT_ENCODING_H\r
+/****************************************************************************
+** libmatroska : parse Matroska files, see http://www.matroska.org/
+**
+** <file/class description>
+**
+** Copyright (C) 2002-2010 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 Steve Lhomme     <robux4 @ users.sf.net>
+*/
+#ifndef LIBMATROSKA_CONTENT_ENCODING_H
+#define LIBMATROSKA_CONTENT_ENCODING_H
+
+#include "matroska/KaxSemantic.h"
+
+#endif // LIBMATROSKA_CONTENT_ENCODING_H
index 67b6c74806e951990e3ac1ae837a399ddc887f00..b5471c6cace0cdaf695c1ab3b573cabd71216e42 100644 (file)
-/****************************************************************************\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
-#include "matroska/KaxDefines.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
-DECLARE_MKX_MASTER(KaxCuePoint)\r
-       public:\r
-               void PositionSet(const KaxBlockGroup & BlockReference, uint64 GlobalTimecodeScale);\r
-               void PositionSet(const KaxBlockBlob & BlobReference, uint64 GlobalTimecodeScale);\r
-\r
-               virtual bool IsSmallerThan(const EbmlElement *Cmp) const;\r
-\r
-               const KaxCueTrackPositions * GetSeekPosition() const;\r
-               bool Timecode(uint64 & aTimecode, uint64 GlobalTimecodeScale) const;\r
-};\r
-\r
-DECLARE_MKX_UINTEGER(KaxCueTime)\r
-};\r
-\r
-DECLARE_MKX_MASTER(KaxCueTrackPositions)\r
-       public:\r
-               uint64 ClusterPosition() const;\r
-               uint16 TrackNumber() const;\r
-};\r
-\r
-DECLARE_MKX_UINTEGER(KaxCueTrack)\r
-};\r
-\r
-DECLARE_MKX_UINTEGER(KaxCueClusterPosition)\r
-};\r
-\r
-DECLARE_MKX_UINTEGER(KaxCueBlockNumber)\r
-};\r
-\r
-#if MATROSKA_VERSION >= 2\r
-DECLARE_MKX_UINTEGER(KaxCueCodecState)\r
-};\r
-\r
-DECLARE_MKX_MASTER(KaxCueReference)\r
-       public:\r
-               void AddReference(const KaxBlockGroup & BlockReferenced, uint64 GlobalTimecodeScale);\r
-               void AddReference(const KaxBlockBlob & BlockReferenced, uint64 GlobalTimecodeScale);\r
-};\r
-\r
-DECLARE_MKX_UINTEGER(KaxCueRefTime)\r
-};\r
-\r
-DECLARE_MKX_UINTEGER(KaxCueRefCluster)\r
-};\r
-\r
-DECLARE_MKX_UINTEGER(KaxCueRefNumber)\r
-};\r
-\r
-DECLARE_MKX_UINTEGER(KaxCueRefCodecState)\r
-};\r
-#endif // MATROSKA_VERSION\r
-\r
-END_LIBMATROSKA_NAMESPACE\r
-\r
-#endif // LIBMATROSKA_CUES_DATA_H\r
+/****************************************************************************
+** libmatroska : parse Matroska files, see http://www.matroska.org/
+**
+** <file/class description>
+**
+** Copyright (C) 2002-2010 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"
+#include "matroska/KaxDefines.h"
+
+using namespace LIBEBML_NAMESPACE;
+
+START_LIBMATROSKA_NAMESPACE
+
+class KaxBlockGroup;
+class KaxBlockBlob;
+class KaxCueTrackPositions;
+class KaxInternalBlock;
+
+DECLARE_MKX_MASTER(KaxCuePoint)
+       public:
+               void PositionSet(const KaxBlockGroup & BlockReference, uint64 GlobalTimecodeScale);
+               void PositionSet(const KaxBlockBlob & BlobReference, uint64 GlobalTimecodeScale);
+
+               virtual bool IsSmallerThan(const EbmlElement *Cmp) const;
+
+               const KaxCueTrackPositions * GetSeekPosition() const;
+               bool Timecode(uint64 & aTimecode, uint64 GlobalTimecodeScale) const;
+};
+
+DECLARE_MKX_MASTER(KaxCueTrackPositions)
+       public:
+               uint64 ClusterPosition() const;
+               uint16 TrackNumber() const;
+};
+
+#if MATROSKA_VERSION >= 2
+DECLARE_MKX_MASTER(KaxCueReference)
+       public:
+               void AddReference(const KaxBlockGroup & BlockReferenced, uint64 GlobalTimecodeScale);
+               void AddReference(const KaxBlockBlob & BlockReferenced, uint64 GlobalTimecodeScale);
+};
+#endif // MATROSKA_VERSION
+
+END_LIBMATROSKA_NAMESPACE
+
+#endif // LIBMATROSKA_CUES_DATA_H
index 6d0b9262305b04815d997ae0fd65208977e8d166..bd56372b505a0d876f426f1840105141050fd5a8 100644 (file)
@@ -42,6 +42,7 @@
 #define DEFINE_MKX_MASTER(a,b,c,d,e)         DEFINE_xxx_MASTER(a,b,d,e,EBML_SemanticGlobal)
 #define DEFINE_MKX_MASTER_ORPHAN(a,b,c,d)    DEFINE_xxx_MASTER_ORPHAN(a,b,d,EBML_SemanticGlobal)
 #define DEFINE_MKX_UINTEGER_DEF(a,b,c,d,e,v) DEFINE_xxx_UINTEGER_DEF(a,b,d,e,EBML_SemanticGlobal,v)
+#define DEFINE_MKX_SINTEGER_DEF(a,b,c,d,e,v) DEFINE_xxx_SINTEGER_DEF(a,b,d,e,EBML_SemanticGlobal,v)
 #define DEFINE_MKX_UINTEGER(a,b,c,d,e)       DEFINE_xxx_UINTEGER(a,b,d,e,EBML_SemanticGlobal)
 #define DEFINE_MKX_SINTEGER(a,b,c,d,e)       DEFINE_xxx_SINTEGER(a,b,d,e,EBML_SemanticGlobal)
 #define DEFINE_MKX_SINTEGER_CONS(a,b,c,d,e)  DEFINE_xxx_SINTEGER_CONS(a,b,d,e,EBML_SemanticGlobal)
@@ -130,6 +131,7 @@ class MATROSKA_DLL_API x : public EbmlMaster { \
 #define DEFINE_MKX_MASTER(a,b,c,d,e)         DEFINE_xxx_MASTER(a,b,c,d,e,*GetKaxGlobal_Context)
 #define DEFINE_MKX_MASTER_ORPHAN(a,b,c,d)    DEFINE_xxx_MASTER_ORPHAN(a,b,c,d,*GetKaxGlobal_Context)
 #define DEFINE_MKX_UINTEGER_DEF(a,b,c,d,e,v) DEFINE_xxx_UINTEGER_DEF(a,b,c,d,e,*GetKaxGlobal_Context,v)
+#define DEFINE_MKX_SINTEGER_DEF(a,b,c,d,e,v) DEFINE_xxx_SINTEGER_DEF(a,b,c,d,e,*GetKaxGlobal_Context,v)
 #define DEFINE_MKX_UINTEGER(a,b,c,d,e)       DEFINE_xxx_CLASS(a,b,c,d,e,*GetKaxGlobal_Context)
 #define DEFINE_MKX_SINTEGER(a,b,c,d,e)       DEFINE_xxx_CLASS(a,b,c,d,e,*GetKaxGlobal_Context)
 #define DEFINE_MKX_STRING_DEF(a,b,c,d,e,v)   DEFINE_xxx_STRING_DEF(a,b,c,d,e,*GetKaxGlobal_Context,v)
index 30c744301f6640a6bd2e0b870fb1d5d727725c2a..a42f7a1a3fd499ca7e1844f1a16c9e7cf21a53d7 100644 (file)
@@ -1,58 +1,40 @@
-/****************************************************************************\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
-#include "matroska/KaxDefines.h"\r
-\r
-using namespace LIBEBML_NAMESPACE;\r
-\r
-START_LIBMATROSKA_NAMESPACE\r
-\r
-DECLARE_MKX_MASTER(KaxInfo)\r
-};\r
-\r
-DECLARE_MKX_UNISTRING(KaxMuxingApp)\r
-};\r
-\r
-DECLARE_MKX_UNISTRING(KaxWritingApp)\r
-};\r
-\r
-END_LIBMATROSKA_NAMESPACE\r
-\r
-#endif // LIBMATROSKA_INFO_H\r
+/****************************************************************************
+** libmatroska : parse Matroska files, see http://www.matroska.org/
+**
+** <file/class MATROSKA_DLL_API description>
+**
+** Copyright (C) 2002-2010 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/KaxSemantic.h"
+
+#endif // LIBMATROSKA_INFO_H
index 9434abf8875c6ff8b7336e235785e5ab8ca3516c..51a8b63d76eac1009387149c1eea439f65e1f37f 100644 (file)
 #include "ebml/EbmlDate.h"
 #include "ebml/EbmlMaster.h"
 #include "matroska/KaxDefines.h"
+#include "matroska/KaxSemantic.h"
 
 using namespace LIBEBML_NAMESPACE;
 
 START_LIBMATROSKA_NAMESPACE
 
-DECLARE_MKX_BINARY(KaxSegmentUID)
-       public:
-#if defined(HAVE_EBML2) || defined(HAS_EBML2)
-        KaxSegmentUID(EBML_DEF_CONS EBML_DEF_SEP EBML_EXTRA_PARAM);
-#endif
-               virtual bool ValidateSize() const { return IsFiniteSize() && (GetSize() == 16);}
-};
-
-DECLARE_MKX_UNISTRING(KaxSegmentFilename)
-};
-
 DECLARE_MKX_CONTEXT(KaxPrevUID);
 class MATROSKA_DLL_API KaxPrevUID : public KaxSegmentUID {
        public:
@@ -71,9 +61,6 @@ class MATROSKA_DLL_API KaxPrevUID : public KaxSegmentUID {
         EBML_CONCRETE_CLASS(KaxPrevUID)
 };
 
-DECLARE_MKX_UNISTRING(KaxPrevFilename)
-};
-
 DECLARE_MKX_CONTEXT(KaxNextUID);
 class MATROSKA_DLL_API KaxNextUID : public KaxSegmentUID {
        public:
@@ -84,38 +71,6 @@ class MATROSKA_DLL_API KaxNextUID : public KaxSegmentUID {
         EBML_CONCRETE_CLASS(KaxNextUID)
 };
 
-DECLARE_MKX_UNISTRING(KaxNextFilename)
-};
-
-DECLARE_MKX_BINARY(KaxSegmentFamily)
-       public:
-               virtual bool ValidateSize() const { return IsFiniteSize() && (GetSize() == 16);}
-};
-
-DECLARE_MKX_MASTER(KaxChapterTranslate)
-};
-
-DECLARE_MKX_UINTEGER(KaxChapterTranslateCodec)
-};
-
-DECLARE_MKX_UINTEGER(KaxChapterTranslateEditionUID)
-};
-
-DECLARE_MKX_BINARY(KaxChapterTranslateID)
-};
-
-DECLARE_MKX_UINTEGER(KaxTimecodeScale)
-};
-
-DECLARE_MKX_FLOAT(KaxDuration)
-};
-
-DECLARE_MKX_DATE(KaxDateUTC)
-};
-
-DECLARE_MKX_UNISTRING(KaxTitle)
-};
-
 END_LIBMATROSKA_NAMESPACE
 
 #endif // LIBMATROSKA_INFO_DATA_H
index 84e411e6d01fee3b1846bd0021b529f47f7742d3..14fd13eeb338ee88a943d6dda6931ef15cc26558 100644 (file)
@@ -46,7 +46,13 @@ using namespace LIBEBML_NAMESPACE;
 START_LIBMATROSKA_NAMESPACE
 
 class KaxSegment;
-class KaxSeek;
+
+DECLARE_MKX_MASTER(KaxSeek)
+       public:
+               int64 Location() const;
+               bool IsEbmlId(const EbmlId & aId) const;
+               bool IsEbmlId(const KaxSeek & aPoint) const;
+};
 
 DECLARE_MKX_MASTER(KaxSeekHead)
        public:
@@ -60,21 +66,6 @@ DECLARE_MKX_MASTER(KaxSeekHead)
                KaxSeek * FindNextOf(const KaxSeek &aPrev) const;
 };
 
-DECLARE_MKX_MASTER(KaxSeek)
-       public:
-               int64 Location() const;
-               bool IsEbmlId(const EbmlId & aId) const;
-               bool IsEbmlId(const KaxSeek & aPoint) const;
-};
-
-DECLARE_MKX_BINARY(KaxSeekID)
-       public:
-               virtual bool ValidateSize() const {return IsFiniteSize() && GetSize() <= 4;}
-};
-
-DECLARE_MKX_UINTEGER(KaxSeekPosition)
-};
-
 END_LIBMATROSKA_NAMESPACE
 
 #endif // LIBMATROSKA_SEEK_HEAD_H
diff --git a/matroska/KaxSemantic.h b/matroska/KaxSemantic.h
new file mode 100644 (file)
index 0000000..d1d7973
--- /dev/null
@@ -0,0 +1,709 @@
+/**********************************************************************
+**  DO NOT EDIT, GENERATED WITH DATA2LIB
+** 
+**  libmatroska : parse Matroska files, see http://www.matroska.org/
+** 
+**  Copyright (c) 2002-2010, Matroska (non-profit organisation)
+**  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.
+**
+**********************************************************************/
+
+
+#ifndef LIBMATROSKA_SEMANTIC_H
+#define LIBMATROSKA_SEMANTIC_H
+
+#include "matroska/KaxTypes.h"
+#include "ebml/EbmlUInteger.h"
+#include "ebml/EbmlSInteger.h"
+#include "ebml/EbmlDate.h"
+#include "ebml/EbmlFloat.h"
+#include "ebml/EbmlString.h"
+#include "ebml/EbmlUnicodeString.h"
+#include "ebml/EbmlBinary.h"
+#include "ebml/EbmlMaster.h"
+#include "matroska/KaxDefines.h"
+
+using namespace LIBEBML_NAMESPACE;
+
+START_LIBMATROSKA_NAMESPACE
+
+DECLARE_MKX_BINARY (KaxSeekID)
+public:
+       virtual bool ValidateSize() const {return IsFiniteSize() && GetSize() <= 4;}
+};
+
+DECLARE_MKX_UINTEGER(KaxSeekPosition)
+};
+
+DECLARE_MKX_MASTER(KaxInfo)
+};
+
+
+DECLARE_MKX_BINARY (KaxSegmentUID)
+#if defined(HAVE_EBML2) || defined(HAS_EBML2)
+public:
+       KaxSegmentUID(EBML_DEF_CONS EBML_DEF_SEP EBML_EXTRA_PARAM);
+#endif
+public:
+       virtual bool ValidateSize() const {return IsFiniteSize() && GetSize() == 16;}
+};
+
+DECLARE_MKX_UNISTRING(KaxSegmentFilename)
+};
+
+DECLARE_MKX_UNISTRING(KaxPrevFilename)
+};
+
+DECLARE_MKX_UNISTRING(KaxNextFilename)
+};
+
+DECLARE_MKX_BINARY (KaxSegmentFamily)
+public:
+       virtual bool ValidateSize() const {return IsFiniteSize() && GetSize() == 16;}
+};
+
+DECLARE_MKX_MASTER(KaxChapterTranslate)
+};
+
+
+DECLARE_MKX_UINTEGER(KaxChapterTranslateEditionUID)
+};
+
+DECLARE_MKX_UINTEGER(KaxChapterTranslateCodec)
+};
+
+DECLARE_MKX_BINARY (KaxChapterTranslateID)
+};
+
+DECLARE_MKX_UINTEGER(KaxTimecodeScale)
+};
+
+DECLARE_MKX_FLOAT(KaxDuration)
+};
+
+DECLARE_MKX_DATE    (KaxDateUTC)
+};
+
+DECLARE_MKX_UNISTRING(KaxTitle)
+};
+
+DECLARE_MKX_UNISTRING(KaxMuxingApp)
+};
+
+DECLARE_MKX_UNISTRING(KaxWritingApp)
+};
+
+DECLARE_MKX_UINTEGER(KaxClusterTimecode)
+};
+
+DECLARE_MKX_MASTER(KaxClusterSilentTracks)
+};
+
+
+DECLARE_MKX_UINTEGER(KaxClusterSilentTrackNumber)
+};
+
+DECLARE_MKX_UINTEGER(KaxClusterPosition)
+};
+
+DECLARE_MKX_UINTEGER(KaxClusterPrevSize)
+};
+
+DECLARE_MKX_MASTER(KaxBlockAdditions)
+};
+
+
+DECLARE_MKX_MASTER(KaxBlockMore)
+};
+
+
+DECLARE_MKX_UINTEGER(KaxBlockAddID)
+};
+
+DECLARE_MKX_BINARY (KaxBlockAdditional)
+};
+
+DECLARE_MKX_UINTEGER(KaxBlockDuration)
+};
+
+DECLARE_MKX_UINTEGER(KaxReferencePriority)
+};
+
+#if MATROSKA_VERSION >= 2
+DECLARE_MKX_SINTEGER(KaxReferenceVirtual)
+public:
+       filepos_t RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault);
+};
+
+DECLARE_MKX_BINARY (KaxCodecState)
+};
+#endif
+
+DECLARE_MKX_MASTER(KaxSlices)
+};
+
+
+DECLARE_MKX_MASTER(KaxTimeSlice)
+};
+
+
+DECLARE_MKX_UINTEGER(KaxSliceLaceNumber)
+};
+
+#if MATROSKA_VERSION >= 2
+DECLARE_MKX_UINTEGER(KaxSliceFrameNumber)
+public:
+       filepos_t RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault);
+};
+
+DECLARE_MKX_UINTEGER(KaxSliceBlockAddID)
+public:
+       filepos_t RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault);
+};
+
+DECLARE_MKX_UINTEGER(KaxSliceDelay)
+public:
+       filepos_t RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault);
+};
+
+DECLARE_MKX_UINTEGER(KaxSliceDuration)
+public:
+       filepos_t RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault);
+};
+
+DECLARE_MKX_MASTER(KaxReferenceFrame)
+};
+
+
+DECLARE_MKX_UINTEGER(KaxReferenceOffset)
+};
+
+DECLARE_MKX_UINTEGER(KaxReferenceTimeCode)
+};
+
+DECLARE_MKX_BINARY (KaxEncryptedBlock)
+public:
+       filepos_t RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault);
+};
+#endif
+
+DECLARE_MKX_MASTER(KaxTracks)
+};
+
+
+DECLARE_MKX_UINTEGER(KaxTrackNumber)
+};
+
+DECLARE_MKX_UINTEGER(KaxTrackUID)
+};
+
+DECLARE_MKX_UINTEGER(KaxTrackType)
+};
+
+#if MATROSKA_VERSION >= 2
+DECLARE_MKX_UINTEGER(KaxTrackFlagEnabled)
+};
+#endif
+
+DECLARE_MKX_UINTEGER(KaxTrackFlagDefault)
+};
+
+DECLARE_MKX_UINTEGER(KaxTrackFlagForced)
+};
+
+DECLARE_MKX_UINTEGER(KaxTrackFlagLacing)
+};
+
+DECLARE_MKX_UINTEGER(KaxTrackMinCache)
+};
+
+DECLARE_MKX_UINTEGER(KaxTrackMaxCache)
+};
+
+DECLARE_MKX_UINTEGER(KaxTrackDefaultDuration)
+};
+
+DECLARE_MKX_FLOAT(KaxTrackTimecodeScale)
+};
+
+#if MATROSKA_VERSION >= 2
+DECLARE_MKX_SINTEGER(KaxTrackOffset)
+public:
+       filepos_t RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault);
+};
+#endif
+
+DECLARE_MKX_UINTEGER(KaxMaxBlockAdditionID)
+};
+
+DECLARE_MKX_UNISTRING(KaxTrackName)
+};
+
+DECLARE_MKX_STRING(KaxTrackLanguage)
+};
+
+DECLARE_MKX_STRING(KaxCodecID)
+};
+
+DECLARE_MKX_BINARY (KaxCodecPrivate)
+};
+
+DECLARE_MKX_UNISTRING(KaxCodecName)
+};
+
+DECLARE_MKX_UINTEGER(KaxTrackAttachmentLink)
+};
+
+#if MATROSKA_VERSION >= 2
+DECLARE_MKX_UNISTRING(KaxCodecSettings)
+public:
+       filepos_t RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault);
+};
+
+DECLARE_MKX_STRING(KaxCodecInfoURL)
+public:
+       filepos_t RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault);
+};
+
+DECLARE_MKX_STRING(KaxCodecDownloadURL)
+public:
+       filepos_t RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault);
+};
+
+DECLARE_MKX_UINTEGER(KaxCodecDecodeAll)
+};
+#endif
+
+DECLARE_MKX_UINTEGER(KaxTrackOverlay)
+};
+
+DECLARE_MKX_MASTER(KaxTrackTranslate)
+};
+
+
+DECLARE_MKX_UINTEGER(KaxTrackTranslateEditionUID)
+};
+
+DECLARE_MKX_UINTEGER(KaxTrackTranslateCodec)
+};
+
+DECLARE_MKX_BINARY (KaxTrackTranslateTrackID)
+};
+
+DECLARE_MKX_MASTER(KaxTrackVideo)
+};
+
+
+#if MATROSKA_VERSION >= 2
+DECLARE_MKX_UINTEGER(KaxVideoFlagInterlaced)
+};
+
+DECLARE_MKX_UINTEGER(KaxVideoStereoMode)
+};
+
+DECLARE_MKX_UINTEGER(KaxOldStereoMode)
+public:
+       filepos_t RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault);
+};
+#endif
+
+DECLARE_MKX_UINTEGER(KaxVideoPixelWidth)
+};
+
+DECLARE_MKX_UINTEGER(KaxVideoPixelHeight)
+};
+
+DECLARE_MKX_UINTEGER(KaxVideoPixelCropBottom)
+};
+
+DECLARE_MKX_UINTEGER(KaxVideoPixelCropTop)
+};
+
+DECLARE_MKX_UINTEGER(KaxVideoPixelCropLeft)
+};
+
+DECLARE_MKX_UINTEGER(KaxVideoPixelCropRight)
+};
+
+DECLARE_MKX_UINTEGER(KaxVideoDisplayWidth)
+};
+
+DECLARE_MKX_UINTEGER(KaxVideoDisplayHeight)
+};
+
+DECLARE_MKX_UINTEGER(KaxVideoDisplayUnit)
+};
+
+DECLARE_MKX_UINTEGER(KaxVideoAspectRatio)
+};
+
+DECLARE_MKX_BINARY (KaxVideoColourSpace)
+public:
+       virtual bool ValidateSize() const {return IsFiniteSize() && GetSize() == 4;}
+};
+
+#if MATROSKA_VERSION >= 2
+DECLARE_MKX_FLOAT(KaxVideoGamma)
+public:
+       filepos_t RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault);
+};
+
+DECLARE_MKX_FLOAT(KaxVideoFrameRate)
+public:
+       filepos_t RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault);
+};
+#endif
+
+DECLARE_MKX_MASTER(KaxTrackAudio)
+};
+
+
+DECLARE_MKX_FLOAT(KaxAudioSamplingFreq)
+};
+
+DECLARE_MKX_FLOAT(KaxAudioOutputSamplingFreq)
+};
+
+DECLARE_MKX_UINTEGER(KaxAudioChannels)
+};
+
+#if MATROSKA_VERSION >= 2
+DECLARE_MKX_BINARY (KaxAudioPosition)
+public:
+       filepos_t RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault);
+};
+#endif
+
+DECLARE_MKX_UINTEGER(KaxAudioBitDepth)
+};
+
+#if MATROSKA_VERSION >= 2
+DECLARE_MKX_MASTER(KaxTrackOperation)
+};
+
+
+DECLARE_MKX_MASTER(KaxTrackCombinePlanes)
+};
+
+
+DECLARE_MKX_MASTER(KaxTrackPlane)
+};
+
+
+DECLARE_MKX_UINTEGER(KaxTrackPlaneUID)
+};
+
+DECLARE_MKX_UINTEGER(KaxTrackPlaneType)
+};
+
+DECLARE_MKX_MASTER(KaxTrackJoinBlocks)
+};
+
+
+DECLARE_MKX_UINTEGER(KaxTrackJoinUID)
+};
+
+DECLARE_MKX_UINTEGER(KaxTrickTrackUID)
+};
+
+DECLARE_MKX_BINARY (KaxTrickTrackSegmentUID)
+public:
+       virtual bool ValidateSize() const {return IsFiniteSize() && GetSize() == 16;}
+};
+
+DECLARE_MKX_UINTEGER(KaxTrickTrackFlag)
+};
+
+DECLARE_MKX_UINTEGER(KaxTrickMasterTrackUID)
+};
+
+DECLARE_MKX_BINARY (KaxTrickMasterTrackSegmentUID)
+public:
+       virtual bool ValidateSize() const {return IsFiniteSize() && GetSize() == 16;}
+};
+#endif
+
+DECLARE_MKX_MASTER(KaxContentEncodings)
+};
+
+
+DECLARE_MKX_MASTER(KaxContentEncoding)
+};
+
+
+DECLARE_MKX_UINTEGER(KaxContentEncodingOrder)
+};
+
+DECLARE_MKX_UINTEGER(KaxContentEncodingScope)
+};
+
+DECLARE_MKX_UINTEGER(KaxContentEncodingType)
+};
+
+DECLARE_MKX_MASTER(KaxContentCompression)
+};
+
+
+DECLARE_MKX_UINTEGER(KaxContentCompAlgo)
+};
+
+DECLARE_MKX_BINARY (KaxContentCompSettings)
+};
+
+DECLARE_MKX_MASTER(KaxContentEncryption)
+};
+
+
+DECLARE_MKX_UINTEGER(KaxContentEncAlgo)
+};
+
+DECLARE_MKX_BINARY (KaxContentEncKeyID)
+};
+
+DECLARE_MKX_BINARY (KaxContentSignature)
+};
+
+DECLARE_MKX_BINARY (KaxContentSigKeyID)
+};
+
+DECLARE_MKX_UINTEGER(KaxContentSigAlgo)
+};
+
+DECLARE_MKX_UINTEGER(KaxContentSigHashAlgo)
+};
+
+DECLARE_MKX_UINTEGER(KaxCueTime)
+};
+
+DECLARE_MKX_UINTEGER(KaxCueTrack)
+};
+
+DECLARE_MKX_UINTEGER(KaxCueClusterPosition)
+};
+
+DECLARE_MKX_UINTEGER(KaxCueBlockNumber)
+};
+
+#if MATROSKA_VERSION >= 2
+DECLARE_MKX_UINTEGER(KaxCueCodecState)
+};
+
+DECLARE_MKX_UINTEGER(KaxCueRefTime)
+};
+
+DECLARE_MKX_UINTEGER(KaxCueRefCluster)
+public:
+       filepos_t RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault);
+};
+
+DECLARE_MKX_UINTEGER(KaxCueRefNumber)
+public:
+       filepos_t RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault);
+};
+
+DECLARE_MKX_UINTEGER(KaxCueRefCodecState)
+public:
+       filepos_t RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault);
+};
+#endif
+
+DECLARE_MKX_MASTER(KaxAttachments)
+};
+
+
+DECLARE_MKX_MASTER(KaxAttached)
+};
+
+
+DECLARE_MKX_UNISTRING(KaxFileDescription)
+};
+
+DECLARE_MKX_UNISTRING(KaxFileName)
+};
+
+DECLARE_MKX_STRING(KaxMimeType)
+};
+
+DECLARE_MKX_BINARY (KaxFileData)
+};
+
+DECLARE_MKX_UINTEGER(KaxFileUID)
+};
+
+#if MATROSKA_VERSION >= 2
+DECLARE_MKX_BINARY (KaxFileReferral)
+public:
+       filepos_t RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault);
+};
+
+DECLARE_MKX_UINTEGER(KaxFileUsedStartTime)
+};
+
+DECLARE_MKX_UINTEGER(KaxFileUsedEndTime)
+};
+#endif
+
+DECLARE_MKX_MASTER(KaxChapters)
+};
+
+
+DECLARE_MKX_MASTER(KaxEditionEntry)
+};
+
+
+DECLARE_MKX_UINTEGER(KaxEditionUID)
+};
+
+DECLARE_MKX_UINTEGER(KaxEditionFlagHidden)
+};
+
+DECLARE_MKX_UINTEGER(KaxEditionFlagDefault)
+};
+
+DECLARE_MKX_UINTEGER(KaxEditionFlagOrdered)
+};
+
+DECLARE_MKX_MASTER(KaxChapterAtom)
+};
+
+
+DECLARE_MKX_UINTEGER(KaxChapterUID)
+};
+
+DECLARE_MKX_UINTEGER(KaxChapterTimeStart)
+};
+
+DECLARE_MKX_UINTEGER(KaxChapterTimeEnd)
+};
+
+DECLARE_MKX_UINTEGER(KaxChapterFlagHidden)
+};
+
+DECLARE_MKX_UINTEGER(KaxChapterFlagEnabled)
+};
+
+DECLARE_MKX_BINARY (KaxChapterSegmentUID)
+public:
+       virtual bool ValidateSize() const {return IsFiniteSize() && GetSize() == 16;}
+};
+
+DECLARE_MKX_BINARY (KaxChapterSegmentEditionUID)
+public:
+       virtual bool ValidateSize() const {return IsFiniteSize() && GetSize() == 16;}
+};
+
+DECLARE_MKX_UINTEGER(KaxChapterPhysicalEquiv)
+};
+
+DECLARE_MKX_MASTER(KaxChapterTrack)
+};
+
+
+DECLARE_MKX_UINTEGER(KaxChapterTrackNumber)
+};
+
+DECLARE_MKX_MASTER(KaxChapterDisplay)
+};
+
+
+DECLARE_MKX_UNISTRING(KaxChapterString)
+};
+
+DECLARE_MKX_STRING(KaxChapterLanguage)
+};
+
+DECLARE_MKX_STRING(KaxChapterCountry)
+};
+
+DECLARE_MKX_MASTER(KaxChapterProcess)
+};
+
+
+DECLARE_MKX_UINTEGER(KaxChapterProcessCodecID)
+};
+
+DECLARE_MKX_BINARY (KaxChapterProcessPrivate)
+};
+
+DECLARE_MKX_MASTER(KaxChapterProcessCommand)
+};
+
+
+DECLARE_MKX_UINTEGER(KaxChapterProcessTime)
+};
+
+DECLARE_MKX_BINARY (KaxChapterProcessData)
+};
+
+DECLARE_MKX_MASTER(KaxTags)
+};
+
+
+DECLARE_MKX_MASTER(KaxTag)
+};
+
+
+DECLARE_MKX_MASTER(KaxTagTargets)
+};
+
+
+DECLARE_MKX_UINTEGER(KaxTagTargetTypeValue)
+};
+
+DECLARE_MKX_STRING(KaxTagTargetType)
+};
+
+DECLARE_MKX_UINTEGER(KaxTagTrackUID)
+};
+
+DECLARE_MKX_UINTEGER(KaxTagEditionUID)
+};
+
+DECLARE_MKX_UINTEGER(KaxTagChapterUID)
+};
+
+DECLARE_MKX_UINTEGER(KaxTagAttachmentUID)
+};
+
+DECLARE_MKX_MASTER(KaxTagSimple)
+};
+
+
+DECLARE_MKX_UNISTRING(KaxTagName)
+};
+
+DECLARE_MKX_STRING(KaxTagLangue)
+};
+
+DECLARE_MKX_UINTEGER(KaxTagDefault)
+};
+
+DECLARE_MKX_UNISTRING(KaxTagString)
+};
+
+DECLARE_MKX_BINARY (KaxTagBinary)
+};
+
+END_LIBMATROSKA_NAMESPACE
+
+#endif // LIBMATROSKA_SEMANTIC_H
index 92668eda7c6be96efa85a4bb11aa340ebf0994bf..e44d3d73181df809af30f39aeeb4fb19afc6ade0 100644 (file)
 /*!
        \file
        \version \$Id$
-       \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"
-#include "matroska/KaxDefines.h"
-
-using namespace LIBEBML_NAMESPACE;
-
-START_LIBMATROSKA_NAMESPACE
-
-DECLARE_MKX_MASTER(KaxTag)
-};
-
-DECLARE_MKX_MASTER(KaxTagTargets)
-};
-
-DECLARE_MKX_UINTEGER(KaxTagTargetTypeValue)
-};
-
-DECLARE_MKX_STRING(KaxTagTargetType)
-};
-
-DECLARE_MKX_UINTEGER(KaxTagTrackUID)
-};
-
-DECLARE_MKX_UINTEGER(KaxTagEditionUID)
-};
-
-DECLARE_MKX_UINTEGER(KaxTagChapterUID)
-};
-
-DECLARE_MKX_UINTEGER(KaxTagAttachmentUID)
-};
-
-DECLARE_MKX_STRING(KaxTagLanguage)
-};
-
-DECLARE_MKX_MASTER(KaxTagSimple)
-};
-
-DECLARE_MKX_UNISTRING(KaxTagName)
-};
-
-DECLARE_MKX_STRING(KaxTagLangue)
-};
-
-DECLARE_MKX_UINTEGER(KaxTagDefault)
-};
-
-DECLARE_MKX_UNISTRING(KaxTagString)
-};
-
-DECLARE_MKX_BINARY(KaxTagBinary)
-};
-
-END_LIBMATROSKA_NAMESPACE
+#include "matroska/KaxSemantic.h"
 
 #endif // LIBMATROSKA_TAG_H
index 376b19e76fdd6ded12e115efb378f9c08ab3ba13..6981ed37579c7a779bc2ce6b4e6341087942880e 100644 (file)
@@ -1,51 +1,40 @@
-/****************************************************************************\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
-#include "matroska/KaxDefines.h"\r
-\r
-using namespace LIBEBML_NAMESPACE;\r
-\r
-START_LIBMATROSKA_NAMESPACE\r
-\r
-DECLARE_MKX_MASTER(KaxTags)\r
-};\r
-\r
-END_LIBMATROSKA_NAMESPACE\r
-\r
-#endif // LIBMATROSKA_TAGS_H\r
+/****************************************************************************
+** libmatroska : parse Matroska files, see http://www.matroska.org/
+**
+** <file/class MATROSKA_DLL_API description>
+**
+** Copyright (C) 2002-2010 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/KaxSemantic.h"
+
+#endif // LIBMATROSKA_TAGS_H
index 20cb65a89c8c1414a0454216adf1fa36ae9412f6..33bf4e6c2d85ffb10bbd2b39fb586bc6219db098 100644 (file)
@@ -1,71 +1,40 @@
-/****************************************************************************\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
-#include "matroska/KaxDefines.h"\r
-\r
-using namespace LIBEBML_NAMESPACE;\r
-\r
-START_LIBMATROSKA_NAMESPACE\r
-\r
-DECLARE_MKX_MASTER(KaxTrackAudio)\r
-};\r
-\r
-DECLARE_MKX_FLOAT(KaxAudioSamplingFreq)\r
-};\r
-\r
-DECLARE_MKX_FLOAT(KaxAudioOutputSamplingFreq)\r
-};\r
-\r
-DECLARE_MKX_UINTEGER(KaxAudioChannels)\r
-};\r
-\r
-#if MATROSKA_VERSION >= 2\r
-DECLARE_MKX_BINARY(KaxAudioPosition)\r
-};\r
-#endif // MATROSKA_VERSION\r
-\r
-DECLARE_MKX_UINTEGER(KaxAudioBitDepth)\r
-};\r
-\r
-END_LIBMATROSKA_NAMESPACE\r
-\r
-#endif // LIBMATROSKA_TRACK_AUDIO_H\r
+/****************************************************************************
+** libmatroska : parse Matroska files, see http://www.matroska.org/
+**
+** <file/class MATROSKA_DLL_API description>
+**
+** Copyright (C) 2002-2010 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/KaxSemantic.h"
+
+#endif // LIBMATROSKA_TRACK_AUDIO_H
index 3ec9ea0f1bfe40d8f440b3e95bb60dcc2e5db0f8..339a9e42b16330007c47a245c61c7d8be456df76 100644 (file)
        \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"
-#include "matroska/KaxDefines.h"
-
-using namespace LIBEBML_NAMESPACE;
-
-START_LIBMATROSKA_NAMESPACE
-
-DECLARE_MKX_UINTEGER(KaxTrackNumber)
-};
-
-DECLARE_MKX_UINTEGER(KaxTrackUID)
-};
-
-DECLARE_MKX_UINTEGER(KaxTrackType)
-};
-
-#if MATROSKA_VERSION >= 2
-DECLARE_MKX_UINTEGER(KaxTrackFlagEnabled)
-};
-#endif // MATROSKA_VERSION
-
-DECLARE_MKX_UINTEGER(KaxTrackFlagDefault)
-};
-
-DECLARE_MKX_UINTEGER(KaxTrackFlagForced)
-};
-
-DECLARE_MKX_UINTEGER(KaxTrackFlagLacing)
-};
-
-DECLARE_MKX_UINTEGER(KaxTrackMinCache)
-};
-
-DECLARE_MKX_UINTEGER(KaxTrackMaxCache)
-};
-
-DECLARE_MKX_UINTEGER(KaxTrackDefaultDuration)
-};
-
-DECLARE_MKX_FLOAT(KaxTrackTimecodeScale)
-};
-
-DECLARE_MKX_UINTEGER(KaxMaxBlockAdditionID)
-};
-
-DECLARE_MKX_UNISTRING(KaxTrackName)
-};
-
-DECLARE_MKX_STRING(KaxTrackLanguage)
-};
-
-DECLARE_MKX_STRING(KaxCodecID)
-};
-
-DECLARE_MKX_BINARY(KaxCodecPrivate)
-};
-
-DECLARE_MKX_UNISTRING(KaxCodecName)
-};
-
-DECLARE_MKX_UINTEGER(KaxTrackAttachmentLink)
-};
-
-DECLARE_MKX_UINTEGER(KaxTrackOverlay)
-};
-
-DECLARE_MKX_MASTER(KaxTrackTranslate)
-};
-
-DECLARE_MKX_UINTEGER(KaxTrackTranslateCodec)
-};
-
-DECLARE_MKX_UINTEGER(KaxTrackTranslateEditionUID)
-};
-
-DECLARE_MKX_BINARY(KaxTrackTranslateTrackID)
-};
-
-#if MATROSKA_VERSION >= 2
-DECLARE_MKX_UNISTRING(KaxCodecSettings)
-};
-
-DECLARE_MKX_STRING(KaxCodecInfoURL)
-};
-
-DECLARE_MKX_STRING(KaxCodecDownloadURL)
-};
-
-DECLARE_MKX_UINTEGER(KaxCodecDecodeAll)
-};
-#endif // MATROSKA_VERSION
-
-END_LIBMATROSKA_NAMESPACE
+#include "matroska/KaxSemantic.h"
 
 #endif // LIBMATROSKA_TRACK_ENTRY_DATA_H
index f4ec47c0c34674e519184c78d4b59338caf39866..00d0e5ed4660badc0adcfac76f52418f32ae6f2e 100644 (file)
 #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"
-#include "matroska/KaxDefines.h"
-
-using namespace LIBEBML_NAMESPACE;
-
-START_LIBMATROSKA_NAMESPACE
-
-DECLARE_MKX_MASTER(KaxTrackVideo)
-};
-
-#if MATROSKA_VERSION >= 2
-DECLARE_MKX_UINTEGER(KaxVideoFlagInterlaced)
-};
-
-DECLARE_MKX_UINTEGER(KaxVideoStereoMode)
-};
-#endif // MATROSKA_VERSION
-
-DECLARE_MKX_UINTEGER(KaxVideoPixelWidth)
-};
-
-DECLARE_MKX_UINTEGER(KaxVideoPixelHeight)
-};
-
-DECLARE_MKX_UINTEGER(KaxVideoPixelCropBottom)
-};
-
-DECLARE_MKX_UINTEGER(KaxVideoPixelCropTop)
-};
-
-DECLARE_MKX_UINTEGER(KaxVideoPixelCropLeft)
-};
-
-DECLARE_MKX_UINTEGER(KaxVideoPixelCropRight)
-};
-
-DECLARE_MKX_UINTEGER(KaxVideoDisplayWidth)
-};
-
-DECLARE_MKX_UINTEGER(KaxVideoDisplayHeight)
-};
-
-#if MATROSKA_VERSION >= 2
-DECLARE_MKX_UINTEGER(KaxVideoDisplayUnit)
-};
-
-DECLARE_MKX_UINTEGER(KaxVideoAspectRatio)
-};
-#endif // MATROSKA_VERSION
-
-DECLARE_MKX_BINARY(KaxVideoColourSpace)
-       public:
-        bool ValidateSize(void) const {return IsFiniteSize() && (GetSize() == 4);}
-};
-
-#if MATROSKA_VERSION >= 2
-DECLARE_MKX_FLOAT(KaxVideoGamma)
-};
-#endif // MATROSKA_VERSION
-
-DECLARE_MKX_FLOAT(KaxVideoFrameRate)
-       public:
-               filepos_t RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault);
-};
-
-
-END_LIBMATROSKA_NAMESPACE
+#include "matroska/KaxSemantic.h"
 
 #endif // LIBMATROSKA_TRACK_VIDEO_H
index 30223b168ba4be5abedc94af85d714cb908df77d..7903daa7286be0fbf73cd677e008e238dc59fd3c 100644 (file)
 #include "matroska/KaxTypes.h"
 #include "ebml/EbmlMaster.h"
 #include "ebml/EbmlUInteger.h"
-#include "matroska/KaxTrackEntryData.h"
 #include "matroska/KaxDefines.h"
+#include "matroska/KaxSemantic.h"
 
 using namespace LIBEBML_NAMESPACE;
 
 START_LIBMATROSKA_NAMESPACE
 
-DECLARE_MKX_MASTER(KaxTracks)
-};
-
 DECLARE_MKX_MASTER(KaxTrackEntry)
        public:
                EbmlUInteger & TrackNumber() const { return *(static_cast<EbmlUInteger *>(FindElt(EBML_INFO(KaxTrackNumber)))); }
@@ -76,29 +73,6 @@ DECLARE_MKX_MASTER(KaxTrackEntry)
                uint64 mGlobalTimecodeScale;
 };
 
-#if MATROSKA_VERSION >= 2
-DECLARE_MKX_MASTER(KaxTrackOperation)
-};
-
-DECLARE_MKX_MASTER(KaxTrackCombinePlanes)
-};
-
-DECLARE_MKX_MASTER(KaxTrackPlane)
-};
-
-DECLARE_MKX_UINTEGER(KaxTrackPlaneUID)
-};
-
-DECLARE_MKX_UINTEGER(KaxTrackPlaneType)
-};
-
-DECLARE_MKX_MASTER(KaxTrackJoinBlocks)
-};
-
-DECLARE_MKX_UINTEGER(KaxTrackJoinUID)
-};
-#endif
-
 END_LIBMATROSKA_NAMESPACE
 
 #endif // LIBMATROSKA_TRACKS_H
index 7f5143452333fc273e4f71c3a76ecb209146108d..0955fdb9bffc83789a0802778f5dc703be541793 100644 (file)
@@ -32,9 +32,9 @@
        \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"
 #include "matroska/KaxDefines.h"
+#include "matroska/KaxSemantic.h"
 
 // sub elements
 
@@ -42,27 +42,6 @@ using namespace LIBEBML_NAMESPACE;
 
 START_LIBMATROSKA_NAMESPACE
 
-DEFINE_START_SEMANTIC(KaxAttached)
-DEFINE_SEMANTIC_ITEM(true, true, KaxFileName)
-DEFINE_SEMANTIC_ITEM(true, true, KaxMimeType)
-DEFINE_SEMANTIC_ITEM(true, true, KaxFileData)
-DEFINE_SEMANTIC_ITEM(false, true, KaxFileDescription)
-DEFINE_SEMANTIC_ITEM(true, true, KaxFileUID)
-#if MATROSKA_VERSION >= 2
-DEFINE_SEMANTIC_ITEM(false, true, KaxFileReferral)
-#endif // MATROSKA_VERSION
-DEFINE_END_SEMANTIC(KaxAttached)
-
-DEFINE_MKX_MASTER_CONS(KaxAttached,        0x61A7, 2, KaxAttachments, "AttachedFile");
-DEFINE_MKX_UNISTRING  (KaxFileDescription, 0x467E, 2, KaxAttached, "FileDescription");
-DEFINE_MKX_UNISTRING  (KaxFileName,        0x466E, 2, KaxAttached, "FileName");
-DEFINE_MKX_STRING     (KaxMimeType,        0x4660, 2, KaxAttached, "FileMimeType");
-DEFINE_MKX_BINARY     (KaxFileData,        0x465C, 2, KaxAttached, "FileData");
-DEFINE_MKX_UINTEGER   (KaxFileUID,         0x46AE, 2, KaxAttached, "FileUID");
-#if MATROSKA_VERSION >= 2
-DEFINE_MKX_BINARY     (KaxFileReferral,    0x4675, 2, KaxAttached, "FileReferral");
-#endif
-
 KaxAttached::KaxAttached(EBML_EXTRA_DEF)
  :EbmlMaster(EBML_CLASS_SEMCONTEXT(KaxAttached) EBML_DEF_SEP EBML_EXTRA_CALL)
 {
index f555588894efda4fa60eea509c8caa72a629a5a4..9bfc7eecb7879baef7b7f56a153c0a2c2af2bca0 100644 (file)
@@ -1,57 +1,50 @@
-/****************************************************************************\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
-#include "matroska/KaxDefines.h"\r
-\r
-using namespace LIBEBML_NAMESPACE;\r
-\r
-// sub elements\r
-START_LIBMATROSKA_NAMESPACE\r
-\r
-DEFINE_START_SEMANTIC(KaxAttachments)\r
-DEFINE_SEMANTIC_ITEM(true, false, KaxAttached)        ///< EBMLVersion\r
-DEFINE_END_SEMANTIC(KaxAttachments)\r
-\r
-DEFINE_MKX_MASTER_CONS(KaxAttachments, 0x1941A469, 4, KaxSegment, "Attachments");\r
-\r
-KaxAttachments::KaxAttachments(EBML_EXTRA_DEF)\r
- :EbmlMaster(EBML_CLASS_SEMCONTEXT(KaxAttachments) EBML_DEF_SEP EBML_EXTRA_CALL)\r
-{\r
-       SetSizeLength(2); // mandatory min size support (for easier updating) (2^(7*2)-2 = 16Ko)\r
-}\r
-\r
-END_LIBMATROSKA_NAMESPACE\r
+/****************************************************************************
+** libmatroska : parse Matroska files, see http://www.matroska.org/
+**
+** <file/class description>
+**
+** Copyright (C) 2002-2010 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/KaxContexts.h"
+#include "matroska/KaxDefines.h"
+#include "matroska/KaxSemantic.h"
+
+using namespace LIBEBML_NAMESPACE;
+
+// sub elements
+START_LIBMATROSKA_NAMESPACE
+
+KaxAttachments::KaxAttachments(EBML_EXTRA_DEF)
+ :EbmlMaster(EBML_CLASS_SEMCONTEXT(KaxAttachments) EBML_DEF_SEP EBML_EXTRA_CALL)
+{
+       SetSizeLength(2); // mandatory min size support (for easier updating) (2^(7*2)-2 = 16Ko)
+}
+
+END_LIBMATROSKA_NAMESPACE
index ec8cc3f1c16cf48d6f6afd3d1a50f46f9d5cca70..6d01a51693fa05e6aa1ee5536383a608e172988e 100644 (file)
 
 START_LIBMATROSKA_NAMESPACE
 
-DEFINE_START_SEMANTIC(KaxBlockGroup)
-DEFINE_SEMANTIC_ITEM(true, true, KaxBlock)
-#if MATROSKA_VERSION >= 2
-DEFINE_SEMANTIC_ITEM(false, true, KaxBlockVirtual)
-#endif // MATROSKA_VERSION
-DEFINE_SEMANTIC_ITEM(false, true, KaxBlockDuration)
-DEFINE_SEMANTIC_ITEM(false, true, KaxSlices)
-DEFINE_SEMANTIC_ITEM(true, true, KaxReferencePriority)
-DEFINE_SEMANTIC_ITEM(false, false, KaxReferenceBlock)
-#if MATROSKA_VERSION >= 2
-DEFINE_SEMANTIC_ITEM(false, true, KaxReferenceVirtual)
-DEFINE_SEMANTIC_ITEM(false, true, KaxCodecState)
-#endif // MATROSKA_VERSION
-DEFINE_SEMANTIC_ITEM(false, true, KaxBlockAdditions)
-DEFINE_END_SEMANTIC(KaxBlockGroup)
-
-DEFINE_START_SEMANTIC(KaxBlockAdditions)
-DEFINE_SEMANTIC_ITEM(true,  false,  KaxBlockMore)
-DEFINE_END_SEMANTIC(KaxBlockAdditions)
-
-DEFINE_START_SEMANTIC(KaxBlockMore)
-DEFINE_SEMANTIC_ITEM(true, true, KaxBlockAddID)
-DEFINE_SEMANTIC_ITEM(true,  true,  KaxBlockAdditional)
-DEFINE_END_SEMANTIC(KaxBlockMore)
-
-DEFINE_MKX_MASTER_CONS (KaxBlockGroup,       0xA0, 1, KaxCluster, "BlockGroup");
-DEFINE_MKX_BINARY_CONS (KaxBlock,            0xA1, 1, KaxBlockGroup, "Block");
-DEFINE_MKX_UINTEGER    (KaxBlockDuration,    0x9B, 1, KaxBlockGroup, "BlockDuration");
-#if MATROSKA_VERSION >= 2
-DEFINE_MKX_BINARY_CONS (KaxSimpleBlock,      0xA3, 1, KaxCluster, "SimpleBlock");
-DEFINE_MKX_BINARY_CONS (KaxBlockVirtual,     0xA2, 1, KaxBlockGroup, "BlockVirtual");
-DEFINE_MKX_BINARY      (KaxCodecState,       0xA4, 1, KaxBlockGroup, "CodecState");
-#endif
-DEFINE_MKX_MASTER      (KaxBlockAdditions, 0x75A1, 2, KaxBlockGroup, "BlockAdditions");
-DEFINE_MKX_MASTER      (KaxBlockMore,        0xA6, 1, KaxBlockAdditions, "BlockMore");
-DEFINE_MKX_UINTEGER_DEF(KaxBlockAddID,       0xEE, 1, KaxBlockMore, "BlockAddID", 1);
-DEFINE_MKX_BINARY      (KaxBlockAdditional,  0xA5, 1, KaxBlockMore, "BlockAdditional");
-
-
 DataBuffer * DataBuffer::Clone()
 {
        binary *ClonedData = (binary *)malloc(mySize * sizeof(binary));
index 249f9b0d71630ccc580c870aeb3c93c78b01704a..f0de31d80120436d2317d03e8aa90c45b39b5518 100644 (file)
 #include "matroska/KaxContexts.h"
 #include "matroska/KaxBlock.h"
 #include "matroska/KaxDefines.h"
+#include "matroska/KaxSemantic.h"
 
 using namespace LIBEBML_NAMESPACE;
 
 START_LIBMATROSKA_NAMESPACE
 
-DEFINE_START_SEMANTIC(KaxSlices)
-DEFINE_SEMANTIC_ITEM(false, false, KaxTimeSlice)
-DEFINE_END_SEMANTIC(KaxSlices)
-
-DEFINE_START_SEMANTIC(KaxTimeSlice)
-DEFINE_SEMANTIC_ITEM(false, true, KaxSliceLaceNumber)
-DEFINE_SEMANTIC_ITEM(false, true, KaxSliceFrameNumber)
-DEFINE_SEMANTIC_ITEM(false, true, KaxSliceBlockAddID)
-DEFINE_SEMANTIC_ITEM(false, true, KaxSliceDelay)
-DEFINE_SEMANTIC_ITEM(false, true, KaxSliceDuration)
-DEFINE_END_SEMANTIC(KaxTimeSlice)
-
-DEFINE_MKX_UINTEGER_DEF (KaxReferencePriority, 0xFA, 1, KaxBlockGroup, "FlagReferenced", 0);
-DEFINE_MKX_SINTEGER_CONS(KaxReferenceBlock,    0xFB, 1, KaxBlockGroup, "ReferenceBlock");
-DEFINE_MKX_MASTER       (KaxSlices,            0x8E, 1, KaxBlockGroup, "Slices");
-DEFINE_MKX_MASTER       (KaxTimeSlice,         0xE8, 1, KaxSlices, "TimeSlice");
-DEFINE_MKX_UINTEGER_DEF (KaxSliceLaceNumber,   0xCC, 1, KaxTimeSlice, "SliceLaceNumber", 0);
-DEFINE_MKX_UINTEGER_DEF (KaxSliceFrameNumber,  0xCD, 1, KaxTimeSlice, "SliceFrameNumber", 0);
-DEFINE_MKX_UINTEGER_DEF (KaxSliceBlockAddID,   0xCB, 1, KaxTimeSlice, "SliceBlockAddID", 0);
-DEFINE_MKX_UINTEGER_DEF (KaxSliceDelay,        0xCE, 1, KaxTimeSlice, "SliceDelay", 0);
-DEFINE_MKX_UINTEGER_DEF (KaxSliceDuration,     0xCF, 1, KaxTimeSlice, "SliceDuration", 0);
-#if MATROSKA_VERSION >= 2
-DEFINE_MKX_SINTEGER     (KaxReferenceVirtual,  0xFD, 1, KaxBlockGroup, "ReferenceVirtual");
-#endif
-
-
 const KaxBlockBlob & KaxReferenceBlock::RefBlock() const
 {
        assert(RefdBlock != NULL);
diff --git a/src/KaxChapters.cpp b/src/KaxChapters.cpp
deleted file mode 100644 (file)
index d42c424..0000000
+++ /dev/null
@@ -1,118 +0,0 @@
-/****************************************************************************
-** libmatroska : parse Matroska files, see http://www.matroska.org/
-**
-** <file/class description>
-**
-** Copyright (C) 2002-2010 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"
-#include "matroska/KaxDefines.h"
-
-// sub elements
-START_LIBMATROSKA_NAMESPACE
-
-DEFINE_START_SEMANTIC(KaxChapters)
-DEFINE_SEMANTIC_ITEM(true, false, KaxEditionEntry)
-DEFINE_END_SEMANTIC(KaxChapters)
-
-DEFINE_START_SEMANTIC(KaxEditionEntry)
-DEFINE_SEMANTIC_ITEM(false, true, KaxEditionUID)
-DEFINE_SEMANTIC_ITEM(true, true, KaxEditionFlagHidden)
-DEFINE_SEMANTIC_ITEM(true, true, KaxEditionFlagDefault)
-DEFINE_SEMANTIC_ITEM(false, true, KaxEditionFlagOrdered)
-DEFINE_SEMANTIC_ITEM(true, false, KaxChapterAtom)
-DEFINE_END_SEMANTIC(KaxEditionEntry)
-
-DEFINE_START_SEMANTIC(KaxChapterAtom)
-DEFINE_SEMANTIC_ITEM(false, false, KaxChapterAtom)
-DEFINE_SEMANTIC_ITEM(true, true, KaxChapterUID)
-DEFINE_SEMANTIC_ITEM(true, true, KaxChapterTimeStart)
-DEFINE_SEMANTIC_ITEM(false, true, KaxChapterTimeEnd)
-DEFINE_SEMANTIC_ITEM(true, true, KaxChapterFlagHidden)
-DEFINE_SEMANTIC_ITEM(true, true, KaxChapterFlagEnabled)
-DEFINE_SEMANTIC_ITEM(false, true, KaxChapterSegmentUID)
-DEFINE_SEMANTIC_ITEM(false, true, KaxChapterSegmentEditionUID)
-DEFINE_SEMANTIC_ITEM(false, true, KaxChapterPhysicalEquiv)
-DEFINE_SEMANTIC_ITEM(false, true, KaxChapterTrack)
-DEFINE_SEMANTIC_ITEM(false, false, KaxChapterDisplay)
-DEFINE_SEMANTIC_ITEM(false, false, KaxChapterProcess)
-DEFINE_END_SEMANTIC(KaxChapterAtom)
-
-DEFINE_START_SEMANTIC(KaxChapterTrack)
-DEFINE_SEMANTIC_ITEM(true, false, KaxChapterTrackNumber)
-DEFINE_END_SEMANTIC(KaxChapterTrack)
-
-DEFINE_START_SEMANTIC(KaxChapterDisplay)
-DEFINE_SEMANTIC_ITEM(true, true, KaxChapterString)
-DEFINE_SEMANTIC_ITEM(true, false, KaxChapterLanguage)
-DEFINE_SEMANTIC_ITEM(false, false, KaxChapterCountry)
-DEFINE_END_SEMANTIC(KaxChapterDisplay)
-
-DEFINE_START_SEMANTIC(KaxChapterProcess)
-DEFINE_SEMANTIC_ITEM(true, true, KaxChapterProcessCodecID)
-DEFINE_SEMANTIC_ITEM(false, true, KaxChapterProcessPrivate)
-DEFINE_SEMANTIC_ITEM(false, false, KaxChapterProcessCommand)
-DEFINE_END_SEMANTIC(KaxChapterProcess)
-
-DEFINE_START_SEMANTIC(KaxChapterProcessCommand)
-DEFINE_SEMANTIC_ITEM(true, true, KaxChapterProcessTime)
-DEFINE_SEMANTIC_ITEM(true, true, KaxChapterProcessData)
-DEFINE_END_SEMANTIC(KaxChapterProcessCommand)
-
-DEFINE_MKX_MASTER      (KaxChapters,             0x1043A770, 4, KaxSegment, "Chapters");
-DEFINE_MKX_MASTER      (KaxEditionEntry,             0x45B9, 2, KaxChapters, "EditionEntry");
-DEFINE_MKX_UINTEGER    (KaxEditionUID,               0x45BC, 2, KaxEditionEntry, "EditionUID");
-DEFINE_MKX_UINTEGER_DEF(KaxEditionFlagHidden,        0x45BD, 2, KaxEditionEntry, "EditionFlagHidden", 0);
-DEFINE_MKX_UINTEGER_DEF(KaxEditionFlagDefault,       0x45DB, 2, KaxEditionEntry, "EditionFlagDefault", 0);
-DEFINE_MKX_UINTEGER_DEF(KaxEditionFlagOrdered,       0x45DD, 2, KaxEditionEntry, "EditionFlagOrdered", 0);
-DEFINE_MKX_MASTER      (KaxChapterAtom,                0xB6, 1, KaxEditionEntry, "ChapterAtom");
-DEFINE_MKX_UINTEGER    (KaxChapterUID,               0x73C4, 2, KaxChapterAtom, "ChapterUID");
-DEFINE_MKX_UINTEGER    (KaxChapterTimeStart,           0x91, 1, KaxChapterAtom, "ChapterTimeStart");
-DEFINE_MKX_UINTEGER    (KaxChapterTimeEnd,             0x92, 1, KaxChapterAtom, "ChapterTimeEnd");
-DEFINE_MKX_UINTEGER_DEF(KaxChapterFlagHidden,          0x98, 1, KaxChapterAtom, "ChapterFlagHidden", 0);
-DEFINE_MKX_UINTEGER_DEF(KaxChapterFlagEnabled,       0x4598, 2, KaxChapterAtom, "ChapterFlagEnabled", 1);
-DEFINE_MKX_BINARY      (KaxChapterSegmentUID,        0x6E67, 2, KaxChapterAtom, "ChapterSegmentUID");
-DEFINE_MKX_BINARY      (KaxChapterSegmentEditionUID, 0x6EBC, 2, KaxChapterAtom, "ChapterSegmentEditionUID");
-DEFINE_MKX_UINTEGER    (KaxChapterPhysicalEquiv,     0x63C3, 2, KaxChapterAtom, "ChapterPhysicalEquiv");
-DEFINE_MKX_MASTER      (KaxChapterTrack,               0x8F, 1, KaxChapterAtom, "ChapterTrack");
-DEFINE_MKX_UINTEGER    (KaxChapterTrackNumber,         0x89, 1, KaxChapterTrack, "ChapterTrackNumber");
-DEFINE_MKX_MASTER      (KaxChapterDisplay,             0x80, 1, KaxChapterAtom, "ChapterDisplay");
-DEFINE_MKX_UNISTRING   (KaxChapterString,              0x85, 1, KaxChapterDisplay, "ChapterString");
-DEFINE_MKX_STRING_DEF  (KaxChapterLanguage,          0x437C, 2, KaxChapterDisplay, "ChapterLanguage", "eng"); // parent context ?
-DEFINE_MKX_STRING      (KaxChapterCountry,           0x437E, 2, KaxChapterDisplay, "ChapterCountry"); // parent context ?
-DEFINE_MKX_MASTER      (KaxChapterProcess,           0x6944, 2, KaxChapterAtom, "ChapterProcess");
-DEFINE_MKX_UINTEGER_DEF(KaxChapterProcessCodecID,    0x6955, 2, KaxChapterProcess, "ChapterProcessCodecID", 0);
-DEFINE_MKX_BINARY      (KaxChapterProcessPrivate,    0x450D, 2, KaxChapterProcess, "ChapterProcessPrivate");
-DEFINE_MKX_MASTER      (KaxChapterProcessCommand,    0x6911, 2, KaxChapterProcess, "ChapterProcessCommand");
-DEFINE_MKX_UINTEGER    (KaxChapterProcessTime,       0x6922, 2, KaxChapterProcessCommand, "ChapterProcessTime");
-DEFINE_MKX_BINARY      (KaxChapterProcessData,       0x6933, 2, KaxChapterProcessCommand, "ChapterProcessData");
-
-END_LIBMATROSKA_NAMESPACE
index d6e485f566192a27b16c50337e3f68561b84b05a..438729a4816afd9fcd96de563e61bfb2e2e35ab9 100644 (file)
-/****************************************************************************\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
-#include "matroska/KaxDefines.h"\r
-\r
-// sub elements\r
-START_LIBMATROSKA_NAMESPACE\r
-\r
-DEFINE_START_SEMANTIC(KaxCluster)\r
-DEFINE_SEMANTIC_ITEM(true, true, KaxClusterTimecode)\r
-DEFINE_SEMANTIC_ITEM(false, true, KaxClusterSilentTracks)\r
-DEFINE_SEMANTIC_ITEM(false, true, KaxClusterPrevSize)\r
-DEFINE_SEMANTIC_ITEM(false, false, KaxBlockGroup)\r
-#if MATROSKA_VERSION == 2\r
-DEFINE_SEMANTIC_ITEM(false, false, KaxSimpleBlock)\r
-#endif\r
-DEFINE_SEMANTIC_ITEM(false, true, KaxClusterPosition)\r
-DEFINE_END_SEMANTIC(KaxCluster)\r
-\r
-DEFINE_MKX_MASTER_CONS(KaxCluster, 0x1F43B675, 4, KaxSegment, "Cluster");\r
-\r
-KaxCluster::KaxCluster(EBML_EXTRA_DEF)\r
-       :EbmlMaster(EBML_CLASS_SEMCONTEXT(KaxCluster) EBML_DEF_SEP EBML_EXTRA_CALL)\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
-       EBML_MASTER_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
-        ++Itr;\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
-filepos_t KaxCluster::Render(IOCallback & output, KaxCues & CueToUpdate, bool bSaveDefault)\r
-{\r
-       filepos_t Result = 0;\r
-    size_t Index;\r
-    EBML_MASTER_ITERATOR TrkItr, Itr;\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 (TrkItr = MyTracks.begin(); TrkItr != MyTracks.end(); ++TrkItr)\r
-            {\r
-                               if (EbmlId(*(*TrkItr)) == EBML_ID(KaxTrackEntry))\r
-                               {\r
-                                       KaxTrackEntry & entry = *static_cast<KaxTrackEntry *>(*TrkItr);\r
-                                       uint32 tracknum = entry.TrackNumber();\r
-                       for (Itr = begin(); Itr != end(); ++Itr)\r
-                    {\r
-                                               if (EbmlId(*(*Itr)) == EBML_ID(KaxBlockGroup)) {\r
-                                                       KaxBlockGroup & group = *static_cast<KaxBlockGroup *>(*Itr);\r
-                                                       if (group.TrackNumber() == tracknum)\r
-                                                               break; // this track is used\r
-                                               }\r
-                                       }\r
-                                       // the track wasn't found in this cluster\r
-                                       if (Itr == end())\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 (Itr = begin(); Itr != end(); ++Itr)\r
-        {\r
-                       if (EbmlId(*(*Itr)) == EBML_ID(KaxBlockGroup)) {\r
-                               CueToUpdate.PositionSet(*static_cast<const KaxBlockGroup *>(*Itr));\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 (TrkItr = MyTracks.begin(); TrkItr != MyTracks.end(); ++TrkItr)\r
-            {\r
-                               if (EbmlId(*(*TrkItr)) == EBML_ID(KaxTrackEntry))\r
-                               {\r
-                                       KaxTrackEntry & entry = *static_cast<KaxTrackEntry *>(*TrkItr);\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
-    EBML_MASTER_ITERATOR Itr;\r
-    for (Itr = begin(); Itr != end(); ++Itr)\r
-    {\r
-               if (EbmlId(*(*Itr)) == EBML_ID(KaxBlockGroup)) {\r
-                       static_cast<KaxBlockGroup*>(*Itr)->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
+/****************************************************************************
+** libmatroska : parse Matroska files, see http://www.matroska.org/
+**
+** <file/class description>
+**
+** Copyright (C) 2002-2010 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/KaxBlock.h"
+#include "matroska/KaxContexts.h"
+#include "matroska/KaxSegment.h"
+#include "matroska/KaxDefines.h"
+
+// sub elements
+START_LIBMATROSKA_NAMESPACE
+
+KaxCluster::KaxCluster(EBML_EXTRA_DEF)
+       :EbmlMaster(EBML_CLASS_SEMCONTEXT(KaxCluster) EBML_DEF_SEP EBML_EXTRA_CALL)
+       ,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
+       EBML_MASTER_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
+               }
+        ++Itr;
+       }
+}
+
+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
+*/
+filepos_t KaxCluster::Render(IOCallback & output, KaxCues & CueToUpdate, bool bSaveDefault)
+{
+       filepos_t Result = 0;
+    size_t Index;
+    EBML_MASTER_ITERATOR TrkItr, Itr;
+
+       // 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 (TrkItr = MyTracks.begin(); TrkItr != MyTracks.end(); ++TrkItr)
+            {
+                               if (EbmlId(*(*TrkItr)) == EBML_ID(KaxTrackEntry))
+                               {
+                                       KaxTrackEntry & entry = *static_cast<KaxTrackEntry *>(*TrkItr);
+                                       uint32 tracknum = entry.TrackNumber();
+                       for (Itr = begin(); Itr != end(); ++Itr)
+                    {
+                                               if (EbmlId(*(*Itr)) == EBML_ID(KaxBlockGroup)) {
+                                                       KaxBlockGroup & group = *static_cast<KaxBlockGroup *>(*Itr);
+                                                       if (group.TrackNumber() == tracknum)
+                                                               break; // this track is used
+                                               }
+                                       }
+                                       // the track wasn't found in this cluster
+                                       if (Itr == end())
+                                       {
+                                               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 (Itr = begin(); Itr != end(); ++Itr)
+        {
+                       if (EbmlId(*(*Itr)) == EBML_ID(KaxBlockGroup)) {
+                               CueToUpdate.PositionSet(*static_cast<const KaxBlockGroup *>(*Itr));
+                       }
+               }
+       } 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 (TrkItr = MyTracks.begin(); TrkItr != MyTracks.end(); ++TrkItr)
+            {
+                               if (EbmlId(*(*TrkItr)) == EBML_ID(KaxTrackEntry))
+                               {
+                                       KaxTrackEntry & entry = *static_cast<KaxTrackEntry *>(*TrkItr);
+                                       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()
+{
+    EBML_MASTER_ITERATOR Itr;
+    for (Itr = begin(); Itr != end(); ++Itr)
+    {
+               if (EbmlId(*(*Itr)) == EBML_ID(KaxBlockGroup)) {
+                       static_cast<KaxBlockGroup*>(*Itr)->ReleaseFrames();
+               }
+       }
+}
+
+uint64 KaxCluster::GetPosition() const
+{
+       assert(ParentSegment != NULL);
+       return ParentSegment->GetRelativePosition(*this);
+}
+
+END_LIBMATROSKA_NAMESPACE
diff --git a/src/KaxClusterData.cpp b/src/KaxClusterData.cpp
deleted file mode 100644 (file)
index 2d6e281..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-/****************************************************************************\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
-#include "matroska/KaxDefines.h"\r
-\r
-START_LIBMATROSKA_NAMESPACE\r
-\r
-DEFINE_START_SEMANTIC(KaxClusterSilentTracks)\r
-DEFINE_SEMANTIC_ITEM(false, false, KaxClusterSilentTrackNumber)\r
-DEFINE_END_SEMANTIC(KaxClusterSilentTracks)\r
-\r
-DEFINE_MKX_UINTEGER(KaxClusterTimecode,            0xE7, 1, KaxCluster, "ClusterTimecode");\r
-DEFINE_MKX_MASTER  (KaxClusterSilentTracks,      0x5854, 2, KaxCluster, "ClusterSilentTracks")\r
-DEFINE_MKX_UINTEGER(KaxClusterSilentTrackNumber, 0x58D7, 2, KaxClusterSilentTracks, "ClusterSilentTrackNumber");\r
-DEFINE_MKX_UINTEGER(KaxClusterPosition,            0xA7, 1, KaxCluster, "ClusterPosition");\r
-DEFINE_MKX_UINTEGER(KaxClusterPrevSize,            0xAB, 1, KaxCluster, "ClusterPrevSize");\r
-\r
-END_LIBMATROSKA_NAMESPACE\r
diff --git a/src/KaxContentEncoding.cpp b/src/KaxContentEncoding.cpp
deleted file mode 100644 (file)
index 4eba4be..0000000
+++ /dev/null
@@ -1,83 +0,0 @@
-/****************************************************************************
-** libmatroska : parse Matroska files, see http://www.matroska.org/
-**
-** <file/class description>
-**
-** Copyright (C) 2002-2010 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"
-#include "matroska/KaxDefines.h"
-
-START_LIBMATROSKA_NAMESPACE
-
-DEFINE_START_SEMANTIC(KaxContentEncodings)
-DEFINE_SEMANTIC_ITEM(true, false, KaxContentEncoding)
-DEFINE_END_SEMANTIC(KaxContentEncodings)
-
-DEFINE_START_SEMANTIC(KaxContentEncoding)
-DEFINE_SEMANTIC_ITEM(true, true, KaxContentEncodingOrder)
-DEFINE_SEMANTIC_ITEM(true, true, KaxContentEncodingScope)
-DEFINE_SEMANTIC_ITEM(true, true, KaxContentEncodingType)
-DEFINE_SEMANTIC_ITEM(false, true, KaxContentCompression)
-DEFINE_SEMANTIC_ITEM(false, true, KaxContentEncryption)
-DEFINE_END_SEMANTIC(KaxContentEncoding)
-
-DEFINE_START_SEMANTIC(KaxContentCompression)
-DEFINE_SEMANTIC_ITEM(true, true, KaxContentCompAlgo)
-DEFINE_SEMANTIC_ITEM(false, true, KaxContentCompSettings)
-DEFINE_END_SEMANTIC(KaxContentCompression)
-
-DEFINE_START_SEMANTIC(KaxContentEncryption)
-DEFINE_SEMANTIC_ITEM(false, true, KaxContentEncAlgo)
-DEFINE_SEMANTIC_ITEM(false, true, KaxContentEncKeyID)
-DEFINE_SEMANTIC_ITEM(false, true, KaxContentSignature)
-DEFINE_SEMANTIC_ITEM(false, true, KaxContentSigKeyID)
-DEFINE_SEMANTIC_ITEM(false, true, KaxContentSigAlgo)
-DEFINE_SEMANTIC_ITEM(false, true, KaxContentSigHashAlgo)
-DEFINE_END_SEMANTIC(KaxContentEncryption)
-
-DEFINE_MKX_MASTER      (KaxContentEncodings,     0x6d80, 2, KaxTrackEntry, "ContentEncodings");
-DEFINE_MKX_MASTER      (KaxContentEncoding,      0x6240, 2, KaxContentEncodings, "ContentEncoding");
-DEFINE_MKX_UINTEGER_DEF(KaxContentEncodingOrder, 0x5031, 2, KaxContentEncoding, "ContentEncodingOrder", 0);
-DEFINE_MKX_UINTEGER_DEF(KaxContentEncodingScope, 0x5032, 2, KaxContentEncoding, "ContentEncodingScope", 1);
-DEFINE_MKX_UINTEGER_DEF(KaxContentEncodingType,  0x5033, 2, KaxContentEncoding, "ContentEncodingType", 0);
-DEFINE_MKX_MASTER      (KaxContentCompression,   0x5034, 2, KaxContentEncoding, "ContentCompression");
-DEFINE_MKX_UINTEGER_DEF(KaxContentCompAlgo,      0x4254, 2, KaxContentCompression, "ContentCompAlgo", 0);
-DEFINE_MKX_BINARY      (KaxContentCompSettings,  0x4255, 2, KaxContentCompression, "ContentCompSettings");
-DEFINE_MKX_MASTER      (KaxContentEncryption,    0x5035, 2, KaxContentEncoding, "ContentEncryption");
-DEFINE_MKX_UINTEGER_DEF(KaxContentEncAlgo,       0x47e1, 2, KaxContentEncryption, "ContentEncAlgo", 0);
-DEFINE_MKX_BINARY      (KaxContentEncKeyID,      0x47e2, 2, KaxContentEncryption, "ContentEncKeyID");
-DEFINE_MKX_BINARY      (KaxContentSignature,     0x47e3, 2, KaxContentEncryption, "ContentSignature");
-DEFINE_MKX_BINARY      (KaxContentSigKeyID,      0x47e4, 2, KaxContentEncryption, "ContentSigKeyID");
-DEFINE_MKX_UINTEGER_DEF(KaxContentSigAlgo,       0x47e5, 2, KaxContentEncryption, "ContentSigAlgo", 0);
-DEFINE_MKX_UINTEGER_DEF(KaxContentSigHashAlgo,   0x47e6, 2, KaxContentEncryption, "ContentSigHashAlgo", 0);
-
-END_LIBMATROSKA_NAMESPACE
index 999d74a422edff6c475f9367c6830fff49d22888..5572358f97dcc2868259f80eae83e63b9924a3e4 100644 (file)
@@ -1,61 +1,59 @@
-/****************************************************************************\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
-#include "matroska/KaxAttached.h"\r
-#include "matroska/KaxAttachments.h"\r
-#include "matroska/KaxBlock.h"\r
-#include "matroska/KaxCluster.h"\r
-#include "matroska/KaxSegment.h"\r
-#include "matroska/KaxTracks.h"\r
-\r
-using namespace LIBEBML_NAMESPACE;\r
-\r
-START_LIBMATROSKA_NAMESPACE\r
-\r
-DEFINE_SEMANTIC_CONTEXT(KaxSegment)\r
-DEFINE_SEMANTIC_CONTEXT(KaxAttached)\r
-DEFINE_SEMANTIC_CONTEXT(KaxAttachments)\r
-DEFINE_SEMANTIC_CONTEXT(KaxBlockGroup)\r
-DEFINE_SEMANTIC_CONTEXT(KaxCluster)\r
-DEFINE_SEMANTIC_CONTEXT(KaxTrackEntry)\r
-\r
-// for the moment\r
-const EbmlSemanticContext & GetKaxGlobal_Context()\r
-{\r
-       return GetEbmlGlobal_Context();\r
-}\r
-\r
-END_LIBMATROSKA_NAMESPACE\r
+/****************************************************************************
+** libmatroska : parse Matroska files, see http://www.matroska.org/
+**
+** <file/class description>
+**
+** Copyright (C) 2002-2010 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"
+#include "matroska/KaxBlock.h"
+#include "matroska/KaxCluster.h"
+#include "matroska/KaxSegment.h"
+#include "matroska/KaxTracks.h"
+
+using namespace LIBEBML_NAMESPACE;
+
+START_LIBMATROSKA_NAMESPACE
+
+DEFINE_SEMANTIC_CONTEXT(KaxSegment)
+DEFINE_SEMANTIC_CONTEXT(KaxAttached)
+DEFINE_SEMANTIC_CONTEXT(KaxAttachments)
+DEFINE_SEMANTIC_CONTEXT(KaxBlockGroup)
+DEFINE_SEMANTIC_CONTEXT(KaxCluster)
+DEFINE_SEMANTIC_CONTEXT(KaxTrackEntry)
+
+// for the moment
+const EbmlSemanticContext & GetKaxGlobal_Context()
+{
+       return GetEbmlGlobal_Context();
+}
+
+END_LIBMATROSKA_NAMESPACE
index 9c8e70794fde60e119f743d8fa66396c4ad3adfc..a3c9f7013b71917387458f9e6ab68c391b57d4f9 100644 (file)
 #include "matroska/KaxContexts.h"
 #include "ebml/EbmlStream.h"
 #include "matroska/KaxDefines.h"
+#include "matroska/KaxSemantic.h"
 
 // sub elements
 START_LIBMATROSKA_NAMESPACE
 
-DEFINE_START_SEMANTIC(KaxCues) 
-DEFINE_SEMANTIC_ITEM(true, false, KaxCuePoint)
-DEFINE_END_SEMANTIC(KaxCues) 
-
-DEFINE_MKX_MASTER(KaxCues, 0x1C53BB6B, 4, KaxSegment, "Cues");
-
 KaxCues::~KaxCues()
 {
        assert(myTempReferences.size() == 0); // otherwise that means you have added references and forgot to set the position
index ad5c4934fc6a5908a81f9b66e7c1321f9352db99..a967a9c5eeb4bde54f7f629966dcc0f8054c7e24 100644 (file)
 #include "matroska/KaxCluster.h"
 #include "matroska/KaxSegment.h"
 #include "matroska/KaxDefines.h"
+#include "matroska/KaxSemantic.h"
 
 START_LIBMATROSKA_NAMESPACE
 
-DEFINE_START_SEMANTIC(KaxCuePoint)
-DEFINE_SEMANTIC_ITEM(true, true, KaxCueTime)
-DEFINE_SEMANTIC_ITEM(true, false, KaxCueTrackPositions)
-DEFINE_END_SEMANTIC(KaxCuePoint)
-
-DEFINE_START_SEMANTIC(KaxCueTrackPositions)
-DEFINE_SEMANTIC_ITEM(true, true, KaxCueTrack)
-DEFINE_SEMANTIC_ITEM(true, true, KaxCueClusterPosition)
-DEFINE_SEMANTIC_ITEM(false, true, KaxCueBlockNumber)
-#if MATROSKA_VERSION >= 2
-DEFINE_SEMANTIC_ITEM(false, true, KaxCueCodecState)
-DEFINE_SEMANTIC_ITEM(false, false, KaxCueReference)
-#endif // MATROSKA_VERSION
-DEFINE_END_SEMANTIC(KaxCueTrackPositions)
-
-#if MATROSKA_VERSION >= 2
-DEFINE_START_SEMANTIC(KaxCueReference)
-DEFINE_SEMANTIC_ITEM(true, true, KaxCueRefTime)
-DEFINE_SEMANTIC_ITEM(true, true, KaxCueRefCluster)
-DEFINE_SEMANTIC_ITEM(false, true, KaxCueRefNumber)
-DEFINE_SEMANTIC_ITEM(false, true, KaxCueRefCodecState)
-DEFINE_END_SEMANTIC(KaxCueReference)
-#endif // MATROSKA_VERSION
-
-DEFINE_MKX_MASTER      (KaxCuePoint,           0xBB, 1, KaxCues, "CuePoint");
-DEFINE_MKX_UINTEGER    (KaxCueTime,            0xB3, 1, KaxCuePoint, "CueTime");
-DEFINE_MKX_MASTER      (KaxCueTrackPositions,  0xB7, 1, KaxCuePoint, "CueTrackPositions");
-DEFINE_MKX_UINTEGER    (KaxCueTrack,           0xF7, 1, KaxCueTrackPositions, "CueTrack");
-DEFINE_MKX_UINTEGER    (KaxCueClusterPosition, 0xF1, 1, KaxCueTrackPositions, "CueClusterPosition");
-DEFINE_MKX_UINTEGER_DEF(KaxCueBlockNumber,   0x5378, 2, KaxCueTrackPositions, "CueBlockNumber", 1);
-#if MATROSKA_VERSION >= 2
-DEFINE_MKX_UINTEGER_DEF(KaxCueCodecState,      0xEA, 1, KaxCueTrackPositions, "CueCodecState", 0);
-DEFINE_MKX_MASTER      (KaxCueReference,       0xDB, 1, KaxCueTrackPositions, "CueReference");
-DEFINE_MKX_UINTEGER    (KaxCueRefTime,         0x96, 1, KaxCueReference, "CueRefTime");
-DEFINE_MKX_UINTEGER    (KaxCueRefCluster,      0x97, 1, KaxCueReference, "CueRefCluster");
-DEFINE_MKX_UINTEGER_DEF(KaxCueRefNumber,     0x535F, 2, KaxCueReference, "CueRefNumber", 1);
-DEFINE_MKX_UINTEGER_DEF(KaxCueRefCodecState,   0xEB, 1, KaxCueReference, "CueRefCodecState", 0);
-#endif
-
 /*!
        \todo handle codec state checking
        \todo remove duplicate references (reference to 2 frames that each reference the same frame)
diff --git a/src/KaxInfo.cpp b/src/KaxInfo.cpp
deleted file mode 100644 (file)
index 93ed1c4..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-/****************************************************************************\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
-#include "matroska/KaxDefines.h"\r
-\r
-// sub elements\r
-START_LIBMATROSKA_NAMESPACE\r
-\r
-DEFINE_START_SEMANTIC(KaxInfo)\r
-DEFINE_SEMANTIC_ITEM(false, true, KaxSegmentUID)\r
-DEFINE_SEMANTIC_ITEM(false, true, KaxSegmentFilename)\r
-DEFINE_SEMANTIC_ITEM(false, true, KaxPrevUID)\r
-DEFINE_SEMANTIC_ITEM(false, true, KaxPrevFilename)\r
-DEFINE_SEMANTIC_ITEM(false, true, KaxNextUID)\r
-DEFINE_SEMANTIC_ITEM(false, true, KaxNextFilename)\r
-DEFINE_SEMANTIC_ITEM(false, false, KaxSegmentFamily)\r
-DEFINE_SEMANTIC_ITEM(false, false, KaxChapterTranslate)\r
-DEFINE_SEMANTIC_ITEM(true, true, KaxTimecodeScale)\r
-DEFINE_SEMANTIC_ITEM(false, true, KaxDuration)\r
-DEFINE_SEMANTIC_ITEM(false, true, KaxDateUTC)\r
-DEFINE_SEMANTIC_ITEM(false, true, KaxTitle)\r
-DEFINE_SEMANTIC_ITEM(true, true, KaxMuxingApp)\r
-DEFINE_SEMANTIC_ITEM(true, true, KaxWritingApp)\r
-DEFINE_END_SEMANTIC(KaxInfo)\r
-\r
-DEFINE_MKX_MASTER   (KaxInfo,   0x1549A966, 4, KaxSegment, "Info");\r
-DEFINE_MKX_UNISTRING(KaxMuxingApp,  0x4D80, 2, KaxInfo, "MuxingApp");\r
-DEFINE_MKX_UNISTRING(KaxWritingApp, 0x5741, 2, KaxInfo, "WritingApp");\r
-\r
-END_LIBMATROSKA_NAMESPACE\r
index 0c0e54185b4e38270770ed37deadf63dc482750f..2d90f7f3f8501ede5aacf09e8946013eb3c7b80e 100644 (file)
 #include "matroska/KaxInfoData.h"
 #include "matroska/KaxContexts.h"
 #include "matroska/KaxDefines.h"
+#include "matroska/KaxSemantic.h"
 
 START_LIBMATROSKA_NAMESPACE
 
-DEFINE_START_SEMANTIC(KaxChapterTranslate)
-DEFINE_SEMANTIC_ITEM(false, false, KaxChapterTranslateEditionUID)
-DEFINE_SEMANTIC_ITEM(true, true, KaxChapterTranslateCodec)
-DEFINE_SEMANTIC_ITEM(true, true, KaxChapterTranslateID)
-DEFINE_END_SEMANTIC(KaxChapterTranslate)
-
-DEFINE_MKX_BINARY       (KaxSegmentUID,                 0x73A4, 2, KaxInfo, "SegmentUID");
-DEFINE_MKX_UNISTRING    (KaxSegmentFilename,            0x7384, 2, KaxInfo, "SegmentFilename");
-DEFINE_MKX_BINARY_CONS  (KaxPrevUID,                  0x3CB923, 3, KaxInfo, "PrevUID");
-DEFINE_MKX_UNISTRING    (KaxPrevFilename,             0x3C83AB, 3, KaxInfo, "PrevFilename");
-DEFINE_MKX_BINARY_CONS  (KaxNextUID,                  0x3EB923, 3, KaxInfo, "NextUID");
-DEFINE_MKX_UNISTRING    (KaxNextFilename,             0x3E83BB, 3, KaxInfo, "NextFilename");
-DEFINE_MKX_BINARY       (KaxSegmentFamily,              0x4444, 2, KaxInfo, "SegmentFamily");
-DEFINE_MKX_MASTER       (KaxChapterTranslate,           0x6924, 2, KaxInfo, "ChapterTranslate");
-DEFINE_MKX_UINTEGER     (KaxChapterTranslateEditionUID, 0x69FC, 2, KaxChapterTranslate, "ChapterTranslateEditionUID");
-DEFINE_MKX_UINTEGER     (KaxChapterTranslateCodec,      0x69BF, 2, KaxChapterTranslate, "ChapterTranslateCodec");
-DEFINE_MKX_BINARY       (KaxChapterTranslateID,         0x69A5, 2, KaxChapterTranslate, "ChapterTranslateID");
-DEFINE_MKX_UINTEGER_DEF(KaxTimecodeScale,            0x2AD7B1, 3, KaxInfo, "TimecodeScale", 1000000);
-DEFINE_MKX_FLOAT        (KaxDuration,                   0x4489, 2, KaxInfo, "Duration");
-DEFINE_MKX_DATE         (KaxDateUTC,                    0x4461, 2, KaxInfo, "DateUTC");
-DEFINE_MKX_UNISTRING    (KaxTitle,                      0x7BA9, 2, KaxInfo, "Title");
-
 KaxPrevUID::KaxPrevUID(EBML_EXTRA_DEF)
 :KaxSegmentUID(EBML_DEF_BINARY_CTX(KaxPrevUID) EBML_DEF_SEP EBML_EXTRA_CALL)
 {
index f653cb155fa3d494197004239fc11f9bbfdb0199..25b90833383513c088436f263061401f4acc27bb 100644 (file)
@@ -43,20 +43,6 @@ using namespace LIBEBML_NAMESPACE;
 // sub elements
 START_LIBMATROSKA_NAMESPACE
 
-DEFINE_START_SEMANTIC(KaxSeekHead)
-DEFINE_SEMANTIC_ITEM(true, false, KaxSeek)
-DEFINE_END_SEMANTIC(KaxSeekHead)
-
-DEFINE_START_SEMANTIC(KaxSeek) 
-DEFINE_SEMANTIC_ITEM(true, true, KaxSeekID)
-DEFINE_SEMANTIC_ITEM(true, true, KaxSeekPosition)
-DEFINE_END_SEMANTIC(KaxSeek) 
-
-DEFINE_MKX_MASTER  (KaxSeekHead, 0x114D9B74, 4, KaxSegment, "SeekHeader");
-DEFINE_MKX_MASTER  (KaxSeek,         0x4DBB, 2, KaxSeekHead, "SeekPoint");
-DEFINE_MKX_BINARY  (KaxSeekID,       0x53AB, 2, KaxSeek, "SeekID");
-DEFINE_MKX_UINTEGER(KaxSeekPosition, 0x53AC, 2, KaxSeek, "SeekPosition");
-
 /*!
        \todo verify that the element is not already in the list
 */
index 16355e0b8524be8ee6190506780cf0594e9c2ee8..e0ad5be78a39813de234208c7f4d9ca9c55ca7bc 100644 (file)
 #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"
 #include "matroska/KaxDefines.h"
 
 START_LIBMATROSKA_NAMESPACE
 
-DEFINE_START_SEMANTIC(KaxMatroska)
-DEFINE_SEMANTIC_ITEM(true, true, EbmlHead)
-DEFINE_SEMANTIC_ITEM(true, false, KaxSegment)
-DEFINE_END_SEMANTIC(KaxMatroska)
-
-DEFINE_START_SEMANTIC(KaxSegment)
-DEFINE_SEMANTIC_ITEM(false, false, KaxCluster)
-DEFINE_SEMANTIC_ITEM(false, false, KaxSeekHead)
-DEFINE_SEMANTIC_ITEM(false, true, KaxCues)
-DEFINE_SEMANTIC_ITEM(false, false, KaxTracks)
-DEFINE_SEMANTIC_ITEM(true, false, KaxInfo)
-DEFINE_SEMANTIC_ITEM(false, true, KaxChapters)
-DEFINE_SEMANTIC_ITEM(false, true, KaxAttachments)
-DEFINE_SEMANTIC_ITEM(false, false, KaxTags)
-DEFINE_END_SEMANTIC(KaxSegment)
-
-DEFINE_MKX_CONTEXT(KaxMatroska);
-
-DEFINE_MKX_MASTER_ORPHAN(KaxSegment, 0x18538067, 4, "Segment\0rotomopogo");
-
 KaxSegment::KaxSegment(EBML_EXTRA_DEF)
        :EbmlMaster(EBML_CLASS_SEMCONTEXT(KaxSegment) EBML_DEF_SEP EBML_EXTRA_CALL)
 {
diff --git a/src/KaxSemantic.cpp b/src/KaxSemantic.cpp
new file mode 100644 (file)
index 0000000..29be7d1
--- /dev/null
@@ -0,0 +1,764 @@
+/**********************************************************************\r
+**  DO NOT EDIT, GENERATED WITH DATA2LIB\r
+** \r
+**  libmatroska : parse Matroska files, see http://www.matroska.org/\r
+** \r
+**  Copyright (c) 2002-2010, Matroska (non-profit organisation)\r
+**  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
+#include "matroska/KaxContexts.h"\r
+#include "matroska/KaxSemantic.h"\r
+#include "matroska/KaxSegment.h"\r
+#include "matroska/KaxSeekHead.h"\r
+#include "matroska/KaxCluster.h"\r
+#include "matroska/KaxTracks.h"\r
+#include "matroska/KaxCues.h"\r
+#include "matroska/KaxInfoData.h"\r
+#include "matroska/KaxBlockData.h"\r
+#include "matroska/KaxCuesData.h"\r
+\r
+START_LIBMATROSKA_NAMESPACE\r
+\r
+DEFINE_START_SEMANTIC(KaxSegment)\r
+DEFINE_SEMANTIC_ITEM(false, false, KaxSeekHead)\r
+DEFINE_SEMANTIC_ITEM(true, false, KaxInfo)\r
+DEFINE_SEMANTIC_ITEM(false, false, KaxCluster)\r
+DEFINE_SEMANTIC_ITEM(false, false, KaxTracks)\r
+DEFINE_SEMANTIC_ITEM(false, true, KaxCues)\r
+DEFINE_SEMANTIC_ITEM(false, true, KaxAttachments)\r
+DEFINE_SEMANTIC_ITEM(false, true, KaxChapters)\r
+DEFINE_SEMANTIC_ITEM(false, false, KaxTags)\r
+DEFINE_END_SEMANTIC(KaxSegment)\r
+\r
+DEFINE_MKX_MASTER_ORPHAN(KaxSegment, 0x18538067, 4, "Segment");\r
+\r
+DEFINE_START_SEMANTIC(KaxSeekHead)\r
+DEFINE_SEMANTIC_ITEM(true, false, KaxSeek)\r
+DEFINE_END_SEMANTIC(KaxSeekHead)\r
+\r
+DEFINE_MKX_MASTER(KaxSeekHead, 0x114D9B74, 4, KaxSegment, "SeekHeader");\r
+\r
+DEFINE_START_SEMANTIC(KaxSeek)\r
+DEFINE_SEMANTIC_ITEM(true, true, KaxSeekID)\r
+DEFINE_SEMANTIC_ITEM(true, true, KaxSeekPosition)\r
+DEFINE_END_SEMANTIC(KaxSeek)\r
+\r
+DEFINE_MKX_MASTER(KaxSeek, 0x4DBB, 2, KaxSeekHead, "SeekPoint");\r
+DEFINE_MKX_BINARY (KaxSeekID, 0x53AB, 2, KaxSeek, "SeekID");\r
+DEFINE_MKX_UINTEGER(KaxSeekPosition, 0x53AC, 2, KaxSeek, "SeekPosition");\r
+\r
+DEFINE_START_SEMANTIC(KaxInfo)\r
+DEFINE_SEMANTIC_ITEM(false, true, KaxSegmentUID)\r
+DEFINE_SEMANTIC_ITEM(false, true, KaxSegmentFilename)\r
+DEFINE_SEMANTIC_ITEM(false, true, KaxPrevUID)\r
+DEFINE_SEMANTIC_ITEM(false, true, KaxPrevFilename)\r
+DEFINE_SEMANTIC_ITEM(false, true, KaxNextUID)\r
+DEFINE_SEMANTIC_ITEM(false, true, KaxNextFilename)\r
+DEFINE_SEMANTIC_ITEM(false, false, KaxSegmentFamily)\r
+DEFINE_SEMANTIC_ITEM(false, false, KaxChapterTranslate)\r
+DEFINE_SEMANTIC_ITEM(true, true, KaxTimecodeScale)\r
+DEFINE_SEMANTIC_ITEM(false, true, KaxDuration)\r
+DEFINE_SEMANTIC_ITEM(false, true, KaxDateUTC)\r
+DEFINE_SEMANTIC_ITEM(false, true, KaxTitle)\r
+DEFINE_SEMANTIC_ITEM(true, true, KaxMuxingApp)\r
+DEFINE_SEMANTIC_ITEM(true, true, KaxWritingApp)\r
+DEFINE_END_SEMANTIC(KaxInfo)\r
+\r
+DEFINE_MKX_MASTER(KaxInfo, 0x1549A966, 4, KaxSegment, "Info");\r
+DEFINE_MKX_BINARY (KaxSegmentUID, 0x73A4, 2, KaxInfo, "SegmentUID");\r
+DEFINE_MKX_UNISTRING(KaxSegmentFilename, 0x7384, 2, KaxInfo, "SegmentFilename");\r
+DEFINE_MKX_BINARY_CONS(KaxPrevUID, 0x3CB923, 3, KaxInfo, "PrevUID");\r
+DEFINE_MKX_UNISTRING(KaxPrevFilename, 0x3C83AB, 3, KaxInfo, "PrevFilename");\r
+DEFINE_MKX_BINARY_CONS(KaxNextUID, 0x3EB923, 3, KaxInfo, "NextUID");\r
+DEFINE_MKX_UNISTRING(KaxNextFilename, 0x3E83BB, 3, KaxInfo, "NextFilename");\r
+DEFINE_MKX_BINARY (KaxSegmentFamily, 0x4444, 2, KaxInfo, "SegmentFamily");\r
+\r
+DEFINE_START_SEMANTIC(KaxChapterTranslate)\r
+DEFINE_SEMANTIC_ITEM(false, false, KaxChapterTranslateEditionUID)\r
+DEFINE_SEMANTIC_ITEM(true, true, KaxChapterTranslateCodec)\r
+DEFINE_SEMANTIC_ITEM(true, true, KaxChapterTranslateID)\r
+DEFINE_END_SEMANTIC(KaxChapterTranslate)\r
+\r
+DEFINE_MKX_MASTER(KaxChapterTranslate, 0x6924, 2, KaxInfo, "ChapterTranslate");\r
+DEFINE_MKX_UINTEGER(KaxChapterTranslateEditionUID, 0x69FC, 2, KaxChapterTranslate, "ChapterTranslateEditionUID");\r
+DEFINE_MKX_UINTEGER(KaxChapterTranslateCodec, 0x69BF, 2, KaxChapterTranslate, "ChapterTranslateCodec");\r
+DEFINE_MKX_BINARY (KaxChapterTranslateID, 0x69A5, 2, KaxChapterTranslate, "ChapterTranslateID");\r
+DEFINE_MKX_UINTEGER_DEF(KaxTimecodeScale, 0x2AD7B1, 3, KaxInfo, "TimecodeScale", 1000000);\r
+DEFINE_MKX_FLOAT(KaxDuration, 0x4489, 2, KaxInfo, "Duration");\r
+DEFINE_MKX_DATE    (KaxDateUTC, 0x4461, 2, KaxInfo, "DateUTC");\r
+DEFINE_MKX_UNISTRING(KaxTitle, 0x7BA9, 2, KaxInfo, "Title");\r
+DEFINE_MKX_UNISTRING(KaxMuxingApp, 0x4D80, 2, KaxInfo, "MuxingApp");\r
+DEFINE_MKX_UNISTRING(KaxWritingApp, 0x5741, 2, KaxInfo, "WritingApp");\r
+\r
+DEFINE_START_SEMANTIC(KaxCluster)\r
+DEFINE_SEMANTIC_ITEM(true, true, KaxClusterTimecode)\r
+DEFINE_SEMANTIC_ITEM(false, true, KaxClusterSilentTracks)\r
+DEFINE_SEMANTIC_ITEM(false, true, KaxClusterPosition)\r
+DEFINE_SEMANTIC_ITEM(false, true, KaxClusterPrevSize)\r
+#if MATROSKA_VERSION >= 2\r
+DEFINE_SEMANTIC_ITEM(false, false, KaxSimpleBlock)\r
+#endif // MATROSKA_VERSION\r
+DEFINE_SEMANTIC_ITEM(false, false, KaxBlockGroup)\r
+#if MATROSKA_VERSION >= 2\r
+DEFINE_SEMANTIC_ITEM(false, false, KaxEncryptedBlock) // not supported\r
+#endif // MATROSKA_VERSION\r
+DEFINE_END_SEMANTIC(KaxCluster)\r
+\r
+DEFINE_MKX_MASTER_CONS(KaxCluster, 0x1F43B675, 4, KaxSegment, "Cluster");\r
+DEFINE_MKX_UINTEGER(KaxClusterTimecode, 0xE7, 1, KaxCluster, "ClusterTimecode");\r
+\r
+DEFINE_START_SEMANTIC(KaxClusterSilentTracks)\r
+DEFINE_SEMANTIC_ITEM(false, false, KaxClusterSilentTrackNumber)\r
+DEFINE_END_SEMANTIC(KaxClusterSilentTracks)\r
+\r
+DEFINE_MKX_MASTER(KaxClusterSilentTracks, 0x5854, 2, KaxCluster, "ClusterSilentTracks");\r
+DEFINE_MKX_UINTEGER(KaxClusterSilentTrackNumber, 0x58D7, 2, KaxClusterSilentTracks, "ClusterSilentTrackNumber");\r
+DEFINE_MKX_UINTEGER(KaxClusterPosition, 0xA7, 1, KaxCluster, "ClusterPosition");\r
+DEFINE_MKX_UINTEGER(KaxClusterPrevSize, 0xAB, 1, KaxCluster, "ClusterPrevSize");\r
+#if MATROSKA_VERSION >= 2\r
+DEFINE_MKX_BINARY_CONS(KaxSimpleBlock, 0xA3, 1, KaxCluster, "SimpleBlock");\r
+#endif\r
+\r
+DEFINE_START_SEMANTIC(KaxBlockGroup)\r
+DEFINE_SEMANTIC_ITEM(true, true, KaxBlock)\r
+#if MATROSKA_VERSION >= 2\r
+DEFINE_SEMANTIC_ITEM(false, true, KaxBlockVirtual) // not supported\r
+#endif // MATROSKA_VERSION\r
+DEFINE_SEMANTIC_ITEM(false, true, KaxBlockAdditions)\r
+DEFINE_SEMANTIC_ITEM(false, true, KaxBlockDuration)\r
+DEFINE_SEMANTIC_ITEM(true, true, KaxReferencePriority)\r
+DEFINE_SEMANTIC_ITEM(false, false, KaxReferenceBlock)\r
+#if MATROSKA_VERSION >= 2\r
+DEFINE_SEMANTIC_ITEM(false, true, KaxReferenceVirtual) // not supported\r
+DEFINE_SEMANTIC_ITEM(false, true, KaxCodecState)\r
+#endif // MATROSKA_VERSION\r
+DEFINE_SEMANTIC_ITEM(false, true, KaxSlices)\r
+#if MATROSKA_VERSION >= 2\r
+DEFINE_SEMANTIC_ITEM(false, true, KaxReferenceFrame) // DivX specific\r
+#endif // MATROSKA_VERSION\r
+DEFINE_END_SEMANTIC(KaxBlockGroup)\r
+\r
+DEFINE_MKX_MASTER_CONS(KaxBlockGroup, 0xA0, 1, KaxCluster, "BlockGroup");\r
+DEFINE_MKX_BINARY_CONS(KaxBlock, 0xA1, 1, KaxBlockGroup, "Block");\r
+#if MATROSKA_VERSION >= 2\r
+DEFINE_MKX_BINARY_CONS(KaxBlockVirtual, 0xA2, 1, KaxBlockGroup, "BlockVirtual");\r
+#endif\r
+\r
+DEFINE_START_SEMANTIC(KaxBlockAdditions)\r
+DEFINE_SEMANTIC_ITEM(true, false, KaxBlockMore)\r
+DEFINE_END_SEMANTIC(KaxBlockAdditions)\r
+\r
+DEFINE_MKX_MASTER(KaxBlockAdditions, 0x75A1, 2, KaxBlockGroup, "BlockAdditions");\r
+\r
+DEFINE_START_SEMANTIC(KaxBlockMore)\r
+DEFINE_SEMANTIC_ITEM(true, true, KaxBlockAddID)\r
+DEFINE_SEMANTIC_ITEM(true, true, KaxBlockAdditional)\r
+DEFINE_END_SEMANTIC(KaxBlockMore)\r
+\r
+DEFINE_MKX_MASTER(KaxBlockMore, 0xA6, 1, KaxBlockAdditions, "BlockMore");\r
+DEFINE_MKX_UINTEGER_DEF(KaxBlockAddID, 0xEE, 1, KaxBlockMore, "BlockAddID", 1);\r
+DEFINE_MKX_BINARY (KaxBlockAdditional, 0xA5, 1, KaxBlockMore, "BlockAdditional");\r
+DEFINE_MKX_UINTEGER(KaxBlockDuration, 0x9B, 1, KaxBlockGroup, "BlockDuration");\r
+DEFINE_MKX_UINTEGER_DEF(KaxReferencePriority, 0xFA, 1, KaxBlockGroup, "FlagReferenced", 0);\r
+DEFINE_MKX_SINTEGER_CONS(KaxReferenceBlock, 0xFB, 1, KaxBlockGroup, "ReferenceBlock");\r
+#if MATROSKA_VERSION >= 2\r
+DEFINE_MKX_SINTEGER(KaxReferenceVirtual, 0xFD, 1, KaxBlockGroup, "ReferenceVirtual");\r
+DEFINE_MKX_BINARY (KaxCodecState, 0xA4, 1, KaxBlockGroup, "CodecState");\r
+#endif\r
+\r
+DEFINE_START_SEMANTIC(KaxSlices)\r
+DEFINE_SEMANTIC_ITEM(false, false, KaxTimeSlice)\r
+DEFINE_END_SEMANTIC(KaxSlices)\r
+\r
+DEFINE_MKX_MASTER(KaxSlices, 0x8E, 1, KaxBlockGroup, "Slices");\r
+\r
+DEFINE_START_SEMANTIC(KaxTimeSlice)\r
+DEFINE_SEMANTIC_ITEM(false, true, KaxSliceLaceNumber)\r
+#if MATROSKA_VERSION >= 2\r
+DEFINE_SEMANTIC_ITEM(false, true, KaxSliceFrameNumber) // not supported\r
+DEFINE_SEMANTIC_ITEM(false, true, KaxSliceBlockAddID) // not supported\r
+DEFINE_SEMANTIC_ITEM(false, true, KaxSliceDelay) // not supported\r
+DEFINE_SEMANTIC_ITEM(false, true, KaxSliceDuration) // not supported\r
+#endif // MATROSKA_VERSION\r
+DEFINE_END_SEMANTIC(KaxTimeSlice)\r
+\r
+DEFINE_MKX_MASTER(KaxTimeSlice, 0xE8, 1, KaxSlices, "TimeSlice");\r
+DEFINE_MKX_UINTEGER_DEF(KaxSliceLaceNumber, 0xCC, 1, KaxTimeSlice, "SliceLaceNumber", 0);\r
+#if MATROSKA_VERSION >= 2\r
+DEFINE_MKX_UINTEGER_DEF(KaxSliceFrameNumber, 0xCD, 1, KaxTimeSlice, "SliceFrameNumber", 0);\r
+DEFINE_MKX_UINTEGER_DEF(KaxSliceBlockAddID, 0xCB, 1, KaxTimeSlice, "SliceBlockAddID", 0);\r
+DEFINE_MKX_UINTEGER_DEF(KaxSliceDelay, 0xCE, 1, KaxTimeSlice, "SliceDelay", 0);\r
+DEFINE_MKX_UINTEGER_DEF(KaxSliceDuration, 0xCF, 1, KaxTimeSlice, "SliceDuration", 0);\r
+\r
+DEFINE_START_SEMANTIC(KaxReferenceFrame)\r
+DEFINE_SEMANTIC_ITEM(true, true, KaxReferenceOffset) // DivX specific\r
+DEFINE_SEMANTIC_ITEM(true, true, KaxReferenceTimeCode) // DivX specific\r
+DEFINE_END_SEMANTIC(KaxReferenceFrame)\r
+\r
+DEFINE_MKX_MASTER(KaxReferenceFrame, 0xC8, 1, KaxBlockGroup, "ReferenceFrame");\r
+DEFINE_MKX_UINTEGER(KaxReferenceOffset, 0xC9, 1, KaxReferenceFrame, "ReferenceOffset");\r
+DEFINE_MKX_UINTEGER(KaxReferenceTimeCode, 0xCA, 1, KaxReferenceFrame, "ReferenceTimeCode");\r
+DEFINE_MKX_BINARY (KaxEncryptedBlock, 0xAF, 1, KaxCluster, "EncryptedBlock");\r
+#endif\r
+\r
+DEFINE_START_SEMANTIC(KaxTracks)\r
+DEFINE_SEMANTIC_ITEM(true, false, KaxTrackEntry)\r
+DEFINE_END_SEMANTIC(KaxTracks)\r
+\r
+DEFINE_MKX_MASTER(KaxTracks, 0x1654AE6B, 4, KaxSegment, "Tracks");\r
+\r
+DEFINE_START_SEMANTIC(KaxTrackEntry)\r
+DEFINE_SEMANTIC_ITEM(true, true, KaxTrackNumber)\r
+DEFINE_SEMANTIC_ITEM(true, true, KaxTrackUID)\r
+DEFINE_SEMANTIC_ITEM(true, true, KaxTrackType)\r
+#if MATROSKA_VERSION >= 2\r
+DEFINE_SEMANTIC_ITEM(true, true, KaxTrackFlagEnabled)\r
+#endif // MATROSKA_VERSION\r
+DEFINE_SEMANTIC_ITEM(true, true, KaxTrackFlagDefault)\r
+DEFINE_SEMANTIC_ITEM(true, true, KaxTrackFlagForced)\r
+DEFINE_SEMANTIC_ITEM(true, true, KaxTrackFlagLacing)\r
+DEFINE_SEMANTIC_ITEM(true, true, KaxTrackMinCache)\r
+DEFINE_SEMANTIC_ITEM(false, true, KaxTrackMaxCache)\r
+DEFINE_SEMANTIC_ITEM(false, true, KaxTrackDefaultDuration)\r
+DEFINE_SEMANTIC_ITEM(true, true, KaxTrackTimecodeScale)\r
+#if MATROSKA_VERSION >= 2\r
+DEFINE_SEMANTIC_ITEM(false, true, KaxTrackOffset) // not supported\r
+#endif // MATROSKA_VERSION\r
+DEFINE_SEMANTIC_ITEM(true, true, KaxMaxBlockAdditionID)\r
+DEFINE_SEMANTIC_ITEM(false, true, KaxTrackName)\r
+DEFINE_SEMANTIC_ITEM(false, true, KaxTrackLanguage)\r
+DEFINE_SEMANTIC_ITEM(true, true, KaxCodecID)\r
+DEFINE_SEMANTIC_ITEM(false, true, KaxCodecPrivate)\r
+DEFINE_SEMANTIC_ITEM(false, true, KaxCodecName)\r
+DEFINE_SEMANTIC_ITEM(false, true, KaxTrackAttachmentLink)\r
+#if MATROSKA_VERSION >= 2\r
+DEFINE_SEMANTIC_ITEM(false, true, KaxCodecSettings) // not supported\r
+DEFINE_SEMANTIC_ITEM(false, false, KaxCodecInfoURL) // not supported\r
+DEFINE_SEMANTIC_ITEM(false, false, KaxCodecDownloadURL) // not supported\r
+DEFINE_SEMANTIC_ITEM(true, true, KaxCodecDecodeAll)\r
+#endif // MATROSKA_VERSION\r
+DEFINE_SEMANTIC_ITEM(false, false, KaxTrackOverlay)\r
+DEFINE_SEMANTIC_ITEM(false, false, KaxTrackTranslate)\r
+DEFINE_SEMANTIC_ITEM(false, true, KaxTrackVideo)\r
+DEFINE_SEMANTIC_ITEM(false, true, KaxTrackAudio)\r
+#if MATROSKA_VERSION >= 2\r
+DEFINE_SEMANTIC_ITEM(false, true, KaxTrackOperation)\r
+DEFINE_SEMANTIC_ITEM(false, true, KaxTrickTrackUID) // DivX specific\r
+DEFINE_SEMANTIC_ITEM(false, true, KaxTrickTrackSegmentUID) // DivX specific\r
+DEFINE_SEMANTIC_ITEM(false, true, KaxTrickTrackFlag) // DivX specific\r
+DEFINE_SEMANTIC_ITEM(false, true, KaxTrickMasterTrackUID) // DivX specific\r
+DEFINE_SEMANTIC_ITEM(false, true, KaxTrickMasterTrackSegmentUID) // DivX specific\r
+#endif // MATROSKA_VERSION\r
+DEFINE_SEMANTIC_ITEM(false, true, KaxContentEncodings)\r
+DEFINE_END_SEMANTIC(KaxTrackEntry)\r
+\r
+DEFINE_MKX_MASTER_CONS(KaxTrackEntry, 0xAE, 1, KaxTracks, "TrackEntry");\r
+DEFINE_MKX_UINTEGER(KaxTrackNumber, 0xD7, 1, KaxTrackEntry, "TrackNumber");\r
+DEFINE_MKX_UINTEGER(KaxTrackUID, 0x73C5, 2, KaxTrackEntry, "TrackUID");\r
+DEFINE_MKX_UINTEGER(KaxTrackType, 0x83, 1, KaxTrackEntry, "TrackType");\r
+#if MATROSKA_VERSION >= 2\r
+DEFINE_MKX_UINTEGER_DEF(KaxTrackFlagEnabled, 0xB9, 1, KaxTrackEntry, "TrackFlagEnabled", 1);\r
+#endif\r
+DEFINE_MKX_UINTEGER_DEF(KaxTrackFlagDefault, 0x88, 1, KaxTrackEntry, "TrackFlagDefault", 1);\r
+DEFINE_MKX_UINTEGER_DEF(KaxTrackFlagForced, 0x55AA, 2, KaxTrackEntry, "TrackFlagForced", 0);\r
+DEFINE_MKX_UINTEGER_DEF(KaxTrackFlagLacing, 0x9C, 1, KaxTrackEntry, "TrackFlagLacing", 1);\r
+DEFINE_MKX_UINTEGER_DEF(KaxTrackMinCache, 0x6DE7, 2, KaxTrackEntry, "TrackMinCache", 0);\r
+DEFINE_MKX_UINTEGER(KaxTrackMaxCache, 0x6DF8, 2, KaxTrackEntry, "TrackMaxCache");\r
+DEFINE_MKX_UINTEGER(KaxTrackDefaultDuration, 0x23E383, 3, KaxTrackEntry, "TrackDefaultDuration");\r
+DEFINE_MKX_FLOAT_DEF(KaxTrackTimecodeScale, 0x23314F, 3, KaxTrackEntry, "TrackTimecodeScale", 1);\r
+#if MATROSKA_VERSION >= 2\r
+DEFINE_MKX_SINTEGER_DEF(KaxTrackOffset, 0x537F, 2, KaxTrackEntry, "TrackOffset", 0);\r
+#endif\r
+DEFINE_MKX_UINTEGER_DEF(KaxMaxBlockAdditionID, 0x55EE, 2, KaxTrackEntry, "MaxBlockAdditionID", 0);\r
+DEFINE_MKX_UNISTRING(KaxTrackName, 0x536E, 2, KaxTrackEntry, "TrackName");\r
+DEFINE_MKX_STRING_DEF(KaxTrackLanguage, 0x22B59C, 3, KaxTrackEntry, "TrackLanguage", "eng");\r
+DEFINE_MKX_STRING(KaxCodecID, 0x86, 1, KaxTrackEntry, "CodecID");\r
+DEFINE_MKX_BINARY (KaxCodecPrivate, 0x63A2, 2, KaxTrackEntry, "CodecPrivate");\r
+DEFINE_MKX_UNISTRING(KaxCodecName, 0x258688, 3, KaxTrackEntry, "CodecName");\r
+DEFINE_MKX_UINTEGER(KaxTrackAttachmentLink, 0x7446, 2, KaxTrackEntry, "TrackAttachmentLink");\r
+#if MATROSKA_VERSION >= 2\r
+DEFINE_MKX_UNISTRING(KaxCodecSettings, 0x3A9697, 3, KaxTrackEntry, "CodecSettings");\r
+DEFINE_MKX_STRING(KaxCodecInfoURL, 0x3B4040, 3, KaxTrackEntry, "CodecInfoURL");\r
+DEFINE_MKX_STRING(KaxCodecDownloadURL, 0x26B240, 3, KaxTrackEntry, "CodecDownloadURL");\r
+DEFINE_MKX_UINTEGER_DEF(KaxCodecDecodeAll, 0xAA, 1, KaxTrackEntry, "CodecDecodeAll", 1);\r
+#endif\r
+DEFINE_MKX_UINTEGER(KaxTrackOverlay, 0x6FAB, 2, KaxTrackEntry, "TrackOverlay");\r
+\r
+DEFINE_START_SEMANTIC(KaxTrackTranslate)\r
+DEFINE_SEMANTIC_ITEM(false, false, KaxTrackTranslateEditionUID)\r
+DEFINE_SEMANTIC_ITEM(true, true, KaxTrackTranslateCodec)\r
+DEFINE_SEMANTIC_ITEM(true, true, KaxTrackTranslateTrackID)\r
+DEFINE_END_SEMANTIC(KaxTrackTranslate)\r
+\r
+DEFINE_MKX_MASTER(KaxTrackTranslate, 0x6624, 2, KaxTrackEntry, "TrackTranslate");\r
+DEFINE_MKX_UINTEGER(KaxTrackTranslateEditionUID, 0x66FC, 2, KaxTrackTranslate, "TrackTranslateEditionUID");\r
+DEFINE_MKX_UINTEGER(KaxTrackTranslateCodec, 0x66BF, 2, KaxTrackTranslate, "TrackTranslateCodec");\r
+DEFINE_MKX_BINARY (KaxTrackTranslateTrackID, 0x66A5, 2, KaxTrackTranslate, "TrackTranslateTrackID");\r
+\r
+DEFINE_START_SEMANTIC(KaxTrackVideo)\r
+#if MATROSKA_VERSION >= 2\r
+DEFINE_SEMANTIC_ITEM(true, true, KaxVideoFlagInterlaced)\r
+DEFINE_SEMANTIC_ITEM(false, true, KaxVideoStereoMode)\r
+DEFINE_SEMANTIC_ITEM(false, true, KaxOldStereoMode) // not supported\r
+#endif // MATROSKA_VERSION\r
+DEFINE_SEMANTIC_ITEM(true, true, KaxVideoPixelWidth)\r
+DEFINE_SEMANTIC_ITEM(true, true, KaxVideoPixelHeight)\r
+DEFINE_SEMANTIC_ITEM(false, true, KaxVideoPixelCropBottom)\r
+DEFINE_SEMANTIC_ITEM(false, true, KaxVideoPixelCropTop)\r
+DEFINE_SEMANTIC_ITEM(false, true, KaxVideoPixelCropLeft)\r
+DEFINE_SEMANTIC_ITEM(false, true, KaxVideoPixelCropRight)\r
+DEFINE_SEMANTIC_ITEM(false, true, KaxVideoDisplayWidth)\r
+DEFINE_SEMANTIC_ITEM(false, true, KaxVideoDisplayHeight)\r
+DEFINE_SEMANTIC_ITEM(false, true, KaxVideoDisplayUnit)\r
+DEFINE_SEMANTIC_ITEM(false, true, KaxVideoAspectRatio)\r
+DEFINE_SEMANTIC_ITEM(false, true, KaxVideoColourSpace)\r
+#if MATROSKA_VERSION >= 2\r
+DEFINE_SEMANTIC_ITEM(false, true, KaxVideoGamma) // not supported\r
+DEFINE_SEMANTIC_ITEM(false, true, KaxVideoFrameRate) // not supported\r
+#endif // MATROSKA_VERSION\r
+DEFINE_END_SEMANTIC(KaxTrackVideo)\r
+\r
+DEFINE_MKX_MASTER(KaxTrackVideo, 0xE0, 1, KaxTrackEntry, "TrackVideo");\r
+#if MATROSKA_VERSION >= 2\r
+DEFINE_MKX_UINTEGER_DEF(KaxVideoFlagInterlaced, 0x9A, 1, KaxTrackVideo, "VideoFlagInterlaced", 0);\r
+DEFINE_MKX_UINTEGER_DEF(KaxVideoStereoMode, 0x53B8, 2, KaxTrackVideo, "VideoStereoMode", 0);\r
+DEFINE_MKX_UINTEGER(KaxOldStereoMode, 0x53B9, 2, KaxTrackVideo, "OldStereoMode");\r
+#endif\r
+DEFINE_MKX_UINTEGER(KaxVideoPixelWidth, 0xB0, 1, KaxTrackVideo, "VideoPixelWidth");\r
+DEFINE_MKX_UINTEGER(KaxVideoPixelHeight, 0xBA, 1, KaxTrackVideo, "VideoPixelHeight");\r
+DEFINE_MKX_UINTEGER_DEF(KaxVideoPixelCropBottom, 0x54AA, 2, KaxTrackVideo, "VideoPixelCropBottom", 0);\r
+DEFINE_MKX_UINTEGER_DEF(KaxVideoPixelCropTop, 0x54BB, 2, KaxTrackVideo, "VideoPixelCropTop", 0);\r
+DEFINE_MKX_UINTEGER_DEF(KaxVideoPixelCropLeft, 0x54CC, 2, KaxTrackVideo, "VideoPixelCropLeft", 0);\r
+DEFINE_MKX_UINTEGER_DEF(KaxVideoPixelCropRight, 0x54DD, 2, KaxTrackVideo, "VideoPixelCropRight", 0);\r
+DEFINE_MKX_UINTEGER(KaxVideoDisplayWidth, 0x54B0, 2, KaxTrackVideo, "VideoDisplayWidth");\r
+DEFINE_MKX_UINTEGER(KaxVideoDisplayHeight, 0x54BA, 2, KaxTrackVideo, "VideoDisplayHeight");\r
+DEFINE_MKX_UINTEGER_DEF(KaxVideoDisplayUnit, 0x54B2, 2, KaxTrackVideo, "VideoDisplayUnit", 0);\r
+DEFINE_MKX_UINTEGER_DEF(KaxVideoAspectRatio, 0x54B3, 2, KaxTrackVideo, "VideoAspectRatio", 0);\r
+DEFINE_MKX_BINARY (KaxVideoColourSpace, 0x2EB524, 3, KaxTrackVideo, "VideoColourSpace");\r
+#if MATROSKA_VERSION >= 2\r
+DEFINE_MKX_FLOAT(KaxVideoGamma, 0x2FB523, 3, KaxTrackVideo, "VideoGamma");\r
+DEFINE_MKX_FLOAT(KaxVideoFrameRate, 0x2383E3, 3, KaxTrackVideo, "VideoFrameRate");\r
+#endif\r
+\r
+DEFINE_START_SEMANTIC(KaxTrackAudio)\r
+DEFINE_SEMANTIC_ITEM(true, true, KaxAudioSamplingFreq)\r
+DEFINE_SEMANTIC_ITEM(false, true, KaxAudioOutputSamplingFreq)\r
+DEFINE_SEMANTIC_ITEM(true, true, KaxAudioChannels)\r
+#if MATROSKA_VERSION >= 2\r
+DEFINE_SEMANTIC_ITEM(false, true, KaxAudioPosition) // not supported\r
+#endif // MATROSKA_VERSION\r
+DEFINE_SEMANTIC_ITEM(false, true, KaxAudioBitDepth)\r
+DEFINE_END_SEMANTIC(KaxTrackAudio)\r
+\r
+DEFINE_MKX_MASTER(KaxTrackAudio, 0xE1, 1, KaxTrackEntry, "TrackAudio");\r
+DEFINE_MKX_FLOAT_DEF(KaxAudioSamplingFreq, 0xB5, 1, KaxTrackAudio, "AudioSamplingFreq", 8000);\r
+DEFINE_MKX_FLOAT(KaxAudioOutputSamplingFreq, 0x78B5, 2, KaxTrackAudio, "AudioOutputSamplingFreq");\r
+DEFINE_MKX_UINTEGER_DEF(KaxAudioChannels, 0x9F, 1, KaxTrackAudio, "AudioChannels", 1);\r
+#if MATROSKA_VERSION >= 2\r
+DEFINE_MKX_BINARY (KaxAudioPosition, 0x7D7B, 2, KaxTrackAudio, "AudioPosition");\r
+#endif\r
+DEFINE_MKX_UINTEGER(KaxAudioBitDepth, 0x6264, 2, KaxTrackAudio, "AudioBitDepth");\r
+#if MATROSKA_VERSION >= 2\r
+\r
+DEFINE_START_SEMANTIC(KaxTrackOperation)\r
+DEFINE_SEMANTIC_ITEM(false, true, KaxTrackCombinePlanes)\r
+DEFINE_SEMANTIC_ITEM(false, true, KaxTrackJoinBlocks)\r
+DEFINE_END_SEMANTIC(KaxTrackOperation)\r
+\r
+DEFINE_MKX_MASTER(KaxTrackOperation, 0xE2, 1, KaxTrackEntry, "TrackOperation");\r
+\r
+DEFINE_START_SEMANTIC(KaxTrackCombinePlanes)\r
+DEFINE_SEMANTIC_ITEM(true, false, KaxTrackPlane)\r
+DEFINE_END_SEMANTIC(KaxTrackCombinePlanes)\r
+\r
+DEFINE_MKX_MASTER(KaxTrackCombinePlanes, 0xE3, 1, KaxTrackOperation, "TrackCombinePlanes");\r
+\r
+DEFINE_START_SEMANTIC(KaxTrackPlane)\r
+DEFINE_SEMANTIC_ITEM(true, true, KaxTrackPlaneUID)\r
+DEFINE_SEMANTIC_ITEM(true, true, KaxTrackPlaneType)\r
+DEFINE_END_SEMANTIC(KaxTrackPlane)\r
+\r
+DEFINE_MKX_MASTER(KaxTrackPlane, 0xE4, 1, KaxTrackCombinePlanes, "TrackPlane");\r
+DEFINE_MKX_UINTEGER(KaxTrackPlaneUID, 0xE5, 1, KaxTrackPlane, "TrackPlaneUID");\r
+DEFINE_MKX_UINTEGER(KaxTrackPlaneType, 0xE6, 1, KaxTrackPlane, "TrackPlaneType");\r
+\r
+DEFINE_START_SEMANTIC(KaxTrackJoinBlocks)\r
+DEFINE_SEMANTIC_ITEM(true, false, KaxTrackJoinUID)\r
+DEFINE_END_SEMANTIC(KaxTrackJoinBlocks)\r
+\r
+DEFINE_MKX_MASTER(KaxTrackJoinBlocks, 0xE9, 1, KaxTrackOperation, "TrackJoinBlocks");\r
+DEFINE_MKX_UINTEGER(KaxTrackJoinUID, 0xED, 1, KaxTrackJoinBlocks, "TrackJoinUID");\r
+DEFINE_MKX_UINTEGER(KaxTrickTrackUID, 0xC0, 1, KaxTrackEntry, "TrickTrackUID");\r
+DEFINE_MKX_BINARY (KaxTrickTrackSegmentUID, 0xC1, 1, KaxTrackEntry, "TrickTrackSegmentUID");\r
+DEFINE_MKX_UINTEGER_DEF(KaxTrickTrackFlag, 0xC6, 1, KaxTrackEntry, "TrickTrackFlag", 0);\r
+DEFINE_MKX_UINTEGER(KaxTrickMasterTrackUID, 0xC7, 1, KaxTrackEntry, "TrickMasterTrackUID");\r
+DEFINE_MKX_BINARY (KaxTrickMasterTrackSegmentUID, 0xC4, 1, KaxTrackEntry, "TrickMasterTrackSegmentUID");\r
+#endif\r
+\r
+DEFINE_START_SEMANTIC(KaxContentEncodings)\r
+DEFINE_SEMANTIC_ITEM(true, false, KaxContentEncoding)\r
+DEFINE_END_SEMANTIC(KaxContentEncodings)\r
+\r
+DEFINE_MKX_MASTER(KaxContentEncodings, 0x6D80, 2, KaxTrackEntry, "ContentEncodings");\r
+\r
+DEFINE_START_SEMANTIC(KaxContentEncoding)\r
+DEFINE_SEMANTIC_ITEM(true, true, KaxContentEncodingOrder)\r
+DEFINE_SEMANTIC_ITEM(true, true, KaxContentEncodingScope)\r
+DEFINE_SEMANTIC_ITEM(true, true, KaxContentEncodingType)\r
+DEFINE_SEMANTIC_ITEM(false, true, KaxContentCompression)\r
+DEFINE_SEMANTIC_ITEM(false, true, KaxContentEncryption)\r
+DEFINE_END_SEMANTIC(KaxContentEncoding)\r
+\r
+DEFINE_MKX_MASTER(KaxContentEncoding, 0x6240, 2, KaxContentEncodings, "ContentEncoding");\r
+DEFINE_MKX_UINTEGER_DEF(KaxContentEncodingOrder, 0x5031, 2, KaxContentEncoding, "ContentEncodingOrder", 0);\r
+DEFINE_MKX_UINTEGER_DEF(KaxContentEncodingScope, 0x5032, 2, KaxContentEncoding, "ContentEncodingScope", 1);\r
+DEFINE_MKX_UINTEGER_DEF(KaxContentEncodingType, 0x5033, 2, KaxContentEncoding, "ContentEncodingType", 0);\r
+\r
+DEFINE_START_SEMANTIC(KaxContentCompression)\r
+DEFINE_SEMANTIC_ITEM(true, true, KaxContentCompAlgo)\r
+DEFINE_SEMANTIC_ITEM(false, true, KaxContentCompSettings)\r
+DEFINE_END_SEMANTIC(KaxContentCompression)\r
+\r
+DEFINE_MKX_MASTER(KaxContentCompression, 0x5034, 2, KaxContentEncoding, "ContentCompression");\r
+DEFINE_MKX_UINTEGER_DEF(KaxContentCompAlgo, 0x4254, 2, KaxContentCompression, "ContentCompAlgo", 0);\r
+DEFINE_MKX_BINARY (KaxContentCompSettings, 0x4255, 2, KaxContentCompression, "ContentCompSettings");\r
+\r
+DEFINE_START_SEMANTIC(KaxContentEncryption)\r
+DEFINE_SEMANTIC_ITEM(false, true, KaxContentEncAlgo)\r
+DEFINE_SEMANTIC_ITEM(false, true, KaxContentEncKeyID)\r
+DEFINE_SEMANTIC_ITEM(false, true, KaxContentSignature)\r
+DEFINE_SEMANTIC_ITEM(false, true, KaxContentSigKeyID)\r
+DEFINE_SEMANTIC_ITEM(false, true, KaxContentSigAlgo)\r
+DEFINE_SEMANTIC_ITEM(false, true, KaxContentSigHashAlgo)\r
+DEFINE_END_SEMANTIC(KaxContentEncryption)\r
+\r
+DEFINE_MKX_MASTER(KaxContentEncryption, 0x5035, 2, KaxContentEncoding, "ContentEncryption");\r
+DEFINE_MKX_UINTEGER_DEF(KaxContentEncAlgo, 0x47E1, 2, KaxContentEncryption, "ContentEncAlgo", 0);\r
+DEFINE_MKX_BINARY (KaxContentEncKeyID, 0x47E2, 2, KaxContentEncryption, "ContentEncKeyID");\r
+DEFINE_MKX_BINARY (KaxContentSignature, 0x47E3, 2, KaxContentEncryption, "ContentSignature");\r
+DEFINE_MKX_BINARY (KaxContentSigKeyID, 0x47E4, 2, KaxContentEncryption, "ContentSigKeyID");\r
+DEFINE_MKX_UINTEGER_DEF(KaxContentSigAlgo, 0x47E5, 2, KaxContentEncryption, "ContentSigAlgo", 0);\r
+DEFINE_MKX_UINTEGER_DEF(KaxContentSigHashAlgo, 0x47E6, 2, KaxContentEncryption, "ContentSigHashAlgo", 0);\r
+\r
+DEFINE_START_SEMANTIC(KaxCues)\r
+DEFINE_SEMANTIC_ITEM(true, false, KaxCuePoint)\r
+DEFINE_END_SEMANTIC(KaxCues)\r
+\r
+DEFINE_MKX_MASTER(KaxCues, 0x1C53BB6B, 4, KaxSegment, "Cues");\r
+\r
+DEFINE_START_SEMANTIC(KaxCuePoint)\r
+DEFINE_SEMANTIC_ITEM(true, true, KaxCueTime)\r
+DEFINE_SEMANTIC_ITEM(true, false, KaxCueTrackPositions)\r
+DEFINE_END_SEMANTIC(KaxCuePoint)\r
+\r
+DEFINE_MKX_MASTER(KaxCuePoint, 0xBB, 1, KaxCues, "CuePoint");\r
+DEFINE_MKX_UINTEGER(KaxCueTime, 0xB3, 1, KaxCuePoint, "CueTime");\r
+\r
+DEFINE_START_SEMANTIC(KaxCueTrackPositions)\r
+DEFINE_SEMANTIC_ITEM(true, true, KaxCueTrack)\r
+DEFINE_SEMANTIC_ITEM(true, true, KaxCueClusterPosition)\r
+DEFINE_SEMANTIC_ITEM(false, true, KaxCueBlockNumber)\r
+#if MATROSKA_VERSION >= 2\r
+DEFINE_SEMANTIC_ITEM(false, true, KaxCueCodecState)\r
+DEFINE_SEMANTIC_ITEM(false, false, KaxCueReference)\r
+#endif // MATROSKA_VERSION\r
+DEFINE_END_SEMANTIC(KaxCueTrackPositions)\r
+\r
+DEFINE_MKX_MASTER(KaxCueTrackPositions, 0xB7, 1, KaxCuePoint, "CueTrackPositions");\r
+DEFINE_MKX_UINTEGER(KaxCueTrack, 0xF7, 1, KaxCueTrackPositions, "CueTrack");\r
+DEFINE_MKX_UINTEGER(KaxCueClusterPosition, 0xF1, 1, KaxCueTrackPositions, "CueClusterPosition");\r
+DEFINE_MKX_UINTEGER_DEF(KaxCueBlockNumber, 0x5378, 2, KaxCueTrackPositions, "CueBlockNumber", 1);\r
+#if MATROSKA_VERSION >= 2\r
+DEFINE_MKX_UINTEGER_DEF(KaxCueCodecState, 0xEA, 1, KaxCueTrackPositions, "CueCodecState", 0);\r
+\r
+DEFINE_START_SEMANTIC(KaxCueReference)\r
+DEFINE_SEMANTIC_ITEM(true, true, KaxCueRefTime)\r
+DEFINE_SEMANTIC_ITEM(true, true, KaxCueRefCluster) // not supported\r
+DEFINE_SEMANTIC_ITEM(false, true, KaxCueRefNumber) // not supported\r
+DEFINE_SEMANTIC_ITEM(false, true, KaxCueRefCodecState) // not supported\r
+DEFINE_END_SEMANTIC(KaxCueReference)\r
+\r
+DEFINE_MKX_MASTER(KaxCueReference, 0xDB, 1, KaxCueTrackPositions, "CueReference");\r
+DEFINE_MKX_UINTEGER(KaxCueRefTime, 0x96, 1, KaxCueReference, "CueRefTime");\r
+DEFINE_MKX_UINTEGER(KaxCueRefCluster, 0x97, 1, KaxCueReference, "CueRefCluster");\r
+DEFINE_MKX_UINTEGER_DEF(KaxCueRefNumber, 0x535F, 2, KaxCueReference, "CueRefNumber", 1);\r
+DEFINE_MKX_UINTEGER_DEF(KaxCueRefCodecState, 0xEB, 1, KaxCueReference, "CueRefCodecState", 0);\r
+#endif\r
+\r
+DEFINE_START_SEMANTIC(KaxAttachments)\r
+DEFINE_SEMANTIC_ITEM(true, false, KaxAttached)\r
+DEFINE_END_SEMANTIC(KaxAttachments)\r
+\r
+DEFINE_MKX_MASTER_CONS(KaxAttachments, 0x1941A469, 4, KaxSegment, "Attachments");\r
+\r
+DEFINE_START_SEMANTIC(KaxAttached)\r
+DEFINE_SEMANTIC_ITEM(false, true, KaxFileDescription)\r
+DEFINE_SEMANTIC_ITEM(true, true, KaxFileName)\r
+DEFINE_SEMANTIC_ITEM(true, true, KaxMimeType)\r
+DEFINE_SEMANTIC_ITEM(true, true, KaxFileData)\r
+DEFINE_SEMANTIC_ITEM(true, true, KaxFileUID)\r
+#if MATROSKA_VERSION >= 2\r
+DEFINE_SEMANTIC_ITEM(false, true, KaxFileReferral) // not supported\r
+DEFINE_SEMANTIC_ITEM(false, true, KaxFileUsedStartTime) // DivX specific\r
+DEFINE_SEMANTIC_ITEM(false, true, KaxFileUsedEndTime) // DivX specific\r
+#endif // MATROSKA_VERSION\r
+DEFINE_END_SEMANTIC(KaxAttached)\r
+\r
+DEFINE_MKX_MASTER_CONS(KaxAttached, 0x61A7, 2, KaxAttachments, "AttachedFile");\r
+DEFINE_MKX_UNISTRING(KaxFileDescription, 0x467E, 2, KaxAttached, "FileDescription");\r
+DEFINE_MKX_UNISTRING(KaxFileName, 0x466E, 2, KaxAttached, "FileName");\r
+DEFINE_MKX_STRING(KaxMimeType, 0x4660, 2, KaxAttached, "FileMimeType");\r
+DEFINE_MKX_BINARY (KaxFileData, 0x465C, 2, KaxAttached, "FileData");\r
+DEFINE_MKX_UINTEGER(KaxFileUID, 0x46AE, 2, KaxAttached, "FileUID");\r
+#if MATROSKA_VERSION >= 2\r
+DEFINE_MKX_BINARY (KaxFileReferral, 0x4675, 2, KaxAttached, "FileReferral");\r
+DEFINE_MKX_UINTEGER(KaxFileUsedStartTime, 0x4661, 2, KaxAttached, "FileUsedStartTime");\r
+DEFINE_MKX_UINTEGER(KaxFileUsedEndTime, 0x4662, 2, KaxAttached, "FileUsedEndTime");\r
+#endif\r
+\r
+DEFINE_START_SEMANTIC(KaxChapters)\r
+DEFINE_SEMANTIC_ITEM(true, false, KaxEditionEntry)\r
+DEFINE_END_SEMANTIC(KaxChapters)\r
+\r
+DEFINE_MKX_MASTER(KaxChapters, 0x1043A770, 4, KaxSegment, "Chapters");\r
+\r
+DEFINE_START_SEMANTIC(KaxEditionEntry)\r
+DEFINE_SEMANTIC_ITEM(false, true, KaxEditionUID)\r
+DEFINE_SEMANTIC_ITEM(true, true, KaxEditionFlagHidden)\r
+DEFINE_SEMANTIC_ITEM(true, true, KaxEditionFlagDefault)\r
+DEFINE_SEMANTIC_ITEM(false, true, KaxEditionFlagOrdered)\r
+DEFINE_SEMANTIC_ITEM(true, false, KaxChapterAtom)\r
+DEFINE_END_SEMANTIC(KaxEditionEntry)\r
+\r
+DEFINE_MKX_MASTER(KaxEditionEntry, 0x45B9, 2, KaxChapters, "EditionEntry");\r
+DEFINE_MKX_UINTEGER(KaxEditionUID, 0x45BC, 2, KaxEditionEntry, "EditionUID");\r
+DEFINE_MKX_UINTEGER_DEF(KaxEditionFlagHidden, 0x45BD, 2, KaxEditionEntry, "EditionFlagHidden", 0);\r
+DEFINE_MKX_UINTEGER_DEF(KaxEditionFlagDefault, 0x45DB, 2, KaxEditionEntry, "EditionFlagDefault", 0);\r
+DEFINE_MKX_UINTEGER_DEF(KaxEditionFlagOrdered, 0x45DD, 2, KaxEditionEntry, "EditionFlagOrdered", 0);\r
+\r
+DEFINE_START_SEMANTIC(KaxChapterAtom)\r
+DEFINE_SEMANTIC_ITEM(false, false, KaxChapterAtom) // recursive\r
+DEFINE_SEMANTIC_ITEM(true, true, KaxChapterUID)\r
+DEFINE_SEMANTIC_ITEM(true, true, KaxChapterTimeStart)\r
+DEFINE_SEMANTIC_ITEM(false, true, KaxChapterTimeEnd)\r
+DEFINE_SEMANTIC_ITEM(true, true, KaxChapterFlagHidden)\r
+DEFINE_SEMANTIC_ITEM(true, true, KaxChapterFlagEnabled)\r
+DEFINE_SEMANTIC_ITEM(false, true, KaxChapterSegmentUID)\r
+DEFINE_SEMANTIC_ITEM(false, true, KaxChapterSegmentEditionUID)\r
+DEFINE_SEMANTIC_ITEM(false, true, KaxChapterPhysicalEquiv)\r
+DEFINE_SEMANTIC_ITEM(false, true, KaxChapterTrack)\r
+DEFINE_SEMANTIC_ITEM(false, false, KaxChapterDisplay)\r
+DEFINE_SEMANTIC_ITEM(false, false, KaxChapterProcess)\r
+DEFINE_END_SEMANTIC(KaxChapterAtom)\r
+\r
+DEFINE_MKX_MASTER(KaxChapterAtom, 0xB6, 1, KaxEditionEntry, "ChapterAtom");\r
+DEFINE_MKX_UINTEGER(KaxChapterUID, 0x73C4, 2, KaxChapterAtom, "ChapterUID");\r
+DEFINE_MKX_UINTEGER(KaxChapterTimeStart, 0x91, 1, KaxChapterAtom, "ChapterTimeStart");\r
+DEFINE_MKX_UINTEGER(KaxChapterTimeEnd, 0x92, 1, KaxChapterAtom, "ChapterTimeEnd");\r
+DEFINE_MKX_UINTEGER_DEF(KaxChapterFlagHidden, 0x98, 1, KaxChapterAtom, "ChapterFlagHidden", 0);\r
+DEFINE_MKX_UINTEGER_DEF(KaxChapterFlagEnabled, 0x4598, 2, KaxChapterAtom, "ChapterFlagEnabled", 1);\r
+DEFINE_MKX_BINARY (KaxChapterSegmentUID, 0x6E67, 2, KaxChapterAtom, "ChapterSegmentUID");\r
+DEFINE_MKX_BINARY (KaxChapterSegmentEditionUID, 0x6EBC, 2, KaxChapterAtom, "ChapterSegmentEditionUID");\r
+DEFINE_MKX_UINTEGER(KaxChapterPhysicalEquiv, 0x63C3, 2, KaxChapterAtom, "ChapterPhysicalEquiv");\r
+\r
+DEFINE_START_SEMANTIC(KaxChapterTrack)\r
+DEFINE_SEMANTIC_ITEM(true, false, KaxChapterTrackNumber)\r
+DEFINE_END_SEMANTIC(KaxChapterTrack)\r
+\r
+DEFINE_MKX_MASTER(KaxChapterTrack, 0x8F, 1, KaxChapterAtom, "ChapterTrack");\r
+DEFINE_MKX_UINTEGER(KaxChapterTrackNumber, 0x89, 1, KaxChapterTrack, "ChapterTrackNumber");\r
+\r
+DEFINE_START_SEMANTIC(KaxChapterDisplay)\r
+DEFINE_SEMANTIC_ITEM(true, true, KaxChapterString)\r
+DEFINE_SEMANTIC_ITEM(true, false, KaxChapterLanguage)\r
+DEFINE_SEMANTIC_ITEM(false, false, KaxChapterCountry)\r
+DEFINE_END_SEMANTIC(KaxChapterDisplay)\r
+\r
+DEFINE_MKX_MASTER(KaxChapterDisplay, 0x80, 1, KaxChapterAtom, "ChapterDisplay");\r
+DEFINE_MKX_UNISTRING(KaxChapterString, 0x85, 1, KaxChapterDisplay, "ChapterString");\r
+DEFINE_MKX_STRING_DEF(KaxChapterLanguage, 0x437C, 2, KaxChapterDisplay, "ChapterLanguage", "eng");\r
+DEFINE_MKX_STRING(KaxChapterCountry, 0x437E, 2, KaxChapterDisplay, "ChapterCountry");\r
+\r
+DEFINE_START_SEMANTIC(KaxChapterProcess)\r
+DEFINE_SEMANTIC_ITEM(true, true, KaxChapterProcessCodecID)\r
+DEFINE_SEMANTIC_ITEM(false, true, KaxChapterProcessPrivate)\r
+DEFINE_SEMANTIC_ITEM(false, false, KaxChapterProcessCommand)\r
+DEFINE_END_SEMANTIC(KaxChapterProcess)\r
+\r
+DEFINE_MKX_MASTER(KaxChapterProcess, 0x6944, 2, KaxChapterAtom, "ChapterProcess");\r
+DEFINE_MKX_UINTEGER_DEF(KaxChapterProcessCodecID, 0x6955, 2, KaxChapterProcess, "ChapterProcessCodecID", 0);\r
+DEFINE_MKX_BINARY (KaxChapterProcessPrivate, 0x450D, 2, KaxChapterProcess, "ChapterProcessPrivate");\r
+\r
+DEFINE_START_SEMANTIC(KaxChapterProcessCommand)\r
+DEFINE_SEMANTIC_ITEM(true, true, KaxChapterProcessTime)\r
+DEFINE_SEMANTIC_ITEM(true, true, KaxChapterProcessData)\r
+DEFINE_END_SEMANTIC(KaxChapterProcessCommand)\r
+\r
+DEFINE_MKX_MASTER(KaxChapterProcessCommand, 0x6911, 2, KaxChapterProcess, "ChapterProcessCommand");\r
+DEFINE_MKX_UINTEGER(KaxChapterProcessTime, 0x6922, 2, KaxChapterProcessCommand, "ChapterProcessTime");\r
+DEFINE_MKX_BINARY (KaxChapterProcessData, 0x6933, 2, KaxChapterProcessCommand, "ChapterProcessData");\r
+\r
+DEFINE_START_SEMANTIC(KaxTags)\r
+DEFINE_SEMANTIC_ITEM(true, false, KaxTag)\r
+DEFINE_END_SEMANTIC(KaxTags)\r
+\r
+DEFINE_MKX_MASTER(KaxTags, 0x1254C367, 4, KaxSegment, "Tags");\r
+\r
+DEFINE_START_SEMANTIC(KaxTag)\r
+DEFINE_SEMANTIC_ITEM(true, true, KaxTagTargets)\r
+DEFINE_SEMANTIC_ITEM(true, false, KaxTagSimple)\r
+DEFINE_END_SEMANTIC(KaxTag)\r
+\r
+DEFINE_MKX_MASTER(KaxTag, 0x7373, 2, KaxTags, "Tag");\r
+\r
+DEFINE_START_SEMANTIC(KaxTagTargets)\r
+DEFINE_SEMANTIC_ITEM(false, true, KaxTagTargetTypeValue)\r
+DEFINE_SEMANTIC_ITEM(false, true, KaxTagTargetType)\r
+DEFINE_SEMANTIC_ITEM(false, false, KaxTagTrackUID)\r
+DEFINE_SEMANTIC_ITEM(false, false, KaxTagEditionUID)\r
+DEFINE_SEMANTIC_ITEM(false, false, KaxTagChapterUID)\r
+DEFINE_SEMANTIC_ITEM(false, false, KaxTagAttachmentUID)\r
+DEFINE_END_SEMANTIC(KaxTagTargets)\r
+\r
+DEFINE_MKX_MASTER(KaxTagTargets, 0x63C0, 2, KaxTag, "TagTargets");\r
+DEFINE_MKX_UINTEGER_DEF(KaxTagTargetTypeValue, 0x68CA, 2, KaxTagTargets, "TagTargetTypeValue", 50);\r
+DEFINE_MKX_STRING(KaxTagTargetType, 0x63CA, 2, KaxTagTargets, "TagTargetType");\r
+DEFINE_MKX_UINTEGER_DEF(KaxTagTrackUID, 0x63C5, 2, KaxTagTargets, "TagTrackUID", 0);\r
+DEFINE_MKX_UINTEGER_DEF(KaxTagEditionUID, 0x63C9, 2, KaxTagTargets, "TagEditionUID", 0);\r
+DEFINE_MKX_UINTEGER_DEF(KaxTagChapterUID, 0x63C4, 2, KaxTagTargets, "TagChapterUID", 0);\r
+DEFINE_MKX_UINTEGER_DEF(KaxTagAttachmentUID, 0x63C6, 2, KaxTagTargets, "TagAttachmentUID", 0);\r
+\r
+DEFINE_START_SEMANTIC(KaxTagSimple)\r
+DEFINE_SEMANTIC_ITEM(false, false, KaxTagSimple) // recursive\r
+DEFINE_SEMANTIC_ITEM(true, true, KaxTagName)\r
+DEFINE_SEMANTIC_ITEM(true, true, KaxTagLangue)\r
+DEFINE_SEMANTIC_ITEM(true, true, KaxTagDefault)\r
+DEFINE_SEMANTIC_ITEM(false, true, KaxTagString)\r
+DEFINE_SEMANTIC_ITEM(false, true, KaxTagBinary)\r
+DEFINE_END_SEMANTIC(KaxTagSimple)\r
+\r
+DEFINE_MKX_MASTER(KaxTagSimple, 0x67C8, 2, KaxTag, "TagSimple");\r
+DEFINE_MKX_UNISTRING(KaxTagName, 0x45A3, 2, KaxTagSimple, "TagName");\r
+DEFINE_MKX_STRING_DEF(KaxTagLangue, 0x447A, 2, KaxTagSimple, "TagLanguage", "und");\r
+DEFINE_MKX_UINTEGER_DEF(KaxTagDefault, 0x4484, 2, KaxTagSimple, "TagDefault", 1);\r
+DEFINE_MKX_UNISTRING(KaxTagString, 0x4487, 2, KaxTagSimple, "TagString");\r
+DEFINE_MKX_BINARY (KaxTagBinary, 0x4485, 2, KaxTagSimple, "TagBinary");\r
+\r
+filepos_t KaxBlockVirtual::RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault) {\r
+       assert(false); // no you are not allowed to use this element !\r
+       return 0;\r
+}\r
+\r
+filepos_t KaxReferenceVirtual::RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault) {\r
+       assert(false); // no you are not allowed to use this element !\r
+       return 0;\r
+}\r
+\r
+filepos_t KaxSliceFrameNumber::RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault) {\r
+       assert(false); // no you are not allowed to use this element !\r
+       return 0;\r
+}\r
+\r
+filepos_t KaxSliceBlockAddID::RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault) {\r
+       assert(false); // no you are not allowed to use this element !\r
+       return 0;\r
+}\r
+\r
+filepos_t KaxSliceDelay::RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault) {\r
+       assert(false); // no you are not allowed to use this element !\r
+       return 0;\r
+}\r
+\r
+filepos_t KaxSliceDuration::RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault) {\r
+       assert(false); // no you are not allowed to use this element !\r
+       return 0;\r
+}\r
+\r
+filepos_t KaxEncryptedBlock::RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault) {\r
+       assert(false); // no you are not allowed to use this element !\r
+       return 0;\r
+}\r
+\r
+filepos_t KaxTrackOffset::RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault) {\r
+       assert(false); // no you are not allowed to use this element !\r
+       return 0;\r
+}\r
+\r
+filepos_t KaxCodecSettings::RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault) {\r
+       assert(false); // no you are not allowed to use this element !\r
+       return 0;\r
+}\r
+\r
+filepos_t KaxCodecInfoURL::RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault) {\r
+       assert(false); // no you are not allowed to use this element !\r
+       return 0;\r
+}\r
+\r
+filepos_t KaxCodecDownloadURL::RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault) {\r
+       assert(false); // no you are not allowed to use this element !\r
+       return 0;\r
+}\r
+\r
+filepos_t KaxOldStereoMode::RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault) {\r
+       assert(false); // no you are not allowed to use this element !\r
+       return 0;\r
+}\r
+\r
+filepos_t KaxVideoGamma::RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault) {\r
+       assert(false); // no you are not allowed to use this element !\r
+       return 0;\r
+}\r
+\r
+filepos_t KaxVideoFrameRate::RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault) {\r
+       assert(false); // no you are not allowed to use this element !\r
+       return 0;\r
+}\r
+\r
+filepos_t KaxAudioPosition::RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault) {\r
+       assert(false); // no you are not allowed to use this element !\r
+       return 0;\r
+}\r
+\r
+filepos_t KaxCueRefCluster::RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault) {\r
+       assert(false); // no you are not allowed to use this element !\r
+       return 0;\r
+}\r
+\r
+filepos_t KaxCueRefNumber::RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault) {\r
+       assert(false); // no you are not allowed to use this element !\r
+       return 0;\r
+}\r
+\r
+filepos_t KaxCueRefCodecState::RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault) {\r
+       assert(false); // no you are not allowed to use this element !\r
+       return 0;\r
+}\r
+\r
+filepos_t KaxFileReferral::RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault) {\r
+       assert(false); // no you are not allowed to use this element !\r
+       return 0;\r
+}\r
+\r
+END_LIBMATROSKA_NAMESPACE\r
diff --git a/src/KaxTag.cpp b/src/KaxTag.cpp
deleted file mode 100644 (file)
index 5903862..0000000
+++ /dev/null
@@ -1,84 +0,0 @@
-/****************************************************************************
-** libmatroska : parse Matroska files, see http://www.matroska.org/
-**
-** <file/class description>
-**
-** Copyright (C) 2002-2010 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/KaxContexts.h"
-#include "matroska/KaxDefines.h"
-
-using namespace LIBEBML_NAMESPACE;
-
-// sub elements
-START_LIBMATROSKA_NAMESPACE
-
-DEFINE_START_SEMANTIC(KaxTag)
-DEFINE_SEMANTIC_ITEM(true, true, KaxTagTargets)
-DEFINE_SEMANTIC_ITEM(true, false, KaxTagSimple)
-DEFINE_END_SEMANTIC(KaxTag)
-
-DEFINE_START_SEMANTIC(KaxTagTargets)
-DEFINE_SEMANTIC_ITEM(false, true, KaxTagTargetTypeValue)
-DEFINE_SEMANTIC_ITEM(false, true, KaxTagTargetType)
-DEFINE_SEMANTIC_ITEM(false, false, KaxTagTrackUID)
-DEFINE_SEMANTIC_ITEM(false, false, KaxTagEditionUID)
-DEFINE_SEMANTIC_ITEM(false, false, KaxTagChapterUID)
-DEFINE_SEMANTIC_ITEM(false, false, KaxTagAttachmentUID)
-DEFINE_END_SEMANTIC(KaxTagTargets)
-
-DEFINE_START_SEMANTIC(KaxTagSimple)
-DEFINE_SEMANTIC_ITEM(true, true, KaxTagName)
-DEFINE_SEMANTIC_ITEM(true, true, KaxTagLangue)
-DEFINE_SEMANTIC_ITEM(true, true, KaxTagDefault)
-DEFINE_SEMANTIC_ITEM(false, true, KaxTagString)
-DEFINE_SEMANTIC_ITEM(false, true, KaxTagBinary)
-DEFINE_SEMANTIC_ITEM(false, false, KaxTagSimple)
-DEFINE_END_SEMANTIC(KaxTagSimple)
-
-DEFINE_MKX_MASTER      (KaxTag,                       0x7373, 2, KaxTags, "Tag");
-DEFINE_MKX_MASTER      (KaxTagTargets,                0x63C0, 2, KaxTag, "TagTargets");
-DEFINE_MKX_UINTEGER_DEF(KaxTagTargetTypeValue,        0x68CA, 2, KaxTagTargets, "TagTargetTypeValue", 50);
-DEFINE_MKX_STRING      (KaxTagTargetType,             0x63CA, 2, KaxTagTargets, "TagTargetType");
-DEFINE_MKX_UINTEGER_DEF(KaxTagTrackUID,               0x63C5, 2, KaxTagTargets, "TagTrackUID", 0);
-DEFINE_MKX_UINTEGER_DEF(KaxTagEditionUID,             0x63C9, 2, KaxTagTargets, "TagEditionUID", 0);
-DEFINE_MKX_UINTEGER_DEF(KaxTagChapterUID,             0x63C4, 2, KaxTagTargets, "TagChapterUID", 0);
-DEFINE_MKX_UINTEGER_DEF(KaxTagAttachmentUID,          0x63C6, 2, KaxTagTargets, "TagAttachmentUID", 0);
-
-DEFINE_MKX_MASTER      (KaxTagSimple,                 0x67C8, 2, KaxTag, "TagSimple");
-DEFINE_MKX_UNISTRING   (KaxTagName,                   0x45A3, 2, KaxTagSimple, "TagName");
-DEFINE_MKX_STRING_DEF  (KaxTagLangue,                 0x447A, 2, KaxTagSimple, "TagLanguage", "und");
-DEFINE_MKX_UINTEGER_DEF(KaxTagDefault,                0x4484, 2, KaxTagSimple, "TagDefault", 1);
-DEFINE_MKX_UNISTRING   (KaxTagString,                 0x4487, 2, KaxTagSimple, "TagString");
-DEFINE_MKX_BINARY      (KaxTagBinary,                 0x4485, 2, KaxTagSimple, "TagBinary");
-
-END_LIBMATROSKA_NAMESPACE
diff --git a/src/KaxTags.cpp b/src/KaxTags.cpp
deleted file mode 100644 (file)
index 78ec09e..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-/****************************************************************************\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
-#include "matroska/KaxDefines.h"\r
-\r
-using namespace LIBEBML_NAMESPACE;\r
-\r
-// sub elements\r
-START_LIBMATROSKA_NAMESPACE\r
-\r
-DEFINE_START_SEMANTIC(KaxTags)\r
-DEFINE_SEMANTIC_ITEM(true, false, KaxTag)\r
-DEFINE_END_SEMANTIC(KaxTags)\r
-\r
-DEFINE_MKX_MASTER(KaxTags, 0x1254C367, 4, KaxSegment, "Tags");\r
-\r
-END_LIBMATROSKA_NAMESPACE\r
diff --git a/src/KaxTrackAudio.cpp b/src/KaxTrackAudio.cpp
deleted file mode 100644 (file)
index e967cc2..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-/****************************************************************************\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
-#include "matroska/KaxDefines.h"\r
-\r
-START_LIBMATROSKA_NAMESPACE\r
-\r
-DEFINE_START_SEMANTIC(KaxTrackAudio)\r
-DEFINE_SEMANTIC_ITEM(true, true, KaxAudioSamplingFreq)\r
-DEFINE_SEMANTIC_ITEM(true, true, KaxAudioChannels)\r
-DEFINE_SEMANTIC_ITEM(false, true, KaxAudioBitDepth)\r
-DEFINE_SEMANTIC_ITEM(false, true, KaxAudioOutputSamplingFreq)\r
-#if MATROSKA_VERSION >= 2\r
-DEFINE_SEMANTIC_ITEM(false, true, KaxAudioPosition)\r
-#endif // MATROSKA_VERSION\r
-DEFINE_END_SEMANTIC(KaxTrackAudio)\r
-\r
-DEFINE_MKX_MASTER      (KaxTrackAudio,                0xE1, 1, KaxTrackEntry, "TrackAudio");\r
-DEFINE_MKX_FLOAT_DEF   (KaxAudioSamplingFreq,         0xB5, 1, KaxTrackAudio, "AudioSamplingFreq", 8000.0);\r
-DEFINE_MKX_FLOAT       (KaxAudioOutputSamplingFreq, 0x78B5, 2, KaxTrackAudio, "AudioOutputSamplingFreq");\r
-DEFINE_MKX_UINTEGER_DEF(KaxAudioChannels,             0x9F, 1, KaxTrackAudio, "AudioChannels", 1);\r
-DEFINE_MKX_UINTEGER    (KaxAudioBitDepth,           0x6264, 2, KaxTrackAudio, "AudioBitDepth");\r
-#if MATROSKA_VERSION >= 2\r
-DEFINE_MKX_BINARY      (KaxAudioPosition,           0x7D7B, 2, KaxTrackAudio, "AudioPosition");\r
-#endif\r
-\r
-END_LIBMATROSKA_NAMESPACE\r
diff --git a/src/KaxTrackEntryData.cpp b/src/KaxTrackEntryData.cpp
deleted file mode 100644 (file)
index ca6aab8..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-/****************************************************************************
-** libmatroska : parse Matroska files, see http://www.matroska.org/
-**
-** <file/class description>
-**
-** Copyright (C) 2002-2010 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"
-#include "matroska/KaxDefines.h"
-
-START_LIBMATROSKA_NAMESPACE
-
-DEFINE_START_SEMANTIC(KaxTrackTranslate)
-DEFINE_SEMANTIC_ITEM(false, false, KaxTrackTranslateEditionUID)
-DEFINE_SEMANTIC_ITEM(true, true, KaxTrackTranslateCodec)
-DEFINE_SEMANTIC_ITEM(true, true, KaxTrackTranslateTrackID)
-DEFINE_END_SEMANTIC(KaxTrackTranslate)
-
-DEFINE_MKX_UINTEGER    (KaxTrackNumber,                0xD7, 1, KaxTrackEntry, "TrackNumber");
-DEFINE_MKX_UINTEGER    (KaxTrackUID,                 0x73C5, 2, KaxTrackEntry, "TrackUID");
-DEFINE_MKX_UINTEGER    (KaxTrackType,                  0x83, 1, KaxTrackEntry, "TrackType");
-DEFINE_MKX_UINTEGER_DEF(KaxTrackFlagDefault,           0x88, 1, KaxTrackEntry, "TrackFlagDefault", 1);
-DEFINE_MKX_UINTEGER_DEF(KaxTrackFlagForced,          0x55AA, 2, KaxTrackEntry, "TrackFlagForced", 0);
-DEFINE_MKX_UINTEGER_DEF(KaxTrackFlagLacing,            0x9C, 1, KaxTrackEntry, "TrackFlagLacing", 1);
-DEFINE_MKX_UINTEGER_DEF(KaxTrackMinCache,            0x6DE7, 2, KaxTrackEntry, "TrackMinCache", 0);
-DEFINE_MKX_UINTEGER    (KaxTrackMaxCache,            0x6DF8, 2, KaxTrackEntry, "TrackMaxCache\0rotomodobopo");
-DEFINE_MKX_UINTEGER    (KaxTrackDefaultDuration,   0x23E383, 3, KaxTrackEntry, "TrackDefaultDuration");
-DEFINE_MKX_FLOAT_DEF   (KaxTrackTimecodeScale,     0x23314F, 3, KaxTrackEntry, "TrackTimecodeScale", 1.0);
-DEFINE_MKX_UINTEGER_DEF(KaxMaxBlockAdditionID,       0x55EE, 2, KaxTrackEntry, "MaxBlockAdditionID", 0);
-//DEFINE_MKX_SINTEGER_DEF(KaxTrackOffset,            0x537F, 2, KaxTrackEntry, "TrackOffset", 0);
-DEFINE_MKX_UNISTRING   (KaxTrackName,                0x536E, 2, KaxTrackEntry, "TrackName");
-DEFINE_MKX_STRING_DEF  (KaxTrackLanguage,          0x22B59C, 3, KaxTrackEntry, "TrackLanguage", "eng");
-DEFINE_MKX_STRING      (KaxCodecID,                    0x86, 1, KaxTrackEntry, "CodecID");
-DEFINE_MKX_BINARY      (KaxCodecPrivate,             0x63A2, 2, KaxTrackEntry, "CodecPrivate");
-DEFINE_MKX_UNISTRING   (KaxCodecName,              0x258688, 3, KaxTrackEntry, "CodecName");
-DEFINE_MKX_UINTEGER    (KaxTrackAttachmentLink,      0x7446, 2, KaxTrackEntry, "TrackAttachmentLink");
-DEFINE_MKX_UINTEGER    (KaxTrackOverlay,             0x6FAB, 2, KaxTrackEntry, "TrackOverlay");
-DEFINE_MKX_MASTER      (KaxTrackTranslate,           0x6624, 2, KaxTrackEntry, "TrackTranslate");
-DEFINE_MKX_UINTEGER    (KaxTrackTranslateEditionUID, 0x66FC, 2, KaxTrackTranslate, "TrackTranslateEditionUID");
-DEFINE_MKX_UINTEGER    (KaxTrackTranslateCodec,      0x66BF, 2, KaxTrackTranslate, "TrackTranslateCodec");
-DEFINE_MKX_BINARY      (KaxTrackTranslateTrackID,    0x66A5, 2, KaxTrackTranslate, "TrackTranslateTrackID");
-#if MATROSKA_VERSION >= 2
-DEFINE_MKX_UINTEGER_DEF(KaxTrackFlagEnabled,           0xB9, 1, KaxTrackEntry, "TrackFlagEnabled", 1);
-DEFINE_MKX_UNISTRING   (KaxCodecSettings,          0x3A9697, 3, KaxTrackEntry, "CodecSettings");
-DEFINE_MKX_STRING      (KaxCodecInfoURL,           0x3B4040, 3, KaxTrackEntry, "CodecInfoURL");
-DEFINE_MKX_STRING      (KaxCodecDownloadURL,       0x26B240, 3, KaxTrackEntry, "CodecDownloadURL");
-DEFINE_MKX_UINTEGER_DEF(KaxCodecDecodeAll,             0xAA, 1, KaxTrackEntry, "CodecDecodeAll", 1);
-#endif
-
-END_LIBMATROSKA_NAMESPACE
diff --git a/src/KaxTrackVideo.cpp b/src/KaxTrackVideo.cpp
deleted file mode 100644 (file)
index ca66bc2..0000000
+++ /dev/null
@@ -1,88 +0,0 @@
-/****************************************************************************
-** libmatroska : parse Matroska files, see http://www.matroska.org/
-**
-** <file/class description>
-**
-** Copyright (C) 2002-2010 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"
-#include "matroska/KaxDefines.h"
-
-START_LIBMATROSKA_NAMESPACE
-
-DEFINE_START_SEMANTIC(KaxTrackVideo)
-DEFINE_SEMANTIC_ITEM(true, true, KaxVideoPixelWidth)
-DEFINE_SEMANTIC_ITEM(true, true, KaxVideoPixelHeight)
-DEFINE_SEMANTIC_ITEM(false, true, KaxVideoPixelCropBottom)
-DEFINE_SEMANTIC_ITEM(false, true, KaxVideoPixelCropTop)
-DEFINE_SEMANTIC_ITEM(false, true, KaxVideoPixelCropLeft)
-DEFINE_SEMANTIC_ITEM(false, true, KaxVideoPixelCropRight)
-DEFINE_SEMANTIC_ITEM(false, true, KaxVideoDisplayWidth)
-DEFINE_SEMANTIC_ITEM(false, true, KaxVideoDisplayHeight)
-DEFINE_SEMANTIC_ITEM(false, true, KaxVideoColourSpace)
-DEFINE_SEMANTIC_ITEM(false, true, KaxVideoFrameRate)
-#if MATROSKA_VERSION >= 2
-DEFINE_SEMANTIC_ITEM(true, true, KaxVideoFlagInterlaced)
-DEFINE_SEMANTIC_ITEM(false, true, KaxVideoStereoMode)
-DEFINE_SEMANTIC_ITEM(false, true, KaxVideoDisplayUnit)
-DEFINE_SEMANTIC_ITEM(false, true, KaxVideoAspectRatio)
-DEFINE_SEMANTIC_ITEM(false, true, KaxVideoGamma)
-#endif // MATROSKA_VERSION
-DEFINE_END_SEMANTIC(KaxTrackVideo)
-
-DEFINE_MKX_MASTER      (KaxTrackVideo,             0xE0, 1, KaxTrackEntry, "TrackVideo");
-DEFINE_MKX_UINTEGER    (KaxVideoPixelWidth,        0xB0, 1, KaxTrackVideo, "VideoPixelWidth");
-DEFINE_MKX_UINTEGER    (KaxVideoPixelHeight,       0xBA, 1, KaxTrackVideo, "VideoPixelHeight");
-DEFINE_MKX_UINTEGER_DEF(KaxVideoPixelCropBottom, 0x54AA, 2, KaxTrackVideo, "VideoPixelCropBottom", 0);
-DEFINE_MKX_UINTEGER_DEF(KaxVideoPixelCropTop,    0x54BB, 2, KaxTrackVideo, "VideoPixelCropTop", 0);
-DEFINE_MKX_UINTEGER_DEF(KaxVideoPixelCropLeft,   0x54CC, 2, KaxTrackVideo, "VideoPixelCropLeft", 0);
-DEFINE_MKX_UINTEGER_DEF(KaxVideoPixelCropRight,  0x54DD, 2, KaxTrackVideo, "VideoPixelCropRight", 0);
-DEFINE_MKX_UINTEGER    (KaxVideoDisplayWidth,    0x54B0, 2, KaxTrackVideo, "VideoDisplayWidth");
-DEFINE_MKX_UINTEGER    (KaxVideoDisplayHeight,   0x54BA, 2, KaxTrackVideo, "VideoDisplayHeight");
-DEFINE_MKX_BINARY      (KaxVideoColourSpace,   0x2EB524, 3, KaxTrackVideo, "VideoColourSpace");
-DEFINE_MKX_FLOAT       (KaxVideoFrameRate,     0x2383E3, 3, KaxTrackVideo, "VideoFrameRate");
-#if MATROSKA_VERSION >= 2
-DEFINE_MKX_UINTEGER_DEF(KaxVideoFlagInterlaced,    0x9A, 1, KaxTrackVideo, "VideoFlagInterlaced", 0);
-DEFINE_MKX_UINTEGER_DEF(KaxVideoStereoMode,      0x53B8, 2, KaxTrackVideo, "VideoStereoMode", 0);
-DEFINE_MKX_UINTEGER_DEF(KaxVideoDisplayUnit,     0x54B2, 2, KaxTrackVideo, "VideoDisplayUnit", 0);
-DEFINE_MKX_UINTEGER_DEF(KaxVideoAspectRatio,     0x54B3, 2, KaxTrackVideo, "VideoAspectRatio", 0);
-DEFINE_MKX_FLOAT       (KaxVideoGamma,         0x2FB523, 3, KaxTrackVideo, "VideoGamma");
-#endif
-
-filepos_t KaxVideoFrameRate::RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault)
-{
-       assert(false); // no you are not allowed to use this element !
-       return 0;
-}
-
-END_LIBMATROSKA_NAMESPACE
index 7331526ab879239e847c2c1a77a548e52dc4d9b3..20ed3866715d9ba69cc264d2d84c4d4ed2684336 100644 (file)
 #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"
 #include "matroska/KaxDefines.h"
 
 START_LIBMATROSKA_NAMESPACE
 
-DEFINE_START_SEMANTIC(KaxTracks)
-DEFINE_SEMANTIC_ITEM(true, false, KaxTrackEntry)
-DEFINE_END_SEMANTIC(KaxTracks)
-
-DEFINE_START_SEMANTIC(KaxTrackEntry)
-DEFINE_SEMANTIC_ITEM(true, true, KaxTrackNumber)
-DEFINE_SEMANTIC_ITEM(true, true, KaxTrackUID)
-DEFINE_SEMANTIC_ITEM(true, true, KaxTrackType)
-#if MATROSKA_VERSION >= 2
-DEFINE_SEMANTIC_ITEM(true, true, KaxTrackFlagEnabled)
-#endif // MATROSKA_VERSION
-DEFINE_SEMANTIC_ITEM(true, true, KaxTrackFlagDefault)
-DEFINE_SEMANTIC_ITEM(true, true, KaxTrackFlagForced)
-DEFINE_SEMANTIC_ITEM(true, true, KaxTrackFlagLacing)
-DEFINE_SEMANTIC_ITEM(true, true, KaxTrackMinCache)
-DEFINE_SEMANTIC_ITEM(false, true, KaxTrackMaxCache)
-DEFINE_SEMANTIC_ITEM(false, true, KaxTrackDefaultDuration)
-DEFINE_SEMANTIC_ITEM(true, true, KaxTrackTimecodeScale)
-DEFINE_SEMANTIC_ITEM(true, true, KaxMaxBlockAdditionID)
-DEFINE_SEMANTIC_ITEM(false, true, KaxTrackName)
-DEFINE_SEMANTIC_ITEM(false, true, KaxTrackLanguage)
-DEFINE_SEMANTIC_ITEM(true, true, KaxCodecID)
-DEFINE_SEMANTIC_ITEM(false, true, KaxCodecPrivate)
-DEFINE_SEMANTIC_ITEM(false, true, KaxCodecName)
-DEFINE_SEMANTIC_ITEM(false, true, KaxTrackAttachmentLink)
-#if MATROSKA_VERSION >= 2
-DEFINE_SEMANTIC_ITEM(false, true, KaxCodecSettings)
-DEFINE_SEMANTIC_ITEM(false, false, KaxCodecInfoURL)
-DEFINE_SEMANTIC_ITEM(false, false, KaxCodecDownloadURL)
-DEFINE_SEMANTIC_ITEM(true, true, KaxCodecDecodeAll)
-#endif // MATROSKA_VERSION
-DEFINE_SEMANTIC_ITEM(false, false, KaxTrackOverlay)
-DEFINE_SEMANTIC_ITEM(false, false, KaxTrackTranslate)
-DEFINE_SEMANTIC_ITEM(false, true, KaxTrackAudio)
-DEFINE_SEMANTIC_ITEM(false, true, KaxTrackVideo)
-DEFINE_SEMANTIC_ITEM(false, true, KaxContentEncodings)
-#if MATROSKA_VERSION >= 2
-DEFINE_SEMANTIC_ITEM(false, true, KaxTrackOperation)
-#endif
-DEFINE_END_SEMANTIC(KaxTrackEntry)
-
-DEFINE_MKX_MASTER     (KaxTracks, 0x1654AE6B, 4, KaxSegment, "Tracks");
-DEFINE_MKX_MASTER_CONS(KaxTrackEntry,   0xAE, 1, KaxTracks, "TrackEntry");
-
-#if MATROSKA_VERSION >= 2
-DEFINE_START_SEMANTIC(KaxTrackOperation)
-DEFINE_SEMANTIC_ITEM(false, true, KaxTrackCombinePlanes)
-DEFINE_SEMANTIC_ITEM(false, true, KaxTrackJoinBlocks)
-DEFINE_END_SEMANTIC(KaxTrackOperation)
-
-DEFINE_START_SEMANTIC(KaxTrackCombinePlanes)
-DEFINE_SEMANTIC_ITEM(true, false, KaxTrackPlane)
-DEFINE_END_SEMANTIC(KaxTrackCombinePlanes)
-
-DEFINE_START_SEMANTIC(KaxTrackPlane)
-DEFINE_SEMANTIC_ITEM(true, true, KaxTrackPlaneUID)
-DEFINE_SEMANTIC_ITEM(true, true, KaxTrackPlaneType)
-DEFINE_END_SEMANTIC(KaxTrackPlane)
-
-DEFINE_START_SEMANTIC(KaxTrackJoinBlocks)
-DEFINE_SEMANTIC_ITEM(true, false, KaxTrackJoinUID)
-DEFINE_END_SEMANTIC(KaxTrackJoinBlocks)
-
-DEFINE_MKX_MASTER  (KaxTrackOperation,     0xE2, 1, KaxTrackEntry, "TrackOperation");
-DEFINE_MKX_MASTER  (KaxTrackCombinePlanes, 0xE3, 1, KaxTrackOperation, "TrackCombinePlanes");
-DEFINE_MKX_MASTER  (KaxTrackPlane,         0xE4, 1, KaxTrackCombinePlanes, "TrackPlane");
-DEFINE_MKX_UINTEGER(KaxTrackPlaneUID,      0xE5, 1, KaxTrackPlane, "TrackPlaneUID");
-DEFINE_MKX_UINTEGER(KaxTrackPlaneType,     0xE6, 1, KaxTrackPlane, "TrackPlaneType");
-DEFINE_MKX_MASTER  (KaxTrackJoinBlocks,    0xE9, 1, KaxTrackOperation, "TrackJoinBlocks");
-DEFINE_MKX_UINTEGER(KaxTrackJoinUID,       0xED, 1, KaxTrackJoinBlocks, "TrackJoinUID");
-#endif
-
 KaxTrackEntry::KaxTrackEntry(EBML_EXTRA_DEF)
        :EbmlMaster(EBML_CLASS_SEMCONTEXT(KaxTrackEntry) EBML_DEF_SEP EBML_EXTRA_CALL)
        ,bGlobalTimecodeScaleIsSet(false)
index aaf2c57b0ef0426aa6a311006007563f2d14a967..b593458bb89c2f894d698453aa483732775e97bb 100644 (file)
@@ -48,9 +48,8 @@
 #include "ebml/EbmlVoid.h"
 #include "ebml/EbmlContexts.h"
 #include "matroska/KaxSegment.h"
-#include "matroska/KaxAttachments.h"
-#include "matroska/KaxAttached.h"
 #include "matroska/KaxContexts.h"
+#include "matroska/KaxSemantic.h"
 
 #include "ebml/EbmlVersion.h"
 #include "matroska/KaxVersion.h"
index 78ca97731fedf437149fa0692b33f155dbd5372d..14a41ced67683670dcc6ff2b159008ad00d553cc 100644 (file)
 #include "matroska/FileKax.h"
 #include "matroska/KaxSegment.h"
 #include "matroska/KaxTracks.h"
-#include "matroska/KaxTrackEntryData.h"
-#include "matroska/KaxTrackAudio.h"
-#include "matroska/KaxTrackVideo.h"
 #include "matroska/KaxCluster.h"
-#include "matroska/KaxClusterData.h"
 #include "matroska/KaxSeekHead.h"
 #include "matroska/KaxCues.h"
-#include "matroska/KaxInfo.h"
 #include "matroska/KaxInfoData.h"
-#include "matroska/KaxTags.h"
-#include "matroska/KaxTag.h"
-#include "matroska/KaxChapters.h"
-#include "matroska/KaxContentEncoding.h"
 
 using namespace LIBMATROSKA_NAMESPACE;
 using namespace std;
index b5cfb036005c1bc2781ec5ba9973e1861cb39cd2..797546d3bda42e349d29df685bc255307d9f8c58 100644 (file)
 #include "matroska/KaxSegment.h"
 #include "matroska/KaxContexts.h"
 #include "matroska/KaxTracks.h"
-#include "matroska/KaxInfo.h"
 #include "matroska/KaxInfoData.h"
 #include "matroska/KaxCluster.h"
-#include "matroska/KaxClusterData.h"
 #include "matroska/KaxBlockData.h"
 #include "matroska/KaxSeekHead.h"
 #include "matroska/KaxCuesData.h"
-#include "matroska/KaxChapters.h"
-#include "matroska/KaxTags.h"
-#include "matroska/KaxTag.h"
 #include "ebml/StdIOCallback.h"
 
 using namespace LIBMATROSKA_NAMESPACE;