]> git.sesse.net Git - vlc/blobdiff - modules/access/cdda/cdda.h
Round 3 :)
[vlc] / modules / access / cdda / cdda.h
index 483364d3c464bfab0dcff8bcf2919ccdd07567b7..e5bd48d973482c94aa9a451703a5375b04336eb5 100644 (file)
@@ -1,7 +1,7 @@
 /*****************************************************************************
  * cdda.h : CD-DA input module header for vlc using libcdio.
  *****************************************************************************
- * Copyright (C) 2003 VideoLAN
+ * Copyright (C) 2003 the VideoLAN team
  * $Id$
  *
  * Author: Rocky Bernstein <rocky@panix.com>
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
-#include <vlc/input.h>
+#include <vlc_input.h>
+#include <vlc_access.h>
 #include <cdio/cdio.h>
 #include <cdio/cdtext.h>
-#include "vlc_meta.h"
-#include "codecs.h"
+#if LIBCDIO_VERSION_NUM >= 73
+#include <cdio/audio.h>
+#include <cdio/mmc.h>
+#endif
+
+#include <vlc_meta.h>
+#include <vlc_codecs.h>
 
 #ifdef HAVE_LIBCDDB
 #include <cddb/cddb.h>
 #endif
 
+
 #define CDDA_MRL_PREFIX "cddax://"
 
 /* Frequency of sample in bits per second. */
 
 #if LIBCDIO_VERSION_NUM >= 72
 #include <cdio/cdda.h>
+#include <cdio/paranoia.h>
 #else
 #define CdIo_t CdIo
 #endif    
 
+#if LIBCDIO_VERSION_NUM < 78
 typedef enum {
-  paranoia_none    = 0, /* Note: We make use of 0 as being the same as false */
-  paranoia_overlap = 1
-  paranoia_full    = 2
+  PARANOIA_MODE_DISABLE = 0x00, /* Note: We make use of 0 as being the same as false */
+  PARANOIA_MODE_OVERLAP = 0x04
+  PARANOIA_MODE_FULL    = 0xff
 } paranoia_mode_t;
-
+#endif
   
 /*****************************************************************************
  * cdda_data_t: CD audio information
  *****************************************************************************/
 typedef struct cdda_data_s
 {
-  CdIo_t         *p_cdio;                   /* libcdio CD device */
-  track_t        i_tracks;                 /* # of tracks */
-  track_t        i_first_track;            /* # of first track */
-  track_t        i_titles;                 /* # of titles in playlist */
+  CdIo_t         *p_cdio;             /* libcdio CD device */
+  track_t        i_tracks;            /* # of tracks */
+  track_t        i_first_track;       /* # of first track */
+  track_t        i_titles;            /* # of titles in playlist */
   
   /* Current position */
-  track_t        i_track;                  /* Current track */
-  lsn_t          i_lsn;                    /* Current Logical Sector Number */
+  track_t        i_track;             /* Current track */
+  lsn_t          i_lsn;               /* Current Logical Sector Number */
   
-  int            i_blocks_per_read;        /* # blocks to get in a read */
-  int            i_debug;                  /* Debugging mask */
+  lsn_t          first_frame;         /* LSN of first frame of this track   */
+  lsn_t          last_frame;          /* LSN of last frame of this track    */
+  lsn_t          last_disc_frame;     /* LSN of last frame on CD            */
+  int            i_blocks_per_read;   /* # blocks to get in a read */
+  int            i_debug;             /* Debugging mask */
 
   /* Information about CD */
   vlc_meta_t    *p_meta;
-  char *         psz_mcn;                  /* Media Catalog Number */
-  char *         psz_source;               /* CD drive or CD image filename */
+  char *         psz_mcn;             /* Media Catalog Number */
+  char *         psz_source;          /* CD drive or CD image filename */
   input_title_t *p_title[CDIO_CD_MAX_TRACKS]; /* This *is* 0 origin, not
                                                 track number origin */
 
 #if LIBCDIO_VERSION_NUM >= 72
   /* Paranoia support */
-  paranoia_mode_t e_paranoia;              /* Use cd paranoia for reads? */
-  cdrom_drive_t *paranoia_cd;              /* Place to store drive
-                                             handle given by paranoia. */
+  paranoia_mode_t e_paranoia;         /* Use cd paranoia for reads? */
+  cdrom_drive_t *paranoia_cd;         /* Place to store drive
+                                        handle given by paranoia. */
   cdrom_paranoia_t *paranoia;
 
 #endif    
@@ -115,6 +127,9 @@ typedef struct cdda_data_s
   } cddb;
 #endif
 
+  vlc_bool_t   b_audio_ctl;           /* Use CD-Text audio controls and
+                                        audio output? */
+
   vlc_bool_t   b_cdtext;              /* Use CD-Text at all? If not,
                                         cdtext_preferred is meaningless. */
   vlc_bool_t   b_cdtext_prefer;       /* Prefer CD-Text info over
@@ -128,7 +143,12 @@ typedef struct cdda_data_s
 
   WAVEHEADER   waveheader;            /* Wave header for the output data  */
   vlc_bool_t   b_header;
-  vlc_bool_t   b_nav_mode;
+  vlc_bool_t   b_nav_mode;           /* If false we view the entire CD as
+                                       as a unit rather than each track
+                                       as a unit. If b_nav_mode then the
+                                       slider area represents the Disc rather
+                                       than a track
+                                     */
   
   input_thread_t *p_input;