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