1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/media/libmkv/EbmlWriter.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,53 @@ 1.4 +/* 1.5 + * Copyright (c) 2010 The WebM project authors. All Rights Reserved. 1.6 + * 1.7 + * Use of this source code is governed by a BSD-style license 1.8 + * that can be found in the LICENSE file in the root of the source 1.9 + * tree. An additional intellectual property rights grant can be found 1.10 + * in the file PATENTS. All contributing project authors may 1.11 + * be found in the AUTHORS file in the root of the source tree. 1.12 + */ 1.13 + 1.14 +#ifdef __cplusplus 1.15 +extern "C" { 1.16 +#endif 1.17 + 1.18 +#ifndef EBMLWRITER_HPP 1.19 +#define EBMLWRITER_HPP 1.20 +#include <stddef.h> 1.21 +#include "vpx/vpx_integer.h" 1.22 +#include "EbmlBufferWriter.h" 1.23 + 1.24 +/* note: you must define write and serialize functions as well as your own 1.25 + * EBML_GLOBAL 1.26 + * 1.27 + * These functions MUST be implemented 1.28 + */ 1.29 + 1.30 +// typedef struct EbmlGlobal EbmlGlobal; 1.31 +// void Ebml_Serialize(EbmlGlobal *glob, const void *, int, unsigned long); 1.32 +// void Ebml_Write(EbmlGlobal *glob, const void *, unsigned long); 1.33 + 1.34 +/*****/ 1.35 + 1.36 +void Ebml_WriteLen(EbmlGlobal *glob, int64_t val); 1.37 +void Ebml_WriteString(EbmlGlobal *glob, const char *str); 1.38 +void Ebml_WriteUTF8(EbmlGlobal *glob, const wchar_t *wstr); 1.39 +void Ebml_WriteID(EbmlGlobal *glob, unsigned long class_id); 1.40 +void Ebml_SerializeUnsigned32(EbmlGlobal *glob, unsigned long class_id, uint32_t ui); 1.41 +void Ebml_SerializeUnsigned64(EbmlGlobal *glob, unsigned long class_id, uint64_t ui); 1.42 +void Ebml_SerializeUnsigned(EbmlGlobal *glob, unsigned long class_id, unsigned long ui); 1.43 +void Ebml_SerializeBinary(EbmlGlobal *glob, unsigned long class_id, unsigned long ui); 1.44 +void Ebml_SerializeFloat(EbmlGlobal *glob, unsigned long class_id, double d); 1.45 +/* TODO make this more generic to signed */ 1.46 +void Ebml_WriteSigned16(EbmlGlobal *glob, short val); 1.47 +void Ebml_SerializeString(EbmlGlobal *glob, unsigned long class_id, const char *s); 1.48 +void Ebml_SerializeUTF8(EbmlGlobal *glob, unsigned long class_id, wchar_t *s); 1.49 +void Ebml_SerializeData(EbmlGlobal *glob, unsigned long class_id, unsigned char *data, unsigned long data_length); 1.50 +void Ebml_WriteVoid(EbmlGlobal *glob, unsigned long vSize); 1.51 +/* TODO need date function */ 1.52 +#endif 1.53 + 1.54 +#ifdef __cplusplus 1.55 +} 1.56 +#endif