view asxparser.h @ 27145:44ceb8c35dbc

r25385: Add new audio filter for encoding multi-channel audio into ac3 at runtime. r25389: Support using unrar executable to access rar-compressed vobsub files. r25440: Fix the expand text's format by the source. r25455: (previously applied) typo noticed by Paul TT r25529: Support ?(!NAME:TEXT) format for expanding string by property. r25566: update copyright year to 2008 r25585: Add an example for dvdnav:// usage with path. r25587: when {v|a}_o_mpegpes:card isn't specified by the user [...] r25607: documented angle commands r25610: Allow overriding [Script Info] parameters with -ass-force-style option. r25639: Add heartbeat-cmd option r25656: dvd-device can specify iso files too r25657: dumpstream is NOT a better way to copy a dvd title r25665: updated english manpage with protocol/extension profile loading feature r25671: document vo.* and ao.* playback profiles r25751: Extend heartbeat-cmd man page entry r25752: Seems that all - should be escaped in the man page r25762: added missing escapes r25763: added missing "&"
author kraymer
date Mon, 30 Jun 2008 19:35:32 +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 */