]> git.sesse.net Git - vlc/blobdiff - plugins/dvd/dvd_ifo.h
* libdvdcss enhancements by Billy Biggs <vektor@dumbterm.net>. This breaks
[vlc] / plugins / dvd / dvd_ifo.h
index 3b5a6f0d552f80a594e43872ee627e5b633328c9..309e507bdaea500e35658324a7a2385b45744a99 100644 (file)
@@ -2,7 +2,7 @@
  * 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>
  *
@@ -65,6 +65,14 @@ typedef struct ifo_audio_s
     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 ?
@@ -73,6 +81,15 @@ typedef struct ifo_spu_t
     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 */
@@ -153,8 +170,8 @@ typedef struct title_s
     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
@@ -182,7 +199,7 @@ typedef struct title_s
 /* 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
@@ -459,8 +476,8 @@ typedef struct vts_manager_s
  * 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
@@ -504,7 +521,7 @@ typedef struct time_inf_s
 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;
@@ -521,12 +538,27 @@ typedef struct vts_s
  */
 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 * );
+