view asxparser.h @ 8514:a1ff87c254ff

I have rewritten the gif89a vo in order to solve some problems I had with it. These are: 1) current code is messy 2) poor comments, if any 3) inaccurate frame dropping and delay code 4) output filename hardcoded 5) output framerate as integer You may specify the output filename and framerate like so: -vo gif89a:4.33 4.33 fps output -vo gif89a:some.gif output to some.gif -vo gif89a:5.02:new.gif output to new.gif at 5.02 fps The filename defaults to out.gif, and the framerate defaults to 5 fps. by Joey Parrish <joey@nicewarrior.org>
author arpi
date Sat, 21 Dec 2002 21:07:16 +0000
parents 1f6ae3d15f19
children 75327b24e06f
line wrap: on
line source



typedef struct _ASX_Parser_t ASX_Parser_t;

typedef struct {
  char* buffer;
  int line;
} ASX_LineSave_t;

struct _ASX_Parser_t {
  int line; // Curent line
  ASX_LineSave_t *ret_stack;
  int ret_stack_size;
  char* last_body;
  int deep;
};
  
ASX_Parser_t*
asx_parser_new(void);

void
asx_parser_free(ASX_Parser_t* parser);

/*
 * Return -1 on error, 0 when nothing is found, 1 on sucess
 */
int
asx_get_element(ASX_Parser_t* parser,char** _buffer,
		char** _element,char** _body,char*** _attribs);

int
asx_parse_attribs(ASX_Parser_t* parser,char* buffer,char*** _attribs);

/////// Attribs utils

char*
asx_get_attrib(char* attrib,char** attribs);

int
asx_attrib_to_enum(char* val,char** valid_vals);

#define asx_free_attribs(a) asx_list_free((void***)&a,free)

////// List utils

typedef void (*ASX_FreeFunc)(void* arg);

void
asx_list_free(void* list_ptr,ASX_FreeFunc free_func);