home *** CD-ROM | disk | FTP | other *** search
/ PC Format (South-Africa) 2001 June / PCFJune.iso / Xenon / C++ / FreeCommandLineTools.exe / Include / evcode.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-01-31  |  12.1 KB  |  302 lines

  1. #pragma option push -b -a8 -pc -A- /*P_O_Push*/
  2. //==========================================================================;
  3. //
  4. //  THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
  5. //  KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
  6. //  IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR
  7. //  PURPOSE.
  8. //
  9. //  Copyright (c) 1992 - 1997  Microsoft Corporation.  All Rights Reserved.
  10. //
  11. //--------------------------------------------------------------------------;
  12.  
  13. //
  14. // list of standard Quartz event codes and the expected params
  15. //
  16.  
  17. // Event codes are broken into two groups
  18. //   -- system event codes
  19. //   -- extension event codes
  20. // All system event codes are below EC_USER
  21.  
  22. #define EC_SYSTEMBASE                       0x00
  23. #define EC_USER                             0x8000
  24.  
  25. // System-defined event codes
  26. // ==========================
  27. //
  28. // There are three types of system-defined event codes:
  29. //
  30. // 1.  Those which are always passed through to the application
  31. //     (To be collected by calls to GetEvent or within WaitForCompletion.)
  32. //     (e.g. EC_ERRORABORT, EC_USERABORT.)
  33. //
  34. // 2.  Those which are pure internal and will never be passed to
  35. //     the application.  (e.g. EC_SHUTDOWN)
  36. //
  37. // 3.  Those which have default handling.  Default handing implies that
  38. //     the event is not passed to the application.  However, default
  39. //     handling may be canceled by calling
  40. //     IMediaEvent::CancelDefaultHandling.  If the default handling is
  41. //     cancelled in this way, then the message will be delivered to the
  42. //     application and the application must action it appropriately.
  43. //     Default handling can be restored by calling RestoreDefaultHandling.
  44. //
  45. // We will refer to these events as application, internal and defaulted
  46. // events respectively.
  47. //
  48. // System-defined events may have interface pointers, BSTR's, etc passed
  49. // as parameters.  It is therefore essential that, for any message
  50. // retrieved using GetEvent, a matching call to FreeEventParams is made
  51. // to ensure that relevant interfaces are released and storage freed.
  52. // Failure to call FreeEventParams will result in memory leaks, if not
  53. // worse.
  54. //
  55. // Filters sending these messages to the filter graph should not AddRef()
  56. // any interfaces that they may pass as parameters.  The filter graph
  57. // manager will AddRef them if required.  E.g. if the event is to be queued
  58. // for the application or queued to a worker thread.
  59.  
  60. // Each event listed below is immediately followed by a parameter list
  61. // detailing the types of the parameters associated with the message,
  62. // and an indication of whether the message is an application, internal
  63. // or defaulted message.  This is then followed by a short description.
  64. // The use of "void" in the parameter list implies that the parameter is not
  65. // used.  Such parameters should be zero.
  66.  
  67. // Other defined EC_ regions:
  68. // DVD event codes           0x0100 - 0x0150 (dvdevcod.h)
  69. // audio device event codes  0x0200 - 0x0250 (audevcod.h)
  70.  
  71. #define EC_COMPLETE                         0x01
  72. // ( HRESULT, void ) : defaulted (special)
  73. // Signals the completed playback of a stream within the graph.  This message
  74. // is sent by renderers when they receive end-of-stream.  The default handling
  75. // of this message results in a _SINGLE_ EC_COMPLETE being sent to the
  76. // application when ALL of the individual renderers have signaled EC_COMPLETE
  77. // to the filter graph.  If the default handing is canceled, the application
  78. // will see all of the individual EC_COMPLETEs.
  79.  
  80.  
  81. #define EC_USERABORT                        0x02
  82. // ( void, void ) : application
  83. // In some sense, the user has requested that playback be terminated.
  84. // This message is typically sent by renderers that render into a
  85. // window if the user closes the window into which it was rendering.
  86. // It is up to the application to decide if playback should actually
  87. // be stopped.
  88.  
  89.  
  90. #define EC_ERRORABORT                       0x03
  91. // ( HRESULT, void ) : application
  92. // Operation aborted because of error
  93.  
  94.  
  95. #define EC_TIME                             0x04
  96. // ( DWORD, DWORD ) : application
  97. // The requested reference time occurred.  (This event is currently not used).
  98. // lParam1 is low dword of ref time, lParam2 is high dword of reftime.
  99.  
  100.  
  101. #define EC_REPAINT                          0x05
  102. // ( IPin * (could be NULL), void ) : defaulted
  103. // A repaint is required - lParam1 contains the (IPin *) that needs the data
  104. // to be sent again. Default handling is: if the output pin which the IPin is
  105. // attached  to supports the IMediaEventSink interface then it will be called
  106. // with the EC_REPAINT first.  If that fails then normal repaint processing is
  107. // done by the filter graph.
  108.  
  109.  
  110. // Stream error notifications
  111. #define EC_STREAM_ERROR_STOPPED             0x06
  112. #define EC_STREAM_ERROR_STILLPLAYING        0x07
  113. // ( HRESULT, DWORD ) : application
  114. // lParam 1 is major code, lParam2 is minor code, either may be zero.
  115.  
  116.  
  117. #define EC_ERROR_STILLPLAYING               0x08
  118. // ( HRESULT, void ) : application
  119. // The filter graph manager may issue Run's to the graph asynchronously.
  120. // If such a Run fails, EC_ERROR_STILLPLAYING is issued to notify the
  121. // application of the failure.  The state of the underlying filters
  122. // at such a time will be indeterminate - they will all have been asked
  123. // to run, but some are almost certainly not.
  124.  
  125.  
  126. #define EC_PALETTE_CHANGED                  0x09
  127. // ( void, void ) : application
  128. // notify application that the video palette has changed
  129.  
  130.  
  131. #define EC_VIDEO_SIZE_CHANGED               0x0A
  132. // ( DWORD, void ) : application
  133. // Sent by video renderers.
  134. // Notifies the application that the native video size has changed.
  135. // LOWORD of the DWORD is the new width, HIWORD is the new height.
  136.  
  137.  
  138. #define EC_QUALITY_CHANGE                   0x0B
  139. // ( void, void ) : application
  140. // Notify application that playback degradation has occurred
  141.  
  142.  
  143. #define EC_SHUTTING_DOWN                    0x0C
  144. // ( void, void ) : internal
  145. // This message is sent by the filter graph manager to any plug-in
  146. // distributors which support IMediaEventSink to notify them that
  147. // the filter graph is starting to shutdown.
  148.  
  149.  
  150. #define EC_CLOCK_CHANGED                    0x0D
  151. // ( void, void ) : application
  152. // Notify application that the clock has changed.
  153. // (i.e. SetSyncSource has been called on the filter graph and has been
  154. // distributed successfully to the filters in the graph.)
  155.  
  156.  
  157. #define EC_PAUSED                           0x0E
  158. // ( HRESULT, void ) : application
  159. // Notify application the previous pause request has completed
  160.  
  161.  
  162. #define EC_OPENING_FILE                        0x10
  163. #define EC_BUFFERING_DATA                   0x11
  164. // ( BOOL, void ) : application
  165. // lParam1 == 1   --> starting to open file or buffer data
  166. // lParam1 == 0   --> not opening or buffering any more
  167. // (This event does not appear to be used by ActiveMovie.)
  168.  
  169.  
  170. #define EC_FULLSCREEN_LOST                  0x12
  171. // ( void, IBaseFilter * ) : application
  172. // Sent by full screen renderers when switched away from full screen.
  173. // IBaseFilter may be NULL.
  174.  
  175.  
  176. #define EC_ACTIVATE                         0x13
  177. // ( BOOL, IBaseFilter * ) : internal
  178. // Sent by video renderers when they lose or gain activation.
  179. // lParam1 is set to 1 if gained or 0 if lost
  180. // lParam2 is the IBaseFilter* for the filter that is sending the message
  181. // Used for sound follows focus and full-screen switching
  182.  
  183.  
  184. #define EC_NEED_RESTART                     0x14
  185. // ( void, void ) : defaulted
  186. // Sent by renderers when they regain a resource (e.g. audio renderer).
  187. // Causes a restart by Pause/put_Current/Run (if running).
  188.  
  189.  
  190. #define EC_WINDOW_DESTROYED                 0x15
  191. // ( IBaseFilter *, void ) : internal
  192. // Sent by video renderers when the window has been destroyed. Handled
  193. // by the filter graph / distributor telling the resource manager.
  194. // lParam1 is the IBaseFilter* of the filter whose window is being destroyed
  195.  
  196.  
  197. #define EC_DISPLAY_CHANGED                  0x16
  198. // ( IPin *, void ) : internal
  199. // Sent by renderers when they detect a display change. the filter graph
  200. // will arrange for the graph to be stopped and the pin send in lParam1
  201. // to be reconnected. by being reconnected it allows a renderer to reset
  202. // and connect with a more appropriate format for the new display mode
  203. // lParam1 contains an (IPin *) that should be reconnected by the graph
  204.  
  205.  
  206. #define EC_STARVATION                       0x17
  207. // ( void, void ) : defaulted
  208. // Sent by a filter when it detects starvation. Default handling (only when
  209. // running) is for the graph to be paused until all filters enter the
  210. // paused state and then run. Normally this would be sent by a parser or source
  211. // filter when too little data is arriving.
  212.  
  213.  
  214. #define EC_OLE_EVENT                0x18
  215. // ( BSTR, BSTR ) : application
  216. // Sent by a filter to pass a text string to the application.
  217. // Conventionally, the first string is a type, and the second a parameter.
  218.  
  219.  
  220. #define EC_NOTIFY_WINDOW                    0x19
  221. // ( HWND, void ) : internal
  222. // Pass the window handle around during pin connection.
  223.  
  224. #define EC_STREAM_CONTROL_STOPPED        0x1A
  225. // ( IPin * pSender, DWORD dwCookie )
  226. // Notification that an earlier call to IAMStreamControl::StopAt
  227. // has now take effect.  Calls to the method can be marked
  228. // with a cookie which is passed back in the second parameter,
  229. // allowing applications to easily tie together request
  230. // and completion notifications.
  231. //
  232. // NB: IPin will point to the pin that actioned the Stop.  This
  233. // may not be the pin that the StopAt was sent to.
  234.  
  235. #define EC_STREAM_CONTROL_STARTED        0x1B
  236. // ( IPin * pSender, DWORD dwCookie )
  237. // Notification that an earlier call to IAMStreamControl::StartAt
  238. // has now take effect.  Calls to the method can be marked
  239. // with a cookie which is passed back in the second parameter,
  240. // allowing applications to easily tie together request
  241. // and completion notifications.
  242. //
  243. // NB: IPin will point to the pin that actioned the Start.  This
  244. // may not be the pin that the StartAt was sent to.
  245.  
  246. #define EC_END_OF_SEGMENT                   0x1C
  247. //
  248. // ( const REFERENCE_TIME *pStreamTimeAtEndOfSegment, DWORD dwSegmentNumber )
  249. //
  250. // pStreamTimeAtEndOfSegment
  251. //     pointer to the accumulated stream clock
  252. //     time since the start of the segment - this is directly computable
  253. //     as the sum of the previous and current segment durations (Stop - Start)
  254. //     and the rate applied to each segment
  255. //     The source add this time to the time within each segment to get
  256. //     a total elapsed time
  257. //
  258. // dwSegmentNumber
  259. //     Segment number - starts at 0
  260. //
  261. // Notifies that a segment end has been reached when the
  262. // AM_SEEKING_Segment flags was set for IMediaSeeking::SetPositions
  263. // Passes in an IMediaSeeking interface to allow the next segment
  264. // to be defined by the application
  265.  
  266. #define EC_SEGMENT_STARTED                  0x1D
  267. //
  268. // ( const REFERENCE_TIME *pStreamTimeAtStartOfSegment, DWORD dwSegmentNumber)
  269. //
  270. // pStreamTimeAtStartOfSegment
  271. //     pointer to the accumulated stream clock
  272. //     time since the start of the segment - this is directly computable
  273. //     as the sum of the previous segment durations (Stop - Start)
  274. //     and the rate applied to each segment
  275. //
  276. // dwSegmentNumber
  277. //     Segment number - starts at 0
  278. //
  279. // Notifies that a new segment has been started.
  280. // This is sent synchronously by any entity that will issue
  281. // EC_END_OF_SEGMENT when a new segment is started
  282. // (See IMediaSeeking::SetPositions - AM_SEEKING_Segment flag)
  283. // It is used to compute how many EC_END_OF_SEGMENT notifications
  284. // to expect at the end of a segment and as a consitency check
  285.  
  286. #define EC_LENGTH_CHANGED                  0x1E
  287. // (void, void)
  288. // sent to indicate that the length of the "file" has changed
  289.  
  290.  
  291. #define EC_TIMECODE_AVAILABLE            0x30
  292. // Sent by filter supporting timecode
  293. // Param1 has a pointer to the sending object
  294. // Param2 has the device ID of the sending object
  295.  
  296. #define EC_EXTDEVICE_MODE_CHANGE        0x31
  297. // Sent by filter supporting IAMExtDevice
  298. // Param1 has the new mode
  299. // Param2 has the device ID of the sending object
  300.  
  301. #pragma option pop /*P_O_Pop*/
  302.