Commit c702dd39 authored by Steve Lhomme's avatar Steve Lhomme

disable the render API when CONFIG_EBML_WRITING is not set

git-svn-id: https://matroska.svn.sourceforge.net/svnroot/matroska/trunk/foundation_src@30 a6f86f6d-0131-4f8e-9e7b-e335508773d5
parent 7c5cee49
......@@ -55,6 +55,7 @@ failed:
return Result;
}
#if defined(CONFIG_EBML_WRITING)
static err_t RenderData(ebml_binary *Element, stream *Output, bool_t bForceRender, bool_t bKeepIntact, filepos_t *Rendered)
{
size_t Written;
......@@ -63,6 +64,7 @@ static err_t RenderData(ebml_binary *Element, stream *Output, bool_t bForceRende
*Rendered = Written;
return Err;
}
#endif
err_t EBML_BinarySetData(ebml_binary *Element, const uint8_t *Data, size_t DataSize)
{
......@@ -104,5 +106,7 @@ META_DATA(TYPE_ARRAY,0,ebml_binary,Data)
META_VMT(TYPE_FUNC,ebml_element_vmt,ReadData,ReadData)
META_VMT(TYPE_FUNC,ebml_element_vmt,IsDefaultValue,IsDefaultValue)
META_VMT(TYPE_FUNC,ebml_element_vmt,UpdateSize,UpdateSize)
#if defined(CONFIG_EBML_WRITING)
META_VMT(TYPE_FUNC,ebml_element_vmt,RenderData,RenderData)
#endif
META_END(EBML_ELEMENT_CLASS)
......@@ -188,6 +188,7 @@ processCrc:
return ERR_NONE;
}
#if defined(CONFIG_EBML_WRITING)
static err_t RenderData(ebml_element *Element, stream *Output, bool_t bForceRender, bool_t bKeepIntact, filepos_t *Rendered)
{
ebml_element *i;
......@@ -232,11 +233,14 @@ static err_t RenderData(ebml_element *Element, stream *Output, bool_t bForceRend
return Err;
}
#endif
META_START(EBMLMaster_Class,EBML_MASTER_CLASS)
META_VMT(TYPE_FUNC,ebml_element_vmt,PostCreate,PostCreate)
META_VMT(TYPE_FUNC,ebml_element_vmt,IsDefaultValue,IsDefaultValue)
META_VMT(TYPE_FUNC,ebml_element_vmt,UpdateSize,UpdateSize)
META_VMT(TYPE_FUNC,ebml_element_vmt,ReadData,ReadData)
#if defined(CONFIG_EBML_WRITING)
META_VMT(TYPE_FUNC,ebml_element_vmt,RenderData,RenderData)
#endif
META_END(EBML_ELEMENT_CLASS)
......@@ -98,6 +98,7 @@ failed:
return Result;
}
#if defined(CONFIG_EBML_WRITING)
static err_t RenderDataSignedInt(ebml_integer *Element, stream *Output, bool_t bForceRender, bool_t bKeepIntact, filepos_t *Rendered)
{
uint8_t FinalData[8]; // we don't handle more than 64 bits integers
......@@ -147,6 +148,7 @@ static err_t RenderDataInt(ebml_integer *Element, stream *Output, bool_t bForceR
*Rendered = i;
return Err;
}
#endif
static bool_t ValidateSizeInt(ebml_element *p)
{
......@@ -294,7 +296,9 @@ META_CLASS(SIZE,sizeof(ebml_integer))
META_VMT(TYPE_FUNC,ebml_element_vmt,IsDefaultValue,IsDefaultValueInt)
META_VMT(TYPE_FUNC,ebml_element_vmt,ValidateSize,ValidateSizeInt)
META_VMT(TYPE_FUNC,ebml_element_vmt,ReadData,ReadDataInt)
#if defined(CONFIG_EBML_WRITING)
META_VMT(TYPE_FUNC,ebml_element_vmt,RenderData,RenderDataInt)
#endif
META_VMT(TYPE_FUNC,ebml_element_vmt,UpdateSize,UpdateSizeInt)
META_VMT(TYPE_FUNC,ebml_element_vmt,PostCreate,PostCreateInt)
META_END_CONTINUE(EBML_ELEMENT_CLASS)
......@@ -304,7 +308,9 @@ META_CLASS(SIZE,sizeof(ebml_integer))
META_VMT(TYPE_FUNC,ebml_element_vmt,IsDefaultValue,IsDefaultValueInt)
META_VMT(TYPE_FUNC,ebml_element_vmt,ValidateSize,ValidateSizeInt)
META_VMT(TYPE_FUNC,ebml_element_vmt,ReadData,ReadDataSignedInt)
#if defined(CONFIG_EBML_WRITING)
META_VMT(TYPE_FUNC,ebml_element_vmt,RenderData,RenderDataSignedInt)
#endif
META_VMT(TYPE_FUNC,ebml_element_vmt,UpdateSize,UpdateSizeSignedInt)
META_END_CONTINUE(EBML_ELEMENT_CLASS)
......
......@@ -82,6 +82,7 @@ failed:
return Result;
}
#if defined(CONFIG_EBML_WRITING)
static err_t RenderData(ebml_string *Element, stream *Output, bool_t bForceRender, bool_t bKeepIntact, filepos_t *Rendered)
{
size_t Written;
......@@ -101,6 +102,7 @@ static err_t RenderData(ebml_string *Element, stream *Output, bool_t bForceRende
}
return Err;
}
#endif
#if 0
err_t EBML_AsciiStringRead(ebml_string *Element, stream *Input, tchar_t *Out, size_t OutLen)
......@@ -163,7 +165,9 @@ META_CLASS(DELETE,Delete)
META_VMT(TYPE_FUNC,ebml_element_vmt,ReadData,ReadData)
META_VMT(TYPE_FUNC,ebml_element_vmt,IsDefaultValue,IsDefaultValue)
META_VMT(TYPE_FUNC,ebml_element_vmt,UpdateSize,UpdateSize)
#if defined(CONFIG_EBML_WRITING)
META_VMT(TYPE_FUNC,ebml_element_vmt,RenderData,RenderData)
#endif
META_END_CONTINUE(EBML_ELEMENT_CLASS)
META_START_CONTINUE(EBML_UNISTRING_CLASS)
......@@ -172,5 +176,7 @@ META_CLASS(DELETE,Delete)
META_VMT(TYPE_FUNC,ebml_element_vmt,ReadData,ReadData)
META_VMT(TYPE_FUNC,ebml_element_vmt,IsDefaultValue,IsDefaultValue)
META_VMT(TYPE_FUNC,ebml_element_vmt,UpdateSize,UpdateSize)
#if defined(CONFIG_EBML_WRITING)
META_VMT(TYPE_FUNC,ebml_element_vmt,RenderData,RenderData)
#endif
META_END(EBML_ELEMENT_CLASS)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment