1 /*
2     $Id$
3 
4     Copyright (C) 2000, 2004, 2005 Herbert Valerio Riedel <hvr@gnu.org>
5 
6     This program is free software; you can redistribute it and/or modify
7     it under the terms of the GNU General Public License as published by
8     the Free Software Foundation; either version 2 of the License, or
9     (at your option) any later version.
10 
11     This program is distributed in the hope that it will be useful,
12     but WITHOUT ANY WARRANTY; without even the implied warranty of
13     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14     GNU General Public License for more details.
15 
16     You should have received a copy of the GNU General Public License
17     along with this program; if not, write to the Free Software
18     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19 */
20 /** \file types.h
21  *  \brief  Common type definitions specific to VCDs and used in vcdimager
22  */
23 
24 #ifndef __VCD_TYPES_H__
25 #define __VCD_TYPES_H__
26 
27 /* We don't want to pull in cdio's config */
28 #define __CDIO_CONFIG_H__
29 #include <cdio/types.h>
30 
31 #ifdef __cplusplus
32 extern "C" {
33 #endif /* __cplusplus */
34 
35   /** Opaque types ... */
36 
37   /** These are defined fully in data_structures.c */
38   typedef struct _VcdList VcdList;
39   typedef struct _VcdListNode VcdListNode;
40 
41   /** These are defined fully in files_private.h */
42   typedef struct _InfoVcd_tag    InfoVcd_t;
43   typedef struct _EntriesVcd_tag EntriesVcd_t;
44   typedef struct _LotVcd_tag     LotVcd_t;
45 
46   typedef struct _PsdPlayListDescriptor_tag      PsdPlayListDescriptor_t;
47   typedef struct _PsdSelectionListDescriptor_tag PsdSelectionListDescriptor_t;
48 
49   /** Overall data structure representing a VideoCD object.
50       Defined fully in info_private.h.
51    */
52   typedef struct _VcdObj VcdObj_t;
53 
54   /** enum defining supported VideoCD types */
55   typedef enum
56     {
57       VCD_TYPE_INVALID = 0,
58       VCD_TYPE_VCD,
59       VCD_TYPE_VCD11,
60       VCD_TYPE_VCD2,
61       VCD_TYPE_SVCD,
62       VCD_TYPE_HQVCD
63     }
64     vcd_type_t;
65 
66   /** The type of an playback control list ID (LID). */
67   typedef uint16_t lid_t;
68 
69   /** The type of a segment number 0..1980 segment items possible. */
70   typedef uint16_t segnum_t;
71 
72   /** (0,0) == upper left; (255,255) == lower right.
73       Setting all to zero disables the area. */
74   PRAGMA_BEGIN_PACKED
75   struct psd_area_t
76   {
77     uint8_t x1; /**< upper left */
78     uint8_t y1; /**< upper left */
79     uint8_t x2; /**< lower right */
80     uint8_t y2; /**< lower right */
81   } GNUC_PACKED;
82   PRAGMA_END_PACKED
83 
84 #define struct_psd_area_t_SIZEOF 4
85 
86 #define PSD_OFS_DISABLED         0xffff
87 #define PSD_OFS_MULTI_DEF        0xfffe
88 #define PSD_OFS_MULTI_DEF_NO_NUM 0xfffd
89 
90 #ifdef __cplusplus
91 }
92 #endif /* __cplusplus */
93 
94 #endif /* __VCD_TYPES_H__ */
95 
96 /*
97  * Local variables:
98  *  c-file-style: "gnu"
99  *  tab-width: 8
100  *  indent-tabs-mode: nil
101  * End:
102  */
103