* dvd_ifo.h: Structures for ifo parsing
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
- * $Id: dvd_ifo.h,v 1.12 2001/04/12 02:40:09 stef Exp $
+ * $Id: dvd_ifo.h,v 1.17 2001/06/12 22:14:44 sam Exp $
*
* Author: Stéphane Borel <stef@via.ecp.fr>
*
u8 i_bar ;// 8; // 0x00000000 ?
} ifo_audio_t;
+/* Audio Status */
+typedef struct audio_status_s
+{
+ u8 i_available; // 1
+ u8 i_position; // 7
+ u8 i_foo; // 8
+} audio_status_t;
+
typedef struct ifo_spu_t
{
u16 i_prefix ;// 16; // 0x0100 ?
u8 i_caption ;// 8; // 0x00 ?
} ifo_spu_t;
+/* Subpicture status */
+typedef struct spu_status_s
+{
+ u8 i_available; //1
+ u8 i_position_43; //7
+ u8 i_position_wide; //8
+ u8 i_position_letter; //8
+ u8 i_position_pan; //8
+} spu_status_t;
/* Ifo vitual machine Commands */
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
+ audio_status_t pi_audio_status[8]; // 8*2 bytes
+ spu_status_t pi_spu_status[32]; // 32*4 bytes
u16 i_next_title_num; // 2 bytes
u16 i_prev_title_num; // 2 bytes
u16 i_go_up_title_num; // 2 bytes
/* Menu PGCI Language unit Descriptor */
typedef struct unit_s
{
- char ps_lang_code[2]; // 2 bytes (ISO-xx)
+ u16 i_lang_code; // 2 bytes (ISO-xx)
// char ???
u8 i_existence_mask; // 1 byte
u32 i_unit_inf_start_byte; // 4 bytes
* we have a pointer to this structure for each tts */
typedef struct title_start_s
{
- u16 i_program_chain_num; // 2 bytes; Chapters/PGs
- u16 i_program_num; // 2 bytes
+ u16 i_title_id; // 2 bytes; Chapters/PGs
+ u16 i_chapter; // 2 bytes
} title_start_t;
/* Main struct for tts
typedef struct vts_s
{
boolean_t b_initialized;
- off_t i_pos;
+ int i_pos;
vts_manager_t manager_inf;
vts_title_t title_inf;
title_unit_t menu_unit;
*/
typedef struct ifo_s
{
- 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 */
+ dvdcss_handle dvdhandle; /* File descriptor for the device */
+ int i_start; /* Offset to video_ts.ifo on the device */
+ int 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 */
+
+ /* Remap buffer for unaligned reads */
+ u8 p_remap[ 2 * DVD_LB_SIZE ];
+
} ifo_t;
+
+/*****************************************************************************
+ * Prototypes in dvd_ifo.c
+ *****************************************************************************/
+struct thread_dvd_data_s;
+
+int IfoCreate ( struct thread_dvd_data_s * );
+int IfoInit ( struct ifo_s * );
+int IfoTitleSet ( struct ifo_s * );
+void IfoDestroy ( struct ifo_s * );
+