Bug 1874684 - Part 28: Return DateDuration from DifferenceISODateTime. r=mgaudet
[gecko.git] / media / libmkv / EbmlWriter.h
blob3aee2b30314c5d49547bdd3c6d1ef155e47da20d
1 /*
2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved.
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 */
11 #ifdef __cplusplus
12 extern "C" {
13 #endif
15 #ifndef EBMLWRITER_HPP
16 #define EBMLWRITER_HPP
17 #include <stddef.h>
18 #include "vpx/vpx_integer.h"
19 #include "EbmlBufferWriter.h"
21 /* note: you must define write and serialize functions as well as your own
22 * EBML_GLOBAL
24 * These functions MUST be implemented
27 // typedef struct EbmlGlobal EbmlGlobal;
28 // void Ebml_Serialize(EbmlGlobal *glob, const void *, int, unsigned long);
29 // void Ebml_Write(EbmlGlobal *glob, const void *, unsigned long);
31 /*****/
33 void Ebml_WriteLen(EbmlGlobal *glob, int64_t val);
34 void Ebml_WriteString(EbmlGlobal *glob, const char *str);
35 void Ebml_WriteUTF8(EbmlGlobal *glob, const wchar_t *wstr);
36 void Ebml_WriteID(EbmlGlobal *glob, unsigned long class_id);
37 void Ebml_SerializeUnsigned32(EbmlGlobal *glob, unsigned long class_id, uint32_t ui);
38 void Ebml_SerializeUnsigned64(EbmlGlobal *glob, unsigned long class_id, uint64_t ui);
39 void Ebml_SerializeUnsigned(EbmlGlobal *glob, unsigned long class_id, unsigned long ui);
40 void Ebml_SerializeBinary(EbmlGlobal *glob, unsigned long class_id, unsigned long ui);
41 void Ebml_SerializeFloat(EbmlGlobal *glob, unsigned long class_id, double d);
42 /* TODO make this more generic to signed */
43 void Ebml_WriteSigned16(EbmlGlobal *glob, short val);
44 void Ebml_SerializeString(EbmlGlobal *glob, unsigned long class_id, const char *s);
45 void Ebml_SerializeUTF8(EbmlGlobal *glob, unsigned long class_id, wchar_t *s);
46 void Ebml_SerializeData(EbmlGlobal *glob, unsigned long class_id, unsigned char *data, unsigned long data_length);
47 void Ebml_WriteVoid(EbmlGlobal *glob, unsigned long vSize);
48 /* TODO need date function */
49 #endif
51 #ifdef __cplusplus
53 #endif