* -udf.* to find files
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
- * $Id: access.c,v 1.2 2002/08/07 00:29:36 sam Exp $
+ * $Id: access.c,v 1.3 2002/10/26 15:24:19 gbazin Exp $
*
* Author: Stéphane Borel <stef@via.ecp.fr>
*
vlc_mutex_lock( &p_input->stream.stream_lock );
- p_input->stream.p_selected_area->i_tell += LB2OFF( i_read );
if( p_dvd->b_new_chapter )
{
p_input->stream.p_selected_area->i_part = p_dvd->i_chapter;
p_dvd->b_new_chapter = 0;
}
- if( ( p_input->stream.p_selected_area->i_tell
+ if( ( p_input->stream.p_selected_area->i_tell + LB2OFF( i_read )
>= p_input->stream.p_selected_area->i_size )
|| ( i_block_once <= 0 ) )
{
* access.c: access capabilities for dvdplay plugin.
*****************************************************************************
* Copyright (C) 2001 VideoLAN
- * $Id: access.c,v 1.3 2002/08/29 23:53:22 massiot Exp $
+ * $Id: access.c,v 1.4 2002/10/26 15:24:19 gbazin Exp $
*
* Author: Stéphane Borel <stef@via.ecp.fr>
*
{
dvd_data_t * p_dvd;
off_t i_read;
-
+
p_dvd = (dvd_data_t *)p_input->p_access_data;
vlc_mutex_lock( &p_input->stream.stream_lock );
-
i_read = LB2OFF( dvdplay_read( p_dvd->vmg, p_buffer, OFF2LB( i_count ) ) );
-
- p_input->stream.p_selected_area->i_tell =
- LB2OFF( dvdplay_position( p_dvd->vmg ) ) -
- p_input->stream.p_selected_area->i_start;
-
vlc_mutex_unlock( &p_input->stream.stream_lock );
-
+
return i_read;
}
p_dvd = (dvd_data_t *)p_input->p_access_data;
vlc_mutex_lock( &p_input->stream.stream_lock );
-
+
dvdplay_seek( p_dvd->vmg, OFF2LB( i_off ) );
+ p_input->stream.p_selected_area->i_tell =
+ LB2OFF( dvdplay_position( p_dvd->vmg ) ) -
+ p_input->stream.p_selected_area->i_start;
+
vlc_mutex_unlock( &p_input->stream.stream_lock );
return;
p_input->stream.p_selected_area->i_size =
LB2OFF( dvdplay_title_end ( p_dvd->vmg ) ) -
p_input->stream.p_selected_area->i_start;
+ p_input->stream.p_selected_area->i_tell = 0;
if( p_input->stream.p_selected_area->i_size > 0 )
{
* It depends on: libdvdread for ifo files and block reading.
*****************************************************************************
* Copyright (C) 2001 VideoLAN
- * $Id: input.c,v 1.5 2002/10/23 21:54:33 gbazin Exp $
+ * $Id: input.c,v 1.6 2002/10/26 15:24:19 gbazin Exp $
*
* Author: Stéphane Borel <stef@via.ecp.fr>
*
vlc_mutex_lock( &p_input->stream.stream_lock );
- p_input->stream.p_selected_area->i_tell =
- LB2OFF( p_dvd->i_cur_block ) -
- p_input->stream.p_selected_area->i_start;
-
if( p_dvd->b_eoc )
{
/* We modify i_part only at end of chapter not to erase
p_dvd->b_eoc = 0;
}
- if( p_input->stream.p_selected_area->i_tell
+ if( ( LB2OFF( p_dvd->i_cur_block )
+ - p_input->stream.p_selected_area->i_start )
>= p_input->stream.p_selected_area->i_size || b_eot )
{
if( ( p_input->stream.p_selected_area->i_id + 1 ) >=
* vcd.c : VCD input module for vlc
*****************************************************************************
* Copyright (C) 2000 VideoLAN
- * $Id: vcd.c,v 1.8 2002/10/16 11:35:53 sam Exp $
+ * $Id: vcd.c,v 1.9 2002/10/26 15:24:19 gbazin Exp $
*
* Author: Johan Bilien <jobi@via.ecp.fr>
*
p_last_sector, i_len % VCD_DATA_SIZE );
i_read += i_len % VCD_DATA_SIZE;
}
-
- p_input->stream.p_selected_area->i_tell =
- (off_t)p_vcd->i_sector * (off_t)VCD_DATA_SIZE
- - p_input->stream.p_selected_area->i_start;
return i_read;
}
* input_ext-plugins.c: useful functions for access and demux plug-ins
*****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN
- * $Id: input_ext-plugins.c,v 1.18 2002/07/31 20:56:52 sam Exp $
+ * $Id: input_ext-plugins.c,v 1.19 2002/10/26 15:24:19 gbazin Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
p_input->p_current_data += i_size;
+ /* Update stream position */
+ vlc_mutex_lock( &p_input->stream.stream_lock );
+ p_input->stream.p_selected_area->i_tell += i_size;
+ vlc_mutex_unlock( &p_input->stream.stream_lock );
+
return( i_size );
}
ssize_t i_ret = read( p_access_data->i_handle, p_buffer, i_len );
- if( i_ret > 0 )
- {
- vlc_mutex_lock( &p_input->stream.stream_lock );
- p_input->stream.p_selected_area->i_tell += i_ret;
- vlc_mutex_unlock( &p_input->stream.stream_lock );
- }
-
if( i_ret < 0 )
{
msg_Err( p_input, "read failed (%s)", strerror(errno) );