media/libmkv/EbmlBufferWriter.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.

     1 #ifndef EBMLBUFFERWRITER_HPP
     2 #define EBMLBUFFERWRITER_HPP
     4 typedef struct {
     5   unsigned long long offset;
     6 } EbmlLoc;
     8 typedef struct {
     9   unsigned char *buf;
    10   unsigned int length;
    11   unsigned int offset;
    12 } EbmlGlobal;
    14 void Ebml_Write(EbmlGlobal *glob, const void *buffer_in, unsigned long len);
    15 void Ebml_Serialize(EbmlGlobal *glob, const void *buffer_in,
    16                     int buffer_size, unsigned long len);
    17 void Ebml_StartSubElement(EbmlGlobal *glob, EbmlLoc *ebmlLoc, unsigned long class_id);
    18 void Ebml_EndSubElement(EbmlGlobal *glob,  EbmlLoc *ebmlLoc);
    20 #endif

mercurial