1 |
//------------------------------------------------------------------------------
|
2 |
// File: DVDIf.idl
|
3 |
//
|
4 |
// Desc: DirectShow interfaces to control playback of a DVD filter graph.
|
5 |
//
|
6 |
// Copyright (c) 1992-2000, Microsoft Corporation. All rights reserved.
|
7 |
//------------------------------------------------------------------------------
|
8 |
|
9 |
|
10 |
// forward declarations - these are the interfaces declared in this file
|
11 |
|
12 |
import "unknwn.idl";
|
13 |
import "objidl.idl";
|
14 |
|
15 |
cpp_quote("#include <ddraw.h>")
|
16 |
|
17 |
interface IDvdControl;
|
18 |
interface IDvdInfo;
|
19 |
interface IDirectDraw;
|
20 |
interface IDirectDrawSurface;
|
21 |
interface IDvdGraphBuilder ;
|
22 |
interface IDDrawExclModeVideo;
|
23 |
interface IDDrawExclModeVideoCallback;
|
24 |
interface IDvdCmd;
|
25 |
interface IDvdState;
|
26 |
|
27 |
|
28 |
//==========================================================================
|
29 |
//==========================================================================
|
30 |
//
|
31 |
// typedefs used by IDvdControl and IDvdInfo interfaces.
|
32 |
//
|
33 |
//==========================================================================
|
34 |
//==========================================================================
|
35 |
|
36 |
typedef enum tagDVD_DOMAIN {
|
37 |
// The DVD_DOMAIN is used to indicate the stat of a DVD player.
|
38 |
DVD_DOMAIN_FirstPlay=1, // doing default initialization of a dvd disc
|
39 |
DVD_DOMAIN_VideoManagerMenu, // displaying menus for whole disc
|
40 |
DVD_DOMAIN_VideoTitleSetMenu, // displaying menus for current title set
|
41 |
DVD_DOMAIN_Title, // displaying current title
|
42 |
DVD_DOMAIN_Stop // player is in stopped state
|
43 |
} DVD_DOMAIN;
|
44 |
|
45 |
typedef enum tagDVD_MENU_ID {
|
46 |
DVD_MENU_Title = 2, // to choose a title from any VTS in a DVD-Video volume
|
47 |
DVD_MENU_Root = 3, // main menu for a specific VTS
|
48 |
DVD_MENU_Subpicture =4, // to choose subpicture stream in a VTS
|
49 |
DVD_MENU_Audio = 5, // to choose audio stream in a VTS
|
50 |
DVD_MENU_Angle = 6, // to choose angle num in a VTS
|
51 |
DVD_MENU_Chapter = 7 // to choose a chapter in a VTS
|
52 |
// the Root menu always provides a means of getting to to Subpicture, Audio,
|
53 |
// Angle and Chapter menus if they exist.
|
54 |
} DVD_MENU_ID;
|
55 |
|
56 |
typedef enum tagDVD_DISC_SIDE {
|
57 |
DVD_SIDE_A = 1,
|
58 |
DVD_SIDE_B = 2
|
59 |
} DVD_DISC_SIDE;
|
60 |
|
61 |
|
62 |
typedef enum tagDVD_PREFERRED_DISPLAY_MODE
|
63 |
{
|
64 |
// DVD_PREFERRED_DISPLAY_MODE is used to indicate the user's
|
65 |
// preferred window aspect ratio and preferred method of converion of
|
66 |
// 16*9 content to a 4*3 window aspect ratio. Pan-scan and letterboxing are
|
67 |
// the two conversion methods. This enum is used to indicate only a preference of
|
68 |
// conversion mechinism since some content can only be converted using one
|
69 |
// of these methods. 4*3 content is converted to a 16*9 window always by using
|
70 |
// "reverse" letterboxing where black bars are added to the right and left
|
71 |
// sides of the display instead of the top and bottom of the display as in the 16*9
|
72 |
// to 4*3 conversion useing letterboxing.
|
73 |
DISPLAY_CONTENT_DEFAULT = 0, // default to content
|
74 |
DISPLAY_16x9 = 1, // 16x9 display
|
75 |
DISPLAY_4x3_PANSCAN_PREFERRED = 2, // 4x3 display with pan-scan preferrence
|
76 |
DISPLAY_4x3_LETTERBOX_PREFERRED = 3 // 4x3 display with letterbox preferrence
|
77 |
|
78 |
} DVD_PREFERRED_DISPLAY_MODE;
|
79 |
|
80 |
typedef WORD DVD_REGISTER;
|
81 |
typedef DVD_REGISTER GPRMARRAY[16]; // DVD-Video 1.0 has 16 16-bit General Parameter Registers
|
82 |
typedef DVD_REGISTER SPRMARRAY[24]; // DVD-Video 1.0 has 24 16-bit System Parameter Registers
|
83 |
|
84 |
|
85 |
|
86 |
// these are only for IDVDInfo1 compatibility and require the DVD-Video 1.0 specification
|
87 |
// Please use the IDVDInfo2's DVD_Title/MenuAttributes, DVD_VideoAttributes, DVD_AudioAttributes, and DVD_SubpictureAttributes
|
88 |
typedef struct tagDVD_ATR
|
89 |
{
|
90 |
//
|
91 |
// Refer to the DVD-Video 1.0 spec to parse these structures.
|
92 |
//
|
93 |
ULONG ulCAT; // VMG_CAT if this is for a volume; or VTS_CAT
|
94 |
// if this is for a Video Title Set (VTS)
|
95 |
BYTE pbATRI[768];// All stream attributes for menu and title from bytes
|
96 |
// 256 to 1023 of VMGI or VTSI.
|
97 |
} DVD_ATR;
|
98 |
typedef BYTE DVD_VideoATR[2]; // video stream attributes.
|
99 |
typedef BYTE DVD_AudioATR[8]; // audio stream attributes.
|
100 |
typedef BYTE DVD_SubpictureATR[6]; // subpicture stream attributes.
|
101 |
|
102 |
// DVD1.0 Timecode is BCD encoded in this format: 0xHhMmSsFf, where
|
103 |
// H is tens of hours
|
104 |
// h is hours
|
105 |
// M is tens of minutes
|
106 |
// m is minutes
|
107 |
// S is tens of seconds
|
108 |
// s is seconds
|
109 |
// F is tens of frames
|
110 |
// f is frames
|
111 |
// Note that you must know the frame rate to interperate the frame count as time.
|
112 |
typedef enum tagDVD_FRAMERATE
|
113 |
{
|
114 |
DVD_FPS_25 =1, // 25 frames per second
|
115 |
DVD_FPS_30NonDrop = 3 // exactly 30 frames per second
|
116 |
} DVD_FRAMERATE;
|
117 |
|
118 |
cpp_quote("typedef struct tagDVD_TIMECODE")
|
119 |
cpp_quote("{")
|
120 |
cpp_quote(" ULONG Hours1 :4; // Hours")
|
121 |
cpp_quote(" ULONG Hours10 :4; // Tens of Hours ")
|
122 |
cpp_quote("")
|
123 |
cpp_quote(" ULONG Minutes1 :4; // Minutes ")
|
124 |
cpp_quote(" ULONG Minutes10:4; // Tens of Minutes ")
|
125 |
cpp_quote("")
|
126 |
cpp_quote(" ULONG Seconds1 :4; // Seconds ")
|
127 |
cpp_quote(" ULONG Seconds10:4; // Tens of Seconds ")
|
128 |
cpp_quote("")
|
129 |
cpp_quote(" ULONG Frames1 :4; // Frames ")
|
130 |
cpp_quote(" ULONG Frames10 :2; // Tens of Frames ")
|
131 |
cpp_quote("")
|
132 |
cpp_quote(" ULONG FrameRateCode: 2; // use DVD_FRAMERATE to indicate frames/sec and drop/non-drop")
|
133 |
cpp_quote("} DVD_TIMECODE;")
|
134 |
|
135 |
//
|
136 |
// Newer IDVD2 methods can use the HMSF format instead
|
137 |
// Call SetOption( DVD_HMSF_TimeCodeEvents, TRUE) to return EC_DVD_CURRENT_HMSF_TIME
|
138 |
// instead of EC_DVD_CURRENT_TIME events
|
139 |
//
|
140 |
typedef enum tagDVD_TIMECODE_FLAGS
|
141 |
{
|
142 |
DVD_TC_FLAG_25fps = 0x00000001, // 25 frames per second
|
143 |
DVD_TC_FLAG_30fps = 0x00000002, // 30 frames per second
|
144 |
DVD_TC_FLAG_DropFrame = 0x00000004, // 29.97 instead of 30 fps
|
145 |
DVD_TC_FLAG_Interpolated = 0x00000008, // timecode may be inaccurate
|
146 |
// remainder of bits are reserved and should not be read
|
147 |
} DVD_TIMECODE_FLAGS;
|
148 |
|
149 |
// this can be cast to/from a ULONG
|
150 |
typedef struct tagDVD_HMSF_TIMECODE
|
151 |
{
|
152 |
BYTE bHours;
|
153 |
BYTE bMinutes;
|
154 |
BYTE bSeconds;
|
155 |
BYTE bFrames;
|
156 |
} DVD_HMSF_TIMECODE;
|
157 |
|
158 |
typedef struct tagDVD_PLAYBACK_LOCATION2
|
159 |
{
|
160 |
//
|
161 |
// TitleNum & ChapterNum or TitleNum & TimeCode are sufficient to save
|
162 |
// playback location for One_Sequential_PGC_Titles.
|
163 |
//
|
164 |
ULONG TitleNum; // title number for whole disc (TTN not VTS_TTN)
|
165 |
ULONG ChapterNum; // part-of-title number with title. 0xffffffff if not Once_Sequential_PGC_Title
|
166 |
DVD_HMSF_TIMECODE TimeCode; // use DVD_TIMECODE for current playback time.
|
167 |
ULONG TimeCodeFlags; // union of DVD_TIMECODE_EVENT_FLAGS
|
168 |
|
169 |
} DVD_PLAYBACK_LOCATION2;
|
170 |
|
171 |
typedef struct tagDVD_PLAYBACK_LOCATION
|
172 |
{
|
173 |
//
|
174 |
// TitleNum & ChapterNum or TitleNum & TimeCode are sufficient to save
|
175 |
// playback location for One_Sequential_PGC_Titles.
|
176 |
//
|
177 |
ULONG TitleNum; // title number for whole disc (TTN not VTS_TTN)
|
178 |
ULONG ChapterNum; // part-of-title number with title. 0xffffffff if not Once_Sequential_PGC_Title
|
179 |
ULONG TimeCode; // use DVD_TIMECODE for current playback time. 0xffffffff if not Once_Sequential_PGC_Title
|
180 |
|
181 |
} DVD_PLAYBACK_LOCATION;
|
182 |
|
183 |
typedef DWORD VALID_UOP_SOMTHING_OR_OTHER;
|
184 |
|
185 |
typedef enum {
|
186 |
//
|
187 |
// Annex J User Functions ---
|
188 |
//
|
189 |
UOP_FLAG_Play_Title_Or_AtTime = 0x00000001, // Title_Or_Time_Play
|
190 |
UOP_FLAG_Play_Chapter = 0x00000002, // Chapter_Search_Or_Play
|
191 |
UOP_FLAG_Play_Title = 0x00000004, // Title_Play
|
192 |
UOP_FLAG_Stop = 0x00000008, // Stop
|
193 |
UOP_FLAG_ReturnFromSubMenu = 0x00000010, // GoUp
|
194 |
UOP_FLAG_Play_Chapter_Or_AtTime = 0x00000020, // Time_Or_Chapter_Search
|
195 |
UOP_FLAG_PlayPrev_Or_Replay_Chapter = 0x00000040, // Prev_Or_Top_PG_Search
|
196 |
UOP_FLAG_PlayNext_Chapter = 0x00000080, // Next_PG_Search
|
197 |
UOP_FLAG_Play_Forwards = 0x00000100, // Forward_Scan
|
198 |
UOP_FLAG_Play_Backwards = 0x00000200, // Backward_Scan
|
199 |
UOP_FLAG_ShowMenu_Title = 0x00000400, // Title_Menu_Call
|
200 |
UOP_FLAG_ShowMenu_Root = 0x00000800, // Root_Menu_Call
|
201 |
UOP_FLAG_ShowMenu_SubPic = 0x00001000, // SubPic_Menu_Call
|
202 |
UOP_FLAG_ShowMenu_Audio = 0x00002000, // Audio_Menu_Call
|
203 |
UOP_FLAG_ShowMenu_Angle = 0x00004000, // Angle_Menu_Call
|
204 |
UOP_FLAG_ShowMenu_Chapter = 0x00008000, // Chapter_Menu_Call
|
205 |
UOP_FLAG_Resume = 0x00010000, // Resume
|
206 |
UOP_FLAG_Select_Or_Activate_Button = 0x00020000, // Button_Select_Or_Activate
|
207 |
UOP_FLAG_Still_Off = 0x00040000, // Still_Off
|
208 |
UOP_FLAG_Pause_On = 0x00080000, // Pause_On
|
209 |
UOP_FLAG_Select_Audio_Stream = 0x00100000, // Audio_Stream_Change
|
210 |
UOP_FLAG_Select_SubPic_Stream = 0x00200000, // SubPic_Stream_Change
|
211 |
UOP_FLAG_Select_Angle = 0x00400000, // Angle_Change
|
212 |
UOP_FLAG_Select_Karaoke_Audio_Presentation_Mode = 0x00800000, // Karaoke_Audio_Pres_Mode_Change
|
213 |
UOP_FLAG_Select_Video_Mode_Preference = 0x01000000 // Video_Pres_Mode_Change
|
214 |
} VALID_UOP_FLAG ;
|
215 |
|
216 |
typedef enum {
|
217 |
DVD_CMD_FLAG_None = 0x00000000,
|
218 |
DVD_CMD_FLAG_Flush = 0x00000001,
|
219 |
DVD_CMD_FLAG_SendEvents = 0x00000002,
|
220 |
DVD_CMD_FLAG_Block = 0x00000004, // block end
|
221 |
DVD_CMD_FLAG_StartWhenRendered = 0x00000008, // command "start" when the first frame is rendered
|
222 |
DVD_CMD_FLAG_EndAfterRendered = 0x00000010, // command "ends" after the last frame is rendered
|
223 |
} DVD_CMD_FLAGS;
|
224 |
|
225 |
// For IDVDControl2::SetOption flags
|
226 |
typedef enum {
|
227 |
DVD_ResetOnStop = 1, // default TRUE
|
228 |
DVD_NotifyParentalLevelChange = 2, // default FALSE
|
229 |
DVD_HMSF_TimeCodeEvents = 3, // default FALSE (send DVD_CURRENT_TIME events)
|
230 |
} DVD_OPTION_FLAG;
|
231 |
|
232 |
typedef enum {
|
233 |
DVD_Relative_Upper = 1,
|
234 |
DVD_Relative_Lower = 2,
|
235 |
DVD_Relative_Left = 3,
|
236 |
DVD_Relative_Right = 4
|
237 |
} DVD_RELATIVE_BUTTON;
|
238 |
|
239 |
// Parental Level Information
|
240 |
typedef enum tagDVD_PARENTAL_LEVEL
|
241 |
{
|
242 |
DVD_PARENTAL_LEVEL_8 = 0x8000,
|
243 |
DVD_PARENTAL_LEVEL_7 = 0x4000,
|
244 |
DVD_PARENTAL_LEVEL_6 = 0x2000,
|
245 |
DVD_PARENTAL_LEVEL_5 = 0x1000,
|
246 |
DVD_PARENTAL_LEVEL_4 = 0x0800,
|
247 |
DVD_PARENTAL_LEVEL_3 = 0x0400,
|
248 |
DVD_PARENTAL_LEVEL_2 = 0x0200,
|
249 |
DVD_PARENTAL_LEVEL_1 = 0x0100
|
250 |
} DVD_PARENTAL_LEVEL;
|
251 |
|
252 |
|
253 |
typedef enum tagDVD_AUDIO_LANG_EXT
|
254 |
{
|
255 |
DVD_AUD_EXT_NotSpecified =0,
|
256 |
DVD_AUD_EXT_Captions =1,
|
257 |
DVD_AUD_EXT_VisuallyImpaired =2,
|
258 |
DVD_AUD_EXT_DirectorComments1 =3,
|
259 |
DVD_AUD_EXT_DirectorComments2 =4,
|
260 |
} DVD_AUDIO_LANG_EXT;
|
261 |
|
262 |
typedef enum tagDVD_SUBPICTURE_LANG_EXT
|
263 |
{
|
264 |
DVD_SP_EXT_NotSpecified =0,
|
265 |
DVD_SP_EXT_Caption_Normal =1,
|
266 |
DVD_SP_EXT_Caption_Big =2,
|
267 |
DVD_SP_EXT_Caption_Children =3,
|
268 |
DVD_SP_EXT_CC_Normal =5,
|
269 |
DVD_SP_EXT_CC_Big =6,
|
270 |
DVD_SP_EXT_CC_Children =7,
|
271 |
DVD_SP_EXT_Forced =9,
|
272 |
DVD_SP_EXT_DirectorComments_Normal =13,
|
273 |
DVD_SP_EXT_DirectorComments_Big =14,
|
274 |
DVD_SP_EXT_DirectorComments_Children =15,
|
275 |
} DVD_SUBPICTURE_LANG_EXT;
|
276 |
|
277 |
typedef enum tagDVD_AUDIO_APPMODE
|
278 |
{
|
279 |
DVD_AudioMode_None = 0, // no special mode
|
280 |
DVD_AudioMode_Karaoke = 1,
|
281 |
DVD_AudioMode_Surround = 2,
|
282 |
DVD_AudioMode_Other = 3,
|
283 |
} DVD_AUDIO_APPMODE;
|
284 |
|
285 |
typedef enum tagDVD_AUDIO_FORMAT
|
286 |
{
|
287 |
DVD_AudioFormat_AC3 = 0,
|
288 |
DVD_AudioFormat_MPEG1 = 1,
|
289 |
DVD_AudioFormat_MPEG1_DRC = 2, // MPEG1 with dynamic range control
|
290 |
DVD_AudioFormat_MPEG2 = 3,
|
291 |
DVD_AudioFormat_MPEG2_DRC = 4, // MPEG2 with dynamic range control
|
292 |
DVD_AudioFormat_LPCM = 5,
|
293 |
DVD_AudioFormat_DTS = 6,
|
294 |
DVD_AudioFormat_SDDS = 7,
|
295 |
DVD_AudioFormat_Other = 8
|
296 |
} DVD_AUDIO_FORMAT;
|
297 |
|
298 |
// flags for SelectKaraokeAudioPresentationMode
|
299 |
typedef enum tagDVD_KARAOKE_DOWNMIX
|
300 |
{
|
301 |
DVD_Mix_0to0 = 0x0001, // unused - reserved for future use
|
302 |
DVD_Mix_1to0 = 0x0002, // unused - reserved for future use
|
303 |
DVD_Mix_2to0 = 0x0004,
|
304 |
DVD_Mix_3to0 = 0x0008,
|
305 |
DVD_Mix_4to0 = 0x0010,
|
306 |
DVD_Mix_Lto0 = 0x0020, // mix auxillary L to channel 0 (left speaker)
|
307 |
DVD_Mix_Rto0 = 0x0040, // mix auxillary R to channel 0 (left speaker)
|
308 |
|
309 |
DVD_Mix_0to1 = 0x0100, // unused - reserved for future use
|
310 |
DVD_Mix_1to1 = 0x0200, // unused - reserved for future use
|
311 |
DVD_Mix_2to1 = 0x0400,
|
312 |
DVD_Mix_3to1 = 0x0800,
|
313 |
DVD_Mix_4to1 = 0x1000,
|
314 |
DVD_Mix_Lto1 = 0x2000, // mix auxillary L to channel 1 (right speaker)
|
315 |
DVD_Mix_Rto1 = 0x4000, // mix auxillary R to channel 1 (right speaker)
|
316 |
} DVD_KARAOKE_DOWNMIX;
|
317 |
|
318 |
|
319 |
typedef struct tagDVD_AudioAttributes
|
320 |
{
|
321 |
DVD_AUDIO_APPMODE AppMode;
|
322 |
BYTE AppModeData;
|
323 |
DVD_AUDIO_FORMAT AudioFormat; // Use GetKaraokeAttributes()
|
324 |
LCID Language; // 0 if no language is present
|
325 |
DVD_AUDIO_LANG_EXT LanguageExtension; // (captions, if for children etc)
|
326 |
BOOL fHasMultichannelInfo; // multichannel attributes are present (Use GetMultiChannelAudioAttributes())
|
327 |
DWORD dwFrequency; // in hertz (48k, 96k)
|
328 |
BYTE bQuantization; // resolution (16, 20, 24 bits etc), 0 is unknown
|
329 |
BYTE bNumberOfChannels; // 5.1 AC3 has 6 channels
|
330 |
DWORD dwReserved[2];
|
331 |
} DVD_AudioAttributes;
|
332 |
|
333 |
typedef struct tagDVD_MUA_MixingInfo
|
334 |
{
|
335 |
// surround sound mixing information applied when:
|
336 |
// AppMode = DVD_AudioMode_Surround
|
337 |
// AudioFormat = DVD_AudioFormat_LPCM,
|
338 |
// fHasMultichannelInfo=1 modes are all on
|
339 |
//
|
340 |
BOOL fMixTo0;
|
341 |
BOOL fMixTo1;
|
342 |
|
343 |
//
|
344 |
BOOL fMix0InPhase;
|
345 |
BOOL fMix1InPhase;
|
346 |
|
347 |
DWORD dwSpeakerPosition; // see ksmedia.h: SPEAKER_FRONT_LEFT, SPEAKER_FRONT_RIGHT, etc
|
348 |
} DVD_MUA_MixingInfo;
|
349 |
|
350 |
// The alpha coeff is used to mix to ACH0 and beta is used to mix to ACH1
|
351 |
//
|
352 |
// In general:
|
353 |
// ACH0 = coeff[0].alpha * value[0] + coeff[1].alpha * value[1] + ...
|
354 |
// ACH1 = coeff[0].beta * value[0] + coeff[1].beta * value[1] + ...
|
355 |
typedef struct tagDVD_MUA_Coeff
|
356 |
{
|
357 |
double log2_alpha; // actual coeff = 2^alpha
|
358 |
double log2_beta; // actual coeff = 2^beta
|
359 |
} DVD_MUA_Coeff;
|
360 |
|
361 |
typedef struct tagDVD_MultichannelAudioAttributes
|
362 |
{
|
363 |
// actual Data for each data stream
|
364 |
DVD_MUA_MixingInfo Info[8];
|
365 |
DVD_MUA_Coeff Coeff[8];
|
366 |
} DVD_MultichannelAudioAttributes;
|
367 |
|
368 |
// bitwise OR of these flags descript the contents of each channel
|
369 |
typedef enum tagDVD_KARAOKE_CONTENTS
|
370 |
{
|
371 |
DVD_Karaoke_GuideVocal1 = 0x0001,
|
372 |
DVD_Karaoke_GuideVocal2 = 0x0002,
|
373 |
DVD_Karaoke_GuideMelody1 = 0x0004,
|
374 |
DVD_Karaoke_GuideMelody2 = 0x0008,
|
375 |
DVD_Karaoke_GuideMelodyA = 0x0010,
|
376 |
DVD_Karaoke_GuideMelodyB = 0x0020,
|
377 |
DVD_Karaoke_SoundEffectA = 0x0040,
|
378 |
DVD_Karaoke_SoundEffectB = 0x0080
|
379 |
} DVD_KARAOKE_CONTENTS;
|
380 |
|
381 |
typedef enum tagDVD_KARAOKE_ASSIGNMENT
|
382 |
{
|
383 |
DVD_Assignment_reserved0 = 0,
|
384 |
DVD_Assignment_reserved1 = 1,
|
385 |
DVD_Assignment_LR = 2, // left right
|
386 |
DVD_Assignment_LRM = 3, // left right middle
|
387 |
DVD_Assignment_LR1 = 4, // left right audio1
|
388 |
DVD_Assignment_LRM1 = 5, // left right middle audio1
|
389 |
DVD_Assignment_LR12 = 6, // left right audio1 audio2
|
390 |
DVD_Assignment_LRM12 = 7 // left right middle audio1 audio2
|
391 |
} DVD_KARAOKE_ASSIGNMENT;
|
392 |
|
393 |
typedef struct tagDVD_KaraokeAttributes
|
394 |
{
|
395 |
BYTE bVersion;
|
396 |
BOOL fMasterOfCeremoniesInGuideVocal1;
|
397 |
BOOL fDuet; // false = solo
|
398 |
DVD_KARAOKE_ASSIGNMENT ChannelAssignment;
|
399 |
WORD wChannelContents[8]; // logical OR of DVD_KARAOKE_CONTENTS
|
400 |
} DVD_KaraokeAttributes;
|
401 |
|
402 |
typedef enum tagDVD_VIDEO_COMPRESSION
|
403 |
{
|
404 |
DVD_VideoCompression_Other = 0,
|
405 |
DVD_VideoCompression_MPEG1 = 1,
|
406 |
DVD_VideoCompression_MPEG2 = 2,
|
407 |
} DVD_VIDEO_COMPRESSION;
|
408 |
|
409 |
typedef struct tagDVD_VideoAttributes
|
410 |
{
|
411 |
BOOL fPanscanPermitted; // if a 4x3 display, can be shown as PanScan
|
412 |
BOOL fLetterboxPermitted; // if a 4x3 display, can be shown as Letterbox
|
413 |
ULONG ulAspectX; // 4x3 or 16x9
|
414 |
ULONG ulAspectY;
|
415 |
ULONG ulFrameRate; // 50hz or 60hz
|
416 |
ULONG ulFrameHeight; // 525 (60hz) or 625 (50hz)
|
417 |
DVD_VIDEO_COMPRESSION Compression;// MPEG1 or MPEG2
|
418 |
|
419 |
BOOL fLine21Field1InGOP; // true if there is user data in field 1 of GOP of video stream
|
420 |
BOOL fLine21Field2InGOP; // true if there is user data in field 1 of GOP of video stream
|
421 |
|
422 |
ULONG ulSourceResolutionX; // X source resolution (352,704, or 720)
|
423 |
ULONG ulSourceResolutionY; // Y source resolution (240,480, 288 or 576)
|
424 |
|
425 |
BOOL fIsSourceLetterboxed; // subpictures and highlights (e.g. subtitles or menu buttons) are only
|
426 |
// displayed in the active video area and cannot be displayed in the top/bottom 'black' bars
|
427 |
BOOL fIsFilmMode; // for 625/50hz systems, is film mode (true) or camera mode (false)
|
428 |
} DVD_VideoAttributes;
|
429 |
|
430 |
typedef enum tagDVD_SUBPICTURE_TYPE
|
431 |
{
|
432 |
DVD_SPType_NotSpecified = 0,
|
433 |
DVD_SPType_Language = 1,
|
434 |
DVD_SPType_Other = 2,
|
435 |
} DVD_SUBPICTURE_TYPE;
|
436 |
|
437 |
typedef enum tagDVD_SUBPICTURE_CODING
|
438 |
{
|
439 |
DVD_SPCoding_RunLength = 0,
|
440 |
DVD_SPCoding_Extended = 1,
|
441 |
DVD_SPCoding_Other = 2,
|
442 |
} DVD_SUBPICTURE_CODING;
|
443 |
|
444 |
typedef struct tagDVD_SubpictureAttributes
|
445 |
{
|
446 |
DVD_SUBPICTURE_TYPE Type;
|
447 |
DVD_SUBPICTURE_CODING CodingMode;
|
448 |
LCID Language;
|
449 |
DVD_SUBPICTURE_LANG_EXT LanguageExtension;
|
450 |
} DVD_SubpictureAttributes;
|
451 |
|
452 |
typedef enum tagDVD_TITLE_APPMODE
|
453 |
{
|
454 |
DVD_AppMode_Not_Specified = 0, // no special mode
|
455 |
DVD_AppMode_Karaoke = 1,
|
456 |
DVD_AppMode_Other = 3,
|
457 |
} DVD_TITLE_APPMODE;
|
458 |
|
459 |
typedef struct tagDVD_TitleMainAttributes
|
460 |
{
|
461 |
// for Titles
|
462 |
DVD_TITLE_APPMODE AppMode;
|
463 |
|
464 |
// Attributes about the 'main' video of the menu or title
|
465 |
DVD_VideoAttributes VideoAttributes;
|
466 |
|
467 |
ULONG ulNumberOfAudioStreams;
|
468 |
DVD_AudioAttributes AudioAttributes[8];
|
469 |
// present if the multichannel bit is set in the corresponding stream's audio attributes
|
470 |
DVD_MultichannelAudioAttributes MultichannelAudioAttributes[8];
|
471 |
|
472 |
ULONG ulNumberOfSubpictureStreams;
|
473 |
DVD_SubpictureAttributes SubpictureAttributes[32];
|
474 |
} DVD_TitleAttributes;
|
475 |
|
476 |
typedef struct tagDVD_MenuAttributes
|
477 |
{
|
478 |
// for VMG only
|
479 |
BOOL fCompatibleRegion[8]; // indeces 0..7 correspond to regions 1..8
|
480 |
|
481 |
// Attributes about the main menu (VMGM or VTSM)
|
482 |
DVD_VideoAttributes VideoAttributes;
|
483 |
|
484 |
BOOL fAudioPresent;
|
485 |
DVD_AudioAttributes AudioAttributes;
|
486 |
|
487 |
BOOL fSubpicturePresent;
|
488 |
DVD_SubpictureAttributes SubpictureAttributes;
|
489 |
} DVD_MenuAttributes;
|
490 |
|
491 |
//==========================================================================
|
492 |
//==========================================================================
|
493 |
// IDvdControl interface -- Basic DVD-Video playback control.
|
494 |
// This modeled after the app control of a player specified in Annex J
|
495 |
// of the DVD Video spec. IDvdInfo can be used to get information useful
|
496 |
// in using IDvdControl
|
497 |
//==========================================================================
|
498 |
//==========================================================================
|
499 |
|
500 |
[
|
501 |
object,
|
502 |
uuid(A70EFE61-E2A3-11d0-A9BE-00AA0061BE93),
|
503 |
pointer_default(unique)
|
504 |
]
|
505 |
|
506 |
interface IDvdControl : IUnknown {
|
507 |
import "unknwn.idl";
|
508 |
|
509 |
// TitlePlay
|
510 |
// Start playing the specified title number.
|
511 |
// Title numbers range between 1 and 99.
|
512 |
HRESULT TitlePlay
|
513 |
( [in] ULONG ulTitle
|
514 |
);
|
515 |
|
516 |
// ChapterPlay
|
517 |
// Start playing at the specified chapter (or part-of-title)
|
518 |
// within the specified title. Chapters range from 1 to 999.
|
519 |
HRESULT ChapterPlay
|
520 |
( [in] ULONG ulTitle,
|
521 |
[in] ULONG ulChapter
|
522 |
);
|
523 |
|
524 |
// TimePlay
|
525 |
// Start playing at the specified time within the specified title.
|
526 |
// NOTE: the actual start time will be the closest sync point before
|
527 |
// or equal to the specified frame number.
|
528 |
HRESULT TimePlay
|
529 |
( [in] ULONG ulTitle,
|
530 |
[in] ULONG bcdTime // use DVD_TIMECODE. Framerate code is ignored.
|
531 |
);
|
532 |
|
533 |
// StopForResume
|
534 |
// Stop playback after saving resume information. DVD Navigator transfers to the DVD "Stop State" and
|
535 |
// (same as DVD_DOMAIN_Stop), but filter graph remains in DirectShow's Run state.
|
536 |
HRESULT StopForResume();
|
537 |
|
538 |
// GoUp
|
539 |
// Start playback of the program chain currently authored as the "GoUp_PGCN".
|
540 |
HRESULT GoUp();
|
541 |
|
542 |
// TimeSearch
|
543 |
// Start playing at the specified time within the current title.
|
544 |
// NOTE: the actual start time will be the closest sync point before
|
545 |
// or equal to the specified frame number.
|
546 |
HRESULT TimeSearch
|
547 |
( [in] ULONG bcdTime // use DVD_TIMECODE. Framerate code is ignored.
|
548 |
);
|
549 |
|
550 |
// ChapterSearch
|
551 |
// Start playing at the specified chapter (or part-of-title) within
|
552 |
// the current title.
|
553 |
HRESULT ChapterSearch
|
554 |
( [in] ULONG ulChapter
|
555 |
);
|
556 |
|
557 |
// PrevPGSearch
|
558 |
// Start playing at the beginning of the previous DVD "program".
|
559 |
// For One-Sequential_PGC_Titles (which includes most titles) a program
|
560 |
// is equivalent to a chapter, otherwise a program is part of a chapter.
|
561 |
HRESULT PrevPGSearch();
|
562 |
|
563 |
// TopPGSearch
|
564 |
// Start playing from the beginning of they current program.
|
565 |
HRESULT TopPGSearch();
|
566 |
|
567 |
// NextPGSearch
|
568 |
// Start playing from the beginning of the next program.
|
569 |
HRESULT NextPGSearch();
|
570 |
|
571 |
// ForwardScan
|
572 |
// Set forward play at the specified speed.
|
573 |
// dwSpeed == 1 is normal play
|
574 |
// dwSpeed < 1 is slow play
|
575 |
// dwSpeed > 1 is fast play
|
576 |
// For dwSpeed != 1, audio and subpicture is muted.
|
577 |
HRESULT ForwardScan
|
578 |
( [in] double dwSpeed
|
579 |
);
|
580 |
|
581 |
// BackwardScan
|
582 |
// Set reverse play at the specified speed.
|
583 |
// dwSpeed == 1 is normal play speed in reverse
|
584 |
// dwSpeed < 1 is slow play in reverse
|
585 |
// dwSpeed > 1 is fast play in reverse
|
586 |
// For reverse play, audio and subpicture are always muted.
|
587 |
HRESULT BackwardScan
|
588 |
( [in] double dwSpeed
|
589 |
);
|
590 |
|
591 |
// MenuCall
|
592 |
// Start playback of the Menu specified by an enum DVD_MENU_ID.
|
593 |
HRESULT MenuCall
|
594 |
( [in] DVD_MENU_ID MenuID
|
595 |
);
|
596 |
|
597 |
// Resume
|
598 |
// Returns to title playback in DVD_DOMAIN_Title. This is typically
|
599 |
// done after MenuCall which puts the DVD Navigator in
|
600 |
// DVD_DOMAIN_VideoTitleSetMenu or DVD_DOMAIN_VideoManagerMenu.
|
601 |
HRESULT Resume();
|
602 |
|
603 |
// UpperButtonSelect
|
604 |
// Selects the button above the current button.
|
605 |
// "Selecting" a DVD button simply highlights the button but does
|
606 |
// not "Activate" the button. Selecting is the Windows equivalent
|
607 |
// to tabbing to a button but not pressing the space bar or enter key.
|
608 |
// Activating is the Windows equivalent of pressing the space bar or
|
609 |
// enter key after tabbing to a button.
|
610 |
HRESULT UpperButtonSelect();
|
611 |
|
612 |
// LowerButtonSelect
|
613 |
// Selects the button below the current button.
|
614 |
HRESULT LowerButtonSelect();
|
615 |
|
616 |
// LeftButtonSelect
|
617 |
// Selects the button to the left of the current button.
|
618 |
HRESULT LeftButtonSelect();
|
619 |
|
620 |
// RightButtonSelect
|
621 |
// Selects the button to the right of the current button.
|
622 |
HRESULT RightButtonSelect();
|
623 |
|
624 |
// ButtonActivate
|
625 |
// Activates current button.
|
626 |
HRESULT ButtonActivate();
|
627 |
|
628 |
// ButtonSelectAndActivate
|
629 |
// Selects and then activates the button specified by the user.
|
630 |
// ulButton is intended to be a number entered by a user corresponding
|
631 |
// to button numbers currently displayed on screen.
|
632 |
// Button numbers range from 1 to 36.
|
633 |
HRESULT ButtonSelectAndActivate
|
634 |
( [in] ULONG ulButton
|
635 |
);
|
636 |
|
637 |
// StillOff
|
638 |
// Releases any current still if there are no available buttons.
|
639 |
// This includes VOBU stills, Cell stills, and PGC stills, whether the
|
640 |
// still is infinite. When buttons are available, stills are released by
|
641 |
// activating a button. Note this does not release a Pause.
|
642 |
HRESULT StillOff();
|
643 |
|
644 |
// PauseOn
|
645 |
// Freezes playback and any internal timers. This is similar to
|
646 |
// IMediaControl::Pause()
|
647 |
HRESULT PauseOn();
|
648 |
|
649 |
// PauseOff
|
650 |
// Releases a Pause.
|
651 |
HRESULT PauseOff();
|
652 |
|
653 |
// MenuLanguageSelect
|
654 |
// Selects the default language for menus. Languages are specified with
|
655 |
// Windows standard LCIDs. LCIDs can be created from ISO-639 codes with
|
656 |
// MAKELCID( MAKELANGID(wISO639LangID ,SUBLANG_DEFAULT ), SORT_DEFAULT )
|
657 |
// NOTE: MAKELANGID seems to have a bug so 'jp' may have to be used
|
658 |
// instead of 'ja' for the ISO639 code for Japanese.
|
659 |
// MenuLanguageSelect may only called from the DVD Stop state (DVD_DOMAIN_Stop).
|
660 |
HRESULT MenuLanguageSelect
|
661 |
( [in] LCID Language
|
662 |
);
|
663 |
|
664 |
// AudioStreamChange
|
665 |
// Changes the current audio stream.
|
666 |
HRESULT AudioStreamChange
|
667 |
( [in] ULONG ulAudio
|
668 |
);
|
669 |
|
670 |
// SubpictureStreamChange
|
671 |
// Changes the current subpicture stream number to nSubpic, and toggles
|
672 |
// its display.
|
673 |
HRESULT SubpictureStreamChange
|
674 |
( [in] ULONG ulSubPicture,
|
675 |
[in] BOOL bDisplay
|
676 |
);
|
677 |
|
678 |
// AngleChange
|
679 |
// Changes the current angle number.
|
680 |
HRESULT AngleChange
|
681 |
( [in] ULONG ulAngle
|
682 |
);
|
683 |
|
684 |
// ParentalLevelSelect
|
685 |
// Selects the current player parental level between 1 and 8. The
|
686 |
// defined parental levels are listed below :
|
687 |
//
|
688 |
// Level Rating
|
689 |
// ----- ------
|
690 |
//
|
691 |
// 1 G
|
692 |
// 3 PG
|
693 |
// 4 PG13
|
694 |
// 6 R
|
695 |
// 7 NC17
|
696 |
// Higher levels can play lower level content; lower levels cannot play
|
697 |
// higher level content. The DVD Navigator provides no restriction on
|
698 |
// setting the parental level. DVD player application may enforce
|
699 |
// restriction on parental level setting, such as password protection for
|
700 |
// raising the current parental level. Parental Management is disabled in
|
701 |
// the Navigator by default.
|
702 |
//
|
703 |
// Note : To disable parental management, pass 0xffffffff for ulParentalLevel
|
704 |
// If parental management is disabled, then the player will play the
|
705 |
// first PGC in a parental block regardless of parental IDs.
|
706 |
//
|
707 |
HRESULT ParentalLevelSelect
|
708 |
( [in] ULONG ulParentalLevel
|
709 |
);
|
710 |
|
711 |
// ParentalCountrySelect
|
712 |
// Sets the country in which to interpret the the Parental Level.
|
713 |
// The country specified using the Alpha-2 code of the ISO-3166 standard,
|
714 |
// with the addition of 'ZZ'
|
715 |
HRESULT ParentalCountrySelect
|
716 |
( [in] WORD wCountry
|
717 |
);
|
718 |
|
719 |
// KaraokeAudioPresentationModeChange
|
720 |
// Sets the Karaoke audio mode.
|
721 |
// NOTE: This and all other Karoke support is currently not implemented.
|
722 |
HRESULT KaraokeAudioPresentationModeChange
|
723 |
( [in] ULONG ulMode
|
724 |
);
|
725 |
|
726 |
// VideoModePreferrence
|
727 |
// The user can specify the preferred display mode that should
|
728 |
// be used to display content. The parameter is a ULONG that has
|
729 |
// one of the values defined in DVD_PREFERRED_DISPLAY_MODE
|
730 |
HRESULT VideoModePreferrence
|
731 |
( [in] ULONG ulPreferredDisplayMode
|
732 |
);
|
733 |
|
734 |
// SetRoot
|
735 |
// Sets the root directory containing the DVD-Video volume.
|
736 |
// Can only be called from the DVD Stop State (DVD_DOMAIN_Stop).
|
737 |
// If the root directory is not successfully set before
|
738 |
// IMediaControl::Play is called, the first drive starting from c:
|
739 |
// containing a VIDEO_TS directory in the top level directory
|
740 |
// will be used as the root.
|
741 |
HRESULT SetRoot
|
742 |
( [in] LPCWSTR pszPath
|
743 |
);
|
744 |
|
745 |
// MouseActivate
|
746 |
// This is typically called in response to a mouse click.
|
747 |
// The specified point within the display window is to see if it is
|
748 |
// within a current DVD button's highlight rect. If it is, that
|
749 |
// button is first selected, then activated.
|
750 |
// NOTE: DVD Buttons do not all necessarily have highlight rects,
|
751 |
// button rects can overlap, and button rects do not always
|
752 |
// correspond to the visual representation of DVD buttons.
|
753 |
HRESULT MouseActivate // typically called after a mouse click
|
754 |
( [in] POINT point
|
755 |
);
|
756 |
|
757 |
// MouseSelect
|
758 |
// This is typically called in response to a mouse move within the
|
759 |
// display window.
|
760 |
// The specified point within the display window is to see if it is
|
761 |
// within a current DVD button's highlight rect. If it is, that
|
762 |
// button is selected.
|
763 |
// NOTE: DVD Buttons do not all necessarily have highlight rects,
|
764 |
// button rects can overlap, and button rects do not always
|
765 |
// correspond to the visual representation of DVD buttons.
|
766 |
HRESULT MouseSelect // typically called after a mouse move
|
767 |
( [in] POINT point
|
768 |
);
|
769 |
|
770 |
// ChapterPlayAutoStop
|
771 |
// Start playing at the specified chapter within the specified title
|
772 |
// and play the number of chapters specified by the third parameter.
|
773 |
// Chapters range from 1 to 999.
|
774 |
HRESULT ChapterPlayAutoStop
|
775 |
( [in] ULONG ulTitle, // title number
|
776 |
[in] ULONG ulChapter, // chapter number to start playback
|
777 |
[in] ULONG ulChaptersToPlay // number of chapters to play from the start chapter
|
778 |
);
|
779 |
}
|
780 |
|
781 |
|
782 |
|
783 |
//==========================================================================
|
784 |
//==========================================================================
|
785 |
// IDvdInfo interface -- allow an app to query for attributes of available
|
786 |
// DVD titles and DVD player status. Also allow for control of a DVD
|
787 |
// player beyond Annex J in the DVD spec.
|
788 |
//==========================================================================
|
789 |
//==========================================================================
|
790 |
|
791 |
[
|
792 |
object,
|
793 |
uuid(A70EFE60-E2A3-11d0-A9BE-00AA0061BE93),
|
794 |
pointer_default(unique)
|
795 |
]
|
796 |
|
797 |
interface IDvdInfo : IUnknown {
|
798 |
import "unknwn.idl";
|
799 |
|
800 |
// GetCurrentDomain
|
801 |
// Returns the current DVD Domain of the DVD player.
|
802 |
HRESULT GetCurrentDomain
|
803 |
( [out] DVD_DOMAIN *pDomain
|
804 |
);
|
805 |
|
806 |
// GetCurrentLocation
|
807 |
// Returns information sufficient to restart playback of a video
|
808 |
// from the current playback location in titles that don't explicitly
|
809 |
// disable seeking to the current location.
|
810 |
HRESULT GetCurrentLocation
|
811 |
( [out] DVD_PLAYBACK_LOCATION *pLocation
|
812 |
);
|
813 |
|
814 |
// GetTotalTitleTime
|
815 |
// Return the total playback time for the current title. Only works
|
816 |
// for One_Sequential_PGC_Titles.
|
817 |
HRESULT GetTotalTitleTime
|
818 |
( [out] ULONG * pulTotalTime // use DVD_TIMECODE.
|
819 |
);
|
820 |
|
821 |
// GetCurrentButton
|
822 |
// Indicates the number of currently available buttons and the current
|
823 |
// selected button number. If buttons are not present it returns 0 for
|
824 |
// both pulButtonsAvailable and pulCurrentButton
|
825 |
HRESULT GetCurrentButton
|
826 |
( [out] ULONG * pulButtonsAvailable,
|
827 |
[out] ULONG * pulCurrentButton
|
828 |
);
|
829 |
|
830 |
// GetCurrentAngle
|
831 |
// Indicates the number of currently available angles and the current
|
832 |
// selected angle number. If *pnAnglesAvailable==1, then the current
|
833 |
// video is not multiangle.
|
834 |
HRESULT GetCurrentAngle
|
835 |
( [out] ULONG * pulAnglesAvailable,
|
836 |
[out] ULONG * pulCurrentAngle
|
837 |
);
|
838 |
|
839 |
// GetCurrentAudio
|
840 |
// Indicates the number of currently available audio streams and
|
841 |
// the current selected audio stream number.
|
842 |
// This only work when in DVD_DOMAIN_Title.
|
843 |
HRESULT GetCurrentAudio
|
844 |
( [out] ULONG * pulStreamsAvailable,
|
845 |
[out] ULONG * pulCurrentStream
|
846 |
);
|
847 |
|
848 |
// GetCurrentSubpicture
|
849 |
// Indicates the number of currently available subpicture streams,
|
850 |
// the current selected subpicture stream number, and if the
|
851 |
// subpicture display is currently disabled. Subpicture streams
|
852 |
// authored as Forcedly Activated stream will be displayed even if
|
853 |
// subpicture display has been disabled by the app with
|
854 |
// IDVDControl::SubpictureChangeStream.
|
855 |
// This only work when in DVD_DOMAIN_Title.
|
856 |
HRESULT GetCurrentSubpicture
|
857 |
( [out] ULONG * pulStreamsAvailable,
|
858 |
[out] ULONG * pulCurrentStream,
|
859 |
[out] BOOL * pIsDisabled
|
860 |
);
|
861 |
|
862 |
// GetCurrentUOPS
|
863 |
// Indicates which IDVDControl methods are currently valid. DVD titles
|
864 |
// can enable or disable individual user operations at almost any point
|
865 |
// during playback.
|
866 |
HRESULT GetCurrentUOPS
|
867 |
( [out] VALID_UOP_SOMTHING_OR_OTHER * pUOP
|
868 |
);
|
869 |
|
870 |
// GetAllSPRMs
|
871 |
// Returns the current contents of all System Parameter Registers.
|
872 |
// See DVD-Video spec for use of individual registers.
|
873 |
HRESULT GetAllSPRMs
|
874 |
( [out] SPRMARRAY * pRegisterArray
|
875 |
);
|
876 |
|
877 |
// GetAllGPRMs
|
878 |
// Returns the current contents of all General Parameter Registers.
|
879 |
// Use of GPRMs is title specific.
|
880 |
HRESULT GetAllGPRMs
|
881 |
( [out] GPRMARRAY * pRegisterArray
|
882 |
);
|
883 |
|
884 |
// GetAudioLanguage
|
885 |
// Returns the language of the specified stream within the current
|
886 |
// title. Does not return languages for menus. Sets *pLanguage=0 if
|
887 |
// if the stream does not include language.
|
888 |
// Use GetLocaleInfo(*pLanguage, LOCALE_SENGLANGUAGE, pszString, cbSize)
|
889 |
// to create a human readable string name from the result LCID.
|
890 |
HRESULT GetAudioLanguage
|
891 |
( [in] ULONG ulStream,
|
892 |
[out] LCID * pLanguage
|
893 |
);
|
894 |
|
895 |
// GetSubpictureLanguage
|
896 |
// Returns the language of the specified stream within the current
|
897 |
// title. Does not return languages for menus. Sets *pLanguage=0 if
|
898 |
// if the stream does not include language.
|
899 |
// Use GetLocaleInfo(*pLanguage, LOCALE_SENGLANGUAGE, pszString, cbSize)
|
900 |
// to create a human readable string name from the result LCID.
|
901 |
HRESULT GetSubpictureLanguage
|
902 |
( [in] ULONG ulStream,
|
903 |
[out] LCID * pLanguage
|
904 |
);
|
905 |
|
906 |
// GetTitleAttributes
|
907 |
// Returns attributes of all video, audio, and subpicture
|
908 |
// streams for the specified title including menus.
|
909 |
// If nTitle == 0xffffffff, attributes for the current title are returned.
|
910 |
HRESULT GetTitleAttributes
|
911 |
( [in] ULONG ulTitle, // requested title number
|
912 |
[out] DVD_ATR * pATR
|
913 |
);
|
914 |
|
915 |
// GetVMGAttributes
|
916 |
// Returns attributes of all video, audio, and subpicture
|
917 |
// streams for Video Manager Menus. Some menus, such as the DVD_MENU_Title
|
918 |
// are in a separate group of streams called the VMG (Video Manager) and
|
919 |
// are not associated with any particular title number.
|
920 |
HRESULT GetVMGAttributes
|
921 |
( [out] DVD_ATR * pATR
|
922 |
);
|
923 |
|
924 |
// GetCurrentVideoAttributes
|
925 |
// Returns the video attributes for the current title or menu.
|
926 |
HRESULT GetCurrentVideoAttributes
|
927 |
( [out] DVD_VideoATR *pATR
|
928 |
);
|
929 |
|
930 |
// GetCurrentAudioAttributes
|
931 |
// Returns the video attributes for the stream in the current
|
932 |
// title or menu.
|
933 |
HRESULT GetCurrentAudioAttributes
|
934 |
( [out] DVD_AudioATR *pATR
|
935 |
);
|
936 |
|
937 |
// GetCurrentSubpictureAttributes
|
938 |
// Returns the video attributes for the stream in the current
|
939 |
// title or menu.
|
940 |
HRESULT GetCurrentSubpictureAttributes
|
941 |
( [out] DVD_SubpictureATR *pATR
|
942 |
);
|
943 |
|
944 |
|
945 |
// GetCurrentVolumeInfo
|
946 |
// Returns current DVD volume info.
|
947 |
HRESULT GetCurrentVolumeInfo
|
948 |
( [out] ULONG *pulNumOfVol, // number of volumes (disc sides?) in a volume set
|
949 |
[out] ULONG *pulThisVolNum, // volume number for this root directory
|
950 |
[out] DVD_DISC_SIDE *pSide, // current disc side
|
951 |
[out] ULONG *pulNumOfTitles // number of titles available in this volume
|
952 |
);
|
953 |
|
954 |
|
955 |
// GetDVDTextInfo
|
956 |
// Returns the TXTDT_MG structure, which can contain text descriptions for title
|
957 |
// name, volume name, producer name, vocalist name, etc. in various languages.
|
958 |
// refer to Section 4.1.6 and Annex A of the DVD-Video spec.
|
959 |
// If the buffer size passed in is insufficient (for example if cbBufSize==0),
|
960 |
// then E_OUTOFMEMORY is returned, and *pcbActualSize is set to the required size.
|
961 |
HRESULT GetDVDTextInfo
|
962 |
( [out, size_is(ulBufSize)] BYTE *pTextManager,
|
963 |
[in] ULONG ulBufSize, // buffer size passed in
|
964 |
[out] ULONG *pulActualSize // amount of actual data return
|
965 |
);
|
966 |
|
967 |
// GetPlayerParentalLevel
|
968 |
// Returns the current parental level and the current country code
|
969 |
// that has been set in the system registers in player.
|
970 |
// See Table 3.3.4-1 of the DVD-Video spec for the defined parental levels.
|
971 |
// Valid Parental Levels = 1..8 if parental management is enabled
|
972 |
// 0xffffffff if parental management is disabled
|
973 |
// See ISO3166 : Alpha-2 Code for the country codes.
|
974 |
HRESULT GetPlayerParentalLevel
|
975 |
( [out] ULONG *pulParentalLevel, // current parental level
|
976 |
[out] ULONG *pulCountryCode // current country code
|
977 |
);
|
978 |
|
979 |
// GetNumberOfChapters
|
980 |
// Returns the number of chapters that are defined for a
|
981 |
// given title.
|
982 |
HRESULT GetNumberOfChapters
|
983 |
( [in] ULONG ulTitle, // Title for which number of chapters is requested
|
984 |
[out] ULONG *pulNumberOfChapters // Number of chapters for the specified title
|
985 |
);
|
986 |
|
987 |
// GetTitleParentalLevels
|
988 |
// Returns the parental levels that are defined for a
|
989 |
// particular title. pParentalLevels will be combination
|
990 |
// of DVD_PARENTAL_LEVEL_8, DVD_PARENTAL_LEVEL_6, or
|
991 |
// DVD_PARENTAL_LEVEL_1 "OR"ed together
|
992 |
HRESULT GetTitleParentalLevels
|
993 |
( [in] ULONG ulTitle, // Title for which parental levels are requested
|
994 |
[out] ULONG *pulParentalLevels // Parental levels defined for the title "OR"ed together
|
995 |
);
|
996 |
|
997 |
// GetRoot
|
998 |
// Returns the root directory that is set in the player. If a valid root
|
999 |
// has been found, it returns the root string. Otherwise, it returns 0 for
|
1000 |
// pcbActualSize indicating that a valid root directory has not been found
|
1001 |
// or initialized.
|
1002 |
//
|
1003 |
// !!! used to return LPTSTR. interface was changed to return
|
1004 |
// LPSTR (ansi) for compatibility. COM APIs should pass with
|
1005 |
// UNICODE strings only.
|
1006 |
//
|
1007 |
HRESULT GetRoot
|
1008 |
( [out, size_is(ulBufSize)] LPSTR pRoot, // pointer to buffer to get root string
|
1009 |
[in] ULONG ulBufSize, // size of buffer passed in
|
1010 |
[out] ULONG *pulActualSize // size of actual data returned
|
1011 |
);
|
1012 |
}
|
1013 |
|
1014 |
//==========================================================================
|
1015 |
//==========================================================================
|
1016 |
// IDvdCmd interface -- the IDVDControl2 command sequencing object.
|
1017 |
//
|
1018 |
// For the IDVDControl2 interface, the application can track the status of
|
1019 |
// commands that have been issued to the navigator. Each command is identified
|
1020 |
// by an IDvdCmd object. The IDvdCmd object stores the results of the command
|
1021 |
// at both the start (when the command has begun processing) and the end after
|
1022 |
// it has completed. It also allows the app to synchronize with the processing
|
1023 |
// of the command.
|
1024 |
//
|
1025 |
// The command object also allows the app to uniquely identify and correlate
|
1026 |
// completion events (if it prefers to process events in a message loop instead
|
1027 |
// of creating another process).
|
1028 |
//
|
1029 |
// Allows the app to track the status of an issued command to the nav.
|
1030 |
//==========================================================================
|
1031 |
//==========================================================================
|
1032 |
|
1033 |
[
|
1034 |
object,
|
1035 |
uuid(5a4a97e4-94ee-4a55-9751-74b5643aa27d),
|
1036 |
pointer_default(unique)
|
1037 |
]
|
1038 |
|
1039 |
interface IDvdCmd : IUnknown {
|
1040 |
import "unknwn.idl";
|
1041 |
|
1042 |
//
|
1043 |
// WaitForStart
|
1044 |
//
|
1045 |
// Blocks the application until the command has begun.
|
1046 |
//
|
1047 |
HRESULT WaitForStart();
|
1048 |
|
1049 |
//
|
1050 |
// WaitForEnd
|
1051 |
//
|
1052 |
// Blocks until the command has completed or has been cancelled.
|
1053 |
HRESULT WaitForEnd();
|
1054 |
}
|
1055 |
|
1056 |
//==========================================================================
|
1057 |
//==========================================================================
|
1058 |
// IDvdState interface -- the State state object.
|
1059 |
//
|
1060 |
// Whenever the application wishes to save or restore a location on the disc,
|
1061 |
// it needs to store the DVD state into an object.
|
1062 |
// The State object supports the IPersistStream
|
1063 |
//
|
1064 |
//==========================================================================
|
1065 |
//==========================================================================
|
1066 |
|
1067 |
[
|
1068 |
object,
|
1069 |
uuid(86303d6d-1c4a-4087-ab42-f711167048ef),
|
1070 |
pointer_default(unique)
|
1071 |
]
|
1072 |
|
1073 |
interface IDvdState : IUnknown
|
1074 |
{
|
1075 |
//
|
1076 |
// GetDiscID
|
1077 |
//
|
1078 |
// Returns the disc ID from which the bookmark was made.
|
1079 |
//
|
1080 |
HRESULT GetDiscID
|
1081 |
( [out] ULONGLONG* pullUniqueID ); // 64-bit unique id for the disc
|
1082 |
|
1083 |
//
|
1084 |
// GetParentalLevel
|
1085 |
//
|
1086 |
// Returns the state's parental level
|
1087 |
//
|
1088 |
HRESULT GetParentalLevel
|
1089 |
( [out] ULONG* pulParentalLevel );
|
1090 |
}
|
1091 |
|
1092 |
//==========================================================================
|
1093 |
//==========================================================================
|
1094 |
// IDvdControl2 interface -- Basic DVD-Video playback control.
|
1095 |
// This is modeled after the app control of a player specified in Annex J
|
1096 |
// of the DVD Video spec. IDvdInfo2 can be used to get information useful
|
1097 |
// in using IDvdControl2
|
1098 |
//==========================================================================
|
1099 |
//==========================================================================
|
1100 |
|
1101 |
[
|
1102 |
object,
|
1103 |
uuid(33BC7430-EEC0-11D2-8201-00A0C9D74842),
|
1104 |
pointer_default(unique)
|
1105 |
]
|
1106 |
|
1107 |
interface IDvdControl2 : IUnknown {
|
1108 |
import "unknwn.idl";
|
1109 |
|
1110 |
// PlayTitle
|
1111 |
//
|
1112 |
// Start playing from the beginning of the specified title number.
|
1113 |
// Annex J: Title_Play
|
1114 |
// Title numbers range between 1 and 99.
|
1115 |
HRESULT PlayTitle
|
1116 |
( [in] ULONG ulTitle,
|
1117 |
[in] DWORD dwFlags,
|
1118 |
[out] IDvdCmd** ppCmd
|
1119 |
);
|
1120 |
|
1121 |
// PlayChapterInTitle
|
1122 |
//
|
1123 |
// Start playing from the beginning of the given chapter (or part-of-title) number
|
1124 |
// within the specified title number.
|
1125 |
// Annex J: PTT_Play
|
1126 |
// Title numbers range between 1 and 99.
|
1127 |
// Chapters range from 1 to 999.
|
1128 |
HRESULT PlayChapterInTitle
|
1129 |
( [in] ULONG ulTitle,
|
1130 |
[in] ULONG ulChapter,
|
1131 |
[in] DWORD dwFlags,
|
1132 |
[out] IDvdCmd** ppCmd
|
1133 |
);
|
1134 |
|
1135 |
// PlayAtTimeInTitle
|
1136 |
//
|
1137 |
// Start playing from the specified time within the specified title number.
|
1138 |
// NOTE: the actual start time will be the closest sync point before
|
1139 |
// or equal to the specified frame number.
|
1140 |
// Annex J: Time_Play
|
1141 |
// Title numbers range between 1 and 99.
|
1142 |
HRESULT PlayAtTimeInTitle
|
1143 |
( [in] ULONG ulTitle,
|
1144 |
[in] DVD_HMSF_TIMECODE* pStartTime,
|
1145 |
[in] DWORD dwFlags,
|
1146 |
[out] IDvdCmd** ppCmd
|
1147 |
);
|
1148 |
|
1149 |
// Stop
|
1150 |
// Stop playback by transferring DVD Navigator to the DVD "Stop State" (same
|
1151 |
// as DVD_DOMAIN_Stop), but filter graph remains in DirectShow's Run state.
|
1152 |
// Annex J: Stop
|
1153 |
HRESULT Stop();
|
1154 |
|
1155 |
// ReturnFromSubmenu
|
1156 |
//
|
1157 |
// Stop playback of current program chain (PGC) and start playing the PGC
|
1158 |
// specified by "GoUp_PGCN".in the PGCI.
|
1159 |
// If the GoUp_PGCN value is 0xFFFF the Resume() operation is carried out.
|
1160 |
// Annex J: GoUp
|
1161 |
HRESULT ReturnFromSubmenu(
|
1162 |
[in] DWORD dwFlags,
|
1163 |
[out] IDvdCmd** ppCmd );
|
1164 |
|
1165 |
// PlayAtTime
|
1166 |
// Start playing at the specified time within the current title.
|
1167 |
// NOTE: the actual start time will be the closest sync point before
|
1168 |
// or equal to the specified frame number.
|
1169 |
// Annex J: Time_Search
|
1170 |
// The time is in BCD format, passed in as a ULONG.
|
1171 |
HRESULT PlayAtTime
|
1172 |
( [in] DVD_HMSF_TIMECODE* pTime,
|
1173 |
[in] DWORD dwFlags,
|
1174 |
[out] IDvdCmd** ppCmd
|
1175 |
);
|
1176 |
|
1177 |
// PlayChapter
|
1178 |
// Start playing at the specified chapter (or part-of-title) within
|
1179 |
// the current title.
|
1180 |
// Annex J: PTT_Search
|
1181 |
// Chapters range from 1 to 999.
|
1182 |
HRESULT PlayChapter
|
1183 |
( [in] ULONG ulChapter,
|
1184 |
[in] DWORD dwFlags,
|
1185 |
[out] IDvdCmd** ppCmd
|
1186 |
);
|
1187 |
|
1188 |
// PlayPrevChapter
|
1189 |
// Start playing at the beginning of the previous DVD "program".
|
1190 |
// For One-Sequential_PGC_Titles (which includes most titles) a program
|
1191 |
// is equivalent to a chapter, otherwise a program is part of a chapter.
|
1192 |
// Annex J: PrevPG_Search
|
1193 |
HRESULT PlayPrevChapter(
|
1194 |
[in] DWORD dwFlags,
|
1195 |
[out] IDvdCmd** ppCmd );
|
1196 |
|
1197 |
// ReplayChapter
|
1198 |
// Start playing from the beginning of they current program.
|
1199 |
// Annex J: TopPG_Search
|
1200 |
HRESULT ReplayChapter(
|
1201 |
[in] DWORD dwFlags,
|
1202 |
[out] IDvdCmd** ppCmd );
|
1203 |
|
1204 |
// PlayNextChapter
|
1205 |
// Start playing from the beginning of the next program.
|
1206 |
// Annex J: NextPG_Search
|
1207 |
HRESULT PlayNextChapter(
|
1208 |
[in] DWORD dwFlags,
|
1209 |
[out] IDvdCmd** ppCmd );
|
1210 |
|
1211 |
// PlayForwards
|
1212 |
// Set forward play at the specified speed.
|
1213 |
// Annex J: Forward_Scan
|
1214 |
// dSpeed == 1 is normal play
|
1215 |
// dSpeed < 1 is slow play
|
1216 |
// dSpeed > 1 is fast play
|
1217 |
// For dSpeed != 1, audio and subpicture is muted.
|
1218 |
HRESULT PlayForwards
|
1219 |
( [in] double dSpeed,
|
1220 |
[in] DWORD dwFlags,
|
1221 |
[out] IDvdCmd** ppCmd
|
1222 |
);
|
1223 |
|
1224 |
// PlayBackwards
|
1225 |
// Set reverse play at the specified speed.
|
1226 |
// Annex J: Backward_Scan
|
1227 |
// dSpeed == 1 is normal play speed in reverse
|
1228 |
// dSpeed < 1 is slow play in reverse
|
1229 |
// dSpeed > 1 is fast play in reverse
|
1230 |
// For reverse play, audio and subpicture are always muted.
|
1231 |
HRESULT PlayBackwards
|
1232 |
( [in] double dSpeed,
|
1233 |
[in] DWORD dwFlags,
|
1234 |
[out] IDvdCmd** ppCmd
|
1235 |
);
|
1236 |
|
1237 |
// ShowMenu
|
1238 |
// Start playback of the Menu specified by an enum DVD_MENU_ID.
|
1239 |
// Annex J: Menu_Call
|
1240 |
HRESULT ShowMenu
|
1241 |
( [in] DVD_MENU_ID MenuID,
|
1242 |
[in] DWORD dwFlags,
|
1243 |
[out] IDvdCmd** ppCmd
|
1244 |
);
|
1245 |
|
1246 |
// Resume
|
1247 |
// Returns to title playback in DVD_DOMAIN_Title. This is typically
|
1248 |
// done after MenuCall which puts the DVD Navigator in
|
1249 |
// DVD_DOMAIN_VideoTitleSetMenu or DVD_DOMAIN_VideoManagerMenu.
|
1250 |
// Annex J: Resume
|
1251 |
HRESULT Resume(
|
1252 |
[in] DWORD dwFlags,
|
1253 |
[out] IDvdCmd** ppCmd );
|
1254 |
|
1255 |
// SelectRelativeButton
|
1256 |
// Moves the selection highlight above, below, to the left of, or to the right of the
|
1257 |
// currently selected.
|
1258 |
// "Selecting" a DVD button simply highlights the button but does
|
1259 |
// not "Activate" the button. Selecting is the Windows equivalent
|
1260 |
// to tabbing to a button but not pressing the space bar or enter key.
|
1261 |
// Activating is the Windows equivalent of pressing the space bar or
|
1262 |
// enter key after tabbing to a button.
|
1263 |
// Annex J: Upper_button_Select, Lower_button_Select, Left_button_Select, Right_button_Select
|
1264 |
HRESULT SelectRelativeButton( DVD_RELATIVE_BUTTON buttonDir );
|
1265 |
|
1266 |
// ActivateButton
|
1267 |
// Activates current button.
|
1268 |
// Annex J: Button_Activate
|
1269 |
HRESULT ActivateButton();
|
1270 |
|
1271 |
// SelectButton
|
1272 |
// Selects a specific button (with the index from 1 to 36).
|
1273 |
// ulButton is intended to be a number entered by a user corresponding
|
1274 |
// to button numbers currently displayed on screen.
|
1275 |
// Button numbers range from 1 to 36.
|
1276 |
HRESULT SelectButton
|
1277 |
( [in] ULONG ulButton
|
1278 |
);
|
1279 |
|
1280 |
// SelectAndActivateButton
|
1281 |
// Selects and then activates the button specified by the user.
|
1282 |
// ulButton is intended to be a number entered by a user corresponding
|
1283 |
// to button numbers currently displayed on screen.
|
1284 |
// Annex J: Button_Select_And_Activate
|
1285 |
// Button numbers range from 1 to 36.
|
1286 |
HRESULT SelectAndActivateButton
|
1287 |
( [in] ULONG ulButton
|
1288 |
);
|
1289 |
|
1290 |
// StillOff
|
1291 |
// Releases any current still if there are no available buttons.
|
1292 |
// This includes VOBU stills, Cell stills, and PGC stills, whether the
|
1293 |
// still is infinite. When buttons are available, stills are released by
|
1294 |
// activating a button. Note this does not release a Pause.
|
1295 |
// Annex J: Still_Off
|
1296 |
HRESULT StillOff();
|
1297 |
|
1298 |
// Pause
|
1299 |
// Freezes / unfreezes playback and any internal timers. This is similar to
|
1300 |
// IMediaControl::Pause(), but not the same in effect as IMediaControl::Pause
|
1301 |
// puts the filter (all filters, if done to the graph) in paused state.
|
1302 |
// Annex J: Pause_On and Pause_Off
|
1303 |
// bState is TRUE or FALSE to indicate whether to do Puase_on/Pause_Off according
|
1304 |
// to Annex J terminology.
|
1305 |
HRESULT Pause
|
1306 |
( [in] BOOL bState
|
1307 |
);
|
1308 |
|
1309 |
// SelectAudioStream
|
1310 |
// Changes the current audio stream to ulAudio.
|
1311 |
// Annex J: Audio_Stream_Change
|
1312 |
// Audio stream number ranges between 0 and 7 or DEFAULT_AUDIO_STREAM (15 - default based on default language & language extension)
|
1313 |
HRESULT SelectAudioStream
|
1314 |
( [in] ULONG ulAudio,
|
1315 |
[in] DWORD dwFlags,
|
1316 |
[out] IDvdCmd** ppCmd
|
1317 |
|
1318 |
);
|
1319 |
|
1320 |
// SelectSubpictureStream
|
1321 |
// Changes the current subpicture stream number to ulSubPicture
|
1322 |
// Annex J: Sub-picture_Stream_Change (first param)
|
1323 |
// Subpicture stream number should be between 0 and 31 or 63.
|
1324 |
HRESULT SelectSubpictureStream
|
1325 |
( [in] ULONG ulSubPicture,
|
1326 |
[in] DWORD dwFlags,
|
1327 |
[out] IDvdCmd** ppCmd
|
1328 |
|
1329 |
);
|
1330 |
|
1331 |
// SetSubpictureState
|
1332 |
// Turns on/off current subpicture stream display.
|
1333 |
// Annex J: Sub-picture_Stream_Change (second param)
|
1334 |
// Subpicture state is On or Off (TRUE or FALSE)
|
1335 |
HRESULT SetSubpictureState
|
1336 |
( [in] BOOL bState,
|
1337 |
[in] DWORD dwFlags,
|
1338 |
[out] IDvdCmd** ppCmd
|
1339 |
);
|
1340 |
|
1341 |
// SelectAngle
|
1342 |
// Changes the current angle number.
|
1343 |
// Annex J: Angle_Change
|
1344 |
// Angle number is between 1 and 9.
|
1345 |
HRESULT SelectAngle
|
1346 |
( [in] ULONG ulAngle,
|
1347 |
[in] DWORD dwFlags,
|
1348 |
[out] IDvdCmd** ppCmd
|
1349 |
);
|
1350 |
|
1351 |
// SelectParentalLevel
|
1352 |
// Selects the current player parental level.
|
1353 |
// Annex J: Parental_Level_Select
|
1354 |
// Parental level ranges between 1 and 8.
|
1355 |
// The defined parental levels are listed below :
|
1356 |
//
|
1357 |
// Level Rating
|
1358 |
// ----- ------
|
1359 |
// 1 G
|
1360 |
// 3 PG
|
1361 |
// 4 PG13
|
1362 |
// 6 R
|
1363 |
// 7 NC17
|
1364 |
// Higher levels can play lower level content; lower levels cannot play
|
1365 |
// higher level content. The DVD Navigator provides no restriction on
|
1366 |
// setting the parental level. DVD player application may enforce
|
1367 |
// restriction on parental level setting, such as password protection for
|
1368 |
// raising the current parental level. Parental Management is disabled in
|
1369 |
// the Navigator by default.
|
1370 |
//
|
1371 |
// Note : To disable parental management, pass 0xffffffff for ulParentalLevel
|
1372 |
// If parental management is disabled, then the player will play the
|
1373 |
// first PGC in a parental block regardless of parental IDs.
|
1374 |
//
|
1375 |
HRESULT SelectParentalLevel
|
1376 |
( [in] ULONG ulParentalLevel
|
1377 |
);
|
1378 |
|
1379 |
// SelectParentalCountry
|
1380 |
// Sets the country in which to interpret the Parental Level.
|
1381 |
// Annex J: Parental_Country_Select
|
1382 |
// The country specified using the Alpha-2 code of the ISO-3166 standard,
|
1383 |
HRESULT SelectParentalCountry
|
1384 |
( [in] BYTE bCountry[2]
|
1385 |
);
|
1386 |
|
1387 |
// SelectKaraokeAudioPresentationMode
|
1388 |
// Sets the Karaoke audio mode.
|
1389 |
// Annex J: Karaoke_Audio_Presentation_Mode_Change
|
1390 |
// NOTE: This and all other Karoke support is currently not implemented.
|
1391 |
// Mode represents the audio mixing mode for Karaoke (same info as SPRM11).
|
1392 |
// Use a bitwise OR of the bits in DVD_KARAOKE_DOWNMIX
|
1393 |
HRESULT SelectKaraokeAudioPresentationMode
|
1394 |
( [in] ULONG ulMode
|
1395 |
);
|
1396 |
|
1397 |
// SelectVideoModePreference
|
1398 |
// The user can specify the (initial) preferred display mode (aspect ratio)
|
1399 |
// (wide / letterbox / pan-scan) that should be used to display content
|
1400 |
// (16 : 9).
|
1401 |
// Annex J: Video_Presentation_Mode_Change
|
1402 |
// The parameter is a ULONG that has one of the values defined in
|
1403 |
// DVD_PREFERRED_DISPLAY_MODE
|
1404 |
HRESULT SelectVideoModePreference
|
1405 |
( [in] ULONG ulPreferredDisplayMode
|
1406 |
);
|
1407 |
|
1408 |
// SetDVDDirectory
|
1409 |
// Sets the root directory containing the DVD-Video volume.
|
1410 |
// Can only be called from the DVD Stop State (DVD_DOMAIN_Stop).
|
1411 |
// If the root directory is not successfully set before
|
1412 |
// IMediaControl::Play is called, the first drive starting from c:
|
1413 |
// containing a VIDEO_TS directory in the top level directory
|
1414 |
// will be used as the root.
|
1415 |
HRESULT SetDVDDirectory
|
1416 |
( [in] LPCWSTR pszwPath
|
1417 |
);
|
1418 |
|
1419 |
// ActivateAtPosition
|
1420 |
// This is typically called in response to a mouse click.
|
1421 |
// The specified point within the display window is to see if it is
|
1422 |
// within a current DVD button's highlight rect. If it is, that
|
1423 |
// button is first selected, then activated.
|
1424 |
// NOTE: DVD Buttons do not all necessarily have highlight rects,
|
1425 |
// button rects can overlap, and button rects do not always
|
1426 |
// correspond to the visual representation of DVD buttons.
|
1427 |
HRESULT ActivateAtPosition // typically called after a mouse click
|
1428 |
( [in] POINT point
|
1429 |
);
|
1430 |
|
1431 |
// SelectAtPosition
|
1432 |
// This is typically called in response to a mouse move within the
|
1433 |
// display window.
|
1434 |
// The specified point within the display window is to see if it is
|
1435 |
// within a current DVD button's highlight rect. If it is, that
|
1436 |
// button is selected.
|
1437 |
// NOTE: DVD Buttons do not all necessarily have highlight rects,
|
1438 |
// button rects can overlap, and button rects do not always
|
1439 |
// correspond to the visual representation of DVD buttons.
|
1440 |
HRESULT SelectAtPosition // typically called after a mouse move
|
1441 |
( [in] POINT point
|
1442 |
);
|
1443 |
|
1444 |
// PlayChaptersAutoStop
|
1445 |
// Start playing at the specified chapter within the specified title
|
1446 |
// and play the number of chapters specified by the third parameter.
|
1447 |
// Then the playback stops by sending an event EC_DVD_CHAPTER_AUTOSTOP.
|
1448 |
// Title ranges from 1 to 99.
|
1449 |
// Chapter (and number of chapters to play) ranges from 1 to 999.
|
1450 |
HRESULT PlayChaptersAutoStop
|
1451 |
( [in] ULONG ulTitle, // title number
|
1452 |
[in] ULONG ulChapter, // chapter number to start playback
|
1453 |
[in] ULONG ulChaptersToPlay, // number of chapters to play from the start chapter
|
1454 |
[in] DWORD dwFlags,
|
1455 |
[out] IDvdCmd** ppCmd
|
1456 |
);
|
1457 |
|
1458 |
// AcceptParentalLevelChange
|
1459 |
//
|
1460 |
// Application's way of informing the Navigator that the required parental
|
1461 |
// level change indicated through a previous event was accepted or rejected
|
1462 |
// by the app (and unblock the Navigator).
|
1463 |
//
|
1464 |
// FALSE - reject the disc's request to change the current parental level.
|
1465 |
// TRUE - change the parental level as required by the disc.
|
1466 |
HRESULT AcceptParentalLevelChange
|
1467 |
( [in] BOOL bAccept
|
1468 |
);
|
1469 |
|
1470 |
// SetOption(flag, true/false )
|
1471 |
// Flags:
|
1472 |
//
|
1473 |
// DVD_ResetOnStop
|
1474 |
// Disable reset of the Navigator's internal state on the
|
1475 |
// subsequent IMediaControl::Stop() call(s).
|
1476 |
//
|
1477 |
// FALSE - Navigator does not reset its state on the subsequent Stop calls
|
1478 |
// (play from the current location on next Run call).
|
1479 |
// TRUE - (default) Navigator resets its state on the subsequent Stop call
|
1480 |
// (play from the first play PGC on the Run call after the Stop).
|
1481 |
//
|
1482 |
// DVD_NotifyParentalLevelChange
|
1483 |
//
|
1484 |
// Allows the application to indicate to the Navigator that it wants to control
|
1485 |
// parent level change (e.g., through a dialog box) and indicate the acceptance
|
1486 |
// or rejection of the new parental level to the Navigator through
|
1487 |
// AcceptParentalLevelChange().
|
1488 |
//
|
1489 |
// FALSE - disable (default). Always reject request by the disc to change parental level.
|
1490 |
// TRUE - enable. Navigator will send the app a 'EC_DVD_PARENTAL_LEVEL_CHANGE' event
|
1491 |
// and block until AcceptParentalLevelChange() is called by the app.
|
1492 |
//
|
1493 |
// DVD_HMSF_TimeCodeEvents
|
1494 |
//
|
1495 |
// Lets the application specify to the Navigator if it wants to get the new time
|
1496 |
// event EC_DVD_CURRENT_HMSF_TIME with the HMSF format rather than the older
|
1497 |
// EC_DVD_CURRENT_TIME events.
|
1498 |
//
|
1499 |
// FALSE - disable (default). Older EC_DVD_CURRENT_TIME events are returned.
|
1500 |
// TRUE - enable. Navigator will send the app EC_DVD_CURRENT_HMSF_TIME events.
|
1501 |
|
1502 |
HRESULT SetOption
|
1503 |
( [in] DVD_OPTION_FLAG flag,
|
1504 |
[in] BOOL fState
|
1505 |
);
|
1506 |
|
1507 |
// SetState
|
1508 |
//
|
1509 |
// The navigator will use the location information in the given state object to restore
|
1510 |
// the navigator's position to a specific location on the disc.
|
1511 |
// A valid state object is returned by either calling GetState(), or by using
|
1512 |
// "CoCreateInstance( CLSID_DVDState, NULL, CLSCTX_INPROC_SERVER, IID_IDvdState, (void **) ppState )"
|
1513 |
// to create a state object, followed by pState->IPersist::Load() to read it from memory or disk.
|
1514 |
//
|
1515 |
HRESULT SetState
|
1516 |
( [in] IDvdState* pState,
|
1517 |
[in] DWORD dwFlags,
|
1518 |
[out] IDvdCmd** ppCmd
|
1519 |
|
1520 |
);
|
1521 |
|
1522 |
// PlayPeriodInTitleAutoStop
|
1523 |
//
|
1524 |
// Start playing from the specified time within the specified title number until the specified end time.
|
1525 |
// NOTE: the actual start and end times will be the closest sync points before
|
1526 |
// or equal to the specified frame number.
|
1527 |
// Annex J: Time_Play for a limited range
|
1528 |
// Title numbers range between 1 and 99.
|
1529 |
HRESULT PlayPeriodInTitleAutoStop
|
1530 |
( [in] ULONG ulTitle,
|
1531 |
[in] DVD_HMSF_TIMECODE* pStartTime,
|
1532 |
[in] DVD_HMSF_TIMECODE* pEndTime,
|
1533 |
[in] DWORD dwFlags,
|
1534 |
[out] IDvdCmd** ppCmd
|
1535 |
);
|
1536 |
|
1537 |
// SetGPRM
|
1538 |
// Sets the current contents of a DVD General Parameter Register.
|
1539 |
// Use of GPRMs is title specific.
|
1540 |
|
1541 |
HRESULT SetGPRM
|
1542 |
( [in] ULONG ulIndex,
|
1543 |
[in] WORD wValue,
|
1544 |
[in] DWORD dwFlags,
|
1545 |
[out] IDvdCmd** ppCmd
|
1546 |
);
|
1547 |
|
1548 |
// SelectDefaultMenuLanguage
|
1549 |
// Selects the default language for menus.
|
1550 |
// Languages are specified with Windows standard LCIDs. LCIDs can be created
|
1551 |
// from ISO-639 codes with
|
1552 |
// MAKELCID( MAKELANGID(wISO639LangID ,SUBLANG_DEFAULT ), SORT_DEFAULT ).
|
1553 |
// SelectMenuLanguage may only called from the DVD Stop state (DVD_DOMAIN_Stop).
|
1554 |
// Annex J: Menu_Language_Select
|
1555 |
//
|
1556 |
// NOT TRUE ANYMORE:
|
1557 |
// NOTE: MAKELANGID seems to have a bug so 'jp' may have to be used
|
1558 |
// instead of 'ja' for the ISO639 code for Japanese.
|
1559 |
HRESULT SelectDefaultMenuLanguage
|
1560 |
( [in] LCID Language
|
1561 |
);
|
1562 |
|
1563 |
// SelectDefaultAudioLanguage
|
1564 |
// Selects the default audio language.
|
1565 |
// Languages are specified with Windows standard LCIDs.
|
1566 |
HRESULT SelectDefaultAudioLanguage
|
1567 |
( [in] LCID Language,
|
1568 |
[in] DVD_AUDIO_LANG_EXT audioExtension
|
1569 |
);
|
1570 |
|
1571 |
// SelectDefaultSubpictureLanguage
|
1572 |
// Selects the default subpicture language.
|
1573 |
// Languages are specified with Windows standard LCIDs.
|
1574 |
HRESULT SelectDefaultSubpictureLanguage
|
1575 |
( [in] LCID Language,
|
1576 |
[in] DVD_SUBPICTURE_LANG_EXT subpictureExtension
|
1577 |
);
|
1578 |
}
|
1579 |
|
1580 |
|
1581 |
//==========================================================================
|
1582 |
//==========================================================================
|
1583 |
// IDvdInfo2 interface -- allows an app to query for attributes of available
|
1584 |
// DVD titles and DVD player status. Also allows for control of a DVD
|
1585 |
// player beyond Annex J in the DVD spec.
|
1586 |
//==========================================================================
|
1587 |
//==========================================================================
|
1588 |
|
1589 |
enum DVD_TextStringType {
|
1590 |
// disc structure (0x00..0x0f)
|
1591 |
DVD_Struct_Volume = 0x01,
|
1592 |
DVD_Struct_Title = 0x02,
|
1593 |
DVD_Struct_ParentalID = 0x03,
|
1594 |
DVD_Struct_PartOfTitle = 0x04,
|
1595 |
DVD_Struct_Cell = 0x05,
|
1596 |
// stream (0x10..0x1f)
|
1597 |
DVD_Stream_Audio = 0x10,
|
1598 |
DVD_Stream_Subpicture = 0x11,
|
1599 |
DVD_Stream_Angle = 0x12,
|
1600 |
// channel in stream (0x20..0x2f)
|
1601 |
DVD_Channel_Audio = 0x20,
|
1602 |
|
1603 |
// Application information
|
1604 |
// General (0x30..0x37)
|
1605 |
DVD_General_Name = 0x30,
|
1606 |
DVD_General_Comments = 0x31,
|
1607 |
|
1608 |
// Title (0x38..0x3f)
|
1609 |
DVD_Title_Series = 0x38,
|
1610 |
DVD_Title_Movie = 0x39,
|
1611 |
DVD_Title_Video = 0x3a,
|
1612 |
DVD_Title_Album = 0x3b,
|
1613 |
DVD_Title_Song = 0x3c,
|
1614 |
DVD_Title_Other = 0x3f,
|
1615 |
|
1616 |
// Title (sub) (0x40..0x47)
|
1617 |
DVD_Title_Sub_Series = 0x40,
|
1618 |
DVD_Title_Sub_Movie = 0x41,
|
1619 |
DVD_Title_Sub_Video = 0x42,
|
1620 |
DVD_Title_Sub_Album = 0x43,
|
1621 |
DVD_Title_Sub_Song = 0x44,
|
1622 |
DVD_Title_Sub_Other = 0x47,
|
1623 |
|
1624 |
// Title (original) (0x48..0x4f)
|
1625 |
DVD_Title_Orig_Series = 0x48,
|
1626 |
DVD_Title_Orig_Movie = 0x49,
|
1627 |
DVD_Title_Orig_Video = 0x4a,
|
1628 |
DVD_Title_Orig_Album = 0x4b,
|
1629 |
DVD_Title_Orig_Song = 0x4c,
|
1630 |
DVD_Title_Orig_Other = 0x4f,
|
1631 |
|
1632 |
// Other info (0x50..0x57)
|
1633 |
DVD_Other_Scene = 0x50,
|
1634 |
DVD_Other_Cut = 0x51,
|
1635 |
DVD_Other_Take = 0x52,
|
1636 |
|
1637 |
// Language 0x58..0x5b
|
1638 |
// Work 0x5c..0x6b
|
1639 |
// Character 0x6c..0x8f
|
1640 |
// Data 0x90..0x93
|
1641 |
// Karaoke 0x94..0x9b
|
1642 |
// Category 0x9c..0x9f
|
1643 |
// Lyrics 0xa0..0xa3
|
1644 |
// Document 0xa4..0xa7
|
1645 |
// Others 0xa8..0xab
|
1646 |
// Reserved 0xac..0xaf
|
1647 |
// Admin 0xb0..0xb7
|
1648 |
// more admin 0xb8..0xc0
|
1649 |
// Reserved 0xd0..0xdf
|
1650 |
// vendor 0xe0..0xef
|
1651 |
// extension 0xf0..0xf7
|
1652 |
// reserved 0xf8..0xff
|
1653 |
};
|
1654 |
|
1655 |
enum DVD_TextCharSet {
|
1656 |
DVD_CharSet_Unicode = 0,
|
1657 |
DVD_CharSet_ISO646 = 1,
|
1658 |
DVD_CharSet_JIS_Roman_Kanji = 2,
|
1659 |
DVD_CharSet_ISO8859_1 = 3,
|
1660 |
DVD_CharSet_ShiftJIS_Kanji_Roman_Katakana = 4
|
1661 |
};
|
1662 |
|
1663 |
cpp_quote ("#define DVD_TITLE_MENU 0x000")
|
1664 |
cpp_quote ("#define DVD_STREAM_DATA_CURRENT 0x800")
|
1665 |
cpp_quote ("#define DVD_STREAM_DATA_VMGM 0x400")
|
1666 |
cpp_quote ("#define DVD_STREAM_DATA_VTSM 0x401")
|
1667 |
cpp_quote ("#define DVD_DEFAULT_AUDIO_STREAM 0x0f")
|
1668 |
|
1669 |
// DVD Decoder Caps data
|
1670 |
typedef struct tagDVD_DECODER_CAPS
|
1671 |
{
|
1672 |
DWORD dwSize ; // size of this struct
|
1673 |
DWORD dwAudioCaps ; // bits indicating audio support (AC3, DTS, SDDS, LPCM etc.) of decoder
|
1674 |
double dFwdMaxRateVideo ; // max data rate for video going forward
|
1675 |
double dFwdMaxRateAudio ; // ... .. .. ... audio ... ...
|
1676 |
double dFwdMaxRateSP ; // ... .. .. ... SP ... ...
|
1677 |
double dBwdMaxRateVideo ; // if smooth reverse is not available, this will be set to 0
|
1678 |
double dBwdMaxRateAudio ; // -- ditto --
|
1679 |
double dBwdMaxRateSP ; // -- ditto --
|
1680 |
DWORD dwRes1 ; // reserved for future expansion
|
1681 |
DWORD dwRes2 ; // -- ditto --
|
1682 |
DWORD dwRes3 ; // -- ditto --
|
1683 |
DWORD dwRes4 ; // -- ditto --
|
1684 |
} DVD_DECODER_CAPS ;
|
1685 |
|
1686 |
// Bits for decoder's audio format support
|
1687 |
cpp_quote ("#define DVD_AUDIO_CAPS_AC3 0x00000001")
|
1688 |
cpp_quote ("#define DVD_AUDIO_CAPS_MPEG2 0x00000002")
|
1689 |
cpp_quote ("#define DVD_AUDIO_CAPS_LPCM 0x00000004")
|
1690 |
cpp_quote ("#define DVD_AUDIO_CAPS_DTS 0x00000008")
|
1691 |
cpp_quote ("#define DVD_AUDIO_CAPS_SDDS 0x00000010")
|
1692 |
|
1693 |
|
1694 |
[
|
1695 |
object,
|
1696 |
uuid(34151510-EEC0-11D2-8201-00A0C9D74842),
|
1697 |
pointer_default(unique)
|
1698 |
]
|
1699 |
|
1700 |
interface IDvdInfo2 : IUnknown {
|
1701 |
import "unknwn.idl";
|
1702 |
|
1703 |
// GetCurrentDomain
|
1704 |
// Returns the current DVD Domain of the DVD player.
|
1705 |
HRESULT GetCurrentDomain
|
1706 |
( [out] DVD_DOMAIN *pDomain
|
1707 |
);
|
1708 |
|
1709 |
// GetCurrentLocation
|
1710 |
// Returns information sufficient to restart playback of a video
|
1711 |
// from the current playback location in titles that don't explicitly
|
1712 |
// disable seeking to the current location.
|
1713 |
HRESULT GetCurrentLocation
|
1714 |
( [out] DVD_PLAYBACK_LOCATION2 *pLocation
|
1715 |
);
|
1716 |
|
1717 |
// GetTotalTitleTime
|
1718 |
// Returns the total playback time for the current title. Only works
|
1719 |
// for One_Sequential_PGC_Titles.
|
1720 |
// THIS SHOULD CHANGE, RIGHT?
|
1721 |
HRESULT GetTotalTitleTime
|
1722 |
( [out] DVD_HMSF_TIMECODE* pTotalTime,
|
1723 |
[out] ULONG* ulTimeCodeFlags // union of DVD_TIMECODE_FLAGS
|
1724 |
);
|
1725 |
|
1726 |
// GetCurrentButton
|
1727 |
// Indicates the number of currently available buttons and the current
|
1728 |
// selected button number. If buttons are not present it returns 0 for
|
1729 |
// both pulButtonsAvailable and pulCurrentButton
|
1730 |
HRESULT GetCurrentButton
|
1731 |
( [out] ULONG * pulButtonsAvailable,
|
1732 |
[out] ULONG * pulCurrentButton
|
1733 |
);
|
1734 |
|
1735 |
// GetCurrentAngle
|
1736 |
// Indicates the number of currently available angles and the current
|
1737 |
// selected angle number. If *pulAnglesAvailable is returned as 1 then
|
1738 |
// the current content is not multiangle.
|
1739 |
HRESULT GetCurrentAngle
|
1740 |
( [out] ULONG * pulAnglesAvailable,
|
1741 |
[out] ULONG * pulCurrentAngle
|
1742 |
);
|
1743 |
|
1744 |
// GetCurrentAudio
|
1745 |
// Indicates the number of currently available audio streams and
|
1746 |
// the currently selected audio stream number.
|
1747 |
// This only works inside the Title domain.
|
1748 |
HRESULT GetCurrentAudio
|
1749 |
( [out] ULONG * pulStreamsAvailable,
|
1750 |
[out] ULONG * pulCurrentStream
|
1751 |
);
|
1752 |
|
1753 |
// GetCurrentSubpicture
|
1754 |
// Indicates the number of currently available subpicture streams,
|
1755 |
// the currently selected subpicture stream number, and if the
|
1756 |
// subpicture display is currently disabled. Subpicture streams
|
1757 |
// authored as "Forcedly Activated" stream will be displayed even if
|
1758 |
// subpicture display has been disabled by the app with
|
1759 |
// IDVDControl::SetSubpictureState.
|
1760 |
// This only works inside the Title domain.
|
1761 |
HRESULT GetCurrentSubpicture
|
1762 |
( [out] ULONG * pulStreamsAvailable,
|
1763 |
[out] ULONG * pulCurrentStream,
|
1764 |
[out] BOOL * pbIsDisabled
|
1765 |
);
|
1766 |
|
1767 |
// GetCurrentUOPS
|
1768 |
// Indicates which IDVDControl methods (Annex J user operations) are
|
1769 |
// currently valid. DVD titles can enable or disable individual user
|
1770 |
// operations at almost any point during playback.
|
1771 |
HRESULT GetCurrentUOPS
|
1772 |
( [out] ULONG * pulUOPs
|
1773 |
);
|
1774 |
|
1775 |
// GetAllSPRMs
|
1776 |
// Returns the current contents of all DVD System Parameter Registers.
|
1777 |
// See DVD-Video spec for use of individual registers.
|
1778 |
// WE SHOULD DOC THE SPRMs RATHER THAN ASKING TO REFER TO DVD SPEC.
|
1779 |
HRESULT GetAllSPRMs
|
1780 |
( [out] SPRMARRAY * pRegisterArray
|
1781 |
);
|
1782 |
|
1783 |
// GetAllGPRMs
|
1784 |
// Returns the current contents of all DVD General Parameter Registers.
|
1785 |
// Use of GPRMs is title specific.
|
1786 |
// WE SHOULD DOC THE GPRMs RATHER THAN ASKING TO REFER TO DVD SPEC.
|
1787 |
HRESULT GetAllGPRMs
|
1788 |
( [out] GPRMARRAY * pRegisterArray
|
1789 |
);
|
1790 |
|
1791 |
// GetAudioLanguage
|
1792 |
// Returns the language of the specified stream within the current title.
|
1793 |
// Does not return languages for menus. Returns *pLanguage as 0 if the
|
1794 |
// stream does not include language.
|
1795 |
// Use Win32 API GetLocaleInfo(*pLanguage, LOCALE_SENGLANGUAGE, pszString, cbSize)
|
1796 |
// to create a human readable string name from the returned LCID.
|
1797 |
HRESULT GetAudioLanguage
|
1798 |
( [in] ULONG ulStream,
|
1799 |
[out] LCID * pLanguage
|
1800 |
);
|
1801 |
|
1802 |
// GetSubpictureLanguage
|
1803 |
// Returns the language of the specified stream within the current title.
|
1804 |
// Does not return languages for menus. Returns *pLanguage=0 as 0 if the
|
1805 |
// stream does not include language.
|
1806 |
// Use Win32 API GetLocaleInfo(*pLanguage, LOCALE_SENGLANGUAGE, pszString, cbSize)
|
1807 |
// to create a human readable string name from the returned LCID.
|
1808 |
HRESULT GetSubpictureLanguage
|
1809 |
( [in] ULONG ulStream,
|
1810 |
[out] LCID * pLanguage
|
1811 |
);
|
1812 |
|
1813 |
// GetTitleAttributes
|
1814 |
// Returns attributes of all video, audio, and subpicture streams for the
|
1815 |
// specified title including menus.
|
1816 |
// If 0xffffffff is specified as ulTitle, attributes for the current title
|
1817 |
// are returned.
|
1818 |
HRESULT GetTitleAttributes
|
1819 |
( [in] ULONG ulTitle, // requested title number
|
1820 |
[out] DVD_MenuAttributes * pMenu,
|
1821 |
[out] DVD_TitleAttributes * pTitle
|
1822 |
);
|
1823 |
|
1824 |
// GetVMGAttributes
|
1825 |
// Returns attributes of all video, audio, and subpicture
|
1826 |
// streams for Video Manager Menus. This method suppliments GetTitleAttributes()
|
1827 |
// for some menus, such as the Title menu, which are in a separate group of
|
1828 |
// streams called the VMG (Video Manager) and are not associated with any
|
1829 |
// particular title number.
|
1830 |
HRESULT GetVMGAttributes
|
1831 |
( [out] DVD_MenuAttributes* pATR
|
1832 |
);
|
1833 |
|
1834 |
// GetCurrentVideoAttributes
|
1835 |
// Returns the video attributes for the current title or menu.
|
1836 |
//
|
1837 |
HRESULT GetCurrentVideoAttributes
|
1838 |
( [out] DVD_VideoAttributes * pATR
|
1839 |
);
|
1840 |
|
1841 |
// GetAudioAttributes
|
1842 |
// Returns the audio attributes for the specified stream in the current title
|
1843 |
// or menu.
|
1844 |
HRESULT GetAudioAttributes
|
1845 |
( [in] ULONG ulStream,
|
1846 |
[out] DVD_AudioAttributes *pATR
|
1847 |
);
|
1848 |
|
1849 |
// GetKaraokeChannelContents
|
1850 |
// Returns the karaoke contents of each channel of the specified stream in the current title
|
1851 |
// or menu.
|
1852 |
HRESULT GetKaraokeAttributes
|
1853 |
( [in] ULONG ulStream,
|
1854 |
[out] DVD_KaraokeAttributes* pAttributes
|
1855 |
);
|
1856 |
|
1857 |
// GetSubpictureAttributes
|
1858 |
// Returns the subpicture attributes for the specified stream in the current
|
1859 |
// title or menu.
|
1860 |
HRESULT GetSubpictureAttributes
|
1861 |
( [in] ULONG ulStream,
|
1862 |
[out] DVD_SubpictureAttributes *pATR
|
1863 |
);
|
1864 |
|
1865 |
// GetDVDVolumeInfo
|
1866 |
// Returns current DVD volume information.
|
1867 |
HRESULT GetDVDVolumeInfo
|
1868 |
( [out] ULONG *pulNumOfVolumes, // number of volumes (disc sides?) in a volume set
|
1869 |
[out] ULONG *pulVolume, // volume number for current DVD directory
|
1870 |
[out] DVD_DISC_SIDE *pSide, // current disc side
|
1871 |
[out] ULONG *pulNumOfTitles // number of titles available in this volume
|
1872 |
);
|
1873 |
|
1874 |
// GetDVDTextNumberOfLanguages
|
1875 |
// Returns the number of text languages for the current DVD directory.
|
1876 |
// Should return some error code if no root directory is found.
|
1877 |
HRESULT GetDVDTextNumberOfLanguages
|
1878 |
( [out] ULONG * pulNumOfLangs
|
1879 |
);
|
1880 |
|
1881 |
// GetDVDTextLanguageInfo
|
1882 |
// Returns the text languages information (number of strings, language code,
|
1883 |
// char set) for the specified language index.
|
1884 |
// Should return some error code if an invalid text index is specified.
|
1885 |
HRESULT GetDVDTextLanguageInfo
|
1886 |
( [in] ULONG ulLangIndex,
|
1887 |
[out] ULONG* pulNumOfStrings,
|
1888 |
[out] LCID* pLangCode,
|
1889 |
[out] enum DVD_TextCharSet * pbCharacterSet
|
1890 |
);
|
1891 |
|
1892 |
// GetDVDTextStringAsNative
|
1893 |
// Returns the text string as an array of bytes for the specified language
|
1894 |
// index.and string index.
|
1895 |
// Should return some error code if an invalid text or string index is specified.
|
1896 |
// It also just returns the length of the string if pchBuffer is specified as NULL.
|
1897 |
HRESULT GetDVDTextStringAsNative
|
1898 |
( [in] ULONG ulLangIndex,
|
1899 |
[in] ULONG ulStringIndex,
|
1900 |
[out] BYTE* pbBuffer,
|
1901 |
[in] ULONG ulMaxBufferSize,
|
1902 |
[out] ULONG* pulActualSize,
|
1903 |
[out] enum DVD_TextStringType* pType
|
1904 |
);
|
1905 |
|
1906 |
// GetDVDTextStringAsUnicode
|
1907 |
// Returns the text string in Unicode for the specified language index.and string index.
|
1908 |
// Should return some error code if an invalid text or string index is specified.
|
1909 |
// It also just returns the length of the string if pchBuffer is specified as NULL.
|
1910 |
HRESULT GetDVDTextStringAsUnicode
|
1911 |
( [in] ULONG ulLangIndex,
|
1912 |
[in] ULONG ulStringIndex,
|
1913 |
[out] WCHAR* pchwBuffer,
|
1914 |
[in] ULONG ulMaxBufferSize,
|
1915 |
[out] ULONG* pulActualSize,
|
1916 |
[out] enum DVD_TextStringType* pType
|
1917 |
);
|
1918 |
|
1919 |
// GetPlayerParentalLevel
|
1920 |
// Returns the current parental level and the current country code that has
|
1921 |
// been set in the system registers in player.
|
1922 |
// See Table 3.3.4-1 of the DVD-Video spec for the defined parental levels.
|
1923 |
// Valid Parental Levels range from 1 to 8 if parental management is enabled.
|
1924 |
// Returns 0xffffffff if parental management is disabled
|
1925 |
// See ISO3166 : Alpha-2 Code for the country codes.
|
1926 |
HRESULT GetPlayerParentalLevel
|
1927 |
( [out] ULONG *pulParentalLevel, // current parental level
|
1928 |
[out] BYTE pbCountryCode[2] // current country code
|
1929 |
);
|
1930 |
|
1931 |
// GetNumberOfChapters
|
1932 |
// Returns the number of chapters that are defined for a
|
1933 |
// given title.
|
1934 |
HRESULT GetNumberOfChapters
|
1935 |
( [in] ULONG ulTitle, // Title for which number of chapters is requested
|
1936 |
[out] ULONG *pulNumOfChapters // Number of chapters for the specified title
|
1937 |
);
|
1938 |
|
1939 |
// GetTitleParentalLevels
|
1940 |
// Returns the parental levels that are defined for a particular title.
|
1941 |
// pulParentalLevels will be combination of DVD_PARENTAL_LEVEL_8,
|
1942 |
// DVD_PARENTAL_LEVEL_6, or DVD_PARENTAL_LEVEL_1 OR-ed together
|
1943 |
HRESULT GetTitleParentalLevels
|
1944 |
( [in] ULONG ulTitle, // Title for which parental levels are requested
|
1945 |
[out] ULONG *pulParentalLevels // Parental levels defined for the title "OR"ed together
|
1946 |
);
|
1947 |
|
1948 |
// GetDVDDirectory
|
1949 |
// Returns the root directory that is set in the player. If a valid root
|
1950 |
// has been found, it returns the root string. Otherwise, it returns 0 for
|
1951 |
// pcbActualSize indicating that a valid root directory has not been found
|
1952 |
// or initialized.
|
1953 |
//
|
1954 |
// !!! used to return LPTSTR. interface was changed to return
|
1955 |
// LPSTR (ansi) for compatibility. COM APIs should pass with
|
1956 |
// UNICODE strings only.
|
1957 |
//
|
1958 |
HRESULT GetDVDDirectory
|
1959 |
( [out, size_is(ulMaxSize)] LPWSTR pszwPath, // pointer to buffer to get root string
|
1960 |
[in] ULONG ulMaxSize, // size of buffer in WCHARs passed in
|
1961 |
[out] ULONG *pulActualSize // size of actual data returned (in WCHARs)
|
1962 |
);
|
1963 |
|
1964 |
|
1965 |
// IsAudioStreamEnabled
|
1966 |
//
|
1967 |
// Determines if the specified audio stream is enabled/disabled in the current PGC.
|
1968 |
//
|
1969 |
// ulStreamNum - audio stream number to test
|
1970 |
// pbEnabled - where to place the result
|
1971 |
HRESULT IsAudioStreamEnabled
|
1972 |
( [in] ULONG ulStreamNum, // stream number to test
|
1973 |
[out] BOOL *pbEnabled // returned state
|
1974 |
);
|
1975 |
|
1976 |
// GetDiscID
|
1977 |
//
|
1978 |
// If pszwPath is specified as NULL, DVD Navigator will use the current path
|
1979 |
// that would be returned by GetDVDDirectory() at this point.
|
1980 |
//
|
1981 |
// Returns a 64-bit identification number for the specified DVD disc.
|
1982 |
HRESULT GetDiscID
|
1983 |
( [in] LPCWSTR pszwPath, // root path (should we rather use const WCHAR*?)
|
1984 |
[out] ULONGLONG* pullDiscID // 64-bit unique id for the disc
|
1985 |
) ;
|
1986 |
|
1987 |
// GetState
|
1988 |
//
|
1989 |
// The navigator will create a new state object and save the current location into it.
|
1990 |
// The state object can be used to restore the navigator the saved location at a later time.
|
1991 |
// A new IDvdState object is created (with a single AddRef) and returned in *pStateData.
|
1992 |
// The object must be Released() when the application is finished with it.
|
1993 |
//
|
1994 |
HRESULT GetState
|
1995 |
( [out] IDvdState **pStateData // returned object
|
1996 |
);
|
1997 |
|
1998 |
//
|
1999 |
// GetMenuLanguages
|
2000 |
//
|
2001 |
// Navigator gets all of the menu languages for the VMGM and VTSM domains.
|
2002 |
//
|
2003 |
HRESULT GetMenuLanguages
|
2004 |
( [out] LCID *pLanguages, // data buffer (NULL returns #languages)
|
2005 |
[in] ULONG ulMaxLanguages, // maxiumum number of languages to retrieve
|
2006 |
[out] ULONG *pulActualLanguages // actual number of languages retrieved
|
2007 |
);
|
2008 |
|
2009 |
//
|
2010 |
// GetButtonAtPosition
|
2011 |
//
|
2012 |
// This is typically called in response to a mouse move within the
|
2013 |
// display window.
|
2014 |
// It returns the button located at the specified point within the display window.
|
2015 |
// If no button is present at that position, then VFW_E_DVD_NO_BUTTON is returned.
|
2016 |
// Button indices start at 1.
|
2017 |
//
|
2018 |
// NOTE: DVD Buttons do not all necessarily have highlight rects,
|
2019 |
// button rects can overlap, and button rects do not always
|
2020 |
// correspond to the visual representation of DVD buttons.
|
2021 |
HRESULT GetButtonAtPosition // typically called after a mouse move
|
2022 |
( [in] POINT point,
|
2023 |
[out] ULONG *pulButtonIndex
|
2024 |
);
|
2025 |
|
2026 |
//
|
2027 |
// GetCmdFromEvent
|
2028 |
//
|
2029 |
// This method maps an EC_DVD_CMD_BEGIN/COMPLETE/CANCEL event's lParam1 into an AddRef'd
|
2030 |
// IDvdCmd pointer. You must Release the returned pointer. NULL is returned if the function
|
2031 |
// fails.
|
2032 |
//
|
2033 |
HRESULT GetCmdFromEvent
|
2034 |
( [in] LONG_PTR lParam1,
|
2035 |
[out] IDvdCmd **pCmdObj
|
2036 |
);
|
2037 |
|
2038 |
// GetDefaultMenuLanguage
|
2039 |
// Returns the default language for menus.
|
2040 |
HRESULT GetDefaultMenuLanguage
|
2041 |
( [out] LCID * pLanguage
|
2042 |
);
|
2043 |
|
2044 |
// GetDefaultAudioLanguage
|
2045 |
// Gets the default audio language.
|
2046 |
// Languages are specified with Windows standard LCIDs.
|
2047 |
HRESULT GetDefaultAudioLanguage
|
2048 |
( [out] LCID* pLanguage,
|
2049 |
[out] DVD_AUDIO_LANG_EXT* pAudioExtension
|
2050 |
);
|
2051 |
|
2052 |
// GetDefaultSubpictureLanguage
|
2053 |
// Gets the default subpicture language.
|
2054 |
// Languages are specified with Windows standard LCIDs.
|
2055 |
HRESULT GetDefaultSubpictureLanguage
|
2056 |
( [out] LCID* pLanguage,
|
2057 |
[out] DVD_SUBPICTURE_LANG_EXT* pSubpictureExtension
|
2058 |
);
|
2059 |
|
2060 |
//
|
2061 |
// GetDecoderCaps:
|
2062 |
// Retrieves the DVD decoder's details about max data rate for video, audio
|
2063 |
// and subpicture (going backward and forward) as well as support for various
|
2064 |
// types of audio (AC3, MPEG2, DTS, SDDS, LPCM).
|
2065 |
//
|
2066 |
HRESULT GetDecoderCaps
|
2067 |
( [out] DVD_DECODER_CAPS *pCaps
|
2068 |
) ;
|
2069 |
|
2070 |
//
|
2071 |
// GetButtonRect:
|
2072 |
// Retrieves the coordinates for a given button number
|
2073 |
//
|
2074 |
HRESULT GetButtonRect
|
2075 |
( [in] ULONG ulButton,
|
2076 |
[out] RECT *pRect
|
2077 |
) ;
|
2078 |
|
2079 |
// IsSubpictureStreamEnabled
|
2080 |
//
|
2081 |
// Determines if the specified subpicture stream is enabled/disabled in the current PGC.
|
2082 |
//
|
2083 |
// ulStreamNum - Subpicture stream number to test
|
2084 |
// pbEnabled - where to place the result
|
2085 |
HRESULT IsSubpictureStreamEnabled
|
2086 |
( [in] ULONG ulStreamNum, // stream number to test
|
2087 |
[out] BOOL *pbEnabled // returned state
|
2088 |
);
|
2089 |
}
|
2090 |
|
2091 |
|
2092 |
|
2093 |
//==========================================================================
|
2094 |
//==========================================================================
|
2095 |
//
|
2096 |
// typedefs used by IDvdGraphBuilder interface.
|
2097 |
//
|
2098 |
//==========================================================================
|
2099 |
//==========================================================================
|
2100 |
|
2101 |
typedef enum _AM_DVD_GRAPH_FLAGS {
|
2102 |
AM_DVD_HWDEC_PREFER = 0x01, // default
|
2103 |
AM_DVD_HWDEC_ONLY = 0x02,
|
2104 |
AM_DVD_SWDEC_PREFER = 0x04,
|
2105 |
AM_DVD_SWDEC_ONLY = 0x08,
|
2106 |
AM_DVD_NOVPE = 0x100
|
2107 |
} AM_DVD_GRAPH_FLAGS ;
|
2108 |
|
2109 |
typedef enum _AM_DVD_STREAM_FLAGS {
|
2110 |
AM_DVD_STREAM_VIDEO = 0x01,
|
2111 |
AM_DVD_STREAM_AUDIO = 0x02,
|
2112 |
AM_DVD_STREAM_SUBPIC = 0x04
|
2113 |
} AM_DVD_STREAM_FLAGS ;
|
2114 |
|
2115 |
typedef struct {
|
2116 |
HRESULT hrVPEStatus ; // VPE mixing error code (0 => success)
|
2117 |
BOOL bDvdVolInvalid ; // Is specified DVD volume invalid?
|
2118 |
BOOL bDvdVolUnknown ; // Is DVD volume to be played not specified/not found?
|
2119 |
BOOL bNoLine21In ; // video decoder doesn't produce line21 (CC) data
|
2120 |
BOOL bNoLine21Out ; // can't show decoded line21 data as CC on video
|
2121 |
int iNumStreams ; // number of DVD streams to render
|
2122 |
int iNumStreamsFailed ; // number of streams failed to render
|
2123 |
DWORD dwFailedStreamsFlag ; // combination of flags to indicate failed streams
|
2124 |
} AM_DVD_RENDERSTATUS ;
|
2125 |
|
2126 |
|
2127 |
//
|
2128 |
// IDvdGraphBuilder interface to build a filter graph for DVD-Video playback.
|
2129 |
//
|
2130 |
|
2131 |
[
|
2132 |
object,
|
2133 |
local,
|
2134 |
uuid(FCC152B6-F372-11d0-8E00-00C04FD7C08B),
|
2135 |
pointer_default(unique)
|
2136 |
]
|
2137 |
interface IDvdGraphBuilder : IUnknown {
|
2138 |
|
2139 |
// Returns the IGraphBuilder interface for the filtergraph used by the
|
2140 |
// CDvdGraphBuilder object.
|
2141 |
// Remember to *ppGB->Release() when you're done with it
|
2142 |
HRESULT GetFiltergraph
|
2143 |
( [out] IGraphBuilder **ppGB
|
2144 |
) ;
|
2145 |
|
2146 |
// Gets specific interface pointers in the DVD-Video playback graph to
|
2147 |
// make DVD-Video playback development easier.
|
2148 |
// It helps get the following interfaces to control playback/show CC/
|
2149 |
// position window/control volume etc:
|
2150 |
// - IDvdControl, IDvdInfo
|
2151 |
// - IAMLine21Decoder
|
2152 |
// - IVideoWindow, IBasicVideo
|
2153 |
// - IBasicAudio
|
2154 |
// This method will return
|
2155 |
// a) E_INVALIDARG if ppvIF is invalid
|
2156 |
// b) E_NOINTERFACE if riid is an IID we don't know about
|
2157 |
// c) VFW_E_DVD_GRAPHNOTREADY if the graph has not been built through
|
2158 |
// RenderDvdVideoVolume() yet.
|
2159 |
// Remember to *ppvIF->Release() when you're done with it
|
2160 |
HRESULT GetDvdInterface
|
2161 |
( [in] REFIID riid, // IID of the interface required
|
2162 |
[out] void **ppvIF // returns pointer to the required interface
|
2163 |
) ;
|
2164 |
|
2165 |
// Builds a filter graph according to user specs for playing back a
|
2166 |
// DVD-Video volume.
|
2167 |
// This method returns S_FALSE if
|
2168 |
// 1. the graph has been either built, but either
|
2169 |
// a) VPE mixing doesn't work (app didn't use AM_DVD_NOVPE flag)
|
2170 |
// b) video decoder doesn't produce line21 data
|
2171 |
// c) line21 data couldn't be rendered (decoding/mixing problem)
|
2172 |
// d) the call specified an invalid volume path or DVD Nav couldn't
|
2173 |
// locate any DVD-Video volume to be played.
|
2174 |
// 2. some streams didn't render (completely), but the others have
|
2175 |
// been rendered so that the volume can be partially played back.
|
2176 |
// The status is indicated through the fields of the pStatus (out)
|
2177 |
// parameter.
|
2178 |
// About 1(a), the app will have enough info to tell the user that the
|
2179 |
// video won't be visible unless a TV is connected to the NTSC out
|
2180 |
// port of the DVD decoder (presumably HW in this case).
|
2181 |
// For case 1(b) & (c), the app "can" put up a warning/informative message
|
2182 |
// that closed captioning is not available because of the decoder.
|
2183 |
// 1(d) helps an app to ask the user to insert a DVD-Video disc if none
|
2184 |
// is specified/available in the drive when playback is started.
|
2185 |
// This method builds the graph even if
|
2186 |
// - an invalid DVD-Video volume is specified
|
2187 |
// - the caller uses lpwszPathName = NULL to make the DVD Nav to locate
|
2188 |
// the default volume to be played back, but DVD Nav doesn't find a
|
2189 |
// default DVD-Video volume to be played back.
|
2190 |
// An app can later specify the volume using IDvdControl::SetRoot()
|
2191 |
// method.
|
2192 |
// #2 will help the app indicate to the user that some of the streams
|
2193 |
// can't be played.
|
2194 |
//
|
2195 |
// The graph is built using filters based on the dwFlags value (to use
|
2196 |
// HW decoders or SW decoders or a mix of them).
|
2197 |
// The dwFlags value is one of the values in AM_DVD_GRAPH_FLAGS enum
|
2198 |
// type. The default value is AM_DVD_HWDEC_PREFER. None of the
|
2199 |
// AM_DVD_HWDEC_xxx or AM_DVD_SWDEC_xxx flags can be mixed. However
|
2200 |
// AM_DVD_NOVPE can be OR-ed with any of the AM_DVD_HWDEC_xxx flags.
|
2201 |
//
|
2202 |
// The method returns S_OK if the playback graph is built successfully
|
2203 |
// with all the streams completely rendered and a valid DVD-Video volume
|
2204 |
// is specified or a default one has been located.
|
2205 |
//
|
2206 |
// If the dwFlags specify conflicting options, E_INVALIDARG is returned.
|
2207 |
// If the graph building fails, the method returns one of the following
|
2208 |
// error codes:
|
2209 |
// VFW_E_DVD_RENDERFAIL, VFW_E_DVD_DECNOTENOUGH
|
2210 |
//
|
2211 |
HRESULT RenderDvdVideoVolume
|
2212 |
( [in] LPCWSTR lpcwszPathName, // Can be NULL too
|
2213 |
[in] DWORD dwFlags, // 0 is the default (use max HW)
|
2214 |
[out] AM_DVD_RENDERSTATUS *pStatus // returns indications of ANY failure
|
2215 |
) ;
|
2216 |
}
|
2217 |
|
2218 |
|
2219 |
//
|
2220 |
// DDraw Exclusive Mode Video standard COM interface for Overlay Mixer
|
2221 |
//
|
2222 |
[
|
2223 |
object,
|
2224 |
local,
|
2225 |
uuid(153ACC21-D83B-11d1-82BF-00A0C9696C8F),
|
2226 |
pointer_default(unique)
|
2227 |
]
|
2228 |
interface IDDrawExclModeVideo : IUnknown {
|
2229 |
// set a ddraw object to be used by the overlay mixer. If even one of the pins
|
2230 |
// of the ovmixer is connected, then it won't start using the new ddraw obect
|
2231 |
// immediately but just cache it. It will start using it the next time, all its
|
2232 |
// pins are disconnected.
|
2233 |
HRESULT SetDDrawObject([in] IDirectDraw *pDDrawObject);
|
2234 |
|
2235 |
// gets the ddraw object currently being used by the overlay mixer. If the app has not
|
2236 |
// set any ddraw object and the ovmixer has not yet allocated one, then *ppDDrawObject
|
2237 |
// will be set to NULL and *pbUsingExternal will be set TO FALSE. Otherwise *pbUsingExternal
|
2238 |
// will be set to TRUE if the ovmixer is currently USING an app given ddraw object and FALSE
|
2239 |
// othewise
|
2240 |
HRESULT GetDDrawObject([out] IDirectDraw **ppDDrawObject,
|
2241 |
[out] BOOL *pbUsingExternal);
|
2242 |
|
2243 |
// set a primary surface to be used by the overlay mixer. If even one of the pins
|
2244 |
// of the ovmixer is connected, then it won't start using the new primary surface
|
2245 |
// immediately but just cache it. It will start using it the next time, all its
|
2246 |
// pins are disconnected.
|
2247 |
// Also when the ovmixer does start using an app given primary surface, it will delete
|
2248 |
// its output pin (and not draw its own colorkey) since the app is expected to do the
|
2249 |
// window management and drawing colorkey etc on the primary surface
|
2250 |
// This function makes sure that the surface provided exposes IDirectDrawSurface3, and
|
2251 |
// is consistent with the ddraw object provided.
|
2252 |
HRESULT SetDDrawSurface([in] IDirectDrawSurface *pDDrawSurface);
|
2253 |
|
2254 |
// gets the ddraw surface currently being used by the overlay mixer. If the app has not
|
2255 |
// set any ddraw surface and the ovmixer has not yet allocated one, then *ppDDrawSurface
|
2256 |
// will be set to NULL and *pbUsingExternal will be set to FALSE. Otherwise *pbUsingExternal
|
2257 |
// will be set to TRUE if the ovmixer is curretnly USING an app given ddraw surface and FALSE
|
2258 |
// otherwise
|
2259 |
HRESULT GetDDrawSurface([out] IDirectDrawSurface **ppDDrawSurface,
|
2260 |
[out] BOOL *pbUsingExternal);
|
2261 |
|
2262 |
// set draw paramters on the ovmixer (src and dest rect). Note that if the mode
|
2263 |
// of the ovmixer is set to LETTER_BOX, then the ovmixer might show the video in
|
2264 |
// only a subrect of *prcTarget (see IMixerPinConfig for details).
|
2265 |
HRESULT SetDrawParameters([in] const RECT * prcSource,
|
2266 |
[in] const RECT * prcTarget);
|
2267 |
|
2268 |
// gets the current video size and picture aspect ratio of the primary stream of the overlay mixer
|
2269 |
// The app should look for the evene EC_VIDEO_SIZE_AR_CHANGED and on its receipt
|
2270 |
// call this function again
|
2271 |
HRESULT GetNativeVideoProps([out] DWORD *pdwVideoWidth,
|
2272 |
[out] DWORD *pdwVideoHeight,
|
2273 |
[out] DWORD *pdwPictAspectRatioX,
|
2274 |
[out] DWORD *pdwPictAspectRatioY);
|
2275 |
|
2276 |
// Set the callback interface - the callback interface will be defined in a later release
|
2277 |
// Currently returns E_NOTIMPL
|
2278 |
HRESULT SetCallbackInterface([in] IDDrawExclModeVideoCallback *pCallback,
|
2279 |
[in] DWORD dwFlags);
|
2280 |
}
|
2281 |
|
2282 |
|
2283 |
//
|
2284 |
// DDraw Exclusive Mode Video callbacks
|
2285 |
//
|
2286 |
|
2287 |
// enum for flags
|
2288 |
enum _AM_OVERLAY_NOTIFY_FLAGS {
|
2289 |
AM_OVERLAY_NOTIFY_VISIBLE_CHANGE = 0x00000001,
|
2290 |
AM_OVERLAY_NOTIFY_SOURCE_CHANGE = 0x00000002,
|
2291 |
AM_OVERLAY_NOTIFY_DEST_CHANGE = 0x00000004
|
2292 |
};
|
2293 |
[
|
2294 |
object,
|
2295 |
local,
|
2296 |
uuid(913c24a0-20ab-11d2-9038-00a0c9697298),
|
2297 |
pointer_default(unique)
|
2298 |
]
|
2299 |
interface IDDrawExclModeVideoCallback : IUnknown {
|
2300 |
|
2301 |
// Called once before UpdateOverlay is called with bBefore == TRUE
|
2302 |
// and once after it is called with bBefore == FALSE and otherwise
|
2303 |
// identical parameters
|
2304 |
HRESULT OnUpdateOverlay(
|
2305 |
[in] BOOL bBefore, // After UpdateOverlayCalled?
|
2306 |
[in] DWORD dwFlags,// _AM_OVERLAY_NOTIFY enum
|
2307 |
[in] BOOL bOldVisible,
|
2308 |
[in] const RECT *prcOldSrc,
|
2309 |
[in] const RECT *prcOldDest,
|
2310 |
[in] BOOL bNewVisible,
|
2311 |
[in] const RECT *prcNewSrc,
|
2312 |
[in] const RECT *prcNewDest);
|
2313 |
|
2314 |
// Called when the surface color key is changed
|
2315 |
HRESULT OnUpdateColorKey(
|
2316 |
[in] const COLORKEY *pKey,
|
2317 |
[in] DWORD dwColor);
|
2318 |
|
2319 |
// Called when the video size or aspect ratio changes
|
2320 |
HRESULT OnUpdateSize( [in] DWORD dwWidth, // Movie pixel width
|
2321 |
[in] DWORD dwHeight, // Movie pixel height
|
2322 |
[in] DWORD dwARWidth, // Aspect ratio horizontal
|
2323 |
[in] DWORD dwARHeight); // Aspect ratio vertical
|
2324 |
}
|