[matroska] r1200 - in trunk/libmatroska: matroska src

[email protected] Tue, 30 Aug 2005 18:20:15 +0400 (MSD)
Newsgroups gmane.comp.multimedia.matroska.cvs
Message-ID <[email protected]>
Author: robux4
Date: 2005-08-30 18:20:13 +0400 (Tue, 30 Aug 2005)
New Revision: 1200

Modified:
   trunk/libmatroska/matroska/KaxAttached.h
   trunk/libmatroska/src/KaxAttached.cpp
Log:
libmatroska: added KaxFileReferral

Modified: trunk/libmatroska/matroska/KaxAttached.h
===================================================================
--- trunk/libmatroska/matroska/KaxAttached.h	2005-08-26 08:19:23 UTC (rev 1199)
+++ trunk/libmatroska/matroska/KaxAttached.h	2005-08-30 14:20:13 UTC (rev 1200)
@@ -112,13 +112,25 @@
 		EbmlElement * Clone() const {return new KaxFileData(*this);}
 };
 
+class MATROSKA_DLL_API KaxFileReferral : public EbmlBinary {
+	public:
+		KaxFileReferral() {}
+		KaxFileReferral(const KaxFileReferral & ElementToClone) :EbmlBinary(ElementToClone){}
+		static EbmlElement & Create() {return *(new KaxFileReferral);}
+		const EbmlCallbacks & Generic() const {return ClassInfos;}
+		bool ValidateSize() const {return true;} // we don't mind about what's inside
+		static const EbmlCallbacks ClassInfos;
+		operator const EbmlId &() const {return ClassInfos.GlobalId;}
+		EbmlElement * Clone() const {return new KaxFileReferral(*this);}
+};
+
 class MATROSKA_DLL_API KaxFileUID : public EbmlUInteger {
 	public:
 		KaxFileUID() {}
 		KaxFileUID(const KaxFileUID & ElementToClone) : EbmlUInteger(ElementToClone) {}
 		static EbmlElement & Create() {return *(new KaxFileUID);}
 		const EbmlCallbacks & Generic() const {return ClassInfos;}
-		static const EbmlCallbacks ClassInfos;
+		static const EbmlCallbacks ClassInfos;
 
 		operator const EbmlId &() const {return ClassInfos.GlobalId;}
 		bool IsYourId(const EbmlId & TestId) const;

Modified: trunk/libmatroska/src/KaxAttached.cpp
===================================================================
--- trunk/libmatroska/src/KaxAttached.cpp	2005-08-26 08:19:23 UTC (rev 1199)
+++ trunk/libmatroska/src/KaxAttached.cpp	2005-08-30 14:20:13 UTC (rev 1200)
@@ -48,6 +48,9 @@
 	EbmlSemantic(true,  true, KaxFileData::ClassInfos),
 	EbmlSemantic(false, true, KaxFileDescription::ClassInfos),
 	EbmlSemantic(true,  true, KaxFileUID::ClassInfos),
+#if MATROSKA_VERSION >= 2
+	EbmlSemantic(false, true, KaxFileReferral::ClassInfos),
+#endif // MATROSKA_VERSION
 };
 
 EbmlId KaxAttached_TheId       (0x61A7, 2);
@@ -56,6 +59,9 @@
 EbmlId KaxMimeType_TheId       (0x4660, 2);
 EbmlId KaxFileData_TheId       (0x465C, 2);
 EbmlId KaxFileUID_TheId        (0x46AE, 2);
+#if MATROSKA_VERSION >= 2
+EbmlId KaxFileReferral_TheId   (0x3B40, 2);
+#endif // MATROSKA_VERSION
 
 const EbmlSemanticContext KaxAttached_Context = EbmlSemanticContext(countof(KaxAttached_ContextList), KaxAttached_ContextList, &KaxAttachments_Context, *GetKaxGlobal_Context, &KaxAttached::ClassInfos);
 const EbmlSemanticContext KaxFileDescription_Context = EbmlSemanticContext(0, NULL, &KaxAttachments_Context, *GetKaxGlobal_Context, &KaxFileDescription::ClassInfos);
@@ -63,6 +69,9 @@
 const EbmlSemanticContext KaxMimeType_Context        = EbmlSemanticContext(0, NULL, &KaxAttachments_Context, *GetKaxGlobal_Context, &KaxMimeType::ClassInfos);
 const EbmlSemanticContext KaxFileData_Context        = EbmlSemanticContext(0, NULL, &KaxAttachments_Context, *GetKaxGlobal_Context, &KaxFileData::ClassInfos);
 const EbmlSemanticContext KaxFileUID_Context         = EbmlSemanticContext(0, NULL, &KaxAttachments_Context, *GetKaxGlobal_Context, &KaxFileUID::ClassInfos);
+#if MATROSKA_VERSION >= 2
+const EbmlSemanticContext KaxFileReferral_Context    = EbmlSemanticContext(0, NULL, &KaxAttachments_Context, *GetKaxGlobal_Context, &KaxFileReferral::ClassInfos);
+#endif // MATROSKA_VERSION
 
 const EbmlCallbacks KaxAttached::ClassInfos(KaxAttached::Create, KaxAttached_TheId, "AttachedFile", KaxAttached_Context);
 const EbmlCallbacks KaxFileDescription::ClassInfos(KaxFileDescription::Create, KaxFileDescription_TheId, "FileDescription", KaxFileDescription_Context);
@@ -70,6 +79,9 @@
 const EbmlCallbacks KaxMimeType::ClassInfos(KaxMimeType::Create, KaxMimeType_TheId, "FileMimeType", KaxMimeType_Context);
 const EbmlCallbacks KaxFileData::ClassInfos(KaxFileData::Create, KaxFileData_TheId, "FileData", KaxFileData_Context);
 const EbmlCallbacks KaxFileUID::ClassInfos(KaxFileUID::Create, KaxFileUID_TheId, "FileUID", KaxFileUID_Context);
+#if MATROSKA_VERSION >= 2
+const EbmlCallbacks KaxFileReferral::ClassInfos(KaxFileReferral::Create, KaxFileReferral_TheId, "FileReferral", KaxFileReferral_Context);
+#endif // MATROSKA_VERSION
 
 KaxAttached::KaxAttached()
  :EbmlMaster(KaxAttached_Context)