]> git.sesse.net Git - vlc/blob - modules/access/cdda/cdda.h
Split out cdda to facilitate later changes.
[vlc] / modules / access / cdda / cdda.h
1 /*****************************************************************************
2  * cdda.h : CD-DA input module header for vlc
3  *          using libcdio, libvcd and libvcdinfo
4  *****************************************************************************
5  * Copyright (C) 2003 VideoLAN
6  * $Id: cdda.h,v 1.1 2003/11/26 03:35:26 rocky Exp $
7  *
8  * Authors: Rocky Bernstein <rocky@panix.com> 
9  *
10  * This program is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation; either version 2 of the License, or
13  * (at your option) any later version.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU General Public License for more details.
19  *
20  * You should have received a copy of the GNU General Public License
21  * along with this program; if not, write to the Free Software
22  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
23  *****************************************************************************/
24
25 #include "../vcdx/cdrom.h"
26
27 /*****************************************************************************
28  * Debugging 
29  *****************************************************************************/
30 #define INPUT_DBG_MRL         1 
31 #define INPUT_DBG_EVENT       2 /* Trace keyboard events */
32 #define INPUT_DBG_EXT         4 /* Calls from external routines */
33 #define INPUT_DBG_CALL        8 /* all calls */
34 #define INPUT_DBG_LSN        16 /* LSN changes */
35 #define INPUT_DBG_CDIO       32 /* Debugging from CDIO */
36 #define INPUT_DBG_SEEK       64 /* Seeks to set location */
37
38 #define INPUT_DEBUG 1
39 #if INPUT_DEBUG
40 #define dbg_print(mask, s, args...) \
41    if (p_cdda->i_debug & mask) \
42      msg_Dbg(p_input, "%s: "s, __func__ , ##args)
43 #else
44 #define dbg_print(mask, s, args...) 
45 #endif
46
47 /*****************************************************************************
48  * cdda_data_t: CD audio information
49  *****************************************************************************/
50 typedef struct cdda_data_s
51 {
52     cddev_t     *p_cddev;                           /* CD device descriptor */
53     int         i_nb_tracks;                        /* Nb of tracks (titles) */
54     int         i_track;                                    /* Current track */
55     lsn_t       i_sector;                                  /* Current Sector */
56     lsn_t *     p_sectors;                                  /* Track sectors */
57     vlc_bool_t  b_end_of_track;           /* If the end of track was reached */
58     int         i_debug;                  /* Debugging mask */
59     intf_thread_t *p_intf;
60
61 } cdda_data_t;
62
63 /*****************************************************************************
64  * CDDAPlay: Arrange things so we play the specified track.
65  * VLC_TRUE is returned if there was no error.
66  *****************************************************************************/
67 vlc_bool_t  CDDAPlay         ( input_thread_t *, int );