view asxparser.h @ 28698:c7a1f29c98c2

r27390 Fix a misleading section in the libavcodec options manual r27407 Add video driver for Nintendo Wii/GameCube. r27454 Mention IVTV, S3 and SH_VEU drivers within VIDIX section of manpage. r27466 Document -lavcopts o, aka libavcodec AVOption. r27542 'mp3lame' audio output codec was wrongly listed as 'lame'. r27606 Make -heartbeat-cmd and -stop-xscreensaver sections reference each other. r27638 add lavfopts matroska suboption r27639 document lavc/lavf avoption o suboption r27650 add outdir sub-option to vo png r27690 whitespace cosmetics r27691 vo_fbdev now supports -geometry. r27768 update x264's section with r999 of x264 r27800 improve documentation of latest x264's options r27801 Clarify screenw/screenh options
author kraymer
date Wed, 25 Feb 2009 14:23:07 +0000
parents 4129c8cfa742
children 0f1b5b68af32
line wrap: on
line source

#ifndef MPLAYER_ASXPARSER_H
#define MPLAYER_ASXPARSER_H

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(const char* attrib,char** attribs);

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

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

////// List utils

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

void
asx_list_free(void* list_ptr,ASX_FreeFunc free_func);

#endif /* MPLAYER_ASXPARSER_H */