Mercurial > mplayer.hg
annotate asxparser.h @ 10686:8eb690f0e342
- seek() is always synchronized to keyframes, so the decoders don't
crash anymore; successfully tested with libmpeg2 and ffmpeg12
- support for tables PAT and PMT, used the associate pids to program and
to play the right streams
- option -tsprog <number> to specify the chosen program (-vid and -aid
still override the single stream pids)
- initial support for MPEG4 in TS (M4V is working, but not AAC yet)
- defragmenting mechanism (without buffering, so it has 0 added cost) to
improve the playback of high bitrate movies
- refers to demux_mpg_control() to get length and percentage position
in the stream
patch by Nico <nsabbi@libero.it>
author | arpi |
---|---|
date | Sun, 24 Aug 2003 18:07:00 +0000 |
parents | 1f6ae3d15f19 |
children | 75327b24e06f |
rev | line source |
---|---|
4043
25590564842f
tree-based playlist parser code by Alban Bedel <albeu@free.fr>
arpi
parents:
diff
changeset
|
1 |
25590564842f
tree-based playlist parser code by Alban Bedel <albeu@free.fr>
arpi
parents:
diff
changeset
|
2 |
25590564842f
tree-based playlist parser code by Alban Bedel <albeu@free.fr>
arpi
parents:
diff
changeset
|
3 typedef struct _ASX_Parser_t ASX_Parser_t; |
25590564842f
tree-based playlist parser code by Alban Bedel <albeu@free.fr>
arpi
parents:
diff
changeset
|
4 |
25590564842f
tree-based playlist parser code by Alban Bedel <albeu@free.fr>
arpi
parents:
diff
changeset
|
5 typedef struct { |
25590564842f
tree-based playlist parser code by Alban Bedel <albeu@free.fr>
arpi
parents:
diff
changeset
|
6 char* buffer; |
25590564842f
tree-based playlist parser code by Alban Bedel <albeu@free.fr>
arpi
parents:
diff
changeset
|
7 int line; |
25590564842f
tree-based playlist parser code by Alban Bedel <albeu@free.fr>
arpi
parents:
diff
changeset
|
8 } ASX_LineSave_t; |
25590564842f
tree-based playlist parser code by Alban Bedel <albeu@free.fr>
arpi
parents:
diff
changeset
|
9 |
25590564842f
tree-based playlist parser code by Alban Bedel <albeu@free.fr>
arpi
parents:
diff
changeset
|
10 struct _ASX_Parser_t { |
25590564842f
tree-based playlist parser code by Alban Bedel <albeu@free.fr>
arpi
parents:
diff
changeset
|
11 int line; // Curent line |
25590564842f
tree-based playlist parser code by Alban Bedel <albeu@free.fr>
arpi
parents:
diff
changeset
|
12 ASX_LineSave_t *ret_stack; |
25590564842f
tree-based playlist parser code by Alban Bedel <albeu@free.fr>
arpi
parents:
diff
changeset
|
13 int ret_stack_size; |
25590564842f
tree-based playlist parser code by Alban Bedel <albeu@free.fr>
arpi
parents:
diff
changeset
|
14 char* last_body; |
4309 | 15 int deep; |
4043
25590564842f
tree-based playlist parser code by Alban Bedel <albeu@free.fr>
arpi
parents:
diff
changeset
|
16 }; |
25590564842f
tree-based playlist parser code by Alban Bedel <albeu@free.fr>
arpi
parents:
diff
changeset
|
17 |
8170 | 18 ASX_Parser_t* |
19 asx_parser_new(void); | |
20 | |
21 void | |
22 asx_parser_free(ASX_Parser_t* parser); | |
23 | |
24 /* | |
25 * Return -1 on error, 0 when nothing is found, 1 on sucess | |
26 */ | |
27 int | |
28 asx_get_element(ASX_Parser_t* parser,char** _buffer, | |
29 char** _element,char** _body,char*** _attribs); | |
30 | |
31 int | |
32 asx_parse_attribs(ASX_Parser_t* parser,char* buffer,char*** _attribs); | |
33 | |
34 /////// Attribs utils | |
35 | |
36 char* | |
37 asx_get_attrib(char* attrib,char** attribs); | |
38 | |
39 int | |
40 asx_attrib_to_enum(char* val,char** valid_vals); | |
41 | |
42 #define asx_free_attribs(a) asx_list_free((void***)&a,free) | |
43 | |
44 ////// List utils | |
45 | |
46 typedef void (*ASX_FreeFunc)(void* arg); | |
47 | |
48 void | |
49 asx_list_free(void* list_ptr,ASX_FreeFunc free_func); |