X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Faccess%2Fcdda%2Fcdda.h;h=19b26721128692d23d5153242bd2763f5eaf8e6b;hb=d3081ffff71448139a319259179e365846b711a2;hp=18c9f52a180f51c78132d80b4c231ad487aa0e38;hpb=e41c90dd669fd27702c195e598bb1a579461800f;p=vlc diff --git a/modules/access/cdda/cdda.h b/modules/access/cdda/cdda.h index 18c9f52a18..19b2672112 100644 --- a/modules/access/cdda/cdda.h +++ b/modules/access/cdda/cdda.h @@ -1,11 +1,10 @@ /***************************************************************************** - * cdda.h : CD-DA input module header for vlc - * using libcdio, libvcd and libvcdinfo + * cdda.h : CD-DA input module header for vlc using libcdio. ***************************************************************************** - * Copyright (C) 2003 VideoLAN - * $Id: cdda.h,v 1.3 2003/11/30 22:26:49 rocky Exp $ + * Copyright (C) 2003 the VideoLAN team + * $Id$ * - * Authors: Rocky Bernstein + * Author: Rocky Bernstein * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -19,17 +18,33 @@ * * 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 "../vcdx/cdrom.h" +#include +#include +#include +#include +#if LIBCDIO_VERSION_NUM >= 73 +#include +#include +#endif + +#include +#include #ifdef HAVE_LIBCDDB #include #endif + +#define CDDA_MRL_PREFIX "cddax://" + +/* Frequency of sample in bits per second. */ +#define CDDA_FREQUENCY_SAMPLE 44100 + /***************************************************************************** - * Debugging + * Debugging *****************************************************************************/ #define INPUT_DBG_META 1 /* Meta information */ #define INPUT_DBG_EVENT 2 /* Trace keyboard events */ @@ -45,41 +60,91 @@ #if INPUT_DEBUG #define dbg_print(mask, s, args...) \ if (p_cdda->i_debug & mask) \ - msg_Dbg(p_input, "%s: "s, __func__ , ##args) + msg_Dbg(p_access, "%s: "s, __func__ , ##args) #else -#define dbg_print(mask, s, args...) +#define dbg_print(mask, s, args...) #endif +#if LIBCDIO_VERSION_NUM >= 72 +#include +#include +#else +#define CdIo_t CdIo +#endif + /***************************************************************************** * cdda_data_t: CD audio information *****************************************************************************/ typedef struct cdda_data_s { - cddev_t *p_cddev; /* CD device descriptor */ - int i_nb_tracks; /* Nb of tracks (titles) */ - int i_track; /* Current track */ - lsn_t i_sector; /* Current Sector */ - lsn_t * p_sectors; /* Track sectors */ - vlc_bool_t b_end_of_track; /* If the end of track was reached */ - int i_debug; /* Debugging mask */ - char * mcn; /* Media Catalog Number */ - intf_thread_t *p_intf; + 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 */ + + 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 */ + 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. */ + cdrom_paranoia_t *paranoia; + +#endif + #ifdef HAVE_LIBCDDB - int i_cddb_enabled; + bool b_cddb_enabled; /* Use CDDB at all? */ struct { - bool have_info; /* True if we have any info */ - cddb_disc_t *disc; /* libcdio uses this to get disc info */ - int disc_length; /* Length in frames of cd. Used in - CDDB lookups */ + bool have_info; /* True if we have any info */ + cddb_disc_t *disc; /* libcdio uses this to get disc + info */ + int disc_length; /* Length in frames of cd. Used + in CDDB lookups */ } cddb; #endif + bool b_audio_ctl; /* Use CD-Text audio controls and + audio output? */ + + bool b_cdtext; /* Use CD-Text at all? If not, + cdtext_preferred is meaningless. */ + bool b_cdtext_prefer; /* Prefer CD-Text info over + CDDB? If no CDDB, the issue + is moot. */ + const cdtext_t *p_cdtext[CDIO_CD_MAX_TRACKS]; /* CD-Text info. Origin is NOT + 0 origin but origin of track + number (usually 1). + */ + + WAVEHEADER waveheader; /* Wave header for the output data */ + bool b_header; + bool 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; + } cdda_data_t; -/***************************************************************************** - * CDDAPlay: Arrange things so we play the specified track. - * VLC_TRUE is returned if there was no error. - *****************************************************************************/ -vlc_bool_t CDDAPlay ( input_thread_t *, int ); +/* FIXME: This variable is a hack. Would be nice to eliminate. */ +extern access_t *p_cdda_input;