| dvd_reader.h | | dvd_reader.h | |
| | | | |
| skipping to change at line 24 | | skipping to change at line 24 | |
| * This program is distributed in the hope that it will be useful, but | | * This program is distributed in the hope that it will be useful, but | |
| * WITHOUT ANY WARRANTY; without even the implied warranty of | | * WITHOUT ANY WARRANTY; without even the implied warranty of | |
| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
| * General Public License for more details. | | * General Public License for more details. | |
| * | | * | |
| * You should have received a copy of the GNU General Public License | | * You should have received a copy of the GNU General Public License | |
| * along with this program; if not, write to the Free Software | | * along with this program; if not, write to the Free Software | |
| * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 US
A | | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 US
A | |
| */ | | */ | |
| | | | |
|
| | | #ifdef _MSC_VER | |
| | | #include <config.h> | |
| | | | |
| | | #include <stdio.h> | |
| | | #include <stdlib.h> | |
| | | #endif | |
| | | | |
| #include <sys/types.h> | | #include <sys/types.h> | |
|
| | | #include <inttypes.h> | |
| | | | |
| /** | | /** | |
| * The DVD access interface. | | * The DVD access interface. | |
| * | | * | |
| * This file contains the functions that form the interface to to | | * This file contains the functions that form the interface to to | |
| * reading files located on a DVD. | | * reading files located on a DVD. | |
| */ | | */ | |
| | | | |
| /** | | /** | |
| * The current version. | | * The current version. | |
| | | | |
| skipping to change at line 162 | | skipping to change at line 170 | |
| * bytes from the beginning of the file. The seek position is only used fo
r | | * bytes from the beginning of the file. The seek position is only used fo
r | |
| * byte reads from the file, the block read call always reads from the give
n | | * byte reads from the file, the block read call always reads from the give
n | |
| * offset. | | * offset. | |
| * | | * | |
| * @param dvd_file A file read handle. | | * @param dvd_file A file read handle. | |
| * @param seek_offset Byte offset from the start of the file to seek to. | | * @param seek_offset Byte offset from the start of the file to seek to. | |
| * @return The resulting position in bytes from the beginning of the file. | | * @return The resulting position in bytes from the beginning of the file. | |
| * | | * | |
| * offset_set = DVDFileSeek(dvd_file, seek_offset); | | * offset_set = DVDFileSeek(dvd_file, seek_offset); | |
| */ | | */ | |
|
| int DVDFileSeek( dvd_file_t *, int ); | | int32_t DVDFileSeek( dvd_file_t *, int32_t ); | |
| | | | |
| /** | | /** | |
| * Reads the given number of bytes from the file. This call can only be us
ed | | * Reads the given number of bytes from the file. This call can only be us
ed | |
| * on the information files, and may not be used for reading from a VOB. T
his | | * on the information files, and may not be used for reading from a VOB. T
his | |
| * reads from and increments the currrent seek position for the file. | | * reads from and increments the currrent seek position for the file. | |
| * | | * | |
| * @param dvd_file A file read handle. | | * @param dvd_file A file read handle. | |
| * @param data Pointer to a buffer to write the data into. | | * @param data Pointer to a buffer to write the data into. | |
| * @param bytes Number of bytes to read. | | * @param bytes Number of bytes to read. | |
| * @return Returns number of bytes read on success, -1 on error. | | * @return Returns number of bytes read on success, -1 on error. | |
| | | | |
| skipping to change at line 224 | | skipping to change at line 232 | |
| * @param volsetid The buffer to put the VolumeSetIdentifier into. | | * @param volsetid The buffer to put the VolumeSetIdentifier into. | |
| * The VolumeIdentifier is 128 bytes as | | * The VolumeIdentifier is 128 bytes as | |
| * stored in the UDF PrimaryVolumeDescriptor. | | * stored in the UDF PrimaryVolumeDescriptor. | |
| * Note that this is not a null terminated string. | | * Note that this is not a null terminated string. | |
| * @param volsetid_size At most volsetid_size bytes will be copied to volse
tid. | | * @param volsetid_size At most volsetid_size bytes will be copied to volse
tid. | |
| * @return 0 on success, -1 on error. | | * @return 0 on success, -1 on error. | |
| */ | | */ | |
| int DVDUDFVolumeInfo( dvd_reader_t *, char *, unsigned int, | | int DVDUDFVolumeInfo( dvd_reader_t *, char *, unsigned int, | |
| unsigned char *, unsigned int ); | | unsigned char *, unsigned int ); | |
| | | | |
|
| | | int DVDFileSeekForce( dvd_file_t *, int offset, int force_size); | |
| | | | |
| /** | | /** | |
| * Get the ISO9660 VolumeIdentifier and VolumeSetIdentifier | | * Get the ISO9660 VolumeIdentifier and VolumeSetIdentifier | |
| * | | * | |
| * * Only use this function as fallback if DVDUDFVolumeInfo returns 0 * | | * * Only use this function as fallback if DVDUDFVolumeInfo returns 0 * | |
| * * this will happen on a disc mastered only with a iso9660 filesystem * | | * * this will happen on a disc mastered only with a iso9660 filesystem * | |
| * * All video DVD discs have UDF filesystem * | | * * All video DVD discs have UDF filesystem * | |
| * | | * | |
| * @param dvd A read handle to get the disc ID from | | * @param dvd A read handle to get the disc ID from | |
| * @param volid The buffer to put the VolumeIdentifier into. | | * @param volid The buffer to put the VolumeIdentifier into. | |
| * The VolumeIdentifier is coded with '0-9','A-Z','_' | | * The VolumeIdentifier is coded with '0-9','A-Z','_' | |
| | | | |
End of changes. 4 change blocks. |
| 1 lines changed or deleted | | 11 lines changed or added | |
|
| ifo_types.h | | ifo_types.h | |
| | | | |
| skipping to change at line 24 | | skipping to change at line 24 | |
| * but WITHOUT ANY WARRANTY; without even the implied warranty of | | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| * GNU General Public License for more details. | | * GNU General Public License for more details. | |
| * | | * | |
| * You should have received a copy of the GNU General Public License | | * You should have received a copy of the GNU General Public License | |
| * along with this program; if not, write to the Free Software | | * along with this program; if not, write to the Free Software | |
| * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 US
A | | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 US
A | |
| */ | | */ | |
| | | | |
| #include <inttypes.h> | | #include <inttypes.h> | |
|
| #include <dvdread/dvd_reader.h> | | #include "dvd_reader.h" | |
| | | | |
| #undef ATTRIBUTE_PACKED | | #undef ATTRIBUTE_PACKED | |
| #undef PRAGMA_PACK_BEGIN | | #undef PRAGMA_PACK_BEGIN | |
| #undef PRAGMA_PACK_END | | #undef PRAGMA_PACK_END | |
| | | | |
| #if defined(__GNUC__) | | #if defined(__GNUC__) | |
| #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95) | | #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95) | |
| #define ATTRIBUTE_PACKED __attribute__ ((packed)) | | #define ATTRIBUTE_PACKED __attribute__ ((packed)) | |
| #define PRAGMA_PACK 0 | | #define PRAGMA_PACK 0 | |
| #endif | | #endif | |
| | | | |
| skipping to change at line 68 | | skipping to change at line 68 | |
| uint8_t second; | | 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; | | } ATTRIBUTE_PACKED dvd_time_t; | |
| | | | |
| /** | | /** | |
| * Type to store per-command data. | | * Type to store per-command data. | |
| */ | | */ | |
| typedef struct { | | typedef struct { | |
| uint8_t bytes[8]; | | uint8_t bytes[8]; | |
| } ATTRIBUTE_PACKED vm_cmd_t; | | } ATTRIBUTE_PACKED vm_cmd_t; | |
|
| #define COMMAND_DATA_SIZE 8 | | #define COMMAND_DATA_SIZE 8U | |
| | | | |
| /** | | /** | |
| * Video Attributes. | | * Video Attributes. | |
| */ | | */ | |
| typedef struct { | | typedef struct { | |
|
| #ifdef WORDS_BIGENDIAN | | unsigned char mpeg_version : 2; | |
| unsigned int mpeg_version : 2; | | unsigned char video_format : 2; | |
| unsigned int video_format : 2; | | unsigned char display_aspect_ratio : 2; | |
| unsigned int display_aspect_ratio : 2; | | unsigned char permitted_df : 2; | |
| unsigned int permitted_df : 2; | | | |
| | | unsigned char line21_cc_1 : 1; | |
| unsigned int line21_cc_1 : 1; | | unsigned char line21_cc_2 : 1; | |
| unsigned int line21_cc_2 : 1; | | unsigned char unknown1 : 1; | |
| unsigned int unknown1 : 1; | | unsigned char bit_rate : 1; | |
| unsigned int bit_rate : 1; | | | |
| | | unsigned char picture_size : 2; | |
| unsigned int picture_size : 2; | | unsigned char letterboxed : 1; | |
| unsigned int letterboxed : 1; | | unsigned char film_mode : 1; | |
| unsigned int film_mode : 1; | | | |
| #else | | | |
| unsigned int permitted_df : 2; | | | |
| unsigned int display_aspect_ratio : 2; | | | |
| unsigned int video_format : 2; | | | |
| unsigned int mpeg_version : 2; | | | |
| | | | |
| unsigned int film_mode : 1; | | | |
| unsigned int letterboxed : 1; | | | |
| unsigned int picture_size : 2; | | | |
| | | | |
| unsigned int bit_rate : 1; | | | |
| unsigned int unknown1 : 1; | | | |
| unsigned int line21_cc_2 : 1; | | | |
| unsigned int line21_cc_1 : 1; | | | |
| #endif | | | |
| } ATTRIBUTE_PACKED video_attr_t; | | } ATTRIBUTE_PACKED video_attr_t; | |
| | | | |
| /** | | /** | |
| * Audio Attributes. | | * Audio Attributes. | |
| */ | | */ | |
| typedef struct { | | typedef struct { | |
|
| #ifdef WORDS_BIGENDIAN | | unsigned char audio_format : 3; | |
| unsigned int audio_format : 3; | | unsigned char multichannel_extension : 1; | |
| unsigned int multichannel_extension : 1; | | unsigned char lang_type : 2; | |
| unsigned int lang_type : 2; | | unsigned char application_mode : 2; | |
| unsigned int application_mode : 2; | | | |
| | | unsigned char quantization : 2; | |
| unsigned int quantization : 2; | | unsigned char sample_frequency : 2; | |
| unsigned int sample_frequency : 2; | | unsigned char unknown1 : 1; | |
| unsigned int unknown1 : 1; | | unsigned char channels : 3; | |
| unsigned int channels : 3; | | | |
| #else | | | |
| unsigned int application_mode : 2; | | | |
| unsigned int lang_type : 2; | | | |
| unsigned int multichannel_extension : 1; | | | |
| unsigned int audio_format : 3; | | | |
| | | | |
| unsigned int channels : 3; | | | |
| unsigned int unknown1 : 1; | | | |
| unsigned int sample_frequency : 2; | | | |
| unsigned int quantization : 2; | | | |
| #endif | | | |
| uint16_t lang_code; | | uint16_t lang_code; | |
| uint8_t lang_extension; | | uint8_t lang_extension; | |
| uint8_t code_extension; | | uint8_t code_extension; | |
| uint8_t unknown3; | | uint8_t unknown3; | |
| union { | | union { | |
| struct ATTRIBUTE_PACKED { | | struct ATTRIBUTE_PACKED { | |
|
| #ifdef WORDS_BIGENDIAN | | unsigned char unknown4 : 1; | |
| unsigned int unknown4 : 1; | | unsigned char channel_assignment : 3; | |
| unsigned int channel_assignment : 3; | | unsigned char version : 2; | |
| unsigned int version : 2; | | unsigned char mc_intro : 1; /* probably 0: true, 1:false */ | |
| unsigned int mc_intro : 1; /* probably 0: true, 1:false */ | | unsigned char mode : 1; /* Karaoke mode 0: solo 1: duet | |
| unsigned int mode : 1; /* Karaoke mode 0: solo 1: duet | | */ | |
| */ | | | |
| #else | | | |
| unsigned int mode : 1; | | | |
| unsigned int mc_intro : 1; | | | |
| unsigned int version : 2; | | | |
| unsigned int channel_assignment : 3; | | | |
| unsigned int unknown4 : 1; | | | |
| #endif | | | |
| } karaoke; | | } karaoke; | |
| struct ATTRIBUTE_PACKED { | | struct ATTRIBUTE_PACKED { | |
|
| #ifdef WORDS_BIGENDIAN | | unsigned char unknown5 : 4; | |
| unsigned int unknown5 : 4; | | unsigned char dolby_encoded : 1; /* suitable for surround decodi | |
| unsigned int dolby_encoded : 1; /* suitable for surround decodin | | ng */ | |
| g */ | | unsigned char unknown6 : 3; | |
| unsigned int unknown6 : 3; | | | |
| #else | | | |
| unsigned int unknown6 : 3; | | | |
| unsigned int dolby_encoded : 1; | | | |
| unsigned int unknown5 : 4; | | | |
| #endif | | | |
| } surround; | | } surround; | |
| } app_info; | | } app_info; | |
| } ATTRIBUTE_PACKED audio_attr_t; | | } ATTRIBUTE_PACKED audio_attr_t; | |
| | | | |
| /** | | /** | |
| * MultiChannel Extension | | * MultiChannel Extension | |
| */ | | */ | |
| typedef struct { | | typedef struct { | |
|
| #ifdef WORDS_BIGENDIAN | | | |
| unsigned int zero1 : 7; | | unsigned int zero1 : 7; | |
| unsigned int ach0_gme : 1; | | unsigned int ach0_gme : 1; | |
| | | | |
| unsigned int zero2 : 7; | | unsigned int zero2 : 7; | |
| unsigned int ach1_gme : 1; | | unsigned int ach1_gme : 1; | |
| | | | |
| unsigned int zero3 : 4; | | unsigned int zero3 : 4; | |
| unsigned int ach2_gv1e : 1; | | unsigned int ach2_gv1e : 1; | |
| unsigned int ach2_gv2e : 1; | | unsigned int ach2_gv2e : 1; | |
| unsigned int ach2_gm1e : 1; | | unsigned int ach2_gm1e : 1; | |
| | | | |
| skipping to change at line 192 | | skipping to change at line 149 | |
| unsigned int ach3_gv1e : 1; | | unsigned int ach3_gv1e : 1; | |
| unsigned int ach3_gv2e : 1; | | unsigned int ach3_gv2e : 1; | |
| unsigned int ach3_gmAe : 1; | | unsigned int ach3_gmAe : 1; | |
| unsigned int ach3_se2e : 1; | | unsigned int ach3_se2e : 1; | |
| | | | |
| unsigned int zero5 : 4; | | unsigned int zero5 : 4; | |
| unsigned int ach4_gv1e : 1; | | unsigned int ach4_gv1e : 1; | |
| unsigned int ach4_gv2e : 1; | | unsigned int ach4_gv2e : 1; | |
| unsigned int ach4_gmBe : 1; | | unsigned int ach4_gmBe : 1; | |
| unsigned int ach4_seBe : 1; | | unsigned int ach4_seBe : 1; | |
|
| #else | | | |
| unsigned int ach0_gme : 1; | | | |
| unsigned int zero1 : 7; | | | |
| | | | |
| unsigned int ach1_gme : 1; | | | |
| unsigned int zero2 : 7; | | | |
| | | | |
| unsigned int ach2_gm2e : 1; | | | |
| unsigned int ach2_gm1e : 1; | | | |
| unsigned int ach2_gv2e : 1; | | | |
| unsigned int ach2_gv1e : 1; | | | |
| unsigned int zero3 : 4; | | | |
| | | | |
| unsigned int ach3_se2e : 1; | | | |
| unsigned int ach3_gmAe : 1; | | | |
| unsigned int ach3_gv2e : 1; | | | |
| unsigned int ach3_gv1e : 1; | | | |
| unsigned int zero4 : 4; | | | |
| | | | |
| unsigned int ach4_seBe : 1; | | | |
| unsigned int ach4_gmBe : 1; | | | |
| unsigned int ach4_gv2e : 1; | | | |
| unsigned int ach4_gv1e : 1; | | | |
| unsigned int zero5 : 4; | | | |
| #endif | | | |
| uint8_t zero6[19]; | | uint8_t zero6[19]; | |
| } ATTRIBUTE_PACKED multichannel_ext_t; | | } ATTRIBUTE_PACKED multichannel_ext_t; | |
| | | | |
| /** | | /** | |
| * Subpicture Attributes. | | * Subpicture Attributes. | |
| */ | | */ | |
| typedef struct { | | typedef struct { | |
| /* | | /* | |
| * type: 0 not specified | | * type: 0 not specified | |
| * 1 language | | * 1 language | |
| * 2 other | | * 2 other | |
| * coding mode: 0 run length | | * coding mode: 0 run length | |
| * 1 extended | | * 1 extended | |
| * 2 other | | * 2 other | |
| * language: indicates language if type == 1 | | * language: indicates language if type == 1 | |
| * lang extension: if type == 1 contains the lang extension | | * lang extension: if type == 1 contains the lang extension | |
| */ | | */ | |
|
| #ifdef WORDS_BIGENDIAN | | unsigned char code_mode : 3; | |
| unsigned int code_mode : 3; | | unsigned char zero1 : 3; | |
| unsigned int zero1 : 3; | | unsigned char type : 2; | |
| unsigned int type : 2; | | | |
| #else | | | |
| unsigned int type : 2; | | | |
| unsigned int zero1 : 3; | | | |
| unsigned int code_mode : 3; | | | |
| #endif | | | |
| uint8_t zero2; | | uint8_t zero2; | |
| uint16_t lang_code; | | uint16_t lang_code; | |
| uint8_t lang_extension; | | uint8_t lang_extension; | |
| uint8_t code_extension; | | uint8_t code_extension; | |
| } ATTRIBUTE_PACKED subp_attr_t; | | } ATTRIBUTE_PACKED subp_attr_t; | |
| | | | |
| /** | | /** | |
| * PGC Command Table. | | * PGC Command Table. | |
| */ | | */ | |
| typedef struct { | | typedef struct { | |
| uint16_t nr_of_pre; | | uint16_t nr_of_pre; | |
| uint16_t nr_of_post; | | uint16_t nr_of_post; | |
| uint16_t nr_of_cell; | | uint16_t nr_of_cell; | |
| uint16_t zero_1; | | uint16_t zero_1; | |
| vm_cmd_t *pre_cmds; | | vm_cmd_t *pre_cmds; | |
| vm_cmd_t *post_cmds; | | vm_cmd_t *post_cmds; | |
| vm_cmd_t *cell_cmds; | | vm_cmd_t *cell_cmds; | |
| } ATTRIBUTE_PACKED pgc_command_tbl_t; | | } ATTRIBUTE_PACKED pgc_command_tbl_t; | |
|
| #define PGC_COMMAND_TBL_SIZE 8 | | #define PGC_COMMAND_TBL_SIZE 8U | |
| | | | |
| /** | | /** | |
| * PGC Program Map | | * PGC Program Map | |
| */ | | */ | |
| typedef uint8_t pgc_program_map_t; | | typedef uint8_t pgc_program_map_t; | |
| | | | |
| /** | | /** | |
| * Cell Playback Information. | | * Cell Playback Information. | |
| */ | | */ | |
| typedef struct { | | typedef struct { | |
|
| #ifdef WORDS_BIGENDIAN | | | |
| unsigned int block_mode : 2; | | unsigned int block_mode : 2; | |
| unsigned int block_type : 2; | | unsigned int block_type : 2; | |
| unsigned int seamless_play : 1; | | unsigned int seamless_play : 1; | |
| unsigned int interleaved : 1; | | unsigned int interleaved : 1; | |
| unsigned int stc_discontinuity: 1; | | unsigned int stc_discontinuity: 1; | |
| unsigned int seamless_angle : 1; | | unsigned int seamless_angle : 1; | |
|
| | | | |
| unsigned int playback_mode : 1; /**< When set, enter StillMode after
each VOBU */ | | unsigned int playback_mode : 1; /**< When set, enter StillMode after
each VOBU */ | |
| unsigned int restricted : 1; /**< ?? drop out of fastforward? */ | | unsigned int restricted : 1; /**< ?? drop out of fastforward? */ | |
| unsigned int unknown2 : 6; | | unsigned int unknown2 : 6; | |
|
| #else | | | |
| unsigned int seamless_angle : 1; | | | |
| unsigned int stc_discontinuity: 1; | | | |
| unsigned int interleaved : 1; | | | |
| unsigned int seamless_play : 1; | | | |
| unsigned int block_type : 2; | | | |
| unsigned int block_mode : 2; | | | |
| | | | |
| unsigned int unknown2 : 6; | | | |
| unsigned int restricted : 1; | | | |
| unsigned int playback_mode : 1; | | | |
| #endif | | | |
| uint8_t still_time; | | uint8_t still_time; | |
| uint8_t cell_cmd_nr; | | uint8_t cell_cmd_nr; | |
| dvd_time_t playback_time; | | dvd_time_t playback_time; | |
| uint32_t first_sector; | | uint32_t first_sector; | |
| uint32_t first_ilvu_end_sector; | | uint32_t first_ilvu_end_sector; | |
| uint32_t last_vobu_start_sector; | | uint32_t last_vobu_start_sector; | |
| uint32_t last_sector; | | uint32_t last_sector; | |
| } ATTRIBUTE_PACKED cell_playback_t; | | } ATTRIBUTE_PACKED cell_playback_t; | |
| | | | |
| #define BLOCK_TYPE_NONE 0x0 | | #define BLOCK_TYPE_NONE 0x0 | |
| | | | |
| skipping to change at line 325 | | skipping to change at line 237 | |
| typedef struct { | | typedef struct { | |
| uint16_t vob_id_nr; | | uint16_t vob_id_nr; | |
| uint8_t zero_1; | | uint8_t zero_1; | |
| uint8_t cell_nr; | | uint8_t cell_nr; | |
| } ATTRIBUTE_PACKED cell_position_t; | | } ATTRIBUTE_PACKED cell_position_t; | |
| | | | |
| /** | | /** | |
| * User Operations. | | * User Operations. | |
| */ | | */ | |
| typedef struct { | | typedef struct { | |
|
| #ifdef WORDS_BIGENDIAN | | | |
| unsigned int zero : 7; /* 25-31 */ | | unsigned int zero : 7; /* 25-31 */ | |
| unsigned int video_pres_mode_change : 1; /* 24 */ | | unsigned int video_pres_mode_change : 1; /* 24 */ | |
| | | | |
| unsigned int karaoke_audio_pres_mode_change : 1; /* 23 */ | | unsigned int karaoke_audio_pres_mode_change : 1; /* 23 */ | |
| unsigned int angle_change : 1; | | unsigned int angle_change : 1; | |
| unsigned int subpic_stream_change : 1; | | unsigned int subpic_stream_change : 1; | |
| unsigned int audio_stream_change : 1; | | unsigned int audio_stream_change : 1; | |
| unsigned int pause_on : 1; | | unsigned int pause_on : 1; | |
| unsigned int still_off : 1; | | unsigned int still_off : 1; | |
| unsigned int button_select_or_activate : 1; | | unsigned int button_select_or_activate : 1; | |
| | | | |
| skipping to change at line 355 | | skipping to change at line 266 | |
| unsigned int forward_scan : 1; /* 8 */ | | unsigned int forward_scan : 1; /* 8 */ | |
| | | | |
| unsigned int next_pg_search : 1; /* 7 */ | | unsigned int next_pg_search : 1; /* 7 */ | |
| unsigned int prev_or_top_pg_search : 1; | | unsigned int prev_or_top_pg_search : 1; | |
| unsigned int time_or_chapter_search : 1; | | unsigned int time_or_chapter_search : 1; | |
| unsigned int go_up : 1; | | unsigned int go_up : 1; | |
| unsigned int stop : 1; | | unsigned int stop : 1; | |
| unsigned int title_play : 1; | | unsigned int title_play : 1; | |
| unsigned int chapter_search_or_play : 1; | | unsigned int chapter_search_or_play : 1; | |
| unsigned int title_or_time_play : 1; /* 0 */ | | 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 resume : 1; /* 16 */ | | | |
| unsigned int button_select_or_activate : 1; | | | |
| unsigned int still_off : 1; | | | |
| unsigned int pause_on : 1; | | | |
| unsigned int audio_stream_change : 1; | | | |
| unsigned int subpic_stream_change : 1; | | | |
| unsigned int angle_change : 1; | | | |
| unsigned int karaoke_audio_pres_mode_change : 1; /* 23 */ | | | |
| | | | |
| unsigned int forward_scan : 1; /* 8 */ | | | |
| unsigned int backward_scan : 1; | | | |
| unsigned int title_menu_call : 1; | | | |
| unsigned int root_menu_call : 1; | | | |
| unsigned int subpic_menu_call : 1; | | | |
| unsigned int audio_menu_call : 1; | | | |
| unsigned int angle_menu_call : 1; | | | |
| unsigned int chapter_menu_call : 1; /* 15 */ | | | |
| | | | |
| unsigned int title_or_time_play : 1; /* 0 */ | | | |
| unsigned int chapter_search_or_play : 1; | | | |
| unsigned int title_play : 1; | | | |
| unsigned int stop : 1; | | | |
| unsigned int go_up : 1; | | | |
| unsigned int time_or_chapter_search : 1; | | | |
| unsigned int prev_or_top_pg_search : 1; | | | |
| unsigned int next_pg_search : 1; /* 7 */ | | | |
| #endif | | | |
| } ATTRIBUTE_PACKED user_ops_t; | | } ATTRIBUTE_PACKED user_ops_t; | |
| | | | |
| /** | | /** | |
| * Program Chain Information. | | * Program Chain Information. | |
| */ | | */ | |
| typedef struct { | | typedef struct { | |
| uint16_t zero_1; | | uint16_t zero_1; | |
| uint8_t nr_of_programs; | | uint8_t nr_of_programs; | |
| uint8_t nr_of_cells; | | uint8_t nr_of_cells; | |
| dvd_time_t playback_time; | | dvd_time_t playback_time; | |
| | | | |
| skipping to change at line 414 | | skipping to change at line 294 | |
| uint32_t palette[16]; /* New type struct {zero_1, Y, Cr, Cb} ? */ | | uint32_t palette[16]; /* New type struct {zero_1, Y, Cr, Cb} ? */ | |
| uint16_t command_tbl_offset; | | uint16_t command_tbl_offset; | |
| uint16_t program_map_offset; | | uint16_t program_map_offset; | |
| uint16_t cell_playback_offset; | | uint16_t cell_playback_offset; | |
| uint16_t cell_position_offset; | | uint16_t cell_position_offset; | |
| pgc_command_tbl_t *command_tbl; | | pgc_command_tbl_t *command_tbl; | |
| pgc_program_map_t *program_map; | | pgc_program_map_t *program_map; | |
| cell_playback_t *cell_playback; | | cell_playback_t *cell_playback; | |
| cell_position_t *cell_position; | | cell_position_t *cell_position; | |
| } ATTRIBUTE_PACKED pgc_t; | | } ATTRIBUTE_PACKED pgc_t; | |
|
| #define PGC_SIZE 236 | | #define PGC_SIZE 236U | |
| | | | |
| /** | | /** | |
| * Program Chain Information Search Pointer. | | * Program Chain Information Search Pointer. | |
| */ | | */ | |
| typedef struct { | | typedef struct { | |
| uint8_t entry_id; | | uint8_t entry_id; | |
|
| #ifdef WORDS_BIGENDIAN | | | |
| unsigned int block_mode : 2; | | unsigned int block_mode : 2; | |
| unsigned int block_type : 2; | | unsigned int block_type : 2; | |
| unsigned int unknown1 : 4; | | unsigned int unknown1 : 4; | |
|
| #else | | | |
| unsigned int unknown1 : 4; | | | |
| unsigned int block_type : 2; | | | |
| unsigned int block_mode : 2; | | | |
| #endif | | | |
| uint16_t ptl_id_mask; | | uint16_t ptl_id_mask; | |
| uint32_t pgc_start_byte; | | uint32_t pgc_start_byte; | |
| pgc_t *pgc; | | pgc_t *pgc; | |
| } ATTRIBUTE_PACKED pgci_srp_t; | | } ATTRIBUTE_PACKED pgci_srp_t; | |
|
| #define PGCI_SRP_SIZE 8 | | #define PGCI_SRP_SIZE 8U | |
| | | | |
| /** | | /** | |
| * Program Chain Information Table. | | * Program Chain Information Table. | |
| */ | | */ | |
| typedef struct { | | typedef struct { | |
| uint16_t nr_of_pgci_srp; | | uint16_t nr_of_pgci_srp; | |
| uint16_t zero_1; | | uint16_t zero_1; | |
| uint32_t last_byte; | | uint32_t last_byte; | |
| pgci_srp_t *pgci_srp; | | pgci_srp_t *pgci_srp; | |
| } ATTRIBUTE_PACKED pgcit_t; | | } ATTRIBUTE_PACKED pgcit_t; | |
|
| #define PGCIT_SIZE 8 | | #define PGCIT_SIZE 8U | |
| | | | |
| /** | | /** | |
| * Menu PGCI Language Unit. | | * Menu PGCI Language Unit. | |
| */ | | */ | |
| typedef struct { | | typedef struct { | |
| uint16_t lang_code; | | uint16_t lang_code; | |
| uint8_t lang_extension; | | uint8_t lang_extension; | |
| uint8_t exists; | | uint8_t exists; | |
| uint32_t lang_start_byte; | | uint32_t lang_start_byte; | |
| pgcit_t *pgcit; | | pgcit_t *pgcit; | |
| } ATTRIBUTE_PACKED pgci_lu_t; | | } ATTRIBUTE_PACKED pgci_lu_t; | |
|
| #define PGCI_LU_SIZE 8 | | #define PGCI_LU_SIZE 8U | |
| | | | |
| /** | | /** | |
| * Menu PGCI Unit Table. | | * Menu PGCI Unit Table. | |
| */ | | */ | |
| typedef struct { | | typedef struct { | |
| uint16_t nr_of_lus; | | uint16_t nr_of_lus; | |
| uint16_t zero_1; | | uint16_t zero_1; | |
| uint32_t last_byte; | | uint32_t last_byte; | |
| pgci_lu_t *lu; | | pgci_lu_t *lu; | |
| } ATTRIBUTE_PACKED pgci_ut_t; | | } ATTRIBUTE_PACKED pgci_ut_t; | |
|
| #define PGCI_UT_SIZE 8 | | #define PGCI_UT_SIZE 8U | |
| | | | |
| /** | | /** | |
| * Cell Address Information. | | * Cell Address Information. | |
| */ | | */ | |
| typedef struct { | | typedef struct { | |
| uint16_t vob_id; | | uint16_t vob_id; | |
| uint8_t cell_id; | | uint8_t cell_id; | |
| uint8_t zero_1; | | uint8_t zero_1; | |
| uint32_t start_sector; | | uint32_t start_sector; | |
| uint32_t last_sector; | | uint32_t last_sector; | |
| | | | |
| skipping to change at line 490 | | skipping to change at line 364 | |
| | | | |
| /** | | /** | |
| * Cell Address Table. | | * Cell Address Table. | |
| */ | | */ | |
| typedef struct { | | typedef struct { | |
| uint16_t nr_of_vobs; /* VOBs */ | | uint16_t nr_of_vobs; /* VOBs */ | |
| uint16_t zero_1; | | uint16_t zero_1; | |
| uint32_t last_byte; | | uint32_t last_byte; | |
| cell_adr_t *cell_adr_table; /* No explicit size given. */ | | cell_adr_t *cell_adr_table; /* No explicit size given. */ | |
| } ATTRIBUTE_PACKED c_adt_t; | | } ATTRIBUTE_PACKED c_adt_t; | |
|
| #define C_ADT_SIZE 8 | | #define C_ADT_SIZE 8U | |
| | | | |
| /** | | /** | |
| * VOBU Address Map. | | * VOBU Address Map. | |
| */ | | */ | |
| typedef struct { | | typedef struct { | |
| uint32_t last_byte; | | uint32_t last_byte; | |
| uint32_t *vobu_start_sectors; | | uint32_t *vobu_start_sectors; | |
| } ATTRIBUTE_PACKED vobu_admap_t; | | } ATTRIBUTE_PACKED vobu_admap_t; | |
|
| #define VOBU_ADMAP_SIZE 4 | | #define VOBU_ADMAP_SIZE 4U | |
| | | | |
| /** | | /** | |
| * VMGI | | * VMGI | |
| * | | * | |
| * The following structures relate to the Video Manager. | | * The following structures relate to the Video Manager. | |
| */ | | */ | |
| | | | |
| /** | | /** | |
| * Video Manager Information Management Table. | | * Video Manager Information Management Table. | |
| */ | | */ | |
| | | | |
| skipping to change at line 551 | | skipping to change at line 425 | |
| 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 vmgm_audio_attr; | |
| audio_attr_t zero_8[7]; | | audio_attr_t zero_8[7]; | |
| uint8_t zero_9[17]; | | 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 vmgm_subp_attr; | |
| subp_attr_t zero_10[27]; /* XXX: how much 'padding' here? */ | | subp_attr_t zero_10[27]; /* XXX: how much 'padding' here? */ | |
| } ATTRIBUTE_PACKED vmgi_mat_t; | | } ATTRIBUTE_PACKED vmgi_mat_t; | |
| | | | |
| typedef struct { | | typedef struct { | |
|
| #ifdef WORDS_BIGENDIAN | | | |
| unsigned int zero_1 : 1; | | unsigned int zero_1 : 1; | |
| unsigned int multi_or_random_pgc_title : 1; /* 0: one sequential pgc titl
e */ | | unsigned int multi_or_random_pgc_title : 1; /* 0: one sequential pgc titl
e */ | |
| unsigned int jlc_exists_in_cell_cmd : 1; | | unsigned int jlc_exists_in_cell_cmd : 1; | |
| unsigned int jlc_exists_in_prepost_cmd : 1; | | unsigned int jlc_exists_in_prepost_cmd : 1; | |
| unsigned int jlc_exists_in_button_cmd : 1; | | unsigned int jlc_exists_in_button_cmd : 1; | |
| unsigned int jlc_exists_in_tt_dom : 1; | | unsigned int jlc_exists_in_tt_dom : 1; | |
| unsigned int chapter_search_or_play : 1; /* UOP 1 */ | | unsigned int chapter_search_or_play : 1; /* UOP 1 */ | |
| unsigned int title_or_time_play : 1; /* UOP 0 */ | | unsigned int title_or_time_play : 1; /* UOP 0 */ | |
|
| #else | | | |
| unsigned int title_or_time_play : 1; | | | |
| unsigned int chapter_search_or_play : 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; | | | |
| unsigned int zero_1 : 1; | | | |
| #endif | | | |
| } ATTRIBUTE_PACKED playback_type_t; | | } ATTRIBUTE_PACKED playback_type_t; | |
| | | | |
| /** | | /** | |
| * Title Information. | | * Title Information. | |
| */ | | */ | |
| typedef struct { | | typedef struct { | |
| playback_type_t pb_ty; | | playback_type_t pb_ty; | |
| uint8_t nr_of_angles; | | uint8_t nr_of_angles; | |
| uint16_t nr_of_ptts; | | uint16_t nr_of_ptts; | |
| uint16_t parental_id; | | uint16_t parental_id; | |
| | | | |
| skipping to change at line 594 | | skipping to change at line 457 | |
| | | | |
| /** | | /** | |
| * PartOfTitle Search Pointer Table. | | * PartOfTitle Search Pointer Table. | |
| */ | | */ | |
| typedef struct { | | typedef struct { | |
| uint16_t nr_of_srpts; | | uint16_t nr_of_srpts; | |
| uint16_t zero_1; | | uint16_t zero_1; | |
| uint32_t last_byte; | | uint32_t last_byte; | |
| title_info_t *title; | | title_info_t *title; | |
| } ATTRIBUTE_PACKED tt_srpt_t; | | } ATTRIBUTE_PACKED tt_srpt_t; | |
|
| #define TT_SRPT_SIZE 8 | | #define TT_SRPT_SIZE 8U | |
| | | | |
| /** | | /** | |
| * Parental Management Information Unit Table. | | * Parental Management Information Unit Table. | |
| * Level 1 (US: G), ..., 7 (US: NC-17), 8 | | * Level 1 (US: G), ..., 7 (US: NC-17), 8 | |
| */ | | */ | |
| typedef uint16_t pf_level_t[8]; | | typedef uint16_t pf_level_t[8]; | |
| | | | |
| /** | | /** | |
| * Parental Management Information Unit Table. | | * Parental Management Information Unit Table. | |
| */ | | */ | |
| typedef struct { | | typedef struct { | |
| uint16_t country_code; | | uint16_t country_code; | |
| uint16_t zero_1; | | uint16_t zero_1; | |
| uint16_t pf_ptl_mai_start_byte; | | uint16_t pf_ptl_mai_start_byte; | |
| uint16_t zero_2; | | uint16_t zero_2; | |
| pf_level_t *pf_ptl_mai; /* table of (nr_of_vtss + 1), video_ts is first *
/ | | pf_level_t *pf_ptl_mai; /* table of (nr_of_vtss + 1), video_ts is first *
/ | |
| } ATTRIBUTE_PACKED ptl_mait_country_t; | | } ATTRIBUTE_PACKED ptl_mait_country_t; | |
|
| #define PTL_MAIT_COUNTRY_SIZE 8 | | #define PTL_MAIT_COUNTRY_SIZE 8U | |
| | | | |
| /** | | /** | |
| * Parental Management Information Table. | | * Parental Management Information Table. | |
| */ | | */ | |
| typedef struct { | | typedef struct { | |
| uint16_t nr_of_countries; | | uint16_t nr_of_countries; | |
| uint16_t nr_of_vtss; | | uint16_t nr_of_vtss; | |
| uint32_t last_byte; | | uint32_t last_byte; | |
| ptl_mait_country_t *countries; | | ptl_mait_country_t *countries; | |
| } ATTRIBUTE_PACKED ptl_mait_t; | | } ATTRIBUTE_PACKED ptl_mait_t; | |
|
| #define PTL_MAIT_SIZE 8 | | #define PTL_MAIT_SIZE 8U | |
| | | | |
| /** | | /** | |
| * Video Title Set Attributes. | | * Video Title Set Attributes. | |
| */ | | */ | |
| typedef struct { | | typedef struct { | |
| uint32_t last_byte; | | uint32_t last_byte; | |
| uint32_t vts_cat; | | uint32_t vts_cat; | |
| | | | |
| video_attr_t vtsm_vobs_attr; | | video_attr_t vtsm_vobs_attr; | |
| uint8_t zero_1; | | uint8_t zero_1; | |
| | | | |
| skipping to change at line 654 | | skipping to change at line 517 | |
| | | | |
| video_attr_t vtstt_vobs_video_attr; | | video_attr_t vtstt_vobs_video_attr; | |
| uint8_t zero_7; | | uint8_t zero_7; | |
| uint8_t nr_of_vtstt_audio_streams; | | uint8_t nr_of_vtstt_audio_streams; | |
| audio_attr_t vtstt_audio_attr[8]; | | audio_attr_t vtstt_audio_attr[8]; | |
| uint8_t zero_8[16]; | | uint8_t zero_8[16]; | |
| uint8_t zero_9; | | uint8_t zero_9; | |
| uint8_t nr_of_vtstt_subp_streams; | | uint8_t nr_of_vtstt_subp_streams; | |
| subp_attr_t vtstt_subp_attr[32]; | | subp_attr_t vtstt_subp_attr[32]; | |
| } ATTRIBUTE_PACKED vts_attributes_t; | | } ATTRIBUTE_PACKED vts_attributes_t; | |
|
| #define VTS_ATTRIBUTES_SIZE 542 | | #define VTS_ATTRIBUTES_SIZE 542U | |
| #define VTS_ATTRIBUTES_MIN_SIZE 356 | | #define VTS_ATTRIBUTES_MIN_SIZE 356U | |
| | | | |
| /** | | /** | |
| * Video Title Set Attribute Table. | | * Video Title Set Attribute Table. | |
| */ | | */ | |
| typedef struct { | | typedef struct { | |
| uint16_t nr_of_vtss; | | uint16_t nr_of_vtss; | |
| uint16_t zero_1; | | uint16_t zero_1; | |
| uint32_t last_byte; | | uint32_t last_byte; | |
| vts_attributes_t *vts; | | vts_attributes_t *vts; | |
| uint32_t *vts_atrt_offsets; /* offsets table for each vts_attributes */ | | uint32_t *vts_atrt_offsets; /* offsets table for each vts_attributes */ | |
| } ATTRIBUTE_PACKED vts_atrt_t; | | } ATTRIBUTE_PACKED vts_atrt_t; | |
|
| #define VTS_ATRT_SIZE 8 | | #define VTS_ATRT_SIZE 8U | |
| | | | |
| /** | | /** | |
| * Text Data. (Incomplete) | | * Text Data. (Incomplete) | |
| */ | | */ | |
| typedef struct { | | typedef struct { | |
| uint32_t last_byte; /* offsets are relative here */ | | uint32_t last_byte; /* offsets are relative here */ | |
| uint16_t offsets[100]; /* == nr_of_srpts + 1 (first is disc title) */ | | uint16_t offsets[100]; /* == nr_of_srpts + 1 (first is disc title) */ | |
| #if 0 | | #if 0 | |
| uint16_t unknown; /* 0x48 ?? 0x48 words (16bit) info following */ | | uint16_t unknown; /* 0x48 ?? 0x48 words (16bit) info following */ | |
| uint16_t zero_1; | | uint16_t zero_1; | |
| | | | |
| skipping to change at line 700 | | skipping to change at line 563 | |
| | | | |
| /** | | /** | |
| * Text Data Language Unit. (Incomplete) | | * Text Data Language Unit. (Incomplete) | |
| */ | | */ | |
| typedef struct { | | typedef struct { | |
| uint16_t lang_code; | | uint16_t lang_code; | |
| uint16_t unknown; /* 0x0001, title 1? disc 1? side 1? */ | | uint16_t unknown; /* 0x0001, title 1? disc 1? side 1? */ | |
| uint32_t txtdt_start_byte; /* prt, rel start of vmg_txtdt_mgi */ | | uint32_t txtdt_start_byte; /* prt, rel start of vmg_txtdt_mgi */ | |
| txtdt_t *txtdt; | | txtdt_t *txtdt; | |
| } ATTRIBUTE_PACKED txtdt_lu_t; | | } ATTRIBUTE_PACKED txtdt_lu_t; | |
|
| #define TXTDT_LU_SIZE 8 | | #define TXTDT_LU_SIZE 8U | |
| | | | |
| /** | | /** | |
| * Text Data Manager Information. (Incomplete) | | * Text Data Manager Information. (Incomplete) | |
| */ | | */ | |
| typedef struct { | | typedef struct { | |
| char disc_name[14]; /* how many bytes?? */ | | char disc_name[14]; /* how many bytes?? */ | |
| uint16_t nr_of_language_units; /* 32bit?? */ | | uint16_t nr_of_language_units; /* 32bit?? */ | |
| uint32_t last_byte; | | uint32_t last_byte; | |
| txtdt_lu_t *lu; | | txtdt_lu_t *lu; | |
| } ATTRIBUTE_PACKED txtdt_mgi_t; | | } ATTRIBUTE_PACKED txtdt_mgi_t; | |
|
| #define TXTDT_MGI_SIZE 20 | | #define TXTDT_MGI_SIZE 20U | |
| | | | |
| /** | | /** | |
| * VTS | | * VTS | |
| * | | * | |
| * Structures relating to the Video Title Set (VTS). | | * Structures relating to the Video Title Set (VTS). | |
| */ | | */ | |
| | | | |
| /** | | /** | |
| * Video Title Set Information Management Table. | | * Video Title Set Information Management Table. | |
| */ | | */ | |
| | | | |
| skipping to change at line 802 | | skipping to change at line 665 | |
| /** | | /** | |
| * PartOfTitle Search Pointer Table. | | * PartOfTitle Search Pointer Table. | |
| */ | | */ | |
| typedef struct { | | typedef struct { | |
| uint16_t nr_of_srpts; | | uint16_t nr_of_srpts; | |
| uint16_t zero_1; | | uint16_t zero_1; | |
| uint32_t last_byte; | | uint32_t last_byte; | |
| ttu_t *title; | | ttu_t *title; | |
| uint32_t *ttu_offset; /* offset table for each ttu */ | | uint32_t *ttu_offset; /* offset table for each ttu */ | |
| } ATTRIBUTE_PACKED vts_ptt_srpt_t; | | } ATTRIBUTE_PACKED vts_ptt_srpt_t; | |
|
| #define VTS_PTT_SRPT_SIZE 8 | | #define VTS_PTT_SRPT_SIZE 8U | |
| | | | |
| /** | | /** | |
| * Time Map Entry. | | * Time Map Entry. | |
| */ | | */ | |
| /* Should this be bit field at all or just the uint32_t? */ | | /* Should this be bit field at all or just the uint32_t? */ | |
| typedef uint32_t map_ent_t; | | typedef uint32_t map_ent_t; | |
| | | | |
| /** | | /** | |
| * Time Map. | | * Time Map. | |
| */ | | */ | |
| typedef struct { | | typedef struct { | |
| uint8_t tmu; /* Time unit, in seconds */ | | uint8_t tmu; /* Time unit, in seconds */ | |
| uint8_t zero_1; | | uint8_t zero_1; | |
| uint16_t nr_of_entries; | | uint16_t nr_of_entries; | |
| map_ent_t *map_ent; | | map_ent_t *map_ent; | |
| } ATTRIBUTE_PACKED vts_tmap_t; | | } ATTRIBUTE_PACKED vts_tmap_t; | |
|
| #define VTS_TMAP_SIZE 4 | | #define VTS_TMAP_SIZE 4U | |
| | | | |
| /** | | /** | |
| * Time Map Table. | | * Time Map Table. | |
| */ | | */ | |
| typedef struct { | | typedef struct { | |
| uint16_t nr_of_tmaps; | | uint16_t nr_of_tmaps; | |
| uint16_t zero_1; | | uint16_t zero_1; | |
| uint32_t last_byte; | | uint32_t last_byte; | |
| vts_tmap_t *tmap; | | vts_tmap_t *tmap; | |
| uint32_t *tmap_offset; /* offset table for each tmap */ | | uint32_t *tmap_offset; /* offset table for each tmap */ | |
| } ATTRIBUTE_PACKED vts_tmapt_t; | | } ATTRIBUTE_PACKED vts_tmapt_t; | |
|
| #define VTS_TMAPT_SIZE 8 | | #define VTS_TMAPT_SIZE 8U | |
| | | | |
| #if PRAGMA_PACK | | #if PRAGMA_PACK | |
| #pragma pack() | | #pragma pack() | |
| #endif | | #endif | |
| | | | |
| /** | | /** | |
| * The following structure defines an IFO file. The structure is divided i
nto | | * The following structure defines an IFO file. The structure is divided i
nto | |
| * two parts, the VMGI, or Video Manager Information, which is read from th
e | | * two parts, the VMGI, or Video Manager Information, which is read from th
e | |
| * VIDEO_TS.[IFO,BUP] file, and the VTSI, or Video Title Set Information, w
hich | | * VIDEO_TS.[IFO,BUP] file, and the VTSI, or Video Title Set Information, w
hich | |
| * is read in from the VTS_XX_0.[IFO,BUP] files. | | * is read in from the VTS_XX_0.[IFO,BUP] files. | |
| | | | |
End of changes. 36 change blocks. |
| 193 lines changed or deleted | | 56 lines changed or added | |
|
| nav_types.h | | nav_types.h | |
| | | | |
| skipping to change at line 33 | | skipping to change at line 33 | |
| * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See | | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See | |
| * the GNU General Public License for more details. | | * the GNU General Public License for more details. | |
| * | | * | |
| * You should have received a copy of the GNU General Public License | | * You should have received a copy of the GNU General Public License | |
| * along with this program; if not, write to the Free Software | | * along with this program; if not, write to the Free Software | |
| * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 | | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 | |
| * USA | | * USA | |
| */ | | */ | |
| | | | |
| #include <inttypes.h> | | #include <inttypes.h> | |
|
| #include <dvdread/ifo_types.h> /* only dvd_time_t, vm_cmd_t and user_ops_t | | #include "ifo_types.h" /* only dvd_time_t, vm_cmd_t and user_ops_t */ | |
| */ | | | |
| | | | |
| #undef ATTRIBUTE_PACKED | | | |
| #undef PRAGMA_PACK_BEGIN | | | |
| #undef PRAGMA_PACK_END | | | |
| | | | |
| #if defined(__GNUC__) | | | |
| #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95) | | | |
| #define ATTRIBUTE_PACKED __attribute__ ((packed)) | | | |
| #define PRAGMA_PACK 0 | | | |
| #endif | | | |
| #endif | | | |
| | | | |
| #if !defined(ATTRIBUTE_PACKED) | | | |
| #define ATTRIBUTE_PACKED | | | |
| #define PRAGMA_PACK 1 | | | |
| #endif | | | |
| | | | |
| /* The length including the substream id byte. */ | | /* The length including the substream id byte. */ | |
| #define PCI_BYTES 0x3d4 | | #define PCI_BYTES 0x3d4 | |
| #define DSI_BYTES 0x3fa | | #define DSI_BYTES 0x3fa | |
| | | | |
| #define PS2_PCI_SUBSTREAM_ID 0x00 | | #define PS2_PCI_SUBSTREAM_ID 0x00 | |
| #define PS2_DSI_SUBSTREAM_ID 0x01 | | #define PS2_DSI_SUBSTREAM_ID 0x01 | |
| | | | |
| /* Remove this */ | | /* Remove this */ | |
| #define DSI_START_BYTE 1031 | | #define DSI_START_BYTE 1031 | |
| | | | |
|
| #if PRAGMA_PACK | | | |
| #pragma pack(1) | | | |
| #endif | | | |
| | | | |
| /** | | /** | |
| * PCI General Information | | * PCI General Information | |
| */ | | */ | |
| typedef struct { | | typedef struct { | |
| uint32_t nv_pck_lbn; /**< sector address of this nav pack */ | | uint32_t nv_pck_lbn; /**< sector address of this nav pack */ | |
| uint16_t vobu_cat; /**< 'category' of vobu */ | | uint16_t vobu_cat; /**< 'category' of vobu */ | |
| uint16_t zero1; /**< reserved */ | | uint16_t zero1; /**< reserved */ | |
| user_ops_t vobu_uop_ctl; /**< UOP of vobu */ | | user_ops_t vobu_uop_ctl; /**< UOP of vobu */ | |
| uint32_t vobu_s_ptm; /**< start presentation time of vobu */ | | uint32_t vobu_s_ptm; /**< start presentation time of vobu */ | |
| uint32_t vobu_e_ptm; /**< end presentation time of vobu */ | | uint32_t vobu_e_ptm; /**< end presentation time of vobu */ | |
| | | | |
| skipping to change at line 101 | | skipping to change at line 81 | |
| * 000b: normal 4/3 only buttons | | * 000b: normal 4/3 only buttons | |
| * XX1b: wide (16/9) buttons | | * XX1b: wide (16/9) buttons | |
| * X1Xb: letterbox buttons | | * X1Xb: letterbox buttons | |
| * 1XXb: pan&scan buttons | | * 1XXb: pan&scan buttons | |
| */ | | */ | |
| typedef struct { | | typedef struct { | |
| uint16_t hli_ss; /**< status, only low 2 bits 0: no buttons, 1: different
2: equal 3: eual except for button cmds */ | | uint16_t hli_ss; /**< status, only low 2 bits 0: no buttons, 1: different
2: equal 3: eual except for button cmds */ | |
| uint32_t hli_s_ptm; /**< start ptm of hli */ | | uint32_t hli_s_ptm; /**< start ptm of hli */ | |
| uint32_t hli_e_ptm; /**< end ptm of hli */ | | uint32_t hli_e_ptm; /**< end ptm of hli */ | |
| uint32_t btn_se_e_ptm; /**< end ptm of button select */ | | uint32_t btn_se_e_ptm; /**< end ptm of button select */ | |
|
| #ifdef WORDS_BIGENDIAN | | | |
| unsigned int zero1 : 2; /**< reserved */ | | unsigned int zero1 : 2; /**< reserved */ | |
| unsigned int btngr_ns : 2; /**< number of button groups 1, 2 or 3 w
ith 36/18/12 buttons */ | | unsigned int btngr_ns : 2; /**< number of button groups 1, 2 or 3 w
ith 36/18/12 buttons */ | |
| unsigned int zero2 : 1; /**< reserved */ | | unsigned int zero2 : 1; /**< reserved */ | |
| unsigned int btngr1_dsp_ty : 3; /**< display type of subpic stream for b
utton group 1 */ | | unsigned int btngr1_dsp_ty : 3; /**< display type of subpic stream for b
utton group 1 */ | |
| unsigned int zero3 : 1; /**< reserved */ | | unsigned int zero3 : 1; /**< reserved */ | |
| unsigned int btngr2_dsp_ty : 3; /**< display type of subpic stream for b
utton group 2 */ | | unsigned int btngr2_dsp_ty : 3; /**< display type of subpic stream for b
utton group 2 */ | |
| unsigned int zero4 : 1; /**< reserved */ | | unsigned int zero4 : 1; /**< reserved */ | |
| unsigned int btngr3_dsp_ty : 3; /**< display type of subpic stream for b
utton group 3 */ | | unsigned int btngr3_dsp_ty : 3; /**< display type of subpic stream for b
utton group 3 */ | |
|
| #else | | | |
| unsigned int btngr1_dsp_ty : 3; | | | |
| unsigned int zero2 : 1; | | | |
| unsigned int btngr_ns : 2; | | | |
| unsigned int zero1 : 2; | | | |
| unsigned int btngr3_dsp_ty : 3; | | | |
| unsigned int zero4 : 1; | | | |
| unsigned int btngr2_dsp_ty : 3; | | | |
| unsigned int zero3 : 1; | | | |
| #endif | | | |
| uint8_t btn_ofn; /**< button offset number range 0-255 */ | | uint8_t btn_ofn; /**< button offset number range 0-255 */ | |
| uint8_t btn_ns; /**< number of valid buttons <= 36/18/12 (low 6 bit
s) */ | | uint8_t btn_ns; /**< number of valid buttons <= 36/18/12 (low 6 bit
s) */ | |
| uint8_t nsl_btn_ns; /**< number of buttons selectable by U_BTNNi (low 6
bits) nsl_btn_ns <= btn_ns */ | | uint8_t nsl_btn_ns; /**< number of buttons selectable by U_BTNNi (low 6
bits) nsl_btn_ns <= btn_ns */ | |
| uint8_t zero5; /**< reserved */ | | uint8_t zero5; /**< reserved */ | |
| uint8_t fosl_btnn; /**< forcedly selected button (low 6 bits) */ | | uint8_t fosl_btnn; /**< forcedly selected button (low 6 bits) */ | |
| uint8_t foac_btnn; /**< forcedly activated button (low 6 bits) */ | | uint8_t foac_btnn; /**< forcedly activated button (low 6 bits) */ | |
| } ATTRIBUTE_PACKED hl_gi_t; | | } ATTRIBUTE_PACKED hl_gi_t; | |
| | | | |
| /** | | /** | |
| * Button Color Information Table | | * Button Color Information Table | |
| | | | |
| skipping to change at line 148 | | skipping to change at line 117 | |
| } ATTRIBUTE_PACKED btn_colit_t; | | } ATTRIBUTE_PACKED btn_colit_t; | |
| | | | |
| /** | | /** | |
| * Button Information | | * Button Information | |
| * | | * | |
| * NOTE: I've had to change the structure from the disk layout to get | | * NOTE: I've had to change the structure from the disk layout to get | |
| * the packing to work with Sun's Forte C compiler. | | * the packing to work with Sun's Forte C compiler. | |
| * The 4 and 7 bytes are 'rotated' was: ABC DEF GHIJ is: ABCG DEFH IJ | | * The 4 and 7 bytes are 'rotated' was: ABC DEF GHIJ is: ABCG DEFH IJ | |
| */ | | */ | |
| typedef struct { | | typedef struct { | |
|
| #ifdef WORDS_BIGENDIAN | | | |
| unsigned int btn_coln : 2; /**< button color number */ | | unsigned int btn_coln : 2; /**< button color number */ | |
| unsigned int x_start : 10; /**< x start offset within the overla
y */ | | unsigned int x_start : 10; /**< x start offset within the overla
y */ | |
| unsigned int zero1 : 2; /**< reserved */ | | unsigned int zero1 : 2; /**< reserved */ | |
| unsigned int x_end : 10; /**< x end offset within the overlay
*/ | | unsigned int x_end : 10; /**< x end offset within the overlay
*/ | |
| | | | |
|
| unsigned int zero3 : 2; /**< reserved */ | | | |
| unsigned int up : 6; /**< button index when pressing up */ | | | |
| | | | |
| unsigned int auto_action_mode : 2; /**< 0: no, 1: activated if selected
*/ | | unsigned int auto_action_mode : 2; /**< 0: no, 1: activated if selected
*/ | |
| unsigned int y_start : 10; /**< y start offset within the overla
y */ | | unsigned int y_start : 10; /**< y start offset within the overla
y */ | |
| unsigned int zero2 : 2; /**< reserved */ | | unsigned int zero2 : 2; /**< reserved */ | |
| unsigned int y_end : 10; /**< y end offset within the overlay
*/ | | unsigned int y_end : 10; /**< y end offset within the overlay
*/ | |
| | | | |
|
| | | unsigned int zero3 : 2; /**< reserved */ | |
| | | unsigned int up : 6; /**< button index when pressing up */ | |
| unsigned int zero4 : 2; /**< reserved */ | | unsigned int zero4 : 2; /**< reserved */ | |
| unsigned int down : 6; /**< button index when pressing down
*/ | | unsigned int down : 6; /**< button index when pressing down
*/ | |
| unsigned int zero5 : 2; /**< reserved */ | | unsigned int zero5 : 2; /**< reserved */ | |
| unsigned int left : 6; /**< button index when pressing left
*/ | | unsigned int left : 6; /**< button index when pressing left
*/ | |
| unsigned int zero6 : 2; /**< reserved */ | | unsigned int zero6 : 2; /**< reserved */ | |
| unsigned int right : 6; /**< button index when pressing right
*/ | | unsigned int right : 6; /**< button index when pressing right
*/ | |
|
| #else | | | |
| unsigned int x_end : 10; | | | |
| unsigned int zero1 : 2; | | | |
| unsigned int x_start : 10; | | | |
| unsigned int btn_coln : 2; | | | |
| | | | |
| unsigned int up : 6; | | | |
| unsigned int zero3 : 2; | | | |
| | | | |
| unsigned int y_end : 10; | | | |
| unsigned int zero2 : 2; | | | |
| unsigned int y_start : 10; | | | |
| unsigned int auto_action_mode : 2; | | | |
| | | | |
| unsigned int down : 6; | | | |
| unsigned int zero4 : 2; | | | |
| unsigned int left : 6; | | | |
| unsigned int zero5 : 2; | | | |
| unsigned int right : 6; | | | |
| unsigned int zero6 : 2; | | | |
| #endif | | | |
| vm_cmd_t cmd; | | vm_cmd_t cmd; | |
| } ATTRIBUTE_PACKED btni_t; | | } ATTRIBUTE_PACKED btni_t; | |
| | | | |
| /** | | /** | |
| * Highlight Information | | * Highlight Information | |
| */ | | */ | |
| typedef struct { | | typedef struct { | |
| hl_gi_t hl_gi; | | hl_gi_t hl_gi; | |
| btn_colit_t btn_colit; | | btn_colit_t btn_colit; | |
| btni_t btnit[36]; | | btni_t btnit[36]; | |
| | | | |
End of changes. 8 change blocks. |
| 58 lines changed or deleted | | 3 lines changed or added | |
|