michael@0: diff --git a/EbmlBufferWriter.h b/EbmlBufferWriter.h michael@0: index c135f29..d5116ce 100644 michael@0: --- a/EbmlBufferWriter.h michael@0: +++ b/EbmlBufferWriter.h michael@0: @@ -11,6 +11,9 @@ typedef struct { michael@0: unsigned int offset; michael@0: } EbmlGlobal; michael@0: michael@0: +void Ebml_Write(EbmlGlobal *glob, const void *buffer_in, unsigned long len); michael@0: +void Ebml_Serialize(EbmlGlobal *glob, const void *buffer_in, michael@0: + int buffer_size, unsigned long len); michael@0: void Ebml_StartSubElement(EbmlGlobal *glob, EbmlLoc *ebmlLoc, unsigned long class_id); michael@0: void Ebml_EndSubElement(EbmlGlobal *glob, EbmlLoc *ebmlLoc); michael@0: michael@0: diff --git a/EbmlIDs.h b/EbmlIDs.h michael@0: index 44d4385..3b5da19 100644 michael@0: --- a/EbmlIDs.h michael@0: +++ b/EbmlIDs.h michael@0: @@ -119,7 +119,7 @@ enum mkv { michael@0: /* video */ michael@0: Video = 0xE0, michael@0: FlagInterlaced = 0x9A, michael@0: - StereoMode = 0x53B8, michael@0: + WEBM_StereoMode = 0x53B8, michael@0: AlphaMode = 0x53C0, michael@0: PixelWidth = 0xB0, michael@0: PixelHeight = 0xBA, michael@0: diff --git a/EbmlWriter.c b/EbmlWriter.c michael@0: index ebefc1a..087e817 100644 michael@0: --- a/EbmlWriter.c michael@0: +++ b/EbmlWriter.c michael@0: @@ -12,6 +12,7 @@ michael@0: #include michael@0: #include michael@0: #include michael@0: +#include "EbmlBufferWriter.h" michael@0: #if defined(_MSC_VER) michael@0: #define LITERALU64(n) n michael@0: #else michael@0: diff --git a/EbmlWriter.h b/EbmlWriter.h michael@0: index a0a848b..3aee2b3 100644 michael@0: --- a/EbmlWriter.h michael@0: +++ b/EbmlWriter.h michael@0: @@ -7,10 +7,16 @@ michael@0: * in the file PATENTS. All contributing project authors may michael@0: * be found in the AUTHORS file in the root of the source tree. michael@0: */ michael@0: + michael@0: +#ifdef __cplusplus michael@0: +extern "C" { michael@0: +#endif michael@0: + michael@0: #ifndef EBMLWRITER_HPP michael@0: #define EBMLWRITER_HPP michael@0: #include michael@0: #include "vpx/vpx_integer.h" michael@0: +#include "EbmlBufferWriter.h" michael@0: michael@0: /* note: you must define write and serialize functions as well as your own michael@0: * EBML_GLOBAL michael@0: @@ -18,9 +24,9 @@ michael@0: * These functions MUST be implemented michael@0: */ michael@0: michael@0: -typedef struct EbmlGlobal EbmlGlobal; michael@0: -void Ebml_Serialize(EbmlGlobal *glob, const void *, int, unsigned long); michael@0: -void Ebml_Write(EbmlGlobal *glob, const void *, unsigned long); michael@0: +// typedef struct EbmlGlobal EbmlGlobal; michael@0: +// void Ebml_Serialize(EbmlGlobal *glob, const void *, int, unsigned long); michael@0: +// void Ebml_Write(EbmlGlobal *glob, const void *, unsigned long); michael@0: michael@0: /*****/ michael@0: michael@0: @@ -41,3 +47,7 @@ void Ebml_SerializeData(EbmlGlobal *glob, unsigned long class_id, unsigned char michael@0: void Ebml_WriteVoid(EbmlGlobal *glob, unsigned long vSize); michael@0: /* TODO need date function */ michael@0: #endif michael@0: + michael@0: +#ifdef __cplusplus michael@0: +} michael@0: +#endif michael@0: diff --git a/WebMElement.c b/WebMElement.c michael@0: index 02eefa4..0d5056d 100644 michael@0: --- a/WebMElement.c michael@0: +++ b/WebMElement.c michael@0: @@ -6,8 +6,6 @@ michael@0: // in the file PATENTS. All contributing project authors may michael@0: // be found in the AUTHORS file in the root of the source tree. michael@0: michael@0: - michael@0: -#include "EbmlBufferWriter.h" michael@0: #include "EbmlIDs.h" michael@0: #include "WebMElement.h" michael@0: #include michael@0: diff --git a/WebMElement.h b/WebMElement.h michael@0: index d9ad0a0..987582a 100644 michael@0: --- a/WebMElement.h michael@0: +++ b/WebMElement.h michael@0: @@ -6,10 +6,15 @@ michael@0: // in the file PATENTS. All contributing project authors may michael@0: // be found in the AUTHORS file in the root of the source tree. michael@0: michael@0: +#ifdef __cplusplus michael@0: +extern "C" { michael@0: +#endif michael@0: michael@0: #ifndef MKV_CONTEXT_HPP michael@0: #define MKV_CONTEXT_HPP 1 michael@0: michael@0: +#include "EbmlWriter.h" michael@0: + michael@0: void writeSimpleBock(EbmlGlobal *ebml, unsigned char trackNumber, unsigned short timeCode, michael@0: int isKeyframe, unsigned char lacingFlag, int discardable, michael@0: unsigned char *data, unsigned long dataLength); michael@0: @@ -24,12 +29,14 @@ void writeVideoTrack(EbmlGlobal *ebml, unsigned int trackNumber, int flagLacing, michael@0: double frameRate); michael@0: void writeAudioTrack(EbmlGlobal *glob, unsigned int trackNumber, int flagLacing, michael@0: char *codecId, double samplingFrequency, unsigned int channels, michael@0: - unsigned char *private, unsigned long privateSize); michael@0: + unsigned char *private_, unsigned long privateSize); michael@0: michael@0: void writeSimpleBlock(EbmlGlobal *ebml, unsigned char trackNumber, short timeCode, michael@0: int isKeyframe, unsigned char lacingFlag, int discardable, michael@0: unsigned char *data, unsigned long dataLength); michael@0: michael@0: +#endif michael@0: michael@0: - michael@0: -#endif michael@0: \ No newline at end of file michael@0: +#ifdef __cplusplus michael@0: +} michael@0: +#endif