Commit Graph

198 Commits

Author SHA1 Message Date
Steve Lhomme
2b635aa5ac EBML_CLASS_CONTEXT() is a contraction of EBML_INFO_CONTEXT(EBML_INFO())
git-svn-id: https://matroska.svn.sourceforge.net/svnroot/matroska/trunk/libebml@84 a6f86f6d-0131-4f8e-9e7b-e335508773d5
2010-04-07 16:02:07 +00:00
Steve Lhomme
4d9242a8e6 replace DEFINE_MKX_MASTER_NOBODY() with DEFINE_MKX_MASTER_CONS() for better consistency
git-svn-id: https://matroska.svn.sourceforge.net/svnroot/matroska/trunk/libebml@83 a6f86f6d-0131-4f8e-9e7b-e335508773d5
2010-04-07 15:59:32 +00:00
Steve Lhomme
e4aa562e22 mark ValidateSize() as virtual (as a reminder)
git-svn-id: https://matroska.svn.sourceforge.net/svnroot/matroska/trunk/libebml@82 a6f86f6d-0131-4f8e-9e7b-e335508773d5
2010-04-07 09:43:00 +00:00
Steve Lhomme
350e192617 by default the any size is OK for Binary elements
git-svn-id: https://matroska.svn.sourceforge.net/svnroot/matroska/trunk/libebml@81 a6f86f6d-0131-4f8e-9e7b-e335508773d5
2010-04-07 09:41:09 +00:00
Steve Lhomme
07d6f46f78 move the default values in the .cpp files via the new declaration macros
git-svn-id: https://matroska.svn.sourceforge.net/svnroot/matroska/trunk/libebml@77 a6f86f6d-0131-4f8e-9e7b-e335508773d5
2010-04-06 17:20:14 +00:00
Steve Lhomme
2f079f185e more macro to simplify the class declaration
put the default value constructor in the C++ files

git-svn-id: https://matroska.svn.sourceforge.net/svnroot/matroska/trunk/libebml@76 a6f86f6d-0131-4f8e-9e7b-e335508773d5
2010-04-06 17:16:54 +00:00
Steve Lhomme
7b4779fe5f fix compilation when EBML_STRICT_API is not defined
git-svn-id: https://matroska.svn.sourceforge.net/svnroot/matroska/trunk/libebml@74 a6f86f6d-0131-4f8e-9e7b-e335508773d5
2010-04-06 07:21:44 +00:00
Steve Lhomme
2161be7870 clean the EBML context creation macro
git-svn-id: https://matroska.svn.sourceforge.net/svnroot/matroska/trunk/libebml@69 a6f86f6d-0131-4f8e-9e7b-e335508773d5
2010-04-05 15:52:08 +00:00
Steve Lhomme
071c70631d more options for the EBML master definitions
git-svn-id: https://matroska.svn.sourceforge.net/svnroot/matroska/trunk/libebml@67 a6f86f6d-0131-4f8e-9e7b-e335508773d5
2010-04-03 06:14:04 +00:00
Steve Lhomme
91b9d8cc7e libebml: add macros to simplify the EBML class item definitions (ID, ClassInfo, SemanticContext)
git-svn-id: https://matroska.svn.sourceforge.net/svnroot/matroska/trunk/libebml@66 a6f86f6d-0131-4f8e-9e7b-e335508773d5
2010-04-03 06:13:02 +00:00
Moritz Bunkus
0b3faddd90 Don't hide virtual members of the base class
'SetDefaultSize(int)' in the derived class hides 'virtual
SetDefault(uint64)' in the base class: The name matches but the
signature is different, and the 'virtual' keyword is missing.


git-svn-id: https://matroska.svn.sourceforge.net/svnroot/matroska/trunk/libebml@63 a6f86f6d-0131-4f8e-9e7b-e335508773d5
2010-03-28 00:06:39 +00:00
Moritz Bunkus
d7b335f0a8 Properly compare elements
If you have "virtual operator <" in a base class and a derived
class and each takes a reference of its own class as an arugment
then the function in the derived class hides the one in the base
class and does not override is as the signatures do not match:

class base {
public:
  bool virtual operator <(const base &cmp);
};
class derived: public base {
public:
  bool virtual operator <(const derived &cmp);
};

If two instances of base are compared then base::operator< is called:

base *p1, *p2;
if (*p1 < *p2) // calls base::operator<


git-svn-id: https://matroska.svn.sourceforge.net/svnroot/matroska/trunk/libebml@61 a6f86f6d-0131-4f8e-9e7b-e335508773d5
2010-03-27 23:07:20 +00:00
Moritz Bunkus
1de5badd44 Made changing the tool paths easier. Do not refuse to build with a mingw compiler.
git-svn-id: https://matroska.svn.sourceforge.net/svnroot/matroska/trunk/libebml@56 a6f86f6d-0131-4f8e-9e7b-e335508773d5
2010-03-23 15:55:17 +00:00
Moritz Bunkus
35942a7134 Make the ranlib and ar executables configurable. Support for setting the cross-compilation tool names easily.
git-svn-id: https://matroska.svn.sourceforge.net/svnroot/matroska/trunk/libebml@53 a6f86f6d-0131-4f8e-9e7b-e335508773d5
2010-03-23 15:08:11 +00:00
Moritz Bunkus
a65901063d Fix Endianess detection on Linux.
Some platforms like MIPS can come either in little or
in big endian. Therefore a static decision based on the
system used is invalid. The header file endian.h should
be used for systems on which it is available. At the moment
this is at least Linux.

Patch by Frank Neufingerl <fneufingerl@psi.de>

git-svn-id: https://matroska.svn.sourceforge.net/svnroot/matroska/trunk/libebml@51 a6f86f6d-0131-4f8e-9e7b-e335508773d5
2010-03-23 13:35:44 +00:00
Moritz Bunkus
22a45d1ac3 EbmlDummy elements do not have or need a Create method.
git-svn-id: https://matroska.svn.sourceforge.net/svnroot/matroska/trunk/libebml@50 a6f86f6d-0131-4f8e-9e7b-e335508773d5
2010-03-23 13:13:53 +00:00
Moritz Bunkus
b1d8a72e40 Include the cassert header if the asser() function is used
git-svn-id: https://matroska.svn.sourceforge.net/svnroot/matroska/trunk/libebml@49 a6f86f6d-0131-4f8e-9e7b-e335508773d5
2010-03-23 12:41:23 +00:00
Moritz Bunkus
63bd8b00e4 OpenSolaris knows (u)int64_t nowadays.
Also the standard int64_t type is typedefed as
"long int" with OpenSolaris 64bit gcc making it
incompatible with a "long long int" typedefed
int64.

git-svn-id: https://matroska.svn.sourceforge.net/svnroot/matroska/trunk/libebml@48 a6f86f6d-0131-4f8e-9e7b-e335508773d5
2010-03-23 11:58:36 +00:00
Moritz Bunkus
175a40e9c3 Always include inttypes.h on Linux-like systems
inttypes.h has been standard for a long time.
Also EbmlCrc32.h needs the uintptr_t type
which is declared in inttypes.h.

git-svn-id: https://matroska.svn.sourceforge.net/svnroot/matroska/trunk/libebml@47 a6f86f6d-0131-4f8e-9e7b-e335508773d5
2010-03-23 11:57:00 +00:00
Moritz Bunkus
b8187152d2 Fix member initialization order
git-svn-id: https://matroska.svn.sourceforge.net/svnroot/matroska/trunk/libebml@46 a6f86f6d-0131-4f8e-9e7b-e335508773d5
2010-03-23 11:53:34 +00:00
Steve Lhomme
3171db6ec6 introduce filepos_t for all the file position values (depends wether the system can handle 32 bits or 64 bits offsets)
git-svn-id: https://matroska.svn.sourceforge.net/svnroot/matroska/trunk/libebml@44 a6f86f6d-0131-4f8e-9e7b-e335508773d5
2010-03-19 15:35:26 +00:00
Steve Lhomme
bbe172eb50 no need to copy the string before copying it again
git-svn-id: https://matroska.svn.sourceforge.net/svnroot/matroska/trunk/libebml@41 a6f86f6d-0131-4f8e-9e7b-e335508773d5
2010-03-19 15:29:02 +00:00
Steve Lhomme
52c36a7d3f use a macro for the EbmlMaster iterator as it may differ between versions of libebml
git-svn-id: https://matroska.svn.sourceforge.net/svnroot/matroska/trunk/libebml@39 a6f86f6d-0131-4f8e-9e7b-e335508773d5
2010-03-18 17:08:57 +00:00
Steve Lhomme
55ac9a0532 add a EBML_SEM_CREATE() macro for older code using GetCallback directly
git-svn-id: https://matroska.svn.sourceforge.net/svnroot/matroska/trunk/libebml@33 a6f86f6d-0131-4f8e-9e7b-e335508773d5
2010-03-18 10:45:44 +00:00
Steve Lhomme
ff7409f9d5 cleaning
git-svn-id: https://matroska.svn.sourceforge.net/svnroot/matroska/trunk/libebml@32 a6f86f6d-0131-4f8e-9e7b-e335508773d5
2010-03-17 18:35:03 +00:00
Steve Lhomme
42f3a6229a the internal GetData() is the same as GetBuffer()
git-svn-id: https://matroska.svn.sourceforge.net/svnroot/matroska/trunk/libebml@31 a6f86f6d-0131-4f8e-9e7b-e335508773d5
2010-03-17 18:34:22 +00:00
Steve Lhomme
baa61c54cb factorize some common macros
git-svn-id: https://matroska.svn.sourceforge.net/svnroot/matroska/trunk/libebml@26 a6f86f6d-0131-4f8e-9e7b-e335508773d5
2010-03-17 10:30:26 +00:00
Steve Lhomme
cd5d717fb9 move some of the <cassert> includes and assert() calls out of the include files
+ the DefaultValue() methods return const objects

git-svn-id: https://matroska.svn.sourceforge.net/svnroot/matroska/trunk/libebml@25 a6f86f6d-0131-4f8e-9e7b-e335508773d5
2010-03-17 10:29:32 +00:00
Steve Lhomme
8b4a54c88f if USE_EBML_STRICT_API is defined in the project EBML_STRICT_API is defined internally and externally
git-svn-id: https://matroska.svn.sourceforge.net/svnroot/matroska/trunk/libebml@24 a6f86f6d-0131-4f8e-9e7b-e335508773d5
2010-03-17 10:27:15 +00:00
Steve Lhomme
71367a12c9 new macros to hide the internal variables of the context classes
git-svn-id: https://matroska.svn.sourceforge.net/svnroot/matroska/trunk/libebml@23 a6f86f6d-0131-4f8e-9e7b-e335508773d5
2010-03-17 10:26:39 +00:00
Steve Lhomme
d9dd385f9f macro moving
git-svn-id: https://matroska.svn.sourceforge.net/svnroot/matroska/trunk/libebml@22 a6f86f6d-0131-4f8e-9e7b-e335508773d5
2010-03-17 10:25:15 +00:00
Steve Lhomme
1b66de687a fix a recursive call issue
git-svn-id: https://matroska.svn.sourceforge.net/svnroot/matroska/trunk/libebml@21 a6f86f6d-0131-4f8e-9e7b-e335508773d5
2010-03-17 10:24:35 +00:00
Steve Lhomme
66f1b56fba disable access to internal values when EBML_STRICT_API is defined
git-svn-id: https://matroska.svn.sourceforge.net/svnroot/matroska/trunk/libebml@20 a6f86f6d-0131-4f8e-9e7b-e335508773d5
2010-03-15 16:21:50 +00:00
Steve Lhomme
c331b9b443 use the new CreateElement() virtual method instead than doing it through the Generic() call
git-svn-id: https://matroska.svn.sourceforge.net/svnroot/matroska/trunk/libebml@19 a6f86f6d-0131-4f8e-9e7b-e335508773d5
2010-03-15 16:20:08 +00:00
Steve Lhomme
995bc139c4 update the copyright notice to 2010
git-svn-id: https://matroska.svn.sourceforge.net/svnroot/matroska/trunk/libebml@18 a6f86f6d-0131-4f8e-9e7b-e335508773d5
2010-03-15 16:19:18 +00:00
Steve Lhomme
4bea9a04da fix a double implementation
git-svn-id: https://matroska.svn.sourceforge.net/svnroot/matroska/trunk/libebml@17 a6f86f6d-0131-4f8e-9e7b-e335508773d5
2010-03-15 16:12:06 +00:00
Steve Lhomme
89abd52a34 add a macro to define all the pure virtual methods in a "concrete" EBML class (that correspond to an item in EBML streams)
git-svn-id: https://matroska.svn.sourceforge.net/svnroot/matroska/trunk/libebml@16 a6f86f6d-0131-4f8e-9e7b-e335508773d5
2010-03-15 16:11:24 +00:00
Steve Lhomme
de3185abde add macros to access the EbmlId internal variables
git-svn-id: https://matroska.svn.sourceforge.net/svnroot/matroska/trunk/libebml@15 a6f86f6d-0131-4f8e-9e7b-e335508773d5
2010-03-15 16:08:31 +00:00
Steve Lhomme
cd378f23ff add some macros to access the EBML ID/Context and use them
git-svn-id: https://matroska.svn.sourceforge.net/svnroot/matroska/trunk/libebml@14 a6f86f6d-0131-4f8e-9e7b-e335508773d5
2010-03-15 16:07:14 +00:00
Steve Lhomme
9122d30f15 use the new accessors internally
+ make the new accessors inline

git-svn-id: https://matroska.svn.sourceforge.net/svnroot/matroska/trunk/libebml@13 a6f86f6d-0131-4f8e-9e7b-e335508773d5
2010-03-15 16:03:51 +00:00
Steve Lhomme
289a1c2e86 the EbmlBinary GetSize() is the same as the parent class (EbmlElement) one
+ add an internal Accessor API

git-svn-id: https://matroska.svn.sourceforge.net/svnroot/matroska/trunk/libebml@12 a6f86f6d-0131-4f8e-9e7b-e335508773d5
2010-03-15 16:00:29 +00:00
Steve Lhomme
eea805cb01 add accessor APIs
git-svn-id: https://matroska.svn.sourceforge.net/svnroot/matroska/trunk/libebml@11 a6f86f6d-0131-4f8e-9e7b-e335508773d5
2010-03-15 15:59:48 +00:00
Steve Lhomme
eeb3b1d104 more moving and cleaning
git-svn-id: https://matroska.svn.sourceforge.net/svnroot/matroska/trunk/libebml@10 a6f86f6d-0131-4f8e-9e7b-e335508773d5
2010-03-15 15:58:55 +00:00
Steve Lhomme
377e111038 reordering and misc cleaning
git-svn-id: https://matroska.svn.sourceforge.net/svnroot/matroska/trunk/libebml@9 a6f86f6d-0131-4f8e-9e7b-e335508773d5
2010-03-15 15:58:12 +00:00
Steve Lhomme
02bd471dcf cast to EbmlId instead of accessing Generic() GlobalId directly
git-svn-id: https://matroska.svn.sourceforge.net/svnroot/matroska/trunk/libebml@8 a6f86f6d-0131-4f8e-9e7b-e335508773d5
2010-03-15 15:57:04 +00:00
Steve Lhomme
56aecb45f7 integer and boolean variables don't need a const when used as parameters
git-svn-id: https://matroska.svn.sourceforge.net/svnroot/matroska/trunk/libebml@6 a6f86f6d-0131-4f8e-9e7b-e335508773d5
2010-03-15 15:55:14 +00:00
Steve Lhomme
05037aebad fix the coremake project for inclusion in other projects
use HAVE_EBML2 in the config.h file to use libebml2 instead of libebml

git-svn-id: https://matroska.svn.sourceforge.net/svnroot/matroska/trunk/libebml@5 a6f86f6d-0131-4f8e-9e7b-e335508773d5
2010-03-15 15:53:28 +00:00
Steve Lhomme
0a891b23be move the sources from the dead coreforge server
git-svn-id: https://matroska.svn.sourceforge.net/svnroot/matroska/trunk/libebml@1 a6f86f6d-0131-4f8e-9e7b-e335508773d5
2010-02-18 08:13:06 +00:00