libcdio  0.83
dvd.h
Go to the documentation of this file.
00001 /*
00002     Copyright (C) 2004, 2010 Rocky Bernstein <rocky@gnu.org>
00003     Modeled after GNU/Linux definitions in linux/cdrom.h
00004 
00005     This program is free software: you can redistribute it and/or modify
00006     it under the terms of the GNU General Public License as published by
00007     the Free Software Foundation, either version 3 of the License, or
00008     (at your option) any later version.
00009 
00010     This program is distributed in the hope that it will be useful,
00011     but WITHOUT ANY WARRANTY; without even the implied warranty of
00012     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013     GNU General Public License for more details.
00014 
00015     You should have received a copy of the GNU General Public License
00016     along with this program.  If not, see <http://www.gnu.org/licenses/>.
00017 */
00018 
00030 #ifndef __CDIO_DVD_H__
00031 #define __CDIO_DVD_H__
00032 
00033 #include <cdio/types.h>
00034 
00039 #define CDIO_DVD_STRUCT_PHYSICAL        0x00
00040 #define CDIO_DVD_STRUCT_COPYRIGHT       0x01
00041 #define CDIO_DVD_STRUCT_DISCKEY         0x02
00042 #define CDIO_DVD_STRUCT_BCA             0x03
00043 #define CDIO_DVD_STRUCT_MANUFACT        0x04
00044 
00048 #define CDIO_DVD_BOOK_DVD_ROM     0x0 
00049 #define CDIO_DVD_BOOK_DVD_RAM     0x1 
00050 #define CDIO_DVD_BOOK_DVD_R       0x2 
00051 #define CDIO_DVD_BOOK_DVD_RW      0x3 
00052 #define CDIO_DVD_BOOK_HD_DVD_ROM  0x4 
00053 #define CDIO_DVD_BOOK_HD_DVD_RAM  0x5 
00054 #define CDIO_DVD_BOOK_HD_DVD_R    0x6 
00055 #define CDIO_DVD_BOOK_DVD_PRW     0x9 
00056 #define CDIO_DVD_BOOK_DVD_PR      0xa 
00057 #define CDIO_DVD_BOOK_DVD_PRW_DL  0xd 
00058 #define CDIO_DVD_BOOK_DVD_PR_DL   0xe 
00060 typedef struct cdio_dvd_layer {
00061   unsigned int book_version     : 4;
00062   unsigned int book_type        : 4;
00063   unsigned int min_rate         : 4;
00064   unsigned int disc_size        : 4;
00065   unsigned int layer_type       : 4;
00066   unsigned int track_path       : 1;
00067   unsigned int nlayers          : 2;
00068   unsigned int track_density    : 4;
00069   unsigned int linear_density   : 4;
00070   unsigned int bca              : 1;
00071   uint32_t start_sector;
00072   uint32_t end_sector;
00073   uint32_t end_sector_l0;
00074 } cdio_dvd_layer_t;
00075 
00079 #define CDIO_DVD_MAX_LAYERS     4
00080 
00081 typedef struct cdio_dvd_physical {
00082   uint8_t type;
00083   uint8_t layer_num;
00084   cdio_dvd_layer_t layer[CDIO_DVD_MAX_LAYERS];
00085 } cdio_dvd_physical_t;
00086 
00087 typedef struct cdio_dvd_copyright {
00088   uint8_t type;
00089   
00090   uint8_t layer_num;
00091   uint8_t cpst;
00092   uint8_t rmi;
00093 } cdio_dvd_copyright_t;
00094 
00095 typedef struct cdio_dvd_disckey {
00096   uint8_t type;
00097   
00098   unsigned agid : 2;
00099   uint8_t value[2048];
00100 } cdio_dvd_disckey_t;
00101 
00102 typedef struct cdio_dvd_bca {
00103   uint8_t type;
00104   
00105   int len;
00106   uint8_t value[188];
00107 } cdio_dvd_bca_t;
00108 
00109 typedef struct cdio_dvd_manufact {
00110   uint8_t type;
00111   
00112   uint8_t layer_num;
00113   int len;
00114   uint8_t value[2048];
00115 } cdio_dvd_manufact_t;
00116 
00117 typedef union {
00118   uint8_t type;
00119   
00120   cdio_dvd_physical_t   physical;
00121   cdio_dvd_copyright_t  copyright;
00122   cdio_dvd_disckey_t    disckey;
00123   cdio_dvd_bca_t        bca;
00124   cdio_dvd_manufact_t   manufact;
00125 } cdio_dvd_struct_t;
00126 
00127 #endif /* __CDIO_DVD_H__ */

Generated for libcdio by doxygen 1.8.0