libcdio
0.82
|
00001 /* 00002 $Id: dvd.h,v 1.5 2008/03/25 15:59:09 karl Exp $ 00003 00004 Copyright (C) 2004 Rocky Bernstein <rocky@gnu.org> 00005 Modeled after GNU/Linux definitions in linux/cdrom.h 00006 00007 This program is free software: you can redistribute it and/or modify 00008 it under the terms of the GNU General Public License as published by 00009 the Free Software Foundation, either version 3 of the License, or 00010 (at your option) any later version. 00011 00012 This program is distributed in the hope that it will be useful, 00013 but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00015 GNU General Public License for more details. 00016 00017 You should have received a copy of the GNU General Public License 00018 along with this program. If not, see <http://www.gnu.org/licenses/>. 00019 */ 00020 00026 #ifndef __CDIO_DVD_H__ 00027 #define __CDIO_DVD_H__ 00028 00029 #include <cdio/types.h> 00030 00033 #define CDIO_DVD_STRUCT_PHYSICAL 0x00 00034 #define CDIO_DVD_STRUCT_COPYRIGHT 0x01 00035 #define CDIO_DVD_STRUCT_DISCKEY 0x02 00036 #define CDIO_DVD_STRUCT_BCA 0x03 00037 #define CDIO_DVD_STRUCT_MANUFACT 0x04 00038 00040 #define CDIO_DVD_BOOK_DVD_ROM 0 00041 #define CDIO_DVD_BOOK_DVD_RAM 1 00042 #define CDIO_DVD_BOOK_DVD_R 2 00043 #define CDIO_DVD_BOOK_DVD_RW 3 00044 #define CDIO_DVD_BOOK_DVD_PR 8 00045 #define CDIO_DVD_BOOK_DVD_PRW 9 00047 typedef struct cdio_dvd_layer { 00048 uint8_t book_version : 4; 00049 uint8_t book_type : 4; 00050 uint8_t min_rate : 4; 00051 uint8_t disc_size : 4; 00052 uint8_t layer_type : 4; 00053 uint8_t track_path : 1; 00054 uint8_t nlayers : 2; 00055 uint8_t track_density : 4; 00056 uint8_t linear_density: 4; 00057 uint8_t bca : 1; 00058 uint32_t start_sector; 00059 uint32_t end_sector; 00060 uint32_t end_sector_l0; 00061 } cdio_dvd_layer_t; 00062 00064 #define CDIO_DVD_MAX_LAYERS 4 00065 00066 typedef struct cdio_dvd_physical { 00067 uint8_t type; 00068 uint8_t layer_num; 00069 cdio_dvd_layer_t layer[CDIO_DVD_MAX_LAYERS]; 00070 } cdio_dvd_physical_t; 00071 00072 typedef struct cdio_dvd_copyright { 00073 uint8_t type; 00074 00075 uint8_t layer_num; 00076 uint8_t cpst; 00077 uint8_t rmi; 00078 } cdio_dvd_copyright_t; 00079 00080 typedef struct cdio_dvd_disckey { 00081 uint8_t type; 00082 00083 unsigned agid : 2; 00084 uint8_t value[2048]; 00085 } cdio_dvd_disckey_t; 00086 00087 typedef struct cdio_dvd_bca { 00088 uint8_t type; 00089 00090 int len; 00091 uint8_t value[188]; 00092 } cdio_dvd_bca_t; 00093 00094 typedef struct cdio_dvd_manufact { 00095 uint8_t type; 00096 00097 uint8_t layer_num; 00098 int len; 00099 uint8_t value[2048]; 00100 } cdio_dvd_manufact_t; 00101 00102 typedef union { 00103 uint8_t type; 00104 00105 cdio_dvd_physical_t physical; 00106 cdio_dvd_copyright_t copyright; 00107 cdio_dvd_disckey_t disckey; 00108 cdio_dvd_bca_t bca; 00109 cdio_dvd_manufact_t manufact; 00110 } cdio_dvd_struct_t; 00111 00112 #endif /* __SCSI_MMC_H__ */