Skip to content

Commit

Permalink
libebml2: don't force include parser.h
Browse files Browse the repository at this point in the history
  • Loading branch information
robUx4 committed Jan 2, 2025
1 parent 41dead2 commit 5b5502f
Show file tree
Hide file tree
Showing 12 changed files with 19 additions and 6 deletions.
9 changes: 6 additions & 3 deletions libebml2/ebml2/ebml.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,16 @@
#define LIBEBML2_H

#include <corec/node/node.h>
#include <corec/helpers/parser/parser.h>
#include "ebml2/ebml_config.h"

#ifdef __cplusplus
extern "C" {
#endif

typedef struct stream stream;
typedef struct parsercontext parsercontext;


#define CONTEXT_LIBEBML_VERSION 0x400

#define EBML_MAX_VERSION 1
Expand Down Expand Up @@ -89,9 +92,9 @@ typedef struct ebml_element_vmt
{
nodetree_vmt Base;
bool_t (*ValidateSize)(const void*);
err_t (*ReadData)(void*, struct stream *Input, const ebml_parser_context *ParserContext, bool_t AllowDummyElt, int Scope, size_t DepthCheckCRC);
err_t (*ReadData)(void*, stream *Input, const ebml_parser_context *ParserContext, bool_t AllowDummyElt, int Scope, size_t DepthCheckCRC);
#if defined(CONFIG_EBML_WRITING)
err_t (*RenderData)(void*, struct stream *Output, bool_t bForceWithoutMandatory, bool_t bWithDefault, int ForProfile, filepos_t *Rendered);
err_t (*RenderData)(void*, stream *Output, bool_t bForceWithoutMandatory, bool_t bWithDefault, int ForProfile, filepos_t *Rendered);
#endif
bool_t (*IsDefaultValue)(const void*);
bool_t (*DefaultIsSet)(const void*);
Expand Down
6 changes: 3 additions & 3 deletions libebml2/ebml2/ebml_classes.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ struct ebml_context
intptr_t DefaultValue;
const char *ElementName;
// TODO: create sub class so we don't have to assign it all the time
const ebml_semantic *Semantic; // table with last element class set to NULL
const ebml_semantic *GlobalContext; // table with last element class set to NULL
const struct ebml_semantic *Semantic; // table with last element class set to NULL
const struct ebml_semantic *GlobalContext; // table with last element class set to NULL
};

struct ebml_element
Expand All @@ -35,7 +35,7 @@ struct ebml_element
filepos_t ElementPosition;
filepos_t SizePosition; // TODO: is this needed since we have the ElementPosition and SizeLength ?
filepos_t EndPosition;
const ebml_context *Context;
const struct ebml_context *Context;
int DefaultSize;
int8_t SizeLength;
boolmem_t bValueIsSet;
Expand Down
1 change: 1 addition & 0 deletions libebml2/ebmlelement.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include "internal.h"
#include <corec/helpers/file/streams.h>
#include <corec/str/str.h>
#include <corec/helpers/parser/parser.h>

static bool_t ValidateSize(const ebml_element *p)
{
Expand Down
1 change: 1 addition & 0 deletions libebml2/ebmlmain.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include "ebml2/ebml.h"
#include "internal.h"
#include <corec/helpers/file/streams.h>
#include <corec/helpers/parser/parser.h>

err_t EBML_Init(parsercontext *p)
{
Expand Down
1 change: 1 addition & 0 deletions libebml2/ebmlmaster.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include "internal.h"
#include "ebmlcrc.h"
#include <corec/helpers/file/streams.h>
#include <corec/helpers/parser/parser.h>

ebml_element *EBML_MasterAddElt(ebml_master *Element, const ebml_context *Context, bool_t SetDefault, int ForProfile)
{
Expand Down
1 change: 1 addition & 0 deletions libebml2/ebmlstring.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include "ebml2/ebml.h"
#include "internal.h"
#include <corec/helpers/file/streams.h>
#include <corec/helpers/parser/parser.h>
#include <string.h>

err_t EBML_UniStringSetValue(ebml_string *Element,const tchar_t *Value)
Expand Down
1 change: 1 addition & 0 deletions libebml2/test/ebmltree.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include "ebml2/ebml.h"
#include <corec/helpers/file/streams.h>
#include <corec/helpers/date/date.h>
#include <corec/helpers/parser/parser.h>
#include <corec/str/str.h>

void DebugMessage(const tchar_t* Msg,...)
Expand Down
1 change: 1 addition & 0 deletions libmatroska2/matroskamain.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#endif
#include <corec/helpers/file/streams.h>
#include <corec/str/str.h>
#include <corec/helpers/parser/parser.h>

extern const nodemeta Matroska_Class[];

Expand Down
1 change: 1 addition & 0 deletions libmatroska2/test/mkvtree.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include <corec/helpers/file/streams.h>
#include <corec/helpers/date/date.h>
#include <corec/str/str.h>
#include <corec/helpers/parser/parser.h>

static int ShowPos = 0;

Expand Down
1 change: 1 addition & 0 deletions mkclean/mkclean.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include <corec/helpers/date/date.h>
#include <corec/helpers/parser/strtypes.h>
#include <corec/str/str.h>
#include <corec/helpers/parser/parser.h>

#ifndef CONFIG_EBML_WRITING
#error libebml2 was not built with writing support!
Expand Down
1 change: 1 addition & 0 deletions mkparts/mkparts.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include "mkparts_project.h"
#include <corec/helpers/file/streams.h>
#include <corec/str/str.h>
#include <corec/helpers/parser/parser.h>

static textwriter *StdErr = NULL;
static bool_t Split = 1;
Expand Down
1 change: 1 addition & 0 deletions mkvalidator/mkvalidator.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include "mkvalidator_project.h"
#include <corec/helpers/file/streams.h>
#include <corec/str/str.h>
#include <corec/helpers/parser/parser.h>

/*!
* \todo verify the track timestamp scale is not null
Expand Down

0 comments on commit 5b5502f

Please sign in to comment.