Configure needs AS to be set for the Makefiles.
[mplayer/glamo.git] / playtreeparser.h
blobf0e11a6970b29afa77092ac687b12752e36b0a6b
1 #ifndef MPLAYER_PLAYTREEPARSER_H
2 #define MPLAYER_PLAYTREEPARSER_H
4 #include "playtree.h"
6 /// \defgroup PlaytreeParser Playtree parser
7 /// \ingroup Playtree
8 ///
9 /// The playtree parser allows to read various playlist formats. It reads from
10 /// a stream allowing to handle playlists from local files and the network.
11 ///@{
13 /// \file
15 struct stream_st;
17 typedef struct play_tree_parser {
18 struct stream_st* stream;
19 char *buffer,*iter,*line;
20 int buffer_size , buffer_end;
21 int deep,keep;
22 } play_tree_parser_t;
24 /// Create a new parser.
25 /** \param stream The stream to read from.
26 * \param deep Parser depth. Some formats allow including other files,
27 * this is used to track the inclusion depth.
28 * \return The new parser.
30 play_tree_parser_t*
31 play_tree_parser_new(struct stream_st* stream,int deep);
33 /// Destroy a parser.
34 void
35 play_tree_parser_free(play_tree_parser_t* p);
37 /// Build a playtree from the playlist opened with the parser.
38 /** \param p The parser.
39 * \param forced If non-zero the playlist file was explicitly
40 * given by the user, allow falling back on
41 * one filename per line playlist.
42 * \return A new playtree or NULL on error.
44 play_tree_t*
45 play_tree_parser_get_play_tree(play_tree_parser_t* p, int forced);
47 /// Wrapper for play_tree_add_basepath (add base path from file).
48 void
49 play_tree_add_bpf(play_tree_t* pt, char* filename);
51 ///@}
53 #endif /* MPLAYER_PLAYTREEPARSER_H */