home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the 3D Game Programming Gurus / gurus.iso / DirectX / dx9sdkcp.exe / SDK (C++) / Include / dvdevcod.h < prev    next >
Encoding:
C/C++ Source or Header  |  2002-11-12  |  15.7 KB  |  364 lines

  1. //------------------------------------------------------------------------------
  2. // File: DVDevCod.h
  3. //
  4. // Desc: List of standard DVD-Video event codes and the expected params.
  5. //
  6. // Copyright (c) 1992 - 2001, Microsoft Corporation.  All rights reserved.
  7. //------------------------------------------------------------------------------
  8.  
  9. #ifndef __DVDEVCOD__
  10. #define __DVDEVCOD__
  11.  
  12.  
  13. #define EC_DVDBASE                          0x0100
  14.  
  15. #ifndef EXCLUDE_DVDEVCODE_ENUMS
  16.  
  17. typedef enum _tagDVD_ERROR {
  18.     DVD_ERROR_Unexpected=1,         // Something unexpected happened, perhaps content
  19.                                     //   is incorrectly authored.  Playback is stopped.
  20.     DVD_ERROR_CopyProtectFail=2,    // Key exchange for DVD copy protection failed. 
  21.                                     //   Playback is stopped.
  22.     DVD_ERROR_InvalidDVD1_0Disc=3,  // DVD-Video disc is incorrectly authored for v1.0 
  23.                                     //   of spec. Playback is stopped.
  24.     DVD_ERROR_InvalidDiscRegion=4,  // The Disc cannot be played because the disc is not
  25.                                     // authored to play in system region.
  26.                                     // The region mismatch may be fixable by 
  27.                                     // changing the system region with dvdrgn.exe
  28.     DVD_ERROR_LowParentalLevel=5,   // Player parental level is lower than the lowest parental
  29.                                     //   level available in the DVD content. Playback is stopped.
  30.     DVD_ERROR_MacrovisionFail=6,    // Macrovision Distribution Failed.
  31.                                     // Playback is stopped.
  32.     DVD_ERROR_IncompatibleSystemAndDecoderRegions=7,
  33.                                     // No discs can be played because the system region
  34.                                     // does not match the decoder region.
  35.     DVD_ERROR_IncompatibleDiscAndDecoderRegions=8
  36.                                     // The disc cannot be played because the disc is
  37.                                     // not authored to be played in the decoder's region
  38. } DVD_ERROR;
  39.  
  40. typedef enum _tagDVD_WARNING {
  41.     DVD_WARNING_InvalidDVD1_0Disc=1,// DVD-Video disc is incorrectly authored. Playback
  42.                                     //   can continue, but unexpected behavior may occur.
  43.     DVD_WARNING_FormatNotSupported=2,// A decoder would not support the current format.  Playback
  44.                                     //   of a stream (audio, video of SP) may not function.
  45.                                     //   lParam2 contains the stream type (see AM_DVD_STREAM_FLAGS)
  46.     DVD_WARNING_IllegalNavCommand=3,// The internal DVD navigation command processor attempted to 
  47.                                     //   process an illegal command.
  48.     DVD_WARNING_Open = 4,           // File Open Failed
  49.     DVD_WARNING_Seek = 5,           // File Seek Failed
  50.     DVD_WARNING_Read = 6            // File Read Failed
  51. } DVD_WARNING;
  52.  
  53. typedef enum _tagDVD_PB_STOPPED {
  54.     DVD_PB_STOPPED_Other=0,                 // The navigator stopped the playback (no reason available).
  55.     DVD_PB_STOPPED_NoBranch=1,              // The nav completed the current pgc and there was no more video and
  56.                                             // did not find any other branching instruction for subsequent playback.
  57.     DVD_PB_STOPPED_NoFirstPlayDomain =2,    // The disc does not contain an initial startup program.
  58.     DVD_PB_STOPPED_StopCommand = 3,         // The app issued a stop() command or a stop command was authored on the disc.
  59.     DVD_PB_STOPPED_Reset=4,                 // The navigator was reset to the start of the disc (using ResetOnStop).
  60.     DVD_PB_STOPPED_DiscEjected=5,           // The disc was ejected.
  61.     DVD_PB_STOPPED_IllegalNavCommand = 6,   // An illegal nav command prevented playback from continuing.
  62.     DVD_PB_STOPPED_PlayPeriodAutoStop = 7,  // PlayPeriod completed
  63.     DVD_PB_STOPPED_PlayChapterAutoStop = 8, // PlayChapter completed
  64.     DVD_PB_STOPPED_ParentalFailure = 9,     // A parental level failure prevented playback
  65.     DVD_PB_STOPPED_RegionFailure = 10,      // A region failure prevented playback
  66.     DVD_PB_STOPPED_MacrovisionFailure = 11, // A Macrovision failure prevented playback.
  67.     DVD_PB_STOPPED_DiscReadError = 12,      // A read error prevented playback.
  68.     DVD_PB_STOPPED_CopyProtectFailure = 13  // Copy protection failure.
  69. } DVD_PB_STOPPED;
  70.  
  71.  
  72. #endif
  73.  
  74. // DVD-Video event codes
  75. // ======================
  76. //
  77. // All DVD-Video event are always passed on to the application, and are 
  78. // never processed by the filter graph
  79.  
  80.  
  81. #define EC_DVD_DOMAIN_CHANGE                    (EC_DVDBASE + 0x01)
  82. // Parameters: ( DWORD, void ) 
  83. // lParam1 is enum DVD_DOMAIN, and indicates the player's new domain
  84. //
  85. // Raised from following domains: all
  86. //
  87. // Signaled when ever the DVD player changes domains.
  88.  
  89.  
  90. #define EC_DVD_TITLE_CHANGE                     (EC_DVDBASE + 0x02)
  91. // Parameters: ( DWORD, void ) 
  92. // lParam1 is the new title number.
  93. //
  94. // Raised from following domains: DVD_DOMAIN_Title
  95. //
  96. // Indicates when the current title number changes.  Title numbers
  97. // range 1 to 99.  This indicates the TTN, which is the title number
  98. // with respect to the whole disc, not the VTS_TTN which is the title
  99. // number with respect to just a current VTS.
  100.  
  101.  
  102. #define EC_DVD_CHAPTER_START                   (EC_DVDBASE + 0x03)
  103. // Parameters: ( DWORD, void ) 
  104. // lParam1 is the new chapter number (which is the program number for 
  105. // One_Sequential_PGC_Titles).
  106. //
  107. // Raised from following domains: DVD_DOMAIN_Title
  108. //
  109. // Signales that DVD player started playback of a new program in the Title 
  110. // domain.  This is only signaled for One_Sequential_PGC_Titles.
  111.  
  112.  
  113. #define EC_DVD_AUDIO_STREAM_CHANGE              (EC_DVDBASE + 0x04)
  114. // Parameters: ( DWORD, void ) 
  115. // lParam1 is the new user audio stream number.
  116. //
  117. // Raised from following domains: all
  118. //
  119. // Signaled when ever the current user audio stream number changes for the main 
  120. // title.  This can be changed automatically with a navigation command on disc
  121. // as well as through IDVDAnnexJ.
  122. // Audio stream numbers range from 0 to 7.  Stream 0xffffffff
  123. // indicates that no stream is selected.
  124.  
  125. #define EC_DVD_SUBPICTURE_STREAM_CHANGE         (EC_DVDBASE + 0x05)
  126. // Parameters: ( DWORD, BOOL ) 
  127. // lParam1 is the new user subpicture stream number.
  128. // lParam2 is the subpicture's on/off state (TRUE if on)
  129. //
  130. // Raised from following domains: all
  131. //
  132. // Signaled when ever the current user subpicture stream number changes for the main 
  133. // title.  This can be changed automatically with a navigation command on disc
  134. // as well as through IDVDAnnexJ.  
  135. // Subpicture stream numbers range from 0 to 31.  Stream 0xffffffff
  136. // indicates that no stream is selected.  
  137.  
  138. #define EC_DVD_ANGLE_CHANGE                     (EC_DVDBASE + 0x06)
  139. // Parameters: ( DWORD, DWORD ) 
  140. // lParam1 is the number of available angles.
  141. // lParam2 is the current user angle number.
  142. //
  143. // Raised from following domains: all
  144. //
  145. // Signaled when ever either 
  146. //   a) the number of available angles changes, or  
  147. //   b) the current user angle number changes.
  148. // Current angle number can be changed automatically with navigation command 
  149. // on disc as well as through IDVDAnnexJ.
  150. // When the number of available angles is 1, the current video is not multiangle.
  151. // Angle numbers range from 1 to 9.
  152.  
  153.  
  154. #define EC_DVD_BUTTON_CHANGE                    (EC_DVDBASE + 0x07)
  155. // Parameters: ( DWORD, DWORD ) 
  156. // lParam1 is the number of available buttons.
  157. // lParam2 is the current selected button number.
  158. //
  159. // Raised from following domains: all
  160. //
  161. // Signaled when ever either 
  162. //   a) the number of available buttons changes, or  
  163. //   b) the current selected button number changes.
  164. // The current selected button can be changed automatically with navigation 
  165. // commands on disc as well as through IDVDAnnexJ.  
  166. // Button numbers range from 1 to 36.  Selected button number 0 implies that
  167. // no button is selected.  Note that these button numbers enumerate all 
  168. // available button numbers, and do not always correspond to button numbers
  169. // used for IDVDAnnexJ::ButtonSelectAndActivate since only a subset of buttons
  170. // may be activated with ButtonSelectAndActivate.
  171.  
  172.  
  173. #define EC_DVD_VALID_UOPS_CHANGE                (EC_DVDBASE + 0x08)
  174. // Parameters: ( DWORD, void ) 
  175. // lParam1 is a VALID_UOP_SOMTHING_OR_OTHER bit-field stuct which indicates
  176. //   which IDVDAnnexJ commands are explicitly disable by the DVD disc.
  177. //
  178. // Raised from following domains: all
  179. //
  180. // Signaled when ever the available set of IDVDAnnexJ methods changes.  This
  181. // only indicates which operations are explicited disabled by the content on 
  182. // the DVD disc, and does not guarentee that it is valid to call methods 
  183. // which are not disabled.  For example, if no buttons are currently present,
  184. // IDVDAnnexJ::ButtonActivate() won't work, even though the buttons are not
  185. // explicitly disabled. 
  186.  
  187.  
  188. #define EC_DVD_STILL_ON                         (EC_DVDBASE + 0x09)
  189. // Parameters: ( BOOL, DWORD ) 
  190. // lParam1 == 0  -->  buttons are available, so StillOff won't work
  191. // lParam1 == 1  -->  no buttons available, so StillOff will work
  192. // lParam2 indicates the number of seconds the still will last, with 0xffffffff 
  193. //   indicating an infinite still (wait till button or StillOff selected).
  194. //
  195. // Raised from following domains: all
  196. //
  197. // Signaled at the beginning of any still: PGC still, Cell Still, or VOBU Still.
  198. // Note that all combinations of buttons and still are possible (buttons on with
  199. // still on, buttons on with still off, button off with still on, button off
  200. // with still off).
  201.  
  202. #define EC_DVD_STILL_OFF                         (EC_DVDBASE + 0x0a)
  203. // Parameters: ( void, void ) 
  204. //
  205. //   Indicating that any still that is currently active
  206. //   has been released.
  207. //
  208. // Raised from following domains: all
  209. //
  210. // Signaled at the end of any still: PGC still, Cell Still, or VOBU Still.
  211. //
  212.  
  213. #define EC_DVD_CURRENT_TIME                     (EC_DVDBASE + 0x0b)
  214. // Parameters: ( DWORD, BOOL ) 
  215. // lParam1 is a DVD_TIMECODE which indicates the current 
  216. //   playback time code in a BCD HH:MM:SS:FF format.
  217. // lParam2 == 0  -->  time code is 25 frames/sec
  218. // lParam2 == 1  -->  time code is 30 frames/sec (non-drop).
  219. // lParam2 == 2  -->  time code is invalid (current playback time 
  220. //                    cannot be determined for current title)
  221. //
  222. // Raised from following domains: DVD_DOMAIN_Title
  223. //
  224. // Signaled at the beginning of every VOBU, which occurs every .4 to 1.0 sec.
  225. // This is only signaled for One_Sequential_PGC_Titles.
  226.  
  227.  
  228. #define EC_DVD_ERROR                            (EC_DVDBASE + 0x0c)
  229. // Parameters: ( DWORD, void) 
  230. // lParam1 is an enum DVD_ERROR which notifies the app of some error condition.
  231. //
  232. // Raised from following domains: all
  233. //
  234.  
  235. #define EC_DVD_WARNING                           (EC_DVDBASE + 0x0d)
  236. // Parameters: ( DWORD, DWORD) 
  237. // lParam1 is an enum DVD_WARNING which notifies the app of some warning condition.
  238. // lParam2 contains more specific information about the warning (warning dependent)
  239. //
  240. // Raised from following domains: all
  241. //
  242.  
  243. #define EC_DVD_CHAPTER_AUTOSTOP                  (EC_DVDBASE + 0x0e)
  244. // Parameters: (BOOL, void)
  245. // lParam1 is a BOOL which indicates the reason for the cancellation of ChapterPlayAutoStop
  246. // lParam1 == 0 indicates successful completion of ChapterPlayAutoStop
  247. // lParam1 == 1 indicates that ChapterPlayAutoStop is being cancelled as a result of another
  248. //            IDVDControl call or the end of content has been reached & no more chapters
  249. //            can be played.
  250. //  Indicating that playback is stopped as a result of a call
  251. //  to IDVDControl::ChapterPlayAutoStop()
  252. //
  253. // Raised from following domains : DVD_DOMAIN_TITLE
  254. //
  255.  
  256. #define EC_DVD_NO_FP_PGC                         (EC_DVDBASE + 0x0f)
  257. //  Parameters : (void, void)
  258. //
  259. //  Raised from the following domains : FP_DOM
  260. //
  261. //  Indicates that the DVD disc does not have a FP_PGC (First Play Program Chain)
  262. //  and the DVD Navigator will not automatically load any PGC and start playback.
  263. //
  264.  
  265. #define EC_DVD_PLAYBACK_RATE_CHANGE              (EC_DVDBASE + 0x10)
  266. //  Parameters : (LONG, void)
  267. //  lParam1 is a LONG indicating the new playback rate.
  268. //  lParam1 < 0 indicates reverse playback mode.
  269. //  lParam1 > 0 indicates forward playback mode
  270. //  Value of lParam1 is the actual playback rate multiplied by 10000.
  271. //  i.e. lParam1 = rate * 10000
  272. //
  273. //  Raised from the following domains : TT_DOM
  274. //
  275. //  Indicates that a rate change in playback has been initiated and the parameter
  276. //  lParam1 indicates the new playback rate that is being used.
  277. //
  278.  
  279. #define EC_DVD_PARENTAL_LEVEL_CHANGE            (EC_DVDBASE + 0x11)
  280. //  Parameters : (LONG, void)
  281. //  lParam1 is a LONG indicating the new parental level.
  282. //
  283. //  Raised from the following domains : VMGM_DOM
  284. //
  285. //  Indicates that an authored Nav command has changed the parental level
  286. //  setting in the player.
  287. //
  288.  
  289. #define EC_DVD_PLAYBACK_STOPPED                 (EC_DVDBASE + 0x12)
  290. //  Parameters : (DWORD, void)
  291. //
  292. //  Raised from the following domains : All Domains
  293. //
  294. // Indicates that playback has been stopped as the Navigator has completed
  295. // playback of the pgc and did not find any other branching instruction for
  296. // subsequent playback.
  297. //
  298. //  The DWORD returns the reason for the completion of the playback.  See
  299. //  The DVD_PB_STOPPED enumeration for details.
  300. //
  301.  
  302. #define EC_DVD_ANGLES_AVAILABLE                 (EC_DVDBASE + 0x13)
  303. //  Parameters : (BOOL, void)
  304. //  lParam1 == 0 indicates that playback is not in an angle block and angles are
  305. //             not available
  306. //  lParam1 == 1 indicates that an angle block is being played back and angle changes
  307. //             can be performed.
  308. //
  309. //  Indicates whether an angle block is being played and if angle changes can be 
  310. //  performed. However, angle changes are not restricted to angle blocks and the
  311. //  manifestation of the angle change can be seen only in an angle block.
  312.  
  313. #define EC_DVD_PLAYPERIOD_AUTOSTOP              (EC_DVDBASE + 0x14)
  314. // Parameters: (void, void)
  315. // Sent when the PlayPeriodInTitle completes or is cancelled
  316. //
  317. // Raised from following domains : DVD_DOMAIN_TITLE
  318. //
  319.  
  320. #define EC_DVD_BUTTON_AUTO_ACTIVATED                 (EC_DVDBASE + 0x15)
  321. // Parameters: (DWORD button, void)
  322. // Sent when a button is automatically activated
  323. //
  324. // Raised from following domains : DVD_DOMAIN_MENU
  325. //
  326.  
  327. #define EC_DVD_CMD_START                 (EC_DVDBASE + 0x16)
  328. // Parameters: (CmdID, HRESULT)
  329. // Sent when a command begins
  330. //
  331.  
  332. #define EC_DVD_CMD_END                 (EC_DVDBASE + 0x17)
  333. // Parameters: (CmdID, HRESULT)
  334. // Sent when a command completes
  335. //
  336.  
  337. #define EC_DVD_DISC_EJECTED                (EC_DVDBASE + 0x18)
  338. // Parameters: none
  339. // Sent when the nav detects that a disc was ejected and stops the playback
  340. // The app does not need to take any action to stop the playback.
  341. //
  342.  
  343. #define EC_DVD_DISC_INSERTED                (EC_DVDBASE + 0x19)
  344. // Parameters: none
  345. // Sent when the nav detects that a disc was inserted and the nav begins playback
  346. // The app does not need to take any action to start the playback.
  347. //
  348.  
  349. #define EC_DVD_CURRENT_HMSF_TIME                     (EC_DVDBASE + 0x1a)
  350. // Parameters: ( ULONG, ULONG ) 
  351. // lParam2 contains a union of the DVD_TIMECODE_FLAGS
  352. // lParam1 contains a DVD_HMSF_TIMECODE.  Assign lParam1 to a ULONG then cast the
  353. // ULONG as a DVD_HMSF_TIMECODE to use its values.
  354. //
  355. // Raised from following domains: DVD_DOMAIN_Title
  356. //
  357. // Signaled at the beginning of every VOBU, which occurs every .4 to 1.0 sec.
  358.  
  359. #define EC_DVD_KARAOKE_MODE                     (EC_DVDBASE + 0x1b)
  360. // Parameters: ( BOOL, reserved ) 
  361. // lParam1 is either TRUE (a karaoke track is being played) or FALSE (no karaoke data is being played).
  362. //
  363. #endif // __DVDEVCOD__
  364.