comparison dvd_reader.h @ 20:fce16251755c src

Remove all trailing whitespace, patch by Erik Hovland *erik$hovland dot org%
author rathann
date Sat, 06 Sep 2008 21:55:51 +0000
parents fdbae45c30fc
children 4aa618ae094f
comparison
equal deleted inserted replaced
19:7f7e87bd7536 20:fce16251755c
54 #define MAX_UDF_FILE_NAME_LEN 2048 54 #define MAX_UDF_FILE_NAME_LEN 2048
55 55
56 #ifdef __cplusplus 56 #ifdef __cplusplus
57 extern "C" { 57 extern "C" {
58 #endif 58 #endif
59 59
60 /** 60 /**
61 * Opaque type that is used as a handle for one instance of an opened DVD. 61 * Opaque type that is used as a handle for one instance of an opened DVD.
62 */ 62 */
63 typedef struct dvd_reader_s dvd_reader_t; 63 typedef struct dvd_reader_s dvd_reader_t;
64 64
65 /** 65 /**
66 * Opaque type for a file read handle, much like a normal fd or FILE *. 66 * Opaque type for a file read handle, much like a normal fd or FILE *.
67 */ 67 */
68 typedef struct dvd_file_s dvd_file_t; 68 typedef struct dvd_file_s dvd_file_t;
69 69
71 * Opens a block device of a DVD-ROM file, or an image file, or a directory 71 * Opens a block device of a DVD-ROM file, or an image file, or a directory
72 * name for a mounted DVD or HD copy of a DVD. 72 * name for a mounted DVD or HD copy of a DVD.
73 * 73 *
74 * If the given file is a block device, or is the mountpoint for a block 74 * If the given file is a block device, or is the mountpoint for a block
75 * device, then that device is used for CSS authentication using libdvdcss. 75 * device, then that device is used for CSS authentication using libdvdcss.
76 * If no device is available, then no CSS authentication is performed, 76 * If no device is available, then no CSS authentication is performed,
77 * and we hope that the image is decrypted. 77 * and we hope that the image is decrypted.
78 * 78 *
79 * If the path given is a directory, then the files in that directory may be 79 * If the path given is a directory, then the files in that directory may be
80 * in any one of these formats: 80 * in any one of these formats:
81 * 81 *
82 * path/VIDEO_TS/VTS_01_1.VOB 82 * path/VIDEO_TS/VTS_01_1.VOB
83 * path/video_ts/vts_01_1.vob 83 * path/video_ts/vts_01_1.vob
84 * path/VTS_01_1.VOB 84 * path/VTS_01_1.VOB
85 * path/vts_01_1.vob 85 * path/vts_01_1.vob
86 * 86 *
87 * @param path Specifies the the device, file or directory to be used. 87 * @param path Specifies the the device, file or directory to be used.
88 * @return If successful a a read handle is returned. Otherwise 0 is returned. 88 * @return If successful a a read handle is returned. Otherwise 0 is returned.
89 * 89 *
90 * dvd = DVDOpen(path); 90 * dvd = DVDOpen(path);
91 */ 91 */
92 dvd_reader_t *DVDOpen( const char * ); 92 dvd_reader_t *DVDOpen( const char * );
101 * DVDClose(dvd); 101 * DVDClose(dvd);
102 */ 102 */
103 void DVDClose( dvd_reader_t * ); 103 void DVDClose( dvd_reader_t * );
104 104
105 /** 105 /**
106 * 106 *
107 */ 107 */
108 typedef enum { 108 typedef enum {
109 DVD_READ_INFO_FILE, /**< VIDEO_TS.IFO or VTS_XX_0.IFO (title) */ 109 DVD_READ_INFO_FILE, /**< VIDEO_TS.IFO or VTS_XX_0.IFO (title) */
110 DVD_READ_INFO_BACKUP_FILE, /**< VIDEO_TS.BUP or VTS_XX_0.BUP (title) */ 110 DVD_READ_INFO_BACKUP_FILE, /**< VIDEO_TS.BUP or VTS_XX_0.BUP (title) */
111 DVD_READ_MENU_VOBS, /**< VIDEO_TS.VOB or VTS_XX_0.VOB (title) */ 111 DVD_READ_MENU_VOBS, /**< VIDEO_TS.VOB or VTS_XX_0.VOB (title) */
112 DVD_READ_TITLE_VOBS /**< VTS_XX_[1-9].VOB (title). All files in 112 DVD_READ_TITLE_VOBS /**< VTS_XX_[1-9].VOB (title). All files in
113 the title set are opened and read as a 113 the title set are opened and read as a
114 single file. */ 114 single file. */
115 } dvd_read_domain_t; 115 } dvd_read_domain_t;
116 116
117 /** 117 /**
121 * (VIDEO_TS.[IFO,BUP,VOB]). Returns a file structure which may be 121 * (VIDEO_TS.[IFO,BUP,VOB]). Returns a file structure which may be
122 * used for reads, or 0 if the file was not found. 122 * used for reads, or 0 if the file was not found.
123 * 123 *
124 * @param dvd A dvd read handle. 124 * @param dvd A dvd read handle.
125 * @param titlenum Which Video Title Set should be used, VIDEO_TS is 0. 125 * @param titlenum Which Video Title Set should be used, VIDEO_TS is 0.
126 * @param domain Which domain. 126 * @param domain Which domain.
127 * @return If successful a a file read handle is returned, otherwise 0. 127 * @return If successful a a file read handle is returned, otherwise 0.
128 * 128 *
129 * dvd_file = DVDOpenFile(dvd, titlenum, domain); */ 129 * dvd_file = DVDOpenFile(dvd, titlenum, domain); */
130 dvd_file_t *DVDOpenFile( dvd_reader_t *, int, dvd_read_domain_t ); 130 dvd_file_t *DVDOpenFile( dvd_reader_t *, int, dvd_read_domain_t );
131 131
139 void DVDCloseFile( dvd_file_t * ); 139 void DVDCloseFile( dvd_file_t * );
140 140
141 /** 141 /**
142 * Reads block_count number of blocks from the file at the given block offset. 142 * Reads block_count number of blocks from the file at the given block offset.
143 * Returns number of blocks read on success, -1 on error. This call is only 143 * Returns number of blocks read on success, -1 on error. This call is only
144 * for reading VOB data, and should not be used when reading the IFO files. 144 * for reading VOB data, and should not be used when reading the IFO files.
145 * When reading from an encrypted drive, blocks are decrypted using libdvdcss 145 * When reading from an encrypted drive, blocks are decrypted using libdvdcss
146 * where required. 146 * where required.
147 * 147 *
148 * @param dvd_file A file read handle. 148 * @param dvd_file A file read handle.
149 * @param offset Block offset from the start of the file to start reading at. 149 * @param offset Block offset from the start of the file to start reading at.
150 * @param block_count Number of block to read. 150 * @param block_count Number of block to read.
196 /** 196 /**
197 * Get a unique 128 bit disc ID. 197 * Get a unique 128 bit disc ID.
198 * This is the MD5 sum of VIDEO_TS.IFO and the VTS_0?_0.IFO files 198 * This is the MD5 sum of VIDEO_TS.IFO and the VTS_0?_0.IFO files
199 * in title order (those that exist). 199 * in title order (those that exist).
200 * If you need a 'text' representation of the id, print it as a 200 * If you need a 'text' representation of the id, print it as a
201 * hexadecimal number, using lowercase letters, discid[0] first. 201 * hexadecimal number, using lowercase letters, discid[0] first.
202 * I.e. the same format as the command-line 'md5sum' program uses. 202 * I.e. the same format as the command-line 'md5sum' program uses.
203 * 203 *
204 * @param dvd A read handle to get the disc ID from 204 * @param dvd A read handle to get the disc ID from
205 * @param discid The buffer to put the disc ID into. The buffer must 205 * @param discid The buffer to put the disc ID into. The buffer must
206 * have room for 128 bits (16 chars). 206 * have room for 128 bits (16 chars).
261 * @param dvd A read handle to get the disc ID from 261 * @param dvd A read handle to get the disc ID from
262 * @param level The level of caching wanted. 262 * @param level The level of caching wanted.
263 * -1 - returns the current setting. 263 * -1 - returns the current setting.
264 * 0 - UDF Cache turned off. 264 * 0 - UDF Cache turned off.
265 * 1 - (default level) Pointers to IFO files and some data from 265 * 1 - (default level) Pointers to IFO files and some data from
266 * PrimaryVolumeDescriptor are cached. 266 * PrimaryVolumeDescriptor are cached.
267 * 267 *
268 * @return The level of caching. 268 * @return The level of caching.
269 */ 269 */
270 int DVDUDFCacheLevel( dvd_reader_t *, int ); 270 int DVDUDFCacheLevel( dvd_reader_t *, int );
271 271