* dvd.h: thread structure of the DVD plugin
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
- * $Id: dvd.h,v 1.3 2002/03/09 16:48:33 stef Exp $
+ * $Id: dvd.h,v 1.4 2002/05/20 22:45:03 sam Exp $
*
* Author: Stéphane Borel <stef@via.ecp.fr>
*
int i_vts_start; /* offset to beginning of vts */
int i_vts_lb; /* sector in vts */
- int i_end_lb; /* last sector of current cell */
+ int i_last_lb; /* last sector of current cell */
/* Structure that contains all information of the DVD */
struct ifo_s * p_ifo;
* -dvd_udf to find files
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
- * $Id: dvd_access.c,v 1.15 2002/04/25 21:52:42 sam Exp $
+ * $Id: dvd_access.c,v 1.16 2002/05/20 22:45:03 sam Exp $
*
* Author: Stéphane Borel <stef@via.ecp.fr>
*
* Data access functions
*/
-#define DVDLB p_dvd->i_vts_start + p_dvd->i_vts_lb
#define DVDTell LB2OFF( p_dvd->i_vts_start + p_dvd->i_vts_lb ) \
- p_input->stream.p_selected_area->i_start
p_dvd->i_prg_cell += ( p_program->i_number - p_dvd->i_angle );
p_dvd->i_map_cell = CellPrg2Map( p_dvd );
p_dvd->i_map_cell += p_dvd->i_angle_cell;
- p_dvd->i_vts_lb = CellStartSector( p_dvd );
- p_dvd->i_end_lb = CellEndSector( p_dvd );
+ p_dvd->i_vts_lb = CellFirstSector( p_dvd );
+ p_dvd->i_last_lb = CellLastSector( p_dvd );
p_dvd->i_angle = p_program->i_number;
}
else
if( p_area != p_input->stream.p_selected_area )
{
int i_vts_title;
- u32 i_start;
- u32 i_size;
+ u32 i_first;
+ u32 i_last;
/* Reset the Chapter position of the old title */
p_input->stream.p_selected_area->i_part = 1;
vts.title_unit.p_title[p_dvd->i_title_id-1].title.i_cell_nb;
p_dvd->i_map_cell = 0;
p_dvd->i_map_cell = CellPrg2Map( p_dvd );
- i_size = CellEndSector( p_dvd );
+ i_last = CellLastSector( p_dvd );
/* first cell */
p_dvd->i_prg_cell = 0;
p_dvd->i_map_cell = 0;
p_dvd->i_angle_cell = 0;
p_dvd->i_map_cell = CellPrg2Map ( p_dvd );
- p_dvd->i_vts_lb = CellStartSector( p_dvd );
- p_dvd->i_end_lb = CellEndSector ( p_dvd );
+ p_dvd->i_vts_lb = CellFirstSector( p_dvd );
+ p_dvd->i_last_lb = CellLastSector ( p_dvd );
/* Force libdvdcss to check its title key.
* It is only useful for title cracking method. Methods using the
* decrypted disc key are fast enough to check the key at each seek */
- if( ( i_start = dvdcss_seek( p_dvd->dvdhandle, DVDLB,
- DVDCSS_SEEK_KEY ) ) < 0 )
+ i_first = dvdcss_seek( p_dvd->dvdhandle,
+ p_dvd->i_vts_start + p_dvd->i_vts_lb,
+ DVDCSS_SEEK_KEY );
+ if( i_first < 0 )
{
intf_ErrMsg( "dvd error: %s", dvdcss_error( p_dvd->dvdhandle ) );
return -1;
}
- i_size -= p_dvd->i_vts_lb + 1;
-
/* Area definition */
- p_input->stream.p_selected_area->i_start = LB2OFF( i_start );
- p_input->stream.p_selected_area->i_size = LB2OFF( i_size );
+ p_input->stream.p_selected_area->i_start = LB2OFF( i_first );
+ p_input->stream.p_selected_area->i_size =
+ LB2OFF( i_last - p_dvd->i_vts_lb + 1 );
/* Destroy obsolete ES by reinitializing programs */
DVDFlushStream( p_input );
DVDSetProgram( p_input,
p_input->stream.pp_programs[p_dvd->i_angle-1] );
- intf_WarnMsg( 3, "dvd info: title start: %d size: %d",
- i_start, i_size );
+ intf_WarnMsg( 3, "dvd info: title first %i, last %i, size %i",
+ i_first, i_last, i_last - p_dvd->i_vts_lb + 1 );
IfoPrintTitle( p_dvd );
/* No PSM to read in DVD mode, we already have all information */
/* if we're inside a multi-angle zone, we have to choose i_sector
* in the current angle ; we can't do it all the time since cells
* can be very wide out of such zones */
- p_dvd->i_vts_lb = CellStartSector( p_dvd );
+ p_dvd->i_vts_lb = CellFirstSector( p_dvd );
}
- p_dvd->i_end_lb = CellEndSector ( p_dvd );
+ p_dvd->i_last_lb = CellLastSector( p_dvd );
p_dvd->i_chapter = CellPrg2Chapter( p_dvd );
- if( dvdcss_seek( p_dvd->dvdhandle, DVDLB,
+ if( dvdcss_seek( p_dvd->dvdhandle, p_dvd->i_vts_start + p_dvd->i_vts_lb,
DVDCSS_SEEK_MPEG ) < 0 )
{
intf_ErrMsg( "dvd error: %s", dvdcss_error( p_dvd->dvdhandle ) );
* dvd_ifo.c: Functions for ifo parsing
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
- * $Id: dvd_ifo.c,v 1.46 2002/04/03 06:23:08 sam Exp $
+ * $Id: dvd_ifo.c,v 1.47 2002/05/20 22:45:03 sam Exp $
*
* Authors: Stéphane Borel <stef@via.ecp.fr>
* German Tischler <tanis@gaspode.franken.de>
TITINF.i_title_nb = ReadWord( p_ifo, p_buf, &p_tmp );
//fprintf( stderr, "title_inf: TTU nb %d\n", TITINF.i_title_nb );
DumpBytes( p_ifo, p_buf, &p_tmp, 2 );
- TITINF.i_end_byte = ReadDouble( p_ifo, p_buf, &p_tmp );
+ TITINF.i_last_byte = ReadDouble( p_ifo, p_buf, &p_tmp );
/* parsing of title attributes */
TITINF.p_attr = malloc( TITINF.i_title_nb *sizeof(title_attr_t) );
PARINF.i_country_nb = ReadWord( p_ifo, p_buf, &p_tmp );
PARINF.i_vts_nb = ReadWord( p_ifo, p_buf, &p_tmp );
- PARINF.i_end_byte = ReadDouble( p_ifo, p_buf, &p_tmp );
+ PARINF.i_last_byte = ReadDouble( p_ifo, p_buf, &p_tmp );
PARINF.p_parental_desc = malloc( PARINF.i_country_nb
* sizeof(parental_desc_t) );
VTSINF.i_vts_nb = ReadWord( p_ifo, p_buf, &p_tmp );;
//fprintf( stderr, "VTS ATTR Nb: %d\n", VTSINF.i_vts_nb );
DumpBytes( p_ifo, p_buf, &p_tmp, 2 );
- VTSINF.i_end_byte = ReadDouble( p_ifo, p_buf, &p_tmp );
+ VTSINF.i_last_byte = ReadDouble( p_ifo, p_buf, &p_tmp );
VTSINF.pi_vts_attr_start_byte =
malloc( VTSINF.i_vts_nb * sizeof(u32) );
if( VTSINF.pi_vts_attr_start_byte == NULL )
OFF2LB( VTSINF.pi_vts_attr_start_byte[i] ) )
+ ( VTSINF.pi_vts_attr_start_byte[i] & 0x7ff );
- VTSINF.p_vts_attr[i].i_end_byte =
+ VTSINF.p_vts_attr[i].i_last_byte =
ReadDouble( p_ifo, p_buf, &p_tmp );
VTSINF.p_vts_attr[i].i_cat_app_type =
ReadDouble( p_ifo, p_buf, &p_tmp );
ReadBytes( p_ifo, p_buf, &p_tmp, MGINF.psz_id , 12 );
MGINF.psz_id[12] = '\0';
- MGINF.i_end_sector = ReadDouble( p_ifo, p_buf, &p_tmp );
+ MGINF.i_last_sector = ReadDouble( p_ifo, p_buf, &p_tmp );
DumpBytes( p_ifo, p_buf, &p_tmp, 12 );
- MGINF.i_inf_end_sector = ReadDouble( p_ifo, p_buf, &p_tmp );
+ MGINF.i_inf_last_sector = ReadDouble( p_ifo, p_buf, &p_tmp );
DumpBytes( p_ifo, p_buf, &p_tmp, 1 );
MGINF.i_spec_ver = ReadByte( p_ifo, p_buf, &p_tmp );
MGINF.i_cat = ReadDouble( p_ifo, p_buf, &p_tmp );
TITINF.i_title_nb = ReadWord( p_ifo, p_buf, &p_tmp );
//fprintf( stderr, "VTS title_inf nb: %d\n", TITINF.i_title_nb );
DumpBytes( p_ifo, p_buf, &p_tmp, 2 );
- TITINF.i_end_byte = ReadDouble( p_ifo, p_buf, &p_tmp );
+ TITINF.i_last_byte = ReadDouble( p_ifo, p_buf, &p_tmp );
TITINF.pi_start_byte = malloc( TITINF.i_title_nb * sizeof(u32) );
if( TITINF.pi_start_byte == NULL )
TIMINF.i_nb = ReadWord( p_ifo, p_buf, &p_tmp );;
DumpBytes( p_ifo, p_buf, &p_tmp, 2 );
- TIMINF.i_end_byte = ReadDouble( p_ifo, p_buf, &p_tmp );
+ TIMINF.i_last_byte = ReadDouble( p_ifo, p_buf, &p_tmp );
TIMINF.pi_start_byte = malloc( TIMINF.i_nb * sizeof(u32) );
if( TIMINF.pi_start_byte == NULL )
DumpBytes( p_ifo, p_buf, &p_tmp, 1 );
TIMINF.p_time_map[i].i_entry_nb = ReadWord( p_ifo, p_buf, &p_tmp );
- TIMINF.p_time_map[i].pi_sector =
- malloc( TIMINF.p_time_map[i].i_entry_nb * sizeof(u32) );
- if( TIMINF.p_time_map[i].pi_sector == NULL )
+ if( TIMINF.p_time_map[i].i_entry_nb )
{
- intf_ErrMsg( "ifo error: out of memory in IfoTitleSet" );
- return -1;
- }
+ TIMINF.p_time_map[i].pi_sector =
+ malloc( TIMINF.p_time_map[i].i_entry_nb * sizeof(u32) );
+ if( TIMINF.p_time_map[i].pi_sector == NULL )
+ {
+ intf_ErrMsg( "ifo error: out of memory in IfoTitleSet" );
+ return -1;
+ }
- for( j = 0 ; j < TIMINF.p_time_map[i].i_entry_nb ; j++ )
- {
- TIMINF.p_time_map[i].pi_sector[j] =
+ for( j = 0 ; j < TIMINF.p_time_map[i].i_entry_nb ; j++ )
+ {
+ TIMINF.p_time_map[i].pi_sector[j] =
ReadDouble( p_ifo, p_buf, &p_tmp );
+ }
}
}
}
{
for( i = 0 ; i < p_vts->time_inf.i_nb ; i++ )
{
- free( p_vts->time_inf.p_time_map[i].pi_sector );
+ if( p_vts->time_inf.p_time_map[i].i_entry_nb )
+ {
+ free( p_vts->time_inf.p_time_map[i].pi_sector );
+ }
}
free( p_vts->time_inf.p_time_map );
PLAY.i_still_time = ReadByte( p_ifo, p_buf, &p_tmp );
PLAY.i_command_nb = ReadByte( p_ifo, p_buf, &p_tmp );
PLAY.i_play_time = ReadDouble( p_ifo, p_buf, &p_tmp );
- PLAY.i_start_sector = ReadDouble( p_ifo, p_buf, &p_tmp );
+ PLAY.i_first_sector = ReadDouble( p_ifo, p_buf, &p_tmp );
PLAY.i_first_ilvu_vobu_esector = ReadDouble( p_ifo, p_buf, &p_tmp );
PLAY.i_last_vobu_start_sector = ReadDouble( p_ifo, p_buf, &p_tmp );
- PLAY.i_end_sector = ReadDouble( p_ifo, p_buf, &p_tmp );
+ PLAY.i_last_sector = ReadDouble( p_ifo, p_buf, &p_tmp );
#undef PLAY
}
}
p_unit_inf->i_title_nb = ReadWord( p_ifo, p_buf, &p_tmp );
//fprintf( stderr, "Unit nb: %d\n", p_unit_inf->i_title_nb );
DumpBytes( p_ifo, p_buf, &p_tmp, 2 );
- p_unit_inf->i_end_byte = ReadDouble( p_ifo, p_buf, &p_tmp );
+ p_unit_inf->i_last_byte = ReadDouble( p_ifo, p_buf, &p_tmp );
p_unit_inf->p_title =
malloc( p_unit_inf->i_title_nb * sizeof(unit_title_t) );
p_title_unit->i_unit_nb = ReadWord( p_ifo, p_buf, &p_tmp );
DumpBytes( p_ifo, p_buf, &p_tmp, 2 );
- p_title_unit->i_end_byte = ReadDouble( p_ifo, p_buf, &p_tmp );
+ p_title_unit->i_last_byte = ReadDouble( p_ifo, p_buf, &p_tmp );
- //fprintf(stderr, "Unit: nb %d end %d\n", p_title_unit->i_unit_nb, p_title_unit->i_end_byte );
+ //fprintf(stderr, "Unit: nb %d last %d\n", p_title_unit->i_unit_nb, p_title_unit->i_last_byte );
p_title_unit->p_unit = malloc( p_title_unit->i_unit_nb * sizeof(unit_t) );
if( p_title_unit->p_unit == NULL )
p_cell_inf->i_vob_nb = ReadWord( p_ifo, p_buf, &p_tmp );
DumpBytes( p_ifo, p_buf, &p_tmp, 2 );
- p_cell_inf->i_end_byte = ReadDouble( p_ifo, p_buf, &p_tmp );
+ p_cell_inf->i_last_byte = ReadDouble( p_ifo, p_buf, &p_tmp );
- p_cell_inf->i_cell_nb = (p_cell_inf->i_end_byte/* - 7*/) / sizeof(cell_map_t);
+ p_cell_inf->i_cell_nb = (p_cell_inf->i_last_byte + 1/* - 7*/) / sizeof(cell_map_t);
-/* fprintf( stderr, "Cell inf: vob %d end %d cell %d\n", p_cell_inf->i_vob_nb, p_cell_inf->i_end_byte, p_cell_inf->i_cell_nb );
+/* fprintf( stderr, "Cell inf: vob %d, %d cells, last byte %d\n", p_cell_inf->i_vob_nb, p_cell_inf->i_cell_nb, p_cell_inf->i_last_byte );
*/
p_cell_inf->p_cell_map =
malloc( p_cell_inf->i_cell_nb *sizeof(cell_map_t) );
MAP.i_vob_id = ReadWord( p_ifo, p_buf, &p_tmp );
MAP.i_cell_id = ReadByte( p_ifo, p_buf, &p_tmp );
DumpBytes( p_ifo, p_buf, &p_tmp, 1 );
- MAP.i_start_sector = ReadDouble( p_ifo, p_buf, &p_tmp );
+ MAP.i_first_sector = ReadDouble( p_ifo, p_buf, &p_tmp );
/* fprintf(stderr, "sector[%d] %d (%d)\n", i,ntohl(*(u32*)(p_tmp)), p_ifo->i_pos);*/
- MAP.i_end_sector = ReadDouble( p_ifo, p_buf, &p_tmp );
+ MAP.i_last_sector = ReadDouble( p_ifo, p_buf, &p_tmp );
#undef MAP
}
i_start = p_ifo->i_pos;
//fprintf( stderr, "VOBU ADMAP\n" );
- p_vobu_map->i_end_byte = ReadDouble( p_ifo, p_buf, &p_tmp );
- i_max = ( i_start + p_vobu_map->i_end_byte + 1 - p_ifo->i_pos )
+ p_vobu_map->i_last_byte = ReadDouble( p_ifo, p_buf, &p_tmp );
+ i_max = ( i_start + p_vobu_map->i_last_byte + 1 - p_ifo->i_pos )
/ sizeof(u32);
p_vobu_map->pi_vobu_start_sector = malloc( i_max * sizeof(u32) );
* dvd_ifo.h: Structures for ifo parsing
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
- * $Id: dvd_ifo.h,v 1.18 2002/03/08 22:58:12 stef Exp $
+ * $Id: dvd_ifo.h,v 1.19 2002/05/20 22:45:03 sam Exp $
*
* Author: Stéphane Borel <stef@via.ecp.fr>
*
typedef struct cell_play_s
{
/* This information concerns the currently selected cell */
- u16 i_category; // 2 bytes
+ u16 i_category; // 2 bytes
u8 i_still_time; // 1 byte; in seconds; ff=inf
- u8 i_command_nb; // 1 byte; 0 = no com
+ u8 i_command_nb; // 1 byte; 0 = no com
u32 i_play_time; // 4 bytes
- u32 i_start_sector; // 4 bytes
+ u32 i_first_sector; // 4 bytes
u32 i_first_ilvu_vobu_esector; // 4 bytes; ???
- u32 i_last_vobu_start_sector; // 4 bytes
- u32 i_end_sector; // 4 bytes
+ u32 i_last_vobu_start_sector; // 4 bytes
+ u32 i_last_sector; // 4 bytes
} cell_play_t;
/* Cell Position Information Table
{
u16 i_title_nb; // 2 bytes
// char[2] ???
- u32 i_end_byte; // 4 bytes
+ u32 i_last_byte; // 4 bytes
unit_title_t * p_title; // i_srp_nb * 8 bytes
} unit_inf_t;
{
u16 i_unit_nb; // 2 bytes; ???
// char[2] ???
- u32 i_end_byte; // 4 bytes
+ u32 i_last_byte; // 4 bytes
unit_t* p_unit; // i_lu_nb * 8 bytes
unit_inf_t* p_unit_inf; // i_lu_nb * 8 bytes
} title_unit_t;
u16 i_vob_id; // 2 bytes
u8 i_cell_id; // 1 byte
// char ???
- u32 i_start_sector; // 4 bytes
- u32 i_end_sector; // 4 bytes
+ u32 i_first_sector; // 4 bytes
+ u32 i_last_sector; // 4 bytes
} cell_map_t;
typedef struct cell_inf_s
{
u16 i_vob_nb; // 2 bytes
// char[2] ???
- u32 i_end_byte; // 4 bytes
+ u32 i_last_byte; // 4 bytes
u16 i_cell_nb; // not in ifo; computed
// with e_byte
cell_map_t* p_cell_map;
*/
typedef struct vobu_map_s
{
- u32 i_end_byte; // 4 bytes
+ u32 i_last_byte; // 4 bytes
u32* pi_vobu_start_sector; // (nb of vobu) * 4 bytes
} vobu_map_t;
{
u16 i_title_nb; // 2 bytes
// char[2] ???
- u32 i_end_byte; // 4 bytes
+ u32 i_last_byte; // 4 bytes
title_attr_t * p_attr; // i_ttu_nb * 12 bytes
} title_inf_t;
{
u16 i_country_nb; // 2 bytes
u16 i_vts_nb; // 2 bytes
- u32 i_end_byte; // 4 bytes
+ u32 i_last_byte; // 4 bytes
parental_desc_t* p_parental_desc; // i_country_nb * 8 bytes
parental_mask_t* p_parental_mask; // i_country_nb * sizeof(vmg_ptl_mask_t)
} parental_inf_t;
* - start at pi_atrt_sbyte */
typedef struct vts_attr_s
{
- u32 i_end_byte; // 4 bytes
+ u32 i_last_byte; // 4 bytes
u32 i_cat_app_type; // 4 bytes
ifo_video_t vts_menu_video_attr; // 2 bytes
// char ???
{
u16 i_vts_nb; // 2 bytes
// char[2] ???
- u32 i_end_byte; // 4 bytes
+ u32 i_last_byte; // 4 bytes
u32* pi_vts_attr_start_byte; // i_vts_nb * 4 bytes
vts_attr_t* p_vts_attr;
} vts_inf_t;
typedef struct vts_manager_s
{
char psz_id[13]; // 12 bytes (DVDVIDEO-VTS)
- u32 i_end_sector; // 4 bytes
+ u32 i_last_sector; // 4 bytes
// char[12] ???
- u32 i_inf_end_sector; // 4 bytes
+ u32 i_inf_last_sector; // 4 bytes
// char ???
u8 i_spec_ver; // 1 byte
u32 i_cat; // 4 bytes
{
u16 i_title_nb; // 2 bytes
// char[2] ???
- u32 i_end_byte; // 4 bytes
+ u32 i_last_byte; // 4 bytes
u32* pi_start_byte;
title_start_t * p_title_start; // i_ttu_nb * 4 bytes
} vts_title_t;
{
u16 i_nb; // 2 bytes
// char[2] ???
- u32 i_end_byte; // 4 bytes
+ u32 i_last_byte; // 4 bytes
u32* pi_start_byte; // i_tmap_nb * 4 bytes
time_map_t* p_time_map;
} time_inf_t;
/* dvd_seek.c: functions to navigate through DVD.
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
- * $Id: dvd_seek.c,v 1.6 2002/05/16 16:51:50 gbazin Exp $
+ * $Id: dvd_seek.c,v 1.7 2002/05/20 22:45:03 sam Exp $
*
* Author: Stéphane Borel <stef@via.ecp.fr>
*
{
int i_cell;
- i_cell = p_dvd->i_map_cell;
+ i_cell = 0;
if( i_cell >= cell.i_cell_nb )
{
return i_cell_off;
}
-int CellStartSector( thread_dvd_data_t * p_dvd )
+int CellFirstSector( thread_dvd_data_t * p_dvd )
{
- return __MAX( cell.p_cell_map[p_dvd->i_map_cell].i_start_sector,
- title.p_cell_play[p_dvd->i_prg_cell].i_start_sector );
+ return __MAX( cell.p_cell_map[p_dvd->i_map_cell].i_first_sector,
+ title.p_cell_play[p_dvd->i_prg_cell].i_first_sector );
}
-int CellEndSector( thread_dvd_data_t * p_dvd )
+int CellLastSector( thread_dvd_data_t * p_dvd )
{
- return __MIN( cell.p_cell_map[p_dvd->i_map_cell].i_end_sector,
- title.p_cell_play[p_dvd->i_prg_cell].i_end_sector );
+ return __MIN( cell.p_cell_map[p_dvd->i_map_cell].i_last_sector,
+ title.p_cell_play[p_dvd->i_prg_cell].i_last_sector );
}
int NextCellPrg( thread_dvd_data_t * p_dvd )
{
int i_cell = p_dvd->i_prg_cell;
- if( p_dvd->i_vts_lb > title.p_cell_play[i_cell].i_end_sector )
+ if( p_dvd->i_vts_lb > title.p_cell_play[i_cell].i_last_sector )
{
i_cell ++;
i_cell += CellAngleOffset( p_dvd, i_cell );
{
int i_cell = 0;
- while( p_dvd->i_vts_lb > title.p_cell_play[i_cell].i_end_sector )
+ while( p_dvd->i_vts_lb > title.p_cell_play[i_cell].i_last_sector )
{
i_cell ++;
i_cell += CellAngleOffset( p_dvd, i_cell );
{
int i_cell = 0;
- while( p_dvd->i_vts_lb > cell.p_cell_map[i_cell].i_end_sector )
+ while( p_dvd->i_vts_lb > cell.p_cell_map[i_cell].i_last_sector )
{
i_cell ++;
int LbMaxOnce( thread_dvd_data_t * p_dvd )
{
- int i_block_once = p_dvd->i_end_lb - p_dvd->i_vts_lb + 1;
+ int i_block_once = p_dvd->i_last_lb - p_dvd->i_vts_lb + 1;
/* Get the position of the next cell if we're at cell end */
if( i_block_once <= 0 )
return 0;
}
- p_dvd->i_vts_lb = CellStartSector( p_dvd );
- p_dvd->i_end_lb = CellEndSector( p_dvd );
+ p_dvd->i_vts_lb = CellFirstSector( p_dvd );
+ p_dvd->i_last_lb = CellLastSector( p_dvd );
if( ( p_dvd->i_chapter = NextChapter( p_dvd ) ) < 0)
{
return 0;
}
- i_block_once = p_dvd->i_end_lb - p_dvd->i_vts_lb + 1;
+ i_block_once = p_dvd->i_last_lb - p_dvd->i_vts_lb + 1;
}
return i_block_once;
return -1;
}
p_dvd->b_new_chapter = 1;
+
return p_dvd->i_chapter;
}
p_dvd->i_map_cell = 0;
}
p_dvd->i_map_cell = CellPrg2Map( p_dvd );
- p_dvd->i_vts_lb = CellStartSector( p_dvd );
- p_dvd->i_end_lb = CellEndSector( p_dvd );
+ p_dvd->i_vts_lb = CellFirstSector( p_dvd );
+ p_dvd->i_last_lb = CellLastSector( p_dvd );
/* Position the fd pointer on the right address */
if( dvdcss_seek( p_dvd->dvdhandle,
/* dvd_seek.h: DVD access plugin.
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
- * $Id: dvd_seek.h,v 1.3 2002/03/09 16:48:33 stef Exp $
+ * $Id: dvd_seek.h,v 1.4 2002/05/20 22:45:03 sam Exp $
*
* Author: Stéphane Borel <stef@via.ecp.fr>
*
int CellIsInterleaved( thread_dvd_data_t * );
int CellAngleOffset ( thread_dvd_data_t *, int );
int CellPrg2Map ( thread_dvd_data_t * );
-int CellStartSector ( thread_dvd_data_t * );
-int CellEndSector ( thread_dvd_data_t * );
+int CellFirstSector ( thread_dvd_data_t * );
+int CellLastSector ( thread_dvd_data_t * );
int NextCellPrg ( thread_dvd_data_t * );
int Lb2CellPrg ( thread_dvd_data_t * );