]> git.sesse.net Git - vlc/blob - plugins/dvd/input_dvd.h
* fixes for the Qt plugin compilation under Debian
[vlc] / plugins / dvd / input_dvd.h
1 /*****************************************************************************
2  * input_dvd.h: thread structure of the DVD plugin
3  *****************************************************************************
4  * Copyright (C) 1999-2001 VideoLAN
5  * $Id: input_dvd.h,v 1.15 2001/04/02 23:30: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
30 /*****************************************************************************
31  * thread_dvd_data_t: extension of input_thread_t for DVD specificity.
32  *****************************************************************************/
33 typedef struct thread_dvd_data_s
34 {
35     int                     i_fd;               // File descriptor of device
36     boolean_t               b_encrypted;        // CSS encryption
37
38     int                     i_block_once;       // Nb of block read once by 
39                                                 // readv
40
41     /* Navigation information */
42     int                     i_title;
43     int                     i_vts_title;
44     int                     i_program_chain;
45
46     int                     i_chapter_nb;
47     int                     i_chapter;
48
49     int                     i_cell;         /* cell index in adress map */
50     int                     i_prg_cell;     /* cell index in program map */
51
52     int                     i_sector;
53     int                     i_end_sector;   /* last sector of current cell */
54
55     off_t                   i_title_start;
56     off_t                   i_start;
57     off_t                   i_size;
58
59     /* Scrambling Information */
60     struct css_s *          p_css;
61
62     /* Structure that contains all information of the DVD */
63     struct ifo_s *          p_ifo;
64
65 } thread_dvd_data_t;
66
67 /*****************************************************************************
68  * Prototypes in dvd_ifo.c
69  *****************************************************************************/
70 int   IfoInit     ( struct ifo_s **, int );
71 int   IfoTitleSet ( struct ifo_s * );
72 void  IfoEnd      ( struct ifo_s * );
73
74 /*****************************************************************************
75  * Prototypes in dvd_css.c
76  *****************************************************************************/
77 int   CSSTest             ( int );
78 int   CSSInit             ( struct css_s * );
79 void  CSSEnd              ( struct css_s * );
80 int   CSSGetKey           ( struct css_s * );
81 int   CSSDescrambleSector ( u8 * , u8 * );
82