svcd.h
上传用户:poi891205
上传日期:2013-07-15
资源大小:9745k
文件大小:2k
源码类别:

DVD

开发平台:

C/C++

  1. #ifndef __SVCD_H
  2. #define __SVCD_H
  3. extern void svcd_audio_init();
  4. extern UINT32 udf_find_anchor(void);
  5. /*
  6. ** t_sect_info
  7. **
  8. ** generic structure of 00:04:00 for vcd/cvd/svcd
  9. */
  10. typedef struct 
  11. {
  12.   char file_id[8]; /* 1 to 8 */
  13.   UINT16 version; /* 9 to 10 */
  14.   char album_id[16]; /* 11 to 26 */
  15.   UINT16 album_no; /* 27 to 28 */
  16.   UINT16 album_seq; /* 29 to 30 */
  17.   BYTE size_map_vcd[13]; /* 31 to 43 */
  18.   BYTE status; /* 44 */
  19.   UINT32 psd_size; /* 45 to 48 */
  20.   BYTE first_segment_mm_bcd; /* 49  */
  21.   BYTE first_segment_ss_bcd; /* 50  */
  22.   BYTE first_segment_ff_bcd; /* 51  */
  23.   BYTE psd_offset_multiplier; /* 52 */
  24.   UINT16 maximum_list_id; /* 53 to 54 */
  25.   UINT16 maximum_segment_id; /* 55 to 56 */
  26.   BYTE segment_play_table[1980]; /* 57 to 2036 */
  27.   BYTE status_extension; /* 2037 (svcd) */
  28.   BYTE disc_type; /* 2038 (svcd) */
  29.   BYTE reserved[10]; /* 2039 to 2048 */
  30. } t_sect_info;
  31. #define VCD_STATUS_USERDATA 0x10
  32. #define VCD_STATUS_LISTID_2 0x20
  33. #define VCD_STATUS_TRACK_3 0x40
  34. #define VCD_SEG_AUDIO_NONE 0x00
  35. #define VCD_SEG_AUDIO_SINGLE 0x01
  36. #define VCD_SEG_AUDIO_STEREO 0x02
  37. #define VCD_SEG_AUDIO_DUAL 0x03
  38. #define VCD_SEG_VIDEO_NONE 0x00
  39. #define VCD_SEG_VIDEO_LO_STILL_NTSC 0x01 /* 352x240 */
  40. #define VCD_SEG_VIDEO_HI_STILL_NTSC 0x02 /* 704x480 */
  41. #define VCD_SEG_VIDEO_LO_MOTION_NTSC 0x03 /* 352x240 */
  42. #define VCD_SEG_VIDEO_RESERVED 0x04
  43. #define VCD_SEG_VIDEO_LO_STILL_PAL 0x05 /* 352x288 */
  44. #define VCD_SEG_VIDEO_HI_STILL_PAL 0x06 /* 704x576 */
  45. #define VCD_SEG_VIDEO_LO_MOTION_PAL 0x07 /* 352x288 */
  46. #define SVCD_SEG_VIDEO_NONE 0x00
  47. #define SVCD_SEG_VIDEO_LO_STILL_NTSC 0x01 /* 2/3 D1  */
  48. #define SVCD_SEG_VIDEO_HI_STILL_NTSC 0x02 /* D1   */
  49. #define SVCD_SEG_VIDEO_LO_MOTION_NTSC 0x03
  50. #define SVCD_SEG_VIDEO_RESERVED 0x04
  51. #define SVCD_SEG_VIDEO_LO_STILL_PAL 0x05
  52. #define SVCD_SEG_VIDEO_HI_STILL_PAL 0x06
  53. #define SVCD_SEG_VIDEO_LO_MOTION_PAL 0x07
  54. #define SVCD_SEG_AUDIO_EXT
  55. #define MSF_PVD 0x000210
  56. #define MSF_INFO 0x000400
  57. #define MSF_ENTRY 0x000401
  58. #define SEGMENT_FIRST_FLAG (1<<5)
  59. #define IS_SEGMENT_FIRST(s) ((s)&SEGMENT_FIRST_FLAG)
  60. /*
  61. ** t_sect_entries
  62. **
  63. ** generic structure of 00:04:01 for vcd/cvd/svcd
  64. */
  65. typedef struct 
  66. {
  67.   char file_id[8];
  68.   UINT16 version;
  69.   UINT16 entries_used;
  70.   UINT32 entry[500];
  71. } t_sect_entries;
  72. UINT8 get_segment(int);
  73. UINT32 get_segment_msf(int);
  74. UINT32 get_entry(int);
  75. #endif/*__SVCD_H*/