comparison dvdread/dvd_reader.h @ 24055:98ba5d5bfe2d

Sync libdvdread with version 0.9.6.
author diego
date Thu, 16 Aug 2007 06:57:43 +0000
parents 1542693b2a30
children b69c47dca975
comparison
equal deleted inserted replaced
24054:6e218aef8e05 24055:98ba5d5bfe2d
32 */ 32 */
33 33
34 /** 34 /**
35 * The current version. (0.9.4 => 904, 1.2.3 => 10203) 35 * The current version. (0.9.4 => 904, 1.2.3 => 10203)
36 */ 36 */
37 #define DVDREAD_VERSION 905 37 #define DVDREAD_VERSION 906
38 38
39 /**
40 * Returns the compiled version. (DVDREAD_VERSION as an int)
41 */
42 int DVDVersion(void);
43 39
44 /** 40 /**
45 * The length of one Logical Block of a DVD. 41 * The length of one Logical Block of a DVD.
46 */ 42 */
47 #define DVD_VIDEO_LB_LEN 2048 43 #define DVD_VIDEO_LB_LEN 2048
62 58
63 /** 59 /**
64 * Opaque type for a file read handle, much like a normal fd or FILE *. 60 * Opaque type for a file read handle, much like a normal fd or FILE *.
65 */ 61 */
66 typedef struct dvd_file_s dvd_file_t; 62 typedef struct dvd_file_s dvd_file_t;
63
64 /**
65 * Returns the compiled version. (DVDREAD_VERSION as an int)
66 */
67 int DVDVersion(void);
68
67 69
68 /** 70 /**
69 * 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
70 * name for a mounted DVD or HD copy of a DVD. 72 * name for a mounted DVD or HD copy of a DVD.
71 * 73 *
143 DVD_READ_TITLE_VOBS /**< VTS_XX_[1-9].VOB (title). All files in 145 DVD_READ_TITLE_VOBS /**< VTS_XX_[1-9].VOB (title). All files in
144 the title set are opened and read as a 146 the title set are opened and read as a
145 single file. */ 147 single file. */
146 } dvd_read_domain_t; 148 } dvd_read_domain_t;
147 149
150 /**
151 *
152 */
153 typedef struct {
154 off_t size; /**< Total size of file in bytes */
155 int nr_parts; /**< Number of file parts */
156 off_t parts_size[9]; /**< Size of each part in bytes */
157 } dvd_stat_t;
158
159 /**
160 * Stats a file on the DVD given the title number and domain.
161 * The information about the file is stored in a dvd_stat_t
162 * which contains information about the size of the file and
163 * the number of parts in case of a multipart file and the respective
164 * sizes of the parts.
165 * A multipart file is for instance VTS_02_1.VOB, VTS_02_2.VOB, VTS_02_3.VOB
166 * The size of VTS_02_1.VOB will be stored in stat->parts_size[0],
167 * VTS_02_2.VOB in stat->parts_size[1], ...
168 * The total size (sum of all parts) is stored in stat->size and
169 * stat->nr_parts will hold the number of parts.
170 * Only DVD_READ_TITLE_VOBS (VTS_??_[1-9].VOB) can be multipart files.
171 *
172 * This function is only of use if you want to get the size of each file
173 * in the filesystem. These sizes are not needed to use any other
174 * functions in libdvdread.
175 *
176 * @param dvd A dvd read handle.
177 * @param titlenum Which Video Title Set should be used, VIDEO_TS is 0.
178 * @param domain Which domain.
179 * @param stat Pointer to where the result is stored.
180 * @return If successful 0, otherwise -1.
181 *
182 * int DVDFileStat(dvd, titlenum, domain, stat);
183 */
184 int DVDFileStat(dvd_reader_t *, int, dvd_read_domain_t, dvd_stat_t *);
185
148 /** 186 /**
149 * Opens a file on the DVD given the title number and domain. 187 * Opens a file on the DVD given the title number and domain.
150 * 188 *
151 * If the title number is 0, the video manager information is opened 189 * If the title number is 0, the video manager information is opened
152 * (VIDEO_TS.[IFO,BUP,VOB]). Returns a file structure which may be 190 * (VIDEO_TS.[IFO,BUP,VOB]). Returns a file structure which may be