annotate libmpdvdkit2/dvd_reader.h @ 18771:a1807995e2ab

Move #ifdefs around complete files into the build system.
author diego
date Wed, 21 Jun 2006 14:49:09 +0000
parents 483e955893b8
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7029
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
1 #ifndef DVD_READER_H_INCLUDED
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
2 #define DVD_READER_H_INCLUDED
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
3
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
4 /*
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
5 * Copyright (C) 2001, 2002 Billy Biggs <vektor@dumbterm.net>,
15874
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
6 * Håkan Hjort <d95hjort@dtek.chalmers.se>,
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
7 * Björn Englund <d4bjorn@dtek.chalmers.se>
7029
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
8 *
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
9 * This program is free software; you can redistribute it and/or modify
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
10 * it under the terms of the GNU General Public License as published by
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
11 * the Free Software Foundation; either version 2 of the License, or (at
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
12 * your option) any later version.
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
13 *
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
14 * This program is distributed in the hope that it will be useful, but
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
15 * WITHOUT ANY WARRANTY; without even the implied warranty of
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
17 * General Public License for more details.
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
18 *
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
19 * You should have received a copy of the GNU General Public License
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
20 * along with this program; if not, write to the Free Software
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
22 */
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
23
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
24 #include <sys/types.h>
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
25
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
26 /**
15874
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
27 * The DVD access interface.
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
28 *
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
29 * This file contains the functions that form the interface to to
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
30 * reading files located on a DVD.
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
31 */
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
32
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
33 /**
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
34 * The current version.
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
35 */
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
36 #define DVDREAD_VERSION 904
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
37
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
38 /**
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
39 * The length of one Logical Block of a DVD.
7029
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
40 */
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
41 #define DVD_VIDEO_LB_LEN 2048
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
42
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
43 /**
15874
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
44 * Maximum length of filenames allowed in UDF.
7029
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
45 */
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
46 #define MAX_UDF_FILE_NAME_LEN 2048
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
47
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
48 #ifdef __cplusplus
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
49 extern "C" {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
50 #endif
15874
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
51
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
52 /**
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
53 * Opaque type that is used as a handle for one instance of an opened DVD.
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
54 */
7029
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
55 typedef struct dvd_reader_s dvd_reader_t;
15874
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
56
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
57 /**
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
58 * Opaque type for a file read handle, much like a normal fd or FILE *.
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
59 */
7029
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
60 typedef struct dvd_file_s dvd_file_t;
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
61
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
62 /**
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
63 * Opens a block device of a DVD-ROM file, or an image file, or a directory
15874
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
64 * name for a mounted DVD or HD copy of a DVD.
7029
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
65 *
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
66 * If the given file is a block device, or is the mountpoint for a block
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
67 * device, then that device is used for CSS authentication using libdvdcss.
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
68 * If no device is available, then no CSS authentication is performed,
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
69 * and we hope that the image is decrypted.
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
70 *
15874
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
71 * If the path given is a directory, then the files in that directory may be
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
72 * in any one of these formats:
7029
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
73 *
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
74 * path/VIDEO_TS/VTS_01_1.VOB
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
75 * path/video_ts/vts_01_1.vob
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
76 * path/VTS_01_1.VOB
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
77 * path/vts_01_1.vob
15874
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
78 *
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
79 * @param path Specifies the the device, file or directory to be used.
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
80 * @return If successful a a read handle is returned. Otherwise 0 is returned.
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
81 *
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
82 * dvd = DVDOpen(path);
7029
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
83 */
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
84 dvd_reader_t *DVDOpen( const char * );
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
85
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
86 /**
15874
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
87 * Closes and cleans up the DVD reader object.
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
88 *
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
89 * You must close all open files before calling this function.
7029
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
90 *
15874
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
91 * @param dvd A read handle that should be closed.
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
92 *
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
93 * DVDClose(dvd);
7029
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
94 */
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
95 void DVDClose( dvd_reader_t * );
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
96
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
97 /**
15874
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
98 *
7029
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
99 */
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
100 typedef enum {
15874
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
101 DVD_READ_INFO_FILE, /**< VIDEO_TS.IFO or VTS_XX_0.IFO (title) */
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
102 DVD_READ_INFO_BACKUP_FILE, /**< VIDEO_TS.BUP or VTS_XX_0.BUP (title) */
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
103 DVD_READ_MENU_VOBS, /**< VIDEO_TS.VOB or VTS_XX_0.VOB (title) */
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
104 DVD_READ_TITLE_VOBS /**< VTS_XX_[1-9].VOB (title). All files in
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
105 the title set are opened and read as a
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
106 single file. */
7029
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
107 } dvd_read_domain_t;
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
108
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
109 /**
15874
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
110 * Opens a file on the DVD given the title number and domain.
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
111 *
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
112 * If the title number is 0, the video manager information is opened
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
113 * (VIDEO_TS.[IFO,BUP,VOB]). Returns a file structure which may be
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
114 * used for reads, or 0 if the file was not found.
7029
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
115 *
15874
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
116 * @param dvd A dvd read handle.
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
117 * @param titlenum Which Video Title Set should be used, VIDEO_TS is 0.
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
118 * @param domain Which domain.
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
119 * @return If successful a a file read handle is returned, otherwise 0.
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
120 *
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
121 * dvd_file = DVDOpenFile(dvd, titlenum, domain); */
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
122 dvd_file_t *DVDOpenFile( dvd_reader_t *, int, dvd_read_domain_t );
7029
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
123
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
124 /**
15874
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
125 * Closes a file and frees the associated structure.
7029
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
126 *
15874
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
127 * @param dvd_file The file read handle to be closed.
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
128 *
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
129 * DVDCloseFile(dvd_file);
7029
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
130 */
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
131 void DVDCloseFile( dvd_file_t * );
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
132
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
133 /**
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
134 * Reads block_count number of blocks from the file at the given block offset.
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
135 * Returns number of blocks read on success, -1 on error. This call is only
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
136 * for reading VOB data, and should not be used when reading the IFO files.
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
137 * When reading from an encrypted drive, blocks are decrypted using libdvdcss
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
138 * where required.
15874
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
139 *
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
140 * @param dvd_file A file read handle.
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
141 * @param offset Block offset from the start of the file to start reading at.
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
142 * @param block_count Number of block to read.
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
143 * @param data Pointer to a buffer to write the data into.
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
144 * @return Returns number of blocks read on success, -1 on error.
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
145 *
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
146 * blocks_read = DVDReadBlocks(dvd_file, offset, block_count, data);
7029
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
147 */
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
148 ssize_t DVDReadBlocks( dvd_file_t *, int, size_t, unsigned char * );
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
149
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
150 /**
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
151 * Seek to the given position in the file. Returns the resulting position in
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
152 * bytes from the beginning of the file. The seek position is only used for
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
153 * byte reads from the file, the block read call always reads from the given
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
154 * offset.
15874
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
155 *
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
156 * @param dvd_file A file read handle.
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
157 * @param seek_offset Byte offset from the start of the file to seek to.
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
158 * @return The resulting position in bytes from the beginning of the file.
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
159 *
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
160 * offset_set = DVDFileSeek(dvd_file, seek_offset);
7029
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
161 */
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
162 int DVDFileSeek( dvd_file_t *, int );
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
163
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
164 /**
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
165 * Reads the given number of bytes from the file. This call can only be used
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
166 * on the information files, and may not be used for reading from a VOB. This
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
167 * reads from and increments the currrent seek position for the file.
15874
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
168 *
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
169 * @param dvd_file A file read handle.
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
170 * @param data Pointer to a buffer to write the data into.
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
171 * @param bytes Number of bytes to read.
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
172 * @return Returns number of bytes read on success, -1 on error.
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
173 *
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
174 * bytes_read = DVDReadBytes(dvd_file, data, bytes);
7029
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
175 */
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
176 ssize_t DVDReadBytes( dvd_file_t *, void *, size_t );
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
177
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
178 /**
15874
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
179 * Returns the file size in blocks.
7029
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
180 *
15874
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
181 * @param dvd_file A file read handle.
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
182 * @return The size of the file in blocks, -1 on error.
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
183 *
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
184 * blocks = DVDFileSize(dvd_file);
7029
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
185 */
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
186 ssize_t DVDFileSize( dvd_file_t * );
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
187
15874
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
188 /**
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
189 * Get a unique 128 bit disc ID.
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
190 * This is the MD5 sum of VIDEO_TS.IFO and the VTS_0?_0.IFO files
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
191 * in title order (those that exist).
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
192 * If you need a 'text' representation of the id, print it as a
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
193 * hexadecimal number, using lowercase letters, discid[0] first.
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
194 * I.e. the same format as the command-line 'md5sum' program uses.
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
195 *
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
196 * @param dvd A read handle to get the disc ID from
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
197 * @param discid The buffer to put the disc ID into. The buffer must
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
198 * have room for 128 bits (16 chars).
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
199 * @return 0 on success, -1 on error.
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
200 */
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
201 int DVDDiscID( dvd_reader_t *, unsigned char * );
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
202
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
203 /**
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
204 * Get the UDF VolumeIdentifier and VolumeSetIdentifier
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
205 * from the PrimaryVolumeDescriptor.
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
206 *
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
207 * @param dvd A read handle to get the disc ID from
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
208 * @param volid The buffer to put the VolumeIdentifier into.
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
209 * The VolumeIdentifier is latin-1 encoded (8bit unicode)
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
210 * null terminated and max 32 bytes (including '\0')
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
211 * @param volid_size No more than volid_size bytes will be copied to volid.
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
212 * If the VolumeIdentifier is truncated because of this
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
213 * it will still be null terminated.
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
214 * @param volsetid The buffer to put the VolumeSetIdentifier into.
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
215 * The VolumeIdentifier is 128 bytes as
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
216 * stored in the UDF PrimaryVolumeDescriptor.
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
217 * Note that this is not a null terminated string.
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
218 * @param volsetid_size At most volsetid_size bytes will be copied to volsetid.
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
219 * @return 0 on success, -1 on error.
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
220 */
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
221 int DVDUDFVolumeInfo( dvd_reader_t *, char *, unsigned int,
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
222 unsigned char *, unsigned int );
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
223
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
224 /**
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
225 * Get the ISO9660 VolumeIdentifier and VolumeSetIdentifier
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
226 *
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
227 * * Only use this function as fallback if DVDUDFVolumeInfo returns 0 *
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
228 * * this will happen on a disc mastered only with a iso9660 filesystem *
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
229 * * All video DVD discs have UDF filesystem *
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
230 *
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
231 * @param dvd A read handle to get the disc ID from
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
232 * @param volid The buffer to put the VolumeIdentifier into.
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
233 * The VolumeIdentifier is coded with '0-9','A-Z','_'
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
234 * null terminated and max 33 bytes (including '\0')
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
235 * @param volid_size No more than volid_size bytes will be copied to volid.
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
236 * If the VolumeIdentifier is truncated because of this
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
237 * it will still be null terminated.
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
238 * @param volsetid The buffer to put the VolumeSetIdentifier into.
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
239 * The VolumeIdentifier is 128 bytes as
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
240 * stored in the ISO9660 PrimaryVolumeDescriptor.
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
241 * Note that this is not a null terminated string.
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
242 * @param volsetid_size At most volsetid_size bytes will be copied to volsetid.
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
243 * @return 0 on success, -1 on error.
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
244 */
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
245 int DVDISOVolumeInfo( dvd_reader_t *, char *, unsigned int,
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
246 unsigned char *, unsigned int );
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
247
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
248 /**
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
249 * Sets the level of caching that is done when reading from a device
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
250 *
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
251 * @param dvd A read handle to get the disc ID from
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
252 * @param level The level of caching wanted.
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
253 * -1 - returns the current setting.
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
254 * 0 - UDF Cache turned off.
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
255 * 1 - (default level) Pointers to IFO files and some data from
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
256 * PrimaryVolumeDescriptor are cached.
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
257 *
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
258 * @return The level of caching.
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
259 */
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
260 int DVDUDFCacheLevel( dvd_reader_t *, int );
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
261
7029
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
262 #ifdef __cplusplus
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
263 };
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
264 #endif
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
265 #endif /* DVD_READER_H_INCLUDED */