-static vlc_bool_t VCDEntryPoints ( access_t * );
-static vlc_bool_t VCDLIDs ( access_t * );
-static vlc_bool_t VCDSegments ( access_t * );
+static bool VCDEntryPoints ( access_t * );
+static bool VCDLIDs ( access_t * );
+static bool VCDSegments ( access_t * );
static int VCDTitles ( access_t * );
static char *VCDParse ( access_t *,
/*out*/ vcdinfo_itemid_t * p_itemid ,
static int VCDTitles ( access_t * );
static char *VCDParse ( access_t *,
/*out*/ vcdinfo_itemid_t * p_itemid ,
static void VCDUpdateVar( access_t *p_access, int i_entry, int i_action,
const char *p_varname, char *p_label,
static void VCDUpdateVar( access_t *p_access, int i_entry, int i_action,
const char *p_varname, char *p_label,
break;
default:
msg_Warn( p_vcd_access, "%s\n%s %d", message,
break;
default:
msg_Warn( p_vcd_access, "%s\n%s %d", message,
- VCDSetOrigin(p_access, p_vcdplayer->origin_lsn, p_vcdplayer->i_track,
- &(p_vcdplayer->play_item));
- // p_vcd->in_still = VLC_FALSE;
+ VCDSetOrigin(p_access, p_vcdplayer->origin_lsn, p_vcdplayer->i_track,
+ &(p_vcdplayer->play_item));
+ // p_vcd->in_still = false;
dbg_print(INPUT_DBG_STILL, "still wait time done");
#else
vcdIntfStillTime(p_vcdplayer->p_intf, *p_buf);
dbg_print(INPUT_DBG_STILL, "still wait time done");
#else
vcdIntfStillTime(p_vcdplayer->p_intf, *p_buf);
- dbg_print( (INPUT_DBG_LSN|INPUT_DBG_PBC),
- "entry change to %d, current LSN %u >= end %u",
- i_entry, p_vcdplayer->i_lsn, i_lsn);
+ dbg_print( (INPUT_DBG_LSN|INPUT_DBG_PBC),
+ "entry change to %d, current LSN %u >= end %u",
+ i_entry, p_vcdplayer->i_lsn, i_lsn);
/* Next sector to read */
p_access->info.i_pos = i_pos;
p_vcdplayer->i_lsn = (i_pos / (int64_t) M2F2_SECTOR_SIZE) +
/* Next sector to read */
p_access->info.i_pos = i_pos;
p_vcdplayer->i_lsn = (i_pos / (int64_t) M2F2_SECTOR_SIZE) +
switch (p_vcdplayer->play_item.type) {
case VCDINFO_ITEM_TYPE_TRACK:
case VCDINFO_ITEM_TYPE_ENTRY:
break ;
default:
switch (p_vcdplayer->play_item.type) {
case VCDINFO_ITEM_TYPE_TRACK:
case VCDINFO_ITEM_TYPE_ENTRY:
break ;
default:
dbg_print( (INPUT_DBG_CALL|INPUT_DBG_EXT|INPUT_DBG_SEEK),
"orig %lu, cur: %lu, offset: %lld, entry %d",
dbg_print( (INPUT_DBG_CALL|INPUT_DBG_EXT|INPUT_DBG_SEEK),
"orig %lu, cur: %lu, offset: %lld, entry %d",
(long unsigned int) p_vcdplayer->i_lsn, i_pos,
i_entry );
/* Find seekpoint */
for( i_seekpoint = 0; i_seekpoint < t->i_seekpoint; i_seekpoint++ )
(long unsigned int) p_vcdplayer->i_lsn, i_pos,
i_entry );
/* Find seekpoint */
for( i_seekpoint = 0; i_seekpoint < t->i_seekpoint; i_seekpoint++ )
- {
- if( i_seekpoint + 1 >= t->i_seekpoint ) break;
- if( i_pos < t->seekpoint[i_seekpoint + 1]->i_byte_offset ) break;
- }
-
+ {
+ if( i_seekpoint + 1 >= t->i_seekpoint ) break;
+ if( i_pos < t->seekpoint[i_seekpoint + 1]->i_byte_offset ) break;
+ }
+
- {
- dbg_print( (INPUT_DBG_SEEK), "seekpoint change %lu",
- (long unsigned int) i_seekpoint );
- p_access->info.i_update |= INPUT_UPDATE_SEEKPOINT;
- p_access->info.i_seekpoint = i_seekpoint;
- }
+ {
+ dbg_print( (INPUT_DBG_SEEK), "seekpoint change %lu",
+ (long unsigned int) i_seekpoint );
+ p_access->info.i_update |= INPUT_UPDATE_SEEKPOINT;
+ p_access->info.i_seekpoint = i_seekpoint;
+ }
and initializes area information with that.
Before calling this track information should have been read in.
*****************************************************************************/
and initializes area information with that.
Before calling this track information should have been read in.
*****************************************************************************/
= cdio_get_num_tracks(vcdinfo_get_cd_image(p_vcdplayer->vcd))
+ cdio_get_first_track_num(vcdinfo_get_cd_image(p_vcdplayer->vcd));
unsigned int i;
= cdio_get_num_tracks(vcdinfo_get_cd_image(p_vcdplayer->vcd))
+ cdio_get_first_track_num(vcdinfo_get_cd_image(p_vcdplayer->vcd));
unsigned int i;
- const track_t i_track = vcdinfo_get_track(p_vcdplayer->vcd, i);
- if( i_track <= i_last_track ) {
- seekpoint_t *s = vlc_seekpoint_New();
- char psz_entry[100];
-
- snprintf(psz_entry, sizeof(psz_entry), "%s %02d", _("Entry"), i );
-
- p_vcdplayer->p_entries[i] = vcdinfo_get_entry_lsn(p_vcdplayer->vcd, i);
-
- s->psz_name = strdup(psz_entry);
- s->i_byte_offset =
- (p_vcdplayer->p_entries[i] - vcdinfo_get_track_lsn(p_vcdplayer->vcd, i_track))
- * M2F2_SECTOR_SIZE;
-
- dbg_print( INPUT_DBG_MRL,
- "%s, lsn %d, byte_offset %ld",
- s->psz_name, p_vcdplayer->p_entries[i],
- (unsigned long int) s->i_byte_offset);
+ const track_t i_track = vcdinfo_get_track(p_vcdplayer->vcd, i);
+ if( i_track <= i_last_track ) {
+ seekpoint_t *s = vlc_seekpoint_New();
+ char psz_entry[100];
+
+ snprintf(psz_entry, sizeof(psz_entry), "%s %02d", _("Entry"), i );
+
+ p_vcdplayer->p_entries[i] = vcdinfo_get_entry_lsn(p_vcdplayer->vcd, i);
+
+ s->psz_name = strdup(psz_entry);
+ s->i_byte_offset =
+ (p_vcdplayer->p_entries[i] - vcdinfo_get_track_lsn(p_vcdplayer->vcd, i_track))
+ * M2F2_SECTOR_SIZE;
+
+ dbg_print( INPUT_DBG_MRL,
+ "%s, lsn %d, byte_offset %ld",
+ s->psz_name, p_vcdplayer->p_entries[i],
+ (unsigned long int) s->i_byte_offset);
TAB_APPEND( p_vcdplayer->p_title[i_track-1]->i_seekpoint,
p_vcdplayer->p_title[i_track-1]->seekpoint, s );
} else
msg_Warn( p_access, "wrong track number found in entry points" );
}
TAB_APPEND( p_vcdplayer->p_title[i_track-1]->i_seekpoint,
p_vcdplayer->p_title[i_track-1]->seekpoint, s );
} else
msg_Warn( p_access, "wrong track number found in entry points" );
}
}
}
/*****************************************************************************
* VCDSegments: Reads the information about the segments the disc.
*****************************************************************************/
}
}
/*****************************************************************************
* VCDSegments: Reads the information about the segments the disc.
*****************************************************************************/
dbg_print( (INPUT_DBG_CALL|INPUT_DBG_MRL),
"Segments: %d", p_vcdplayer->i_segments);
dbg_print( (INPUT_DBG_CALL|INPUT_DBG_MRL),
"Segments: %d", p_vcdplayer->i_segments);
vcdinfo_get_seg_sector_count(p_vcdplayer->vcd,
p_vcdplayer->i_segments-1);
vcdinfo_get_seg_sector_count(p_vcdplayer->vcd,
p_vcdplayer->i_segments-1);
}
/*****************************************************************************
Build title table which will be returned via ACCESS_GET_TITLE_INFO.
We start area addressing for tracks at 1 since the default area 0
}
/*****************************************************************************
Build title table which will be returned via ACCESS_GET_TITLE_INFO.
We start area addressing for tracks at 1 since the default area 0
*****************************************************************************/
static int
VCDTitles( access_t * p_access )
*****************************************************************************/
static int
VCDTitles( access_t * p_access )
very careful about this. Note: cdio_get_first_track() will give the
ISO-9660 track before the MPEG tracks.
*/
very careful about this. Note: cdio_get_first_track() will give the
ISO-9660 track before the MPEG tracks.
*/
snprintf( psz_track, sizeof(psz_track), "%s %02d", _("Track"),
i );
snprintf( psz_track, sizeof(psz_track), "%s %02d", _("Track"),
i );
- t->i_size = (int64_t) vcdinfo_get_track_size( p_vcdplayer->vcd,
- i )
- * M2F2_SECTOR_SIZE / CDIO_CD_FRAMESIZE ;
+ t->i_size = (int64_t) vcdinfo_get_track_size( p_vcdplayer->vcd,
+ i )
+ * M2F2_SECTOR_SIZE / CDIO_CD_FRAMESIZE ;
- dbg_print( INPUT_DBG_MRL, "track[%d] i_size: %lld", i, t->i_size );
+ dbg_print( INPUT_DBG_MRL, "track[%d] i_size: %lld", i, t->i_size );
/*****************************************************************************
VCDLIDs: Reads the LIST IDs from the LOT.
*****************************************************************************/
/*****************************************************************************
VCDLIDs: Reads the LIST IDs from the LOT.
*****************************************************************************/
dbg_print( (INPUT_DBG_CALL|INPUT_DBG_MRL),
"LIDs: %d", p_vcdplayer->i_lids);
dbg_print( (INPUT_DBG_CALL|INPUT_DBG_MRL),
"LIDs: %d", p_vcdplayer->i_lids);
*****************************************************************************/
static char *
VCDParse( access_t * p_access, /*out*/ vcdinfo_itemid_t * p_itemid,
*****************************************************************************/
static char *
VCDParse( access_t * p_access, /*out*/ vcdinfo_itemid_t * p_itemid,
if( config_GetInt( p_access, MODULE_STRING "-PBC" ) ) {
p_itemid->type = VCDINFO_ITEM_TYPE_LID;
p_itemid->num = 1;
if( config_GetInt( p_access, MODULE_STRING "-PBC" ) ) {
p_itemid->type = VCDINFO_ITEM_TYPE_LID;
p_itemid->num = 1;
psz_source = config_GetPsz( p_access, "vcd" );
if( !psz_source || 0==strlen(psz_source) ) {
psz_source = config_GetPsz( p_access, "vcd" );
if( !psz_source || 0==strlen(psz_source) ) {
/* Scan for a CD-ROM drive with a VCD in it. */
char **cd_drives = cdio_get_devices_with_cap( NULL,
( CDIO_FS_ANAL_SVCD | CDIO_FS_ANAL_CVD
|CDIO_FS_ANAL_VIDEOCD | CDIO_FS_UNKNOWN ),
/* Scan for a CD-ROM drive with a VCD in it. */
char **cd_drives = cdio_get_devices_with_cap( NULL,
( CDIO_FS_ANAL_SVCD | CDIO_FS_ANAL_CVD
|CDIO_FS_ANAL_VIDEOCD | CDIO_FS_UNKNOWN ),
VCDUpdateVar( p_access, p_itemid->num, VLC_VAR_SETVALUE,
"chapter", _("Entry"), "Setting entry/segment");
p_access->info.i_title = i_track-1;
VCDUpdateVar( p_access, p_itemid->num, VLC_VAR_SETVALUE,
"chapter", _("Entry"), "Setting entry/segment");
p_access->info.i_title = i_track-1;
- p_access->info.i_size = p_vcdplayer->p_title[i_track-1]->i_size;
- p_access->info.i_pos = (int64_t) M2F2_SECTOR_SIZE *
- (vcdinfo_get_track_lsn(p_vcdplayer->vcd, i_track) - i_lsn) ;
+ p_access->info.i_size = p_vcdplayer->p_title[i_track-1]->i_size;
+ p_access->info.i_pos = (int64_t) M2F2_SECTOR_SIZE *
+ (vcdinfo_get_track_lsn(p_vcdplayer->vcd, i_track) - i_lsn) ;
- p_access->info.i_size = M2F2_SECTOR_SIZE * (int64_t)
- vcdinfo_get_entry_sect_count(p_vcdplayer->vcd, p_itemid->num);
- p_access->info.i_pos = 0;
+ p_access->info.i_size = M2F2_SECTOR_SIZE * (int64_t)
+ vcdinfo_get_entry_sect_count(p_vcdplayer->vcd, p_itemid->num);
+ p_access->info.i_pos = 0;
- dbg_print( (INPUT_DBG_LSN|INPUT_DBG_PBC), "size: %llu, pos: %llu",
- p_access->info.i_size, p_access->info.i_pos );
+ dbg_print( (INPUT_DBG_LSN|INPUT_DBG_PBC), "size: %llu, pos: %llu",
+ p_access->info.i_size, p_access->info.i_pos );
if ( vcdinfo_open(&p_vcdobj, &actual_dev, DRIVER_UNKNOWN, NULL) !=
VCDINFO_OPEN_VCD) {
free(actual_dev);
if ( vcdinfo_open(&p_vcdobj, &actual_dev, DRIVER_UNKNOWN, NULL) !=
VCDINFO_OPEN_VCD) {
free(actual_dev);
p_access->pf_control = VCDControl;
p_access->pf_seek = VCDSeek;
p_access->info.i_update = 0;
p_access->info.i_size = 0;
p_access->info.i_pos = 0;
p_access->pf_control = VCDControl;
p_access->pf_seek = VCDSeek;
p_access->info.i_update = 0;
p_access->info.i_size = 0;
p_access->info.i_pos = 0;
p_vcdplayer->play_item.type = VCDINFO_ITEM_TYPE_NOTFOUND;
p_vcdplayer->p_input = vlc_object_find( p_access,
VLC_OBJECT_INPUT,
p_vcdplayer->play_item.type = VCDINFO_ITEM_TYPE_NOTFOUND;
p_vcdplayer->p_input = vlc_object_find( p_access,
VLC_OBJECT_INPUT,
if( ! VCDEntryPoints( p_access ) )
{
msg_Warn( p_access, "could not read entry points, will not use them" );
if( ! VCDEntryPoints( p_access ) )
{
msg_Warn( p_access, "could not read entry points, will not use them" );
vcdinfo_close( p_vcdplayer->vcd );
if( p_vcdplayer->p_input ) vlc_object_release( p_vcdplayer->p_input );
vcdinfo_close( p_vcdplayer->vcd );
if( p_vcdplayer->p_input ) vlc_object_release( p_vcdplayer->p_input );
dbg_print( INPUT_DBG_EVENT,
"seek/fastseek/pause/can_control_pace" );
dbg_print( INPUT_DBG_EVENT,
"seek/fastseek/pause/can_control_pace" );
- if( i < p_vcdplayer->i_tracks )
- {
- /* FIXME! For now we are assuming titles are only
- tracks and that track == title+1 */
- itemid.num = i_track;
- itemid.type = VCDINFO_ITEM_TYPE_TRACK;
- }
- else
- {
- /* FIXME! i_tracks+2 are Segments, but we need to
- be able to figure out which segment of that.
- i_tracks+1 is either Segments (if no LIDs) or
- LIDs otherwise. Again need a way to get the LID
- number. */
- msg_Warn( p_access,
+ if( i < p_vcdplayer->i_tracks )
+ {
+ /* FIXME! For now we are assuming titles are only
+ tracks and that track == title+1 */
+ itemid.num = i_track;
+ itemid.type = VCDINFO_ITEM_TYPE_TRACK;
+ }
+ else
+ {
+ /* FIXME! i_tracks+2 are Segments, but we need to
+ be able to figure out which segment of that.
+ i_tracks+1 is either Segments (if no LIDs) or
+ LIDs otherwise. Again need a way to get the LID
+ number. */
+ msg_Warn( p_access,