libdvdread and xine 1.0alpha compilation

Daniel Caujolle-Bert <[email protected]>
Newsgroups gmane.comp.video.ogle.devel,gmane.comp.video.xine.user
Message-ID <[email protected]>
Hi,

	Since xine-lib don't accept any C++ comments, here is a small pathc to 
fix comments in libdvdread (made against 0.9.3).

Cheers.
PS: Sorry for crosspost, i'm a lazy guy, it's well known.
-- 
73's de Daniel, F1RMB.

              -=- Daniel Caujolle-Bert -=- [email protected] -=-
                        -=- [email protected] (AMPR NET) -=-
libdvdread-0.9.3.C-comments.diff (text/plain, 14.7 KB)
diff -ur libdvdread-0.9.3/dvdread/ifo_types.h libdvdread-0.9.3-Ccomments/dvdread/ifo_types.h
--- libdvdread-0.9.3/dvdread/ifo_types.h	2002-04-07 19:52:01.000000000 +0200
+++ libdvdread-0.9.3-Ccomments/dvdread/ifo_types.h	2002-11-04 23:55:11.000000000 +0100
@@ -59,7 +59,7 @@
   uint8_t hour;
   uint8_t minute;
   uint8_t second;
-  uint8_t frame_u; // The two high bits are the frame rate.
+  uint8_t frame_u; /* The two high bits are the frame rate. */
 } ATTRIBUTE_PACKED dvd_time_t;
 
 /**
@@ -130,7 +130,7 @@
   unsigned int quantization           : 2;
 #endif
   uint16_t lang_code;
-  uint8_t  lang_code2; // ??
+  uint8_t  lang_code2; /* ?? */
   uint8_t  lang_extension;
   uint16_t unknown2;
 } ATTRIBUTE_PACKED audio_attr_t;
@@ -235,65 +235,65 @@
  */
 typedef struct {
 #ifdef WORDS_BIGENDIAN
-  unsigned int zero                           : 7; // 25-31
-  unsigned int video_pres_mode_change         : 1; // 24
+  unsigned int zero                           : 7; /* 25-31 */
+  unsigned int video_pres_mode_change         : 1; /*  24 */
   
-  unsigned int karaoke_audio_pres_mode_change : 1; // 23
-  unsigned int angle_change                   : 1; // 22
-  unsigned int subpic_stream_change           : 1; // 21
-  unsigned int audio_stream_change            : 1; // 20
-  unsigned int pause_on                       : 1; // 19
-  unsigned int still_off                      : 1; // 18
-  unsigned int button_select_or_activate      : 1; // 17
-  unsigned int resume                         : 1; // 16
-  
-  unsigned int chapter_menu_call              : 1; // 15
-  unsigned int angle_menu_call                : 1; // 14
-  unsigned int audio_menu_call                : 1; // 13
-  unsigned int subpic_menu_call               : 1; // 12
-  unsigned int root_menu_call                 : 1; // 11
-  unsigned int title_menu_call                : 1; // 10
-  unsigned int backward_scan                  : 1; // 9
-  unsigned int forward_scan                   : 1; // 8
-  
-  unsigned int next_pg_search                 : 1; // 7
-  unsigned int prev_or_top_pg_search          : 1; // 6
-  unsigned int time_or_chapter_search         : 1; // 5
-  unsigned int go_up                          : 1; // 4
-  unsigned int stop                           : 1; // 3
-  unsigned int title_play                     : 1; // 2
-  unsigned int chapter_search_or_play         : 1; // 1
-  unsigned int title_or_time_play             : 1; // 0
+  unsigned int karaoke_audio_pres_mode_change : 1; /*  23 */
+  unsigned int angle_change                   : 1; /*  22 */
+  unsigned int subpic_stream_change           : 1; /*  21 */
+  unsigned int audio_stream_change            : 1; /*  20 */
+  unsigned int pause_on                       : 1; /*  19 */
+  unsigned int still_off                      : 1; /*  18 */
+  unsigned int button_select_or_activate      : 1; /*  17 */
+  unsigned int resume                         : 1; /*  16 */
+  
+  unsigned int chapter_menu_call              : 1; /*  15 */
+  unsigned int angle_menu_call                : 1; /*  14 */
+  unsigned int audio_menu_call                : 1; /*  13 */
+  unsigned int subpic_menu_call               : 1; /*  12 */
+  unsigned int root_menu_call                 : 1; /*  11 */
+  unsigned int title_menu_call                : 1; /*  10 */
+  unsigned int backward_scan                  : 1; /*  9 */
+  unsigned int forward_scan                   : 1; /*  8 */
+  
+  unsigned int next_pg_search                 : 1; /*  7 */
+  unsigned int prev_or_top_pg_search          : 1; /*  6 */
+  unsigned int time_or_chapter_search         : 1; /*  5 */
+  unsigned int go_up                          : 1; /*  4 */
+  unsigned int stop                           : 1; /*  3 */
+  unsigned int title_play                     : 1; /*  2 */
+  unsigned int chapter_search_or_play         : 1; /*  1 */
+  unsigned int title_or_time_play             : 1; /*  0 */
 #else
-  unsigned int video_pres_mode_change         : 1; // 24
-  unsigned int zero                           : 7; // 25-31
+  unsigned int video_pres_mode_change         : 1; /*  24 */
+  unsigned int zero                           : 7; /*  25-31 */
   
-  unsigned int resume                         : 1; // 16
-  unsigned int button_select_or_activate      : 1; // 17
-  unsigned int still_off                      : 1; // 18
-  unsigned int pause_on                       : 1; // 19
-  unsigned int audio_stream_change            : 1; // 20
-  unsigned int subpic_stream_change           : 1; // 21
-  unsigned int angle_change                   : 1; // 22
-  unsigned int karaoke_audio_pres_mode_change : 1; // 23
-  
-  unsigned int forward_scan                   : 1; // 8
-  unsigned int backward_scan                  : 1; // 9
-  unsigned int title_menu_call                : 1; // 10
-  unsigned int root_menu_call                 : 1; // 11
-  unsigned int subpic_menu_call               : 1; // 12
-  unsigned int audio_menu_call                : 1; // 13
-  unsigned int angle_menu_call                : 1; // 14
-  unsigned int chapter_menu_call              : 1; // 15
-  
-  unsigned int title_or_time_play             : 1; // 0
-  unsigned int chapter_search_or_play         : 1; // 1
-  unsigned int title_play                     : 1; // 2
-  unsigned int stop                           : 1; // 3
-  unsigned int go_up                          : 1; // 4
-  unsigned int time_or_chapter_search         : 1; // 5
-  unsigned int prev_or_top_pg_search          : 1; // 6
-  unsigned int next_pg_search                 : 1; // 7
+  unsigned int resume                         : 1; /*  16 */
+  unsigned int button_select_or_activate      : 1; /*  17 */
+  unsigned int still_off                      : 1; /*  18 */
+  unsigned int pause_on                       : 1; /*  19 */
+  unsigned int audio_stream_change            : 1; /*  20 */
+  unsigned int subpic_stream_change           : 1; /*  21 */
+  unsigned int angle_change                   : 1; /*  22 */
+  unsigned int karaoke_audio_pres_mode_change : 1; /*  23 */
+  
+  unsigned int forward_scan                   : 1; /*  8 */
+  unsigned int backward_scan                  : 1; /*  9 */
+  unsigned int title_menu_call                : 1; /*  10 */
+  unsigned int root_menu_call                 : 1; /*  11 */
+  unsigned int subpic_menu_call               : 1; /*  12 */
+  unsigned int audio_menu_call                : 1; /*  13 */
+  unsigned int angle_menu_call                : 1; /*  14 */
+  unsigned int chapter_menu_call              : 1; /*  15 */
+  
+  unsigned int title_or_time_play             : 1; /*  0 */
+  unsigned int chapter_search_or_play         : 1; /*  1 */
+  unsigned int title_play                     : 1; /*  2 */
+  unsigned int stop                           : 1; /*  3 */
+  unsigned int go_up                          : 1; /*  4 */
+  unsigned int time_or_chapter_search         : 1; /*  5 */
+  unsigned int prev_or_top_pg_search          : 1; /*  6 */
+  unsigned int next_pg_search                 : 1; /*  7 */
 #endif
 } ATTRIBUTE_PACKED user_ops_t;
 
@@ -453,11 +453,11 @@
   
   video_attr_t vmgm_video_attr;
   uint8_t  zero_7;
-  uint8_t  nr_of_vmgm_audio_streams; // should be 0 or 1
+  uint8_t  nr_of_vmgm_audio_streams; /*  should be 0 or 1 */
   audio_attr_t vmgm_audio_attr;
   audio_attr_t zero_8[7];
   uint8_t  zero_9[17];
-  uint8_t  nr_of_vmgm_subp_streams; // should be 0 or 1
+  uint8_t  nr_of_vmgm_subp_streams;  /* should be 0 or 1 */
   subp_attr_t  vmgm_subp_attr;
   subp_attr_t  zero_10[27];  /* XXX: how much 'padding' here? */
 } ATTRIBUTE_PACKED vmgi_mat_t;
@@ -465,21 +465,21 @@
 typedef struct {
 #ifdef WORDS_BIGENDIAN
   unsigned int zero_1                    : 1;
-  unsigned int multi_or_random_pgc_title : 1; // 0 == one sequential pgc title
+  unsigned int multi_or_random_pgc_title : 1; /*  0 == one sequential pgc title */
   unsigned int jlc_exists_in_cell_cmd    : 1;
   unsigned int jlc_exists_in_prepost_cmd : 1;
   unsigned int jlc_exists_in_button_cmd  : 1;
   unsigned int jlc_exists_in_tt_dom      : 1;
-  unsigned int chapter_search_or_play    : 1; // UOP 1
-  unsigned int title_or_time_play        : 1; // UOP 0
+  unsigned int chapter_search_or_play    : 1; /*  UOP 1 */
+  unsigned int title_or_time_play        : 1; /*  UOP 0 */
 #else
-  unsigned int title_or_time_play        : 1; // UOP 0
-  unsigned int chapter_search_or_play    : 1; // UOP 1
+  unsigned int title_or_time_play        : 1; /*  UOP 0 */
+  unsigned int chapter_search_or_play    : 1; /*  UOP 1 */
   unsigned int jlc_exists_in_tt_dom      : 1;
   unsigned int jlc_exists_in_button_cmd  : 1;
   unsigned int jlc_exists_in_prepost_cmd : 1;
   unsigned int jlc_exists_in_cell_cmd    : 1;
-  unsigned int multi_or_random_pgc_title : 1; // 0 == one sequential pgc title
+  unsigned int multi_or_random_pgc_title : 1; /*  0 == one sequential pgc title */
   unsigned int zero_1                    : 1;
 #endif
 } ATTRIBUTE_PACKED playback_type_t;
@@ -540,12 +540,12 @@
   
   video_attr_t vtsm_vobs_attr;
   uint8_t  zero_1;
-  uint8_t  nr_of_vtsm_audio_streams; // should be 0 or 1
+  uint8_t  nr_of_vtsm_audio_streams; /*  should be 0 or 1 */
   audio_attr_t vtsm_audio_attr;
   audio_attr_t zero_2[7];  
   uint8_t  zero_3[16];
   uint8_t  zero_4;
-  uint8_t  nr_of_vtsm_subp_streams; // should be 0 or 1
+  uint8_t  nr_of_vtsm_subp_streams; /*  should be 0 or 1 */
   subp_attr_t vtsm_subp_attr;
   subp_attr_t zero_5[27];
   
@@ -581,18 +581,18 @@
   uint32_t last_byte;    /* offsets are relative here */
   uint16_t offsets[100]; /* == nr_of_srpts + 1 (first is disc title) */
 #if 0  
-  uint16_t unknown; // 0x48 ?? 0x48 words (16bit) info following
+  uint16_t unknown; /*  0x48 ?? 0x48 words (16bit) info following */
   uint16_t zero_1;
   
-  uint8_t type_of_info;//?? 01 == disc, 02 == Title, 04 == Title part 
+  uint8_t type_of_info;/* ?? 01 == disc, 02 == Title, 04 == Title part  */
   uint8_t unknown1;
   uint8_t unknown2;
   uint8_t unknown3;
-  uint8_t unknown4;//?? allways 0x30 language?, text format?
+  uint8_t unknown4;/* ?? allways 0x30 language?, text format? */
   uint8_t unknown5;
-  uint16_t offset; // from first 
+  uint16_t offset; /*  from first  */
   
-  char text[12]; // ended by 0x09
+  char text[12]; /*  ended by 0x09 */
 #endif
 } ATTRIBUTE_PACKED txtdt_t;
 
@@ -652,7 +652,7 @@
   uint32_t vts_ptt_srpt;    /* sector */
   uint32_t vts_pgcit;       /* sector */
   uint32_t vtsm_pgci_ut;    /* sector */
-  uint32_t vts_tmapt;       /* sector */  // XXX: FIXME TODO Implement
+  uint32_t vts_tmapt;       /* sector */  /*  XXX: FIXME TODO Implement */
   uint32_t vtsm_c_adt;      /* sector */
   uint32_t vtsm_vobu_admap; /* sector */
   uint32_t vts_c_adt;       /* sector */
@@ -661,11 +661,11 @@
   
   video_attr_t vtsm_video_attr;
   uint8_t  zero_14;
-  uint8_t  nr_of_vtsm_audio_streams; // should be 0 or 1
+  uint8_t  nr_of_vtsm_audio_streams; /*  should be 0 or 1 */
   audio_attr_t vtsm_audio_attr;
   audio_attr_t zero_15[7];
   uint8_t  zero_16[17];
-  uint8_t  nr_of_vtsm_subp_streams; // should be 0 or 1
+  uint8_t  nr_of_vtsm_subp_streams; /*  should be 0 or 1 */
   subp_attr_t vtsm_subp_attr;
   subp_attr_t zero_17[27];
   uint8_t  zero_18[2];
@@ -739,7 +739,7 @@
   vtsi_mat_t     *vtsi_mat;
   vts_ptt_srpt_t *vts_ptt_srpt;
   pgcit_t        *vts_pgcit;
-  int            *vts_tmapt; // FIXME add/correct the type
+  int            *vts_tmapt; /*  FIXME add/correct the type */
   c_adt_t        *vts_c_adt;
   vobu_admap_t   *vts_vobu_admap;
 } ifo_handle_t;
diff -ur libdvdread-0.9.3/dvdread/nav_types.h libdvdread-0.9.3-Ccomments/dvdread/nav_types.h
--- libdvdread-0.9.3/dvdread/nav_types.h	2002-04-07 20:41:59.000000000 +0200
+++ libdvdread-0.9.3-Ccomments/dvdread/nav_types.h	2002-11-04 23:57:14.000000000 +0100
@@ -30,7 +30,7 @@
  */
 
 #include <inttypes.h>
-#include <dvdread/ifo_types.h> // only dvd_time_t, vm_cmd_t and user_ops_t
+#include <dvdread/ifo_types.h> /* only dvd_time_t, vm_cmd_t and user_ops_t */
 
 
 #undef ATTRIBUTE_PACKED
@@ -92,7 +92,7 @@
  * Highlight General Information 
  */
 typedef struct {
-  uint16_t hli_ss; ///< only low 2 bits
+  uint16_t hli_ss; /* < only low 2 bits */
   uint32_t hli_s_ptm;
   uint32_t hli_e_ptm;
   uint32_t btn_se_e_ptm;
@@ -116,11 +116,11 @@
   unsigned int zero3 : 1;
 #endif
   uint8_t btn_ofn;
-  uint8_t btn_ns;     ///< only low 6 bits
-  uint8_t nsl_btn_ns; ///< only low 6 bits
+  uint8_t btn_ns;     /* < only low 6 bits */
+  uint8_t nsl_btn_ns; /* < only low 6 bits */
   uint8_t zero5;
-  uint8_t fosl_btnn;  ///< only low 6 bits
-  uint8_t foac_btnn;  ///< only low 6 bits
+  uint8_t fosl_btnn;  /* < only low 6 bits */
+  uint8_t foac_btnn;  /* < only low 6 bits */
 } ATTRIBUTE_PACKED hl_gi_t;
 
 
@@ -217,12 +217,12 @@
  * Seamless Playback Information
  */
 typedef struct {
-  uint16_t category; ///< category of seamless VOBU
-  uint32_t ilvu_ea;  ///< end address of interleaved Unit (sectors)
-  uint32_t ilvu_sa;  ///< start address of next interleaved unit (sectors)
-  uint16_t size;     ///< size of next interleaved unit (sectors)
-  uint32_t vob_v_s_s_ptm; ///< video start ptm in vob
-  uint32_t vob_v_e_e_ptm; ///< video end ptm in vob
+  uint16_t category; /* < category of seamless VOBU */
+  uint32_t ilvu_ea;  /* < end address of interleaved Unit (sectors) */
+  uint32_t ilvu_sa;  /* < start address of next interleaved unit (sectors) */
+  uint16_t size;     /* < size of next interleaved unit (sectors) */
+  uint32_t vob_v_s_s_ptm; /* < video start ptm in vob */
+  uint32_t vob_v_e_e_ptm; /* < video end ptm in vob */
   struct {
     uint32_t stp_ptm1;
     uint32_t stp_ptm2;
@@ -235,8 +235,8 @@
  * Seamless Angle Infromation for one angle
  */
 typedef struct {
-    uint32_t address; ///< Sector offset to next ILVU, high bit is before/after
-    uint16_t size;    ///< Byte size of the ILVU poited to by address.
+    uint32_t address; /* < Sector offset to next ILVU, high bit is before/after */
+    uint16_t size;    /* < Byte size of the ILVU poited to by address. */
 } ATTRIBUTE_PACKED sml_agl_data_t;
 
 /**
@@ -250,11 +250,11 @@
  * VOBU Search Information 
  */
 typedef struct {
-  uint32_t next_video; ///< Next vobu that contains video
-  uint32_t fwda[19];   ///< Forwards, time
+  uint32_t next_video; /* < Next vobu that contains video */
+  uint32_t fwda[19];   /* < Forwards, time */
   uint32_t next_vobu;
   uint32_t prev_vobu;
-  uint32_t bwda[19];   ///< Backwards, time
+  uint32_t bwda[19];   /* < Backwards, time */
   uint32_t prev_video;
 } ATTRIBUTE_PACKED vobu_sri_t;
 
@@ -264,8 +264,8 @@
  * Synchronous Information
  */ 
 typedef struct {
-  uint16_t a_synca[8];   ///< Sector offset to first audio packet for this VOBU
-  uint32_t sp_synca[32]; ///< Sector offset to first subpicture packet
+  uint16_t a_synca[8];   /* < Sector offset to first audio packet for this VOBU */
+  uint32_t sp_synca[32]; /* < Sector offset to first subpicture packet */
 } ATTRIBUTE_PACKED synci_t;
 
 /**
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.