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

-Various bug fixes in dvd_netlist. Some bugs seem to remain though.

-New function input_ToggleES for interaction with interface.
-Changes in gnome interface : navigation menus are now splited, there
are radio item in menus and the code should be better.
-First step for dvd_ifo rewritting. Now allocation/disallocation is
being done as it has to be.
-Fixed a bug in title management that make dvd like Seven work.
parent e38b7772
......@@ -4,7 +4,7 @@
* control the pace of reading.
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: input_ext-intf.h,v 1.28 2001/03/07 10:31:10 stef Exp $
* $Id: input_ext-intf.h,v 1.29 2001/04/01 07:31:38 stef Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
......@@ -353,3 +353,6 @@ void input_Seek ( struct input_thread_s *, off_t );
void input_DumpStream( struct input_thread_s * );
char * input_OffsetToTime( struct input_thread_s *, char * psz_buffer, off_t );
int input_ChangeES ( struct input_thread_s *, struct es_descriptor_s *, int );
int input_ToggleES ( struct input_thread_s *,
struct es_descriptor_s *,
boolean_t );
This diff is collapsed.
......@@ -2,7 +2,7 @@
* dvd_ifo.h: Structures for ifo parsing
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
* $Id: dvd_ifo.h,v 1.8 2001/02/22 08:44:45 stef Exp $
* $Id: dvd_ifo.h,v 1.9 2001/04/01 07:31:38 stef Exp $
*
* Author: Stphane Borel <stef@via.ecp.fr>
*
......@@ -76,7 +76,7 @@ typedef struct ifo_spu_t
/* Ifo vitual machine Commands */
typedef struct ifo_command_s
typedef struct command_desc_s
{
u8 i_type :3;
u8 i_direct :1;
......@@ -89,162 +89,162 @@ typedef struct ifo_command_s
u8 pi_8[6];
u16 pi_16[3];
} data;
} ifo_command_t;
} command_desc_t;
/* Program Chain Command Table
- start at i_pgc_com_tab_sbyte */
typedef struct pgc_com_tab_s
typedef struct command_s
{
u16 i_pre_com_nb; // 2 bytes
u16 i_post_com_nb; // 2 bytes
u16 i_cell_com_nb; // 2 bytes
u16 i_pre_command_nb; // 2 bytes
u16 i_post_command_nb; // 2 bytes
u16 i_cell_command_nb; // 2 bytes
// char[2] ???
ifo_command_t* p_pre_com; // i_pre_com_nb * 8 bytes
ifo_command_t* p_post_com; // i_post_com_nb * 8 bytes
ifo_command_t* p_cell_com; // i_cell_com_nb * 8 bytes
} pgc_com_tab_t;
command_desc_t* p_pre_command; // i_pre_com_nb * 8 bytes
command_desc_t* p_post_command; // i_post_com_nb * 8 bytes
command_desc_t* p_cell_command; // i_cell_com_nb * 8 bytes
} command_t;
/* Program Chain Map Table
* - start at "i_pgc_prg_map_sbyte" */
typedef struct pgc_prg_map_s
typedef struct chapter_map_s
{
u8* pi_entry_cell; // i_prg_nb * 1 byte
} pgc_prg_map_t;
u8* pi_start_cell; // i_prg_nb * 1 byte
} chapter_map_t;
/* Cell Playback Information Table
* we have a pointer to such a structure for each cell
* - first start at "i_cell_play_inf_sbyte" */
typedef struct cell_play_inf_s
typedef struct cell_play_s
{
/* This information concerns the currently selected cell */
u16 i_cat; // 2 bytes
u16 i_category; // 2 bytes
u8 i_still_time; // 1 byte; in seconds; ff=inf
u8 i_com_nb; // 1 byte; 0 = no com
u8 i_command_nb; // 1 byte; 0 = no com
u32 i_play_time; // 4 bytes
u32 i_entry_sector; // 4 bytes
u32 i_start_sector; // 4 bytes
u32 i_first_ilvu_vobu_esector; // 4 bytes; ???
u32 i_lvobu_ssector; // 4 bytes
u32 i_lsector; // 4 bytes
} cell_play_inf_t;
u32 i_last_vobu_start_sector; // 4 bytes
u32 i_end_sector; // 4 bytes
} cell_play_t;
/* Cell Position Information Table
* we have a pointer to such a structure for each cell
* - first start at "i_cell_pos_inf_sbyte" */
typedef struct cell_pos_inf_s
typedef struct cell_pos_s
{
/* This information concerns the currently selected cell */
u16 i_vob_id; // 2 bytes
// char ???
u8 i_cell_id; // 1 byte
} cell_pos_inf_t;
} cell_pos_t;
/* Main structure for Program Chain
* - start at i_fp_pgc_sbyte
* - or at i_vmgm_pgci_sbyte in vmgm_pgci_srp_t */
typedef struct pgc_s
typedef struct title_s
{
/* Global features of program chain */
// char[2] ???
u8 i_prg_nb; // 1 byte
u8 i_chapter_nb; // 1 byte
u8 i_cell_nb; // 1 byte
u32 i_play_time; // 4 bytes
u32 i_prohibited_user_op; // 4 bytes
u16 pi_audio_status[8]; // 8*2 bytes
u32 pi_subpic_status[32]; // 32*4 bytes
u16 i_next_pgc_nb; // 2 bytes
u16 i_prev_pgc_nb; // 2 bytes
u16 i_goup_pgc_nb; // 2 bytes
u16 i_next_title_num; // 2 bytes
u16 i_prev_title_num; // 2 bytes
u16 i_go_up_title_num; // 2 bytes
u8 i_still_time; // 1 byte ; in seconds
u8 i_play_mode; // 1 byte
/* In video_ts.ifo, the 3 significant bytes of each color are
* preceded by 1 unsignificant byte */
u32 pi_yuv_color[16]; // 16*3 bytes
/* Here come the start bytes of the following structures */
u16 i_com_tab_sbyte; // 2 bytes
u16 i_prg_map_sbyte; // 2 bytes
u16 i_cell_play_inf_sbyte; // 2 bytes
u16 i_cell_pos_inf_sbyte; // 2 bytes
u16 i_command_start_byte; // 2 bytes
u16 i_chapter_map_start_byte; // 2 bytes
u16 i_cell_play_start_byte; // 2 bytes
u16 i_cell_pos_start_byte; // 2 bytes
/* Predefined structures */
pgc_com_tab_t com_tab;
pgc_prg_map_t prg_map;
cell_play_inf_t* p_cell_play_inf; // i_cell_nb * 24 bytes
cell_pos_inf_t* p_cell_pos_inf; // i_cell_nb * 4 bytes
} pgc_t;
command_t command;
chapter_map_t chapter_map;
cell_play_t* p_cell_play; // i_cell_nb * 24 bytes
cell_pos_t* p_cell_pos; // i_cell_nb * 4 bytes
} title_t;
/*
* Menu PGCI Unit Table
*/
/* Menu PGCI Language unit Descriptor */
typedef struct pgci_lu_s
typedef struct unit_s
{
char ps_lang_code[2]; // 2 bytes (ISO-xx)
// char ???
u8 i_existence_mask; // 1 byte
u32 i_lu_sbyte; // 4 bytes
} pgci_lu_t;
u32 i_unit_inf_start_byte; // 4 bytes
} unit_t;
typedef struct pgci_srp_s
typedef struct unit_title_s
{
u8 i_pgc_cat_mask; // 1 byte
u8 i_pgc_cat; // 1 byte
u16 i_par_mask; // 2 bytes
u32 i_pgci_sbyte; // 4 bytes
pgc_t pgc;
} pgci_srp_t;
u8 i_category_mask; // 1 byte
u8 i_category; // 1 byte
u16 i_parental_mask; // 2 bytes
u32 i_title_start_byte; // 4 bytes
title_t title;
} unit_title_t;
/* Menu PGCI Language Unit Table
* - start at i_lu_sbyte */
typedef struct pgci_inf_s
typedef struct unit_inf_s
{
u16 i_srp_nb; // 2 bytes
u16 i_title_nb; // 2 bytes
// char[2] ???
u32 i_lu_ebyte; // 4 bytes
pgci_srp_t* p_srp; // i_srp_nb * 8 bytes
} pgci_inf_t;
u32 i_end_byte; // 4 bytes
unit_title_t * p_title; // i_srp_nb * 8 bytes
} unit_inf_t;
/* Main Struct for Menu PGCI
* - start at i_*_pgci_ut_ssector */
typedef struct pgci_ut_s
typedef struct title_unit_s
{
u16 i_lu_nb; // 2 bytes; ???
u16 i_unit_nb; // 2 bytes; ???
// char[2] ???
u32 i_ebyte; // 4 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;
u32 i_end_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;
/*
* Cell Adress Table Information
*/
typedef struct cell_inf_s
typedef struct cell_map_s
{
u16 i_vob_id; // 2 bytes
u8 i_cell_id; // 1 byte
// char ???
u32 i_ssector; // 4 bytes
u32 i_esector; // 4 bytes
} cell_inf_t;
u32 i_start_sector; // 4 bytes
u32 i_end_sector; // 4 bytes
} cell_map_t;
typedef struct c_adt_s
typedef struct cell_inf_s
{
u16 i_vob_nb; // 2 bytes
// char[2] ???
u32 i_ebyte; // 4 bytes
u32 i_end_byte; // 4 bytes
u16 i_cell_nb; // not in ifo; computed
// with e_byte
cell_inf_t* p_cell_inf;
} c_adt_t;
cell_map_t* p_cell_map;
} cell_inf_t;
/*
* VOBU Adress Map Table
*/
typedef struct vobu_admap_s
typedef struct vobu_map_s
{
u32 i_ebyte; // 4 bytes
u32* pi_vobu_ssector; // (nb of vobu) * 4 bytes
} vobu_admap_t;
u32 i_end_byte; // 4 bytes
u32* pi_vobu_start_sector; // (nb of vobu) * 4 bytes
} vobu_map_t;
/*****************************************************************************
* Structures for Video Management (cf video_ts.ifo)
......@@ -253,43 +253,43 @@ typedef struct vobu_admap_s
/*
* Video Manager Information Management Table
*/
typedef struct vmgi_mat_s
typedef struct manager_inf_s
{
char psz_id[13]; // 12 bytes (DVDVIDEO-VMG)
u32 i_lsector; // 4 bytes
u32 i_vmg_end_sector; // 4 bytes
// char[12] ???
u32 i_i_lsector; // 4 bytes
u32 i_vmg_inf_end_sector; // 4 bytes
// char ???
u8 i_spec_ver; // 1 byte
u32 i_cat; // 4 bytes
u16 i_vol_nb; // 2 bytes
u16 i_vol; // 2 bytes
u16 i_volume_nb; // 2 bytes
u16 i_volume; // 2 bytes
u8 i_disc_side; // 1 bytes
// char[20] ???
u16 i_tts_nb; // 2 bytes
u16 i_title_set_nb; // 2 bytes
char ps_provider_id[32]; // 32 bytes
u64 i_pos_code; // 8 bytes
// char[24] ???
u32 i_i_mat_ebyte; // 4 bytes
u32 i_fp_pgc_sbyte; // 4 bytes
u32 i_vmg_inf_end_byte; // 4 bytes
u32 i_first_play_title_start_byte; // 4 bytes
// char[56] ???
u32 i_vobs_ssector; // 4 bytes
u32 i_ptt_srpt_ssector; // 4 bytes
u32 i_pgci_ut_ssector; // 4 bytes
u32 i_ptl_mait_ssector; // 4 bytes
u32 i_vts_atrt_ssector; // 4 bytes
u32 i_txtdt_mg_ssector; // 4 bytes
u32 i_c_adt_ssector; // 4 bytes
u32 i_vobu_admap_ssector; // 4 bytes
u32 i_vob_start_sector; // 4 bytes
u32 i_title_inf_start_sector; // 4 bytes
u32 i_title_unit_start_sector; // 4 bytes
u32 i_parental_inf_start_sector; // 4 bytes
u32 i_vts_inf_start_sector; // 4 bytes
u32 i_text_data_start_sector; // 4 bytes
u32 i_cell_inf_start_sector; // 4 bytes
u32 i_vobu_map_start_sector; // 4 bytes
// char[2] ???
ifo_video_t video_atrt; // 2 bytes
ifo_video_t video_attr; // 2 bytes
// char ???
u8 i_audio_nb; // 1 byte
ifo_audio_t p_audio_atrt[8]; // i_vmgm_audio_nb * 8 bytes
ifo_audio_t p_audio_attr[8]; // i_vmgm_audio_nb * 8 bytes
// char[16] ???
u8 i_subpic_nb; // 1 byte
ifo_spu_t p_subpic_atrt[32]; // i_subpic_nb * 6 bytes
} vmgi_mat_t;
u8 i_spu_nb; // 1 byte
ifo_spu_t p_spu_attr[32]; // i_subpic_nb * 6 bytes
} manager_inf_t;
/*
......@@ -298,53 +298,53 @@ typedef struct vmgi_mat_s
/* Title sets structure
* we have a pointer to this structure for each tts */
typedef struct tts_s
typedef struct title_attr_s
{
u8 i_play_type; // 1 byte
u8 i_angle_nb; // 1 byte
u16 i_ptt_nb; // 2 bytes; Chapters/PGs
u16 i_chapter_nb; // 2 bytes; Chapters/PGs
u16 i_parental_id; // 2 bytes
u8 i_tts_nb; // 1 byte (VTS#)
u8 i_vts_ttn; // 1 byte ???
u32 i_ssector; // 4 bytes
} tts_t;
u8 i_title_set_num; // 1 byte (VTS#)
u8 i_title_num; // 1 byte ???
u32 i_start_sector; // 4 bytes
} title_attr_t;
/* Main struct for tts
* - start at "i_vmg_ptt_srpt_ssector" */
typedef struct vmg_ptt_srpt_s
typedef struct title_inf_s
{
u16 i_ttu_nb; // 2 bytes
u16 i_title_nb; // 2 bytes
// char[2] ???
u32 i_ebyte; // 4 bytes
tts_t* p_tts; // i_ttu_nb * 12 bytes
} vmg_ptt_srpt_t;
u32 i_end_byte; // 4 bytes
title_attr_t * p_attr; // i_ttu_nb * 12 bytes
} title_inf_t;
/*
* Parental Management Information Table
*/
typedef struct vmg_ptl_mai_desc_s
typedef struct parental_desc_s
{
char ps_country_code[2]; // 2 bytes
// char[2] ???
u16 i_ptl_mai_sbyte; // 2 bytes
u16 i_parental_mask_start_byte; // 2 bytes
// char[2] ???
} vmg_ptl_mai_desc_t;
} parental_desc_t;
typedef struct vmg_ptl_mask_s
typedef struct parental_mask_s
{
u16* ppi_ptl_mask[8]; // (i_vts_nb +1) * 8 * 2 bytes
} vmg_ptl_mask_t;
u16* ppi_mask[8]; // (i_vts_nb +1) * 8 * 2 bytes
} parental_mask_t;
/* Main struct for parental management
* - start at i_vmg_ptl_mait_ssector */
typedef struct vmg_ptl_mait_s
typedef struct parental_inf_s
{
u16 i_country_nb; // 2 bytes
u16 i_vts_nb; // 2 bytes
u32 i_ebyte; // 4 bytes
vmg_ptl_mai_desc_t* p_ptl_desc; // i_country_nb * 8 bytes
vmg_ptl_mask_t* p_ptl_mask; // i_country_nb * sizeof(vmg_ptl_mask_t)
} vmg_ptl_mait_t;
u32 i_end_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;
/*
* Video Title Set Attribute Table
......@@ -352,51 +352,51 @@ typedef struct vmg_ptl_mait_s
/* Attribute structure : one for each vts
* - start at pi_atrt_sbyte */
typedef struct vts_atrt_s
typedef struct vts_attr_s
{
u32 i_ebyte; // 4 bytes
u32 i_end_byte; // 4 bytes
u32 i_cat_app_type; // 4 bytes
ifo_video_t vtsm_video_atrt; // 2 bytes
ifo_video_t vts_menu_video_attr; // 2 bytes
// char ???
u8 i_vtsm_audio_nb; // 1 byte
ifo_audio_t p_vtsm_audio_atrt[8]; // 8 * 8 bytes
u8 i_vts_menu_audio_nb; // 1 byte
ifo_audio_t p_vts_menu_audio_attr[8]; // 8 * 8 bytes
// char[17] ???
u8 i_vtsm_subpic_nb; // 1 byte
ifo_spu_t p_vtsm_subpic_atrt[28]; // i_vtsm_subpic_nb * 6 bytes
u8 i_vts_menu_spu_nb; // 1 byte
ifo_spu_t p_vts_menu_spu_attr[28]; // i_vtsm_subpic_nb * 6 bytes
// char[2] ???
ifo_video_t vtstt_video_atrt; // 2 bytes
ifo_video_t vts_title_video_attr; // 2 bytes
// char ???
u8 i_vtstt_audio_nb; // 1 byte
ifo_audio_t p_vtstt_audio_atrt[8]; // 8 * 8 bytes
u8 i_vts_title_audio_nb; // 1 byte
ifo_audio_t p_vts_title_audio_attr[8]; // 8 * 8 bytes
// char[17] ???
u8 i_vtstt_subpic_nb; // 1 byte
ifo_spu_t p_vtstt_subpic_atrt[28]; // i_vtstt_subpic_nb * 6 bytes
} vts_atrt_t;
u8 i_vts_title_spu_nb; // 1 byte
ifo_spu_t p_vts_title_spu_attr[28]; // i_vtstt_subpic_nb * 6 bytes
} vts_attr_t;
/* Main struct for vts attributes
* - start at i_vmg_vts_atrt_ssector */
typedef struct vmg_vts_atrt_s
typedef struct vts_inf_s
{
u16 i_vts_nb; // 2 bytes
// char[2] ???
u32 i_ebyte; // 4 bytes
u32* pi_vts_atrt_sbyte; // i_vts_nb * 4 bytes
vts_atrt_t* p_vts_atrt;
} vmg_vts_atrt_t;
u32 i_end_byte; // 4 bytes
u32* pi_vts_attr_start_byte; // i_vts_nb * 4 bytes
vts_attr_t* p_vts_attr;
} vts_inf_t;
/*
* Global Structure for Video Manager
*/
typedef struct vmg_s
{
vmgi_mat_t mat;
pgc_t pgc;
vmg_ptt_srpt_t ptt_srpt;
pgci_ut_t pgci_ut;
vmg_ptl_mait_t ptl_mait;
vmg_vts_atrt_t vts_atrt;
c_adt_t c_adt;
vobu_admap_t vobu_admap;
manager_inf_t manager_inf;
title_t title;
title_inf_t title_inf;
title_unit_t title_unit;
parental_inf_t parental_inf;
vts_inf_t vts_inf;
cell_inf_t cell_inf;
vobu_map_t vobu_map;
} vmg_t;
/*****************************************************************************
......@@ -406,46 +406,46 @@ typedef struct vmg_s
/*
* Video Title Sets Information Management Table
*/
typedef struct vtsi_mat_s
typedef struct vts_manager_s
{
char psz_id[13]; // 12 bytes (DVDVIDEO-VTS)
u32 i_lsector; // 4 bytes
u32 i_end_sector; // 4 bytes
// char[12] ???
u32 i_i_lsector; // 4 bytes
u32 i_inf_end_sector; // 4 bytes
// char ???
u8 i_spec_ver; // 1 byte
u32 i_cat; // 4 bytes
// char[90] ???
u32 i_mat_ebyte; // 4 bytes
u32 i_inf_end_byte; // 4 bytes
// char[60] ???
u32 i_m_vobs_ssector; // 4 bytes
u32 i_tt_vobs_ssector; // 4 bytes
u32 i_ptt_srpt_ssector; // 4 bytes
u32 i_pgcit_ssector; // 4 bytes
u32 i_m_pgci_ut_ssector; // 4 bytes
u32 i_tmap_ti_ssector; // 4 bytes
u32 i_m_c_adt_ssector; // 4 bytes
u32 i_m_vobu_admap_ssector; // 4 bytes
u32 i_c_adt_ssector; // 4 bytes
u32 i_vobu_admap_ssector; // 4 bytes
u32 i_menu_vob_start_sector; // 4 bytes
u32 i_title_vob_start_sector; // 4 bytes
u32 i_title_inf_start_sector; // 4 bytes
u32 i_title_unit_start_sector; // 4 bytes
u32 i_menu_unit_start_sector; // 4 bytes
u32 i_time_inf_start_sector; // 4 bytes
u32 i_menu_cell_inf_start_sector; // 4 bytes
u32 i_menu_vobu_map_start_sector; // 4 bytes
u32 i_cell_inf_start_sector; // 4 bytes
u32 i_vobu_map_start_sector; // 4 bytes
// char[24] ???
ifo_video_t m_video_atrt; // 2 bytes
ifo_video_t menu_video_attr; // 2 bytes
// char ???
u8 i_m_audio_nb; // 1 byte
ifo_audio_t p_m_audio_atrt[8]; // i_vmgm_audio_nb * 8 bytes
u8 i_menu_audio_nb; // 1 byte
ifo_audio_t p_menu_audio_attr[8]; // i_vmgm_audio_nb * 8 bytes
// char[16] ???
u8 i_m_subpic_nb; // 1 byte
ifo_spu_t p_m_subpic_atrt[32]; // i_subpic_nb * 6 bytes
u8 i_menu_spu_nb; // 1 byte
ifo_spu_t p_menu_spu_attr[32]; // i_subpic_nb * 6 bytes
// !!! only 28 subpics ???
// char[2] ???
ifo_video_t video_atrt; // 2 bytes
ifo_video_t video_attr; // 2 bytes
// char ???
u8 i_audio_nb; // 1 byte
ifo_audio_t p_audio_atrt[8]; // i_vmgm_audio_nb * 8 bytes
ifo_audio_t p_audio_attr[8]; // i_vmgm_audio_nb * 8 bytes
// char[16] ???
u8 i_subpic_nb; // 1 byte
ifo_spu_t p_subpic_atrt[32]; // i_subpic_nb * 6 bytes
} vtsi_mat_t;
u8 i_spu_nb; // 1 byte
ifo_spu_t p_spu_attr[32]; // i_subpic_nb * 6 bytes
} vts_manager_t;
/*
* Part Of Title Search Pointer Table Information
......@@ -453,70 +453,63 @@ typedef struct vtsi_mat_s
/* Title sets structure
* we have a pointer to this structure for each tts */
typedef struct ttu_s
typedef struct title_start_s
{
u16 i_pgc_nb; // 2 bytes; Chapters/PGs
u16 i_prg_nb; // 2 bytes
} ttu_t;
u16 i_program_chain_num; // 2 bytes; Chapters/PGs
u16 i_program_num; // 2 bytes
} title_start_t;
/* Main struct for tts
* - start at "i_vts_ptt_srpt_ssector" */
typedef struct vts_ptt_srpt_s
typedef struct vts_title_s
{
u16 i_ttu_nb; // 2 bytes
u16 i_title_nb; // 2 bytes
// char[2] ???
u32 i_ebyte; // 4 bytes
u32* pi_ttu_sbyte;
ttu_t* p_ttu; // i_ttu_nb * 4 bytes
} vts_ptt_srpt_t;
u32 i_end_byte; // 4 bytes
u32* pi_start_byte;
title_start_t * p_title_start; // i_ttu_nb * 4 bytes
} vts_title_t;
/*
* Time Map table information
*/
/* Time Map structure */
typedef struct tmap_s
typedef struct time_map_s
{
u8 i_time_unit; // 1 byte
// char ???
u16 i_entry_nb; // 2 bytes
u32* pi_sector; // i_entry_nb * 4 bytes
} tmap_t;
} time_map_t;
/* Main structure for tmap_ti
* - start at "i_tmap_ti_ssector" */
typedef struct vts_tmap_ti_s
typedef struct time_inf_s
{
u16 i_nb; // 2 bytes
// char[2] ???
u32 i_ebyte; // 4 bytes
u32* pi_sbyte; // i_tmap_nb * 4 bytes
tmap_t* p_tmap;
} vts_tmap_ti_t;
u32 i_end_byte; // 4 bytes
u32* pi_start_byte; // i_tmap_nb * 4 bytes
time_map_t* p_time_map;
} time_inf_t;
/*
* Video Title Set
*/
typedef struct vts_s
{
boolean_t b_initialized;
off_t i_pos;
vtsi_mat_t mat;
/* Part Of Title Search Pointer Table Info */
vts_ptt_srpt_t ptt_srpt;
/* Video Title Set Menu PGCI Unit Table */
pgci_ut_t pgci_ut;
/* Video Title Set Program Chain Info Table */
pgci_inf_t pgci_ti;
/* Video Title Set Time Map Table */
vts_tmap_ti_t tmap_ti;
/* VTSM Cell Adress Table Information */
c_adt_t m_c_adt;
/* VTSM VOBU Adress Map Table */
vobu_admap_t m_vobu_admap;
/* VTS Cell Adress Table Information */
c_adt_t c_adt;
/* VTS VOBU Adress Map Table */
vobu_admap_t vobu_admap;
vts_manager_t manager_inf;
vts_title_t title_inf;
title_unit_t menu_unit;
unit_inf_t title_unit;
time_inf_t time_inf;
cell_inf_t menu_cell_inf;
vobu_map_t menu_vobu_map;
cell_inf_t cell_inf;
vobu_map_t vobu_map;
} vts_t;
/*
......@@ -524,19 +517,12 @@ typedef struct vts_s
*/
typedef struct ifo_s
{
/* File descriptor for the device */
int i_fd;
/* Offset to video_ts.ifo on the device */
off_t i_off;
/* Position of stream pointer */
off_t i_pos;
/* Error Management */
boolean_t b_error;
/* Current title set number */
int i_title;
/* Structure described in video_ts */
vmg_t vmg;
/* Vts ifo for current title set */
vts_t vts;
int i_fd; /* File descriptor for the device */
off_t i_off; /* Offset to video_ts.ifo on the device */
off_t i_pos; /* Position of stream pointer */
boolean_t b_error; /* Error Management */
vmg_t vmg; /* Structure described in video_ts */
int i_title; /* Current title number */
vts_t vts; /* Vts ifo for current title set */
} ifo_t;
......@@ -7,7 +7,7 @@
* will only be given back to netlist when refcount is zero.
*****************************************************************************
* Copyright (C) 1998, 1999, 2000, 2001 VideoLAN
* $Id: dvd_netlist.c,v 1.3 2001/03/22 01:23:03 stef Exp $
* $Id: dvd_netlist.c,v 1.4 2001/04/01 07:31:38 stef Exp $
*
* Authors: Henri Fallon <henri@videolan.org>
* Stphane Borel <stef@videolan.org>
......@@ -357,7 +357,7 @@ struct data_packet_s * DVDNewPacket( void * p_method_data,
{
dvd_netlist_t * p_netlist;
struct data_packet_s * p_packet;
//intf_ErrMsg( "netlist: New packet" );
/* cast */
p_netlist = (dvd_netlist_t *)p_method_data;
......@@ -382,14 +382,18 @@ struct data_packet_s * DVDNewPacket( void * p_method_data,
p_packet = p_netlist->pp_free_data[p_netlist->i_data_start];
p_packet->p_buffer =
p_netlist->p_free_iovec[p_netlist->i_iovec_start].iov_base;
p_netlist->p_free_iovec[p_netlist->i_iovec_start].iov_base;
p_packet->p_payload_start = p_packet->p_buffer;
p_packet->p_payload_end =
p_packet->p_buffer + i_buffer_size;
p_packet->p_buffer + i_buffer_size;
p_packet->p_next = NULL;
p_packet->b_discard_payload = 0;
p_packet->pi_refcount = p_netlist->pi_refcount + p_netlist->i_iovec_start;
(*p_packet->pi_refcount)++;
p_netlist->i_iovec_start ++;
p_netlist->i_iovec_start &= p_netlist->i_nb_iovec;
......@@ -411,6 +415,7 @@ struct pes_packet_s * DVDNewPES( void * p_method_data )
dvd_netlist_t * p_netlist;
pes_packet_t * p_return;
//intf_ErrMsg( "netlist: New pes" );
/* cast */
p_netlist = (dvd_netlist_t *)p_method_data;
......@@ -433,9 +438,10 @@ struct pes_packet_s * DVDNewPES( void * p_method_data )
vlc_mutex_unlock (&p_netlist->lock);
/* initialize PES */
p_return->b_data_alignment =
p_return->b_discontinuity =
p_return->i_pts = p_return->i_dts = 0;
p_return->b_data_alignment = 0;
p_return->b_discontinuity = 0;
p_return->i_pts = 0;
p_return->i_dts = 0;
p_return->i_pes_size = 0;
p_return->p_first = NULL;
......@@ -462,6 +468,9 @@ void DVDDeletePacket( void * p_method_data, data_packet_t * p_data )
p_netlist->pp_free_data[p_netlist->i_data_end] = p_data;
p_data->p_next = NULL;
p_data->b_discard_payload = 0;