Mercurial > mplayer.hg
annotate playtreeparser.h @ 32014:960f3f35ebda
Move sub_cp extern declaration to subreader.h, where it belongs.
author | diego |
---|---|
date | Wed, 08 Sep 2010 19:26:42 +0000 |
parents | de190efe4da3 |
children |
rev | line source |
---|---|
30429
c1a3f1bbba26
Add license header to all top-level files missing them.
diego
parents:
26131
diff
changeset
|
1 /* |
c1a3f1bbba26
Add license header to all top-level files missing them.
diego
parents:
26131
diff
changeset
|
2 * This file is part of MPlayer. |
c1a3f1bbba26
Add license header to all top-level files missing them.
diego
parents:
26131
diff
changeset
|
3 * |
c1a3f1bbba26
Add license header to all top-level files missing them.
diego
parents:
26131
diff
changeset
|
4 * MPlayer is free software; you can redistribute it and/or modify |
c1a3f1bbba26
Add license header to all top-level files missing them.
diego
parents:
26131
diff
changeset
|
5 * it under the terms of the GNU General Public License as published by |
c1a3f1bbba26
Add license header to all top-level files missing them.
diego
parents:
26131
diff
changeset
|
6 * the Free Software Foundation; either version 2 of the License, or |
c1a3f1bbba26
Add license header to all top-level files missing them.
diego
parents:
26131
diff
changeset
|
7 * (at your option) any later version. |
c1a3f1bbba26
Add license header to all top-level files missing them.
diego
parents:
26131
diff
changeset
|
8 * |
c1a3f1bbba26
Add license header to all top-level files missing them.
diego
parents:
26131
diff
changeset
|
9 * MPlayer is distributed in the hope that it will be useful, |
c1a3f1bbba26
Add license header to all top-level files missing them.
diego
parents:
26131
diff
changeset
|
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
c1a3f1bbba26
Add license header to all top-level files missing them.
diego
parents:
26131
diff
changeset
|
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
c1a3f1bbba26
Add license header to all top-level files missing them.
diego
parents:
26131
diff
changeset
|
12 * GNU General Public License for more details. |
c1a3f1bbba26
Add license header to all top-level files missing them.
diego
parents:
26131
diff
changeset
|
13 * |
c1a3f1bbba26
Add license header to all top-level files missing them.
diego
parents:
26131
diff
changeset
|
14 * You should have received a copy of the GNU General Public License along |
c1a3f1bbba26
Add license header to all top-level files missing them.
diego
parents:
26131
diff
changeset
|
15 * with MPlayer; if not, write to the Free Software Foundation, Inc., |
c1a3f1bbba26
Add license header to all top-level files missing them.
diego
parents:
26131
diff
changeset
|
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
c1a3f1bbba26
Add license header to all top-level files missing them.
diego
parents:
26131
diff
changeset
|
17 */ |
c1a3f1bbba26
Add license header to all top-level files missing them.
diego
parents:
26131
diff
changeset
|
18 |
26029 | 19 #ifndef MPLAYER_PLAYTREEPARSER_H |
20 #define MPLAYER_PLAYTREEPARSER_H | |
18265 | 21 |
26131
83c95bd31aab
Add necessary #includes to pass 'make checkheaders'.
diego
parents:
26029
diff
changeset
|
22 #include "playtree.h" |
83c95bd31aab
Add necessary #includes to pass 'make checkheaders'.
diego
parents:
26029
diff
changeset
|
23 |
18265 | 24 /// \defgroup PlaytreeParser Playtree parser |
25 /// \ingroup Playtree | |
26 /// | |
18316
b3be7df634b0
spelling/grammar/wording fixes in doxygen and non-doxygen comments
diego
parents:
18265
diff
changeset
|
27 /// The playtree parser allows to read various playlist formats. It reads from |
b3be7df634b0
spelling/grammar/wording fixes in doxygen and non-doxygen comments
diego
parents:
18265
diff
changeset
|
28 /// a stream allowing to handle playlists from local files and the network. |
18265 | 29 ///@{ |
30 | |
31 /// \file | |
4308
d752f99fd535
Objectization of the play_tree_parser for more flexiblity
albeu
parents:
diff
changeset
|
32 |
31179 | 33 struct stream; |
4308
d752f99fd535
Objectization of the play_tree_parser for more flexiblity
albeu
parents:
diff
changeset
|
34 |
d752f99fd535
Objectization of the play_tree_parser for more flexiblity
albeu
parents:
diff
changeset
|
35 typedef struct play_tree_parser { |
31179 | 36 struct stream *stream; |
4782 | 37 char *buffer,*iter,*line; |
4308
d752f99fd535
Objectization of the play_tree_parser for more flexiblity
albeu
parents:
diff
changeset
|
38 int buffer_size , buffer_end; |
4782 | 39 int deep,keep; |
4308
d752f99fd535
Objectization of the play_tree_parser for more flexiblity
albeu
parents:
diff
changeset
|
40 } play_tree_parser_t; |
d752f99fd535
Objectization of the play_tree_parser for more flexiblity
albeu
parents:
diff
changeset
|
41 |
18265 | 42 /// Create a new parser. |
43 /** \param stream The stream to read from. | |
18316
b3be7df634b0
spelling/grammar/wording fixes in doxygen and non-doxygen comments
diego
parents:
18265
diff
changeset
|
44 * \param deep Parser depth. Some formats allow including other files, |
18265 | 45 * this is used to track the inclusion depth. |
46 * \return The new parser. | |
47 */ | |
4308
d752f99fd535
Objectization of the play_tree_parser for more flexiblity
albeu
parents:
diff
changeset
|
48 play_tree_parser_t* |
31179 | 49 play_tree_parser_new(struct stream *stream, int deep); |
4308
d752f99fd535
Objectization of the play_tree_parser for more flexiblity
albeu
parents:
diff
changeset
|
50 |
18265 | 51 /// Destroy a parser. |
4308
d752f99fd535
Objectization of the play_tree_parser for more flexiblity
albeu
parents:
diff
changeset
|
52 void |
d752f99fd535
Objectization of the play_tree_parser for more flexiblity
albeu
parents:
diff
changeset
|
53 play_tree_parser_free(play_tree_parser_t* p); |
d752f99fd535
Objectization of the play_tree_parser for more flexiblity
albeu
parents:
diff
changeset
|
54 |
18265 | 55 /// Build a playtree from the playlist opened with the parser. |
56 /** \param p The parser. | |
57 * \param forced If non-zero the playlist file was explicitly | |
58 * given by the user, allow falling back on | |
59 * one filename per line playlist. | |
60 * \return A new playtree or NULL on error. | |
61 */ | |
4308
d752f99fd535
Objectization of the play_tree_parser for more flexiblity
albeu
parents:
diff
changeset
|
62 play_tree_t* |
8925
5c15777f1c07
this patch adds an fallback to playlist (any but the plaintext-list format)
arpi
parents:
8164
diff
changeset
|
63 play_tree_parser_get_play_tree(play_tree_parser_t* p, int forced); |
4308
d752f99fd535
Objectization of the play_tree_parser for more flexiblity
albeu
parents:
diff
changeset
|
64 |
18265 | 65 /// Wrapper for play_tree_add_basepath (add base path from file). |
10211
4bc481804519
warning fixes by Dominik Mierzejewski <dominik@rangers.eu.org>
alex
parents:
8925
diff
changeset
|
66 void |
4bc481804519
warning fixes by Dominik Mierzejewski <dominik@rangers.eu.org>
alex
parents:
8925
diff
changeset
|
67 play_tree_add_bpf(play_tree_t* pt, char* filename); |
4bc481804519
warning fixes by Dominik Mierzejewski <dominik@rangers.eu.org>
alex
parents:
8925
diff
changeset
|
68 |
26029 | 69 ///@} |
18265 | 70 |
26029 | 71 #endif /* MPLAYER_PLAYTREEPARSER_H */ |