[576533]: / src / dvdnav / dvd_types.h  Maximize  Restore  History

Download this file

276 lines (244 with data), 8.4 kB

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