From: Steve Lhomme Date: Tue, 25 May 2010 12:02:30 +0000 (+0000) Subject: libebml/libebml2: only Master elements can have an infinite/unknown size X-Git-Tag: release-1.0.0~6 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f6c6194c9d3b93e530b3a6948a602a2186b89889;p=libmatroska libebml/libebml2: only Master elements can have an infinite/unknown size git-svn-id: https://matroska.svn.sourceforge.net/svnroot/matroska/trunk/libmatroska@270 a6f86f6d-0131-4f8e-9e7b-e335508773d5 --- diff --git a/matroska/KaxChapters.h b/matroska/KaxChapters.h index 9770052..fc934d1 100644 --- a/matroska/KaxChapters.h +++ b/matroska/KaxChapters.h @@ -1,137 +1,137 @@ -/**************************************************************************** -** libmatroska : parse Matroska files, see http://www.matroska.org/ -** -** -** -** 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.h,v 1.9 2004/04/14 23:26:17 robux4 Exp $ - \author Steve Lhomme -*/ -#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 (GetSize() == 16);} -}; - -DECLARE_MKX_BINARY(KaxChapterSegmentEditionUID) - public: - virtual bool ValidateSize() const { return (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 - -#endif // LIBMATROSKA_CHAPTERS_H +/**************************************************************************** +** libmatroska : parse Matroska files, see http://www.matroska.org/ +** +** +** +** 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 +*/ +#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 + +#endif // LIBMATROSKA_CHAPTERS_H diff --git a/matroska/KaxInfoData.h b/matroska/KaxInfoData.h index dc703b4..71c9929 100644 --- a/matroska/KaxInfoData.h +++ b/matroska/KaxInfoData.h @@ -1,121 +1,121 @@ -/**************************************************************************** -** libmatroska : parse Matroska files, see http://www.matroska.org/ -** -** -** -** 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.h,v 1.7 2004/04/14 23:26:17 robux4 Exp $ - \author Steve Lhomme - \author John Cannon - \author Moritz Bunkus -*/ -#ifndef LIBMATROSKA_INFO_DATA_H -#define LIBMATROSKA_INFO_DATA_H - -#include "matroska/KaxTypes.h" -#include "ebml/EbmlUInteger.h" -#include "ebml/EbmlFloat.h" -#include "ebml/EbmlUnicodeString.h" -#include "ebml/EbmlBinary.h" -#include "ebml/EbmlDate.h" -#include "ebml/EbmlMaster.h" -#include "matroska/KaxDefines.h" - -using namespace LIBEBML_NAMESPACE; - -START_LIBMATROSKA_NAMESPACE - -DECLARE_MKX_BINARY(KaxSegmentUID) - public: -#if LIBEBML_VERSION >= 0x010000 - KaxSegmentUID(EBML_DEF_CONS EBML_DEF_SEP EBML_EXTRA_PARAM); -#endif - virtual bool ValidateSize() const { return (GetSize() == 16);} -}; - -DECLARE_MKX_UNISTRING(KaxSegmentFilename) -}; - -DECLARE_MKX_CONTEXT(KaxPrevUID); -class MATROSKA_DLL_API KaxPrevUID : public KaxSegmentUID { - public: - KaxPrevUID(EBML_EXTRA_PARAM); - KaxPrevUID(const KaxPrevUID & ElementToClone) :KaxSegmentUID(ElementToClone){} - virtual bool ValidateSize() const { return (GetSize() == 16);} - - EBML_CONCRETE_CLASS(KaxPrevUID) -}; - -DECLARE_MKX_UNISTRING(KaxPrevFilename) -}; - -DECLARE_MKX_CONTEXT(KaxNextUID); -class MATROSKA_DLL_API KaxNextUID : public KaxSegmentUID { - public: - KaxNextUID(EBML_EXTRA_PARAM); - KaxNextUID(const KaxNextUID & ElementToClone) :KaxSegmentUID(ElementToClone){} - virtual bool ValidateSize() const { return (GetSize() == 16);} - - EBML_CONCRETE_CLASS(KaxNextUID) -}; - -DECLARE_MKX_UNISTRING(KaxNextFilename) -}; - -DECLARE_MKX_BINARY(KaxSegmentFamily) - public: - virtual bool ValidateSize() const { return (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 +/**************************************************************************** +** libmatroska : parse Matroska files, see http://www.matroska.org/ +** +** +** +** 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 + \author John Cannon + \author Moritz Bunkus +*/ +#ifndef LIBMATROSKA_INFO_DATA_H +#define LIBMATROSKA_INFO_DATA_H + +#include "matroska/KaxTypes.h" +#include "ebml/EbmlUInteger.h" +#include "ebml/EbmlFloat.h" +#include "ebml/EbmlUnicodeString.h" +#include "ebml/EbmlBinary.h" +#include "ebml/EbmlDate.h" +#include "ebml/EbmlMaster.h" +#include "matroska/KaxDefines.h" + +using namespace LIBEBML_NAMESPACE; + +START_LIBMATROSKA_NAMESPACE + +DECLARE_MKX_BINARY(KaxSegmentUID) + public: +#if LIBEBML_VERSION >= 0x010000 + 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: + KaxPrevUID(EBML_EXTRA_PARAM); + KaxPrevUID(const KaxPrevUID & ElementToClone) :KaxSegmentUID(ElementToClone){} + virtual bool ValidateSize() const { return IsFiniteSize() && (GetSize() == 16);} + + EBML_CONCRETE_CLASS(KaxPrevUID) +}; + +DECLARE_MKX_UNISTRING(KaxPrevFilename) +}; + +DECLARE_MKX_CONTEXT(KaxNextUID); +class MATROSKA_DLL_API KaxNextUID : public KaxSegmentUID { + public: + KaxNextUID(EBML_EXTRA_PARAM); + KaxNextUID(const KaxNextUID & ElementToClone) :KaxSegmentUID(ElementToClone){} + virtual bool ValidateSize() const { return IsFiniteSize() && (GetSize() == 16);} + + 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 diff --git a/matroska/KaxSeekHead.h b/matroska/KaxSeekHead.h index eb6e601..84e411e 100644 --- a/matroska/KaxSeekHead.h +++ b/matroska/KaxSeekHead.h @@ -1,80 +1,80 @@ -/**************************************************************************** -** libmatroska : parse Matroska files, see http://www.matroska.org/ -** -** -** -** 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: KaxSeekHead.h,v 1.7 2004/04/14 23:26:17 robux4 Exp $ - \author Steve Lhomme -*/ -#ifndef LIBMATROSKA_SEEK_HEAD_H -#define LIBMATROSKA_SEEK_HEAD_H - -#include "matroska/KaxTypes.h" -#include "ebml/EbmlMaster.h" -#include "ebml/EbmlBinary.h" -#include "ebml/EbmlUInteger.h" -#include "matroska/KaxDefines.h" - -using namespace LIBEBML_NAMESPACE; - -START_LIBMATROSKA_NAMESPACE - -class KaxSegment; -class KaxSeek; - -DECLARE_MKX_MASTER(KaxSeekHead) - public: - /*! - \brief add an element to index in the Meta Seek data - \note the element should already be written in the file - */ - void IndexThis(const EbmlElement & aElt, const KaxSegment & ParentSegment); - - KaxSeek * FindFirstOf(const EbmlCallbacks & Callbacks) const; - KaxSeek * FindNextOf(const KaxSeek &aPrev) const; -}; - -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 GetSize() <= 4;} -}; - -DECLARE_MKX_UINTEGER(KaxSeekPosition) -}; - -END_LIBMATROSKA_NAMESPACE - -#endif // LIBMATROSKA_SEEK_HEAD_H +/**************************************************************************** +** libmatroska : parse Matroska files, see http://www.matroska.org/ +** +** +** +** 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 +*/ +#ifndef LIBMATROSKA_SEEK_HEAD_H +#define LIBMATROSKA_SEEK_HEAD_H + +#include "matroska/KaxTypes.h" +#include "ebml/EbmlMaster.h" +#include "ebml/EbmlBinary.h" +#include "ebml/EbmlUInteger.h" +#include "matroska/KaxDefines.h" + +using namespace LIBEBML_NAMESPACE; + +START_LIBMATROSKA_NAMESPACE + +class KaxSegment; +class KaxSeek; + +DECLARE_MKX_MASTER(KaxSeekHead) + public: + /*! + \brief add an element to index in the Meta Seek data + \note the element should already be written in the file + */ + void IndexThis(const EbmlElement & aElt, const KaxSegment & ParentSegment); + + KaxSeek * FindFirstOf(const EbmlCallbacks & Callbacks) const; + KaxSeek * FindNextOf(const KaxSeek &aPrev) const; +}; + +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/KaxTag.h b/matroska/KaxTag.h index 14da537..3b95cf7 100644 --- a/matroska/KaxTag.h +++ b/matroska/KaxTag.h @@ -1,231 +1,231 @@ -/**************************************************************************** -** libmatroska : parse Matroska files, see http://www.matroska.org/ -** -** -** -** 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.h,v 1.9 2004/04/14 23:26:17 robux4 Exp $ - \author Jory Stone - \author Steve Lhomme -*/ -#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_MASTER(KaxTagGeneral) -}; - -DECLARE_MKX_MASTER(KaxTagGenres) -}; - -DECLARE_MKX_MASTER(KaxTagAudioSpecific) -}; - -DECLARE_MKX_MASTER(KaxTagImageSpecific) -}; - -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_UNISTRING(KaxTagArchivalLocation) -}; - -DECLARE_MKX_BINARY(KaxTagAudioEncryption) -}; - -DECLARE_MKX_FLOAT(KaxTagAudioGain) -}; - -DECLARE_MKX_STRING(KaxTagAudioGenre) -}; - -DECLARE_MKX_FLOAT(KaxTagAudioPeak) -}; - -DECLARE_MKX_UNISTRING(KaxTagBibliography) -}; - -DECLARE_MKX_FLOAT(KaxTagBPM) -}; - -DECLARE_MKX_UINTEGER(KaxTagCaptureDPI) -}; - -DECLARE_MKX_BINARY(KaxTagCaptureLightness) -}; - -DECLARE_MKX_UINTEGER(KaxTagCapturePaletteSetting) -}; - -DECLARE_MKX_BINARY(KaxTagCaptureSharpness) -}; - -DECLARE_MKX_UNISTRING(KaxTagCropped) -}; - -DECLARE_MKX_UINTEGER(KaxTagDiscTrack) -}; - -DECLARE_MKX_UNISTRING(KaxTagEncoder) -}; - -DECLARE_MKX_UNISTRING(KaxTagEncodeSettings) -}; - -DECLARE_MKX_BINARY(KaxTagEqualisation) -}; - -DECLARE_MKX_UNISTRING(KaxTagFile) -}; - -DECLARE_MKX_STRING(KaxTagInitialKey) -}; - -DECLARE_MKX_UNISTRING(KaxTagKeywords) -}; - -DECLARE_MKX_STRING(KaxTagLanguage) -}; - -DECLARE_MKX_UINTEGER(KaxTagLength) -}; - -DECLARE_MKX_UNISTRING(KaxTagMood) -}; - -DECLARE_MKX_STRING(KaxTagOfficialAudioFileURL) -}; - -DECLARE_MKX_STRING(KaxTagOfficialAudioSourceURL) -}; - -DECLARE_MKX_STRING(KaxTagOriginalDimensions) -}; - -DECLARE_MKX_UNISTRING(KaxTagOriginalMediaType) -}; - -DECLARE_MKX_UINTEGER(KaxTagPlayCounter) -}; - -DECLARE_MKX_UINTEGER(KaxTagPlaylistDelay) -}; - -DECLARE_MKX_SINTEGER(KaxTagPopularimeter) -}; - -DECLARE_MKX_UNISTRING(KaxTagProduct) -}; - -DECLARE_MKX_BINARY(KaxTagRating) -}; - -DECLARE_MKX_STRING(KaxTagRecordLocation) -}; - -DECLARE_MKX_UINTEGER(KaxTagSetPart) -}; - -DECLARE_MKX_UNISTRING(KaxTagSource) -}; - -DECLARE_MKX_UNISTRING(KaxTagSourceForm) -}; - -DECLARE_MKX_STRING(KaxTagSubGenre) -}; - -DECLARE_MKX_UNISTRING(KaxTagSubject) -}; - -DECLARE_MKX_UNISTRING(KaxTagUnsynchronisedText) -}; - -DECLARE_MKX_STRING(KaxTagUserDefinedURL) -}; - -DECLARE_MKX_BINARY(KaxTagVideoGenre) - public: - virtual bool ValidateSize() const {return (GetSize() >= 2);} -}; - -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_TAG_H +/**************************************************************************** +** libmatroska : parse Matroska files, see http://www.matroska.org/ +** +** +** +** 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 + \author Steve Lhomme +*/ +#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_MASTER(KaxTagGeneral) +}; + +DECLARE_MKX_MASTER(KaxTagGenres) +}; + +DECLARE_MKX_MASTER(KaxTagAudioSpecific) +}; + +DECLARE_MKX_MASTER(KaxTagImageSpecific) +}; + +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_UNISTRING(KaxTagArchivalLocation) +}; + +DECLARE_MKX_BINARY(KaxTagAudioEncryption) +}; + +DECLARE_MKX_FLOAT(KaxTagAudioGain) +}; + +DECLARE_MKX_STRING(KaxTagAudioGenre) +}; + +DECLARE_MKX_FLOAT(KaxTagAudioPeak) +}; + +DECLARE_MKX_UNISTRING(KaxTagBibliography) +}; + +DECLARE_MKX_FLOAT(KaxTagBPM) +}; + +DECLARE_MKX_UINTEGER(KaxTagCaptureDPI) +}; + +DECLARE_MKX_BINARY(KaxTagCaptureLightness) +}; + +DECLARE_MKX_UINTEGER(KaxTagCapturePaletteSetting) +}; + +DECLARE_MKX_BINARY(KaxTagCaptureSharpness) +}; + +DECLARE_MKX_UNISTRING(KaxTagCropped) +}; + +DECLARE_MKX_UINTEGER(KaxTagDiscTrack) +}; + +DECLARE_MKX_UNISTRING(KaxTagEncoder) +}; + +DECLARE_MKX_UNISTRING(KaxTagEncodeSettings) +}; + +DECLARE_MKX_BINARY(KaxTagEqualisation) +}; + +DECLARE_MKX_UNISTRING(KaxTagFile) +}; + +DECLARE_MKX_STRING(KaxTagInitialKey) +}; + +DECLARE_MKX_UNISTRING(KaxTagKeywords) +}; + +DECLARE_MKX_STRING(KaxTagLanguage) +}; + +DECLARE_MKX_UINTEGER(KaxTagLength) +}; + +DECLARE_MKX_UNISTRING(KaxTagMood) +}; + +DECLARE_MKX_STRING(KaxTagOfficialAudioFileURL) +}; + +DECLARE_MKX_STRING(KaxTagOfficialAudioSourceURL) +}; + +DECLARE_MKX_STRING(KaxTagOriginalDimensions) +}; + +DECLARE_MKX_UNISTRING(KaxTagOriginalMediaType) +}; + +DECLARE_MKX_UINTEGER(KaxTagPlayCounter) +}; + +DECLARE_MKX_UINTEGER(KaxTagPlaylistDelay) +}; + +DECLARE_MKX_SINTEGER(KaxTagPopularimeter) +}; + +DECLARE_MKX_UNISTRING(KaxTagProduct) +}; + +DECLARE_MKX_BINARY(KaxTagRating) +}; + +DECLARE_MKX_STRING(KaxTagRecordLocation) +}; + +DECLARE_MKX_UINTEGER(KaxTagSetPart) +}; + +DECLARE_MKX_UNISTRING(KaxTagSource) +}; + +DECLARE_MKX_UNISTRING(KaxTagSourceForm) +}; + +DECLARE_MKX_STRING(KaxTagSubGenre) +}; + +DECLARE_MKX_UNISTRING(KaxTagSubject) +}; + +DECLARE_MKX_UNISTRING(KaxTagUnsynchronisedText) +}; + +DECLARE_MKX_STRING(KaxTagUserDefinedURL) +}; + +DECLARE_MKX_BINARY(KaxTagVideoGenre) + public: + virtual bool ValidateSize() const {return IsFiniteSize() && (GetSize() >= 2);} +}; + +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_TAG_H diff --git a/matroska/KaxTagMulti.h b/matroska/KaxTagMulti.h index 06a6a5c..facaf70 100644 --- a/matroska/KaxTagMulti.h +++ b/matroska/KaxTagMulti.h @@ -1,304 +1,304 @@ -/**************************************************************************** -** libmatroska : parse Matroska files, see http://www.matroska.org/ -** -** -** -** 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.h,v 1.9 2004/04/14 23:26:17 robux4 Exp $ - \author Jory Stone - \author Steve Lhomme -*/ -#ifndef LIBMATROSKA_TAGMULTI_H -#define LIBMATROSKA_TAGMULTI_H - -#include "matroska/KaxTypes.h" -#include "ebml/EbmlMaster.h" -#include "ebml/EbmlDate.h" -#include "ebml/EbmlFloat.h" -#include "ebml/EbmlSInteger.h" -#include "ebml/EbmlUInteger.h" -#include "ebml/EbmlString.h" -#include "ebml/EbmlUnicodeString.h" -#include "ebml/EbmlBinary.h" -#include "matroska/KaxDefines.h" - -using namespace LIBEBML_NAMESPACE; - -START_LIBMATROSKA_NAMESPACE - -enum KaxTagMultiCommercialTypes { - KaxTagMultiCommercialType_FilePurchase = 1, //Information on where to purchase this file. This is akin to the WPAY tag in ID3. - KaxTagMultiCommercialType_ItemPurchase, //Information on where to purchase this album. This is akin to the WCOM tag in ID3. - KaxTagMultiCommercialType_Owner //Information on the purchase that occurred for this file. This is akin to the OWNE tag in ID3. -}; -enum KaxTagMultiDateTypes { - KaxTagMultiDateType_EncodingDate = 1, //The time that the encoding of this item was completed. This is akin to the TDEN tag in ID3. - KaxTagMultiDateType_RecordingDate, //The time that the recording began, and finished. This is akin to the TDRC tag in ID3. - KaxTagMultiDateType_ReleaseDate, //The time that the item was originaly released. This is akin to the TDRL tag in ID3. - KaxTagMultiDateType_OriginalReleaseDate, //The time that the item was originaly released if it is a remake. This is akin to the TDOR tag in ID3. - KaxTagMultiDateType_TaggingDate, //The time that the tags were done for this item. This is akin to the TDTG tag in ID3. - KaxTagMultiDateType_DigitizingDate //The time that the item was tranfered to a digital medium. This is akin to the IDIT tag in RIFF -}; -enum KaxTagMultiEntitiesTypes { - KaxTagMultiEntitiesType_LyricistTextWriter = 1, //The person that wrote the words/script for this item. This is akin to the TEXT tag in ID3. - KaxTagMultiEntitiesType_Composer, //The name of the composer of this item. This is akin to the TCOM tag in ID3. - KaxTagMultiEntitiesType_LeadPerformerSoloist, //This is akin to the TPE1 tag in ID3. - KaxTagMultiEntitiesType_BandOrchestraAccompaniment, //This is akin to the TPE2 tag in ID3. - KaxTagMultiEntitiesType_OriginalLyricistTextWriter, //This is akin to the TOLY tag in ID3. - KaxTagMultiEntitiesType_OriginalArtistPerformer, //This is akin to the TOPE tag in ID3. - KaxTagMultiEntitiesType_OriginalAlbumMovieShowTitle, //This is akin to the TOAL tag in ID3. - KaxTagMultiEntitiesType_ConductorPerformerRefinement, //This is akin to the TPE3 tag in ID3. - KaxTagMultiEntitiesType_InterpretedRemixedBy, //This is akin to the TPE4 tag in ID3. - KaxTagMultiEntitiesType_Director, //This is akin to the IART tag in RIFF - KaxTagMultiEntitiesType_ProducedBy, //This is akin to the IPRO tag in Extended RIFF - KaxTagMultiEntitiesType_Cinematographer, //This is akin to the ICNM tag in Extended RIFF - KaxTagMultiEntitiesType_ProductionDesigner, //This is akin to the IPDS tag in Extended RIFF - KaxTagMultiEntitiesType_CostumeDesigner, //This is akin to the ICDS tag in Extended RIFF - KaxTagMultiEntitiesType_ProductionStudio, //This is akin to the ISTD tag in Extended RIFF - KaxTagMultiEntitiesType_DistributedBy, //This is akin to the IDST tag in Extended RIFF - KaxTagMultiEntitiesType_CommissionedBy, //This is akin to the ICMS tag in RIFF - KaxTagMultiEntitiesType_Engineer, //This is akin to the IENG tag in RIFF - KaxTagMultiEntitiesType_EditedBy, //This is akin to the IEDT tag in Extended RIFF - KaxTagMultiEntitiesType_EncodedBy, //This is akin to the TENC tag in ID3. - KaxTagMultiEntitiesType_RippedBy, //This is akin to the IRIP tag in Extended RIFF - KaxTagMultiEntitiesType_InvolvedPeopleList, //A very general tag for everyone else that wants to be listed. This is akin to the TMCL tag in ID3. - KaxTagMultiEntitiesType_InternetRadioStationName, //This is akin to the TSRN tag in ID3. - KaxTagMultiEntitiesType_Publisher //This is akin to the TPUB tag in ID3. -}; - -enum KaxTagMultiIdentifierTypes { - KaxTagMultiIdentifierType_ISRC = 1, //String, The International Standard Recording Code - KaxTagMultiIdentifierType_CDIdentifier, //Binary, This is a binary dump of the TOC of the CDROM that this item was taken from. This holds the same information as the MCDI in ID3. - KaxTagMultiIdentifierType_ISBN, //String, International Standard Book Number - KaxTagMultiIdentifierType_Catalog, //String, sometimes the EAN/UPC, often some letters followed by some numbers - KaxTagMultiIdentifierType_EAN, //String, EAN-13 bar code identifier - KaxTagMultiIdentifierType_UPC, //String, UPC-A bar code identifier - KaxTagMultiIdentifierType_LabelCode, //String, Typically printed as ________ (LC) xxxx) ~~~~~~~~ or _________ (LC) 0xxxx) ~~~~~~~~~ on CDs medias or covers, where xxxx is a 4-digit number. - KaxTagMultiIdentifierType_LCCN, //String, Library of Congress Control Number - KaxTagMultiIdentifierType_UniqueFileIdentifier, //Binary, This used for a dump of the UFID field in ID3. This field would only be used if the item was pulled from an MP3. - CDROM_CD_TEXT_PACK_TOC_INFO2 //Binary -}; - -enum KaxTagMultiLegalTypes { - KaxTagMultiLegalType_Copyright = 1, //The copyright information as per the copyright holder. This is akin to the TCOP tag in ID3. - KaxTagMultiLegalType_ProductionCopyright, //The copyright information as per the production copyright holder. This is akin to the TPRO tag in ID3. - KaxTagMultiLegalType_TermsOfUse //The terms of use for this item. This is akin to the USER tag in ID3. -}; - -enum KaxTagMultiTitleTypes { - KaxTagMultiTitleType_TrackTitle = 1, - //The title of this item. In the case of a track, the Name element should be identical to the Name element. - //For example, for music you might label this "Canon in D", or for video's audio track you might use "English 5.1" This is akin to the TIT2 tag in ID3. - KaxTagMultiTitleType_AlbumMovieShowTitle, - //This is the name given to a grouping of tracks and/or chapters. - //For example, all video, audio, and subtitle tracks for a movie would be grouped under this and be given the name of the movie. - //All tracks for a particular CD would be grouped together under the title of the CD, or if all tracks for a CD were recorded as a single track, seperated by chapters, the same would apply. - //You could use this to label episode 3 of The Simpsons. This is akin to the TALB tag in ID3. - KaxTagMultiTitleType_SetTitle, //This would be used to label a set of ID 2. For example, season 13 of The Simpsons. - KaxTagMultiTitleType_Series //This would be used to label a set of ID 3. For example, The Simpsons. -}; - -DECLARE_MKX_MASTER(KaxTagMultiComment) -}; - -DECLARE_MKX_STRING(KaxTagMultiCommentName) -}; - -DECLARE_MKX_UNISTRING(KaxTagMultiCommentComments) -}; - -DECLARE_MKX_STRING(KaxTagMultiCommentLanguage) -}; - -DECLARE_MKX_MASTER(KaxTagMultiCommercial) -}; - -DECLARE_MKX_MASTER(KaxTagCommercial) -}; - -DECLARE_MKX_UINTEGER(KaxTagMultiCommercialType) -}; - -DECLARE_MKX_UNISTRING(KaxTagMultiCommercialAddress) -}; - -DECLARE_MKX_STRING(KaxTagMultiCommercialURL) -}; - -DECLARE_MKX_STRING(KaxTagMultiCommercialEmail) -}; - -DECLARE_MKX_MASTER(KaxTagMultiPrice) -}; - -DECLARE_MKX_STRING(KaxTagMultiPriceCurrency) -}; - -DECLARE_MKX_FLOAT(KaxTagMultiPriceAmount) -}; - -DECLARE_MKX_DATE(KaxTagMultiPricePriceDate) -}; - -DECLARE_MKX_MASTER(KaxTagMultiDate) -}; - -DECLARE_MKX_MASTER(KaxTagDate) -}; - -DECLARE_MKX_UINTEGER(KaxTagMultiDateType) -}; - -DECLARE_MKX_DATE(KaxTagMultiDateDateBegin) -}; - -DECLARE_MKX_DATE(KaxTagMultiDateDateEnd) -}; - -DECLARE_MKX_MASTER(KaxTagMultiEntity) -}; - -DECLARE_MKX_MASTER(KaxTagEntity) -}; - -DECLARE_MKX_UINTEGER(KaxTagMultiEntityType) -}; - -DECLARE_MKX_UNISTRING(KaxTagMultiEntityName) -}; - -DECLARE_MKX_UNISTRING(KaxTagMultiEntityAddress) -}; - -DECLARE_MKX_STRING(KaxTagMultiEntityURL) -}; - -DECLARE_MKX_STRING(KaxTagMultiEntityEmail) -}; - -DECLARE_MKX_MASTER(KaxTagMultiIdentifier) -}; - -DECLARE_MKX_MASTER(KaxTagIdentifier) -}; - -DECLARE_MKX_UINTEGER(KaxTagMultiIdentifierType) -}; - -DECLARE_MKX_BINARY(KaxTagMultiIdentifierBinary) -}; - -DECLARE_MKX_UNISTRING(KaxTagMultiIdentifierString) -}; - -DECLARE_MKX_MASTER(KaxTagMultiLegal) -}; - -DECLARE_MKX_MASTER(KaxTagLegal) -}; - -DECLARE_MKX_UINTEGER(KaxTagMultiLegalType) -}; - -DECLARE_MKX_UNISTRING(KaxTagMultiLegalContent) -}; - -DECLARE_MKX_STRING(KaxTagMultiLegalURL) -}; - -DECLARE_MKX_UNISTRING(KaxTagMultiLegalAddress) -}; - -DECLARE_MKX_MASTER(KaxTagMultiTitle) -}; - -DECLARE_MKX_MASTER(KaxTagTitle) -}; - -DECLARE_MKX_UINTEGER(KaxTagMultiTitleType) -}; - - -DECLARE_MKX_UNISTRING(KaxTagMultiTitleName) -}; - -DECLARE_MKX_UNISTRING(KaxTagMultiTitleSubTitle) -}; - -DECLARE_MKX_UNISTRING(KaxTagMultiTitleEdition) -}; - -DECLARE_MKX_UNISTRING(KaxTagMultiTitleAddress) -}; - -DECLARE_MKX_STRING(KaxTagMultiTitleURL) -}; - -DECLARE_MKX_STRING(KaxTagMultiTitleEmail) -}; - -DECLARE_MKX_STRING(KaxTagMultiTitleLanguage) -}; - -DECLARE_MKX_MASTER(KaxTagMultiAttachment) -}; - -DECLARE_MKX_MASTER(KaxTagAttachment) -}; - -DECLARE_MKX_UINTEGER(KaxTagAttachmentID) -}; - -#if 0 -DECLARE_MKX_FLOAT(KaxTagBPM) -}; - -DECLARE_MKX_SINTEGER(KaxTagPopularimeter) -}; - -DECLARE_MKX_BINARY(KaxTagRating) -}; - -DECLARE_MKX_UINTEGER(KaxTagSetPart) -}; - -DECLARE_MKX_STRING(KaxTagUserDefinedURL) -}; - -DECLARE_MKX_BINARY(KaxTagVideoSecondaryGenre) - public: - virtual bool ValidateSize() const {return (Size >= 4); -}; - -DECLARE_MKX_UNISTRING(KaxWritingApp) -}; -#endif - -END_LIBMATROSKA_NAMESPACE - -#endif // LIBMATROSKA_TAGMULTI_H +/**************************************************************************** +** libmatroska : parse Matroska files, see http://www.matroska.org/ +** +** +** +** 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 + \author Steve Lhomme +*/ +#ifndef LIBMATROSKA_TAGMULTI_H +#define LIBMATROSKA_TAGMULTI_H + +#include "matroska/KaxTypes.h" +#include "ebml/EbmlMaster.h" +#include "ebml/EbmlDate.h" +#include "ebml/EbmlFloat.h" +#include "ebml/EbmlSInteger.h" +#include "ebml/EbmlUInteger.h" +#include "ebml/EbmlString.h" +#include "ebml/EbmlUnicodeString.h" +#include "ebml/EbmlBinary.h" +#include "matroska/KaxDefines.h" + +using namespace LIBEBML_NAMESPACE; + +START_LIBMATROSKA_NAMESPACE + +enum KaxTagMultiCommercialTypes { + KaxTagMultiCommercialType_FilePurchase = 1, //Information on where to purchase this file. This is akin to the WPAY tag in ID3. + KaxTagMultiCommercialType_ItemPurchase, //Information on where to purchase this album. This is akin to the WCOM tag in ID3. + KaxTagMultiCommercialType_Owner //Information on the purchase that occurred for this file. This is akin to the OWNE tag in ID3. +}; +enum KaxTagMultiDateTypes { + KaxTagMultiDateType_EncodingDate = 1, //The time that the encoding of this item was completed. This is akin to the TDEN tag in ID3. + KaxTagMultiDateType_RecordingDate, //The time that the recording began, and finished. This is akin to the TDRC tag in ID3. + KaxTagMultiDateType_ReleaseDate, //The time that the item was originaly released. This is akin to the TDRL tag in ID3. + KaxTagMultiDateType_OriginalReleaseDate, //The time that the item was originaly released if it is a remake. This is akin to the TDOR tag in ID3. + KaxTagMultiDateType_TaggingDate, //The time that the tags were done for this item. This is akin to the TDTG tag in ID3. + KaxTagMultiDateType_DigitizingDate //The time that the item was tranfered to a digital medium. This is akin to the IDIT tag in RIFF +}; +enum KaxTagMultiEntitiesTypes { + KaxTagMultiEntitiesType_LyricistTextWriter = 1, //The person that wrote the words/script for this item. This is akin to the TEXT tag in ID3. + KaxTagMultiEntitiesType_Composer, //The name of the composer of this item. This is akin to the TCOM tag in ID3. + KaxTagMultiEntitiesType_LeadPerformerSoloist, //This is akin to the TPE1 tag in ID3. + KaxTagMultiEntitiesType_BandOrchestraAccompaniment, //This is akin to the TPE2 tag in ID3. + KaxTagMultiEntitiesType_OriginalLyricistTextWriter, //This is akin to the TOLY tag in ID3. + KaxTagMultiEntitiesType_OriginalArtistPerformer, //This is akin to the TOPE tag in ID3. + KaxTagMultiEntitiesType_OriginalAlbumMovieShowTitle, //This is akin to the TOAL tag in ID3. + KaxTagMultiEntitiesType_ConductorPerformerRefinement, //This is akin to the TPE3 tag in ID3. + KaxTagMultiEntitiesType_InterpretedRemixedBy, //This is akin to the TPE4 tag in ID3. + KaxTagMultiEntitiesType_Director, //This is akin to the IART tag in RIFF + KaxTagMultiEntitiesType_ProducedBy, //This is akin to the IPRO tag in Extended RIFF + KaxTagMultiEntitiesType_Cinematographer, //This is akin to the ICNM tag in Extended RIFF + KaxTagMultiEntitiesType_ProductionDesigner, //This is akin to the IPDS tag in Extended RIFF + KaxTagMultiEntitiesType_CostumeDesigner, //This is akin to the ICDS tag in Extended RIFF + KaxTagMultiEntitiesType_ProductionStudio, //This is akin to the ISTD tag in Extended RIFF + KaxTagMultiEntitiesType_DistributedBy, //This is akin to the IDST tag in Extended RIFF + KaxTagMultiEntitiesType_CommissionedBy, //This is akin to the ICMS tag in RIFF + KaxTagMultiEntitiesType_Engineer, //This is akin to the IENG tag in RIFF + KaxTagMultiEntitiesType_EditedBy, //This is akin to the IEDT tag in Extended RIFF + KaxTagMultiEntitiesType_EncodedBy, //This is akin to the TENC tag in ID3. + KaxTagMultiEntitiesType_RippedBy, //This is akin to the IRIP tag in Extended RIFF + KaxTagMultiEntitiesType_InvolvedPeopleList, //A very general tag for everyone else that wants to be listed. This is akin to the TMCL tag in ID3. + KaxTagMultiEntitiesType_InternetRadioStationName, //This is akin to the TSRN tag in ID3. + KaxTagMultiEntitiesType_Publisher //This is akin to the TPUB tag in ID3. +}; + +enum KaxTagMultiIdentifierTypes { + KaxTagMultiIdentifierType_ISRC = 1, //String, The International Standard Recording Code + KaxTagMultiIdentifierType_CDIdentifier, //Binary, This is a binary dump of the TOC of the CDROM that this item was taken from. This holds the same information as the MCDI in ID3. + KaxTagMultiIdentifierType_ISBN, //String, International Standard Book Number + KaxTagMultiIdentifierType_Catalog, //String, sometimes the EAN/UPC, often some letters followed by some numbers + KaxTagMultiIdentifierType_EAN, //String, EAN-13 bar code identifier + KaxTagMultiIdentifierType_UPC, //String, UPC-A bar code identifier + KaxTagMultiIdentifierType_LabelCode, //String, Typically printed as ________ (LC) xxxx) ~~~~~~~~ or _________ (LC) 0xxxx) ~~~~~~~~~ on CDs medias or covers, where xxxx is a 4-digit number. + KaxTagMultiIdentifierType_LCCN, //String, Library of Congress Control Number + KaxTagMultiIdentifierType_UniqueFileIdentifier, //Binary, This used for a dump of the UFID field in ID3. This field would only be used if the item was pulled from an MP3. + CDROM_CD_TEXT_PACK_TOC_INFO2 //Binary +}; + +enum KaxTagMultiLegalTypes { + KaxTagMultiLegalType_Copyright = 1, //The copyright information as per the copyright holder. This is akin to the TCOP tag in ID3. + KaxTagMultiLegalType_ProductionCopyright, //The copyright information as per the production copyright holder. This is akin to the TPRO tag in ID3. + KaxTagMultiLegalType_TermsOfUse //The terms of use for this item. This is akin to the USER tag in ID3. +}; + +enum KaxTagMultiTitleTypes { + KaxTagMultiTitleType_TrackTitle = 1, + //The title of this item. In the case of a track, the Name element should be identical to the Name element. + //For example, for music you might label this "Canon in D", or for video's audio track you might use "English 5.1" This is akin to the TIT2 tag in ID3. + KaxTagMultiTitleType_AlbumMovieShowTitle, + //This is the name given to a grouping of tracks and/or chapters. + //For example, all video, audio, and subtitle tracks for a movie would be grouped under this and be given the name of the movie. + //All tracks for a particular CD would be grouped together under the title of the CD, or if all tracks for a CD were recorded as a single track, seperated by chapters, the same would apply. + //You could use this to label episode 3 of The Simpsons. This is akin to the TALB tag in ID3. + KaxTagMultiTitleType_SetTitle, //This would be used to label a set of ID 2. For example, season 13 of The Simpsons. + KaxTagMultiTitleType_Series //This would be used to label a set of ID 3. For example, The Simpsons. +}; + +DECLARE_MKX_MASTER(KaxTagMultiComment) +}; + +DECLARE_MKX_STRING(KaxTagMultiCommentName) +}; + +DECLARE_MKX_UNISTRING(KaxTagMultiCommentComments) +}; + +DECLARE_MKX_STRING(KaxTagMultiCommentLanguage) +}; + +DECLARE_MKX_MASTER(KaxTagMultiCommercial) +}; + +DECLARE_MKX_MASTER(KaxTagCommercial) +}; + +DECLARE_MKX_UINTEGER(KaxTagMultiCommercialType) +}; + +DECLARE_MKX_UNISTRING(KaxTagMultiCommercialAddress) +}; + +DECLARE_MKX_STRING(KaxTagMultiCommercialURL) +}; + +DECLARE_MKX_STRING(KaxTagMultiCommercialEmail) +}; + +DECLARE_MKX_MASTER(KaxTagMultiPrice) +}; + +DECLARE_MKX_STRING(KaxTagMultiPriceCurrency) +}; + +DECLARE_MKX_FLOAT(KaxTagMultiPriceAmount) +}; + +DECLARE_MKX_DATE(KaxTagMultiPricePriceDate) +}; + +DECLARE_MKX_MASTER(KaxTagMultiDate) +}; + +DECLARE_MKX_MASTER(KaxTagDate) +}; + +DECLARE_MKX_UINTEGER(KaxTagMultiDateType) +}; + +DECLARE_MKX_DATE(KaxTagMultiDateDateBegin) +}; + +DECLARE_MKX_DATE(KaxTagMultiDateDateEnd) +}; + +DECLARE_MKX_MASTER(KaxTagMultiEntity) +}; + +DECLARE_MKX_MASTER(KaxTagEntity) +}; + +DECLARE_MKX_UINTEGER(KaxTagMultiEntityType) +}; + +DECLARE_MKX_UNISTRING(KaxTagMultiEntityName) +}; + +DECLARE_MKX_UNISTRING(KaxTagMultiEntityAddress) +}; + +DECLARE_MKX_STRING(KaxTagMultiEntityURL) +}; + +DECLARE_MKX_STRING(KaxTagMultiEntityEmail) +}; + +DECLARE_MKX_MASTER(KaxTagMultiIdentifier) +}; + +DECLARE_MKX_MASTER(KaxTagIdentifier) +}; + +DECLARE_MKX_UINTEGER(KaxTagMultiIdentifierType) +}; + +DECLARE_MKX_BINARY(KaxTagMultiIdentifierBinary) +}; + +DECLARE_MKX_UNISTRING(KaxTagMultiIdentifierString) +}; + +DECLARE_MKX_MASTER(KaxTagMultiLegal) +}; + +DECLARE_MKX_MASTER(KaxTagLegal) +}; + +DECLARE_MKX_UINTEGER(KaxTagMultiLegalType) +}; + +DECLARE_MKX_UNISTRING(KaxTagMultiLegalContent) +}; + +DECLARE_MKX_STRING(KaxTagMultiLegalURL) +}; + +DECLARE_MKX_UNISTRING(KaxTagMultiLegalAddress) +}; + +DECLARE_MKX_MASTER(KaxTagMultiTitle) +}; + +DECLARE_MKX_MASTER(KaxTagTitle) +}; + +DECLARE_MKX_UINTEGER(KaxTagMultiTitleType) +}; + + +DECLARE_MKX_UNISTRING(KaxTagMultiTitleName) +}; + +DECLARE_MKX_UNISTRING(KaxTagMultiTitleSubTitle) +}; + +DECLARE_MKX_UNISTRING(KaxTagMultiTitleEdition) +}; + +DECLARE_MKX_UNISTRING(KaxTagMultiTitleAddress) +}; + +DECLARE_MKX_STRING(KaxTagMultiTitleURL) +}; + +DECLARE_MKX_STRING(KaxTagMultiTitleEmail) +}; + +DECLARE_MKX_STRING(KaxTagMultiTitleLanguage) +}; + +DECLARE_MKX_MASTER(KaxTagMultiAttachment) +}; + +DECLARE_MKX_MASTER(KaxTagAttachment) +}; + +DECLARE_MKX_UINTEGER(KaxTagAttachmentID) +}; + +#if 0 +DECLARE_MKX_FLOAT(KaxTagBPM) +}; + +DECLARE_MKX_SINTEGER(KaxTagPopularimeter) +}; + +DECLARE_MKX_BINARY(KaxTagRating) +}; + +DECLARE_MKX_UINTEGER(KaxTagSetPart) +}; + +DECLARE_MKX_STRING(KaxTagUserDefinedURL) +}; + +DECLARE_MKX_BINARY(KaxTagVideoSecondaryGenre) + public: + virtual bool ValidateSize() const {return IsFiniteSize() && (Size >= 4); +}; + +DECLARE_MKX_UNISTRING(KaxWritingApp) +}; +#endif + +END_LIBMATROSKA_NAMESPACE + +#endif // LIBMATROSKA_TAGMULTI_H diff --git a/matroska/KaxTrackVideo.h b/matroska/KaxTrackVideo.h index 3df83d0..f4ec47c 100644 --- a/matroska/KaxTrackVideo.h +++ b/matroska/KaxTrackVideo.h @@ -1,110 +1,110 @@ -/**************************************************************************** -** libmatroska : parse Matroska files, see http://www.matroska.org/ -** -** -** -** 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.h,v 1.9 2004/04/14 23:26:17 robux4 Exp $ - \author Steve Lhomme -*/ -#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 (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 - -#endif // LIBMATROSKA_TRACK_VIDEO_H +/**************************************************************************** +** libmatroska : parse Matroska files, see http://www.matroska.org/ +** +** +** +** 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 +*/ +#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 + +#endif // LIBMATROSKA_TRACK_VIDEO_H