dvd_reader.h   dvd_reader.h 
#ifndef DVD_READER_H_INCLUDED #ifndef DVD_READER_H_INCLUDED
#define DVD_READER_H_INCLUDED #define DVD_READER_H_INCLUDED
/* /*
* Copyright (C) 2001, 2002 Billy Biggs <vektor@dumbterm.net>, * Copyright (C) 2001, 2002 Billy Biggs <vektor@dumbterm.net>,
* H * H
* Bj
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or (at * the Free Software Foundation; either version 2 of the License, or (at
* your option) any later version. * your option) any later version.
* *
* 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
*/ */
#include <sys/types.h> #include <sys/types.h>
/** /**
* The length of one Logical Block of a DVD Video. * The DVD access interface.
*
* This file contains the functions that form the interface to to
* reading files located on a DVD.
*/
/**
* The current version.
*/
#define DVDREAD_VERSION 904
/**
* The length of one Logical Block of a DVD.
*/ */
#define DVD_VIDEO_LB_LEN 2048 #define DVD_VIDEO_LB_LEN 2048
/** /**
* Maximum length of filenames for UDF. * Maximum length of filenames allowed in UDF.
*/ */
#define MAX_UDF_FILE_NAME_LEN 2048 #define MAX_UDF_FILE_NAME_LEN 2048
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
/**
* Opaque type that is used as a handle for one instance of an opened DVD.
*/
typedef struct dvd_reader_s dvd_reader_t; typedef struct dvd_reader_s dvd_reader_t;
/**
* Opaque type for a file read handle, much like a normal fd or FILE *.
*/
typedef struct dvd_file_s dvd_file_t; typedef struct dvd_file_s dvd_file_t;
/** /**
* dvd = DVDOpen(path);
*
* Opens a block device of a DVD-ROM file, or an image file, or a directory * Opens a block device of a DVD-ROM file, or an image file, or a directory
* name for a mounted DVD or HD copy of a DVD. Returns 0 if we can't get a * name for a mounted DVD or HD copy of a DVD.
ny
* of those methods to work.
* *
* If the given file is a block device, or is the mountpoint for a block * If the given file is a block device, or is the mountpoint for a block
* device, then that device is used for CSS authentication using libdvdcss. * device, then that device is used for CSS authentication using libdvdcss.
* If no device is available, then no CSS authentication is performed, * If no device is available, then no CSS authentication is performed,
* and we hope that the image is decrypted. * and we hope that the image is decrypted.
* *
* If the path given is a directory, then the files in that directory may b * If the path given is a directory, then the files in that directory may b
e in e
* any one of these formats: * in any one of these formats:
* *
* path/VIDEO_TS/VTS_01_1.VOB * path/VIDEO_TS/VTS_01_1.VOB
* path/video_ts/vts_01_1.vob * path/video_ts/vts_01_1.vob
* path/VTS_01_1.VOB * path/VTS_01_1.VOB
* path/vts_01_1.vob * path/vts_01_1.vob
*
* @param path Specifies the the device, file or directory to be used.
* @return If successful a a read handle is returned. Otherwise 0 is return
ed.
*
* dvd = DVDOpen(path);
*/ */
dvd_reader_t *DVDOpen( const char * ); dvd_reader_t *DVDOpen( const char * );
/** /**
* DVDClose(dvd); * Closes and cleans up the DVD reader object.
* *
* Closes and cleans up the DVD reader object. You must close all open fil * You must close all open files before calling this function.
es *
* before calling this function. * @param dvd A read handle that should be closed.
*
* DVDClose(dvd);
*/ */
void DVDClose( dvd_reader_t * ); void DVDClose( dvd_reader_t * );
/** /**
* INFO_FILE : VIDEO_TS.IFO (manager)
* VTS_XX_0.IFO (title)
* *
* INFO_BACKUP_FILE: VIDEO_TS.BUP (manager)
* VTS_XX_0.BUP (title)
*
* MENU_VOBS : VIDEO_TS.VOB (manager)
* VTS_XX_0.VOB (title)
*
* TITLE_VOBS : VTS_XX_[1-9].VOB (title)
* All files in the title set are opened and
* read as a single file.
*/ */
typedef enum { typedef enum {
DVD_READ_INFO_FILE, DVD_READ_INFO_FILE, /**< VIDEO_TS.IFO or VTS_XX_0.IFO (title) */
DVD_READ_INFO_BACKUP_FILE, DVD_READ_INFO_BACKUP_FILE, /**< VIDEO_TS.BUP or VTS_XX_0.BUP (title) */
DVD_READ_MENU_VOBS, DVD_READ_MENU_VOBS, /**< VIDEO_TS.VOB or VTS_XX_0.VOB (title) */
DVD_READ_TITLE_VOBS DVD_READ_TITLE_VOBS /**< VTS_XX_[1-9].VOB (title). All files in
the title set are opened and read as a
single file. */
} dvd_read_domain_t; } dvd_read_domain_t;
/** /**
* dvd_file = DVDOpenFile(dvd, titlenum, domain); * Opens a file on the DVD given the title number and domain.
* *
* Opens a file on the DVD given the title number and domain. If the title * If the title number is 0, the video manager information is opened
* number is 0, the video manager information is opened * (VIDEO_TS.[IFO,BUP,VOB]). Returns a file structure which may be
* (VIDEO_TS.[IFO,BUP,VOB]). Returns a file structure which may be used fo * used for reads, or 0 if the file was not found.
r *
* reads, or 0 if the file was not found. * @param dvd A dvd read handle.
*/ * @param titlenum Which Video Title Set should be used, VIDEO_TS is 0.
dvd_file_t *DVDOpenFile( dvd_reader_t *, int, * @param domain Which domain.
dvd_read_domain_t ); * @return If successful a a file read handle is returned, otherwise 0.
*
* dvd_file = DVDOpenFile(dvd, titlenum, domain); */
dvd_file_t *DVDOpenFile( dvd_reader_t *, int, dvd_read_domain_t );
/** /**
* DVDCloseFile(dvd_file);
*
* Closes a file and frees the associated structure. * Closes a file and frees the associated structure.
*
* @param dvd_file The file read handle to be closed.
*
* DVDCloseFile(dvd_file);
*/ */
void DVDCloseFile( dvd_file_t * ); void DVDCloseFile( dvd_file_t * );
/** /**
* blocks_read = DVDReadBlocks(dvd_file, offset, block_count, data);
*
* Reads block_count number of blocks from the file at the given block offs et. * Reads block_count number of blocks from the file at the given block offs et.
* Returns number of blocks read on success, -1 on error. This call is onl y * Returns number of blocks read on success, -1 on error. This call is onl y
* for reading VOB data, and should not be used when reading the IFO files. * for reading VOB data, and should not be used when reading the IFO files.
* When reading from an encrypted drive, blocks are decrypted using libdvdc ss * When reading from an encrypted drive, blocks are decrypted using libdvdc ss
* where required. * where required.
*
* @param dvd_file A file read handle.
* @param offset Block offset from the start of the file to start reading a
t.
* @param block_count Number of block to read.
* @param data Pointer to a buffer to write the data into.
* @return Returns number of blocks read on success, -1 on error.
*
* blocks_read = DVDReadBlocks(dvd_file, offset, block_count, data);
*/ */
ssize_t DVDReadBlocks( dvd_file_t *, int, size_t, unsigned char * ); ssize_t DVDReadBlocks( dvd_file_t *, int, size_t, unsigned char * );
/** /**
* offset_set = DVDFileSeek(dvd_file, seek_offset);
*
* Seek to the given position in the file. Returns the resulting position in * Seek to the given position in the file. Returns the resulting position in
* 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 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.
*
* offset_set = DVDFileSeek(dvd_file, seek_offset);
*/ */
int DVDFileSeek( dvd_file_t *, int ); int DVDFileSeek( dvd_file_t *, int );
/** /**
* bytes_read = DVDReadBytes(dvd_file, data, bytes);
*
* 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 data Pointer to a buffer to write the data into.
* @param bytes Number of bytes to read.
* @return Returns number of bytes read on success, -1 on error.
*
* bytes_read = DVDReadBytes(dvd_file, data, bytes);
*/ */
ssize_t DVDReadBytes( dvd_file_t *, void *, size_t ); ssize_t DVDReadBytes( dvd_file_t *, void *, size_t );
/** /**
* blocks = DVDFileSize(dvd_file);
*
* Returns the file size in blocks. * Returns the file size in blocks.
*
* @param dvd_file A file read handle.
* @return The size of the file in blocks, -1 on error.
*
* blocks = DVDFileSize(dvd_file);
*/ */
ssize_t DVDFileSize( dvd_file_t * ); ssize_t DVDFileSize( dvd_file_t * );
/**
* Get a unique 128 bit disc ID.
* This is the MD5 sum of VIDEO_TS.IFO and the VTS_0?_0.IFO files
* in title order (those that exist).
* If you need a 'text' representation of the id, print it as a
* hexadecimal number, using lowercase letters, discid[0] first.
* I.e. the same format as the command-line 'md5sum' program uses.
*
* @param dvd A read handle to get the disc ID from
* @param discid The buffer to put the disc ID into. The buffer must
* have room for 128 bits (16 chars).
* @return 0 on success, -1 on error.
*/
int DVDDiscID( dvd_reader_t *, unsigned char * );
/**
* Get the UDF VolumeIdentifier and VolumeSetIdentifier
* from the PrimaryVolumeDescriptor.
*
* @param dvd A read handle to get the disc ID from
* @param volid The buffer to put the VolumeIdentifier into.
* The VolumeIdentifier is latin-1 encoded (8bit unicode)
* null terminated and max 32 bytes (including '\0')
* @param volid_size No more than volid_size bytes will be copied to volid.
* If the VolumeIdentifier is truncated because of this
* it will still be null terminated.
* @param volsetid The buffer to put the VolumeSetIdentifier into.
* The VolumeIdentifier is 128 bytes as
* stored in the UDF PrimaryVolumeDescriptor.
* Note that this is not a null terminated string.
* @param volsetid_size At most volsetid_size bytes will be copied to volse
tid.
* @return 0 on success, -1 on error.
*/
int DVDUDFVolumeInfo( dvd_reader_t *, char *, unsigned int,
unsigned char *, unsigned int );
/**
* Get the ISO9660 VolumeIdentifier and VolumeSetIdentifier
*
* * Only use this function as fallback if DVDUDFVolumeInfo returns 0 *
* * this will happen on a disc mastered only with a iso9660 filesystem *
* * All video DVD discs have UDF filesystem *
*
* @param dvd A read handle to get the disc ID from
* @param volid The buffer to put the VolumeIdentifier into.
* The VolumeIdentifier is coded with '0-9','A-Z','_'
* null terminated and max 33 bytes (including '\0')
* @param volid_size No more than volid_size bytes will be copied to volid.
* If the VolumeIdentifier is truncated because of this
* it will still be null terminated.
* @param volsetid The buffer to put the VolumeSetIdentifier into.
* The VolumeIdentifier is 128 bytes as
* stored in the ISO9660 PrimaryVolumeDescriptor.
* Note that this is not a null terminated string.
* @param volsetid_size At most volsetid_size bytes will be copied to volse
tid.
* @return 0 on success, -1 on error.
*/
int DVDISOVolumeInfo( dvd_reader_t *, char *, unsigned int,
unsigned char *, unsigned int );
/**
* Sets the level of caching that is done when reading from a device
*
* @param dvd A read handle to get the disc ID from
* @param level The level of caching wanted.
* -1 - returns the current setting.
* 0 - UDF Cache turned off.
* 1 - (default level) Pointers to IFO files and some data fro
m
* PrimaryVolumeDescriptor are cached.
*
* @return The level of caching.
*/
int DVDUDFCacheLevel( dvd_reader_t *, int );
#ifdef __cplusplus #ifdef __cplusplus
}; };
#endif #endif
#endif /* DVD_READER_H_INCLUDED */ #endif /* DVD_READER_H_INCLUDED */
 End of changes. 27 change blocks. 
49 lines changed or deleted 165 lines changed or added


 ifo_print.h   ifo_print.h 
skipping to change at line 52 skipping to change at line 52
void ifoPrint_VMGI_MAT(vmgi_mat_t *); void ifoPrint_VMGI_MAT(vmgi_mat_t *);
void ifoPrint_VTSI_MAT(vtsi_mat_t *); void ifoPrint_VTSI_MAT(vtsi_mat_t *);
void ifoPrint_PTL_MAIT(ptl_mait_t *); void ifoPrint_PTL_MAIT(ptl_mait_t *);
void ifoPrint_VTS_ATRT(vts_atrt_t *); void ifoPrint_VTS_ATRT(vts_atrt_t *);
void ifoPrint_TT_SRPT(tt_srpt_t *); void ifoPrint_TT_SRPT(tt_srpt_t *);
void ifoPrint_VTS_PTT_SRPT(vts_ptt_srpt_t *); void ifoPrint_VTS_PTT_SRPT(vts_ptt_srpt_t *);
void ifoPrint_PGC(pgc_t *); void ifoPrint_PGC(pgc_t *);
void ifoPrint_PGCIT(pgcit_t *); void ifoPrint_PGCIT(pgcit_t *);
void ifoPrint_PGCI_UT(pgci_ut_t *); void ifoPrint_PGCI_UT(pgci_ut_t *);
void ifoPrint_VTS_TMAPT(vts_tmapt_t *);
void ifoPrint_C_ADT(c_adt_t *); void ifoPrint_C_ADT(c_adt_t *);
void ifoPrint_VOBU_ADMAP(vobu_admap_t *); void ifoPrint_VOBU_ADMAP(vobu_admap_t *);
#ifdef __cplusplus #ifdef __cplusplus
}; };
#endif #endif
#endif /* IFO_PRINT_H_INCLUDED */ #endif /* IFO_PRINT_H_INCLUDED */
 End of changes. 1 change blocks. 
0 lines changed or deleted 1 lines changed or added


 ifo_read.h   ifo_read.h 
skipping to change at line 113 skipping to change at line 113
* located in the video title set information file. This structure is * located in the video title set information file. This structure is
* mandatory, and must be included in the VTSI file. * mandatory, and must be included in the VTSI file.
*/ */
int ifoRead_VTS_PTT_SRPT(ifo_handle_t *); int ifoRead_VTS_PTT_SRPT(ifo_handle_t *);
/** /**
* okay = ifoRead_FP_PGC(ifofile); * okay = ifoRead_FP_PGC(ifofile);
* *
* Reads in the first play program chain data, filling the * Reads in the first play program chain data, filling the
* ifofile->first_play_pgc structure. This data is only located in the vid eo * ifofile->first_play_pgc structure. This data is only located in the vid eo
* manager information file. This structure is mandatory, and must be incl * manager information file (VMGI). This structure is optional.
uded
* in the VMGI file. **Possibly this is only optional.**
*/ */
int ifoRead_FP_PGC(ifo_handle_t *); int ifoRead_FP_PGC(ifo_handle_t *);
/** /**
* okay = ifoRead_PGCIT(ifofile); * okay = ifoRead_PGCIT(ifofile);
* *
* Reads in the program chain information table for the video title set. F ills * Reads in the program chain information table for the video title set. F ills
* in the ifofile->vts_pgcit structure and its substructures, which include s * in the ifofile->vts_pgcit structure and its substructures, which include s
* the data for each program chain in the set. This data is only located i n * the data for each program chain in the set. This data is only located i n
* the video title set information file. This structure is mandatory, and must * the video title set information file. This structure is mandatory, and must
skipping to change at line 142 skipping to change at line 141
* Reads in the menu PGCI unit table for the menu VOB. For the video manag er, * Reads in the menu PGCI unit table for the menu VOB. For the video manag er,
* this corresponds to the VIDEO_TS.VOB file, and for each title set, this * this corresponds to the VIDEO_TS.VOB file, and for each title set, this
* corresponds to the VTS_XX_0.VOB file. This data is located in both the * corresponds to the VTS_XX_0.VOB file. This data is located in both the
* video manager and video title set information files. For VMGI files, th is * video manager and video title set information files. For VMGI files, th is
* fills the ifofile->vmgi_pgci_ut structure and all its substructures. Fo r * fills the ifofile->vmgi_pgci_ut structure and all its substructures. Fo r
* VTSI files, this fills the ifofile->vtsm_pgci_ut structure. * VTSI files, this fills the ifofile->vtsm_pgci_ut structure.
*/ */
int ifoRead_PGCI_UT(ifo_handle_t *); int ifoRead_PGCI_UT(ifo_handle_t *);
/** /**
* okay = ifoRead_VTS_TMAPT(ifofile);
*
* Reads in the VTS Time Map Table, this data is only located in the video
* title set information file. This fills the ifofile->vts_tmapt structure
* and all its substructures. When pressent enables VOBU level time-based
* seeking for One_Sequential_PGC_Titles.
*/
int ifoRead_VTS_TMAPT(ifo_handle_t *);
/**
* okay = ifoRead_C_ADT(ifofile); * okay = ifoRead_C_ADT(ifofile);
* *
* Reads in the cell address table for the menu VOB. For the video manager , * Reads in the cell address table for the menu VOB. For the video manager ,
* this corresponds to the VIDEO_TS.VOB file, and for each title set, this * this corresponds to the VIDEO_TS.VOB file, and for each title set, this
* corresponds to the VTS_XX_0.VOB file. This data is located in both the * corresponds to the VTS_XX_0.VOB file. This data is located in both the
* video manager and video title set information files. For VMGI files, th is * video manager and video title set information files. For VMGI files, th is
* fills the ifofile->vmgm_c_adt structure and all its substructures. For VTSI * fills the ifofile->vmgm_c_adt structure and all its substructures. For VTSI
* files, this fills the ifofile->vtsm_c_adt structure. * files, this fills the ifofile->vtsm_c_adt structure.
*/ */
int ifoRead_C_ADT(ifo_handle_t *); int ifoRead_C_ADT(ifo_handle_t *);
skipping to change at line 208 skipping to change at line 217
* below are safe: they will not mind if you attempt to free part of an IF O * below are safe: they will not mind if you attempt to free part of an IF O
* file which was not read in or which does not exist. * file which was not read in or which does not exist.
*/ */
void ifoFree_PTL_MAIT(ifo_handle_t *); void ifoFree_PTL_MAIT(ifo_handle_t *);
void ifoFree_VTS_ATRT(ifo_handle_t *); void ifoFree_VTS_ATRT(ifo_handle_t *);
void ifoFree_TT_SRPT(ifo_handle_t *); void ifoFree_TT_SRPT(ifo_handle_t *);
void ifoFree_VTS_PTT_SRPT(ifo_handle_t *); void ifoFree_VTS_PTT_SRPT(ifo_handle_t *);
void ifoFree_FP_PGC(ifo_handle_t *); void ifoFree_FP_PGC(ifo_handle_t *);
void ifoFree_PGCIT(ifo_handle_t *); void ifoFree_PGCIT(ifo_handle_t *);
void ifoFree_PGCI_UT(ifo_handle_t *); void ifoFree_PGCI_UT(ifo_handle_t *);
void ifoFree_VTS_TMAPT(ifo_handle_t *);
void ifoFree_C_ADT(ifo_handle_t *); void ifoFree_C_ADT(ifo_handle_t *);
void ifoFree_TITLE_C_ADT(ifo_handle_t *); void ifoFree_TITLE_C_ADT(ifo_handle_t *);
void ifoFree_VOBU_ADMAP(ifo_handle_t *); void ifoFree_VOBU_ADMAP(ifo_handle_t *);
void ifoFree_TITLE_VOBU_ADMAP(ifo_handle_t *); void ifoFree_TITLE_VOBU_ADMAP(ifo_handle_t *);
void ifoFree_TXTDT_MGI(ifo_handle_t *); void ifoFree_TXTDT_MGI(ifo_handle_t *);
#ifdef __cplusplus #ifdef __cplusplus
}; };
#endif #endif
#endif /* IFO_READ_H_INCLUDED */ #endif /* IFO_READ_H_INCLUDED */
 End of changes. 3 change blocks. 
3 lines changed or deleted 12 lines changed or added


 ifo_types.h   ifo_types.h 
skipping to change at line 59 skipping to change at line 59
* The following structures are used in both the VMGI and VTSI. * The following structures are used in both the VMGI and VTSI.
*/ */
/** /**
* DVD Time Information. * DVD Time Information.
*/ */
typedef struct { typedef struct {
uint8_t hour; uint8_t hour;
uint8_t minute; uint8_t minute;
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 8
skipping to change at line 82 skipping to change at line 82
*/ */
typedef struct { typedef struct {
#ifdef WORDS_BIGENDIAN #ifdef WORDS_BIGENDIAN
unsigned int mpeg_version : 2; unsigned int mpeg_version : 2;
unsigned int video_format : 2; unsigned int video_format : 2;
unsigned int display_aspect_ratio : 2; unsigned int display_aspect_ratio : 2;
unsigned int permitted_df : 2; unsigned int permitted_df : 2;
unsigned int line21_cc_1 : 1; unsigned int line21_cc_1 : 1;
unsigned int line21_cc_2 : 1; unsigned int line21_cc_2 : 1;
unsigned int unknown1 : 2; unsigned int unknown1 : 1;
unsigned int bit_rate : 1;
unsigned int picture_size : 2; unsigned int picture_size : 2;
unsigned int letterboxed : 1; unsigned int letterboxed : 1;
unsigned int film_mode : 1; unsigned int film_mode : 1;
#else #else
unsigned int permitted_df : 2; unsigned int permitted_df : 2;
unsigned int display_aspect_ratio : 2; unsigned int display_aspect_ratio : 2;
unsigned int video_format : 2; unsigned int video_format : 2;
unsigned int mpeg_version : 2; unsigned int mpeg_version : 2;
unsigned int film_mode : 1; unsigned int film_mode : 1;
unsigned int letterboxed : 1; unsigned int letterboxed : 1;
unsigned int picture_size : 2; unsigned int picture_size : 2;
unsigned int unknown1 : 2; unsigned int bit_rate : 1;
unsigned int unknown1 : 1;
unsigned int line21_cc_2 : 1; unsigned int line21_cc_2 : 1;
unsigned int line21_cc_1 : 1; unsigned int line21_cc_1 : 1;
#endif #endif
} ATTRIBUTE_PACKED video_attr_t; } ATTRIBUTE_PACKED video_attr_t;
/** /**
* Audio Attributes. (Incomplete/Wrong?) * Audio Attributes.
*/ */
typedef struct { typedef struct {
#ifdef WORDS_BIGENDIAN #ifdef WORDS_BIGENDIAN
unsigned int audio_format : 3; unsigned int audio_format : 3;
unsigned int multichannel_extension : 1; unsigned int multichannel_extension : 1;
unsigned int lang_type : 2; unsigned int lang_type : 2;
unsigned int application_mode : 2; unsigned int application_mode : 2;
unsigned int quantization : 2; unsigned int quantization : 2;
unsigned int sample_frequency : 2; unsigned int sample_frequency : 2;
skipping to change at line 129 skipping to change at line 131
unsigned int lang_type : 2; unsigned int lang_type : 2;
unsigned int multichannel_extension : 1; unsigned int multichannel_extension : 1;
unsigned int audio_format : 3; unsigned int audio_format : 3;
unsigned int channels : 3; unsigned int channels : 3;
unsigned int unknown1 : 1; unsigned int unknown1 : 1;
unsigned int sample_frequency : 2; unsigned int sample_frequency : 2;
unsigned int quantization : 2; unsigned int quantization : 2;
#endif #endif
uint16_t lang_code; uint16_t lang_code;
uint8_t lang_code2; // ??
uint8_t lang_extension; uint8_t lang_extension;
uint16_t unknown2; uint8_t code_extension;
uint8_t unknown3;
union {
struct ATTRIBUTE_PACKED {
#ifdef WORDS_BIGENDIAN
unsigned int unknown4 : 1;
unsigned int channel_assignment : 3;
unsigned int version : 2;
unsigned int mc_intro : 1; /* probably 0: true, 1:false */
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;
struct ATTRIBUTE_PACKED {
#ifdef WORDS_BIGENDIAN
unsigned int unknown5 : 4;
unsigned int dolby_encoded : 1; /* suitable for surround decodin
g */
unsigned int unknown6 : 3;
#else
unsigned int unknown6 : 3;
unsigned int dolby_encoded : 1;
unsigned int unknown5 : 4;
#endif
} surround;
} app_info;
} ATTRIBUTE_PACKED audio_attr_t; } ATTRIBUTE_PACKED audio_attr_t;
/** /**
* Subpicture Attributes.(Incomplete/Wrong) * MultiChannel Extension
*/
typedef struct {
#ifdef WORDS_BIGENDIAN
unsigned int zero1 : 7;
unsigned int ach0_gme : 1;
unsigned int zero2 : 7;
unsigned int ach1_gme : 1;
unsigned int zero3 : 4;
unsigned int ach2_gv1e : 1;
unsigned int ach2_gv2e : 1;
unsigned int ach2_gm1e : 1;
unsigned int ach2_gm2e : 1;
unsigned int zero4 : 4;
unsigned int ach3_gv1e : 1;
unsigned int ach3_gv2e : 1;
unsigned int ach3_gmAe : 1;
unsigned int ach3_se2e : 1;
unsigned int zero5 : 4;
unsigned int ach4_gv1e : 1;
unsigned int ach4_gv2e : 1;
unsigned int ach4_gmBe : 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];
} ATTRIBUTE_PACKED multichannel_ext_t;
/**
* 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
*/ */
uint8_t type; #ifdef WORDS_BIGENDIAN
uint8_t zero1; unsigned int code_mode : 3;
unsigned int zero1 : 3;
unsigned int type : 2;
#else
unsigned int type : 2;
unsigned int zero1 : 3;
unsigned int code_mode : 3;
#endif
uint8_t zero2;
uint16_t lang_code; uint16_t lang_code;
uint8_t lang_extension; uint8_t lang_extension;
uint8_t zero2; 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;
skipping to change at line 186 skipping to change at line 280
*/ */
typedef struct { typedef struct {
#ifdef WORDS_BIGENDIAN #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 unknown1 : 1; unsigned int playback_mode : 1; /**< When set, enter StillMode after
unsigned int restricted : 1; each VOBU */
unsigned int restricted : 1; /**< ?? drop out of fastforward? */
unsigned int unknown2 : 6; unsigned int unknown2 : 6;
#else #else
unsigned int seamless_angle : 1; unsigned int seamless_angle : 1;
unsigned int stc_discontinuity: 1; unsigned int stc_discontinuity: 1;
unsigned int interleaved : 1; unsigned int interleaved : 1;
unsigned int seamless_play : 1; unsigned int seamless_play : 1;
unsigned int block_type : 2; unsigned int block_type : 2;
unsigned int block_mode : 2; unsigned int block_mode : 2;
unsigned int unknown2 : 6; unsigned int unknown2 : 6;
unsigned int restricted : 1; unsigned int restricted : 1;
unsigned int unknown1 : 1; unsigned int playback_mode : 1;
#endif #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;
skipping to change at line 232 skipping to change at line 326
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 #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; // 22 unsigned int angle_change : 1;
unsigned int subpic_stream_change : 1; // 21 unsigned int subpic_stream_change : 1;
unsigned int audio_stream_change : 1; // 20 unsigned int audio_stream_change : 1;
unsigned int pause_on : 1; // 19 unsigned int pause_on : 1;
unsigned int still_off : 1; // 18 unsigned int still_off : 1;
unsigned int button_select_or_activate : 1; // 17 unsigned int button_select_or_activate : 1;
unsigned int resume : 1; // 16 unsigned int resume : 1; /* 16 */
unsigned int chapter_menu_call : 1; // 15 unsigned int chapter_menu_call : 1; /* 15 */
unsigned int angle_menu_call : 1; // 14 unsigned int angle_menu_call : 1;
unsigned int audio_menu_call : 1; // 13 unsigned int audio_menu_call : 1;
unsigned int subpic_menu_call : 1; // 12 unsigned int subpic_menu_call : 1;
unsigned int root_menu_call : 1; // 11 unsigned int root_menu_call : 1;
unsigned int title_menu_call : 1; // 10 unsigned int title_menu_call : 1;
unsigned int backward_scan : 1; // 9 unsigned int backward_scan : 1;
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; // 6 unsigned int prev_or_top_pg_search : 1;
unsigned int time_or_chapter_search : 1; // 5 unsigned int time_or_chapter_search : 1;
unsigned int go_up : 1; // 4 unsigned int go_up : 1;
unsigned int stop : 1; // 3 unsigned int stop : 1;
unsigned int title_play : 1; // 2 unsigned int title_play : 1;
unsigned int chapter_search_or_play : 1; // 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 #else
unsigned int video_pres_mode_change : 1; // 24 unsigned int video_pres_mode_change : 1; /* 24 */
unsigned int zero : 7; // 25-31 unsigned int zero : 7; /* 25-31 */
unsigned int resume : 1; // 16 unsigned int resume : 1; /* 16 */
unsigned int button_select_or_activate : 1; // 17 unsigned int button_select_or_activate : 1;
unsigned int still_off : 1; // 18 unsigned int still_off : 1;
unsigned int pause_on : 1; // 19 unsigned int pause_on : 1;
unsigned int audio_stream_change : 1; // 20 unsigned int audio_stream_change : 1;
unsigned int subpic_stream_change : 1; // 21 unsigned int subpic_stream_change : 1;
unsigned int angle_change : 1; // 22 unsigned int angle_change : 1;
unsigned int karaoke_audio_pres_mode_change : 1; // 23 unsigned int karaoke_audio_pres_mode_change : 1; /* 23 */
unsigned int forward_scan : 1; // 8 unsigned int forward_scan : 1; /* 8 */
unsigned int backward_scan : 1; // 9 unsigned int backward_scan : 1;
unsigned int title_menu_call : 1; // 10 unsigned int title_menu_call : 1;
unsigned int root_menu_call : 1; // 11 unsigned int root_menu_call : 1;
unsigned int subpic_menu_call : 1; // 12 unsigned int subpic_menu_call : 1;
unsigned int audio_menu_call : 1; // 13 unsigned int audio_menu_call : 1;
unsigned int angle_menu_call : 1; // 14 unsigned int angle_menu_call : 1;
unsigned int chapter_menu_call : 1; // 15 unsigned int chapter_menu_call : 1; /* 15 */
unsigned int title_or_time_play : 1; // 0 unsigned int title_or_time_play : 1; /* 0 */
unsigned int chapter_search_or_play : 1; // 1 unsigned int chapter_search_or_play : 1;
unsigned int title_play : 1; // 2 unsigned int title_play : 1;
unsigned int stop : 1; // 3 unsigned int stop : 1;
unsigned int go_up : 1; // 4 unsigned int go_up : 1;
unsigned int time_or_chapter_search : 1; // 5 unsigned int time_or_chapter_search : 1;
unsigned int prev_or_top_pg_search : 1; // 6 unsigned int prev_or_top_pg_search : 1;
unsigned int next_pg_search : 1; // 7 unsigned int next_pg_search : 1; /* 7 */
#endif #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;
skipping to change at line 358 skipping to change at line 452
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 8
/** /**
* Menu PGCI Language Unit. * Menu PGCI Language Unit.
*/ */
typedef struct { typedef struct {
uint16_t lang_code; uint16_t lang_code;
uint8_t zero_1; 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 8
/** /**
* Menu PGCI Unit Table. * Menu PGCI Unit Table.
*/ */
typedef struct { typedef struct {
skipping to change at line 394 skipping to change at line 488
uint32_t last_sector; uint32_t last_sector;
} ATTRIBUTE_PACKED cell_adr_t; } ATTRIBUTE_PACKED cell_adr_t;
/** /**
* 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; 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 8
/** /**
* 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;
skipping to change at line 447 skipping to change at line 541
uint32_t vmgm_pgci_ut; /* sector */ uint32_t vmgm_pgci_ut; /* sector */
uint32_t ptl_mait; /* sector */ uint32_t ptl_mait; /* sector */
uint32_t vts_atrt; /* sector */ uint32_t vts_atrt; /* sector */
uint32_t txtdt_mgi; /* sector */ uint32_t txtdt_mgi; /* sector */
uint32_t vmgm_c_adt; /* sector */ uint32_t vmgm_c_adt; /* sector */
uint32_t vmgm_vobu_admap; /* sector */ uint32_t vmgm_vobu_admap; /* sector */
uint8_t zero_6[32]; uint8_t zero_6[32];
video_attr_t vmgm_video_attr; video_attr_t vmgm_video_attr;
uint8_t zero_7; 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 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 #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 ti tle 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 #else
unsigned int title_or_time_play : 1; // UOP 0 unsigned int title_or_time_play : 1;
unsigned int chapter_search_or_play : 1; // UOP 1 unsigned int chapter_search_or_play : 1;
unsigned int jlc_exists_in_tt_dom : 1; unsigned int jlc_exists_in_tt_dom : 1;
unsigned int jlc_exists_in_button_cmd : 1; unsigned int jlc_exists_in_button_cmd : 1;
unsigned int jlc_exists_in_prepost_cmd : 1; unsigned int jlc_exists_in_prepost_cmd : 1;
unsigned int jlc_exists_in_cell_cmd : 1; unsigned int jlc_exists_in_cell_cmd : 1;
unsigned int multi_or_random_pgc_title : 1; // 0 == one sequential pgc ti tle unsigned int multi_or_random_pgc_title : 1;
unsigned int zero_1 : 1; unsigned int zero_1 : 1;
#endif #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;
skipping to change at line 504 skipping to change at line 598
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 8
/** /**
* Parental Management Information Unit Table. * Parental Management Information Unit Table.
* Level 1 (US: G), ..., 7 (US: NC-17), 8
*/
typedef uint16_t pf_level_t[8];
/**
* 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;
/* uint16_t *pf_ptl_mai // table of nr_of_vtss+1 x 8 */ 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 8
/** /**
* 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;
skipping to change at line 534 skipping to change at line 634
/** /**
* 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;
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 vtsm_audio_attr;
audio_attr_t zero_2[7]; audio_attr_t zero_2[7];
uint8_t zero_3[16]; uint8_t zero_3[16];
uint8_t zero_4; 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 vtsm_subp_attr;
subp_attr_t zero_5[27]; subp_attr_t zero_5[27];
uint8_t zero_6[2]; uint8_t zero_6[2];
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];
skipping to change at line 565 skipping to change at line 665
#define VTS_ATTRIBUTES_MIN_SIZE 356 #define VTS_ATTRIBUTES_MIN_SIZE 356
/** /**
* 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 */
} ATTRIBUTE_PACKED vts_atrt_t; } ATTRIBUTE_PACKED vts_atrt_t;
#define VTS_ATRT_SIZE 8 #define VTS_ATRT_SIZE 8
/** /**
* 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;
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 unknown1;
uint8_t unknown2; uint8_t unknown2;
uint8_t unknown3; uint8_t unknown3;
uint8_t unknown4;//?? allways 0x30 language?, text format? uint8_t unknown4; /* ?? allways 0x30 language?, text format? */
uint8_t unknown5; 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 #endif
} ATTRIBUTE_PACKED txtdt_t; } ATTRIBUTE_PACKED txtdt_t;
/** /**
* 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 */
skipping to change at line 645 skipping to change at line 746
uint64_t zero_9; uint64_t zero_9;
uint8_t zero_10[24]; uint8_t zero_10[24];
uint32_t vtsi_last_byte; uint32_t vtsi_last_byte;
uint32_t zero_11; uint32_t zero_11;
uint8_t zero_12[56]; uint8_t zero_12[56];
uint32_t vtsm_vobs; /* sector */ uint32_t vtsm_vobs; /* sector */
uint32_t vtstt_vobs; /* sector */ uint32_t vtstt_vobs; /* sector */
uint32_t vts_ptt_srpt; /* sector */ uint32_t vts_ptt_srpt; /* sector */
uint32_t vts_pgcit; /* sector */ uint32_t vts_pgcit; /* sector */
uint32_t vtsm_pgci_ut; /* sector */ uint32_t vtsm_pgci_ut; /* sector */
uint32_t vts_tmapt; /* sector */ // XXX: FIXME TODO Implement uint32_t vts_tmapt; /* sector */
uint32_t vtsm_c_adt; /* sector */ uint32_t vtsm_c_adt; /* sector */
uint32_t vtsm_vobu_admap; /* sector */ uint32_t vtsm_vobu_admap; /* sector */
uint32_t vts_c_adt; /* sector */ uint32_t vts_c_adt; /* sector */
uint32_t vts_vobu_admap; /* sector */ uint32_t vts_vobu_admap; /* sector */
uint8_t zero_13[24]; uint8_t zero_13[24];
video_attr_t vtsm_video_attr; video_attr_t vtsm_video_attr;
uint8_t zero_14; 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 vtsm_audio_attr;
audio_attr_t zero_15[7]; audio_attr_t zero_15[7];
uint8_t zero_16[17]; 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 vtsm_subp_attr;
subp_attr_t zero_17[27]; subp_attr_t zero_17[27];
uint8_t zero_18[2]; uint8_t zero_18[2];
video_attr_t vts_video_attr; video_attr_t vts_video_attr;
uint8_t zero_19; uint8_t zero_19;
uint8_t nr_of_vts_audio_streams; uint8_t nr_of_vts_audio_streams;
audio_attr_t vts_audio_attr[8]; audio_attr_t vts_audio_attr[8];
uint8_t zero_20[17]; uint8_t zero_20[17];
uint8_t nr_of_vts_subp_streams; uint8_t nr_of_vts_subp_streams;
subp_attr_t vts_subp_attr[32]; subp_attr_t vts_subp_attr[32];
uint16_t zero_21;
multichannel_ext_t vts_mu_audio_attr[8];
/* XXX: how much 'padding' here, if any? */ /* XXX: how much 'padding' here, if any? */
} ATTRIBUTE_PACKED vtsi_mat_t; } ATTRIBUTE_PACKED vtsi_mat_t;
/** /**
* PartOfTitle Unit Information. * PartOfTitle Unit Information.
*/ */
typedef struct { typedef struct {
uint16_t pgcn; uint16_t pgcn;
uint16_t pgn; uint16_t pgn;
} ATTRIBUTE_PACKED ptt_info_t; } ATTRIBUTE_PACKED ptt_info_t;
skipping to change at line 697 skipping to change at line 800
} ATTRIBUTE_PACKED ttu_t; } ATTRIBUTE_PACKED ttu_t;
/** /**
* 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 */
} ATTRIBUTE_PACKED vts_ptt_srpt_t; } ATTRIBUTE_PACKED vts_ptt_srpt_t;
#define VTS_PTT_SRPT_SIZE 8 #define VTS_PTT_SRPT_SIZE 8
/**
* Time Map Entry.
*/
/* Should this be bit field at all or just the uint32_t? */
typedef uint32_t map_ent_t;
/**
* Time Map.
*/
typedef struct {
uint8_t tmu; /* Time unit, in seconds */
uint8_t zero_1;
uint16_t nr_of_entries;
map_ent_t *map_ent;
} ATTRIBUTE_PACKED vts_tmap_t;
#define VTS_TMAP_SIZE 4
/**
* Time Map Table.
*/
typedef struct {
uint16_t nr_of_tmaps;
uint16_t zero_1;
uint32_t last_byte;
vts_tmap_t *tmap;
uint32_t *tmap_offset; /* offset table for each tmap */
} ATTRIBUTE_PACKED vts_tmapt_t;
#define VTS_TMAPT_SIZE 8
#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.
*/ */
skipping to change at line 730 skipping to change at line 863
/* Common */ /* Common */
pgci_ut_t *pgci_ut; pgci_ut_t *pgci_ut;
c_adt_t *menu_c_adt; c_adt_t *menu_c_adt;
vobu_admap_t *menu_vobu_admap; vobu_admap_t *menu_vobu_admap;
/* VTSI */ /* VTSI */
vtsi_mat_t *vtsi_mat; vtsi_mat_t *vtsi_mat;
vts_ptt_srpt_t *vts_ptt_srpt; vts_ptt_srpt_t *vts_ptt_srpt;
pgcit_t *vts_pgcit; pgcit_t *vts_pgcit;
int *vts_tmapt; // FIXME add/correct the type vts_tmapt_t *vts_tmapt;
c_adt_t *vts_c_adt; c_adt_t *vts_c_adt;
vobu_admap_t *vts_vobu_admap; vobu_admap_t *vts_vobu_admap;
} ifo_handle_t; } ifo_handle_t;
#endif /* IFO_TYPES_H_INCLUDED */ #endif /* IFO_TYPES_H_INCLUDED */
 End of changes. 40 change blocks. 
92 lines changed or deleted 228 lines changed or added


 nav_print.h   nav_print.h 
#ifndef NAV_PRINT_H_INCLUDED #ifndef NAV_PRINT_H_INCLUDED
#define NAV_PRINT_H_INCLUDED #define NAV_PRINT_H_INCLUDED
/* /*
* Copyright (C) 2001 Billy Biggs <vektor@dumbterm.net>, * Copyright (C) 2001, 2002 Billy Biggs <vektor@dumbterm.net>,
* H * H
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or (at * the Free Software Foundation; either version 2 of the License, or (at
* your option) any later version. * your option) any later version.
* *
* 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
*/ */
#include <dvdread/nav_types.h> #include <dvdread/nav_types.h>
/**
* Pretty printing of the NAV packets, PCI and DSI structs.
*/
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
/** /**
* Prints information contained in the PCI to stdout. * Prints information contained in the PCI to stdout.
*
* @param pci Pointer to the PCI data structure to be printed.
*/ */
void navPrint_PCI(pci_t *); void navPrint_PCI(pci_t *);
/** /**
* Prints information contained in the DSI to stdout. * Prints information contained in the DSI to stdout.
*
* @param dsi Pointer to the DSI data structure to be printed.
*/ */
void navPrint_DSI(dsi_t *); void navPrint_DSI(dsi_t *);
#ifdef __cplusplus #ifdef __cplusplus
}; };
#endif #endif
#endif /* NAV_PRINT_H_INCLUDED */ #endif /* NAV_PRINT_H_INCLUDED */
 End of changes. 4 change blocks. 
2 lines changed or deleted 10 lines changed or added


 nav_read.h   nav_read.h 
#ifndef NAV_READ_H_INCLUDED #ifndef NAV_READ_H_INCLUDED
#define NAV_READ_H_INCLUDED #define NAV_READ_H_INCLUDED
/* /*
* Copyright (C) 2000, 2001 H * Copyright (C) 2000, 2001, 2002 H
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* 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 <dvdread/nav_types.h> #include <dvdread/nav_types.h>
/**
* Parsing of NAV data, PCI and DSI parts.
*/
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
/** /**
* Reads the PCI packet data pointed to into pci struct. * Reads the PCI packet data pointed to into th pci struct.
*
* @param pci Pointer to the PCI data structure to be filled in.
* @param bufffer Pointer to the buffer of the on disc PCI data.
*/ */
void navRead_PCI(pci_t *, unsigned char *); void navRead_PCI(pci_t *, unsigned char *);
/** /**
* Reads the DSI packet data pointed to into dsi struct. * Reads the DSI packet data pointed to into dsi struct.
*
* @param dsi Pointer to the DSI data structure to be filled in.
* @param bufffer Pointer to the buffer of the on disc DSI data.
*/ */
void navRead_DSI(dsi_t *, unsigned char *); void navRead_DSI(dsi_t *, unsigned char *);
#ifdef __cplusplus #ifdef __cplusplus
}; };
#endif #endif
#endif /* NAV_READ_H_INCLUDED */ #endif /* NAV_READ_H_INCLUDED */
 End of changes. 4 change blocks. 
2 lines changed or deleted 12 lines changed or added


 nav_types.h   nav_types.h 
#ifndef NAV_TYPES_H_INCLUDED #ifndef NAV_TYPES_H_INCLUDED
#define NAV_TYPES_H_INCLUDED #define NAV_TYPES_H_INCLUDED
/* /*
* Copyright (C) 2000, 2001 H * Copyright (C) 2000, 2001, 2002 H
* *
* The data structures in this file should represent the layout of the * The data structures in this file should represent the layout of the
* pci and dsi packets as they are stored in the stream. Information * pci and dsi packets as they are stored in the stream. Information
* found by reading the source to VOBDUMP is the base for the structure * found by reading the source to VOBDUMP is the base for the structure
* and names of these data types. * and names of these data types.
* *
* VOBDUMP: a program for examining DVD .VOB files. * VOBDUMP: a program for examining DVD .VOB files.
* Copyright 1998, 1999 Eric Smith <eric@brouhaha.com> * Copyright 1998, 1999 Eric Smith <eric@brouhaha.com>
* *
* VOBDUMP is free software; you can redistribute it and/or modify it * VOBDUMP is free software; you can redistribute it and/or modify it
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 <dvdread/ifo_types.h> /* only dvd_time_t, vm_cmd_t and user_ops_t */
#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 69 skipping to change at line 69
#define DSI_START_BYTE 1031 #define DSI_START_BYTE 1031
#if PRAGMA_PACK #if PRAGMA_PACK
#pragma pack(1) #pragma pack(1)
#endif #endif
/** /**
* PCI General Information * PCI General Information
*/ */
typedef struct { typedef struct {
uint32_t nv_pck_lbn; uint32_t nv_pck_lbn; /**< sector address of this nav pack */
uint16_t vobu_cat; uint16_t vobu_cat; /**< 'category' of vobu */
uint16_t zero1; uint16_t zero1; /**< reserved */
user_ops_t vobu_uop_ctl; user_ops_t vobu_uop_ctl; /**< UOP of vobu */
uint32_t vobu_s_ptm; uint32_t vobu_s_ptm; /**< start presentation time of vobu */
uint32_t vobu_e_ptm; uint32_t vobu_e_ptm; /**< end presentation time of vobu */
uint32_t vobu_se_e_ptm; uint32_t vobu_se_e_ptm; /**< end ptm of sequence end in vobu */
dvd_time_t e_eltm; dvd_time_t e_eltm; /**< Cell elapsed time */
char vobu_isrc[32]; char vobu_isrc[32];
} ATTRIBUTE_PACKED pci_gi_t; } ATTRIBUTE_PACKED pci_gi_t;
/** /**
* Non Seamless Angle Information * Non Seamless Angle Information
*/ */
typedef struct { typedef struct {
uint32_t nsml_agl_dsta[9]; uint32_t nsml_agl_dsta[9]; /**< address of destination vobu in AGL_C#n * /
} ATTRIBUTE_PACKED nsml_agli_t; } ATTRIBUTE_PACKED nsml_agli_t;
/** /**
* Highlight General Information * Highlight General Information
*
* For btngrX_dsp_ty the bits have the following meaning:
* 000b: normal 4/3 only buttons
* XX1b: wide (16/9) buttons
* X1Xb: letterbox buttons
* 1XXb: pan&scan buttons
*/ */
typedef struct { typedef struct {
uint16_t hli_ss; ///< only low 2 bits uint16_t hli_ss; /**< status, only low 2 bits 0: no buttons, 1: different
uint32_t hli_s_ptm; 2: equal 3: eual except for button cmds */
uint32_t hli_e_ptm; uint32_t hli_s_ptm; /**< start ptm of hli */
uint32_t btn_se_e_ptm; uint32_t hli_e_ptm; /**< end ptm of hli */
uint32_t btn_se_e_ptm; /**< end ptm of button select */
#ifdef WORDS_BIGENDIAN #ifdef WORDS_BIGENDIAN
unsigned int zero1 : 2; unsigned int zero1 : 2; /**< reserved */
unsigned int btngr_ns : 2; unsigned int btngr_ns : 2; /**< number of button groups 1, 2 or 3 w
unsigned int zero2 : 1; ith 36/18/12 buttons */
unsigned int btngr1_dsp_ty : 3; unsigned int zero2 : 1; /**< reserved */
unsigned int zero3 : 1; unsigned int btngr1_dsp_ty : 3; /**< display type of subpic stream for b
unsigned int btngr2_dsp_ty : 3; utton group 1 */
unsigned int zero4 : 1; unsigned int zero3 : 1; /**< reserved */
unsigned int btngr3_dsp_ty : 3; unsigned int btngr2_dsp_ty : 3; /**< display type of subpic stream for b
utton group 2 */
unsigned int zero4 : 1; /**< reserved */
unsigned int btngr3_dsp_ty : 3; /**< display type of subpic stream for b
utton group 3 */
#else #else
unsigned int btngr1_dsp_ty : 3; unsigned int btngr1_dsp_ty : 3;
unsigned int zero2 : 1; unsigned int zero2 : 1;
unsigned int btngr_ns : 2; unsigned int btngr_ns : 2;
unsigned int zero1 : 2; unsigned int zero1 : 2;
unsigned int btngr3_dsp_ty : 3; unsigned int btngr3_dsp_ty : 3;
unsigned int zero4 : 1; unsigned int zero4 : 1;
unsigned int btngr2_dsp_ty : 3; unsigned int btngr2_dsp_ty : 3;
unsigned int zero3 : 1; unsigned int zero3 : 1;
#endif #endif
uint8_t btn_ofn; uint8_t btn_ofn; /**< button offset number range 0-255 */
uint8_t btn_ns; ///< only low 6 bits uint8_t btn_ns; /**< number of valid buttons <= 36/18/12 (low 6 bit
uint8_t nsl_btn_ns; ///< only low 6 bits s) */
uint8_t zero5; uint8_t nsl_btn_ns; /**< number of buttons selectable by U_BTNNi (low 6
uint8_t fosl_btnn; ///< only low 6 bits bits) nsl_btn_ns <= btn_ns */
uint8_t foac_btnn; ///< only low 6 bits uint8_t zero5; /**< reserved */
uint8_t fosl_btnn; /**< forcedly selected 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
* Each entry beeing a 32bit word that contains the color indexs and alpha
* values to use. They are all represented by 4 bit number and stored
* like this [Ci3, Ci2, Ci1, Ci0, A3, A2, A1, A0]. The actual palette
* that the indexes reference is in the PGC.
* @TODO split the uint32_t into a struct
*/ */
typedef struct { typedef struct {
uint32_t btn_coli[3][2]; uint32_t btn_coli[3][2]; /**< [button color number-1][select:0/action:1] */
} 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
* 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
*/ */
typedef struct { typedef struct {
#ifdef WORDS_BIGENDIAN #ifdef WORDS_BIGENDIAN
unsigned int btn_coln : 2; unsigned int btn_coln : 2; /**< button color number */
unsigned int x_start : 10; unsigned int x_start : 10; /**< x start offset within the overla
unsigned int zero1 : 2; y */
unsigned int x_end : 10; unsigned int zero1 : 2; /**< reserved */
unsigned int auto_action_mode : 2; unsigned int x_end : 10; /**< x end offset within the overlay
unsigned int y_start : 10; */
unsigned int zero2 : 2;
unsigned int y_end : 10; unsigned int zero3 : 2; /**< reserved */
unsigned int up : 6; /**< button index when pressing up */
unsigned int zero3 : 2;
unsigned int up : 6; unsigned int auto_action_mode : 2; /**< 0: no, 1: activated if selected
unsigned int zero4 : 2; */
unsigned int down : 6; unsigned int y_start : 10; /**< y start offset within the overla
unsigned int zero5 : 2; y */
unsigned int left : 6; unsigned int zero2 : 2; /**< reserved */
unsigned int zero6 : 2; unsigned int y_end : 10; /**< y end offset within the overlay
unsigned int right : 6; */
unsigned int zero4 : 2; /**< reserved */
unsigned int down : 6; /**< button index when pressing down
*/
unsigned int zero5 : 2; /**< reserved */
unsigned int left : 6; /**< button index when pressing left
*/
unsigned int zero6 : 2; /**< reserved */
unsigned int right : 6; /**< button index when pressing right
*/
#else #else
unsigned int x_end : 10; unsigned int x_end : 10;
unsigned int zero1 : 2; unsigned int zero1 : 2;
unsigned int x_start : 10; unsigned int x_start : 10;
unsigned int btn_coln : 2; unsigned int btn_coln : 2;
unsigned int up : 6;
unsigned int zero3 : 2;
unsigned int y_end : 10; unsigned int y_end : 10;
unsigned int zero2 : 2; unsigned int zero2 : 2;
unsigned int y_start : 10; unsigned int y_start : 10;
unsigned int auto_action_mode : 2; unsigned int auto_action_mode : 2;
unsigned int up : 6;
unsigned int zero3 : 2;
unsigned int down : 6; unsigned int down : 6;
unsigned int zero4 : 2; unsigned int zero4 : 2;
unsigned int left : 6; unsigned int left : 6;
unsigned int zero5 : 2; unsigned int zero5 : 2;
unsigned int right : 6; unsigned int right : 6;
unsigned int zero6 : 2; unsigned int zero6 : 2;
#endif #endif
vm_cmd_t cmd; vm_cmd_t cmd;
} ATTRIBUTE_PACKED btni_t; } ATTRIBUTE_PACKED btni_t;
skipping to change at line 197 skipping to change at line 216
nsml_agli_t nsml_agli; nsml_agli_t nsml_agli;
hli_t hli; hli_t hli;
uint8_t zero1[189]; uint8_t zero1[189];
} ATTRIBUTE_PACKED pci_t; } ATTRIBUTE_PACKED pci_t;
/** /**
* DSI General Information * DSI General Information
*/ */
typedef struct { typedef struct {
uint32_t nv_pck_scr; uint32_t nv_pck_scr;
uint32_t nv_pck_lbn; uint32_t nv_pck_lbn; /**< sector address of this nav pack */
uint32_t vobu_ea; uint32_t vobu_ea; /**< end address of this VOBU */
uint32_t vobu_1stref_ea; uint32_t vobu_1stref_ea; /**< end address of the 1st reference image */
uint32_t vobu_2ndref_ea; uint32_t vobu_2ndref_ea; /**< end address of the 2nd reference image */
uint32_t vobu_3rdref_ea; uint32_t vobu_3rdref_ea; /**< end address of the 3rd reference image */
uint16_t vobu_vob_idn; uint16_t vobu_vob_idn; /**< VOB Id number that this VOBU is part of */
uint8_t zero1; uint8_t zero1; /**< reserved */
uint8_t vobu_c_idn; uint8_t vobu_c_idn; /**< Cell Id number that this VOBU is part of *
dvd_time_t c_eltm; /
dvd_time_t c_eltm; /**< Cell elapsed time */
} ATTRIBUTE_PACKED dsi_gi_t; } ATTRIBUTE_PACKED dsi_gi_t;
/** /**
* Seamless Playback Information * Seamless Playback Information
*/ */
typedef struct { typedef struct {
uint16_t category; ///< category of seamless VOBU uint16_t category; /**< 'category' of seamless VOBU */
uint32_t ilvu_ea; ///< end address of interleaved Unit (sectors) uint32_t ilvu_ea; /**< end address of interleaved Unit */
uint32_t ilvu_sa; ///< start address of next interleaved unit (sectors) uint32_t ilvu_sa; /**< start address of next interleaved unit */
uint16_t size; ///< size of next interleaved unit (sectors) uint16_t size; /**< size of next interleaved unit */
uint32_t vob_v_s_s_ptm; ///< video start ptm in vob uint32_t vob_v_s_s_ptm; /**< video start ptm in vob */
uint32_t vob_v_e_e_ptm; ///< video end ptm in vob uint32_t vob_v_e_e_ptm; /**< video end ptm in vob */
struct { struct {
uint32_t stp_ptm1; uint32_t stp_ptm1;
uint32_t stp_ptm2; uint32_t stp_ptm2;
uint32_t gap_len1; uint32_t gap_len1;
uint32_t gap_len2; uint32_t gap_len2;
} vob_a[8]; } vob_a[8];
} ATTRIBUTE_PACKED sml_pbi_t; } ATTRIBUTE_PACKED sml_pbi_t;
/** /**
* Seamless Angle Infromation for one angle * Seamless Angle Infromation for one angle
*/ */
typedef struct { typedef struct {
uint32_t address; ///< Sector offset to next ILVU, high bit is before/a uint32_t address; /**< offset to next ILVU, high bit is before/after */
fter uint16_t size; /**< byte size of the ILVU pointed to by address */
uint16_t size; ///< Byte size of the ILVU poited to by address.
} ATTRIBUTE_PACKED sml_agl_data_t; } ATTRIBUTE_PACKED sml_agl_data_t;
/** /**
* Seamless Angle Infromation * Seamless Angle Infromation
*/ */
typedef struct { typedef struct {
sml_agl_data_t data[9]; sml_agl_data_t data[9];
} ATTRIBUTE_PACKED sml_agli_t; } ATTRIBUTE_PACKED sml_agli_t;
/** /**
* VOBU Search Information * VOBU Search Information
*/ */
typedef struct { typedef struct {
uint32_t next_video; ///< Next vobu that contains video uint32_t next_video; /**< Next vobu that contains video */
uint32_t fwda[19]; ///< Forwards, time uint32_t fwda[19]; /**< Forwards, time */
uint32_t next_vobu; uint32_t next_vobu;
uint32_t prev_vobu; uint32_t prev_vobu;
uint32_t bwda[19]; ///< Backwards, time uint32_t bwda[19]; /**< Backwards, time */
uint32_t prev_video; uint32_t prev_video;
} ATTRIBUTE_PACKED vobu_sri_t; } ATTRIBUTE_PACKED vobu_sri_t;
#define SRI_END_OF_CELL 0x3fffffff #define SRI_END_OF_CELL 0x3fffffff
/** /**
* Synchronous Information * Synchronous Information
*/ */
typedef struct { typedef struct {
uint16_t a_synca[8]; ///< Sector offset to first audio packet for this uint16_t a_synca[8]; /**< offset to first audio packet for this VOBU */
VOBU uint32_t sp_synca[32]; /**< offset to first subpicture packet */
uint32_t sp_synca[32]; ///< Sector offset to first subpicture packet
} ATTRIBUTE_PACKED synci_t; } ATTRIBUTE_PACKED synci_t;
/** /**
* DSI packet * DSI packet
*/ */
typedef struct { typedef struct {
dsi_gi_t dsi_gi; dsi_gi_t dsi_gi;
sml_pbi_t sml_pbi; sml_pbi_t sml_pbi;
sml_agli_t sml_agli; sml_agli_t sml_agli;
vobu_sri_t vobu_sri; vobu_sri_t vobu_sri;
 End of changes. 20 change blocks. 
73 lines changed or deleted 106 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/