]> git.sesse.net Git - vlc/blob - modules/access/dvd/dvd.h
edd7efd0807d5219823108bce2d73ebd1a5e79ba
[vlc] / modules / access / dvd / dvd.h
1 /*****************************************************************************
2  * dvd.h: thread structure of the DVD plugin
3  *****************************************************************************
4  * Copyright (C) 1999-2001 VideoLAN
5  * $Id: dvd.h,v 1.1 2002/08/04 17:23:41 sam Exp $
6  *
7  * Author: Stéphane Borel <stef@via.ecp.fr>
8  *
9  * This program is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation; either version 2 of the License, or
12  * (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program; if not, write to the Free Software
21  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
22  *****************************************************************************/
23
24 /*****************************************************************************
25  * Preamble
26  *****************************************************************************/
27 /* Logical block size for DVD-VIDEO */
28 #define DVD_LB_SIZE 2048
29 #define LB2OFF(x) ((off_t)(x) * (off_t)(DVD_LB_SIZE))
30 #define OFF2LB(x) ((x) >> 11)
31
32 /*****************************************************************************
33  * thread_dvd_data_t: extension of input_thread_t for DVD specificity.
34  *****************************************************************************/
35 typedef struct thread_dvd_data_s
36 {
37     dvdcss_handle           dvdhandle;                   /* libdvdcss handle */
38
39     int                     i_audio_nb;
40     int                     i_spu_nb;
41
42     /* Navigation information */
43     int                     i_title;
44     int                     i_title_id;
45
46     int                     i_chapter_nb;
47     int                     i_chapter;
48     vlc_bool_t              b_new_chapter;
49
50     int                     i_angle_nb;
51     int                     i_angle;
52
53     int                     i_map_cell;   /* cell index in adress map */
54     int                     i_prg_cell;   /* cell index in program map */
55     int                     i_angle_cell; /* cell index in the current angle */
56
57     int                     i_vts_start;  /* offset to beginning of vts */
58     int                     i_vts_lb;     /* sector in vts */
59     int                     i_last_lb;    /* last sector of current cell */
60
61     /* Structure that contains all information of the DVD */
62     struct ifo_s *          p_ifo;
63
64 } thread_dvd_data_t;
65