gecko_fix.patch (4121B)
1 diff --git a/EbmlBufferWriter.h b/EbmlBufferWriter.h 2 index c135f29..d5116ce 100644 3 --- a/EbmlBufferWriter.h 4 +++ b/EbmlBufferWriter.h 5 @@ -11,6 +11,9 @@ typedef struct { 6 unsigned int offset; 7 } EbmlGlobal; 8 9 +void Ebml_Write(EbmlGlobal *glob, const void *buffer_in, unsigned long len); 10 +void Ebml_Serialize(EbmlGlobal *glob, const void *buffer_in, 11 + int buffer_size, unsigned long len); 12 void Ebml_StartSubElement(EbmlGlobal *glob, EbmlLoc *ebmlLoc, unsigned long class_id); 13 void Ebml_EndSubElement(EbmlGlobal *glob, EbmlLoc *ebmlLoc); 14 15 diff --git a/EbmlIDs.h b/EbmlIDs.h 16 index 44d4385..3b5da19 100644 17 --- a/EbmlIDs.h 18 +++ b/EbmlIDs.h 19 @@ -119,7 +119,7 @@ enum mkv { 20 /* video */ 21 Video = 0xE0, 22 FlagInterlaced = 0x9A, 23 - StereoMode = 0x53B8, 24 + WEBM_StereoMode = 0x53B8, 25 AlphaMode = 0x53C0, 26 PixelWidth = 0xB0, 27 PixelHeight = 0xBA, 28 diff --git a/EbmlWriter.c b/EbmlWriter.c 29 index ebefc1a..087e817 100644 30 --- a/EbmlWriter.c 31 +++ b/EbmlWriter.c 32 @@ -12,6 +12,7 @@ 33 #include <wchar.h> 34 #include <string.h> 35 #include <limits.h> 36 +#include "EbmlBufferWriter.h" 37 #if defined(_MSC_VER) 38 #define LITERALU64(n) n 39 #else 40 diff --git a/EbmlWriter.h b/EbmlWriter.h 41 index a0a848b..3aee2b3 100644 42 --- a/EbmlWriter.h 43 +++ b/EbmlWriter.h 44 @@ -7,10 +7,16 @@ 45 * in the file PATENTS. All contributing project authors may 46 * be found in the AUTHORS file in the root of the source tree. 47 */ 48 + 49 +#ifdef __cplusplus 50 +extern "C" { 51 +#endif 52 + 53 #ifndef EBMLWRITER_HPP 54 #define EBMLWRITER_HPP 55 #include <stddef.h> 56 #include "vpx/vpx_integer.h" 57 +#include "EbmlBufferWriter.h" 58 59 /* note: you must define write and serialize functions as well as your own 60 * EBML_GLOBAL 61 @@ -18,9 +24,9 @@ 62 * These functions MUST be implemented 63 */ 64 65 -typedef struct EbmlGlobal EbmlGlobal; 66 -void Ebml_Serialize(EbmlGlobal *glob, const void *, int, unsigned long); 67 -void Ebml_Write(EbmlGlobal *glob, const void *, unsigned long); 68 +// typedef struct EbmlGlobal EbmlGlobal; 69 +// void Ebml_Serialize(EbmlGlobal *glob, const void *, int, unsigned long); 70 +// void Ebml_Write(EbmlGlobal *glob, const void *, unsigned long); 71 72 /*****/ 73 74 @@ -41,3 +47,7 @@ void Ebml_SerializeData(EbmlGlobal *glob, unsigned long class_id, unsigned char 75 void Ebml_WriteVoid(EbmlGlobal *glob, unsigned long vSize); 76 /* TODO need date function */ 77 #endif 78 + 79 +#ifdef __cplusplus 80 +} 81 +#endif 82 diff --git a/WebMElement.c b/WebMElement.c 83 index 02eefa4..0d5056d 100644 84 --- a/WebMElement.c 85 +++ b/WebMElement.c 86 @@ -6,8 +6,6 @@ 87 // in the file PATENTS. All contributing project authors may 88 // be found in the AUTHORS file in the root of the source tree. 89 90 - 91 -#include "EbmlBufferWriter.h" 92 #include "EbmlIDs.h" 93 #include "WebMElement.h" 94 #include <stdio.h> 95 diff --git a/WebMElement.h b/WebMElement.h 96 index d9ad0a0..987582a 100644 97 --- a/WebMElement.h 98 +++ b/WebMElement.h 99 @@ -6,10 +6,15 @@ 100 // in the file PATENTS. All contributing project authors may 101 // be found in the AUTHORS file in the root of the source tree. 102 103 +#ifdef __cplusplus 104 +extern "C" { 105 +#endif 106 107 #ifndef MKV_CONTEXT_HPP 108 #define MKV_CONTEXT_HPP 1 109 110 +#include "EbmlWriter.h" 111 + 112 void writeSimpleBock(EbmlGlobal *ebml, unsigned char trackNumber, unsigned short timeCode, 113 int isKeyframe, unsigned char lacingFlag, int discardable, 114 unsigned char *data, unsigned long dataLength); 115 @@ -24,12 +29,14 @@ void writeVideoTrack(EbmlGlobal *ebml, unsigned int trackNumber, int flagLacing, 116 double frameRate); 117 void writeAudioTrack(EbmlGlobal *glob, unsigned int trackNumber, int flagLacing, 118 char *codecId, double samplingFrequency, unsigned int channels, 119 - unsigned char *private, unsigned long privateSize); 120 + unsigned char *private_, unsigned long privateSize); 121 122 void writeSimpleBlock(EbmlGlobal *ebml, unsigned char trackNumber, short timeCode, 123 int isKeyframe, unsigned char lacingFlag, int discardable, 124 unsigned char *data, unsigned long dataLength); 125 126 +#endif 127 128 - 129 -#endif 130 \ No newline at end of file 131 +#ifdef __cplusplus 132 +} 133 +#endif