media/libmkv/EbmlBufferWriter.h
author Bobby Holley <bobbyholley@gmail.com>
Sat, 14 Feb 2015 19:08:15 -0800
changeset 229307 581ed2f292ff6d0fe3cdd6e0c0d0112292cf7947
parent 165387 a331400db013bd863d738236fe054fc62aec415f
permissions -rw-r--r--
Bug 1125970 - Make flushing an opt-in mechanism, and use it only for the PDM task queues. v1 r=cpearce

#ifndef EBMLBUFFERWRITER_HPP
#define EBMLBUFFERWRITER_HPP

typedef struct {
  unsigned long long offset;
} EbmlLoc;

typedef struct {
  unsigned char *buf;
  unsigned int length;
  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);

#endif