[SCM] libebml packaging branch, upstream, updated. upstream/0.8.0-1-g46b31b7
fabian-guest at users.alioth.debian.org
fabian-guest at users.alioth.debian.org
Mon Jun 7 20:28:10 UTC 2010
The following commit has been merged in the upstream branch:
commit 46b31b74d2c8640373dcff8106ceed3e08f8d01e
Author: Fabian Greffrath <fabian at debian-unofficial.org>
Date: Mon Jun 7 22:17:26 2010 +0200
Imported Upstream version 1.0.0
diff --git a/ChangeLog b/ChangeLog
index 3e79350..ef3996e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2010-06-04 robux4/mosu
+New 1.0.0 version:
+ - rename the library .so name as it's backward incompatible
+ - fixes when reading Master elements with unknown/infinite size
+ - fix the infinite/unknown size reading in EbmlElement::FindNextElement()
+ - fix the EBMLDummy ID reading and displaying
+
2010-04-30 robux4/mosu
New 0.8.0 version:
- new macros to simplify and unify the way to declare and define EBML elements
diff --git a/debian/changelog b/debian/changelog
deleted file mode 100644
index 67f1480..0000000
--- a/debian/changelog
+++ /dev/null
@@ -1,162 +0,0 @@
-libebml (0.8.0-1) karmic; urgency=low
-
- * New version.
-
- -- Moritz Bunkus <moritz at bunkus.org> Sun, 09 May 2010 16:56:41 +0200
-
-libebml (0.7.8-1) unstable; urgency=low
-
- * New version.
-
- -- Moritz Bunkus <moritz at bunkus.org> Wed, 5 Mar 2008 12:04:07 +0100
-
-libebml (0.7.7-1) unstable; urgency=low
-
- * New version.
-
- -- Moritz Bunkus <moritz at bunkus.org> Fri, 31 Mar 2006 14:28:30 +0200
-
-libebml (0.7.6-1) unstable; urgency=low
-
- * New version.
-
- -- Moritz Bunkus <moritz at bunkus.org> Tue, 18 Oct 2005 19:54:16 +0200
-
-libebml (0.7.5-2) unstable; urgency=low
-
- * Rebuilt with g++ 4.0.2.
-
- -- Moritz Bunkus <moritz at bunkus.org> Sat, 15 Oct 2005 14:20:24 +0200
-
-libebml (0.7.5-1) unstable; urgency=low
-
- * New version.
-
- -- Moritz Bunkus <moritz at bunkus.org> Fri, 20 May 2005 16:27:42 +0200
-
-libebml (0.7.4-1) unstable; urgency=low
-
- * New version.
-
- -- Moritz Bunkus <moritz at bunkus.org> Sat, 16 Apr 2005 13:05:06 +0200
-
-libebml (0.7.3-1) unstable; urgency=low
-
- * New version.
-
- -- Moritz Bunkus <moritz at bunkus.org> Wed, 10 Nov 2004 21:47:35 +0100
-
-libebml (0.7.2-1) unstable; urgency=low
-
- * New version.
-
- -- Moritz Bunkus <moritz at bunkus.org> Sun, 26 Sep 2004 12:16:57 +0200
-
-libebml (0.7.1-1) unstable; urgency=low
-
- * New version.
-
- -- Moritz Bunkus <moritz at bunkus.org> Sun, 25 Jul 2004 12:15:48 +0200
-
-libebml (0.7.0-1) unstable; urgency=low
-
- * New version.
-
- -- Moritz Bunkus <moritz at bunkus.org> Fri, 23 Apr 2004 18:38:00 +0200
-
-libebml (0.6.5-1) unstable; urgency=low
-
- * New version.
-
- -- Moritz Bunkus <moritz at bunkus.org> Tue, 9 Mar 2004 21:32:18 +0100
-
-libebml (0.6.4-1) unstable; urgency=low
-
- * New version.
-
- -- Moritz Bunkus <moritz at bunkus.org> Mon, 19 Jan 2004 11:28:42 +0100
-
-libebml (0.6.3-1) unstable; urgency=low
-
- * New version.
-
- -- Moritz Bunkus <moritz at bunkus.org> Thu, 25 Dec 2003 13:27:27 +0100
-
-libebml (0.6.2-1) unstable; urgency=low
-
- * New version.
-
- -- Moritz Bunkus <moritz at bunkus.org> Fri, 31 Oct 2003 09:34:13 +0100
-
-libebml (0.6.1-1) unstable; urgency=low
-
- * New version.
-
- -- Moritz Bunkus <moritz at bunkus.org> Tue, 28 Oct 2003 22:45:25 +0100
-
-libebml (0.6.0-1) unstable; urgency=low
-
- * New version.
-
- -- Moritz Bunkus <moritz at bunkus.org> Wed, 17 Sep 2003 22:28:18 +0200
-
-libebml (0.5.1-1) unstable; urgency=low
-
- * New version.
-
- -- Moritz Bunkus <moritz at bunkus.org> Mon, 1 Sep 2003 13:27:54 +0200
-
-libebml (0.5.0-1) unstable; urgency=low
-
- * New version.
-
- -- Moritz Bunkus <moritz at bunkus.org> Mon, 28 Jul 2003 10:48:35 +0200
-
-libebml (0.4.4-2) unstable; urgency=low
-
- * New version.
-
- -- Moritz Bunkus <moritz at bunkus.org> Sat, 14 Jun 2003 17:41:43 +0200
-
-libebml (0.4.4-1) unstable; urgency=low
-
- * New version.
-
- -- Moritz Bunkus <moritz at bunkus.org> Wed, 11 Jun 2003 20:27:01 +0200
-
-libebml (0.4.3-1) unstable; urgency=low
-
- * New version.
-
- -- Moritz Bunkus <moritz at bunkus.org> Wed, 21 May 2003 22:34:46 +0200
-
-libebml (0.4.2-1) unstable; urgency=low
-
- * New version.
-
- -- Moritz Bunkus <moritz at bunkus.org> Tue, 6 May 2003 22:21:09 +0200
-
-libebml (0.4.0-2) unstable; urgency=low
-
- * Compiled with gcc 3.2.3.
-
- -- Moritz Bunkus <moritz at bunkus.org> Sun, 04 May 2003 22:14:26 +0200
-
-libebml (0.4.0-1) unstable; urgency=low
-
- * First official alpha release.
-
- -- Moritz Bunkus <moritz at bunkus.org> Wed, 30 Apr 2003 10:27:26 +0200
-
-libebml (0.2.0.20030424-1) unstable; urgency=low
-
- * New version with bugfixes from Steve.
-
- -- Moritz Bunkus <moritz at bunkus.org> Thu, 24 Apr 2003 19:57:48 +0200
-
-libebml (0.2.0.20030421-1) unstable; urgency=low
-
- * Initial Release.
-
- -- Moritz Bunkus <moritz at bunkus.org> Mon, 21 Apr 2003 12:49:33 +0200
-
diff --git a/debian/control b/debian/control
deleted file mode 100644
index d722109..0000000
--- a/debian/control
+++ /dev/null
@@ -1,14 +0,0 @@
-Source: libebml
-Priority: optional
-Maintainer: Moritz Bunkus <moritz at bunkus.org>
-Build-Depends: debhelper (>> 3.0.0)
-Standards-Version: 3.5.8
-
-Package: libebml-dev
-Section: devel
-Architecture: any
-Depends: ${shlibs:Depends}
-Description: Extensible Binary Meta Language access library
- A library for reading and writing files with the Extensible Binary
- Meta Language, a binary pendant to XML.
-
diff --git a/debian/copyright b/debian/copyright
deleted file mode 100644
index 621ecdf..0000000
--- a/debian/copyright
+++ /dev/null
@@ -1,27 +0,0 @@
-This package was debianized by Moritz Bunkus <moritz at bunkus.org> on
-Mon, 21 Apr 2003 12:49:33 +0200.
-
-It was downloaded from http://www.matroska.org/
-
-Upstream Author: Steve Lhomme <steve.lhomme at free.fr>
-
-Copyright (C) 2002-2003 Steve Lhomme. All rights reserved.
-
-This file may be distributed under the terms of the Q Public License
-as defined by Trolltech AS of Norway and appearing in the file
-LICENSE.QPL included in the packaging of this file.
-
-This proram is also licensed under the GPL. See
-/usr/share/common-licenses/GPL for details.
-
-Licensees holding an other license may use this file in accordance with
-the Agreement provided with the Software.
-
-This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-
-See http://www.matroska.org/license/qpl/ for QPL licensing information.
-
-Contact license at matroska.org if any conditions of this licensing are
-not clear to you.
-
diff --git a/debian/dirs b/debian/dirs
deleted file mode 100644
index ca882bb..0000000
--- a/debian/dirs
+++ /dev/null
@@ -1,2 +0,0 @@
-usr/bin
-usr/sbin
diff --git a/debian/docs b/debian/docs
deleted file mode 100644
index e69de29..0000000
diff --git a/debian/libebml-dev.dirs b/debian/libebml-dev.dirs
deleted file mode 100644
index 4418816..0000000
--- a/debian/libebml-dev.dirs
+++ /dev/null
@@ -1,2 +0,0 @@
-usr/lib
-usr/include
diff --git a/debian/libebml-dev.files b/debian/libebml-dev.files
deleted file mode 100644
index 07740b8..0000000
--- a/debian/libebml-dev.files
+++ /dev/null
@@ -1,2 +0,0 @@
-usr/include/*
-usr/lib/lib*.a
diff --git a/debian/rules b/debian/rules
deleted file mode 100644
index 3b7d220..0000000
--- a/debian/rules
+++ /dev/null
@@ -1,96 +0,0 @@
-#!/usr/bin/make -f
-# Sample debian/rules that uses debhelper.
-# GNU copyright 1997 to 1999 by Joey Hess.
-
-# Uncomment this to turn on verbose mode.
-#export DH_VERBOSE=1
-
-# This is the debhelper compatibility version to use.
-export DH_COMPAT=4
-
-# shared library versions, option 1
-version=2.0.5
-major=2
-# option 2, assuming the library is created as src/.libs/libfoo.so.2.0.5 or so
-#version=`ls src/.libs/lib*.so.* | \
-# awk '{if (match($$0,/[0-9]+\.[0-9]+\.[0-9]+$$/)) print substr($$0,RSTART)}'`
-#major=`ls src/.libs/lib*.so.* | \
-# awk '{if (match($$0,/\.so\.[0-9]+$$/)) print substr($$0,RSTART+4)}'`
-
-configure: configure-stamp
-configure-stamp:
- dh_testdir
- # Add here commands to configure the package.
-
- touch configure-stamp
-
-
-build: build-stamp
-build-stamp: configure-stamp
- dh_testdir
-
- # Add here commands to compile the package.
- $(MAKE) $(DEB_BUILD_OPTIONS) -C make/linux staticlib
-
- touch build-stamp
-
-clean:
- dh_testdir
- dh_testroot
- rm -f build-stamp configure-stamp
-
- # Add here commands to clean up after the build process.
- -$(MAKE) $(DEB_BUILD_OPTIONS) -C make/linux clean
-
- dh_clean
-
-install: build
- dh_testdir
- dh_testroot
- dh_clean -k
- dh_installdirs
-
- # Add here commands to install the package into debian/tmp
- $(MAKE) $(DEB_BUILD_OPTIONS) \
- -C make/linux prefix=$(CURDIR)/debian/tmp/usr \
- install_staticlib install_headers
-
-
-# Build architecture-independent files here.
-binary-indep: build install
-# We have nothing to do by default.
-
-# Build architecture-dependent files here.
-binary-arch: build install
- dh_testdir
- dh_testroot
- dh_movefiles
-
-# dh_installdebconf
- dh_installdocs
-# dh_installexamples
-# dh_installmenu
-# dh_installlogrotate
-# dh_installemacsen
-# dh_installpam
-# dh_installmime
-# dh_installinit
-# dh_installcron
-# dh_installman
-# dh_installinfo
-# dh_undocumented
- dh_installchangelogs ChangeLog
- dh_link
-# dh_strip
- dh_compress
- dh_fixperms
- dh_makeshlibs
- dh_installdeb
-# dh_perl
- dh_shlibdeps
- dh_gencontrol
- dh_md5sums
- dh_builddeb
-
-binary: binary-indep binary-arch
-.PHONY: build clean binary-indep binary-arch binary install configure
diff --git a/ebml/EbmlBinary.h b/ebml/EbmlBinary.h
index ef47cdc..798b721 100644
--- a/ebml/EbmlBinary.h
+++ b/ebml/EbmlBinary.h
@@ -30,7 +30,7 @@
/*!
\file
- \version \$Id: EbmlBinary.h 1298 2008-02-21 22:14:18Z mosu $
+ \version \$Id: EbmlBinary.h 274 2010-05-25 16:51:24Z robux4 $
\author Steve Lhomme <robux4 @ users.sf.net>
\author Julien Coloos <suiryc @ users.sf.net>
*/
@@ -62,7 +62,7 @@ class EBML_DLL_API EbmlBinary : public EbmlElement {
EbmlBinary(const EbmlBinary & ElementToClone);
virtual ~EbmlBinary(void);
- virtual bool ValidateSize() const {return true;} // we don't mind about what's inside
+ virtual bool ValidateSize() const {return IsFiniteSize() && GetSize() < 0x7FFFFFFF;} // we don't mind about what's inside
filepos_t RenderData(IOCallback & output, bool bForceRender, bool bWithDefault = false);
filepos_t ReadData(IOCallback & input, ScopeMode ReadFully = SCOPE_ALL_DATA);
diff --git a/ebml/EbmlCrc32.h b/ebml/EbmlCrc32.h
index f04fbf0..ca04c5d 100644
--- a/ebml/EbmlCrc32.h
+++ b/ebml/EbmlCrc32.h
@@ -30,7 +30,7 @@
/*!
\file
- \version \$Id: EbmlCrc32.h 1326 2009-08-23 00:47:52Z robux4 $
+ \version \$Id: EbmlCrc32.h 270 2010-05-25 12:02:30Z robux4 $
\author Steve Lhomme <robux4 @ users.sf.net>
\author Jory Stone <jcsston @ toughguy.net>
*/
@@ -57,7 +57,7 @@ const uint32 CRC32_NEGL = 0xffffffffL;
DECLARE_EBML_BINARY(EbmlCrc32)
public:
EbmlCrc32(const EbmlCrc32 & ElementToClone);
- virtual bool ValidateSize() const {return (GetSize() == 4);}
+ virtual bool ValidateSize() const {return IsFiniteSize() && (GetSize() == 4);}
filepos_t RenderData(IOCallback & output, bool bForceRender, bool bWithDefault = false);
filepos_t ReadData(IOCallback & input, ScopeMode ReadFully = SCOPE_ALL_DATA);
// filepos_t UpdateSize(bool bWithDefault = false);
diff --git a/ebml/EbmlDate.h b/ebml/EbmlDate.h
index 3f66c3f..ac43e10 100644
--- a/ebml/EbmlDate.h
+++ b/ebml/EbmlDate.h
@@ -28,7 +28,7 @@
/*!
\file
- \version \$Id: EbmlDate.h 1079 2005-03-03 13:18:14Z robux4 $
+ \version \$Id: EbmlDate.h 270 2010-05-25 12:02:30Z robux4 $
\author Steve Lhomme <robux4 @ users.sf.net>
*/
#ifndef LIBEBML_DATE_H
@@ -60,7 +60,7 @@ class EBML_DLL_API EbmlDate : public EbmlElement {
*/
int32 GetEpochDate() const {return int32(myDate/1000000000 + UnixEpochDelay);}
- virtual bool ValidateSize() const {return ((GetSize() == 8) || (GetSize() == 0));}
+ virtual bool ValidateSize() const {return IsFiniteSize() && ((GetSize() == 8) || (GetSize() == 0));}
/*!
\note no Default date handled
diff --git a/ebml/EbmlDummy.h b/ebml/EbmlDummy.h
index 2b8774c..2608856 100644
--- a/ebml/EbmlDummy.h
+++ b/ebml/EbmlDummy.h
@@ -30,7 +30,7 @@
/*!
\file
- \version \$Id: EbmlDummy.h 639 2004-07-09 20:59:14Z mosu $
+ \version \$Id: EbmlDummy.h 256 2010-05-22 18:20:42Z robux4 $
\author Steve Lhomme <robux4 @ users.sf.net>
*/
#ifndef LIBEBML_DUMMY_H
@@ -42,13 +42,17 @@ START_LIBEBML_NAMESPACE
class EBML_DLL_API EbmlDummy : public EbmlBinary {
public:
- EbmlDummy() :DummyId(DummyRawId) {}
+ EbmlDummy() :DummyId(DummyRawId) {}
EbmlDummy(const EbmlId & aId) :EbmlBinary(), DummyId(aId) {}
EbmlDummy(const EbmlDummy & ElementToClone):EbmlBinary(ElementToClone), DummyId(ElementToClone.DummyId) {}
bool IsDummy() const {return true;}
bool IsDefaultValue() const {return true;}
+ virtual operator const EbmlId &() const {
+ return DummyId;
+ }
+
#if defined(EBML_STRICT_API)
private:
#else
@@ -57,7 +61,7 @@ class EBML_DLL_API EbmlDummy : public EbmlBinary {
const EbmlId DummyId;
static const EbmlId DummyRawId;
- EBML_CONCRETE_CLASS(EbmlDummy)
+ EBML_CONCRETE_DUMMY_CLASS(EbmlDummy)
};
END_LIBEBML_NAMESPACE
diff --git a/ebml/EbmlElement.h b/ebml/EbmlElement.h
index 3a1ded9..fa5ae16 100644
--- a/ebml/EbmlElement.h
+++ b/ebml/EbmlElement.h
@@ -28,7 +28,7 @@
/*!
\file
- \version \$Id: EbmlElement.h 1232 2005-10-15 15:56:52Z robux4 $
+ \version \$Id: EbmlElement.h 280 2010-05-27 15:52:47Z robux4 $
\author Steve Lhomme <robux4 @ users.sf.net>
*/
#ifndef LIBEBML_ELEMENT_H
@@ -134,7 +134,7 @@ extern const EbmlSemanticContext Context_EbmlGlobal;
#define DEFINE_xxx_CLASS_ORPHAN(x,id,idl,name,global) \
const EbmlId Id_##x (id, idl); \
- const EbmlSemanticContext Context_##x = EbmlSemanticContext(0, NULL, NULL, global, &EBML_INFO(x)); \
+ const EbmlSemanticContext Context_##x = EbmlSemanticContext(0, NULL, NULL, global, NULL); \
const EbmlCallbacks x::ClassInfos(x::Create, Id_##x, name, Context_##x); \
#define DEFINE_EBML_CONTEXT(x) DEFINE_xxx_CONTEXT(x,*GetEbmlGlobal_Context)
@@ -179,6 +179,17 @@ extern const EbmlSemanticContext Context_EbmlGlobal;
private: \
static const EbmlCallbacks ClassInfos; \
+#define EBML_CONCRETE_DUMMY_CLASS(Type) \
+ public: \
+ virtual const EbmlSemanticContext &Context() const {return *static_cast<EbmlSemanticContext*>(NULL);} \
+ virtual const char *DebugName() const {return "DummyElement";} \
+ virtual operator const EbmlId &(); \
+ virtual EbmlElement & CreateElement() const {return Create();} \
+ virtual EbmlElement * Clone() const { return new Type(*this); } \
+ static EbmlElement & Create() {return *(new Type);} \
+ static const EbmlId & ClassId(); \
+ static const EbmlCallbacks ClassInfos; \
+
#define EBML_INFO(ref) ref::ClassInfo()
#define EBML_ID(ref) ref::ClassId()
@@ -213,6 +224,16 @@ extern const EbmlSemanticContext Context_EbmlGlobal;
static EbmlElement & Create() {return *(new Type);} \
static const EbmlCallbacks ClassInfos; \
+#define EBML_CONCRETE_DUMMY_CLASS(Type) \
+ public: \
+ virtual const EbmlCallbacks & Generic() const {return ClassInfos;} \
+ virtual operator const EbmlId &(); \
+ virtual EbmlElement & CreateElement() const {return Create();} \
+ virtual EbmlElement * Clone() const { return new Type(*this); } \
+ static EbmlElement & Create() {return *(new Type);} \
+ static const EbmlCallbacks ClassInfos; \
+
+
#define EBML_INFO(ref) ref::ClassInfos
#define EBML_ID(ref) ref::ClassInfos.GlobalId
#define EBML_CLASS_SEMCONTEXT(ref) Context_##ref
@@ -350,12 +371,12 @@ class EBML_DLL_API EbmlElement {
int GetSizeLength() const {return SizeLength;}
static EbmlElement * FindNextElement(IOCallback & DataStream, const EbmlSemanticContext & Context, int & UpperLevel, uint64 MaxDataSize, bool AllowDummyElt, unsigned int MaxLowerLevel = 1);
- static EbmlElement * FindNextID(IOCallback & DataStream, const EbmlCallbacks & ClassInfos, const uint64 MaxDataSize);
+ static EbmlElement * FindNextID(IOCallback & DataStream, const EbmlCallbacks & ClassInfos, uint64 MaxDataSize);
/*!
\brief find the next element with the same ID
*/
- EbmlElement * FindNext(IOCallback & DataStream, const uint64 MaxDataSize);
+ EbmlElement * FindNext(IOCallback & DataStream, uint64 MaxDataSize);
EbmlElement * SkipData(EbmlStream & DataStream, const EbmlSemanticContext & Context, EbmlElement * TestReadElt = NULL, bool AllowDummyElt = false);
@@ -435,6 +456,7 @@ class EBML_DLL_API EbmlElement {
bool ValueIsSet() const {return bValueIsSet;}
inline uint64 GetEndPosition() const {
+ assert(bSizeIsFinite); // we don't know where the end is
return SizePosition + CodedSizeLength(Size, SizeLength, bSizeIsFinite) + Size;
}
diff --git a/ebml/EbmlSInteger.h b/ebml/EbmlSInteger.h
index 80d5704..80cae19 100644
--- a/ebml/EbmlSInteger.h
+++ b/ebml/EbmlSInteger.h
@@ -30,7 +30,7 @@
/*!
\file
- \version \$Id: EbmlSInteger.h 1079 2005-03-03 13:18:14Z robux4 $
+ \version \$Id: EbmlSInteger.h 270 2010-05-25 12:02:30Z robux4 $
\author Steve Lhomme <robux4 @ users.sf.net>
\author Julien Coloos <suiryc @ users.sf.net>
\author Moritz Bunkus <moritz @ bunkus.org>
@@ -64,7 +64,7 @@ class EBML_DLL_API EbmlSInteger : public EbmlElement {
*/
virtual void SetDefaultSize(uint64 nDefaultSize = DEFAULT_INT_SIZE) {EbmlElement::SetDefaultSize(nDefaultSize); SetSize_(nDefaultSize);}
- virtual bool ValidateSize() const {return (GetSize() <= 8);}
+ virtual bool ValidateSize() const {return IsFiniteSize() && (GetSize() <= 8);}
filepos_t RenderData(IOCallback & output, bool bForceRender, bool bWithDefault = false);
filepos_t ReadData(IOCallback & input, ScopeMode ReadFully = SCOPE_ALL_DATA);
filepos_t UpdateSize(bool bWithDefault = false, bool bForceRender = false);
diff --git a/ebml/EbmlStream.h b/ebml/EbmlStream.h
index c503d4b..d0f11fa 100644
--- a/ebml/EbmlStream.h
+++ b/ebml/EbmlStream.h
@@ -30,7 +30,7 @@
/*!
\file
- \version \$Id: EbmlStream.h 639 2004-07-09 20:59:14Z mosu $
+ \version \$Id: EbmlStream.h 280 2010-05-27 15:52:47Z robux4 $
\author Steve Lhomme <robux4 @ users.sf.net>
*/
#ifndef LIBEBML_STREAM_H
@@ -56,9 +56,9 @@ class EBML_DLL_API EbmlStream {
\param MaxDataSize The maximum possible of the data in the element (for sanity checks)
\note the user will have to delete that element later
*/
- EbmlElement * FindNextID(const EbmlCallbacks & ClassInfos, const uint64 MaxDataSize);
+ EbmlElement * FindNextID(const EbmlCallbacks & ClassInfos, uint64 MaxDataSize);
- EbmlElement * FindNextElement(const EbmlSemanticContext & Context, int & UpperLevel, const uint64 MaxDataSize, bool AllowDummyElt, unsigned int MaxLowerLevel = 1);
+ EbmlElement * FindNextElement(const EbmlSemanticContext & Context, int & UpperLevel, uint64 MaxDataSize, bool AllowDummyElt, unsigned int MaxLowerLevel = 1);
inline IOCallback & I_O() {return Stream;}
operator IOCallback &() {return Stream;}
diff --git a/ebml/EbmlString.h b/ebml/EbmlString.h
index d14a356..7cd907f 100644
--- a/ebml/EbmlString.h
+++ b/ebml/EbmlString.h
@@ -30,7 +30,7 @@
/*!
\file
- \version \$Id: EbmlString.h 1079 2005-03-03 13:18:14Z robux4 $
+ \version \$Id: EbmlString.h 270 2010-05-25 12:02:30Z robux4 $
\author Steve Lhomme <robux4 @ users.sf.net>
*/
#ifndef LIBEBML_STRING_H
@@ -55,7 +55,7 @@ class EBML_DLL_API EbmlString : public EbmlElement {
virtual ~EbmlString() {}
- virtual bool ValidateSize() const {return true;} // any size is possible
+ virtual bool ValidateSize() const {return IsFiniteSize();} // any size is possible
filepos_t RenderData(IOCallback & output, bool bForceRender, bool bWithDefault = false);
filepos_t ReadData(IOCallback & input, ScopeMode ReadFully = SCOPE_ALL_DATA);
filepos_t UpdateSize(bool bWithDefault = false, bool bForceRender = false);
diff --git a/ebml/EbmlUInteger.h b/ebml/EbmlUInteger.h
index eacc623..453bee8 100644
--- a/ebml/EbmlUInteger.h
+++ b/ebml/EbmlUInteger.h
@@ -30,7 +30,7 @@
/*!
\file
- \version \$Id: EbmlUInteger.h 1079 2005-03-03 13:18:14Z robux4 $
+ \version \$Id: EbmlUInteger.h 280 2010-05-27 15:52:47Z robux4 $
\author Steve Lhomme <robux4 @ users.sf.net>
\author Julien Coloos <suiryc @ users.sf.net>
\author Moritz Bunkus <moritz @ bunkus.org>
@@ -62,7 +62,7 @@ class EBML_DLL_API EbmlUInteger : public EbmlElement {
*/
virtual void SetDefaultSize(uint64 nDefaultSize = DEFAULT_UINT_SIZE) {EbmlElement::SetDefaultSize(nDefaultSize); SetSize_(nDefaultSize);}
- virtual bool ValidateSize() const {return (GetSize() <= 8);}
+ virtual bool ValidateSize() const {return IsFiniteSize() && (GetSize() <= 8);}
filepos_t RenderData(IOCallback & output, bool bForceRender, bool bWithDefault = false);
filepos_t ReadData(IOCallback & input, ScopeMode ReadFully = SCOPE_ALL_DATA);
filepos_t UpdateSize(bool bWithDefault = false, bool bForceRender = false);
@@ -76,7 +76,7 @@ class EBML_DLL_API EbmlUInteger : public EbmlElement {
void SetDefaultValue(uint64);
- const uint64 DefaultVal() const;
+ uint64 DefaultVal() const;
bool IsDefaultValue() const {
return (DefaultISset() && Value == DefaultValue);
diff --git a/ebml/EbmlUnicodeString.h b/ebml/EbmlUnicodeString.h
index 024bafa..dd33473 100644
--- a/ebml/EbmlUnicodeString.h
+++ b/ebml/EbmlUnicodeString.h
@@ -30,7 +30,7 @@
/*!
\file
- \version \$Id: EbmlUnicodeString.h 1079 2005-03-03 13:18:14Z robux4 $
+ \version \$Id: EbmlUnicodeString.h 270 2010-05-25 12:02:30Z robux4 $
\author Steve Lhomme <robux4 @ users.sf.net>
\author Moritz Bunkus <moritz @ bunkus.org>
\author Jory Stone <jcsston @ toughguy.net>
@@ -104,7 +104,7 @@ class EBML_DLL_API EbmlUnicodeString : public EbmlElement {
virtual ~EbmlUnicodeString() {}
- virtual bool ValidateSize() const {return true;} // any size is possible
+ virtual bool ValidateSize() const {return IsFiniteSize();} // any size is possible
filepos_t RenderData(IOCallback & output, bool bForceRender, bool bWithDefault = false);
filepos_t ReadData(IOCallback & input, ScopeMode ReadFully = SCOPE_ALL_DATA);
filepos_t UpdateSize(bool bWithDefault = false, bool bForceRender = false);
diff --git a/ebml/EbmlVersion.h b/ebml/EbmlVersion.h
index a080368..d420554 100644
--- a/ebml/EbmlVersion.h
+++ b/ebml/EbmlVersion.h
@@ -11,12 +11,12 @@
** 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
@@ -30,7 +30,7 @@
/*!
\file
- \version \$Id: EbmlVersion.h 1326 2009-08-23 00:47:52Z robux4 $
+ \version \$Id: EbmlVersion.h 291 2010-06-04 08:42:42Z mosub $
\author Steve Lhomme <robux4 @ users.sf.net>
*/
#ifndef LIBEBML_VERSION_H
@@ -42,9 +42,9 @@
START_LIBEBML_NAMESPACE
-#define LIBEBML_VERSION 0x000800
+#define LIBEBML_VERSION 0x010000
-static const std::string EbmlCodeVersion = "0.8.0";
+static const std::string EbmlCodeVersion = "1.0.0";
static const std::string EbmlCodeDate = __TIMESTAMP__;
/*!
diff --git a/libebml.proj b/libebml.proj
index 17d9f19..a97b564 100644
--- a/libebml.proj
+++ b/libebml.proj
@@ -2,7 +2,7 @@ Include "*/*.proj"
LIB ebml
{
- PROJECT_VERSION 0.7.9
+ PROJECT_VERSION 1.0.0
INCLUDE .
EXPINCLUDE .
diff --git a/make/linux/Makefile b/make/linux/Makefile
index 82ab439..13e6979 100644
--- a/make/linux/Makefile
+++ b/make/linux/Makefile
@@ -49,7 +49,7 @@ LIBS=
# Names
LIBRARY=libebml.a
LIBRARY_SO=libebml.so
-LIBRARY_SO_VER=libebml.so.0
+LIBRARY_SO_VER=libebml.so.2
# source-files
sources:=$(wildcard ${SRC_DIR}*$(EXTENSION))
diff --git a/make/linux/fedora-core.spec b/make/linux/fedora-core.spec
index e68dc2b..25d7d03 100644
--- a/make/linux/fedora-core.spec
+++ b/make/linux/fedora-core.spec
@@ -48,7 +48,7 @@ cd ../..
%install
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
cd make/linux
-make prefix=$RPM_BUILD_ROOT/%{_prefix} install_staticlib install_headers
+make prefix=$RPM_BUILD_ROOT/%{_prefix} libdir=$RPM_BUILD_ROOT/%{_libdir} install_staticlib install_headers
cd ../..
%clean
diff --git a/make/linux/suse-libebml-makefile.diff b/make/linux/suse-libebml-makefile.diff
deleted file mode 100644
index 0977482..0000000
--- a/make/linux/suse-libebml-makefile.diff
+++ /dev/null
@@ -1,14 +0,0 @@
---- libebml-0.7.1/make/linux/Makefile~ 2004-09-01 22:24:12.520218192 +0200
-+++ libebml-0.7.1/make/linux/Makefile 2004-09-01 22:25:30.976291056 +0200
-@@ -14,9 +14,9 @@
- ifeq (BeOS,$(shell uname -s))
- prefix=/boot/home/config
- else
--prefix=/usr/local
-+prefix=$(PREFIX)
- endif
--libdir=$(prefix)/lib
-+libdir=$(LIBDIR)
- includedir=$(prefix)/include/ebml
-
- # Programs
diff --git a/make/linux/suse.spec b/make/linux/suse.spec
index b9cd8e8..1feff29 100644
--- a/make/linux/suse.spec
+++ b/make/linux/suse.spec
@@ -10,7 +10,7 @@
# neededforbuild gcc-c++ libstdc++-devel
-BuildRequires: bzip2 cpp libebml make patch tar zlib zlib-devel binutils gcc gcc-c++ libstdc++-devel perl rpm
+BuildRequires: bzip2 cpp make tar zlib zlib-devel binutils gcc gcc-c++ libstdc++-devel perl rpm
Name: libebml
URL: http://sourceforge.net/projects/ebml
@@ -20,7 +20,6 @@ Summary: libary to parse EBML files.
License: LGPL
Group: Development/Libraries/Other
Source: %{name}-%{version}.tar.bz2
-Patch: suse-libebml-makefile.diff
Summary: libary to parse EBML files.
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Prefix: /usr
@@ -39,16 +38,15 @@ Authors:
%prep
rm -rf $RPM_BUILD_ROOT
%setup
-%patch -p1
%build
export CFLAGS="$RPM_OPT_FLAGS"
cd make/linux
-make PREFIX=$RPM_BUILD_ROOT/usr LIBDIR=%{_libdir} staticlib
+make prefix=$RPM_BUILD_ROOT/usr libdir=$RPM_BUILD_ROOT/%{_libdir} staticlib
%install
cd make/linux
-make install_staticlib install_headers PREFIX=$RPM_BUILD_ROOT/usr LIBDIR=$RPM_BUILD_ROOT/%{_libdir}
+make prefix=$RPM_BUILD_ROOT/usr libdir=$RPM_BUILD_ROOT/%{_libdir} install_staticlib install_headers
%clean
rm -rf $RPM_BUILD_ROOT
diff --git a/make/mingw32/Makefile b/make/mingw32/Makefile
index afdef56..838b206 100644
--- a/make/mingw32/Makefile
+++ b/make/mingw32/Makefile
@@ -50,7 +50,7 @@ distclean dist-clean: clean
rm -f .depend
libebml.a: $(OBJ)
- $(AR) r $@ $(OBJ)
+ $(AR) rcvu $@ $(OBJ)
$(RANLIB) $@
libebml.dll: $(OBJ)
diff --git a/src/EbmlDummy.cpp b/src/EbmlDummy.cpp
index 34db913..0b808c0 100644
--- a/src/EbmlDummy.cpp
+++ b/src/EbmlDummy.cpp
@@ -30,7 +30,7 @@
/*!
\file
- \version \$Id: EbmlDummy.cpp 639 2004-07-09 20:59:14Z mosu $
+ \version \$Id: EbmlDummy.cpp 256 2010-05-22 18:20:42Z robux4 $
\author Steve Lhomme <robux4 @ users.sf.net>
*/
#include "ebml/EbmlDummy.h"
@@ -42,4 +42,9 @@ DEFINE_EBML_CLASS_ORPHAN(EbmlDummy, 0xFF, 1, "DummyElement");
const EbmlId EbmlDummy::DummyRawId = Id_EbmlDummy;
+EbmlDummy::operator const EbmlId &()
+{
+ return DummyId;
+}
+
END_LIBEBML_NAMESPACE
diff --git a/src/EbmlElement.cpp b/src/EbmlElement.cpp
index f75902f..f5cef6d 100644
--- a/src/EbmlElement.cpp
+++ b/src/EbmlElement.cpp
@@ -28,7 +28,7 @@
/*!
\file
- \version \$Id: EbmlElement.cpp 1232 2005-10-15 15:56:52Z robux4 $
+ \version \$Id: EbmlElement.cpp 280 2010-05-27 15:52:47Z robux4 $
\author Steve Lhomme <robux4 @ users.sf.net>
*/
@@ -257,7 +257,7 @@ EbmlElement::~EbmlElement()
\todo this method is deprecated and should be called FindThisID
\todo replace the new RawElement with the appropriate class (when known)
*/
-EbmlElement * EbmlElement::FindNextID(IOCallback & DataStream, const EbmlCallbacks & ClassInfos, const uint64 MaxDataSize)
+EbmlElement * EbmlElement::FindNextID(IOCallback & DataStream, const EbmlCallbacks & ClassInfos, uint64 MaxDataSize)
{
binary PossibleId[4];
int PossibleID_Length = 0;
@@ -436,7 +436,7 @@ EbmlElement * EbmlElement::FindNextElement(IOCallback & DataStream, const EbmlSe
// 0 : child
// 1 : same level
// + : further parent
- if (Result->ValidateSize() && (UpperLevel > 0 || MaxDataSize == 0 || MaxDataSize >= (PossibleID_Length + PossibleSizeLength + SizeFound))) {
+ if (Result->ValidateSize() && (SizeFound == SizeUnknown || UpperLevel > 0 || MaxDataSize == 0 || MaxDataSize >= (PossibleID_Length + PossibleSizeLength + SizeFound))) {
if (SizeFound == SizeUnknown) {
Result->SetSizeInfinite();
}
diff --git a/src/EbmlMaster.cpp b/src/EbmlMaster.cpp
index 6e1bf6b..eb6a58a 100644
--- a/src/EbmlMaster.cpp
+++ b/src/EbmlMaster.cpp
@@ -30,7 +30,7 @@
/*!
\file
- \version \$Id: EbmlMaster.cpp 1178 2005-05-19 15:47:11Z robux4 $
+ \version \$Id: EbmlMaster.cpp 279 2010-05-27 15:51:00Z robux4 $
\author Steve Lhomme <robux4 @ users.sf.net>
*/
@@ -409,14 +409,21 @@ void EbmlMaster::Read(EbmlStream & inDataStream, const EbmlSemanticContext & sCo
}
}
ElementList.clear();
- uint64 MaxSizeToRead = GetSize();
+ uint64 MaxSizeToRead;
+
+ if (IsFiniteSize())
+ MaxSizeToRead = GetSize();
+ else
+ MaxSizeToRead = 0x7FFFFFFF;
// read blocks and discard the ones we don't care about
- if (MaxSizeToRead > 0) {
+ if (MaxSizeToRead > 0)
+ {
inDataStream.I_O().setFilePointer(GetSizePosition() + GetSizeLength(), seek_beginning);
ElementLevelA = inDataStream.FindNextElement(sContext, UpperEltFound, MaxSizeToRead, AllowDummyElt);
- while (ElementLevelA != NULL && MaxSizeToRead > 0 && UpperEltFound <= 0) {
- MaxSizeToRead = GetEndPosition() - ElementLevelA->GetEndPosition(); // even if it's the default value
+ while (ElementLevelA != NULL && UpperEltFound <= 0 && MaxSizeToRead > 0) {
+ if (IsFiniteSize())
+ MaxSizeToRead = GetEndPosition() - ElementLevelA->GetEndPosition(); // even if it's the default value
if (!AllowDummyElt && ElementLevelA->IsDummy()) {
ElementLevelA->SkipData(inDataStream, sContext);
delete ElementLevelA; // forget this unknown element
@@ -444,9 +451,8 @@ void EbmlMaster::Read(EbmlStream & inDataStream, const EbmlSemanticContext & sCo
goto processCrc;
}
- if (MaxSizeToRead <= 0) {
+ if (MaxSizeToRead <= 0)
goto processCrc;// this level is finished
- }
ElementLevelA = inDataStream.FindNextElement(sContext, UpperEltFound, MaxSizeToRead, AllowDummyElt);
}
diff --git a/src/EbmlStream.cpp b/src/EbmlStream.cpp
index 2ad6dd1..d21c5b4 100644
--- a/src/EbmlStream.cpp
+++ b/src/EbmlStream.cpp
@@ -30,7 +30,7 @@
/*!
\file
- \version \$Id: EbmlStream.cpp 639 2004-07-09 20:59:14Z mosu $
+ \version \$Id: EbmlStream.cpp 280 2010-05-27 15:52:47Z robux4 $
\author Steve Lhomme <robux4 @ users.sf.net>
*/
#include "ebml/EbmlStream.h"
@@ -44,12 +44,12 @@ EbmlStream::EbmlStream(IOCallback & DataStream)
EbmlStream::~EbmlStream()
{}
-EbmlElement * EbmlStream::FindNextID(const EbmlCallbacks & ClassInfos, const uint64 MaxDataSize)
+EbmlElement * EbmlStream::FindNextID(const EbmlCallbacks & ClassInfos, uint64 MaxDataSize)
{
return EbmlElement::FindNextID(Stream, ClassInfos, MaxDataSize);
}
-EbmlElement * EbmlStream::FindNextElement(const EbmlSemanticContext & Context, int & UpperLevel, const uint64 MaxDataSize, bool AllowDummyElt, unsigned int MaxLowerLevel)
+EbmlElement * EbmlStream::FindNextElement(const EbmlSemanticContext & Context, int & UpperLevel, uint64 MaxDataSize, bool AllowDummyElt, unsigned int MaxLowerLevel)
{
return EbmlElement::FindNextElement(Stream, Context, UpperLevel, MaxDataSize, AllowDummyElt, MaxLowerLevel);
}
diff --git a/src/EbmlUInteger.cpp b/src/EbmlUInteger.cpp
index 5bc1415..76491d4 100644
--- a/src/EbmlUInteger.cpp
+++ b/src/EbmlUInteger.cpp
@@ -30,7 +30,7 @@
/*!
\file
- \version \$Id: EbmlUInteger.cpp 1079 2005-03-03 13:18:14Z robux4 $
+ \version \$Id: EbmlUInteger.cpp 280 2010-05-27 15:52:47Z robux4 $
\author Steve Lhomme <robux4 @ users.sf.net>
\author Moritz Bunkus <moritz @ bunkus.org>
*/
@@ -64,7 +64,7 @@ void EbmlUInteger::SetDefaultValue(uint64 aValue)
SetDefaultIsSet();
}
-const uint64 EbmlUInteger::DefaultVal() const
+uint64 EbmlUInteger::DefaultVal() const
{
assert(DefaultISset());
return DefaultValue;
--
libebml packaging
More information about the pkg-multimedia-commits
mailing list