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