media/libmkv/gecko_fix.patch

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

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

mercurial