2 * This file has been modified for the cdrkit suite.
4 * The behaviour and appearence of the program code below can differ to a major
5 * extent from the version distributed by the original author(s).
7 * For details, see Changelog file distributed with the cdrkit package. If you
8 * received this file from another source then ask the distributing person for
9 * a log of modifications.
13 /* @(#)dvd_reader.h 1.2 04/03/02 joerg */
19 * Copyright (C) 2001, 2002 Billy Biggs <vektor@dumbterm.net>,
20 * Håkan Hjort <d95hjort@dtek.chalmers.se
21 * Olaf Beck <olaf_sc@yahoo.com>
22 * (I only did the cut down no other contribs)
23 * Jörg Schilling <schilling@fokus.gmd.de>
24 * (making the code portable)
25 * This program is free software; you can redistribute it and/or modify
26 * it under the terms of the GNU General Public License as published by
27 * the Free Software Foundation; either version 2 of the License, or (at
28 * your option) any later version.
30 * This program is distributed in the hope that it will be useful, but
31 * WITHOUT ANY WARRANTY; without even the implied warranty of
32 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
33 * General Public License for more details.
35 * You should have received a copy of the GNU General Public License
36 * along with this program; if not, write to the Free Software
37 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
41 * NOTE: This is a cut down version of libdvdread for genisoimage, due
42 * to portability issues with the current libdvdread according to
43 * the maintainer of genisoimage.
44 * This cut down version only reads from a harddisk file structure
45 * and it only implements the functions necessary inorder to make
46 * genisoimage produce valid DVD-Video images.
47 * DON'T USE THIS LIBRARY IN ANY OTHER PROGRAM GET THE REAL
52 #include <unixstd.h> /* Make sure <sys/types.h> is included */
55 * Maximum length of filenames for UDF.
57 #define MAX_UDF_FILE_NAME_LEN 2048
60 * The length of one Logical Block of a DVD Video.
62 #define DVD_VIDEO_LB_LEN 2048
70 /* Information required for a directory path drive. */
75 typedef struct dvd_reader_s dvd_reader_t;
76 typedef struct dvd_file_s dvd_file_t;
80 * dvd = DVDOpen(path);
81 * Opens a directory name of a DVD-Video structure on HD.
82 * Returns zero if it fails.
83 * The path should be like this
84 * "path/VIDEO_TS/VTS_01_1.VOB"
88 extern dvd_reader_t *DVDOpen(const char *);
94 * Closes and cleans up the DVD reader object. You must close all open files
95 * before calling this function.
99 extern void DVDClose(dvd_reader_t *);
102 * INFO_FILE : VIDEO_TS.IFO (manager)
103 * VTS_XX_0.IFO (title)
105 * INFO_BACKUP_FILE: VIDEO_TS.BUP (manager)
106 * VTS_XX_0.BUP (title)
108 * MENU_VOBS : VIDEO_TS.VOB (manager)
109 * VTS_XX_0.VOB (title)
111 * TITLE_VOBS : VTS_XX_[1-9].VOB (title)
112 * All files in the title set are opened and
113 * read as a single file.
117 DVD_READ_INFO_BACKUP_FILE,
123 * dvd_file = DVDOpenFile(dvd, titlenum, domain);
125 * Opens a file on the DVD given the title number and domain. If the title
126 * number is 0, the video manager information is opened
127 * (VIDEO_TS.[IFO,BUP,VOB]). Returns a file structure which may be used for
128 * reads, or 0 if the file was not found.
130 extern dvd_file_t * DVDOpenFile(dvd_reader_t *, int, dvd_read_domain_t);
133 * DVDCloseFile(dvd_file);
135 * Closes a file and frees the associated structure.
137 extern void DVDCloseFile(dvd_file_t *);
141 * blocks = DVDFileSize(dvd_file);
143 * Returns the file size in blocks.
145 extern ssize_t DVDFileSize(dvd_file_t *);
151 #endif /* _DVD_READER_H */