Use Linux-style EOL for non Windows specific files
This commit is contained in:
parent
302c8fb89d
commit
71fbd5a521
1008
LICENSE.LGPL
1008
LICENSE.LGPL
File diff suppressed because it is too large
Load Diff
@ -1,122 +1,122 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
** libebml : parse EBML files, see http://embl.sourceforge.net/
|
** libebml : parse EBML files, see http://embl.sourceforge.net/
|
||||||
**
|
**
|
||||||
** <file/class description>
|
** <file/class description>
|
||||||
**
|
**
|
||||||
** Copyright (C) 2002-2010 Steve Lhomme. All rights reserved.
|
** Copyright (C) 2002-2010 Steve Lhomme. All rights reserved.
|
||||||
**
|
**
|
||||||
** This file is part of libebml.
|
** This file is part of libebml.
|
||||||
**
|
**
|
||||||
** This library is free software; you can redistribute it and/or
|
** This library is free software; you can redistribute it and/or
|
||||||
** modify it under the terms of the GNU Lesser General Public
|
** modify it under the terms of the GNU Lesser General Public
|
||||||
** License as published by the Free Software Foundation; either
|
** License as published by the Free Software Foundation; either
|
||||||
** version 2.1 of the License, or (at your option) any later version.
|
** 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,
|
** This library is distributed in the hope that it will be useful,
|
||||||
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
** Lesser General Public License for more details.
|
** Lesser General Public License for more details.
|
||||||
**
|
**
|
||||||
** You should have received a copy of the GNU Lesser General Public
|
** You should have received a copy of the GNU Lesser General Public
|
||||||
** License along with this library; if not, write to the Free Software
|
** License along with this library; if not, write to the Free Software
|
||||||
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
**
|
**
|
||||||
** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.
|
** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.
|
||||||
**
|
**
|
||||||
** Contact license@matroska.org if any conditions of this licensing are
|
** Contact license@matroska.org if any conditions of this licensing are
|
||||||
** not clear to you.
|
** not clear to you.
|
||||||
**
|
**
|
||||||
**********************************************************************/
|
**********************************************************************/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\file
|
\file
|
||||||
\version \$Id: EbmlEndian.h 1298 2008-02-21 22:14:18Z mosu $
|
\version \$Id: EbmlEndian.h 1298 2008-02-21 22:14:18Z mosu $
|
||||||
\author Ingo Ralf Blum <ingoralfblum @ users.sf.net>
|
\author Ingo Ralf Blum <ingoralfblum @ users.sf.net>
|
||||||
\author Lasse Kärkkäinen <tronic @ users.sf.net>
|
\author Lasse Kärkkäinen <tronic @ users.sf.net>
|
||||||
\author Steve Lhomme <robux4 @ users.sf.net>
|
\author Steve Lhomme <robux4 @ users.sf.net>
|
||||||
*/
|
*/
|
||||||
#ifndef LIBEBML_ENDIAN_H
|
#ifndef LIBEBML_ENDIAN_H
|
||||||
#define LIBEBML_ENDIAN_H
|
#define LIBEBML_ENDIAN_H
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
|
||||||
#include "EbmlConfig.h" // contains _ENDIANESS_
|
#include "EbmlConfig.h" // contains _ENDIANESS_
|
||||||
|
|
||||||
START_LIBEBML_NAMESPACE
|
START_LIBEBML_NAMESPACE
|
||||||
|
|
||||||
enum endianess {
|
enum endianess {
|
||||||
big_endian, ///< PowerPC, Alpha, 68000
|
big_endian, ///< PowerPC, Alpha, 68000
|
||||||
little_endian ///< Intel x86 platforms
|
little_endian ///< Intel x86 platforms
|
||||||
};
|
};
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\class Endian
|
\class Endian
|
||||||
\brief general class to handle endian-specific buffers
|
\brief general class to handle endian-specific buffers
|
||||||
\note don't forget to define/undefine _ENDIANESS_ to BIG_ENDIAN depending on your machine
|
\note don't forget to define/undefine _ENDIANESS_ to BIG_ENDIAN depending on your machine
|
||||||
*/
|
*/
|
||||||
template<class TYPE, endianess ENDIAN> class Endian
|
template<class TYPE, endianess ENDIAN> class Endian
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Endian() {}
|
Endian() {}
|
||||||
|
|
||||||
Endian(const TYPE value)
|
Endian(const TYPE value)
|
||||||
{
|
{
|
||||||
memcpy(&platform_value, &value, sizeof(TYPE));
|
memcpy(&platform_value, &value, sizeof(TYPE));
|
||||||
process_endian();
|
process_endian();
|
||||||
}
|
}
|
||||||
|
|
||||||
inline Endian & Eval(const binary *endian_buffer)
|
inline Endian & Eval(const binary *endian_buffer)
|
||||||
{
|
{
|
||||||
//endian_value = *(TYPE *)(endian_buffer);
|
//endian_value = *(TYPE *)(endian_buffer);
|
||||||
memcpy(&endian_value, endian_buffer, sizeof(TYPE)); // Some (all?) RISC processors do not allow reading objects bigger than 1 byte from non-aligned addresses, and endian_buffer may point to a non-aligned address.
|
memcpy(&endian_value, endian_buffer, sizeof(TYPE)); // Some (all?) RISC processors do not allow reading objects bigger than 1 byte from non-aligned addresses, and endian_buffer may point to a non-aligned address.
|
||||||
process_platform();
|
process_platform();
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void Fill(binary *endian_buffer) const
|
inline void Fill(binary *endian_buffer) const
|
||||||
{
|
{
|
||||||
//*(TYPE*)endian_buffer = endian_value;
|
//*(TYPE*)endian_buffer = endian_value;
|
||||||
memcpy(endian_buffer, &endian_value, sizeof(TYPE)); // See above.
|
memcpy(endian_buffer, &endian_value, sizeof(TYPE)); // See above.
|
||||||
}
|
}
|
||||||
|
|
||||||
inline operator const TYPE&() const { return platform_value; }
|
inline operator const TYPE&() const { return platform_value; }
|
||||||
// inline TYPE endian() const { return endian_value; }
|
// inline TYPE endian() const { return endian_value; }
|
||||||
inline const TYPE &endian() const { return endian_value; }
|
inline const TYPE &endian() const { return endian_value; }
|
||||||
inline size_t size() const { return sizeof(TYPE); }
|
inline size_t size() const { return sizeof(TYPE); }
|
||||||
inline bool operator!=(const binary *buffer) const {return *((TYPE*)buffer) == platform_value;}
|
inline bool operator!=(const binary *buffer) const {return *((TYPE*)buffer) == platform_value;}
|
||||||
|
|
||||||
#if defined(EBML_STRICT_API)
|
#if defined(EBML_STRICT_API)
|
||||||
private:
|
private:
|
||||||
#else
|
#else
|
||||||
protected:
|
protected:
|
||||||
#endif
|
#endif
|
||||||
TYPE platform_value;
|
TYPE platform_value;
|
||||||
TYPE endian_value;
|
TYPE endian_value;
|
||||||
|
|
||||||
inline void process_endian()
|
inline void process_endian()
|
||||||
{
|
{
|
||||||
endian_value = platform_value;
|
endian_value = platform_value;
|
||||||
#ifdef WORDS_BIGENDIAN
|
#ifdef WORDS_BIGENDIAN
|
||||||
if (ENDIAN == little_endian)
|
if (ENDIAN == little_endian)
|
||||||
#else // _ENDIANESS_
|
#else // _ENDIANESS_
|
||||||
if (ENDIAN == big_endian)
|
if (ENDIAN == big_endian)
|
||||||
#endif // _ENDIANESS_
|
#endif // _ENDIANESS_
|
||||||
std::reverse(reinterpret_cast<uint8*>(&endian_value),reinterpret_cast<uint8*>(&endian_value+1));
|
std::reverse(reinterpret_cast<uint8*>(&endian_value),reinterpret_cast<uint8*>(&endian_value+1));
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void process_platform()
|
inline void process_platform()
|
||||||
{
|
{
|
||||||
platform_value = endian_value;
|
platform_value = endian_value;
|
||||||
#ifdef WORDS_BIGENDIAN
|
#ifdef WORDS_BIGENDIAN
|
||||||
if (ENDIAN == little_endian)
|
if (ENDIAN == little_endian)
|
||||||
#else // _ENDIANESS_
|
#else // _ENDIANESS_
|
||||||
if (ENDIAN == big_endian)
|
if (ENDIAN == big_endian)
|
||||||
#endif // _ENDIANESS_
|
#endif // _ENDIANESS_
|
||||||
std::reverse(reinterpret_cast<uint8*>(&platform_value),reinterpret_cast<uint8*>(&platform_value+1));
|
std::reverse(reinterpret_cast<uint8*>(&platform_value),reinterpret_cast<uint8*>(&platform_value+1));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
END_LIBEBML_NAMESPACE
|
END_LIBEBML_NAMESPACE
|
||||||
|
|
||||||
#endif // LIBEBML_ENDIAN_H
|
#endif // LIBEBML_ENDIAN_H
|
||||||
|
198
ebml/EbmlId.h
198
ebml/EbmlId.h
@ -1,99 +1,99 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
** libebml : parse EBML files, see http://embl.sourceforge.net/
|
** libebml : parse EBML files, see http://embl.sourceforge.net/
|
||||||
**
|
**
|
||||||
** <file/class description>
|
** <file/class description>
|
||||||
**
|
**
|
||||||
** Copyright (C) 2002-2010 Steve Lhomme. All rights reserved.
|
** Copyright (C) 2002-2010 Steve Lhomme. All rights reserved.
|
||||||
**
|
**
|
||||||
** This file is part of libebml.
|
** This file is part of libebml.
|
||||||
**
|
**
|
||||||
** This library is free software; you can redistribute it and/or
|
** This library is free software; you can redistribute it and/or
|
||||||
** modify it under the terms of the GNU Lesser General Public
|
** modify it under the terms of the GNU Lesser General Public
|
||||||
** License as published by the Free Software Foundation; either
|
** License as published by the Free Software Foundation; either
|
||||||
** version 2.1 of the License, or (at your option) any later version.
|
** 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,
|
** This library is distributed in the hope that it will be useful,
|
||||||
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
** Lesser General Public License for more details.
|
** Lesser General Public License for more details.
|
||||||
**
|
**
|
||||||
** You should have received a copy of the GNU Lesser General Public
|
** You should have received a copy of the GNU Lesser General Public
|
||||||
** License along with this library; if not, write to the Free Software
|
** License along with this library; if not, write to the Free Software
|
||||||
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
**
|
**
|
||||||
** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.
|
** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.
|
||||||
**
|
**
|
||||||
** Contact license@matroska.org if any conditions of this licensing are
|
** Contact license@matroska.org if any conditions of this licensing are
|
||||||
** not clear to you.
|
** not clear to you.
|
||||||
**
|
**
|
||||||
**********************************************************************/
|
**********************************************************************/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\file
|
\file
|
||||||
\version \$Id: EbmlId.h 936 2004-11-10 20:46:28Z mosu $
|
\version \$Id: EbmlId.h 936 2004-11-10 20:46:28Z mosu $
|
||||||
\author Steve Lhomme <robux4 @ users.sf.net>
|
\author Steve Lhomme <robux4 @ users.sf.net>
|
||||||
*/
|
*/
|
||||||
#ifndef LIBEBML_ID_H
|
#ifndef LIBEBML_ID_H
|
||||||
#define LIBEBML_ID_H
|
#define LIBEBML_ID_H
|
||||||
|
|
||||||
#include "EbmlTypes.h"
|
#include "EbmlTypes.h"
|
||||||
|
|
||||||
START_LIBEBML_NAMESPACE
|
START_LIBEBML_NAMESPACE
|
||||||
|
|
||||||
|
|
||||||
#if defined(EBML_STRICT_API)
|
#if defined(EBML_STRICT_API)
|
||||||
#define EBML_ID_VALUE(id) (id).GetValue()
|
#define EBML_ID_VALUE(id) (id).GetValue()
|
||||||
#define EBML_ID_LENGTH(id) (id).GetLength()
|
#define EBML_ID_LENGTH(id) (id).GetLength()
|
||||||
#else
|
#else
|
||||||
#define EBML_ID_VALUE(id) (id).Value
|
#define EBML_ID_VALUE(id) (id).Value
|
||||||
#define EBML_ID_LENGTH(id) (id).Length
|
#define EBML_ID_LENGTH(id) (id).Length
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\class EbmlId
|
\class EbmlId
|
||||||
*/
|
*/
|
||||||
class EBML_DLL_API EbmlId {
|
class EBML_DLL_API EbmlId {
|
||||||
public:
|
public:
|
||||||
EbmlId(const binary aValue[4], const unsigned int aLength)
|
EbmlId(const binary aValue[4], const unsigned int aLength)
|
||||||
:Length(aLength)
|
:Length(aLength)
|
||||||
{
|
{
|
||||||
Value = 0;
|
Value = 0;
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
for (i=0; i<aLength; i++) {
|
for (i=0; i<aLength; i++) {
|
||||||
Value <<= 8;
|
Value <<= 8;
|
||||||
Value += aValue[i];
|
Value += aValue[i];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
EbmlId(const uint32 aValue, const unsigned int aLength)
|
EbmlId(const uint32 aValue, const unsigned int aLength)
|
||||||
:Value(aValue), Length(aLength) {}
|
:Value(aValue), Length(aLength) {}
|
||||||
|
|
||||||
inline bool operator==(const EbmlId & TestId) const
|
inline bool operator==(const EbmlId & TestId) const
|
||||||
{
|
{
|
||||||
return ((TestId.Length == Length) && (TestId.Value == Value));
|
return ((TestId.Length == Length) && (TestId.Value == Value));
|
||||||
}
|
}
|
||||||
inline bool operator!=(const EbmlId & TestId) const
|
inline bool operator!=(const EbmlId & TestId) const
|
||||||
{
|
{
|
||||||
return !(*this == TestId);
|
return !(*this == TestId);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void Fill(binary * Buffer) const {
|
inline void Fill(binary * Buffer) const {
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
for (i = 0; i<Length; i++) {
|
for (i = 0; i<Length; i++) {
|
||||||
Buffer[i] = (Value >> (8*(Length-i-1))) & 0xFF;
|
Buffer[i] = (Value >> (8*(Length-i-1))) & 0xFF;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
inline size_t GetLength() const { return Length; }
|
inline size_t GetLength() const { return Length; }
|
||||||
inline uint32 GetValue() const { return Value; }
|
inline uint32 GetValue() const { return Value; }
|
||||||
|
|
||||||
#if defined(EBML_STRICT_API)
|
#if defined(EBML_STRICT_API)
|
||||||
private:
|
private:
|
||||||
#endif
|
#endif
|
||||||
uint32 Value;
|
uint32 Value;
|
||||||
size_t Length;
|
size_t Length;
|
||||||
};
|
};
|
||||||
|
|
||||||
END_LIBEBML_NAMESPACE
|
END_LIBEBML_NAMESPACE
|
||||||
|
|
||||||
#endif // LIBEBML_ID_H
|
#endif // LIBEBML_ID_H
|
||||||
|
@ -1,97 +1,97 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
** libebml : parse EBML files, see http://embl.sourceforge.net/
|
** libebml : parse EBML files, see http://embl.sourceforge.net/
|
||||||
**
|
**
|
||||||
** <file/class description>
|
** <file/class description>
|
||||||
**
|
**
|
||||||
** Copyright (C) 2002-2010 Steve Lhomme. All rights reserved.
|
** Copyright (C) 2002-2010 Steve Lhomme. All rights reserved.
|
||||||
**
|
**
|
||||||
** This file is part of libebml.
|
** This file is part of libebml.
|
||||||
**
|
**
|
||||||
** This library is free software; you can redistribute it and/or
|
** This library is free software; you can redistribute it and/or
|
||||||
** modify it under the terms of the GNU Lesser General Public
|
** modify it under the terms of the GNU Lesser General Public
|
||||||
** License as published by the Free Software Foundation; either
|
** License as published by the Free Software Foundation; either
|
||||||
** version 2.1 of the License, or (at your option) any later version.
|
** 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,
|
** This library is distributed in the hope that it will be useful,
|
||||||
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
** Lesser General Public License for more details.
|
** Lesser General Public License for more details.
|
||||||
**
|
**
|
||||||
** You should have received a copy of the GNU Lesser General Public
|
** You should have received a copy of the GNU Lesser General Public
|
||||||
** License along with this library; if not, write to the Free Software
|
** License along with this library; if not, write to the Free Software
|
||||||
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
**
|
**
|
||||||
** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.
|
** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.
|
||||||
**
|
**
|
||||||
** Contact license@matroska.org if any conditions of this licensing are
|
** Contact license@matroska.org if any conditions of this licensing are
|
||||||
** not clear to you.
|
** not clear to you.
|
||||||
**
|
**
|
||||||
**********************************************************************/
|
**********************************************************************/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\file
|
\file
|
||||||
\version \$Id: EbmlSubHead.h 639 2004-07-09 20:59:14Z mosu $
|
\version \$Id: EbmlSubHead.h 639 2004-07-09 20:59:14Z mosu $
|
||||||
\author Steve Lhomme <robux4 @ users.sf.net>
|
\author Steve Lhomme <robux4 @ users.sf.net>
|
||||||
*/
|
*/
|
||||||
#ifndef LIBEBML_SUBHEAD_H
|
#ifndef LIBEBML_SUBHEAD_H
|
||||||
#define LIBEBML_SUBHEAD_H
|
#define LIBEBML_SUBHEAD_H
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include "EbmlUInteger.h"
|
#include "EbmlUInteger.h"
|
||||||
#include "EbmlString.h"
|
#include "EbmlString.h"
|
||||||
|
|
||||||
START_LIBEBML_NAMESPACE
|
START_LIBEBML_NAMESPACE
|
||||||
|
|
||||||
DECLARE_EBML_UINTEGER(EVersion)
|
DECLARE_EBML_UINTEGER(EVersion)
|
||||||
public:
|
public:
|
||||||
EVersion(const EVersion & ElementToClone) : EbmlUInteger(ElementToClone) {}
|
EVersion(const EVersion & ElementToClone) : EbmlUInteger(ElementToClone) {}
|
||||||
|
|
||||||
EBML_CONCRETE_CLASS(EVersion)
|
EBML_CONCRETE_CLASS(EVersion)
|
||||||
};
|
};
|
||||||
|
|
||||||
DECLARE_EBML_UINTEGER(EReadVersion)
|
DECLARE_EBML_UINTEGER(EReadVersion)
|
||||||
public:
|
public:
|
||||||
EReadVersion(const EReadVersion & ElementToClone) : EbmlUInteger(ElementToClone) {}
|
EReadVersion(const EReadVersion & ElementToClone) : EbmlUInteger(ElementToClone) {}
|
||||||
|
|
||||||
EBML_CONCRETE_CLASS(EReadVersion)
|
EBML_CONCRETE_CLASS(EReadVersion)
|
||||||
};
|
};
|
||||||
|
|
||||||
DECLARE_EBML_UINTEGER(EMaxIdLength)
|
DECLARE_EBML_UINTEGER(EMaxIdLength)
|
||||||
public:
|
public:
|
||||||
EMaxIdLength(const EMaxIdLength & ElementToClone) : EbmlUInteger(ElementToClone) {}
|
EMaxIdLength(const EMaxIdLength & ElementToClone) : EbmlUInteger(ElementToClone) {}
|
||||||
|
|
||||||
EBML_CONCRETE_CLASS(EMaxIdLength)
|
EBML_CONCRETE_CLASS(EMaxIdLength)
|
||||||
};
|
};
|
||||||
|
|
||||||
DECLARE_EBML_UINTEGER(EMaxSizeLength)
|
DECLARE_EBML_UINTEGER(EMaxSizeLength)
|
||||||
public:
|
public:
|
||||||
EMaxSizeLength(const EMaxSizeLength & ElementToClone) : EbmlUInteger(ElementToClone) {}
|
EMaxSizeLength(const EMaxSizeLength & ElementToClone) : EbmlUInteger(ElementToClone) {}
|
||||||
|
|
||||||
EBML_CONCRETE_CLASS(EMaxSizeLength)
|
EBML_CONCRETE_CLASS(EMaxSizeLength)
|
||||||
};
|
};
|
||||||
|
|
||||||
DECLARE_EBML_STRING(EDocType)
|
DECLARE_EBML_STRING(EDocType)
|
||||||
public:
|
public:
|
||||||
EDocType(const EDocType & ElementToClone) : EbmlString(ElementToClone) {}
|
EDocType(const EDocType & ElementToClone) : EbmlString(ElementToClone) {}
|
||||||
|
|
||||||
EBML_CONCRETE_CLASS(EDocType)
|
EBML_CONCRETE_CLASS(EDocType)
|
||||||
};
|
};
|
||||||
|
|
||||||
DECLARE_EBML_UINTEGER(EDocTypeVersion)
|
DECLARE_EBML_UINTEGER(EDocTypeVersion)
|
||||||
public:
|
public:
|
||||||
EDocTypeVersion(const EDocTypeVersion & ElementToClone) : EbmlUInteger(ElementToClone) {}
|
EDocTypeVersion(const EDocTypeVersion & ElementToClone) : EbmlUInteger(ElementToClone) {}
|
||||||
|
|
||||||
EBML_CONCRETE_CLASS(EDocTypeVersion)
|
EBML_CONCRETE_CLASS(EDocTypeVersion)
|
||||||
};
|
};
|
||||||
|
|
||||||
DECLARE_EBML_UINTEGER(EDocTypeReadVersion)
|
DECLARE_EBML_UINTEGER(EDocTypeReadVersion)
|
||||||
public:
|
public:
|
||||||
EDocTypeReadVersion(const EDocTypeReadVersion & ElementToClone) : EbmlUInteger(ElementToClone) {}
|
EDocTypeReadVersion(const EDocTypeReadVersion & ElementToClone) : EbmlUInteger(ElementToClone) {}
|
||||||
|
|
||||||
EBML_CONCRETE_CLASS(EDocTypeReadVersion)
|
EBML_CONCRETE_CLASS(EDocTypeReadVersion)
|
||||||
};
|
};
|
||||||
|
|
||||||
END_LIBEBML_NAMESPACE
|
END_LIBEBML_NAMESPACE
|
||||||
|
|
||||||
#endif // LIBEBML_SUBHEAD_H
|
#endif // LIBEBML_SUBHEAD_H
|
||||||
|
144
ebml/EbmlTypes.h
144
ebml/EbmlTypes.h
@ -1,72 +1,72 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
** libebml : parse EBML files, see http://embl.sourceforge.net/
|
** libebml : parse EBML files, see http://embl.sourceforge.net/
|
||||||
**
|
**
|
||||||
** <file/class description>
|
** <file/class description>
|
||||||
**
|
**
|
||||||
** Copyright (C) 2002-2004 Steve Lhomme. All rights reserved.
|
** Copyright (C) 2002-2004 Steve Lhomme. All rights reserved.
|
||||||
**
|
**
|
||||||
** This library is free software; you can redistribute it and/or
|
** This library is free software; you can redistribute it and/or
|
||||||
** modify it under the terms of the GNU Lesser General Public
|
** modify it under the terms of the GNU Lesser General Public
|
||||||
** License as published by the Free Software Foundation; either
|
** License as published by the Free Software Foundation; either
|
||||||
** version 2.1 of the License, or (at your option) any later version.
|
** 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,
|
** This library is distributed in the hope that it will be useful,
|
||||||
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
** Lesser General Public License for more details.
|
** Lesser General Public License for more details.
|
||||||
**
|
**
|
||||||
** You should have received a copy of the GNU Lesser General Public
|
** You should have received a copy of the GNU Lesser General Public
|
||||||
** License along with this library; if not, write to the Free Software
|
** License along with this library; if not, write to the Free Software
|
||||||
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
**
|
**
|
||||||
** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.
|
** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.
|
||||||
**
|
**
|
||||||
** Contact license@matroska.org if any conditions of this licensing are
|
** Contact license@matroska.org if any conditions of this licensing are
|
||||||
** not clear to you.
|
** not clear to you.
|
||||||
**
|
**
|
||||||
**********************************************************************/
|
**********************************************************************/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\file
|
\file
|
||||||
\version \$Id: EbmlTypes.h 639 2004-07-09 20:59:14Z mosu $
|
\version \$Id: EbmlTypes.h 639 2004-07-09 20:59:14Z mosu $
|
||||||
*/
|
*/
|
||||||
#ifndef LIBEBML_TYPES_H
|
#ifndef LIBEBML_TYPES_H
|
||||||
#define LIBEBML_TYPES_H
|
#define LIBEBML_TYPES_H
|
||||||
|
|
||||||
#include "ebml/c/libebml_t.h"
|
#include "ebml/c/libebml_t.h"
|
||||||
#include "ebml/EbmlConfig.h"
|
#include "ebml/EbmlConfig.h"
|
||||||
#include "EbmlEndian.h" // binary needs to be defined
|
#include "EbmlEndian.h" // binary needs to be defined
|
||||||
|
|
||||||
START_LIBEBML_NAMESPACE
|
START_LIBEBML_NAMESPACE
|
||||||
|
|
||||||
typedef wchar_t utf16;
|
typedef wchar_t utf16;
|
||||||
typedef uint32 utf32;
|
typedef uint32 utf32;
|
||||||
typedef char utf8;
|
typedef char utf8;
|
||||||
|
|
||||||
typedef binary bits80[10];
|
typedef binary bits80[10];
|
||||||
|
|
||||||
typedef Endian<int16,little_endian> lil_int16;
|
typedef Endian<int16,little_endian> lil_int16;
|
||||||
typedef Endian<int32,little_endian> lil_int32;
|
typedef Endian<int32,little_endian> lil_int32;
|
||||||
typedef Endian<int64,little_endian> lil_int64;
|
typedef Endian<int64,little_endian> lil_int64;
|
||||||
typedef Endian<uint16,little_endian> lil_uint16;
|
typedef Endian<uint16,little_endian> lil_uint16;
|
||||||
typedef Endian<uint32,little_endian> lil_uint32;
|
typedef Endian<uint32,little_endian> lil_uint32;
|
||||||
typedef Endian<uint64,little_endian> lil_uint64;
|
typedef Endian<uint64,little_endian> lil_uint64;
|
||||||
typedef Endian<int16,big_endian> big_int16;
|
typedef Endian<int16,big_endian> big_int16;
|
||||||
typedef Endian<int32,big_endian> big_int32;
|
typedef Endian<int32,big_endian> big_int32;
|
||||||
typedef Endian<int64,big_endian> big_int64;
|
typedef Endian<int64,big_endian> big_int64;
|
||||||
typedef Endian<uint16,big_endian> big_uint16;
|
typedef Endian<uint16,big_endian> big_uint16;
|
||||||
typedef Endian<uint32,big_endian> big_uint32;
|
typedef Endian<uint32,big_endian> big_uint32;
|
||||||
typedef Endian<uint64,big_endian> big_uint64;
|
typedef Endian<uint64,big_endian> big_uint64;
|
||||||
typedef Endian<uint32,big_endian> checksum;
|
typedef Endian<uint32,big_endian> checksum;
|
||||||
typedef Endian<bits80,big_endian> big_80bits;
|
typedef Endian<bits80,big_endian> big_80bits;
|
||||||
|
|
||||||
|
|
||||||
enum ScopeMode {
|
enum ScopeMode {
|
||||||
SCOPE_PARTIAL_DATA = 0,
|
SCOPE_PARTIAL_DATA = 0,
|
||||||
SCOPE_ALL_DATA,
|
SCOPE_ALL_DATA,
|
||||||
SCOPE_NO_DATA
|
SCOPE_NO_DATA
|
||||||
};
|
};
|
||||||
|
|
||||||
END_LIBEBML_NAMESPACE
|
END_LIBEBML_NAMESPACE
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
146
ebml/EbmlVoid.h
146
ebml/EbmlVoid.h
@ -1,73 +1,73 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
** libebml : parse EBML files, see http://embl.sourceforge.net/
|
** libebml : parse EBML files, see http://embl.sourceforge.net/
|
||||||
**
|
**
|
||||||
** <file/class description>
|
** <file/class description>
|
||||||
**
|
**
|
||||||
** Copyright (C) 2002-2010 Steve Lhomme. All rights reserved.
|
** Copyright (C) 2002-2010 Steve Lhomme. All rights reserved.
|
||||||
**
|
**
|
||||||
** This file is part of libebml.
|
** This file is part of libebml.
|
||||||
**
|
**
|
||||||
** This library is free software; you can redistribute it and/or
|
** This library is free software; you can redistribute it and/or
|
||||||
** modify it under the terms of the GNU Lesser General Public
|
** modify it under the terms of the GNU Lesser General Public
|
||||||
** License as published by the Free Software Foundation; either
|
** License as published by the Free Software Foundation; either
|
||||||
** version 2.1 of the License, or (at your option) any later version.
|
** 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,
|
** This library is distributed in the hope that it will be useful,
|
||||||
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
** Lesser General Public License for more details.
|
** Lesser General Public License for more details.
|
||||||
**
|
**
|
||||||
** You should have received a copy of the GNU Lesser General Public
|
** You should have received a copy of the GNU Lesser General Public
|
||||||
** License along with this library; if not, write to the Free Software
|
** License along with this library; if not, write to the Free Software
|
||||||
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
**
|
**
|
||||||
** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.
|
** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.
|
||||||
**
|
**
|
||||||
** Contact license@matroska.org if any conditions of this licensing are
|
** Contact license@matroska.org if any conditions of this licensing are
|
||||||
** not clear to you.
|
** not clear to you.
|
||||||
**
|
**
|
||||||
**********************************************************************/
|
**********************************************************************/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\file
|
\file
|
||||||
\version \$Id: EbmlVoid.h 1079 2005-03-03 13:18:14Z robux4 $
|
\version \$Id: EbmlVoid.h 1079 2005-03-03 13:18:14Z robux4 $
|
||||||
\author Steve Lhomme <robux4 @ users.sf.net>
|
\author Steve Lhomme <robux4 @ users.sf.net>
|
||||||
*/
|
*/
|
||||||
#ifndef LIBEBML_VOID_H
|
#ifndef LIBEBML_VOID_H
|
||||||
#define LIBEBML_VOID_H
|
#define LIBEBML_VOID_H
|
||||||
|
|
||||||
#include "EbmlTypes.h"
|
#include "EbmlTypes.h"
|
||||||
#include "EbmlBinary.h"
|
#include "EbmlBinary.h"
|
||||||
|
|
||||||
START_LIBEBML_NAMESPACE
|
START_LIBEBML_NAMESPACE
|
||||||
|
|
||||||
DECLARE_EBML_BINARY(EbmlVoid)
|
DECLARE_EBML_BINARY(EbmlVoid)
|
||||||
public:
|
public:
|
||||||
EbmlVoid(const EbmlVoid & ElementToClone) :EbmlBinary(ElementToClone){}
|
EbmlVoid(const EbmlVoid & ElementToClone) :EbmlBinary(ElementToClone){}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\brief Set the size of the data (not the complete size of the element)
|
\brief Set the size of the data (not the complete size of the element)
|
||||||
*/
|
*/
|
||||||
void SetSize(uint64 aSize) {SetSize_(aSize);}
|
void SetSize(uint64 aSize) {SetSize_(aSize);}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\note overwrite to write fake data
|
\note overwrite to write fake data
|
||||||
*/
|
*/
|
||||||
filepos_t RenderData(IOCallback & output, bool bForceRender, bool bWithDefault = false);
|
filepos_t RenderData(IOCallback & output, bool bForceRender, bool bWithDefault = false);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\brief Replace the void element content (written) with this one
|
\brief Replace the void element content (written) with this one
|
||||||
*/
|
*/
|
||||||
uint64 ReplaceWith(EbmlElement & EltToReplaceWith, IOCallback & output, bool ComeBackAfterward = true, bool bWithDefault = false);
|
uint64 ReplaceWith(EbmlElement & EltToReplaceWith, IOCallback & output, bool ComeBackAfterward = true, bool bWithDefault = false);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\brief Void the content of an element
|
\brief Void the content of an element
|
||||||
*/
|
*/
|
||||||
uint64 Overwrite(const EbmlElement & EltToVoid, IOCallback & output, bool ComeBackAfterward = true, bool bWithDefault = false);
|
uint64 Overwrite(const EbmlElement & EltToVoid, IOCallback & output, bool ComeBackAfterward = true, bool bWithDefault = false);
|
||||||
|
|
||||||
EBML_CONCRETE_CLASS(EbmlVoid)
|
EBML_CONCRETE_CLASS(EbmlVoid)
|
||||||
};
|
};
|
||||||
|
|
||||||
END_LIBEBML_NAMESPACE
|
END_LIBEBML_NAMESPACE
|
||||||
|
|
||||||
#endif // LIBEBML_VOID_H
|
#endif // LIBEBML_VOID_H
|
||||||
|
@ -1,151 +1,151 @@
|
|||||||
# libebml Makefile
|
# libebml Makefile
|
||||||
# $Id: Makefile,v 1.8 2004/05/11 20:27:38 mosu Exp $
|
# $Id: Makefile,v 1.8 2004/05/11 20:27:38 mosu Exp $
|
||||||
# Author: Steve Lhomme <robux4 @ users.sf.net>
|
# Author: Steve Lhomme <robux4 @ users.sf.net>
|
||||||
# Author: Moritz Bunkus <moritz @ bunkus.org>
|
# Author: Moritz Bunkus <moritz @ bunkus.org>
|
||||||
|
|
||||||
#
|
#
|
||||||
# The library is built without debug information. If you want
|
# The library is built without debug information. If you want
|
||||||
# debug information to be included then compile with
|
# debug information to be included then compile with
|
||||||
# 'make DEBUG=yes'.
|
# 'make DEBUG=yes'.
|
||||||
#
|
#
|
||||||
|
|
||||||
# Paths
|
# Paths
|
||||||
# BeOS wants the libs and headers in /boot/home/config
|
# BeOS wants the libs and headers in /boot/home/config
|
||||||
ifeq (BeOS,$(shell uname -s))
|
ifeq (BeOS,$(shell uname -s))
|
||||||
prefix=/boot/home/config
|
prefix=/boot/home/config
|
||||||
else
|
else
|
||||||
prefix=/usr/local
|
prefix=/usr/local
|
||||||
endif
|
endif
|
||||||
libdir=$(prefix)/lib
|
libdir=$(prefix)/lib
|
||||||
includedir=$(prefix)/include/ebml
|
includedir=$(prefix)/include/ebml
|
||||||
|
|
||||||
# Programs
|
# Programs
|
||||||
CROSS =
|
CROSS =
|
||||||
CXX = $(CROSS)g++
|
CXX = $(CROSS)g++
|
||||||
LD = $(CXX)
|
LD = $(CXX)
|
||||||
AR = $(CROSS)ar
|
AR = $(CROSS)ar
|
||||||
RANLIB = $(CROSS)ranlib
|
RANLIB = $(CROSS)ranlib
|
||||||
INSTALL = install
|
INSTALL = install
|
||||||
INSTALL_OPTS = -m 644
|
INSTALL_OPTS = -m 644
|
||||||
INSTALL_OPTS_LIB = -m 644
|
INSTALL_OPTS_LIB = -m 644
|
||||||
INSTALL_DIR_OPTS = -m 755
|
INSTALL_DIR_OPTS = -m 755
|
||||||
|
|
||||||
# Options
|
# Options
|
||||||
EXTENSION=.cpp
|
EXTENSION=.cpp
|
||||||
|
|
||||||
ifeq (yes,$(DEBUG))
|
ifeq (yes,$(DEBUG))
|
||||||
DEBUGFLAGS=-g -DDEBUG
|
DEBUGFLAGS=-g -DDEBUG
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq (Darwin,$(shell uname -s))
|
ifeq (Darwin,$(shell uname -s))
|
||||||
link=static
|
link=static
|
||||||
else
|
else
|
||||||
link=both
|
link=both
|
||||||
endif
|
endif
|
||||||
|
|
||||||
targets_both = staticlib sharedlib
|
targets_both = staticlib sharedlib
|
||||||
targets_shared = sharedlib
|
targets_shared = sharedlib
|
||||||
targets_static = staticlib
|
targets_static = staticlib
|
||||||
|
|
||||||
CWD=$(shell pwd)
|
CWD=$(shell pwd)
|
||||||
|
|
||||||
SRC_DIR=$(CWD)/../../src/
|
SRC_DIR=$(CWD)/../../src/
|
||||||
INCLUDE_DIR=$(CWD)/../../ebml
|
INCLUDE_DIR=$(CWD)/../../ebml
|
||||||
|
|
||||||
# Libraries
|
# Libraries
|
||||||
INCLUDE=-I$(CWD)/../..
|
INCLUDE=-I$(CWD)/../..
|
||||||
LIBS=
|
LIBS=
|
||||||
|
|
||||||
# Names
|
# Names
|
||||||
LIBRARY=libebml.a
|
LIBRARY=libebml.a
|
||||||
LIBRARY_SO=libebml.so
|
LIBRARY_SO=libebml.so
|
||||||
LIBRARY_SO_VER=libebml.so.4
|
LIBRARY_SO_VER=libebml.so.4
|
||||||
|
|
||||||
# source-files
|
# source-files
|
||||||
sources:=$(wildcard ${SRC_DIR}*$(EXTENSION))
|
sources:=$(wildcard ${SRC_DIR}*$(EXTENSION))
|
||||||
|
|
||||||
# header files; replace .cxx extension with .h
|
# header files; replace .cxx extension with .h
|
||||||
headers:=$(patsubst %$(EXTENSION),%.h,$(sources))
|
headers:=$(patsubst %$(EXTENSION),%.h,$(sources))
|
||||||
|
|
||||||
# object files; replace .cxx extension with .o
|
# object files; replace .cxx extension with .o
|
||||||
objects:=$(patsubst %$(EXTENSION),%.o,$(sources))
|
objects:=$(patsubst %$(EXTENSION),%.o,$(sources))
|
||||||
objects_so:=$(patsubst %$(EXTENSION),%.lo,$(sources))
|
objects_so:=$(patsubst %$(EXTENSION),%.lo,$(sources))
|
||||||
|
|
||||||
WARNINGFLAGS=-Wall -Wextra -Wno-unknown-pragmas -Wshadow
|
WARNINGFLAGS=-Wall -Wextra -Wno-unknown-pragmas -Wshadow
|
||||||
COMPILEFLAGS=$(WARNINGFLAGS) $(CXXFLAGS) $(CPPFLAGS) $(DEBUGFLAGS) $(INCLUDE)
|
COMPILEFLAGS=$(WARNINGFLAGS) $(CXXFLAGS) $(CPPFLAGS) $(DEBUGFLAGS) $(INCLUDE)
|
||||||
DEPENDFLAGS = $(CXXFLAGS) $(INCLUDE)
|
DEPENDFLAGS = $(CXXFLAGS) $(INCLUDE)
|
||||||
|
|
||||||
all: $(targets_$(link))
|
all: $(targets_$(link))
|
||||||
|
|
||||||
staticlib: $(LIBRARY)
|
staticlib: $(LIBRARY)
|
||||||
|
|
||||||
sharedlib: $(LIBRARY_SO)
|
sharedlib: $(LIBRARY_SO)
|
||||||
|
|
||||||
lib:
|
lib:
|
||||||
@echo "Use the 'staticlib', 'sharedlib' or 'all' targets."
|
@echo "Use the 'staticlib', 'sharedlib' or 'all' targets."
|
||||||
@false
|
@false
|
||||||
|
|
||||||
# Build rules
|
# Build rules
|
||||||
%.o: %$(EXTENSION)
|
%.o: %$(EXTENSION)
|
||||||
$(CXX) -c $(COMPILEFLAGS) -o $@ $<
|
$(CXX) -c $(COMPILEFLAGS) -o $@ $<
|
||||||
|
|
||||||
%.lo: %$(EXTENSION)
|
%.lo: %$(EXTENSION)
|
||||||
$(CXX) -c $(COMPILEFLAGS) -fPIC -o $@ $<
|
$(CXX) -c $(COMPILEFLAGS) -fPIC -o $@ $<
|
||||||
|
|
||||||
$(LIBRARY): $(objects)
|
$(LIBRARY): $(objects)
|
||||||
$(AR) rcvu $@ $(objects)
|
$(AR) rcvu $@ $(objects)
|
||||||
$(RANLIB) $@
|
$(RANLIB) $@
|
||||||
|
|
||||||
$(LIBRARY_SO): $(objects_so)
|
$(LIBRARY_SO): $(objects_so)
|
||||||
$(CXX) -shared -Wl,-soname,$(LIBRARY_SO_VER) -o $(LIBRARY_SO_VER) $(objects_so)
|
$(CXX) -shared -Wl,-soname,$(LIBRARY_SO_VER) -o $(LIBRARY_SO_VER) $(objects_so)
|
||||||
rm -f $(LIBRARY_SO)
|
rm -f $(LIBRARY_SO)
|
||||||
ln -s $(LIBRARY_SO_VER) $(LIBRARY_SO)
|
ln -s $(LIBRARY_SO_VER) $(LIBRARY_SO)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f $(objects) $(objects_so)
|
rm -f $(objects) $(objects_so)
|
||||||
rm -f $(LIBRARY)
|
rm -f $(LIBRARY)
|
||||||
rm -f $(LIBRARY_SO)
|
rm -f $(LIBRARY_SO)
|
||||||
rm -f $(LIBRARY_SO_VER)
|
rm -f $(LIBRARY_SO_VER)
|
||||||
rm -f CORE
|
rm -f CORE
|
||||||
|
|
||||||
distclean dist-clean: clean
|
distclean dist-clean: clean
|
||||||
rm -f .depend
|
rm -f .depend
|
||||||
|
|
||||||
depend:
|
depend:
|
||||||
@echo Calculating dependecies:
|
@echo Calculating dependecies:
|
||||||
@rm -f .depend
|
@rm -f .depend
|
||||||
@touch .depend
|
@touch .depend
|
||||||
@for i in $(sources); do \
|
@for i in $(sources); do \
|
||||||
o="`echo $$i | sed -e 's/\.c$$/.o/' -e 's/\.cpp$$/.o/'`" ; \
|
o="`echo $$i | sed -e 's/\.c$$/.o/' -e 's/\.cpp$$/.o/'`" ; \
|
||||||
echo ' ' $$i: $$o ; \
|
echo ' ' $$i: $$o ; \
|
||||||
$(CXX) $(DEPENDFLAGS) -MM -MT $$o $$i >> .depend ; \
|
$(CXX) $(DEPENDFLAGS) -MM -MT $$o $$i >> .depend ; \
|
||||||
done
|
done
|
||||||
|
|
||||||
install: $(targets_$(link):%=install_%) install_headers
|
install: $(targets_$(link):%=install_%) install_headers
|
||||||
|
|
||||||
install_headers:
|
install_headers:
|
||||||
$(INSTALL) $(INSTALL_DIR_OPTS) -d $(DESTDIR)$(includedir)
|
$(INSTALL) $(INSTALL_DIR_OPTS) -d $(DESTDIR)$(includedir)
|
||||||
for i in $(INCLUDE_DIR)/*.h; do \
|
for i in $(INCLUDE_DIR)/*.h; do \
|
||||||
$(INSTALL) $(INSTALL_OPTS) $$i $(DESTDIR)$(includedir) ; \
|
$(INSTALL) $(INSTALL_OPTS) $$i $(DESTDIR)$(includedir) ; \
|
||||||
done
|
done
|
||||||
$(INSTALL) $(INSTALL_DIR_OPTS) -d $(DESTDIR)$(includedir)/c
|
$(INSTALL) $(INSTALL_DIR_OPTS) -d $(DESTDIR)$(includedir)/c
|
||||||
for i in $(INCLUDE_DIR)/c/*.h; do \
|
for i in $(INCLUDE_DIR)/c/*.h; do \
|
||||||
$(INSTALL) $(INSTALL_OPTS) $$i $(DESTDIR)$(includedir)/c ; \
|
$(INSTALL) $(INSTALL_OPTS) $$i $(DESTDIR)$(includedir)/c ; \
|
||||||
done
|
done
|
||||||
|
|
||||||
install_staticlib: $(LIBRARY)
|
install_staticlib: $(LIBRARY)
|
||||||
$(INSTALL) $(INSTALL_DIR_OPTS) -d $(DESTDIR)$(libdir)
|
$(INSTALL) $(INSTALL_DIR_OPTS) -d $(DESTDIR)$(libdir)
|
||||||
$(INSTALL) $(INSTALL_OPTS_LIB) $(LIBRARY) $(DESTDIR)$(libdir)
|
$(INSTALL) $(INSTALL_OPTS_LIB) $(LIBRARY) $(DESTDIR)$(libdir)
|
||||||
|
|
||||||
install_sharedlib: $(LIBRARY_SO)
|
install_sharedlib: $(LIBRARY_SO)
|
||||||
$(INSTALL) $(INSTALL_DIR_OPTS) -d $(DESTDIR)$(libdir)
|
$(INSTALL) $(INSTALL_DIR_OPTS) -d $(DESTDIR)$(libdir)
|
||||||
$(INSTALL) $(INSTALL_OPTS_LIB) $(LIBRARY_SO_VER) $(DESTDIR)$(libdir)
|
$(INSTALL) $(INSTALL_OPTS_LIB) $(LIBRARY_SO_VER) $(DESTDIR)$(libdir)
|
||||||
ln -fs $(LIBRARY_SO_VER) $(DESTDIR)$(libdir)/$(LIBRARY_SO)
|
ln -fs $(LIBRARY_SO_VER) $(DESTDIR)$(libdir)/$(LIBRARY_SO)
|
||||||
|
|
||||||
|
|
||||||
ifneq ($(wildcard .depend),)
|
ifneq ($(wildcard .depend),)
|
||||||
include .depend
|
include .depend
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# DO NOT DELETE
|
# DO NOT DELETE
|
||||||
|
|
||||||
|
@ -1,57 +1,57 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
** libebml : parse EBML files, see http://embl.sourceforge.net/
|
** libebml : parse EBML files, see http://embl.sourceforge.net/
|
||||||
**
|
**
|
||||||
** <file/class description>
|
** <file/class description>
|
||||||
**
|
**
|
||||||
** Copyright (C) 2002-2010 Steve Lhomme. All rights reserved.
|
** Copyright (C) 2002-2010 Steve Lhomme. All rights reserved.
|
||||||
**
|
**
|
||||||
** This file is part of libebml.
|
** This file is part of libebml.
|
||||||
**
|
**
|
||||||
** This library is free software; you can redistribute it and/or
|
** This library is free software; you can redistribute it and/or
|
||||||
** modify it under the terms of the GNU Lesser General Public
|
** modify it under the terms of the GNU Lesser General Public
|
||||||
** License as published by the Free Software Foundation; either
|
** License as published by the Free Software Foundation; either
|
||||||
** version 2.1 of the License, or (at your option) any later version.
|
** 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,
|
** This library is distributed in the hope that it will be useful,
|
||||||
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
** Lesser General Public License for more details.
|
** Lesser General Public License for more details.
|
||||||
**
|
**
|
||||||
** You should have received a copy of the GNU Lesser General Public
|
** You should have received a copy of the GNU Lesser General Public
|
||||||
** License along with this library; if not, write to the Free Software
|
** License along with this library; if not, write to the Free Software
|
||||||
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
**
|
**
|
||||||
** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.
|
** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.
|
||||||
**
|
**
|
||||||
** Contact license@matroska.org if any conditions of this licensing are
|
** Contact license@matroska.org if any conditions of this licensing are
|
||||||
** not clear to you.
|
** not clear to you.
|
||||||
**
|
**
|
||||||
**********************************************************************/
|
**********************************************************************/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\file
|
\file
|
||||||
\version \$Id: EbmlContexts.cpp 639 2004-07-09 20:59:14Z mosu $
|
\version \$Id: EbmlContexts.cpp 639 2004-07-09 20:59:14Z mosu $
|
||||||
\author Steve Lhomme <robux4 @ users.sf.net>
|
\author Steve Lhomme <robux4 @ users.sf.net>
|
||||||
*/
|
*/
|
||||||
#include "ebml/EbmlContexts.h"
|
#include "ebml/EbmlContexts.h"
|
||||||
#include "ebml/EbmlCrc32.h"
|
#include "ebml/EbmlCrc32.h"
|
||||||
#include "ebml/EbmlVoid.h"
|
#include "ebml/EbmlVoid.h"
|
||||||
|
|
||||||
START_LIBEBML_NAMESPACE
|
START_LIBEBML_NAMESPACE
|
||||||
|
|
||||||
static const EbmlSemantic EbmlGlobal_ContextList[2] =
|
static const EbmlSemantic EbmlGlobal_ContextList[2] =
|
||||||
{
|
{
|
||||||
EbmlSemantic(false, false, EBML_INFO(EbmlCrc32)), ///< EbmlCrc32
|
EbmlSemantic(false, false, EBML_INFO(EbmlCrc32)), ///< EbmlCrc32
|
||||||
EbmlSemantic(false, false, EBML_INFO(EbmlVoid)), ///< EbmlVoid
|
EbmlSemantic(false, false, EBML_INFO(EbmlVoid)), ///< EbmlVoid
|
||||||
};
|
};
|
||||||
|
|
||||||
const EbmlSemanticContext Context_EbmlGlobal = EbmlSemanticContext(0, NULL, NULL, *GetEbmlGlobal_Context, NULL);
|
const EbmlSemanticContext Context_EbmlGlobal = EbmlSemanticContext(0, NULL, NULL, *GetEbmlGlobal_Context, NULL);
|
||||||
|
|
||||||
static const EbmlSemanticContext EbmlGlobal_Context = EbmlSemanticContext(countof(EbmlGlobal_ContextList), EbmlGlobal_ContextList, NULL, *GetEbmlGlobal_Context, NULL);
|
static const EbmlSemanticContext EbmlGlobal_Context = EbmlSemanticContext(countof(EbmlGlobal_ContextList), EbmlGlobal_ContextList, NULL, *GetEbmlGlobal_Context, NULL);
|
||||||
|
|
||||||
const EbmlSemanticContext & GetEbmlGlobal_Context()
|
const EbmlSemanticContext & GetEbmlGlobal_Context()
|
||||||
{
|
{
|
||||||
return EbmlGlobal_Context;
|
return EbmlGlobal_Context;
|
||||||
}
|
}
|
||||||
|
|
||||||
END_LIBEBML_NAMESPACE
|
END_LIBEBML_NAMESPACE
|
||||||
|
116
src/EbmlHead.cpp
116
src/EbmlHead.cpp
@ -1,58 +1,58 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
** libebml : parse EBML files, see http://embl.sourceforge.net/
|
** libebml : parse EBML files, see http://embl.sourceforge.net/
|
||||||
**
|
**
|
||||||
** <file/class description>
|
** <file/class description>
|
||||||
**
|
**
|
||||||
** Copyright (C) 2002-2010 Steve Lhomme. All rights reserved.
|
** Copyright (C) 2002-2010 Steve Lhomme. All rights reserved.
|
||||||
**
|
**
|
||||||
** This file is part of libebml.
|
** This file is part of libebml.
|
||||||
**
|
**
|
||||||
** This library is free software; you can redistribute it and/or
|
** This library is free software; you can redistribute it and/or
|
||||||
** modify it under the terms of the GNU Lesser General Public
|
** modify it under the terms of the GNU Lesser General Public
|
||||||
** License as published by the Free Software Foundation; either
|
** License as published by the Free Software Foundation; either
|
||||||
** version 2.1 of the License, or (at your option) any later version.
|
** 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,
|
** This library is distributed in the hope that it will be useful,
|
||||||
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
** Lesser General Public License for more details.
|
** Lesser General Public License for more details.
|
||||||
**
|
**
|
||||||
** You should have received a copy of the GNU Lesser General Public
|
** You should have received a copy of the GNU Lesser General Public
|
||||||
** License along with this library; if not, write to the Free Software
|
** License along with this library; if not, write to the Free Software
|
||||||
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
**
|
**
|
||||||
** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.
|
** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.
|
||||||
**
|
**
|
||||||
** Contact license@matroska.org if any conditions of this licensing are
|
** Contact license@matroska.org if any conditions of this licensing are
|
||||||
** not clear to you.
|
** not clear to you.
|
||||||
**
|
**
|
||||||
**********************************************************************/
|
**********************************************************************/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\file
|
\file
|
||||||
\version \$Id: EbmlHead.cpp 1096 2005-03-17 09:14:52Z robux4 $
|
\version \$Id: EbmlHead.cpp 1096 2005-03-17 09:14:52Z robux4 $
|
||||||
\author Steve Lhomme <robux4 @ users.sf.net>
|
\author Steve Lhomme <robux4 @ users.sf.net>
|
||||||
*/
|
*/
|
||||||
#include "ebml/EbmlHead.h"
|
#include "ebml/EbmlHead.h"
|
||||||
#include "ebml/EbmlSubHead.h"
|
#include "ebml/EbmlSubHead.h"
|
||||||
#include "ebml/EbmlContexts.h"
|
#include "ebml/EbmlContexts.h"
|
||||||
|
|
||||||
START_LIBEBML_NAMESPACE
|
START_LIBEBML_NAMESPACE
|
||||||
|
|
||||||
DEFINE_START_SEMANTIC(EbmlHead)
|
DEFINE_START_SEMANTIC(EbmlHead)
|
||||||
DEFINE_SEMANTIC_ITEM(true, true, EVersion) ///< EBMLVersion
|
DEFINE_SEMANTIC_ITEM(true, true, EVersion) ///< EBMLVersion
|
||||||
DEFINE_SEMANTIC_ITEM(true, true, EReadVersion) ///< EBMLReadVersion
|
DEFINE_SEMANTIC_ITEM(true, true, EReadVersion) ///< EBMLReadVersion
|
||||||
DEFINE_SEMANTIC_ITEM(true, true, EMaxIdLength) ///< EBMLMaxIdLength
|
DEFINE_SEMANTIC_ITEM(true, true, EMaxIdLength) ///< EBMLMaxIdLength
|
||||||
DEFINE_SEMANTIC_ITEM(true, true, EMaxSizeLength) ///< EBMLMaxSizeLength
|
DEFINE_SEMANTIC_ITEM(true, true, EMaxSizeLength) ///< EBMLMaxSizeLength
|
||||||
DEFINE_SEMANTIC_ITEM(true, true, EDocType) ///< DocType
|
DEFINE_SEMANTIC_ITEM(true, true, EDocType) ///< DocType
|
||||||
DEFINE_SEMANTIC_ITEM(true, true, EDocTypeVersion) ///< DocTypeVersion
|
DEFINE_SEMANTIC_ITEM(true, true, EDocTypeVersion) ///< DocTypeVersion
|
||||||
DEFINE_SEMANTIC_ITEM(true, true, EDocTypeReadVersion) ///< DocTypeReadVersion
|
DEFINE_SEMANTIC_ITEM(true, true, EDocTypeReadVersion) ///< DocTypeReadVersion
|
||||||
DEFINE_END_SEMANTIC(EbmlHead)
|
DEFINE_END_SEMANTIC(EbmlHead)
|
||||||
|
|
||||||
DEFINE_EBML_MASTER_ORPHAN(EbmlHead, 0x1A45DFA3, 4, "EBMLHead\0ratamapaga");
|
DEFINE_EBML_MASTER_ORPHAN(EbmlHead, 0x1A45DFA3, 4, "EBMLHead\0ratamapaga");
|
||||||
|
|
||||||
EbmlHead::EbmlHead()
|
EbmlHead::EbmlHead()
|
||||||
:EbmlMaster(EbmlHead_Context)
|
:EbmlMaster(EbmlHead_Context)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
END_LIBEBML_NAMESPACE
|
END_LIBEBML_NAMESPACE
|
||||||
|
@ -1,49 +1,49 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
** libebml : parse EBML files, see http://embl.sourceforge.net/
|
** libebml : parse EBML files, see http://embl.sourceforge.net/
|
||||||
**
|
**
|
||||||
** <file/class description>
|
** <file/class description>
|
||||||
**
|
**
|
||||||
** Copyright (C) 2002-2010 Steve Lhomme. All rights reserved.
|
** Copyright (C) 2002-2010 Steve Lhomme. All rights reserved.
|
||||||
**
|
**
|
||||||
** This file is part of libebml.
|
** This file is part of libebml.
|
||||||
**
|
**
|
||||||
** This library is free software; you can redistribute it and/or
|
** This library is free software; you can redistribute it and/or
|
||||||
** modify it under the terms of the GNU Lesser General Public
|
** modify it under the terms of the GNU Lesser General Public
|
||||||
** License as published by the Free Software Foundation; either
|
** License as published by the Free Software Foundation; either
|
||||||
** version 2.1 of the License, or (at your option) any later version.
|
** 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,
|
** This library is distributed in the hope that it will be useful,
|
||||||
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
** Lesser General Public License for more details.
|
** Lesser General Public License for more details.
|
||||||
**
|
**
|
||||||
** You should have received a copy of the GNU Lesser General Public
|
** You should have received a copy of the GNU Lesser General Public
|
||||||
** License along with this library; if not, write to the Free Software
|
** License along with this library; if not, write to the Free Software
|
||||||
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
**
|
**
|
||||||
** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.
|
** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.
|
||||||
**
|
**
|
||||||
** Contact license@matroska.org if any conditions of this licensing are
|
** Contact license@matroska.org if any conditions of this licensing are
|
||||||
** not clear to you.
|
** not clear to you.
|
||||||
**
|
**
|
||||||
**********************************************************************/
|
**********************************************************************/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\file
|
\file
|
||||||
\version \$Id: EbmlSubHead.cpp 639 2004-07-09 20:59:14Z mosu $
|
\version \$Id: EbmlSubHead.cpp 639 2004-07-09 20:59:14Z mosu $
|
||||||
\author Steve Lhomme <robux4 @ users.sf.net>
|
\author Steve Lhomme <robux4 @ users.sf.net>
|
||||||
*/
|
*/
|
||||||
#include "ebml/EbmlSubHead.h"
|
#include "ebml/EbmlSubHead.h"
|
||||||
#include "ebml/EbmlContexts.h"
|
#include "ebml/EbmlContexts.h"
|
||||||
|
|
||||||
START_LIBEBML_NAMESPACE
|
START_LIBEBML_NAMESPACE
|
||||||
|
|
||||||
DEFINE_EBML_UINTEGER_DEF(EVersion, 0x4286, 2, EbmlHead, "EBMLVersion", 1);
|
DEFINE_EBML_UINTEGER_DEF(EVersion, 0x4286, 2, EbmlHead, "EBMLVersion", 1);
|
||||||
DEFINE_EBML_UINTEGER_DEF(EReadVersion, 0x42F7, 2, EbmlHead, "EBMLReadVersion", 1);
|
DEFINE_EBML_UINTEGER_DEF(EReadVersion, 0x42F7, 2, EbmlHead, "EBMLReadVersion", 1);
|
||||||
DEFINE_EBML_UINTEGER_DEF(EMaxIdLength, 0x42F2, 2, EbmlHead, "EBMLMaxIdLength", 4);
|
DEFINE_EBML_UINTEGER_DEF(EMaxIdLength, 0x42F2, 2, EbmlHead, "EBMLMaxIdLength", 4);
|
||||||
DEFINE_EBML_UINTEGER_DEF(EMaxSizeLength, 0x42F3, 2, EbmlHead, "EBMLMaxSizeLength", 8);
|
DEFINE_EBML_UINTEGER_DEF(EMaxSizeLength, 0x42F3, 2, EbmlHead, "EBMLMaxSizeLength", 8);
|
||||||
DEFINE_EBML_STRING_DEF (EDocType, 0x4282, 2, EbmlHead, "EBMLDocType", "matroska");
|
DEFINE_EBML_STRING_DEF (EDocType, 0x4282, 2, EbmlHead, "EBMLDocType", "matroska");
|
||||||
DEFINE_EBML_UINTEGER_DEF(EDocTypeVersion, 0x4287, 2, EbmlHead, "EBMLDocTypeVersion", 1);
|
DEFINE_EBML_UINTEGER_DEF(EDocTypeVersion, 0x4287, 2, EbmlHead, "EBMLDocTypeVersion", 1);
|
||||||
DEFINE_EBML_UINTEGER_DEF(EDocTypeReadVersion, 0x4285, 2, EbmlHead, "EBMLDocTypeReadVersion", 1);
|
DEFINE_EBML_UINTEGER_DEF(EDocTypeReadVersion, 0x4285, 2, EbmlHead, "EBMLDocTypeReadVersion", 1);
|
||||||
|
|
||||||
END_LIBEBML_NAMESPACE
|
END_LIBEBML_NAMESPACE
|
||||||
|
Loading…
Reference in New Issue
Block a user