1 /*****************************************************************************
2 * Copyright (C) 2003 Rocky Bernstein (for VideoLAN)
3 * $Id: vcdplayer.h,v 1.1 2003/10/04 18:55:13 gbazin Exp $
5 * Authors: Rocky Bernstein <rocky@panix.com>
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
20 *****************************************************************************/
22 /* VCD Player header. More or less media-player independent */
27 #include <libvcd/info.h>
29 #define INPUT_DBG_MRL 1
30 #define INPUT_DBG_EXT 2 /* Calls from external routines */
31 #define INPUT_DBG_CALL 4 /* all calls */
32 #define INPUT_DBG_LSN 8 /* LSN changes */
33 #define INPUT_DBG_PBC 16 /* Playback control */
34 #define INPUT_DBG_CDIO 32 /* Debugging from CDIO */
35 #define INPUT_DBG_SEEK 64 /* Seeks to set location */
36 #define INPUT_DBG_STILL 128 /* Still-frame */
37 #define INPUT_DBG_VCDINFO 256 /* Debugging from VCDINFO */
41 #define dbg_print(mask, s, args...) \
42 if (p_vcd->i_debug & mask) \
43 msg_Dbg(p_input, "%s: "s, __func__ , ##args)
45 #define dbg_print(mask, s, args...)
48 #define LOG_ERR(args...) msg_Err( p_input, args )
50 /* vcdplayer_read return status */
56 } vcdplayer_read_status_t;
58 /*****************************************************************************
59 * thread_vcd_data_t: VCD information
60 *****************************************************************************/
61 typedef struct thread_vcd_data_s
63 vcdinfo_obj_t *vcd; /* CD device descriptor */
64 int in_still; /* 0 if not in still,
65 -2 if in infinite loop
66 -5 if a still but haven't
68 >0 number of seconds yet to
70 unsigned int num_tracks; /* Nb of tracks (titles) */
71 unsigned int num_segments; /* Nb of segments */
72 unsigned int num_entries; /* Nb of entries */
73 unsigned int num_lids; /* Nb of List IDs */
74 vcdinfo_itemid_t play_item; /* play-item, VCDPLAYER_BAD_ENTRY
76 int cur_lid; /* LID that play item is in. Implies
77 PBC is on. VCDPLAYER_BAD_ENTRY if
78 not none or not in PBC */
79 PsdListDescriptor pxd; /* If PBC is on, the relevant
81 int pdi; /* current pld index of pxd. -1 if
83 vcdinfo_itemid_t loop_item; /* Where do we loop back to?
84 Meaningful only in a selection
86 int loop_count; /* # of times play-item has been
87 played. Meaningful only in a
89 track_t cur_track; /* Current track number */
90 lsn_t cur_lsn; /* Current logical sector number */
91 lsn_t end_lsn; /* LSN of end of current
92 entry/segment/track. */
93 lsn_t origin_lsn; /* LSN of start of seek/slider */
94 lsn_t * p_sectors; /* Track sectors */
95 lsn_t * p_entries; /* Entry points */
96 lsn_t * p_segments; /* Segments */
97 bool b_valid_ep; /* Valid entry points flag */
98 vlc_bool_t b_end_of_track; /* If the end of track was reached */
99 int i_debug; /* Debugging mask */
103 bool vcdplayer_inc_play_item( input_thread_t *p_input );
104 bool vcdplayer_pbc_is_on(const thread_vcd_data_t *p_this);
106 vcdplayer_read_status_t vcdplayer_pbc_nav ( input_thread_t * p_input );
107 vcdplayer_read_status_t vcdplayer_non_pbc_nav ( input_thread_t * p_input );
108 lid_t vcdplayer_selection2lid ( input_thread_t *p_input, int entry_num ) ;
110 #endif /* _VCDPLAYER_H_ */
113 * c-file-style: "gnu"
115 * indent-tabs-mode: nil