Compare commits
20 Commits
release-1.
...
release-1.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
752cf42082 | ||
|
|
f9489f1f80 | ||
|
|
9a31b3864c | ||
|
|
2490c80ad1 | ||
|
|
5eea000814 | ||
|
|
527f98c367 | ||
|
|
ef72dc1bae | ||
|
|
84f17676f0 | ||
|
|
54782a8ee9 | ||
|
|
7922aef03d | ||
|
|
83cc857424 | ||
|
|
8200c78a85 | ||
|
|
f2545cc6d7 | ||
|
|
81b5b9ff60 | ||
|
|
c064df6936 | ||
|
|
a828485b74 | ||
|
|
676d1ba310 | ||
|
|
9ff9decf8c | ||
|
|
3a490a84ce | ||
|
|
d70416282f |
14
ChangeLog
14
ChangeLog
@@ -1,3 +1,17 @@
|
||||
2011-09-23 robux4/mosu
|
||||
New 1.2.2 version:
|
||||
- fix usage of the DEBUG #define (use LIBEBML_DEBUG instead)
|
||||
- The EbmlCodeVersion variable now resides in the library instead of being declared static in the header file.
|
||||
- only use the test element to read once in the loop
|
||||
|
||||
2011-06-26 robux4/mosu
|
||||
New 1.2.1 version:
|
||||
- fix the constructor of CRTError in StdIOCallback (patch from Graham 'gbooker' Booker)
|
||||
- fix the size returned by MemIOCallback::read() when reaching the end of the buffer
|
||||
- add a macro to define signed integer elements that have a default value
|
||||
- fix compilation of debug builds on win32
|
||||
- fix for Sun Studio C compiler
|
||||
|
||||
2011-01-30 robux4/mosu
|
||||
New 1.2.0 version:
|
||||
- no need to put the internal code of EbmlCrc32 in the public header
|
||||
|
||||
12
debian/changelog
vendored
12
debian/changelog
vendored
@@ -1,3 +1,15 @@
|
||||
libebml (1.2.2-1) natty; urgency=low
|
||||
|
||||
* New version.
|
||||
|
||||
-- Moritz Bunkus <moritz@bunkus.org> Fri, 23 Sep 2011 13:22:24 +0200
|
||||
|
||||
libebml (1.2.1-1) natty; urgency=low
|
||||
|
||||
* New version.
|
||||
|
||||
-- Moritz Bunkus <moritz@bunkus.org> Wed, 15 Jun 2011 13:55:50 +0200
|
||||
|
||||
libebml (1.2.0-1) lucid; urgency=low
|
||||
|
||||
* New version.
|
||||
|
||||
3
debian/control
vendored
3
debian/control
vendored
@@ -3,9 +3,10 @@ Priority: optional
|
||||
Maintainer: Moritz Bunkus <moritz@bunkus.org>
|
||||
Build-Depends: debhelper (>> 3.0.0)
|
||||
Standards-Version: 3.5.8
|
||||
Section: libs
|
||||
|
||||
Package: libebml-dev
|
||||
Section: devel
|
||||
Section: libdevel
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends}
|
||||
Description: Extensible Binary Meta Language access library
|
||||
|
||||
@@ -52,7 +52,7 @@ START_LIBEBML_NAMESPACE
|
||||
|
||||
static const int MAX_PREFIX_LENGTH = 128;
|
||||
|
||||
#if defined(DEBUG)
|
||||
#if defined(LIBEBML_DEBUG)
|
||||
// define the working debugging class
|
||||
|
||||
class EBML_DLL_API ADbg
|
||||
@@ -102,7 +102,7 @@ private:
|
||||
#endif // WIN32
|
||||
};
|
||||
|
||||
#else // defined(DEBUG)
|
||||
#else // defined(LIBEBML_DEBUG)
|
||||
|
||||
// define a class that does nothing (no output)
|
||||
|
||||
@@ -145,7 +145,7 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
#endif // defined(DEBUG)
|
||||
#endif // defined(LIBEBML_DEBUG)
|
||||
|
||||
extern class EBML_DLL_API ADbg globalDebug;
|
||||
|
||||
|
||||
@@ -96,7 +96,7 @@
|
||||
|
||||
// The LIBEBML_DEBUG symbol is defined, when we are creating a debug build. In this
|
||||
// case the debug logging code is compiled in.
|
||||
#if (defined(DEBUG)||defined(_DEBUG))&&!defined(LIBEBML_DEBUG)
|
||||
#if (defined(DEBUG)||defined(_DEBUG)) && !defined(LIBEBML_DEBUG)
|
||||
#define LIBEBML_DEBUG
|
||||
#endif
|
||||
|
||||
|
||||
@@ -116,6 +116,12 @@ extern const EbmlSemanticContext Context_EbmlGlobal;
|
||||
const EbmlCallbacks x::ClassInfos(x::Create, Id_##x, name, Context_##x); \
|
||||
x::x() :EbmlUInteger(defval) {}
|
||||
|
||||
#define DEFINE_xxx_SINTEGER_DEF(x,id,idl,parent,name,global,defval) \
|
||||
const EbmlId Id_##x (id, idl); \
|
||||
const EbmlSemanticContext Context_##x = EbmlSemanticContext(0, NULL, &Context_##parent, global, &EBML_INFO(x)); \
|
||||
const EbmlCallbacks x::ClassInfos(x::Create, Id_##x, name, Context_##x); \
|
||||
x::x() :EbmlSInteger(defval) {}
|
||||
|
||||
#define DEFINE_xxx_STRING_DEF(x,id,idl,parent,name,global,defval) \
|
||||
const EbmlId Id_##x (id, idl); \
|
||||
const EbmlSemanticContext Context_##x = EbmlSemanticContext(0, NULL, &Context_##parent, global, &EBML_INFO(x)); \
|
||||
|
||||
@@ -42,10 +42,10 @@
|
||||
|
||||
START_LIBEBML_NAMESPACE
|
||||
|
||||
#define LIBEBML_VERSION 0x010200
|
||||
#define LIBEBML_VERSION 0x010202
|
||||
|
||||
static const std::string EbmlCodeVersion = "1.2.0";
|
||||
static const std::string EbmlCodeDate = __TIMESTAMP__;
|
||||
extern const std::string EbmlCodeVersion;
|
||||
extern const std::string EbmlCodeDate;
|
||||
|
||||
/*!
|
||||
\todo Closer relation between an element and the context it comes from (context is an element attribute ?)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
LIB ebml
|
||||
{
|
||||
PROJECT_VERSION 1.2.0
|
||||
PROJECT_VERSION 1.2.2
|
||||
|
||||
INCLUDE .
|
||||
EXPINCLUDE .
|
||||
@@ -14,7 +14,7 @@ LIB ebml
|
||||
REDUCE_SIZE .
|
||||
FASTER_FLOAT .
|
||||
|
||||
// SOURCE src/Debug.cpp
|
||||
SOURCE src/Debug.cpp
|
||||
SOURCE src/EbmlBinary.cpp
|
||||
SOURCE src/EbmlContexts.cpp
|
||||
SOURCE src/EbmlCrc32.cpp
|
||||
@@ -38,7 +38,7 @@ LIB ebml
|
||||
SOURCE(TARGET_WIN) src/platform/win32/WinIOCallback.cpp
|
||||
|
||||
HEADER(TARGET_WIN) src/platform/win32/WinIOCallback.h
|
||||
// HEADER ebml/Debug.h
|
||||
HEADER ebml/Debug.h
|
||||
HEADER ebml/EbmlBinary.h
|
||||
HEADER ebml/EbmlConfig.h
|
||||
HEADER ebml/EbmlContexts.h
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# SPEC file for libebml on (at least) Fedora Core 1, 2, 3
|
||||
|
||||
Name: libebml
|
||||
Version: 1.2.0
|
||||
Version: 1.2.2
|
||||
Release: 1
|
||||
License: LGPL
|
||||
Summary: Extensible Binary Meta Language
|
||||
|
||||
@@ -14,7 +14,7 @@ BuildRequires: bzip2 cpp make tar zlib zlib-devel binutils gcc gcc-c++ libstdc++
|
||||
|
||||
Name: libebml
|
||||
URL: http://sourceforge.net/projects/ebml
|
||||
Version: 1.2.0
|
||||
Version: 1.2.2
|
||||
Release: 1
|
||||
Summary: libary to parse EBML files.
|
||||
License: LGPL
|
||||
|
||||
@@ -49,7 +49,7 @@ START_LIBEBML_NAMESPACE
|
||||
|
||||
class ADbg globalDebug;
|
||||
|
||||
#if defined(DEBUG)
|
||||
#if defined(LIBEBML_DEBUG)
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// Construction/Destruction
|
||||
@@ -232,6 +232,6 @@ bool ADbg::unsetDebugFile() {
|
||||
return result;
|
||||
}
|
||||
|
||||
#endif // defined(DEBUG)
|
||||
#endif // defined(LIBEBML_DEBUG)
|
||||
|
||||
END_LIBEBML_NAMESPACE
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
\author Julien Coloos <suiryc @ users.sf.net>
|
||||
*/
|
||||
#include <cassert>
|
||||
#include <string>
|
||||
|
||||
#include "ebml/EbmlBinary.h"
|
||||
#include "ebml/StdIOCallback.h"
|
||||
@@ -91,9 +92,9 @@ filepos_t EbmlBinary::ReadData(IOCallback & input, ScopeMode ReadFully)
|
||||
return GetSize();
|
||||
}
|
||||
|
||||
Data = (binary *)malloc(GetSize() * sizeof(binary));
|
||||
Data = (binary *)malloc(GetSize());
|
||||
if (Data == NULL)
|
||||
throw CRTError("Error allocating data");
|
||||
throw CRTError(std::string("Error allocating data"));
|
||||
SetValueIsSet();
|
||||
return input.read(Data, GetSize());
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ START_LIBEBML_NAMESPACE
|
||||
*/
|
||||
int CodedSizeLength(uint64 Length, unsigned int SizeLength, bool bSizeFinite)
|
||||
{
|
||||
int CodedSize;
|
||||
unsigned int CodedSize;
|
||||
if (bSizeFinite) {
|
||||
// prepare the head of the size (000...01xxxxxx)
|
||||
// optimal size
|
||||
@@ -486,6 +486,7 @@ EbmlElement * EbmlElement::SkipData(EbmlStream & DataStream, const EbmlSemanticC
|
||||
Result = DataStream.FindNextElement(Context, bUpperElement, 0xFFFFFFFFL, AllowDummyElt);
|
||||
} else {
|
||||
Result = TestReadElt;
|
||||
TestReadElt = NULL;
|
||||
}
|
||||
|
||||
if (Result != NULL) {
|
||||
@@ -581,14 +582,14 @@ filepos_t EbmlElement::Render(IOCallback & output, bool bWithDefault, bool bKeep
|
||||
if (!bWithDefault && IsDefaultValue()) {
|
||||
return 0;
|
||||
}
|
||||
#if defined(_DEBUG) || defined(DEBUG)
|
||||
#if defined(LIBEBML_DEBUG)
|
||||
uint64 SupposedSize = UpdateSize(bWithDefault, bForceRender);
|
||||
#endif // _DEBUG
|
||||
#endif // LIBEBML_DEBUG
|
||||
filepos_t result = RenderHead(output, bForceRender, bWithDefault, bKeepPosition);
|
||||
uint64 WrittenSize = RenderData(output, bForceRender, bWithDefault);
|
||||
#if defined(_DEBUG) || defined(DEBUG)
|
||||
if (SupposedSize != (0-1)) assert(WrittenSize == SupposedSize);
|
||||
#endif // DEBUG
|
||||
#if defined(LIBEBML_DEBUG)
|
||||
if (static_cast<int64>(SupposedSize) != (0-1)) assert(WrittenSize == SupposedSize);
|
||||
#endif // LIBEBML_DEBUG
|
||||
result += WrittenSize;
|
||||
return result;
|
||||
} catch (std::exception & ex) {
|
||||
|
||||
@@ -145,10 +145,10 @@ uint64 EbmlMaster::UpdateSize(bool bWithDefault, bool bForceRender)
|
||||
continue;
|
||||
(ElementList[Index])->UpdateSize(bWithDefault, bForceRender);
|
||||
uint64 SizeToAdd = (ElementList[Index])->ElementSize(bWithDefault);
|
||||
#if defined(_DEBUG) || defined(DEBUG)
|
||||
if (SizeToAdd == (0-1))
|
||||
#if defined(LIBEBML_DEBUG)
|
||||
if (static_cast<int64>(SizeToAdd) == (0-1))
|
||||
return (0-1);
|
||||
#endif // DEBUG
|
||||
#endif // LIBEBML_DEBUG
|
||||
SetSize_(GetSize() + SizeToAdd);
|
||||
}
|
||||
if (bChecksumUsed) {
|
||||
@@ -204,10 +204,10 @@ bool EbmlMaster::CheckMandatory() const
|
||||
for (EltIdx = 0; EltIdx < EBML_CTX_SIZE(Context); EltIdx++) {
|
||||
if (EBML_CTX_IDX(Context,EltIdx).IsMandatory()) {
|
||||
if (FindElt(EBML_CTX_IDX_INFO(Context,EltIdx)) == NULL) {
|
||||
#if defined(_DEBUG) || defined(DEBUG)
|
||||
#if defined(LIBEBML_DEBUG)
|
||||
// you are missing this Mandatory element
|
||||
// const char * MissingName = EBML_INFO_NAME(EBML_CTX_IDX_INFO(Context,EltIdx));
|
||||
#endif // DEBUG
|
||||
#endif // LIBEBML_DEBUG
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,41 +1,44 @@
|
||||
/****************************************************************************
|
||||
** libebml : parse EBML files, see http://embl.sourceforge.net/
|
||||
**
|
||||
** <file/class description>
|
||||
**
|
||||
** Copyright (C) 2002-2010 Steve Lhomme. All rights reserved.
|
||||
**
|
||||
** This file is part of libebml.
|
||||
**
|
||||
** 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: EbmlVersion.cpp 639 2004-07-09 20:59:14Z mosu $
|
||||
\author Steve Lhomme <robux4 @ users.sf.net>
|
||||
*/
|
||||
|
||||
#include "ebml/EbmlVersion.h"
|
||||
|
||||
START_LIBEBML_NAMESPACE
|
||||
|
||||
END_LIBEBML_NAMESPACE
|
||||
/****************************************************************************
|
||||
** libebml : parse EBML files, see http://embl.sourceforge.net/
|
||||
**
|
||||
** <file/class description>
|
||||
**
|
||||
** Copyright (C) 2002-2010 Steve Lhomme. All rights reserved.
|
||||
**
|
||||
** This file is part of libebml.
|
||||
**
|
||||
** 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: EbmlVersion.cpp 639 2004-07-09 20:59:14Z mosu $
|
||||
\author Steve Lhomme <robux4 @ users.sf.net>
|
||||
*/
|
||||
|
||||
#include "ebml/EbmlVersion.h"
|
||||
|
||||
START_LIBEBML_NAMESPACE
|
||||
|
||||
const std::string EbmlCodeVersion = "1.2.2";
|
||||
const std::string EbmlCodeDate = __TIMESTAMP__;
|
||||
|
||||
END_LIBEBML_NAMESPACE
|
||||
|
||||
@@ -72,8 +72,9 @@ uint32 MemIOCallback::read(void *Buffer, size_t Size)
|
||||
{
|
||||
//We will only return the remaining data
|
||||
memcpy(Buffer, dataBuffer + dataBufferPos, dataBufferTotalSize - dataBufferPos);
|
||||
uint64 oldDataPos = dataBufferPos;
|
||||
dataBufferPos = dataBufferTotalSize;
|
||||
return dataBufferTotalSize - dataBufferPos;
|
||||
return dataBufferTotalSize - oldDataPos;
|
||||
}
|
||||
|
||||
//Well... We made it here, so do a quick and simple copy
|
||||
|
||||
@@ -49,13 +49,13 @@ START_LIBEBML_NAMESPACE
|
||||
|
||||
CRTError::CRTError(int nError, const std::string & Description)
|
||||
:std::runtime_error(Description+": "+strerror(nError))
|
||||
,Error(Error)
|
||||
,Error(nError)
|
||||
{
|
||||
}
|
||||
|
||||
CRTError::CRTError(const std::string & Description,int nError)
|
||||
:std::runtime_error(Description+": "+strerror(nError))
|
||||
,Error(Error)
|
||||
,Error(nError)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user