Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2324 lines
90 KiB

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