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