2012-05-21 23:30:56 +02:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2010 The WebM project authors. All Rights Reserved.
|
|
|
|
*
|
|
|
|
* Use of this source code is governed by a BSD-style license
|
|
|
|
* that can be found in the LICENSE file in the root of the source
|
|
|
|
* tree. An additional intellectual property rights grant can be found
|
|
|
|
* in the file PATENTS. All contributing project authors may
|
|
|
|
* be found in the AUTHORS file in the root of the source tree.
|
|
|
|
*/
|
2010-10-20 17:06:48 +02:00
|
|
|
#ifndef EBMLWRITER_HPP
|
|
|
|
#define EBMLWRITER_HPP
|
2010-10-20 18:05:48 +02:00
|
|
|
#include <stddef.h>
|
|
|
|
#include "vpx/vpx_integer.h"
|
|
|
|
|
2012-05-21 23:30:56 +02:00
|
|
|
/* note: you must define write and serialize functions as well as your own
|
|
|
|
* EBML_GLOBAL
|
|
|
|
*
|
|
|
|
* These functions MUST be implemented
|
|
|
|
*/
|
|
|
|
|
2010-10-20 18:05:48 +02:00
|
|
|
typedef struct EbmlGlobal EbmlGlobal;
|
2011-07-12 20:34:51 +02:00
|
|
|
void Ebml_Serialize(EbmlGlobal *glob, const void *, int, unsigned long);
|
2010-10-20 17:06:48 +02:00
|
|
|
void Ebml_Write(EbmlGlobal *glob, const void *, unsigned long);
|
|
|
|
|
2012-05-21 23:30:56 +02:00
|
|
|
/*****/
|
2010-10-20 17:06:48 +02:00
|
|
|
|
2012-05-21 23:30:56 +02:00
|
|
|
void Ebml_WriteLen(EbmlGlobal *glob, int64_t val);
|
2010-10-20 17:06:48 +02:00
|
|
|
void Ebml_WriteString(EbmlGlobal *glob, const char *str);
|
|
|
|
void Ebml_WriteUTF8(EbmlGlobal *glob, const wchar_t *wstr);
|
|
|
|
void Ebml_WriteID(EbmlGlobal *glob, unsigned long class_id);
|
2010-10-20 18:05:48 +02:00
|
|
|
void Ebml_SerializeUnsigned64(EbmlGlobal *glob, unsigned long class_id, uint64_t ui);
|
2010-10-20 17:06:48 +02:00
|
|
|
void Ebml_SerializeUnsigned(EbmlGlobal *glob, unsigned long class_id, unsigned long ui);
|
|
|
|
void Ebml_SerializeBinary(EbmlGlobal *glob, unsigned long class_id, unsigned long ui);
|
|
|
|
void Ebml_SerializeFloat(EbmlGlobal *glob, unsigned long class_id, double d);
|
2012-05-21 23:30:56 +02:00
|
|
|
/* TODO make this more generic to signed */
|
2010-10-20 17:06:48 +02:00
|
|
|
void Ebml_WriteSigned16(EbmlGlobal *glob, short val);
|
|
|
|
void Ebml_SerializeString(EbmlGlobal *glob, unsigned long class_id, const char *s);
|
|
|
|
void Ebml_SerializeUTF8(EbmlGlobal *glob, unsigned long class_id, wchar_t *s);
|
|
|
|
void Ebml_SerializeData(EbmlGlobal *glob, unsigned long class_id, unsigned char *data, unsigned long data_length);
|
|
|
|
void Ebml_WriteVoid(EbmlGlobal *glob, unsigned long vSize);
|
2012-05-21 23:30:56 +02:00
|
|
|
/* TODO need date function */
|
2010-10-20 17:06:48 +02:00
|
|
|
#endif
|