gecko_fix.patch 4.0 KB

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