media/libmkv/EbmlWriter.h

Tue, 06 Jan 2015 21:39:09 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 06 Jan 2015 21:39:09 +0100
branch
TOR_BUG_9701
changeset 8
97036ab72558
permissions
-rw-r--r--

Conditionally force memory storage according to privacy.thirdparty.isolate;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.

michael@0 1 /*
michael@0 2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved.
michael@0 3 *
michael@0 4 * Use of this source code is governed by a BSD-style license
michael@0 5 * that can be found in the LICENSE file in the root of the source
michael@0 6 * tree. An additional intellectual property rights grant can be found
michael@0 7 * in the file PATENTS. All contributing project authors may
michael@0 8 * be found in the AUTHORS file in the root of the source tree.
michael@0 9 */
michael@0 10
michael@0 11 #ifdef __cplusplus
michael@0 12 extern "C" {
michael@0 13 #endif
michael@0 14
michael@0 15 #ifndef EBMLWRITER_HPP
michael@0 16 #define EBMLWRITER_HPP
michael@0 17 #include <stddef.h>
michael@0 18 #include "vpx/vpx_integer.h"
michael@0 19 #include "EbmlBufferWriter.h"
michael@0 20
michael@0 21 /* note: you must define write and serialize functions as well as your own
michael@0 22 * EBML_GLOBAL
michael@0 23 *
michael@0 24 * These functions MUST be implemented
michael@0 25 */
michael@0 26
michael@0 27 // typedef struct EbmlGlobal EbmlGlobal;
michael@0 28 // void Ebml_Serialize(EbmlGlobal *glob, const void *, int, unsigned long);
michael@0 29 // void Ebml_Write(EbmlGlobal *glob, const void *, unsigned long);
michael@0 30
michael@0 31 /*****/
michael@0 32
michael@0 33 void Ebml_WriteLen(EbmlGlobal *glob, int64_t val);
michael@0 34 void Ebml_WriteString(EbmlGlobal *glob, const char *str);
michael@0 35 void Ebml_WriteUTF8(EbmlGlobal *glob, const wchar_t *wstr);
michael@0 36 void Ebml_WriteID(EbmlGlobal *glob, unsigned long class_id);
michael@0 37 void Ebml_SerializeUnsigned32(EbmlGlobal *glob, unsigned long class_id, uint32_t ui);
michael@0 38 void Ebml_SerializeUnsigned64(EbmlGlobal *glob, unsigned long class_id, uint64_t ui);
michael@0 39 void Ebml_SerializeUnsigned(EbmlGlobal *glob, unsigned long class_id, unsigned long ui);
michael@0 40 void Ebml_SerializeBinary(EbmlGlobal *glob, unsigned long class_id, unsigned long ui);
michael@0 41 void Ebml_SerializeFloat(EbmlGlobal *glob, unsigned long class_id, double d);
michael@0 42 /* TODO make this more generic to signed */
michael@0 43 void Ebml_WriteSigned16(EbmlGlobal *glob, short val);
michael@0 44 void Ebml_SerializeString(EbmlGlobal *glob, unsigned long class_id, const char *s);
michael@0 45 void Ebml_SerializeUTF8(EbmlGlobal *glob, unsigned long class_id, wchar_t *s);
michael@0 46 void Ebml_SerializeData(EbmlGlobal *glob, unsigned long class_id, unsigned char *data, unsigned long data_length);
michael@0 47 void Ebml_WriteVoid(EbmlGlobal *glob, unsigned long vSize);
michael@0 48 /* TODO need date function */
michael@0 49 #endif
michael@0 50
michael@0 51 #ifdef __cplusplus
michael@0 52 }
michael@0 53 #endif

mercurial