Mercurial > libdvdnav.hg
comparison dvdnav/dvd_types.h @ 395:9c5aef10d165 src
Move dvd_types.h, dvdnav_events.h and dvdnav.h into a dvdnav directory.
This allows getting rid of the DVDNAV_COMPILE define hack and makes
it easier to use the library without installing or integrating the
source into some other project directly.
author | reimar |
---|---|
date | Tue, 30 Dec 2008 14:48:46 +0000 |
parents | dvd_types.h@0a5a6f03b029 |
children |
comparison
equal
deleted
inserted
replaced
394:0ac6f0d242bc | 395:9c5aef10d165 |
---|---|
1 /* | |
2 * Copyright (C) 2000, 2001 Björn Englund, Håkan Hjort | |
3 * | |
4 * This file is part of libdvdnav, a DVD navigation library. It is a modified | |
5 * file originally part of the Ogle DVD player project. | |
6 * | |
7 * libdvdnav is free software; you can redistribute it and/or modify | |
8 * it under the terms of the GNU General Public License as published by | |
9 * the Free Software Foundation; either version 2 of the License, or | |
10 * (at your option) any later version. | |
11 * | |
12 * libdvdnav is distributed in the hope that it will be useful, | |
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
15 * GNU General Public License for more details. | |
16 * | |
17 * You should have received a copy of the GNU General Public License along | |
18 * with libdvdnav; if not, write to the Free Software Foundation, Inc., | |
19 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | |
20 */ | |
21 | |
22 /* | |
23 * Various useful structs and enums for DVDs. | |
24 */ | |
25 | |
26 #ifndef LIBDVDNAV_DVD_TYPES_H | |
27 #define LIBDVDNAV_DVD_TYPES_H | |
28 | |
29 /* | |
30 * DVD Menu ID | |
31 * (see dvdnav_menu_call()) | |
32 */ | |
33 typedef enum { | |
34 /* When used in VTS domain, DVD_MENU_Escape behaves like DVD_MENU_Root, | |
35 * but from within a menu domain, DVD_MENU_Escape resumes playback. */ | |
36 DVD_MENU_Escape = 0, | |
37 DVD_MENU_Title = 2, | |
38 DVD_MENU_Root = 3, | |
39 DVD_MENU_Subpicture = 4, | |
40 DVD_MENU_Audio = 5, | |
41 DVD_MENU_Angle = 6, | |
42 DVD_MENU_Part = 7 | |
43 } DVDMenuID_t; | |
44 | |
45 | |
46 /* | |
47 * Structure containing info on highlight areas | |
48 * (see dvdnav_get_highlight_area()) | |
49 */ | |
50 typedef struct { | |
51 uint32_t palette; /* The CLUT entries for the highlight palette | |
52 (4-bits per entry -> 4 entries) */ | |
53 uint16_t sx,sy,ex,ey; /* The start/end x,y positions */ | |
54 uint32_t pts; /* Highlight PTS to match with SPU */ | |
55 | |
56 /* button number for the SPU decoder/overlaying engine */ | |
57 uint32_t buttonN; | |
58 } dvdnav_highlight_area_t; | |
59 | |
60 | |
61 /* the following types are currently unused */ | |
62 | |
63 #if 0 | |
64 | |
65 /* Domain */ | |
66 typedef enum { | |
67 DVD_DOMAIN_FirstPlay, /* First Play Domain */ | |
68 DVD_DOMAIN_VMG, /* Video Manager Domain */ | |
69 DVD_DOMAIN_VTSMenu, /* Video Title Set Menu Domain */ | |
70 DVD_DOMAIN_VTSTitle, /* Video Title Set Domain */ | |
71 DVD_DOMAIN_Stop /* Stop Domain */ | |
72 } DVDDomain_t; | |
73 | |
74 /* User operation permissions */ | |
75 typedef enum { | |
76 UOP_FLAG_TitleOrTimePlay = 0x00000001, | |
77 UOP_FLAG_ChapterSearchOrPlay = 0x00000002, | |
78 UOP_FLAG_TitlePlay = 0x00000004, | |
79 UOP_FLAG_Stop = 0x00000008, | |
80 UOP_FLAG_GoUp = 0x00000010, | |
81 UOP_FLAG_TimeOrChapterSearch = 0x00000020, | |
82 UOP_FLAG_PrevOrTopPGSearch = 0x00000040, | |
83 UOP_FLAG_NextPGSearch = 0x00000080, | |
84 UOP_FLAG_ForwardScan = 0x00000100, | |
85 UOP_FLAG_BackwardScan = 0x00000200, | |
86 UOP_FLAG_TitleMenuCall = 0x00000400, | |
87 UOP_FLAG_RootMenuCall = 0x00000800, | |
88 UOP_FLAG_SubPicMenuCall = 0x00001000, | |
89 UOP_FLAG_AudioMenuCall = 0x00002000, | |
90 UOP_FLAG_AngleMenuCall = 0x00004000, | |
91 UOP_FLAG_ChapterMenuCall = 0x00008000, | |
92 UOP_FLAG_Resume = 0x00010000, | |
93 UOP_FLAG_ButtonSelectOrActivate = 0x00020000, | |
94 UOP_FLAG_StillOff = 0x00040000, | |
95 UOP_FLAG_PauseOn = 0x00080000, | |
96 UOP_FLAG_AudioStreamChange = 0x00100000, | |
97 UOP_FLAG_SubPicStreamChange = 0x00200000, | |
98 UOP_FLAG_AngleChange = 0x00400000, | |
99 UOP_FLAG_KaraokeAudioPresModeChange = 0x00800000, | |
100 UOP_FLAG_VideoPresModeChange = 0x01000000 | |
101 } DVDUOP_t; | |
102 | |
103 /* Parental Level */ | |
104 typedef enum { | |
105 DVD_PARENTAL_LEVEL_1 = 1, | |
106 DVD_PARENTAL_LEVEL_2 = 2, | |
107 DVD_PARENTAL_LEVEL_3 = 3, | |
108 DVD_PARENTAL_LEVEL_4 = 4, | |
109 DVD_PARENTAL_LEVEL_5 = 5, | |
110 DVD_PARENTAL_LEVEL_6 = 6, | |
111 DVD_PARENTAL_LEVEL_7 = 7, | |
112 DVD_PARENTAL_LEVEL_8 = 8, | |
113 DVD_PARENTAL_LEVEL_None = 15 | |
114 } DVDParentalLevel_t; | |
115 | |
116 /* Language ID (ISO-639 language code) */ | |
117 typedef uint16_t DVDLangID_t; | |
118 | |
119 /* Country ID (ISO-3166 country code) */ | |
120 typedef uint16_t DVDCountryID_t; | |
121 | |
122 /* Register */ | |
123 typedef uint16_t DVDRegister_t; | |
124 typedef enum { | |
125 DVDFalse = 0, | |
126 DVDTrue = 1 | |
127 } DVDBool_t; | |
128 typedef DVDRegister_t DVDGPRMArray_t[16]; | |
129 typedef DVDRegister_t DVDSPRMArray_t[24]; | |
130 | |
131 /* Navigation */ | |
132 typedef int DVDStream_t; | |
133 typedef int DVDPTT_t; | |
134 typedef int DVDTitle_t; | |
135 | |
136 /* Angle number (1-9 or default?) */ | |
137 typedef int DVDAngle_t; | |
138 | |
139 /* Timecode */ | |
140 typedef struct { | |
141 uint8_t Hours; | |
142 uint8_t Minutes; | |
143 uint8_t Seconds; | |
144 uint8_t Frames; | |
145 } DVDTimecode_t; | |
146 | |
147 /* Subpicture stream number (0-31,62,63) */ | |
148 typedef int DVDSubpictureStream_t; | |
149 | |
150 /* Audio stream number (0-7, 15(none)) */ | |
151 typedef int DVDAudioStream_t; | |
152 | |
153 /* The audio application mode */ | |
154 typedef enum { | |
155 DVD_AUDIO_APP_MODE_None = 0, | |
156 DVD_AUDIO_APP_MODE_Karaoke = 1, | |
157 DVD_AUDIO_APP_MODE_Surround = 2, | |
158 DVD_AUDIO_APP_MODE_Other = 3 | |
159 } DVDAudioAppMode_t; | |
160 | |
161 /* The audio format */ | |
162 typedef enum { | |
163 DVD_AUDIO_FORMAT_AC3 = 0, | |
164 DVD_AUDIO_FORMAT_MPEG1 = 1, | |
165 DVD_AUDIO_FORMAT_MPEG1_DRC = 2, | |
166 DVD_AUDIO_FORMAT_MPEG2 = 3, | |
167 DVD_AUDIO_FORMAT_MPEG2_DRC = 4, | |
168 DVD_AUDIO_FORMAT_LPCM = 5, | |
169 DVD_AUDIO_FORMAT_DTS = 6, | |
170 DVD_AUDIO_FORMAT_SDDS = 7, | |
171 DVD_AUDIO_FORMAT_Other = 8 | |
172 } DVDAudioFormat_t; | |
173 | |
174 /* Audio language extension */ | |
175 typedef enum { | |
176 DVD_AUDIO_LANG_EXT_NotSpecified = 0, | |
177 DVD_AUDIO_LANG_EXT_NormalCaptions = 1, | |
178 DVD_AUDIO_LANG_EXT_VisuallyImpaired = 2, | |
179 DVD_AUDIO_LANG_EXT_DirectorsComments1 = 3, | |
180 DVD_AUDIO_LANG_EXT_DirectorsComments2 = 4 | |
181 } DVDAudioLangExt_t; | |
182 | |
183 /* Subpicture language extension */ | |
184 typedef enum { | |
185 DVD_SUBPICTURE_LANG_EXT_NotSpecified = 0, | |
186 DVD_SUBPICTURE_LANG_EXT_NormalCaptions = 1, | |
187 DVD_SUBPICTURE_LANG_EXT_BigCaptions = 2, | |
188 DVD_SUBPICTURE_LANG_EXT_ChildrensCaptions = 3, | |
189 DVD_SUBPICTURE_LANG_EXT_NormalCC = 5, | |
190 DVD_SUBPICTURE_LANG_EXT_BigCC = 6, | |
191 DVD_SUBPICTURE_LANG_EXT_ChildrensCC = 7, | |
192 DVD_SUBPICTURE_LANG_EXT_Forced = 9, | |
193 DVD_SUBPICTURE_LANG_EXT_NormalDirectorsComments = 13, | |
194 DVD_SUBPICTURE_LANG_EXT_BigDirectorsComments = 14, | |
195 DVD_SUBPICTURE_LANG_EXT_ChildrensDirectorsComments = 15, | |
196 } DVDSubpictureLangExt_t; | |
197 | |
198 /* Karaoke Downmix mode */ | |
199 typedef enum { | |
200 DVD_KARAOKE_DOWNMIX_0to0 = 0x0001, | |
201 DVD_KARAOKE_DOWNMIX_1to0 = 0x0002, | |
202 DVD_KARAOKE_DOWNMIX_2to0 = 0x0004, | |
203 DVD_KARAOKE_DOWNMIX_3to0 = 0x0008, | |
204 DVD_KARAOKE_DOWNMIX_4to0 = 0x0010, | |
205 DVD_KARAOKE_DOWNMIX_Lto0 = 0x0020, | |
206 DVD_KARAOKE_DOWNMIX_Rto0 = 0x0040, | |
207 DVD_KARAOKE_DOWNMIX_0to1 = 0x0100, | |
208 DVD_KARAOKE_DOWNMIX_1to1 = 0x0200, | |
209 DVD_KARAOKE_DOWNMIX_2to1 = 0x0400, | |
210 DVD_KARAOKE_DOWNMIX_3to1 = 0x0800, | |
211 DVD_KARAOKE_DOWNMIX_4to1 = 0x1000, | |
212 DVD_KARAOKE_DOWNMIX_Lto1 = 0x2000, | |
213 DVD_KARAOKE_DOWNMIX_Rto1 = 0x4000 | |
214 } DVDKaraokeDownmix_t; | |
215 typedef int DVDKaraokeDownmixMask_t; | |
216 | |
217 /* Display mode */ | |
218 typedef enum { | |
219 DVD_DISPLAY_MODE_ContentDefault = 0, | |
220 DVD_DISPLAY_MODE_16x9 = 1, | |
221 DVD_DISPLAY_MODE_4x3PanScan = 2, | |
222 DVD_DISPLAY_MODE_4x3Letterboxed = 3 | |
223 } DVDDisplayMode_t; | |
224 | |
225 /* Audio attributes */ | |
226 typedef struct { | |
227 DVDAudioAppMode_t AppMode; | |
228 DVDAudioFormat_t AudioFormat; | |
229 DVDLangID_t Language; | |
230 DVDAudioLangExt_t LanguageExtension; | |
231 DVDBool_t HasMultichannelInfo; | |
232 DVDAudioSampleFreq_t SampleFrequency; | |
233 DVDAudioSampleQuant_t SampleQuantization; | |
234 DVDChannelNumber_t NumberOfChannels; | |
235 } DVDAudioAttributes_t; | |
236 typedef int DVDAudioSampleFreq_t; | |
237 typedef int DVDAudioSampleQuant_t; | |
238 typedef int DVDChannelNumber_t; | |
239 | |
240 /* Subpicture attributes */ | |
241 typedef enum { | |
242 DVD_SUBPICTURE_TYPE_NotSpecified = 0, | |
243 DVD_SUBPICTURE_TYPE_Language = 1, | |
244 DVD_SUBPICTURE_TYPE_Other = 2 | |
245 } DVDSubpictureType_t; | |
246 typedef enum { | |
247 DVD_SUBPICTURE_CODING_RunLength = 0, | |
248 DVD_SUBPICTURE_CODING_Extended = 1, | |
249 DVD_SUBPICTURE_CODING_Other = 2 | |
250 } DVDSubpictureCoding_t; | |
251 typedef struct { | |
252 DVDSubpictureType_t Type; | |
253 DVDSubpictureCoding_t CodingMode; | |
254 DVDLangID_t Language; | |
255 DVDSubpictureLangExt_t LanguageExtension; | |
256 } DVDSubpictureAttributes_t; | |
257 | |
258 /* Video attributes */ | |
259 typedef struct { | |
260 DVDBool_t PanscanPermitted; | |
261 DVDBool_t LetterboxPermitted; | |
262 int AspectX; | |
263 int AspectY; | |
264 int FrameRate; | |
265 int FrameHeight; | |
266 DVDVideoCompression_t Compression; | |
267 DVDBool_t Line21Field1InGop; | |
268 DVDBool_t Line21Field2InGop; | |
269 int more_to_come; | |
270 } DVDVideoAttributes_t; | |
271 typedef int DVDVideoCompression_t; | |
272 | |
273 #endif | |
274 | |
275 #endif /* LIBDVDNAV_DVD_TYPES_H */ |