dvd_reader.h
1 /*
2  * Copyright (C) 2001, 2002 Billy Biggs <vektor@dumbterm.net>,
3  * Håkan Hjort <d95hjort@dtek.chalmers.se>,
4  * Björn Englund <d4bjorn@dtek.chalmers.se>
5  *
6  * This file is part of libdvdread.
7  *
8  * libdvdread is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 2 of the License, or
11  * (at your option) any later version.
12  *
13  * libdvdread is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License along
19  * with libdvdread; if not, write to the Free Software Foundation, Inc.,
20  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
21  */
22 
23 #ifndef LIBDVDREAD_DVD_READER_H
24 #define LIBDVDREAD_DVD_READER_H
25 
26 #ifdef _MSC_VER
27 #include <config.h>
28 
29 #include <stdio.h>
30 #include <stdlib.h>
31 #endif
32 
33 #include <sys/types.h>
34 #include <inttypes.h>
35 
46 #define DVDREAD_VERSION 50000
47 
51 #define DVD_VIDEO_LB_LEN 2048
52 
56 #define MAX_UDF_FILE_NAME_LEN 2048
57 
58 #ifdef __cplusplus
59 extern "C" {
60 #endif
61 
65 typedef struct dvd_reader_s dvd_reader_t;
66 
70 typedef struct dvd_file_s dvd_file_t;
71 
75 typedef struct {
76  off_t size;
77  int nr_parts;
78  off_t parts_size[9];
79 } dvd_stat_t;
80 
103 dvd_reader_t *DVDOpen( const char * );
104 
114 void DVDClose( dvd_reader_t * );
115 
119 typedef enum {
120  DVD_READ_INFO_FILE,
121  DVD_READ_INFO_BACKUP_FILE,
122  DVD_READ_MENU_VOBS,
123  DVD_READ_TITLE_VOBS
126 } dvd_read_domain_t;
127 
153 int DVDFileStat(dvd_reader_t *, int, dvd_read_domain_t, dvd_stat_t *);
154 
168 dvd_file_t *DVDOpenFile( dvd_reader_t *, int, dvd_read_domain_t );
169 
177 void DVDCloseFile( dvd_file_t * );
178 
194 ssize_t DVDReadBlocks( dvd_file_t *, int, size_t, unsigned char * );
195 
208 int32_t DVDFileSeek( dvd_file_t *, int32_t );
209 
222 ssize_t DVDReadBytes( dvd_file_t *, void *, size_t );
223 
232 ssize_t DVDFileSize( dvd_file_t * );
233 
247 int DVDDiscID( dvd_reader_t *, unsigned char * );
248 
267 int DVDUDFVolumeInfo( dvd_reader_t *, char *, unsigned int,
268  unsigned char *, unsigned int );
269 
270 int DVDFileSeekForce( dvd_file_t *, int offset, int force_size);
271 
293 int DVDISOVolumeInfo( dvd_reader_t *, char *, unsigned int,
294  unsigned char *, unsigned int );
295 
308 int DVDUDFCacheLevel( dvd_reader_t *, int );
309 
310 #ifdef __cplusplus
311 };
312 #endif
313 #endif /* LIBDVDREAD_DVD_READER_H */
int nr_parts
Definition: dvd_reader.h:77
Definition: dvd_reader.h:75
Definition: dvd_reader.c:82
Definition: dvd_reader.c:104
off_t size
Definition: dvd_reader.h:76