Commit bba08209 authored by Stéphane Borel's avatar Stéphane Borel

. Correction of bugs in ifo parsing. Now the structures should be well

initialized. It remains some segfaults but it globally works.
. DVD mode is enabled with option --dvd. For the moment, it only read
the first vts and find the movie if it is at the beginning of the title
set.

Coming soon:
. udf filesystem management to access over 2Gb zones.
. detection of the offset to the movie inside a vts when it is not at
the beginning.

Is there a chance that using fopen/fseek function instead of open/lseek
system calls solve the 2Gb issue ?
parent a9729877
This diff is collapsed.
......@@ -118,13 +118,13 @@ typedef struct pgc_s
*/
/* Menu PGCI Language unit Descriptor */
typedef struct pgci_lu_desc_s
typedef struct pgci_lu_s
{
u16 i_lang_code; // 2 bytes (ISO-xx)
// char ???
u8 i_existence_mask; // 1 byte
u32 i_lu_sbyte; // 4 bytes
} pgci_lu_desc_t;
} pgci_lu_t;
typedef struct pgci_srp_s
{
......@@ -137,13 +137,13 @@ typedef struct pgci_srp_s
/* Menu PGCI Language Unit Table
* - start at i_lu_sbyte */
typedef struct pgci_lu_s
typedef struct pgci_inf_s
{
u16 i_srp_nb; // 2 bytes
// char[2] ???
u32 i_lu_ebyte; // 4 bytes
pgci_srp_t* p_srp; // i_srp_nb * 8 bytes
} pgci_lu_t;
} pgci_inf_t;
/* Main Struct for Menu PGCI
* - start at i_*_pgci_ut_ssector */
......@@ -152,8 +152,8 @@ typedef struct pgci_ut_s
u16 i_lu_nb; // 2 bytes; ???
// char[2] ???
u32 i_ebyte; // 4 bytes
pgci_lu_desc_t* p_lu_desc; // i_lu_nb * 8 bytes
pgci_lu_t* p_lu; // i_lu_nb * 8 bytes
pgci_inf_t* p_pgci_inf; // i_lu_nb * 8 bytes
} pgci_ut_t;
/*
......@@ -445,7 +445,7 @@ typedef struct vts_s
/* Video Title Set Menu PGCI Unit Table */
pgci_ut_t pgci_ut;
/* Video Title Set Program Chain Info Table */
pgci_ut_t pgci_ti;
pgci_inf_t pgci_ti;
/* Video Title Set Time Map Table */
vts_tmap_ti_t tmap_ti;
/* VTSM Cell Adress Table Information */
......
......@@ -88,7 +88,7 @@ static int DVDProbe( input_thread_t * p_input )
static void DVDInit( input_thread_t * p_input )
{
thread_dvd_data_t * p_method;
u32 i_start;// = 2048*90000;
u32 i_start;
if( (p_method = malloc( sizeof(thread_dvd_data_t) )) == NULL )
{
......@@ -101,17 +101,13 @@ static void DVDInit( input_thread_t * p_input )
lseek( p_input->i_handle, 0, SEEK_SET );
vlc_mutex_lock( &p_input->stream.stream_lock );
/* Ifo initialisation */
p_method->ifo = IfoInit( p_input->i_handle );
IfoRead( &(p_method->ifo) );
vlc_mutex_unlock( &p_input->stream.stream_lock );
i_start = p_method->ifo.p_vts[0].i_pos +
p_method->ifo.p_vts[0].mat.i_tt_vobs_ssector *DVD_LB_SIZE;
fprintf(stderr, "Begin at : %d\n", i_start );
lseek( p_input->i_handle, i_start, SEEK_SET );
input_InitStream( p_input, sizeof( stream_ps_data_t ) );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment