1 /*
2  * This file is part of MPlayer.
3  *
4  * MPlayer is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * (at your option) any later version.
8  *
9  * MPlayer is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License along
15  * with MPlayer; if not, write to the Free Software Foundation, Inc.,
16  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17  */
18 
19 #ifndef MPLAYER_STREAM_DVD_H
20 #define MPLAYER_STREAM_DVD_H
21 
22 #include "config.h"
23 #include <stdint.h>
24 #include <dvdread/dvd_reader.h>
25 #include <dvdread/ifo_types.h>
26 #include <dvdread/ifo_read.h>
27 #include <dvdread/nav_read.h>
28 #include "stream.h"
29 
30 typedef struct {
31   dvd_reader_t *dvd;
32   dvd_file_t *title;
33   ifo_handle_t *vmg_file;
34   tt_srpt_t *tt_srpt;
35   ifo_handle_t *vts_file;
36   vts_ptt_srpt_t *vts_ptt_srpt;
37   pgc_t *cur_pgc;
38 //
39   int cur_title;
40   int cur_cell;
41   int last_cell;
42   int cur_pack;
43   int cell_last_pack;
44   int cur_pgc_idx;
45 // Navi:
46   int packs_left;
47   dsi_t dsi_pack;
48   int angle_seek;
49   unsigned int *cell_times_table;
50 // audio datas
51   int nr_of_channels;
52   stream_language_t audio_streams[32];
53 // subtitles
54   int nr_of_subtitles;
55   stream_language_t subtitles[32];
56 } dvd_priv_t;
57 
58 int dvd_number_of_subs(stream_t *stream);
59 int dvd_aid_from_lang(stream_t *stream, const unsigned char* lang);
60 int dvd_sid_from_lang(stream_t *stream, const unsigned char* lang);
61 int dvd_chapter_from_cell(dvd_priv_t *dvd,int title,int cell);
62 
63 #endif /* MPLAYER_STREAM_DVD_H */
64