From: Steve Lhomme Date: Thu, 25 Mar 2010 15:54:09 +0000 (+0000) Subject: add matroska_init() and matroska_done() functions, do nothing with libebml1 but call... X-Git-Tag: release-0.9.0~36 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=300fb5b4b724da1b5f6dfcd6dda940a7627ca8a9;p=libmatroska add matroska_init() and matroska_done() functions, do nothing with libebml1 but call the right init functions for libebml2 git-svn-id: https://matroska.svn.sourceforge.net/svnroot/matroska/trunk/libmatroska@58 a6f86f6d-0131-4f8e-9e7b-e335508773d5 --- diff --git a/matroska/FileKax.h b/matroska/FileKax.h index 9c15430..3aa8ea8 100644 --- a/matroska/FileKax.h +++ b/matroska/FileKax.h @@ -149,4 +149,15 @@ class MATROSKA_DLL_API FileMatroska { END_LIBMATROSKA_NAMESPACE +#ifdef __cplusplus +extern "C" { +#endif + +MATROSKA_DLL_API void matroska_init(); +MATROSKA_DLL_API void matroska_done(); + +#ifdef __cplusplus +} +#endif + #endif // FILE_KAX_HPP diff --git a/src/FileKax.cpp b/src/FileKax.cpp index c366288..a1b907e 100644 --- a/src/FileKax.cpp +++ b/src/FileKax.cpp @@ -34,6 +34,8 @@ */ //#include "StdInclude.h" #include "matroska/FileKax.h" +#include "ebml/EbmlVersion.h" +#include "ebml/EbmlContexts.h" //#include "Cluster.h" //#include "Track.h" //#include "Block.h" @@ -447,3 +449,17 @@ bool FileMatroska::ReadFrame(Track * & aTrack, uint32 & aTimecode, const binary #endif // OLD END_LIBMATROSKA_NAMESPACE + +void matroska_init() +{ +#if LIBEBML_VERSION >= 0x010000 + ebml_init(); +#endif +} + +void matroska_done() +{ +#if LIBEBML_VERSION >= 0x010000 + ebml_done(); +#endif +}