annotate dvdread/dvd_reader.h @ 24119:b86a0396b828

Remove unused variable.
author diego
date Fri, 24 Aug 2007 11:16:32 +0000
parents b69c47dca975
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
24050
1542693b2a30 Sync libdvdread with version 0.9.5 (cosmetic changes).
diego
parents: 24047
diff changeset
1 /* -*- c-basic-offset: 2; indent-tabs-mode: nil -*- */
7029
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
2 #ifndef DVD_READER_H_INCLUDED
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
3 #define DVD_READER_H_INCLUDED
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
4
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
5 /*
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
6 * Copyright (C) 2001, 2002 Billy Biggs <vektor@dumbterm.net>,
15874
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
7 * Håkan Hjort <d95hjort@dtek.chalmers.se>,
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
8 * Björn Englund <d4bjorn@dtek.chalmers.se>
7029
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
9 *
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
10 * This program is free software; you can redistribute it and/or modify
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
11 * it under the terms of the GNU General Public License as published by
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
12 * the Free Software Foundation; either version 2 of the License, or (at
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
13 * your option) any later version.
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
14 *
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
15 * This program is distributed in the hope that it will be useful, but
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
16 * WITHOUT ANY WARRANTY; without even the implied warranty of
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
18 * General Public License for more details.
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
19 *
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
20 * You should have received a copy of the GNU General Public License
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
21 * along with this program; if not, write to the Free Software
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
23 */
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
24
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
25 #include <sys/types.h>
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
26
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
27 /**
15874
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
28 * The DVD access interface.
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
29 *
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
30 * This file contains the functions that form the interface to to
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
31 * reading files located on a DVD.
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 /**
24047
de28f9e8cb00 Sync libdvdread with version 0.9.5 (functional changes).
diego
parents: 20981
diff changeset
35 * The current version. (0.9.4 => 904, 1.2.3 => 10203)
15874
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
36 */
24065
b69c47dca975 Sync libdvdread with version 0.9.7.
diego
parents: 24055
diff changeset
37 #define DVDREAD_VERSION 907
24047
de28f9e8cb00 Sync libdvdread with version 0.9.5 (functional changes).
diego
parents: 20981
diff changeset
38
15874
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
39
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
40 /**
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
41 * The length of one Logical Block of a DVD.
7029
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
42 */
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
43 #define DVD_VIDEO_LB_LEN 2048
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
44
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
45 /**
15874
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
46 * Maximum length of filenames allowed in UDF.
7029
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
47 */
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
48 #define MAX_UDF_FILE_NAME_LEN 2048
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
49
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
50 #ifdef __cplusplus
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
51 extern "C" {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
52 #endif
15874
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
53
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
54 /**
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
55 * 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
56 */
7029
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
57 typedef struct dvd_reader_s dvd_reader_t;
15874
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
58
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
59 /**
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
60 * 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
61 */
7029
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
62 typedef struct dvd_file_s dvd_file_t;
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
63
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
64 /**
24055
98ba5d5bfe2d Sync libdvdread with version 0.9.6.
diego
parents: 24050
diff changeset
65 * Returns the compiled version. (DVDREAD_VERSION as an int)
98ba5d5bfe2d Sync libdvdread with version 0.9.6.
diego
parents: 24050
diff changeset
66 */
98ba5d5bfe2d Sync libdvdread with version 0.9.6.
diego
parents: 24050
diff changeset
67 int DVDVersion(void);
98ba5d5bfe2d Sync libdvdread with version 0.9.6.
diego
parents: 24050
diff changeset
68
98ba5d5bfe2d Sync libdvdread with version 0.9.6.
diego
parents: 24050
diff changeset
69
98ba5d5bfe2d Sync libdvdread with version 0.9.6.
diego
parents: 24050
diff changeset
70 /**
7029
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
71 * 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
72 * name for a mounted DVD or HD copy of a DVD.
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 * 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
75 * device, then that device is used for CSS authentication using libdvdcss.
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
76 * If no device is available, then no CSS authentication is performed,
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
77 * and we hope that the image is decrypted.
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
78 *
15874
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
79 * 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
80 * in any one of these formats:
7029
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
81 *
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
82 * path/VIDEO_TS/VTS_01_1.VOB
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
83 * path/video_ts/vts_01_1.vob
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
84 * path/VTS_01_1.VOB
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
85 * path/vts_01_1.vob
15874
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
86 *
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
87 * @param path Specifies the the device, file or directory to be used.
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
88 * @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
89 *
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
90 * dvd = DVDOpen(path);
24047
de28f9e8cb00 Sync libdvdread with version 0.9.5 (functional changes).
diego
parents: 20981
diff changeset
91 *
de28f9e8cb00 Sync libdvdread with version 0.9.5 (functional changes).
diego
parents: 20981
diff changeset
92 * Threads: this function uses chdir() and getcwd().
de28f9e8cb00 Sync libdvdread with version 0.9.5 (functional changes).
diego
parents: 20981
diff changeset
93 * The current working directory is global to all threads,
de28f9e8cb00 Sync libdvdread with version 0.9.5 (functional changes).
diego
parents: 20981
diff changeset
94 * so using chdir/getcwd in another thread could give unexpected results.
7029
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
95 */
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
96 dvd_reader_t *DVDOpen( const char * );
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
97
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
98 /**
15874
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
99 * Closes and cleans up the DVD reader object.
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
100 *
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
101 * You must close all open files before calling this function.
7029
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
102 *
15874
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
103 * @param dvd A read handle that should be closed.
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
104 *
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
105 * DVDClose(dvd);
7029
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
106 */
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
107 void DVDClose( dvd_reader_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 /**
24047
de28f9e8cb00 Sync libdvdread with version 0.9.5 (functional changes).
diego
parents: 20981
diff changeset
110 * Initializes libdvdread to be used with multithreading apps.
de28f9e8cb00 Sync libdvdread with version 0.9.5 (functional changes).
diego
parents: 20981
diff changeset
111 *
de28f9e8cb00 Sync libdvdread with version 0.9.5 (functional changes).
diego
parents: 20981
diff changeset
112 * You must call this function before using any other functions of libdvdread
de28f9e8cb00 Sync libdvdread with version 0.9.5 (functional changes).
diego
parents: 20981
diff changeset
113 * if you are going to use libdvdread in multiple threads in your program.
de28f9e8cb00 Sync libdvdread with version 0.9.5 (functional changes).
diego
parents: 20981
diff changeset
114 * If you are not using threads, or using libdvdread from just one thread,
de28f9e8cb00 Sync libdvdread with version 0.9.5 (functional changes).
diego
parents: 20981
diff changeset
115 * you do not need to call this, but you are allowed to do so anyway.
de28f9e8cb00 Sync libdvdread with version 0.9.5 (functional changes).
diego
parents: 20981
diff changeset
116 *
de28f9e8cb00 Sync libdvdread with version 0.9.5 (functional changes).
diego
parents: 20981
diff changeset
117 * There are several restrictions on how you can use libdvdread in
de28f9e8cb00 Sync libdvdread with version 0.9.5 (functional changes).
diego
parents: 20981
diff changeset
118 * multithreading apps, see further documentation.
de28f9e8cb00 Sync libdvdread with version 0.9.5 (functional changes).
diego
parents: 20981
diff changeset
119 *
de28f9e8cb00 Sync libdvdread with version 0.9.5 (functional changes).
diego
parents: 20981
diff changeset
120 * If you have called DVDFinish() you need to call DVDInit again to use
de28f9e8cb00 Sync libdvdread with version 0.9.5 (functional changes).
diego
parents: 20981
diff changeset
121 * libdvdread in multiple threads.
de28f9e8cb00 Sync libdvdread with version 0.9.5 (functional changes).
diego
parents: 20981
diff changeset
122 *
de28f9e8cb00 Sync libdvdread with version 0.9.5 (functional changes).
diego
parents: 20981
diff changeset
123 * DVDInit(void);
de28f9e8cb00 Sync libdvdread with version 0.9.5 (functional changes).
diego
parents: 20981
diff changeset
124 */
de28f9e8cb00 Sync libdvdread with version 0.9.5 (functional changes).
diego
parents: 20981
diff changeset
125 void DVDInit(void);
de28f9e8cb00 Sync libdvdread with version 0.9.5 (functional changes).
diego
parents: 20981
diff changeset
126
de28f9e8cb00 Sync libdvdread with version 0.9.5 (functional changes).
diego
parents: 20981
diff changeset
127 /**
de28f9e8cb00 Sync libdvdread with version 0.9.5 (functional changes).
diego
parents: 20981
diff changeset
128 * frees any dlopened objects.
de28f9e8cb00 Sync libdvdread with version 0.9.5 (functional changes).
diego
parents: 20981
diff changeset
129 *
de28f9e8cb00 Sync libdvdread with version 0.9.5 (functional changes).
diego
parents: 20981
diff changeset
130 * You must DVDClose all handles opened with DVDOpen before calling this.
de28f9e8cb00 Sync libdvdread with version 0.9.5 (functional changes).
diego
parents: 20981
diff changeset
131 * Use this function if you need to close the dlopened libs and any other
de28f9e8cb00 Sync libdvdread with version 0.9.5 (functional changes).
diego
parents: 20981
diff changeset
132 * objects that have been dynamically allocated by libdvdread.
de28f9e8cb00 Sync libdvdread with version 0.9.5 (functional changes).
diego
parents: 20981
diff changeset
133 *
de28f9e8cb00 Sync libdvdread with version 0.9.5 (functional changes).
diego
parents: 20981
diff changeset
134 * DVDFinish(void);
de28f9e8cb00 Sync libdvdread with version 0.9.5 (functional changes).
diego
parents: 20981
diff changeset
135 */
de28f9e8cb00 Sync libdvdread with version 0.9.5 (functional changes).
diego
parents: 20981
diff changeset
136 void DVDFinish(void);
de28f9e8cb00 Sync libdvdread with version 0.9.5 (functional changes).
diego
parents: 20981
diff changeset
137
de28f9e8cb00 Sync libdvdread with version 0.9.5 (functional changes).
diego
parents: 20981
diff changeset
138 /**
15874
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
139 *
7029
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
140 */
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
141 typedef enum {
15874
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
142 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
143 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
144 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
145 DVD_READ_TITLE_VOBS /**< VTS_XX_[1-9].VOB (title). All files in
24050
1542693b2a30 Sync libdvdread with version 0.9.5 (cosmetic changes).
diego
parents: 24047
diff changeset
146 the title set are opened and read as a
1542693b2a30 Sync libdvdread with version 0.9.5 (cosmetic changes).
diego
parents: 24047
diff changeset
147 single file. */
7029
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
148 } dvd_read_domain_t;
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
149
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
150 /**
24055
98ba5d5bfe2d Sync libdvdread with version 0.9.6.
diego
parents: 24050
diff changeset
151 *
98ba5d5bfe2d Sync libdvdread with version 0.9.6.
diego
parents: 24050
diff changeset
152 */
98ba5d5bfe2d Sync libdvdread with version 0.9.6.
diego
parents: 24050
diff changeset
153 typedef struct {
98ba5d5bfe2d Sync libdvdread with version 0.9.6.
diego
parents: 24050
diff changeset
154 off_t size; /**< Total size of file in bytes */
98ba5d5bfe2d Sync libdvdread with version 0.9.6.
diego
parents: 24050
diff changeset
155 int nr_parts; /**< Number of file parts */
98ba5d5bfe2d Sync libdvdread with version 0.9.6.
diego
parents: 24050
diff changeset
156 off_t parts_size[9]; /**< Size of each part in bytes */
98ba5d5bfe2d Sync libdvdread with version 0.9.6.
diego
parents: 24050
diff changeset
157 } dvd_stat_t;
98ba5d5bfe2d Sync libdvdread with version 0.9.6.
diego
parents: 24050
diff changeset
158
98ba5d5bfe2d Sync libdvdread with version 0.9.6.
diego
parents: 24050
diff changeset
159 /**
98ba5d5bfe2d Sync libdvdread with version 0.9.6.
diego
parents: 24050
diff changeset
160 * Stats a file on the DVD given the title number and domain.
98ba5d5bfe2d Sync libdvdread with version 0.9.6.
diego
parents: 24050
diff changeset
161 * The information about the file is stored in a dvd_stat_t
98ba5d5bfe2d Sync libdvdread with version 0.9.6.
diego
parents: 24050
diff changeset
162 * which contains information about the size of the file and
98ba5d5bfe2d Sync libdvdread with version 0.9.6.
diego
parents: 24050
diff changeset
163 * the number of parts in case of a multipart file and the respective
98ba5d5bfe2d Sync libdvdread with version 0.9.6.
diego
parents: 24050
diff changeset
164 * sizes of the parts.
98ba5d5bfe2d Sync libdvdread with version 0.9.6.
diego
parents: 24050
diff changeset
165 * A multipart file is for instance VTS_02_1.VOB, VTS_02_2.VOB, VTS_02_3.VOB
98ba5d5bfe2d Sync libdvdread with version 0.9.6.
diego
parents: 24050
diff changeset
166 * The size of VTS_02_1.VOB will be stored in stat->parts_size[0],
98ba5d5bfe2d Sync libdvdread with version 0.9.6.
diego
parents: 24050
diff changeset
167 * VTS_02_2.VOB in stat->parts_size[1], ...
98ba5d5bfe2d Sync libdvdread with version 0.9.6.
diego
parents: 24050
diff changeset
168 * The total size (sum of all parts) is stored in stat->size and
98ba5d5bfe2d Sync libdvdread with version 0.9.6.
diego
parents: 24050
diff changeset
169 * stat->nr_parts will hold the number of parts.
98ba5d5bfe2d Sync libdvdread with version 0.9.6.
diego
parents: 24050
diff changeset
170 * Only DVD_READ_TITLE_VOBS (VTS_??_[1-9].VOB) can be multipart files.
98ba5d5bfe2d Sync libdvdread with version 0.9.6.
diego
parents: 24050
diff changeset
171 *
98ba5d5bfe2d Sync libdvdread with version 0.9.6.
diego
parents: 24050
diff changeset
172 * This function is only of use if you want to get the size of each file
98ba5d5bfe2d Sync libdvdread with version 0.9.6.
diego
parents: 24050
diff changeset
173 * in the filesystem. These sizes are not needed to use any other
98ba5d5bfe2d Sync libdvdread with version 0.9.6.
diego
parents: 24050
diff changeset
174 * functions in libdvdread.
98ba5d5bfe2d Sync libdvdread with version 0.9.6.
diego
parents: 24050
diff changeset
175 *
98ba5d5bfe2d Sync libdvdread with version 0.9.6.
diego
parents: 24050
diff changeset
176 * @param dvd A dvd read handle.
98ba5d5bfe2d Sync libdvdread with version 0.9.6.
diego
parents: 24050
diff changeset
177 * @param titlenum Which Video Title Set should be used, VIDEO_TS is 0.
98ba5d5bfe2d Sync libdvdread with version 0.9.6.
diego
parents: 24050
diff changeset
178 * @param domain Which domain.
98ba5d5bfe2d Sync libdvdread with version 0.9.6.
diego
parents: 24050
diff changeset
179 * @param stat Pointer to where the result is stored.
98ba5d5bfe2d Sync libdvdread with version 0.9.6.
diego
parents: 24050
diff changeset
180 * @return If successful 0, otherwise -1.
98ba5d5bfe2d Sync libdvdread with version 0.9.6.
diego
parents: 24050
diff changeset
181 *
98ba5d5bfe2d Sync libdvdread with version 0.9.6.
diego
parents: 24050
diff changeset
182 * int DVDFileStat(dvd, titlenum, domain, stat);
98ba5d5bfe2d Sync libdvdread with version 0.9.6.
diego
parents: 24050
diff changeset
183 */
98ba5d5bfe2d Sync libdvdread with version 0.9.6.
diego
parents: 24050
diff changeset
184 int DVDFileStat(dvd_reader_t *, int, dvd_read_domain_t, dvd_stat_t *);
98ba5d5bfe2d Sync libdvdread with version 0.9.6.
diego
parents: 24050
diff changeset
185
98ba5d5bfe2d Sync libdvdread with version 0.9.6.
diego
parents: 24050
diff changeset
186 /**
15874
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
187 * Opens a file on the DVD given the title number and domain.
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 * If the title number is 0, the video manager information is opened
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
190 * (VIDEO_TS.[IFO,BUP,VOB]). Returns a file structure which may be
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
191 * used for reads, or 0 if the file was not found.
7029
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
192 *
15874
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
193 * @param dvd A dvd read handle.
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
194 * @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
195 * @param domain Which domain.
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
196 * @return If successful a a file read handle is returned, otherwise 0.
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
197 *
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
198 * dvd_file = DVDOpenFile(dvd, titlenum, domain); */
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
199 dvd_file_t *DVDOpenFile( dvd_reader_t *, int, dvd_read_domain_t );
7029
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
200
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
201 /**
15874
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
202 * Closes a file and frees the associated structure.
7029
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
203 *
15874
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
204 * @param dvd_file The file read handle to be closed.
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
205 *
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
206 * DVDCloseFile(dvd_file);
7029
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
207 */
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
208 void DVDCloseFile( dvd_file_t * );
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
209
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
210 /**
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
211 * 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
212 * 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
213 * 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
214 * When reading from an encrypted drive, blocks are decrypted using libdvdcss
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
215 * where required.
15874
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
216 *
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
217 * @param dvd_file A file read handle.
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
218 * @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
219 * @param block_count Number of block to read.
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
220 * @param data Pointer to a buffer to write the data into.
24047
de28f9e8cb00 Sync libdvdread with version 0.9.5 (functional changes).
diego
parents: 20981
diff changeset
221 * It must be aligned to the logical block size of the device when
de28f9e8cb00 Sync libdvdread with version 0.9.5 (functional changes).
diego
parents: 20981
diff changeset
222 * reading from a raw/O_DIRECT device (2048 bytes for DVD)
15874
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
223 * @return Returns number of blocks read on success, -1 on error.
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 * blocks_read = DVDReadBlocks(dvd_file, offset, block_count, data);
7029
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
226 */
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
227 ssize_t DVDReadBlocks( dvd_file_t *, int, size_t, unsigned char * );
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
228
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
229 /**
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
230 * Seek to the given position in the file. Returns the resulting position in
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
231 * 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
232 * 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
233 * offset.
15874
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
234 *
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
235 * @param dvd_file A file read handle.
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
236 * @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
237 * @return The resulting position in bytes from the beginning of the file.
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
238 *
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
239 * offset_set = DVDFileSeek(dvd_file, seek_offset);
7029
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
240 */
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
241 int DVDFileSeek( dvd_file_t *, int );
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
242
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
243 /**
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
244 * 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
245 * 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
246 * reads from and increments the currrent seek position for the file.
15874
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 * @param dvd_file A file read handle.
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
249 * @param data Pointer to a buffer to write the data into.
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
250 * @param bytes Number of bytes to read.
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
251 * @return Returns number of bytes read on success, -1 on error.
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
252 *
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
253 * bytes_read = DVDReadBytes(dvd_file, data, bytes);
7029
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
254 */
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
255 ssize_t DVDReadBytes( dvd_file_t *, void *, size_t );
24050
1542693b2a30 Sync libdvdread with version 0.9.5 (cosmetic changes).
diego
parents: 24047
diff changeset
256
7029
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
257 /**
15874
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
258 * Returns the file size in blocks.
7029
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
259 *
15874
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
260 * @param dvd_file A file read handle.
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
261 * @return The size of the file in blocks, -1 on error.
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
262 *
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
263 * blocks = DVDFileSize(dvd_file);
7029
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
264 */
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
265 ssize_t DVDFileSize( dvd_file_t * );
24050
1542693b2a30 Sync libdvdread with version 0.9.5 (cosmetic changes).
diego
parents: 24047
diff changeset
266
15874
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
267 /**
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
268 * Get a unique 128 bit disc ID.
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
269 * 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
270 * in title order (those that exist).
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
271 * 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
272 * hexadecimal number, using lowercase letters, discid[0] first.
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
273 * I.e. the same format as the command-line 'md5sum' program uses.
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
274 *
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
275 * @param dvd A read handle to get the disc ID from
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
276 * @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
277 * have room for 128 bits (16 chars).
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
278 * @return 0 on success, -1 on error.
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
279 */
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
280 int DVDDiscID( dvd_reader_t *, unsigned char * );
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
281
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
282 /**
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
283 * Get the UDF VolumeIdentifier and VolumeSetIdentifier
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
284 * from the PrimaryVolumeDescriptor.
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
285 *
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
286 * @param dvd A read handle to get the disc ID from
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
287 * @param volid The buffer to put the VolumeIdentifier into.
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
288 * The VolumeIdentifier is latin-1 encoded (8bit unicode)
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
289 * null terminated and max 32 bytes (including '\0')
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
290 * @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
291 * If the VolumeIdentifier is truncated because of this
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
292 * it will still be null terminated.
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
293 * @param volsetid The buffer to put the VolumeSetIdentifier into.
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
294 * The VolumeIdentifier is 128 bytes as
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
295 * stored in the UDF PrimaryVolumeDescriptor.
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
296 * Note that this is not a null terminated string.
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
297 * @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
298 * @return 0 on success, -1 on error.
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
299 */
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
300 int DVDUDFVolumeInfo( dvd_reader_t *, char *, unsigned int,
24050
1542693b2a30 Sync libdvdread with version 0.9.5 (cosmetic changes).
diego
parents: 24047
diff changeset
301 unsigned char *, unsigned int );
15874
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
302
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
303 /**
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
304 * Get the ISO9660 VolumeIdentifier and VolumeSetIdentifier
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
305 *
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
306 * * Only use this function as fallback if DVDUDFVolumeInfo returns 0 *
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
307 * * this will happen on a disc mastered only with a iso9660 filesystem *
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
308 * * All video DVD discs have UDF filesystem *
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
309 *
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
310 * @param dvd A read handle to get the disc ID from
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
311 * @param volid The buffer to put the VolumeIdentifier into.
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
312 * The VolumeIdentifier is coded with '0-9','A-Z','_'
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
313 * null terminated and max 33 bytes (including '\0')
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
314 * @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
315 * If the VolumeIdentifier is truncated because of this
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
316 * it will still be null terminated.
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
317 * @param volsetid The buffer to put the VolumeSetIdentifier into.
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
318 * The VolumeIdentifier is 128 bytes as
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
319 * stored in the ISO9660 PrimaryVolumeDescriptor.
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
320 * Note that this is not a null terminated string.
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
321 * @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
322 * @return 0 on success, -1 on error.
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
323 */
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
324 int DVDISOVolumeInfo( dvd_reader_t *, char *, unsigned int,
24050
1542693b2a30 Sync libdvdread with version 0.9.5 (cosmetic changes).
diego
parents: 24047
diff changeset
325 unsigned char *, unsigned int );
15874
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
326
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
327 /**
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
328 * 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
329 *
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
330 * @param dvd A read handle to get the disc ID from
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
331 * @param level The level of caching wanted.
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
332 * -1 - returns the current setting.
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
333 * 0 - UDF Cache turned off.
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
334 * 1 - (default level) Pointers to IFO files and some data from
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
335 * PrimaryVolumeDescriptor are cached.
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
336 *
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
337 * @return The level of caching.
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
338 */
483e955893b8 update libdvdread to v0.9.4
aurel
parents: 10210
diff changeset
339 int DVDUDFCacheLevel( dvd_reader_t *, int );
24050
1542693b2a30 Sync libdvdread with version 0.9.5 (cosmetic changes).
diego
parents: 24047
diff changeset
340
7029
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
341 #ifdef __cplusplus
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
342 };
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
343 #endif
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
344 #endif /* DVD_READER_H_INCLUDED */