| 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 |
#include <stdint.h> |
| 30 |
|
| 31 |
/* |
| 32 |
* DVD Menu ID |
| 33 |
* (see dvdnav_menu_call()) |
| 34 |
*/ |
| 35 |
typedef enum { |
| 36 |
/* When used in VTS domain, DVD_MENU_Escape behaves like DVD_MENU_Root, |
| 37 |
* but from within a menu domain, DVD_MENU_Escape resumes playback. */ |
| 38 |
DVD_MENU_Escape = 0, |
| 39 |
DVD_MENU_Title = 2, |
| 40 |
DVD_MENU_Root = 3, |
| 41 |
DVD_MENU_Subpicture = 4, |
| 42 |
DVD_MENU_Audio = 5, |
| 43 |
DVD_MENU_Angle = 6, |
| 44 |
DVD_MENU_Part = 7 |
| 45 |
} DVDMenuID_t; |
| 46 |
|
| 47 |
/* |
| 48 |
* Stream Types |
| 49 |
* (see dvdnav_get_number_of_streams()) |
| 50 |
*/ |
| 51 |
typedef enum { |
| 52 |
DVD_SUBTITLE_STREAM = 0, |
| 53 |
DVD_AUDIO_STREAM = 1 |
| 54 |
} dvdnav_stream_type_t; |
| 55 |
|
| 56 |
/* Domain */ |
| 57 |
typedef enum { |
| 58 |
DVD_DOMAIN_FirstPlay = 1, /* First Play Domain */ |
| 59 |
DVD_DOMAIN_VTSTitle = 2, /* Video Title Set Domain */ |
| 60 |
DVD_DOMAIN_VMGM = 4, /* Video Manager Domain */ |
| 61 |
DVD_DOMAIN_VTSMenu = 8 /* Video Title Set Menu Domain */ |
| 62 |
} DVDDomain_t; |
| 63 |
|
| 64 |
/* |
| 65 |
* Structure containing info on highlight areas |
| 66 |
* (see dvdnav_get_highlight_area()) |
| 67 |
*/ |
| 68 |
typedef struct { |
| 69 |
uint32_t palette; /* The CLUT entries for the highlight palette |
| 70 |
(4-bits per entry -> 4 entries) */ |
| 71 |
uint16_t sx,sy,ex,ey; /* The start/end x,y positions */ |
| 72 |
uint32_t pts; /* Highlight PTS to match with SPU */ |
| 73 |
|
| 74 |
/* button number for the SPU decoder/overlaying engine */ |
| 75 |
uint32_t buttonN; |
| 76 |
} dvdnav_highlight_area_t; |
| 77 |
|
| 78 |
/* The audio format */ |
| 79 |
typedef enum { |
| 80 |
DVD_AUDIO_FORMAT_AC3 = 0, |
| 81 |
DVD_AUDIO_FORMAT_UNKNOWN_1 = 1, |
| 82 |
DVD_AUDIO_FORMAT_MPEG = 2, |
| 83 |
DVD_AUDIO_FORMAT_MPEG2_EXT = 3, |
| 84 |
DVD_AUDIO_FORMAT_LPCM = 4, |
| 85 |
DVD_AUDIO_FORMAT_UNKNOWN_5 = 5, |
| 86 |
DVD_AUDIO_FORMAT_DTS = 6, |
| 87 |
DVD_AUDIO_FORMAT_SDDS = 7 |
| 88 |
} DVDAudioFormat_t; |
| 89 |
|
| 90 |
/* the following types are currently unused */ |
| 91 |
|
| 92 |
#if 0 |
| 93 |
|
| 94 |
/* User operation permissions */ |
| 95 |
typedef enum { |
| 96 |
UOP_FLAG_TitleOrTimePlay = 0x00000001, |
| 97 |
UOP_FLAG_ChapterSearchOrPlay = 0x00000002, |
| 98 |
UOP_FLAG_TitlePlay = 0x00000004, |
| 99 |
UOP_FLAG_Stop = 0x00000008, |
| 100 |
UOP_FLAG_GoUp = 0x00000010, |
| 101 |
UOP_FLAG_TimeOrChapterSearch = 0x00000020, |
| 102 |
UOP_FLAG_PrevOrTopPGSearch = 0x00000040, |
| 103 |
UOP_FLAG_NextPGSearch = 0x00000080, |
| 104 |
UOP_FLAG_ForwardScan = 0x00000100, |
| 105 |
UOP_FLAG_BackwardScan = 0x00000200, |
| 106 |
UOP_FLAG_TitleMenuCall = 0x00000400, |
| 107 |
UOP_FLAG_RootMenuCall = 0x00000800, |
| 108 |
UOP_FLAG_SubPicMenuCall = 0x00001000, |
| 109 |
UOP_FLAG_AudioMenuCall = 0x00002000, |
| 110 |
UOP_FLAG_AngleMenuCall = 0x00004000, |
| 111 |
UOP_FLAG_ChapterMenuCall = 0x00008000, |
| 112 |
UOP_FLAG_Resume = 0x00010000, |
| 113 |
UOP_FLAG_ButtonSelectOrActivate = 0x00020000, |
| 114 |
UOP_FLAG_StillOff = 0x00040000, |
| 115 |
UOP_FLAG_PauseOn = 0x00080000, |
| 116 |
UOP_FLAG_AudioStreamChange = 0x00100000, |
| 117 |
UOP_FLAG_SubPicStreamChange = 0x00200000, |
| 118 |
UOP_FLAG_AngleChange = 0x00400000, |
| 119 |
UOP_FLAG_KaraokeAudioPresModeChange = 0x00800000, |
| 120 |
UOP_FLAG_VideoPresModeChange = 0x01000000 |
| 121 |
} DVDUOP_t; |
| 122 |
|
| 123 |
/* Parental Level */ |
| 124 |
typedef enum { |
| 125 |
DVD_PARENTAL_LEVEL_1 = 1, |
| 126 |
DVD_PARENTAL_LEVEL_2 = 2, |
| 127 |
DVD_PARENTAL_LEVEL_3 = 3, |
| 128 |
DVD_PARENTAL_LEVEL_4 = 4, |
| 129 |
DVD_PARENTAL_LEVEL_5 = 5, |
| 130 |
DVD_PARENTAL_LEVEL_6 = 6, |
| 131 |
DVD_PARENTAL_LEVEL_7 = 7, |
| 132 |
DVD_PARENTAL_LEVEL_8 = 8, |
| 133 |
DVD_PARENTAL_LEVEL_None = 15 |
| 134 |
} DVDParentalLevel_t; |
| 135 |
|
| 136 |
/* Language ID (ISO-639 language code) */ |
| 137 |
typedef uint16_t DVDLangID_t; |
| 138 |
|
| 139 |
/* Country ID (ISO-3166 country code) */ |
| 140 |
typedef uint16_t DVDCountryID_t; |
| 141 |
|
| 142 |
/* Register */ |
| 143 |
typedef uint16_t DVDRegister_t; |
| 144 |
typedef enum { |
| 145 |
DVDFalse = 0, |
| 146 |
DVDTrue = 1 |
| 147 |
} DVDBool_t; |
| 148 |
typedef DVDRegister_t DVDGPRMArray_t[16]; |
| 149 |
typedef DVDRegister_t DVDSPRMArray_t[24]; |
| 150 |
|
| 151 |
/* Navigation */ |
| 152 |
typedef int DVDStream_t; |
| 153 |
typedef int DVDPTT_t; |
| 154 |
typedef int DVDTitle_t; |
| 155 |
|
| 156 |
/* Angle number (1-9 or default?) */ |
| 157 |
typedef int DVDAngle_t; |
| 158 |
|
| 159 |
/* Timecode */ |
| 160 |
typedef struct { |
| 161 |
uint8_t Hours; |
| 162 |
uint8_t Minutes; |
| 163 |
uint8_t Seconds; |
| 164 |
uint8_t Frames; |
| 165 |
} DVDTimecode_t; |
| 166 |
|
| 167 |
/* Subpicture stream number (0-31,62,63) */ |
| 168 |
typedef int DVDSubpictureStream_t; |
| 169 |
|
| 170 |
/* Audio stream number (0-7, 15(none)) */ |
| 171 |
typedef int DVDAudioStream_t; |
| 172 |
|
| 173 |
/* The audio application mode */ |
| 174 |
typedef enum { |
| 175 |
DVD_AUDIO_APP_MODE_None = 0, |
| 176 |
DVD_AUDIO_APP_MODE_Karaoke = 1, |
| 177 |
DVD_AUDIO_APP_MODE_Surround = 2, |
| 178 |
DVD_AUDIO_APP_MODE_Other = 3 |
| 179 |
} DVDAudioAppMode_t; |
| 180 |
|
| 181 |
/* Audio language extension */ |
| 182 |
typedef enum { |
| 183 |
DVD_AUDIO_LANG_EXT_NotSpecified = 0, |
| 184 |
DVD_AUDIO_LANG_EXT_NormalCaptions = 1, |
| 185 |
DVD_AUDIO_LANG_EXT_VisuallyImpaired = 2, |
| 186 |
DVD_AUDIO_LANG_EXT_DirectorsComments1 = 3, |
| 187 |
DVD_AUDIO_LANG_EXT_DirectorsComments2 = 4 |
| 188 |
} DVDAudioLangExt_t; |
| 189 |
|
| 190 |
/* Subpicture language extension */ |
| 191 |
typedef enum { |
| 192 |
DVD_SUBPICTURE_LANG_EXT_NotSpecified = 0, |
| 193 |
DVD_SUBPICTURE_LANG_EXT_NormalCaptions = 1, |
| 194 |
DVD_SUBPICTURE_LANG_EXT_BigCaptions = 2, |
| 195 |
DVD_SUBPICTURE_LANG_EXT_ChildrensCaptions = 3, |
| 196 |
DVD_SUBPICTURE_LANG_EXT_NormalCC = 5, |
| 197 |
DVD_SUBPICTURE_LANG_EXT_BigCC = 6, |
| 198 |
DVD_SUBPICTURE_LANG_EXT_ChildrensCC = 7, |
| 199 |
DVD_SUBPICTURE_LANG_EXT_Forced = 9, |
| 200 |
DVD_SUBPICTURE_LANG_EXT_NormalDirectorsComments = 13, |
| 201 |
DVD_SUBPICTURE_LANG_EXT_BigDirectorsComments = 14, |
| 202 |
DVD_SUBPICTURE_LANG_EXT_ChildrensDirectorsComments = 15, |
| 203 |
} DVDSubpictureLangExt_t; |
| 204 |
|
| 205 |
/* Karaoke Downmix mode */ |
| 206 |
typedef enum { |
| 207 |
DVD_KARAOKE_DOWNMIX_0to0 = 0x0001, |
| 208 |
DVD_KARAOKE_DOWNMIX_1to0 = 0x0002, |
| 209 |
DVD_KARAOKE_DOWNMIX_2to0 = 0x0004, |
| 210 |
DVD_KARAOKE_DOWNMIX_3to0 = 0x0008, |
| 211 |
DVD_KARAOKE_DOWNMIX_4to0 = 0x0010, |
| 212 |
DVD_KARAOKE_DOWNMIX_Lto0 = 0x0020, |
| 213 |
DVD_KARAOKE_DOWNMIX_Rto0 = 0x0040, |
| 214 |
DVD_KARAOKE_DOWNMIX_0to1 = 0x0100, |
| 215 |
DVD_KARAOKE_DOWNMIX_1to1 = 0x0200, |
| 216 |
DVD_KARAOKE_DOWNMIX_2to1 = 0x0400, |
| 217 |
DVD_KARAOKE_DOWNMIX_3to1 = 0x0800, |
| 218 |
DVD_KARAOKE_DOWNMIX_4to1 = 0x1000, |
| 219 |
DVD_KARAOKE_DOWNMIX_Lto1 = 0x2000, |
| 220 |
DVD_KARAOKE_DOWNMIX_Rto1 = 0x4000 |
| 221 |
} DVDKaraokeDownmix_t; |
| 222 |
typedef int DVDKaraokeDownmixMask_t; |
| 223 |
|
| 224 |
/* Display mode */ |
| 225 |
typedef enum { |
| 226 |
DVD_DISPLAY_MODE_ContentDefault = 0, |
| 227 |
DVD_DISPLAY_MODE_16x9 = 1, |
| 228 |
DVD_DISPLAY_MODE_4x3PanScan = 2, |
| 229 |
DVD_DISPLAY_MODE_4x3Letterboxed = 3 |
| 230 |
} DVDDisplayMode_t; |
| 231 |
|
| 232 |
/* Audio attributes */ |
| 233 |
typedef struct { |
| 234 |
DVDAudioAppMode_t AppMode; |
| 235 |
DVDAudioFormat_t AudioFormat; |
| 236 |
DVDLangID_t Language; |
| 237 |
DVDAudioLangExt_t LanguageExtension; |
| 238 |
DVDBool_t HasMultichannelInfo; |
| 239 |
DVDAudioSampleFreq_t SampleFrequency; |
| 240 |
DVDAudioSampleQuant_t SampleQuantization; |
| 241 |
DVDChannelNumber_t NumberOfChannels; |
| 242 |
} DVDAudioAttributes_t; |
| 243 |
typedef int DVDAudioSampleFreq_t; |
| 244 |
typedef int DVDAudioSampleQuant_t; |
| 245 |
typedef int DVDChannelNumber_t; |
| 246 |
|
| 247 |
/* Subpicture attributes */ |
| 248 |
typedef enum { |
| 249 |
DVD_SUBPICTURE_TYPE_NotSpecified = 0, |
| 250 |
DVD_SUBPICTURE_TYPE_Language = 1, |
| 251 |
DVD_SUBPICTURE_TYPE_Other = 2 |
| 252 |
} DVDSubpictureType_t; |
| 253 |
typedef enum { |
| 254 |
DVD_SUBPICTURE_CODING_RunLength = 0, |
| 255 |
DVD_SUBPICTURE_CODING_Extended = 1, |
| 256 |
DVD_SUBPICTURE_CODING_Other = 2 |
| 257 |
} DVDSubpictureCoding_t; |
| 258 |
typedef struct { |
| 259 |
DVDSubpictureType_t Type; |
| 260 |
DVDSubpictureCoding_t CodingMode; |
| 261 |
DVDLangID_t Language; |
| 262 |
DVDSubpictureLangExt_t LanguageExtension; |
| 263 |
} DVDSubpictureAttributes_t; |
| 264 |
|
| 265 |
/* Video attributes */ |
| 266 |
typedef struct { |
| 267 |
DVDBool_t PanscanPermitted; |
| 268 |
DVDBool_t LetterboxPermitted; |
| 269 |
int AspectX; |
| 270 |
int AspectY; |
| 271 |
int FrameRate; |
| 272 |
int FrameHeight; |
| 273 |
DVDVideoCompression_t Compression; |
| 274 |
DVDBool_t Line21Field1InGop; |
| 275 |
DVDBool_t Line21Field2InGop; |
| 276 |
int more_to_come; |
| 277 |
} DVDVideoAttributes_t; |
| 278 |
typedef int DVDVideoCompression_t; |
| 279 |
|
| 280 |
#endif |
| 281 |
|
| 282 |
#endif /* LIBDVDNAV_DVD_TYPES_H */ |