libebml/libmatrosla: update the ChangeLog for the 1.0.0 release and fix the compilation

git-svn-id: https://matroska.svn.sourceforge.net/svnroot/matroska/trunk/libmatroska@295 a6f86f6d-0131-4f8e-9e7b-e335508773d5
This commit is contained in:
Steve Lhomme 2010-06-04 11:03:46 +00:00
parent 70b83a0a65
commit 8e46c56503
7 changed files with 1054 additions and 1048 deletions

View File

@ -1,3 +1,7 @@
2010-06-04 robux4/mosu
New 1.0.0 version:
- rename the library .so name as it's backward incompatible
2010-04-30 robux4/mosu
New 0.9.0 version:
- fix a memory freeing issue in KaxBlock

View File

@ -1,74 +1,76 @@
Include "*/*.proj"
LIB matroska
{
INCLUDE .
EXPINCLUDE .
IF HAVE_EBML2
USE ebml2_legacy
ELSE
USE ebml
USEINCLUDE corec // so that stdafx implied by ebml2_legacy can build
ENDIF
// OPTIMIZE_GLOBALLY .
FAVOR_MAX_SPEED .
REDUCE_SIZE .
FASTER_FLOAT .
SOURCE src/FileKax.cpp
SOURCE src/KaxAttached.cpp
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/KaxTagMulti.cpp
SOURCE src/KaxTags.cpp
SOURCE src/KaxTrackAudio.cpp
SOURCE src/KaxTrackEntryData.cpp
SOURCE src/KaxTrackVideo.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/KaxTagMulti.h
HEADER matroska/KaxTags.h
HEADER matroska/KaxTrackAudio.h
HEADER matroska/KaxTrackEntryData.h
HEADER matroska/KaxTrackVideo.h
HEADER matroska/KaxTracks.h
HEADER matroska/KaxTypes.h
HEADER matroska/KaxVersion.h
HEADER matroska/c/libmatroska_t.h
HEADER matroska/c/libmatroska.h
}
Include "*/*.proj"
LIB matroska
{
PROJECT_VERSION 1.0.0
INCLUDE .
EXPINCLUDE .
IF HAVE_EBML2
USE ebml2_legacy
ELSE
USE ebml
USEINCLUDE corec // so that stdafx implied by ebml2_legacy can build
ENDIF
// OPTIMIZE_GLOBALLY .
FAVOR_MAX_SPEED .
REDUCE_SIZE .
FASTER_FLOAT .
SOURCE src/FileKax.cpp
SOURCE src/KaxAttached.cpp
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/KaxTagMulti.cpp
SOURCE src/KaxTags.cpp
SOURCE src/KaxTrackAudio.cpp
SOURCE src/KaxTrackEntryData.cpp
SOURCE src/KaxTrackVideo.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/KaxTagMulti.h
HEADER matroska/KaxTags.h
HEADER matroska/KaxTrackAudio.h
HEADER matroska/KaxTrackEntryData.h
HEADER matroska/KaxTrackVideo.h
HEADER matroska/KaxTracks.h
HEADER matroska/KaxTypes.h
HEADER matroska/KaxVersion.h
HEADER matroska/c/libmatroska_t.h
HEADER matroska/c/libmatroska.h
}

View File

@ -1,215 +1,215 @@
/****************************************************************************
** 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: KaxDefines.h,v 1.8 2010/04/02 23:26:17 robux4 Exp $
\author Steve Lhomme <robux4 @ users.sf.net>
*/
#ifndef LIBMATROSKA_DEFINES_H
#define LIBMATROSKA_DEFINES_H
#include "ebml/EbmlVersion.h"
#include "ebml/EbmlElement.h"
#if LIBEBML_VERSION >= 0x010000
#define DEFINE_MKX_CONTEXT(a) DEFINE_xxx_CONTEXT(a,EBML_SemanticGlobal)
#define DEFINE_MKX_MASTER_CONS(a,b,c,d,e) DEFINE_xxx_MASTER_CONS(a,b,d,e,EBML_SemanticGlobal)
#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_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)
#define DEFINE_MKX_STRING_DEF(a,b,c,d,e,v) DEFINE_xxx_STRING_DEF(a,b,d,e,EBML_SemanticGlobal,v)
#define DEFINE_MKX_STRING(a,b,c,d,e) DEFINE_xxx_STRING(a,b,d,e,EBML_SemanticGlobal)
#define DEFINE_MKX_UNISTRING(a,b,c,d,e) DEFINE_xxx_UNISTRING(a,b,d,e,EBML_SemanticGlobal)
#define DEFINE_MKX_BINARY(a,b,c,d,e) DEFINE_xxx_BINARY(a,b,d,e,EBML_SemanticGlobal)
#define DEFINE_MKX_BINARY_CONS(a,b,c,d,e) DEFINE_xxx_BINARY_CONS(a,b,d,e,EBML_SemanticGlobal)
#define DEFINE_MKX_FLOAT_DEF(a,b,c,d,e,v) DEFINE_xxx_FLOAT_DEF(a,b,d,e,EBML_SemanticGlobal,v)
#define DEFINE_MKX_FLOAT(a,b,c,d,e) DEFINE_xxx_FLOAT(a,b,d,e,EBML_SemanticGlobal)
#define DEFINE_MKX_FLOAT64(a,b,c,d,e) DEFINE_xxx_FLOAT64(a,b,d,e,EBML_SemanticGlobal)
#define DEFINE_MKX_DATE(a,b,c,d,e) DEFINE_xxx_DATE(a,b,d,e,EBML_SemanticGlobal)
#define DECLARE_MKX_CONTEXT(x)
#define DECLARE_MKX_MASTER(x) DECLARE_MKX_CONTEXT(x) \
class MATROSKA_DLL_API x : public EbmlMaster { \
public: x(EBML_EXTRA_PARAM); \
x(const x & ElementToClone) :EbmlMaster(ElementToClone) {} \
EBML_CONCRETE_CLASS(x)
#define DECLARE_MKX_MASTER_CONS(x) DECLARE_MKX_CONTEXT(x) \
class MATROSKA_DLL_API x : public EbmlMaster { \
public: x(EBML_EXTRA_PARAM); \
x(const x & ElementToClone); \
EBML_CONCRETE_CLASS(x)
#define DECLARE_MKX_BINARY(x) DECLARE_MKX_CONTEXT(x) \
class MATROSKA_DLL_API x : public EbmlBinary { \
public: x(EBML_EXTRA_PARAM); \
x(const x & ElementToClone) :EbmlBinary(ElementToClone) {} \
EBML_CONCRETE_CLASS(x)
#define DECLARE_MKX_BINARY_CONS(x) DECLARE_MKX_CONTEXT(x) \
class MATROSKA_DLL_API x : public EbmlBinary { \
public: x(EBML_EXTRA_PARAM); \
x(const x & ElementToClone); \
EBML_CONCRETE_CLASS(x)
#define DECLARE_MKX_UNISTRING(x) DECLARE_MKX_CONTEXT(x) \
class MATROSKA_DLL_API x : public EbmlUnicodeString { \
public: x(EBML_EXTRA_PARAM); \
x(const x & ElementToClone) :EbmlUnicodeString(ElementToClone) {} \
EBML_CONCRETE_CLASS(x)
#define DECLARE_MKX_STRING(x) DECLARE_MKX_CONTEXT(x) \
class MATROSKA_DLL_API x : public EbmlString { \
public: x(EBML_EXTRA_PARAM); \
x(const x & ElementToClone) :EbmlString(ElementToClone) {} \
EBML_CONCRETE_CLASS(x)
#define DECLARE_MKX_UINTEGER(x) DECLARE_MKX_CONTEXT(x) \
class MATROSKA_DLL_API x : public EbmlUInteger { \
public: x(EBML_EXTRA_PARAM); \
x(const x & ElementToClone) :EbmlUInteger(ElementToClone) {} \
EBML_CONCRETE_CLASS(x)
#define DECLARE_MKX_SINTEGER_CONS(x) DECLARE_MKX_CONTEXT(x) \
class MATROSKA_DLL_API x : public EbmlSInteger { \
public: x(EBML_EXTRA_PARAM); \
x(const x & ElementToClone); \
EBML_CONCRETE_CLASS(x)
#define DECLARE_MKX_SINTEGER(x) DECLARE_MKX_CONTEXT(x) \
class MATROSKA_DLL_API x : public EbmlSInteger { \
public: x(EBML_EXTRA_PARAM); \
x(const x & ElementToClone) :EbmlSInteger(ElementToClone) {} \
EBML_CONCRETE_CLASS(x)
#define DECLARE_MKX_DATE(x) DECLARE_MKX_CONTEXT(x) \
class MATROSKA_DLL_API x : public EbmlDate { \
public: x(EBML_EXTRA_PARAM); \
x(const x & ElementToClone) :EbmlDate(ElementToClone) {} \
EBML_CONCRETE_CLASS(x)
#define DECLARE_MKX_FLOAT(x) DECLARE_MKX_CONTEXT(x) \
class MATROSKA_DLL_API x : public EbmlFloat { \
public: x(EBML_EXTRA_PARAM); \
x(const x & ElementToClone) :EbmlFloat(ElementToClone) {} \
EBML_CONCRETE_CLASS(x)
#else
#define DEFINE_MKX_CONTEXT(a) DEFINE_xxx_CONTEXT(a,*GetKaxGlobal_Context)
#define DEFINE_MKX_MASTER_CONS(a,b,c,d,e) DEFINE_xxx_MASTER_CONS(a,b,c,d,e,*GetKaxGlobal_Context)
#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_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)
#define DEFINE_MKX_STRING(a,b,c,d,e) DEFINE_xxx_CLASS(a,b,c,d,e,*GetKaxGlobal_Context)
#define DEFINE_MKX_UNISTRING(a,b,c,d,e) DEFINE_xxx_CLASS(a,b,c,d,e,*GetKaxGlobal_Context)
#define DEFINE_MKX_BINARY(a,b,c,d,e) DEFINE_xxx_CLASS(a,b,c,d,e,*GetKaxGlobal_Context)
#define DEFINE_MKX_FLOAT_DEF(a,b,c,d,e,v) DEFINE_xxx_FLOAT_DEF(a,b,c,d,e,*GetKaxGlobal_Context,v)
#define DEFINE_MKX_FLOAT(a,b,c,d,e) DEFINE_xxx_CLASS(a,b,c,d,e,*GetKaxGlobal_Context)
#define DEFINE_MKX_DATE(a,b,c,d,e) DEFINE_xxx_CLASS(a,b,c,d,e,*GetKaxGlobal_Context)
#define DEFINE_MKX_BINARY_CONS(a,b,c,d,e) DEFINE_xxx_CLASS_CONS(a,b,c,d,e,*GetKaxGlobal_Context)
#define DEFINE_MKX_SINTEGER_CONS(a,b,c,d,e) DEFINE_xxx_CLASS_CONS(a,b,c,d,e,*GetKaxGlobal_Context)
#define DECLARE_MKX_CONTEXT(x)
#define DECLARE_MKX_MASTER(x) DECLARE_MKX_CONTEXT(x) \
class MATROSKA_DLL_API x : public EbmlMaster { \
public: x(); \
x(const x & ElementToClone) :EbmlMaster(ElementToClone) {} \
EBML_CONCRETE_CLASS(x)
#define DECLARE_MKX_MASTER_CONS(x) DECLARE_MKX_CONTEXT(x) \
class MATROSKA_DLL_API x : public EbmlMaster { \
public: x(); \
x(const x & ElementToClone); \
EBML_CONCRETE_CLASS(x)
#define DECLARE_MKX_BINARY(x) DECLARE_MKX_CONTEXT(x) \
class MATROSKA_DLL_API x : public EbmlBinary { \
public: x(); \
x(const x & ElementToClone) :EbmlBinary(ElementToClone) {} \
EBML_CONCRETE_CLASS(x)
#define DECLARE_MKX_BINARY_CONS(x) DECLARE_MKX_CONTEXT(x) \
class MATROSKA_DLL_API x : public EbmlBinary { \
public: x(); \
x(const x & ElementToClone); \
EBML_CONCRETE_CLASS(x)
#define DECLARE_MKX_UNISTRING(x) DECLARE_MKX_CONTEXT(x) \
class MATROSKA_DLL_API x : public EbmlUnicodeString { \
public: x(); \
x(const x & ElementToClone) :EbmlUnicodeString(ElementToClone) {} \
EBML_CONCRETE_CLASS(x)
#define DECLARE_MKX_STRING(x) DECLARE_MKX_CONTEXT(x) \
class MATROSKA_DLL_API x : public EbmlString { \
public: x(); \
x(const x & ElementToClone) :EbmlString(ElementToClone) {} \
EBML_CONCRETE_CLASS(x)
#define DECLARE_MKX_UINTEGER(x) DECLARE_MKX_CONTEXT(x) \
class MATROSKA_DLL_API x : public EbmlUInteger { \
public: x(); \
x(const x & ElementToClone) :EbmlUInteger(ElementToClone) {} \
EBML_CONCRETE_CLASS(x)
#define DECLARE_MKX_SINTEGER_CONS(x) DECLARE_MKX_CONTEXT(x) \
class MATROSKA_DLL_API x : public EbmlSInteger { \
public: x(); \
x(const x & ElementToClone); \
EBML_CONCRETE_CLASS(x)
#define DECLARE_MKX_SINTEGER(x) DECLARE_MKX_CONTEXT(x) \
class MATROSKA_DLL_API x : public EbmlSInteger { \
public: x(); \
x(const x & ElementToClone) :EbmlSInteger(ElementToClone) {} \
EBML_CONCRETE_CLASS(x)
#define DECLARE_MKX_DATE(x) DECLARE_MKX_CONTEXT(x) \
class MATROSKA_DLL_API x : public EbmlDate { \
public: x(); \
x(const x & ElementToClone) :EbmlDate(ElementToClone) {} \
EBML_CONCRETE_CLASS(x)
#define DECLARE_MKX_FLOAT(x) DECLARE_MKX_CONTEXT(x) \
class MATROSKA_DLL_API x : public EbmlFloat { \
public: x(); \
x(const x & ElementToClone) :EbmlFloat(ElementToClone) {} \
EBML_CONCRETE_CLASS(x)
#endif
#endif // LIBMATROSKA_DEFINES_H
/****************************************************************************
** 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$
\author Steve Lhomme <robux4 @ users.sf.net>
*/
#ifndef LIBMATROSKA_DEFINES_H
#define LIBMATROSKA_DEFINES_H
#include "ebml/EbmlVersion.h"
#include "ebml/EbmlElement.h"
#if defined(HAVE_EBML2)
#define DEFINE_MKX_CONTEXT(a) DEFINE_xxx_CONTEXT(a,EBML_SemanticGlobal)
#define DEFINE_MKX_MASTER_CONS(a,b,c,d,e) DEFINE_xxx_MASTER_CONS(a,b,d,e,EBML_SemanticGlobal)
#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_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)
#define DEFINE_MKX_STRING_DEF(a,b,c,d,e,v) DEFINE_xxx_STRING_DEF(a,b,d,e,EBML_SemanticGlobal,v)
#define DEFINE_MKX_STRING(a,b,c,d,e) DEFINE_xxx_STRING(a,b,d,e,EBML_SemanticGlobal)
#define DEFINE_MKX_UNISTRING(a,b,c,d,e) DEFINE_xxx_UNISTRING(a,b,d,e,EBML_SemanticGlobal)
#define DEFINE_MKX_BINARY(a,b,c,d,e) DEFINE_xxx_BINARY(a,b,d,e,EBML_SemanticGlobal)
#define DEFINE_MKX_BINARY_CONS(a,b,c,d,e) DEFINE_xxx_BINARY_CONS(a,b,d,e,EBML_SemanticGlobal)
#define DEFINE_MKX_FLOAT_DEF(a,b,c,d,e,v) DEFINE_xxx_FLOAT_DEF(a,b,d,e,EBML_SemanticGlobal,v)
#define DEFINE_MKX_FLOAT(a,b,c,d,e) DEFINE_xxx_FLOAT(a,b,d,e,EBML_SemanticGlobal)
#define DEFINE_MKX_FLOAT64(a,b,c,d,e) DEFINE_xxx_FLOAT64(a,b,d,e,EBML_SemanticGlobal)
#define DEFINE_MKX_DATE(a,b,c,d,e) DEFINE_xxx_DATE(a,b,d,e,EBML_SemanticGlobal)
#define DECLARE_MKX_CONTEXT(x)
#define DECLARE_MKX_MASTER(x) DECLARE_MKX_CONTEXT(x) \
class MATROSKA_DLL_API x : public EbmlMaster { \
public: x(EBML_EXTRA_PARAM); \
x(const x & ElementToClone) :EbmlMaster(ElementToClone) {} \
EBML_CONCRETE_CLASS(x)
#define DECLARE_MKX_MASTER_CONS(x) DECLARE_MKX_CONTEXT(x) \
class MATROSKA_DLL_API x : public EbmlMaster { \
public: x(EBML_EXTRA_PARAM); \
x(const x & ElementToClone); \
EBML_CONCRETE_CLASS(x)
#define DECLARE_MKX_BINARY(x) DECLARE_MKX_CONTEXT(x) \
class MATROSKA_DLL_API x : public EbmlBinary { \
public: x(EBML_EXTRA_PARAM); \
x(const x & ElementToClone) :EbmlBinary(ElementToClone) {} \
EBML_CONCRETE_CLASS(x)
#define DECLARE_MKX_BINARY_CONS(x) DECLARE_MKX_CONTEXT(x) \
class MATROSKA_DLL_API x : public EbmlBinary { \
public: x(EBML_EXTRA_PARAM); \
x(const x & ElementToClone); \
EBML_CONCRETE_CLASS(x)
#define DECLARE_MKX_UNISTRING(x) DECLARE_MKX_CONTEXT(x) \
class MATROSKA_DLL_API x : public EbmlUnicodeString { \
public: x(EBML_EXTRA_PARAM); \
x(const x & ElementToClone) :EbmlUnicodeString(ElementToClone) {} \
EBML_CONCRETE_CLASS(x)
#define DECLARE_MKX_STRING(x) DECLARE_MKX_CONTEXT(x) \
class MATROSKA_DLL_API x : public EbmlString { \
public: x(EBML_EXTRA_PARAM); \
x(const x & ElementToClone) :EbmlString(ElementToClone) {} \
EBML_CONCRETE_CLASS(x)
#define DECLARE_MKX_UINTEGER(x) DECLARE_MKX_CONTEXT(x) \
class MATROSKA_DLL_API x : public EbmlUInteger { \
public: x(EBML_EXTRA_PARAM); \
x(const x & ElementToClone) :EbmlUInteger(ElementToClone) {} \
EBML_CONCRETE_CLASS(x)
#define DECLARE_MKX_SINTEGER_CONS(x) DECLARE_MKX_CONTEXT(x) \
class MATROSKA_DLL_API x : public EbmlSInteger { \
public: x(EBML_EXTRA_PARAM); \
x(const x & ElementToClone); \
EBML_CONCRETE_CLASS(x)
#define DECLARE_MKX_SINTEGER(x) DECLARE_MKX_CONTEXT(x) \
class MATROSKA_DLL_API x : public EbmlSInteger { \
public: x(EBML_EXTRA_PARAM); \
x(const x & ElementToClone) :EbmlSInteger(ElementToClone) {} \
EBML_CONCRETE_CLASS(x)
#define DECLARE_MKX_DATE(x) DECLARE_MKX_CONTEXT(x) \
class MATROSKA_DLL_API x : public EbmlDate { \
public: x(EBML_EXTRA_PARAM); \
x(const x & ElementToClone) :EbmlDate(ElementToClone) {} \
EBML_CONCRETE_CLASS(x)
#define DECLARE_MKX_FLOAT(x) DECLARE_MKX_CONTEXT(x) \
class MATROSKA_DLL_API x : public EbmlFloat { \
public: x(EBML_EXTRA_PARAM); \
x(const x & ElementToClone) :EbmlFloat(ElementToClone) {} \
EBML_CONCRETE_CLASS(x)
#else
#define DEFINE_MKX_CONTEXT(a) DEFINE_xxx_CONTEXT(a,*GetKaxGlobal_Context)
#define DEFINE_MKX_MASTER_CONS(a,b,c,d,e) DEFINE_xxx_MASTER_CONS(a,b,c,d,e,*GetKaxGlobal_Context)
#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_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)
#define DEFINE_MKX_STRING(a,b,c,d,e) DEFINE_xxx_CLASS(a,b,c,d,e,*GetKaxGlobal_Context)
#define DEFINE_MKX_UNISTRING(a,b,c,d,e) DEFINE_xxx_CLASS(a,b,c,d,e,*GetKaxGlobal_Context)
#define DEFINE_MKX_BINARY(a,b,c,d,e) DEFINE_xxx_CLASS(a,b,c,d,e,*GetKaxGlobal_Context)
#define DEFINE_MKX_FLOAT_DEF(a,b,c,d,e,v) DEFINE_xxx_FLOAT_DEF(a,b,c,d,e,*GetKaxGlobal_Context,v)
#define DEFINE_MKX_FLOAT(a,b,c,d,e) DEFINE_xxx_CLASS(a,b,c,d,e,*GetKaxGlobal_Context)
#define DEFINE_MKX_DATE(a,b,c,d,e) DEFINE_xxx_CLASS(a,b,c,d,e,*GetKaxGlobal_Context)
#define DEFINE_MKX_BINARY_CONS(a,b,c,d,e) DEFINE_xxx_CLASS_CONS(a,b,c,d,e,*GetKaxGlobal_Context)
#define DEFINE_MKX_SINTEGER_CONS(a,b,c,d,e) DEFINE_xxx_CLASS_CONS(a,b,c,d,e,*GetKaxGlobal_Context)
#define DECLARE_MKX_CONTEXT(x)
#define DECLARE_MKX_MASTER(x) DECLARE_MKX_CONTEXT(x) \
class MATROSKA_DLL_API x : public EbmlMaster { \
public: x(); \
x(const x & ElementToClone) :EbmlMaster(ElementToClone) {} \
EBML_CONCRETE_CLASS(x)
#define DECLARE_MKX_MASTER_CONS(x) DECLARE_MKX_CONTEXT(x) \
class MATROSKA_DLL_API x : public EbmlMaster { \
public: x(); \
x(const x & ElementToClone); \
EBML_CONCRETE_CLASS(x)
#define DECLARE_MKX_BINARY(x) DECLARE_MKX_CONTEXT(x) \
class MATROSKA_DLL_API x : public EbmlBinary { \
public: x(); \
x(const x & ElementToClone) :EbmlBinary(ElementToClone) {} \
EBML_CONCRETE_CLASS(x)
#define DECLARE_MKX_BINARY_CONS(x) DECLARE_MKX_CONTEXT(x) \
class MATROSKA_DLL_API x : public EbmlBinary { \
public: x(); \
x(const x & ElementToClone); \
EBML_CONCRETE_CLASS(x)
#define DECLARE_MKX_UNISTRING(x) DECLARE_MKX_CONTEXT(x) \
class MATROSKA_DLL_API x : public EbmlUnicodeString { \
public: x(); \
x(const x & ElementToClone) :EbmlUnicodeString(ElementToClone) {} \
EBML_CONCRETE_CLASS(x)
#define DECLARE_MKX_STRING(x) DECLARE_MKX_CONTEXT(x) \
class MATROSKA_DLL_API x : public EbmlString { \
public: x(); \
x(const x & ElementToClone) :EbmlString(ElementToClone) {} \
EBML_CONCRETE_CLASS(x)
#define DECLARE_MKX_UINTEGER(x) DECLARE_MKX_CONTEXT(x) \
class MATROSKA_DLL_API x : public EbmlUInteger { \
public: x(); \
x(const x & ElementToClone) :EbmlUInteger(ElementToClone) {} \
EBML_CONCRETE_CLASS(x)
#define DECLARE_MKX_SINTEGER_CONS(x) DECLARE_MKX_CONTEXT(x) \
class MATROSKA_DLL_API x : public EbmlSInteger { \
public: x(); \
x(const x & ElementToClone); \
EBML_CONCRETE_CLASS(x)
#define DECLARE_MKX_SINTEGER(x) DECLARE_MKX_CONTEXT(x) \
class MATROSKA_DLL_API x : public EbmlSInteger { \
public: x(); \
x(const x & ElementToClone) :EbmlSInteger(ElementToClone) {} \
EBML_CONCRETE_CLASS(x)
#define DECLARE_MKX_DATE(x) DECLARE_MKX_CONTEXT(x) \
class MATROSKA_DLL_API x : public EbmlDate { \
public: x(); \
x(const x & ElementToClone) :EbmlDate(ElementToClone) {} \
EBML_CONCRETE_CLASS(x)
#define DECLARE_MKX_FLOAT(x) DECLARE_MKX_CONTEXT(x) \
class MATROSKA_DLL_API x : public EbmlFloat { \
public: x(); \
x(const x & ElementToClone) :EbmlFloat(ElementToClone) {} \
EBML_CONCRETE_CLASS(x)
#endif
#endif // LIBMATROSKA_DEFINES_H

View File

@ -52,7 +52,7 @@ START_LIBMATROSKA_NAMESPACE
DECLARE_MKX_BINARY(KaxSegmentUID)
public:
#if LIBEBML_VERSION >= 0x010000
#if defined(HAVE_EBML2)
KaxSegmentUID(EBML_DEF_CONS EBML_DEF_SEP EBML_EXTRA_PARAM);
#endif
virtual bool ValidateSize() const { return IsFiniteSize() && (GetSize() == 16);}

View File

@ -1,465 +1,465 @@
/****************************************************************************
** libmatroska : parse Matroska files, see http://www.matroska.org/
**
** <file/class description>
**
** Copyright (C) 2002-2003 Steve Lhomme. All rights reserved.
**
** This file is part of libmatroska.
**
** This library is free software; you can redistribute it and/or
** modify it under the terms of the GNU Lesser General Public
** License as published by the Free Software Foundation; either
** version 2.1 of the License, or (at your option) any later version.
**
** This library is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
** Lesser General Public License for more details.
**
** You should have received a copy of the GNU Lesser General Public
** License along with this library; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
**
** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**
** Contact license@matroska.org if any conditions of this licensing are
** not clear to you.
**
**********************************************************************/
/*!
\file
\version \$Id: FileKax.cpp 640 2004-07-09 21:05:36Z mosu $
\author Steve Lhomme <robux4 @ users.sf.net>
*/
//#include "StdInclude.h"
#include "matroska/FileKax.h"
#include "ebml/EbmlVersion.h"
#include "ebml/EbmlContexts.h"
//#include "Cluster.h"
//#include "Track.h"
//#include "Block.h"
//#include "Frame.h"
//#include "Version.h"
START_LIBMATROSKA_NAMESPACE
//typedef Track *TrackID;
FileMatroska::FileMatroska(IOCallback & output)
:myFile(output)
#ifdef OLD
,myCurrReadBlock(NULL)
,myMinClusterSize(5*1024) // 5KB is the min size of a cluster
,myMaxClusterSize(2*1024*1024) // 2MB is the max size of a cluster
,myCurrReadBlockTrack(0)
,myCurrWriteCluster(2*1024*1024) // myMaxClusterSize
,myCurrReadCluster(NULL)
,myReadBlockNumber(0)
#endif // OLD
{
#ifdef OLD
myStreamInfo.MainHeaderSize = TypeHeader::default_size() +
ActualHeader::default_size() +
ExtendedInfo::default_size() +
ContentInfo::default_size();
myStreamInfo.TrackEntrySize = Track::default_size();
myStreamInfo.BlockHeadSize = BLOCK_HEADER_SIZE;
myStreamInfo.ClusterHeadSize = CLUSTER_HEADER_SIZE;
myStreamInfo.ClusterFootSize = CLUSTER_TRAILER_SIZE;
#endif // OLD
}
FileMatroska::~FileMatroska()
{
// if (myCurrCluster != NULL)
// throw 0; // there are some data left to write
// if (myCurrReadCluster != NULL || myCurrReadBlock != NULL)
// throw 0; // there are some data left to write
}
#ifdef OLD
void FileMatroska::SetMaxClusterSize(const uint32 value)
{
myMaxClusterSize = value;
myCurrWriteCluster.setMaxSize(value);
}
void FileMatroska::Close(const uint32 aTimeLength)
{
Flush();
// get the file size
myFile.setFilePointer(0,seek_end);
myMainHeader.type_SetSize(myFile.getFilePointer());
// rewrite the header at the beginning
myFile.setFilePointer(0,seek_beginning);
// get the Track-entry size
uint32 track_entries_size = 0;
for (size_t i=0; i<myTracks.size(); i++)
{
track_entries_size += myTracks[i]->default_size();
}
myStreamInfo.TrackEntriesSize = track_entries_size;
myStreamInfo.TimeLength = aTimeLength;
myMainHeader.Render(myFile, myStreamInfo);
for (i=0; i<myTracks.size(); i++)
{
delete myTracks[i];
}
}
/*!
\warning after rendering the head, some parameters are locked
*/
filepos_t FileMatroska::RenderHead(const std::string & aEncoderApp)
{
try {
uint32 track_entries_size = 0;
for (size_t i=0; i<myTracks.size(); i++)
{
track_entries_size += myTracks[i]->default_size();
}
std::string aStr = LIB_NAME;
aStr += " ";
aStr += VERSION;
myStreamInfo.EncoderLib = aStr;
myStreamInfo.EncoderApp = aEncoderApp;
myStreamInfo.TrackEntryPosition = 0 + myStreamInfo.MainHeaderSize;
myStreamInfo.TrackEntriesSize = myTracks.size() * myStreamInfo.TrackEntrySize;
myStreamInfo.CodecEntryPosition = myStreamInfo.MainHeaderSize + myStreamInfo.TrackEntriesSize;
myStreamInfo.CodecEntrySize = 4;
for (i=0; i<myTracks.size(); i++)
{
myStreamInfo.CodecEntrySize += myTracks[i]->CodecSize();
}
// Main Header
filepos_t result = myMainHeader.Render(myFile, myStreamInfo);
// Track Entries
for (i=0; i<myTracks.size(); i++)
{
myTracks[i]->RenderEntry(myFile, i+1);
}
myStreamInfo.ClusterPosition = myStreamInfo.CodecEntryPosition + myStreamInfo.CodecEntrySize;
// Codec Header
result = CodecHeader::Render(myFile, myTracks);
return result;
}
catch (exception & Ex)
{
throw Ex;
}
}
/*!
\return 0 if the track was not created, or a valid track number
*/
Track * FileMatroska::CreateTrack(const track_type aType)
{
myTracks.push_back(new Track(aType));
return myTracks.back();
}
/*Track *FileMatroska::findTrack(Track * aTrack) const
{
for (size_t i=0; i<myTracks.size(); i++)
{
if (myTracks[i] == aTrack)
return myTracks[i];
}
return NULL;
}*/
void FileMatroska::track_SetName(Track * aTrack, const std::string & aName)
{
if (IsMyTrack(aTrack))
{
aTrack->SetName(aName);
}
}
void FileMatroska::track_SetLaced(Track * aTrack, bool bLaced)
{
if (IsMyTrack(aTrack))
{
aTrack->SetLaced(bLaced);
}
}
bool FileMatroska::AddFrame(Track * aTrack, const uint32 aTimecode, const binary *aFrame, const uint32 aFrameSize,
bool aKeyFrame, bool aBFrame)
{
try {
// make sure we know that track
if (IsMyTrack(aTrack))
{
// pass the cluster to the track
// handle the creation of a new cluster if needed
if (aTrack->AddFrame(aTimecode, aFrame, aFrameSize, aKeyFrame, aBFrame))
{
while (!aTrack->SerialiseBlock(myCurrWriteCluster))
{
/// \todo handle errors
uint32 aNbBlock;
myStreamInfo.ClusterSize += myCurrWriteCluster.Render(myFile, aNbBlock);
myStreamInfo.NumberBlock += aNbBlock;
myCurrWriteCluster.Flush();
}
}
return true;
}
return false;
}
catch (exception & Ex)
{
throw Ex;
}
}
void FileMatroska::Flush()
{
uint32 aNbBlock;
myStreamInfo.ClusterSize += myCurrWriteCluster.Render(myFile,aNbBlock);
myStreamInfo.NumberBlock += aNbBlock;
}
uint32 FileMatroska::ReadHead()
{
try {
uint32 result = myMainHeader.Read(myFile, myStreamInfo);
return result;
}
catch (exception & Ex)
{
throw Ex;
}
}
uint32 FileMatroska::ReadTracks()
{
try {
uint32 result = 0;
// seek to the start of the Track Entries
myFile.setFilePointer(myStreamInfo.TrackEntryPosition);
// get the number of Track Entries
uint8 TrackNumber = myStreamInfo.TrackEntriesSize / myStreamInfo.TrackEntrySize;
// read all the Track Entries
myTracks.clear();
for (uint8 TrackIdx = 0; TrackIdx<TrackNumber; TrackIdx ++) {
Track * tmpTrack = Track::ReadEntry(myFile, TrackIdx+1, myStreamInfo);
if (tmpTrack == NULL)
throw 0;
myTracks.push_back(tmpTrack);
}
return result;
}
catch (exception & Ex)
{
throw Ex;
}
}
uint32 FileMatroska::ReadCodec()
{
try {
// seek to the start of the Track Entries
myFile.setFilePointer(myStreamInfo.CodecEntryPosition);
uint32 result = CodecHeader::Read(myFile, myTracks);
return result;
}
catch (exception & Ex)
{
throw Ex;
}
}
inline bool FileMatroska::IsMyTrack(const Track * aTrack) const
{
if (aTrack == 0)
throw 0;
for (std::vector<Track*>::const_iterator i = myTracks.begin(); i != myTracks.end(); i ++)
{
if (*i == aTrack)
break;
}
if (i != myTracks.end())
return true;
else
return false;
}
void FileMatroska::SelectReadingTrack(Track * aTrack, bool select)
{
if (IsMyTrack(aTrack))
{
// here we have the right track
// check if it's not already selected
for (std::vector<uint8>::iterator j = mySelectedTracks.begin();
j != mySelectedTracks.end(); j ++)
{
if (*j == aTrack->TrackNumber())
break;
}
if (select && j == mySelectedTracks.end())
mySelectedTracks.push_back(aTrack->TrackNumber());
else if (!select && j != mySelectedTracks.end())
mySelectedTracks.erase(j);
std::sort(mySelectedTracks.begin(), mySelectedTracks.end());
}
}
inline bool FileMatroska::IsReadingTrack(const uint8 aTrackNumber) const
{
for (std::vector<uint8>::const_iterator trackIdx = mySelectedTracks.begin();
trackIdx != mySelectedTracks.end() && *trackIdx < aTrackNumber;
trackIdx++)
{}
if (trackIdx == mySelectedTracks.end())
return false;
else
return true;
}
//
void FileMatroska::Track_GetInfo(const Track * aTrack, TrackInfo & aTrackInfo) const
{
if (IsMyTrack(aTrack))
{
aTrack->GetInfo(aTrackInfo);
}
}
// Audio related getters/setters
void FileMatroska::Track_GetInfo_Audio(const Track * aTrack, TrackInfoAudio & aTrackInfo) const
{
if (IsMyTrack(aTrack))
{
aTrack->GetInfoAudio(aTrackInfo);
}
}
void FileMatroska::Track_SetInfo_Audio(Track * aTrack, const TrackInfoAudio & aTrackInfo)
{
if (IsMyTrack(aTrack))
{
aTrack->SetInfoAudio(aTrackInfo);
}
}
// Video related getters/setters
void FileMatroska::Track_GetInfo_Video(const Track * aTrack, TrackInfoVideo & aTrackInfo) const
{
if (IsMyTrack(aTrack))
{
aTrack->GetInfoVideo(aTrackInfo);
}
}
void FileMatroska::Track_SetInfo_Video(Track * aTrack, const TrackInfoVideo & aTrackInfo)
{
if (IsMyTrack(aTrack))
{
aTrack->SetInfoVideo(aTrackInfo);
}
}
/*!
\todo exit when there is no Block left
*/
bool FileMatroska::ReadFrame(Track * & aTrack, uint32 & aTimecode, const binary * & aFrame, uint32 & aFrameSize,
bool & aKeyFrame, bool & aBFrame)
{
if (myCurrReadBlockTrack == 0)
{
do {
if (myReadBlockNumber >= myStreamInfo.NumberBlock)
{
// myReadBlockNumber = myStreamInfo.NumberBlock;
return false;
}
// get the next frame in the file
if (!myCurrReadCluster.BlockLeft())
{
myCurrReadCluster.Flush();
try {
myCurrReadCluster.FindHead(myFile);
}
catch (exception & Ex)
{
return false;
}
}
myCurrReadCluster.GetBlock( myCurrReadBlock, myCurrReadBlockSize, myCurrReadBlockTrack );
myReadBlockNumber++;
} while (!IsReadingTrack(myCurrReadBlockTrack));
// get the track associated (normally from myTracks)
aTrack = myTracks[myCurrReadBlockTrack-1];
// get the next frame from the current block
aTrack->HandleBlock(myCurrReadBlock, myCurrReadBlockSize);
}
else
{
// get the track associated (normally from myTracks)
aTrack = myTracks[myCurrReadBlockTrack-1];
}
Frame * myReadFrame;
aTrack->GetNextFrame(aTimecode, myReadFrame, aKeyFrame, aBFrame);
aFrame = myReadFrame->buf();
aFrameSize = myReadFrame->length();
if (aTrack->NoFrameLeft())
{
aTrack->FlushBlock();
myCurrReadBlockTrack = 0;
}
return true;
}
#endif // OLD
END_LIBMATROSKA_NAMESPACE
void matroska_init()
{
#if LIBEBML_VERSION >= 0x010000
ebml_init();
#endif
}
void matroska_done()
{
#if LIBEBML_VERSION >= 0x010000
ebml_done();
#endif
}
/****************************************************************************
** libmatroska : parse Matroska files, see http://www.matroska.org/
**
** <file/class description>
**
** Copyright (C) 2002-2003 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$
\author Steve Lhomme <robux4 @ users.sf.net>
*/
//#include "StdInclude.h"
#include "matroska/FileKax.h"
#include "ebml/EbmlVersion.h"
#include "ebml/EbmlContexts.h"
//#include "Cluster.h"
//#include "Track.h"
//#include "Block.h"
//#include "Frame.h"
//#include "Version.h"
START_LIBMATROSKA_NAMESPACE
//typedef Track *TrackID;
FileMatroska::FileMatroska(IOCallback & output)
:myFile(output)
#ifdef OLD
,myCurrReadBlock(NULL)
,myMinClusterSize(5*1024) // 5KB is the min size of a cluster
,myMaxClusterSize(2*1024*1024) // 2MB is the max size of a cluster
,myCurrReadBlockTrack(0)
,myCurrWriteCluster(2*1024*1024) // myMaxClusterSize
,myCurrReadCluster(NULL)
,myReadBlockNumber(0)
#endif // OLD
{
#ifdef OLD
myStreamInfo.MainHeaderSize = TypeHeader::default_size() +
ActualHeader::default_size() +
ExtendedInfo::default_size() +
ContentInfo::default_size();
myStreamInfo.TrackEntrySize = Track::default_size();
myStreamInfo.BlockHeadSize = BLOCK_HEADER_SIZE;
myStreamInfo.ClusterHeadSize = CLUSTER_HEADER_SIZE;
myStreamInfo.ClusterFootSize = CLUSTER_TRAILER_SIZE;
#endif // OLD
}
FileMatroska::~FileMatroska()
{
// if (myCurrCluster != NULL)
// throw 0; // there are some data left to write
// if (myCurrReadCluster != NULL || myCurrReadBlock != NULL)
// throw 0; // there are some data left to write
}
#ifdef OLD
void FileMatroska::SetMaxClusterSize(const uint32 value)
{
myMaxClusterSize = value;
myCurrWriteCluster.setMaxSize(value);
}
void FileMatroska::Close(const uint32 aTimeLength)
{
Flush();
// get the file size
myFile.setFilePointer(0,seek_end);
myMainHeader.type_SetSize(myFile.getFilePointer());
// rewrite the header at the beginning
myFile.setFilePointer(0,seek_beginning);
// get the Track-entry size
uint32 track_entries_size = 0;
for (size_t i=0; i<myTracks.size(); i++)
{
track_entries_size += myTracks[i]->default_size();
}
myStreamInfo.TrackEntriesSize = track_entries_size;
myStreamInfo.TimeLength = aTimeLength;
myMainHeader.Render(myFile, myStreamInfo);
for (i=0; i<myTracks.size(); i++)
{
delete myTracks[i];
}
}
/*!
\warning after rendering the head, some parameters are locked
*/
filepos_t FileMatroska::RenderHead(const std::string & aEncoderApp)
{
try {
uint32 track_entries_size = 0;
for (size_t i=0; i<myTracks.size(); i++)
{
track_entries_size += myTracks[i]->default_size();
}
std::string aStr = LIB_NAME;
aStr += " ";
aStr += VERSION;
myStreamInfo.EncoderLib = aStr;
myStreamInfo.EncoderApp = aEncoderApp;
myStreamInfo.TrackEntryPosition = 0 + myStreamInfo.MainHeaderSize;
myStreamInfo.TrackEntriesSize = myTracks.size() * myStreamInfo.TrackEntrySize;
myStreamInfo.CodecEntryPosition = myStreamInfo.MainHeaderSize + myStreamInfo.TrackEntriesSize;
myStreamInfo.CodecEntrySize = 4;
for (i=0; i<myTracks.size(); i++)
{
myStreamInfo.CodecEntrySize += myTracks[i]->CodecSize();
}
// Main Header
filepos_t result = myMainHeader.Render(myFile, myStreamInfo);
// Track Entries
for (i=0; i<myTracks.size(); i++)
{
myTracks[i]->RenderEntry(myFile, i+1);
}
myStreamInfo.ClusterPosition = myStreamInfo.CodecEntryPosition + myStreamInfo.CodecEntrySize;
// Codec Header
result = CodecHeader::Render(myFile, myTracks);
return result;
}
catch (exception & Ex)
{
throw Ex;
}
}
/*!
\return 0 if the track was not created, or a valid track number
*/
Track * FileMatroska::CreateTrack(const track_type aType)
{
myTracks.push_back(new Track(aType));
return myTracks.back();
}
/*Track *FileMatroska::findTrack(Track * aTrack) const
{
for (size_t i=0; i<myTracks.size(); i++)
{
if (myTracks[i] == aTrack)
return myTracks[i];
}
return NULL;
}*/
void FileMatroska::track_SetName(Track * aTrack, const std::string & aName)
{
if (IsMyTrack(aTrack))
{
aTrack->SetName(aName);
}
}
void FileMatroska::track_SetLaced(Track * aTrack, bool bLaced)
{
if (IsMyTrack(aTrack))
{
aTrack->SetLaced(bLaced);
}
}
bool FileMatroska::AddFrame(Track * aTrack, const uint32 aTimecode, const binary *aFrame, const uint32 aFrameSize,
bool aKeyFrame, bool aBFrame)
{
try {
// make sure we know that track
if (IsMyTrack(aTrack))
{
// pass the cluster to the track
// handle the creation of a new cluster if needed
if (aTrack->AddFrame(aTimecode, aFrame, aFrameSize, aKeyFrame, aBFrame))
{
while (!aTrack->SerialiseBlock(myCurrWriteCluster))
{
/// \todo handle errors
uint32 aNbBlock;
myStreamInfo.ClusterSize += myCurrWriteCluster.Render(myFile, aNbBlock);
myStreamInfo.NumberBlock += aNbBlock;
myCurrWriteCluster.Flush();
}
}
return true;
}
return false;
}
catch (exception & Ex)
{
throw Ex;
}
}
void FileMatroska::Flush()
{
uint32 aNbBlock;
myStreamInfo.ClusterSize += myCurrWriteCluster.Render(myFile,aNbBlock);
myStreamInfo.NumberBlock += aNbBlock;
}
uint32 FileMatroska::ReadHead()
{
try {
uint32 result = myMainHeader.Read(myFile, myStreamInfo);
return result;
}
catch (exception & Ex)
{
throw Ex;
}
}
uint32 FileMatroska::ReadTracks()
{
try {
uint32 result = 0;
// seek to the start of the Track Entries
myFile.setFilePointer(myStreamInfo.TrackEntryPosition);
// get the number of Track Entries
uint8 TrackNumber = myStreamInfo.TrackEntriesSize / myStreamInfo.TrackEntrySize;
// read all the Track Entries
myTracks.clear();
for (uint8 TrackIdx = 0; TrackIdx<TrackNumber; TrackIdx ++) {
Track * tmpTrack = Track::ReadEntry(myFile, TrackIdx+1, myStreamInfo);
if (tmpTrack == NULL)
throw 0;
myTracks.push_back(tmpTrack);
}
return result;
}
catch (exception & Ex)
{
throw Ex;
}
}
uint32 FileMatroska::ReadCodec()
{
try {
// seek to the start of the Track Entries
myFile.setFilePointer(myStreamInfo.CodecEntryPosition);
uint32 result = CodecHeader::Read(myFile, myTracks);
return result;
}
catch (exception & Ex)
{
throw Ex;
}
}
inline bool FileMatroska::IsMyTrack(const Track * aTrack) const
{
if (aTrack == 0)
throw 0;
for (std::vector<Track*>::const_iterator i = myTracks.begin(); i != myTracks.end(); i ++)
{
if (*i == aTrack)
break;
}
if (i != myTracks.end())
return true;
else
return false;
}
void FileMatroska::SelectReadingTrack(Track * aTrack, bool select)
{
if (IsMyTrack(aTrack))
{
// here we have the right track
// check if it's not already selected
for (std::vector<uint8>::iterator j = mySelectedTracks.begin();
j != mySelectedTracks.end(); j ++)
{
if (*j == aTrack->TrackNumber())
break;
}
if (select && j == mySelectedTracks.end())
mySelectedTracks.push_back(aTrack->TrackNumber());
else if (!select && j != mySelectedTracks.end())
mySelectedTracks.erase(j);
std::sort(mySelectedTracks.begin(), mySelectedTracks.end());
}
}
inline bool FileMatroska::IsReadingTrack(const uint8 aTrackNumber) const
{
for (std::vector<uint8>::const_iterator trackIdx = mySelectedTracks.begin();
trackIdx != mySelectedTracks.end() && *trackIdx < aTrackNumber;
trackIdx++)
{}
if (trackIdx == mySelectedTracks.end())
return false;
else
return true;
}
//
void FileMatroska::Track_GetInfo(const Track * aTrack, TrackInfo & aTrackInfo) const
{
if (IsMyTrack(aTrack))
{
aTrack->GetInfo(aTrackInfo);
}
}
// Audio related getters/setters
void FileMatroska::Track_GetInfo_Audio(const Track * aTrack, TrackInfoAudio & aTrackInfo) const
{
if (IsMyTrack(aTrack))
{
aTrack->GetInfoAudio(aTrackInfo);
}
}
void FileMatroska::Track_SetInfo_Audio(Track * aTrack, const TrackInfoAudio & aTrackInfo)
{
if (IsMyTrack(aTrack))
{
aTrack->SetInfoAudio(aTrackInfo);
}
}
// Video related getters/setters
void FileMatroska::Track_GetInfo_Video(const Track * aTrack, TrackInfoVideo & aTrackInfo) const
{
if (IsMyTrack(aTrack))
{
aTrack->GetInfoVideo(aTrackInfo);
}
}
void FileMatroska::Track_SetInfo_Video(Track * aTrack, const TrackInfoVideo & aTrackInfo)
{
if (IsMyTrack(aTrack))
{
aTrack->SetInfoVideo(aTrackInfo);
}
}
/*!
\todo exit when there is no Block left
*/
bool FileMatroska::ReadFrame(Track * & aTrack, uint32 & aTimecode, const binary * & aFrame, uint32 & aFrameSize,
bool & aKeyFrame, bool & aBFrame)
{
if (myCurrReadBlockTrack == 0)
{
do {
if (myReadBlockNumber >= myStreamInfo.NumberBlock)
{
// myReadBlockNumber = myStreamInfo.NumberBlock;
return false;
}
// get the next frame in the file
if (!myCurrReadCluster.BlockLeft())
{
myCurrReadCluster.Flush();
try {
myCurrReadCluster.FindHead(myFile);
}
catch (exception & Ex)
{
return false;
}
}
myCurrReadCluster.GetBlock( myCurrReadBlock, myCurrReadBlockSize, myCurrReadBlockTrack );
myReadBlockNumber++;
} while (!IsReadingTrack(myCurrReadBlockTrack));
// get the track associated (normally from myTracks)
aTrack = myTracks[myCurrReadBlockTrack-1];
// get the next frame from the current block
aTrack->HandleBlock(myCurrReadBlock, myCurrReadBlockSize);
}
else
{
// get the track associated (normally from myTracks)
aTrack = myTracks[myCurrReadBlockTrack-1];
}
Frame * myReadFrame;
aTrack->GetNextFrame(aTimecode, myReadFrame, aKeyFrame, aBFrame);
aFrame = myReadFrame->buf();
aFrameSize = myReadFrame->length();
if (aTrack->NoFrameLeft())
{
aTrack->FlushBlock();
myCurrReadBlockTrack = 0;
}
return true;
}
#endif // OLD
END_LIBMATROSKA_NAMESPACE
void matroska_init()
{
#if defined(HAVE_EBML2)
ebml_init();
#endif
}
void matroska_done()
{
#if defined(HAVE_EBML2)
ebml_done();
#endif
}

View File

@ -1,81 +1,81 @@
/****************************************************************************
** 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: KaxInfoData.cpp 1078 2005-03-03 13:13:04Z robux4 $
\author Steve Lhomme <robux4 @ users.sf.net>
\author John Cannon <spyder2555 @ users.sf.net>
*/
#include "matroska/KaxInfoData.h"
#include "matroska/KaxContexts.h"
#include "matroska/KaxDefines.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)
{
}
KaxNextUID::KaxNextUID(EBML_EXTRA_DEF)
:KaxSegmentUID(EBML_DEF_BINARY_CTX(KaxNextUID) EBML_DEF_SEP EBML_EXTRA_CALL)
{
}
#if LIBEBML_VERSION >= 0x010000
KaxSegmentUID::KaxSegmentUID(EBML_DEF_CONS EBML_DEF_SEP EBML_EXTRA_DEF)
:EbmlBinary(EBML_DEF_PARAM EBML_DEF_SEP EBML_EXTRA_CALL)
{
}
#endif
END_LIBMATROSKA_NAMESPACE
/****************************************************************************
** 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$
\author Steve Lhomme <robux4 @ users.sf.net>
\author John Cannon <spyder2555 @ users.sf.net>
*/
#include "matroska/KaxInfoData.h"
#include "matroska/KaxContexts.h"
#include "matroska/KaxDefines.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)
{
}
KaxNextUID::KaxNextUID(EBML_EXTRA_DEF)
:KaxSegmentUID(EBML_DEF_BINARY_CTX(KaxNextUID) EBML_DEF_SEP EBML_EXTRA_CALL)
{
}
#if defined(HAVE_EBML2)
KaxSegmentUID::KaxSegmentUID(EBML_DEF_CONS EBML_DEF_SEP EBML_EXTRA_DEF)
:EbmlBinary(EBML_DEF_PARAM EBML_DEF_SEP EBML_EXTRA_CALL)
{
}
#endif
END_LIBMATROSKA_NAMESPACE

View File

@ -1,212 +1,212 @@
/****************************************************************************
** 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: KaxTagMulti.cpp 640 2004-07-09 21:05:36Z mosu $
\author Jory Stone <jcsston @ toughguy.net>
\author Steve Lhomme <robux4 @ users.sf.net>
*/
#include "matroska/KaxTagMulti.h"
#include "matroska/KaxContexts.h"
#include "matroska/KaxDefines.h"
using namespace LIBEBML_NAMESPACE;
START_LIBMATROSKA_NAMESPACE
DEFINE_START_SEMANTIC(KaxTagMultiGlobal)
// TODO: have the default EBML global semantic as well
DEFINE_SEMANTIC_ITEM(false, false, KaxTagMultiComment)
DEFINE_END_SEMANTIC(KaxTagMultiGlobal)
DEFINE_START_SEMANTIC(KaxTagMultiComment)
DEFINE_SEMANTIC_ITEM(false, true, KaxTagMultiCommentName)
DEFINE_SEMANTIC_ITEM(false, true, KaxTagMultiCommentComments)
DEFINE_SEMANTIC_ITEM(false, true, KaxTagMultiCommentLanguage)
DEFINE_END_SEMANTIC(KaxTagMultiComment)
DEFINE_START_SEMANTIC(KaxTagMultiCommercial)
DEFINE_SEMANTIC_ITEM(true, false, KaxTagCommercial)
DEFINE_END_SEMANTIC(KaxTagMultiCommercial)
DEFINE_START_SEMANTIC(KaxTagCommercial)
DEFINE_SEMANTIC_ITEM(true, true, KaxTagMultiCommercialType)
DEFINE_SEMANTIC_ITEM(false, true, KaxTagMultiCommercialAddress)
DEFINE_SEMANTIC_ITEM(false, false, KaxTagMultiCommercialURL)
DEFINE_SEMANTIC_ITEM(false, false, KaxTagMultiCommercialEmail)
DEFINE_SEMANTIC_ITEM(false, false, KaxTagMultiPrice)
DEFINE_END_SEMANTIC(KaxTagCommercial)
DEFINE_START_SEMANTIC(KaxTagMultiPrice)
DEFINE_SEMANTIC_ITEM(false, true, KaxTagMultiPriceCurrency)
DEFINE_SEMANTIC_ITEM(false, true, KaxTagMultiPriceAmount)
DEFINE_SEMANTIC_ITEM(false, true, KaxTagMultiPricePriceDate)
DEFINE_END_SEMANTIC(KaxTagMultiPrice)
DEFINE_START_SEMANTIC(KaxTagMultiDate)
DEFINE_SEMANTIC_ITEM(true, false, KaxTagDate)
DEFINE_END_SEMANTIC(KaxTagMultiDate)
DEFINE_START_SEMANTIC(KaxTagDate)
DEFINE_SEMANTIC_ITEM(true, true, KaxTagMultiDateType)
DEFINE_SEMANTIC_ITEM(false, true, KaxTagMultiDateDateBegin)
DEFINE_SEMANTIC_ITEM(false, true, KaxTagMultiDateDateEnd)
DEFINE_END_SEMANTIC(KaxTagDate)
DEFINE_START_SEMANTIC(KaxTagMultiEntity)
DEFINE_SEMANTIC_ITEM(true, false, KaxTagEntity)
DEFINE_END_SEMANTIC(KaxTagMultiEntity)
DEFINE_START_SEMANTIC(KaxTagEntity)
DEFINE_SEMANTIC_ITEM(true, true, KaxTagMultiEntityType)
DEFINE_SEMANTIC_ITEM(false, true, KaxTagMultiEntityName)
DEFINE_SEMANTIC_ITEM(false, false, KaxTagMultiEntityURL)
DEFINE_SEMANTIC_ITEM(false, false, KaxTagMultiEntityEmail)
DEFINE_SEMANTIC_ITEM(false, true, KaxTagMultiEntityAddress)
DEFINE_END_SEMANTIC(KaxTagEntity)
DEFINE_START_SEMANTIC(KaxTagMultiIdentifier)
DEFINE_SEMANTIC_ITEM(true, false, KaxTagIdentifier)
DEFINE_END_SEMANTIC(KaxTagMultiIdentifier)
DEFINE_START_SEMANTIC(KaxTagIdentifier)
DEFINE_SEMANTIC_ITEM(true, true, KaxTagMultiIdentifierType)
DEFINE_SEMANTIC_ITEM(false, true, KaxTagMultiIdentifierBinary)
DEFINE_SEMANTIC_ITEM(false, true, KaxTagMultiIdentifierString)
DEFINE_END_SEMANTIC(KaxTagIdentifier)
DEFINE_START_SEMANTIC(KaxTagMultiLegal)
DEFINE_SEMANTIC_ITEM(true, false, KaxTagLegal)
DEFINE_END_SEMANTIC(KaxTagMultiLegal)
DEFINE_START_SEMANTIC(KaxTagLegal)
DEFINE_SEMANTIC_ITEM(true, true, KaxTagMultiLegalType)
DEFINE_SEMANTIC_ITEM(false, true, KaxTagMultiLegalContent)
DEFINE_SEMANTIC_ITEM(false, false, KaxTagMultiLegalURL)
DEFINE_SEMANTIC_ITEM(false, true, KaxTagMultiLegalAddress)
DEFINE_END_SEMANTIC(KaxTagLegal)
DEFINE_START_SEMANTIC(KaxTagMultiTitle)
DEFINE_SEMANTIC_ITEM(true, false, KaxTagTitle)
DEFINE_END_SEMANTIC(KaxTagMultiTitle)
DEFINE_START_SEMANTIC(KaxTagTitle)
DEFINE_SEMANTIC_ITEM(true, true, KaxTagMultiTitleType)
DEFINE_SEMANTIC_ITEM(false, true, KaxTagMultiTitleName)
DEFINE_SEMANTIC_ITEM(false, true, KaxTagMultiTitleSubTitle)
DEFINE_SEMANTIC_ITEM(false, true, KaxTagMultiTitleEdition)
DEFINE_SEMANTIC_ITEM(false, true, KaxTagMultiTitleAddress)
DEFINE_SEMANTIC_ITEM(false, false, KaxTagMultiTitleURL)
DEFINE_SEMANTIC_ITEM(false, false, KaxTagMultiTitleEmail)
DEFINE_SEMANTIC_ITEM(false, true, KaxTagMultiTitleLanguage)
DEFINE_END_SEMANTIC(KaxTagTitle)
DEFINE_START_SEMANTIC(KaxTagMultiAttachment)
DEFINE_SEMANTIC_ITEM(true, false, KaxTagAttachment)
DEFINE_END_SEMANTIC(KaxTagMultiAttachment)
DEFINE_START_SEMANTIC(KaxTagAttachment)
DEFINE_SEMANTIC_ITEM(false, true, KaxTagAttachmentID)
DEFINE_END_SEMANTIC(KaxTagAttachment)
DEFINE_MKX_CONTEXT(KaxTagMultiGlobal);
const EbmlSemanticContext & GetKaxTagsGlobal_Context()
{
return EBML_CLASS_SEMCONTEXT(KaxTagMultiGlobal);
}
#if LIBEBML_VERSION >= 0x010000
#define DEFINE_TAG_MASTER(a,b,c,d,e) DEFINE_xxx_MASTER(a,b,d,e,EBML_SemanticKaxTagMultiGlobal)
#else
#define DEFINE_TAG_MASTER(a,b,c,d,e) DEFINE_xxx_MASTER(a,b,c,d,e,*GetKaxTagsGlobal_Context)
#endif
DEFINE_MKX_MASTER (KaxTagMultiComment, 0x5B7B, 2, KaxTag, "MultiComment");
DEFINE_MKX_STRING (KaxTagMultiCommentName, 0x5F7D, 2, KaxTagMultiComment, "MultiCommentName");
DEFINE_MKX_UNISTRING(KaxTagMultiCommentComments, 0x5F7C, 2, KaxTagMultiComment, "MultiCommentComments");
DEFINE_MKX_STRING (KaxTagMultiCommentLanguage, 0x22B59D, 3, KaxTagMultiComment, "MultiCommentLanguage");
DEFINE_TAG_MASTER (KaxTagMultiCommercial, 0x4DC7, 2, KaxTag, "MultiCommercial");
DEFINE_TAG_MASTER (KaxTagCommercial, 0x4EC7, 2, KaxTagMultiCommercial, "Commercial");
DEFINE_MKX_UINTEGER (KaxTagMultiCommercialType, 0x5BD7, 2, KaxTagCommercial, "MultiCommercialType");
DEFINE_MKX_UNISTRING(KaxTagMultiCommercialAddress, 0x5BBB, 2, KaxTagCommercial, "MultiCommercialAddress");
DEFINE_MKX_STRING (KaxTagMultiCommercialURL, 0x5BDA, 2, KaxTagCommercial, "MultiCommercialURL");
DEFINE_MKX_STRING (KaxTagMultiCommercialEmail, 0x5BC0, 2, KaxTagCommercial, "MultiCommercialEmail");
DEFINE_TAG_MASTER (KaxTagMultiPrice, 0x5BC3, 2, KaxTagCommercial, "MultiPrice");
DEFINE_MKX_STRING (KaxTagMultiPriceCurrency, 0x5B6C, 2, KaxTagMultiPrice, "MultiPriceCurrency");
DEFINE_MKX_FLOAT (KaxTagMultiPriceAmount, 0x5B6E, 2, KaxTagMultiPrice, "MultiPriceAmount");
DEFINE_MKX_DATE (KaxTagMultiPricePriceDate, 0x5B6F, 2, KaxTagMultiPrice, "MultiPricePriceDate");
DEFINE_TAG_MASTER (KaxTagMultiDate, 0x4DC8, 2, KaxTag, "MultiDate");
DEFINE_TAG_MASTER (KaxTagDate, 0x4EC8, 2, KaxTagMultiDate, "Date");
DEFINE_MKX_UINTEGER (KaxTagMultiDateType, 0x5BD8, 2, KaxTagDate, "MultiDateType");
DEFINE_MKX_DATE (KaxTagMultiDateDateBegin, 0x4460, 2, KaxTagDate, "MultiDateDateBegin");
DEFINE_MKX_DATE (KaxTagMultiDateDateEnd, 0x4462, 2, KaxTagDate, "MultiDateDateEnd");
DEFINE_TAG_MASTER (KaxTagMultiEntity, 0x4DC9, 2, KaxTag, "MultiEntity");
DEFINE_TAG_MASTER (KaxTagEntity, 0x4EC9, 2, KaxTagMultiEntity, "Entity");
DEFINE_MKX_UINTEGER (KaxTagMultiEntityType, 0x5BD9, 2, KaxTagEntity, "MultiEntityType");
DEFINE_MKX_UNISTRING(KaxTagMultiEntityName, 0x5BED, 2, KaxTagEntity, "MultiEntityName");
DEFINE_MKX_STRING (KaxTagMultiEntityURL, 0x5BDB, 2, KaxTagEntity, "MultiEntityURL");
DEFINE_MKX_STRING (KaxTagMultiEntityEmail, 0x5BC1, 2, KaxTagEntity, "MultiEntityEmail");
DEFINE_MKX_UNISTRING(KaxTagMultiEntityAddress, 0x5BDC, 2, KaxTagEntity, "MultiEntityAddress");
DEFINE_TAG_MASTER (KaxTagMultiIdentifier, 0x4DC6, 2, KaxTag, "MultiIdentifier");
DEFINE_TAG_MASTER (KaxTagIdentifier, 0x4EC6, 2, KaxTagMultiIdentifier, "Identifier");
DEFINE_MKX_UINTEGER (KaxTagMultiIdentifierType, 0x5BAD, 2, KaxTagIdentifier, "MultiIdentifierType");
DEFINE_MKX_BINARY (KaxTagMultiIdentifierBinary, 0x6B67, 2, KaxTagIdentifier, "MultiIdentifierBinary");
DEFINE_MKX_UNISTRING(KaxTagMultiIdentifierString, 0x6B68, 2, KaxTagIdentifier, "MultiIdentifierString");
DEFINE_TAG_MASTER (KaxTagMultiLegal, 0x4DC5, 2, KaxTag, "MultiLegal");
DEFINE_TAG_MASTER (KaxTagLegal, 0x4EC5, 2, KaxTagMultiLegal, "Legal");
DEFINE_MKX_UINTEGER (KaxTagMultiLegalType, 0x5BBD, 2, KaxTagLegal, "MultiLegalType");
DEFINE_MKX_UNISTRING(KaxTagMultiLegalContent, 0x5BB2, 2, KaxTagLegal, "MultiLegalContent");
DEFINE_MKX_STRING (KaxTagMultiLegalURL, 0x5B34, 2, KaxTagLegal, "MultiLegalURL");
DEFINE_MKX_UNISTRING(KaxTagMultiLegalAddress, 0x5B9B, 2, KaxTagLegal, "MultiLegalAddress");
DEFINE_TAG_MASTER (KaxTagMultiTitle, 0x4DC4, 2, KaxTag, "MultiTitle");
DEFINE_TAG_MASTER (KaxTagTitle, 0x4EC4, 2, KaxTagMultiTitle, "Title");
DEFINE_MKX_UINTEGER (KaxTagMultiTitleType, 0x5B7D, 2, KaxTagTitle, "MultiTitleType");
DEFINE_MKX_UNISTRING(KaxTagMultiTitleName, 0x5BB9, 2, KaxTagTitle, "MultiTitleName");
DEFINE_MKX_UNISTRING(KaxTagMultiTitleSubTitle, 0x5B5B, 2, KaxTagTitle, "MultiTitleSubTitle");
DEFINE_MKX_UNISTRING(KaxTagMultiTitleEdition, 0x5BAE, 2, KaxTagTitle, "MultiTitleEdition");
DEFINE_MKX_UNISTRING(KaxTagMultiTitleAddress, 0x5B33, 2, KaxTagTitle, "MultiTitleAddress");
DEFINE_MKX_STRING (KaxTagMultiTitleURL, 0x5BA9, 2, KaxTagTitle, "MultiTitleURL");
DEFINE_MKX_STRING (KaxTagMultiTitleEmail, 0x5BC9, 2, KaxTagTitle, "MultiTitleEmail");
DEFINE_MKX_STRING (KaxTagMultiTitleLanguage, 0x22B59E, 3, KaxTagTitle, "MultiTitleLanguage");
DEFINE_TAG_MASTER (KaxTagMultiAttachment, 0x4DC3, 2, KaxTag, "MultiAttachment");
DEFINE_TAG_MASTER (KaxTagAttachment, 0x4EC3, 2, KaxTagMultiAttachment, "Attachment");
DEFINE_MKX_UINTEGER (KaxTagAttachmentID, 0x5BA0, 2, KaxTagAttachment, "AttachmentID");
END_LIBMATROSKA_NAMESPACE
/****************************************************************************
** 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$
\author Jory Stone <jcsston @ toughguy.net>
\author Steve Lhomme <robux4 @ users.sf.net>
*/
#include "matroska/KaxTagMulti.h"
#include "matroska/KaxContexts.h"
#include "matroska/KaxDefines.h"
using namespace LIBEBML_NAMESPACE;
START_LIBMATROSKA_NAMESPACE
DEFINE_START_SEMANTIC(KaxTagMultiGlobal)
// TODO: have the default EBML global semantic as well
DEFINE_SEMANTIC_ITEM(false, false, KaxTagMultiComment)
DEFINE_END_SEMANTIC(KaxTagMultiGlobal)
DEFINE_START_SEMANTIC(KaxTagMultiComment)
DEFINE_SEMANTIC_ITEM(false, true, KaxTagMultiCommentName)
DEFINE_SEMANTIC_ITEM(false, true, KaxTagMultiCommentComments)
DEFINE_SEMANTIC_ITEM(false, true, KaxTagMultiCommentLanguage)
DEFINE_END_SEMANTIC(KaxTagMultiComment)
DEFINE_START_SEMANTIC(KaxTagMultiCommercial)
DEFINE_SEMANTIC_ITEM(true, false, KaxTagCommercial)
DEFINE_END_SEMANTIC(KaxTagMultiCommercial)
DEFINE_START_SEMANTIC(KaxTagCommercial)
DEFINE_SEMANTIC_ITEM(true, true, KaxTagMultiCommercialType)
DEFINE_SEMANTIC_ITEM(false, true, KaxTagMultiCommercialAddress)
DEFINE_SEMANTIC_ITEM(false, false, KaxTagMultiCommercialURL)
DEFINE_SEMANTIC_ITEM(false, false, KaxTagMultiCommercialEmail)
DEFINE_SEMANTIC_ITEM(false, false, KaxTagMultiPrice)
DEFINE_END_SEMANTIC(KaxTagCommercial)
DEFINE_START_SEMANTIC(KaxTagMultiPrice)
DEFINE_SEMANTIC_ITEM(false, true, KaxTagMultiPriceCurrency)
DEFINE_SEMANTIC_ITEM(false, true, KaxTagMultiPriceAmount)
DEFINE_SEMANTIC_ITEM(false, true, KaxTagMultiPricePriceDate)
DEFINE_END_SEMANTIC(KaxTagMultiPrice)
DEFINE_START_SEMANTIC(KaxTagMultiDate)
DEFINE_SEMANTIC_ITEM(true, false, KaxTagDate)
DEFINE_END_SEMANTIC(KaxTagMultiDate)
DEFINE_START_SEMANTIC(KaxTagDate)
DEFINE_SEMANTIC_ITEM(true, true, KaxTagMultiDateType)
DEFINE_SEMANTIC_ITEM(false, true, KaxTagMultiDateDateBegin)
DEFINE_SEMANTIC_ITEM(false, true, KaxTagMultiDateDateEnd)
DEFINE_END_SEMANTIC(KaxTagDate)
DEFINE_START_SEMANTIC(KaxTagMultiEntity)
DEFINE_SEMANTIC_ITEM(true, false, KaxTagEntity)
DEFINE_END_SEMANTIC(KaxTagMultiEntity)
DEFINE_START_SEMANTIC(KaxTagEntity)
DEFINE_SEMANTIC_ITEM(true, true, KaxTagMultiEntityType)
DEFINE_SEMANTIC_ITEM(false, true, KaxTagMultiEntityName)
DEFINE_SEMANTIC_ITEM(false, false, KaxTagMultiEntityURL)
DEFINE_SEMANTIC_ITEM(false, false, KaxTagMultiEntityEmail)
DEFINE_SEMANTIC_ITEM(false, true, KaxTagMultiEntityAddress)
DEFINE_END_SEMANTIC(KaxTagEntity)
DEFINE_START_SEMANTIC(KaxTagMultiIdentifier)
DEFINE_SEMANTIC_ITEM(true, false, KaxTagIdentifier)
DEFINE_END_SEMANTIC(KaxTagMultiIdentifier)
DEFINE_START_SEMANTIC(KaxTagIdentifier)
DEFINE_SEMANTIC_ITEM(true, true, KaxTagMultiIdentifierType)
DEFINE_SEMANTIC_ITEM(false, true, KaxTagMultiIdentifierBinary)
DEFINE_SEMANTIC_ITEM(false, true, KaxTagMultiIdentifierString)
DEFINE_END_SEMANTIC(KaxTagIdentifier)
DEFINE_START_SEMANTIC(KaxTagMultiLegal)
DEFINE_SEMANTIC_ITEM(true, false, KaxTagLegal)
DEFINE_END_SEMANTIC(KaxTagMultiLegal)
DEFINE_START_SEMANTIC(KaxTagLegal)
DEFINE_SEMANTIC_ITEM(true, true, KaxTagMultiLegalType)
DEFINE_SEMANTIC_ITEM(false, true, KaxTagMultiLegalContent)
DEFINE_SEMANTIC_ITEM(false, false, KaxTagMultiLegalURL)
DEFINE_SEMANTIC_ITEM(false, true, KaxTagMultiLegalAddress)
DEFINE_END_SEMANTIC(KaxTagLegal)
DEFINE_START_SEMANTIC(KaxTagMultiTitle)
DEFINE_SEMANTIC_ITEM(true, false, KaxTagTitle)
DEFINE_END_SEMANTIC(KaxTagMultiTitle)
DEFINE_START_SEMANTIC(KaxTagTitle)
DEFINE_SEMANTIC_ITEM(true, true, KaxTagMultiTitleType)
DEFINE_SEMANTIC_ITEM(false, true, KaxTagMultiTitleName)
DEFINE_SEMANTIC_ITEM(false, true, KaxTagMultiTitleSubTitle)
DEFINE_SEMANTIC_ITEM(false, true, KaxTagMultiTitleEdition)
DEFINE_SEMANTIC_ITEM(false, true, KaxTagMultiTitleAddress)
DEFINE_SEMANTIC_ITEM(false, false, KaxTagMultiTitleURL)
DEFINE_SEMANTIC_ITEM(false, false, KaxTagMultiTitleEmail)
DEFINE_SEMANTIC_ITEM(false, true, KaxTagMultiTitleLanguage)
DEFINE_END_SEMANTIC(KaxTagTitle)
DEFINE_START_SEMANTIC(KaxTagMultiAttachment)
DEFINE_SEMANTIC_ITEM(true, false, KaxTagAttachment)
DEFINE_END_SEMANTIC(KaxTagMultiAttachment)
DEFINE_START_SEMANTIC(KaxTagAttachment)
DEFINE_SEMANTIC_ITEM(false, true, KaxTagAttachmentID)
DEFINE_END_SEMANTIC(KaxTagAttachment)
DEFINE_MKX_CONTEXT(KaxTagMultiGlobal);
const EbmlSemanticContext & GetKaxTagsGlobal_Context()
{
return EBML_CLASS_SEMCONTEXT(KaxTagMultiGlobal);
}
#if defined(HAVE_EBML2)
#define DEFINE_TAG_MASTER(a,b,c,d,e) DEFINE_xxx_MASTER(a,b,d,e,EBML_SemanticKaxTagMultiGlobal)
#else
#define DEFINE_TAG_MASTER(a,b,c,d,e) DEFINE_xxx_MASTER(a,b,c,d,e,*GetKaxTagsGlobal_Context)
#endif
DEFINE_MKX_MASTER (KaxTagMultiComment, 0x5B7B, 2, KaxTag, "MultiComment");
DEFINE_MKX_STRING (KaxTagMultiCommentName, 0x5F7D, 2, KaxTagMultiComment, "MultiCommentName");
DEFINE_MKX_UNISTRING(KaxTagMultiCommentComments, 0x5F7C, 2, KaxTagMultiComment, "MultiCommentComments");
DEFINE_MKX_STRING (KaxTagMultiCommentLanguage, 0x22B59D, 3, KaxTagMultiComment, "MultiCommentLanguage");
DEFINE_TAG_MASTER (KaxTagMultiCommercial, 0x4DC7, 2, KaxTag, "MultiCommercial");
DEFINE_TAG_MASTER (KaxTagCommercial, 0x4EC7, 2, KaxTagMultiCommercial, "Commercial");
DEFINE_MKX_UINTEGER (KaxTagMultiCommercialType, 0x5BD7, 2, KaxTagCommercial, "MultiCommercialType");
DEFINE_MKX_UNISTRING(KaxTagMultiCommercialAddress, 0x5BBB, 2, KaxTagCommercial, "MultiCommercialAddress");
DEFINE_MKX_STRING (KaxTagMultiCommercialURL, 0x5BDA, 2, KaxTagCommercial, "MultiCommercialURL");
DEFINE_MKX_STRING (KaxTagMultiCommercialEmail, 0x5BC0, 2, KaxTagCommercial, "MultiCommercialEmail");
DEFINE_TAG_MASTER (KaxTagMultiPrice, 0x5BC3, 2, KaxTagCommercial, "MultiPrice");
DEFINE_MKX_STRING (KaxTagMultiPriceCurrency, 0x5B6C, 2, KaxTagMultiPrice, "MultiPriceCurrency");
DEFINE_MKX_FLOAT (KaxTagMultiPriceAmount, 0x5B6E, 2, KaxTagMultiPrice, "MultiPriceAmount");
DEFINE_MKX_DATE (KaxTagMultiPricePriceDate, 0x5B6F, 2, KaxTagMultiPrice, "MultiPricePriceDate");
DEFINE_TAG_MASTER (KaxTagMultiDate, 0x4DC8, 2, KaxTag, "MultiDate");
DEFINE_TAG_MASTER (KaxTagDate, 0x4EC8, 2, KaxTagMultiDate, "Date");
DEFINE_MKX_UINTEGER (KaxTagMultiDateType, 0x5BD8, 2, KaxTagDate, "MultiDateType");
DEFINE_MKX_DATE (KaxTagMultiDateDateBegin, 0x4460, 2, KaxTagDate, "MultiDateDateBegin");
DEFINE_MKX_DATE (KaxTagMultiDateDateEnd, 0x4462, 2, KaxTagDate, "MultiDateDateEnd");
DEFINE_TAG_MASTER (KaxTagMultiEntity, 0x4DC9, 2, KaxTag, "MultiEntity");
DEFINE_TAG_MASTER (KaxTagEntity, 0x4EC9, 2, KaxTagMultiEntity, "Entity");
DEFINE_MKX_UINTEGER (KaxTagMultiEntityType, 0x5BD9, 2, KaxTagEntity, "MultiEntityType");
DEFINE_MKX_UNISTRING(KaxTagMultiEntityName, 0x5BED, 2, KaxTagEntity, "MultiEntityName");
DEFINE_MKX_STRING (KaxTagMultiEntityURL, 0x5BDB, 2, KaxTagEntity, "MultiEntityURL");
DEFINE_MKX_STRING (KaxTagMultiEntityEmail, 0x5BC1, 2, KaxTagEntity, "MultiEntityEmail");
DEFINE_MKX_UNISTRING(KaxTagMultiEntityAddress, 0x5BDC, 2, KaxTagEntity, "MultiEntityAddress");
DEFINE_TAG_MASTER (KaxTagMultiIdentifier, 0x4DC6, 2, KaxTag, "MultiIdentifier");
DEFINE_TAG_MASTER (KaxTagIdentifier, 0x4EC6, 2, KaxTagMultiIdentifier, "Identifier");
DEFINE_MKX_UINTEGER (KaxTagMultiIdentifierType, 0x5BAD, 2, KaxTagIdentifier, "MultiIdentifierType");
DEFINE_MKX_BINARY (KaxTagMultiIdentifierBinary, 0x6B67, 2, KaxTagIdentifier, "MultiIdentifierBinary");
DEFINE_MKX_UNISTRING(KaxTagMultiIdentifierString, 0x6B68, 2, KaxTagIdentifier, "MultiIdentifierString");
DEFINE_TAG_MASTER (KaxTagMultiLegal, 0x4DC5, 2, KaxTag, "MultiLegal");
DEFINE_TAG_MASTER (KaxTagLegal, 0x4EC5, 2, KaxTagMultiLegal, "Legal");
DEFINE_MKX_UINTEGER (KaxTagMultiLegalType, 0x5BBD, 2, KaxTagLegal, "MultiLegalType");
DEFINE_MKX_UNISTRING(KaxTagMultiLegalContent, 0x5BB2, 2, KaxTagLegal, "MultiLegalContent");
DEFINE_MKX_STRING (KaxTagMultiLegalURL, 0x5B34, 2, KaxTagLegal, "MultiLegalURL");
DEFINE_MKX_UNISTRING(KaxTagMultiLegalAddress, 0x5B9B, 2, KaxTagLegal, "MultiLegalAddress");
DEFINE_TAG_MASTER (KaxTagMultiTitle, 0x4DC4, 2, KaxTag, "MultiTitle");
DEFINE_TAG_MASTER (KaxTagTitle, 0x4EC4, 2, KaxTagMultiTitle, "Title");
DEFINE_MKX_UINTEGER (KaxTagMultiTitleType, 0x5B7D, 2, KaxTagTitle, "MultiTitleType");
DEFINE_MKX_UNISTRING(KaxTagMultiTitleName, 0x5BB9, 2, KaxTagTitle, "MultiTitleName");
DEFINE_MKX_UNISTRING(KaxTagMultiTitleSubTitle, 0x5B5B, 2, KaxTagTitle, "MultiTitleSubTitle");
DEFINE_MKX_UNISTRING(KaxTagMultiTitleEdition, 0x5BAE, 2, KaxTagTitle, "MultiTitleEdition");
DEFINE_MKX_UNISTRING(KaxTagMultiTitleAddress, 0x5B33, 2, KaxTagTitle, "MultiTitleAddress");
DEFINE_MKX_STRING (KaxTagMultiTitleURL, 0x5BA9, 2, KaxTagTitle, "MultiTitleURL");
DEFINE_MKX_STRING (KaxTagMultiTitleEmail, 0x5BC9, 2, KaxTagTitle, "MultiTitleEmail");
DEFINE_MKX_STRING (KaxTagMultiTitleLanguage, 0x22B59E, 3, KaxTagTitle, "MultiTitleLanguage");
DEFINE_TAG_MASTER (KaxTagMultiAttachment, 0x4DC3, 2, KaxTag, "MultiAttachment");
DEFINE_TAG_MASTER (KaxTagAttachment, 0x4EC3, 2, KaxTagMultiAttachment, "Attachment");
DEFINE_MKX_UINTEGER (KaxTagAttachmentID, 0x5BA0, 2, KaxTagAttachment, "AttachmentID");
END_LIBMATROSKA_NAMESPACE