/[cvs]/api/include/evcode.h
ViewVC logotype

Annotation of /api/include/evcode.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1.1.1 - (hide annotations) (vendor branch)
Sun Jul 1 20:47:59 2001 UTC (23 years, 4 months ago) by bearsoft
Branch: lazy, MAIN
CVS Tags: start, HEAD
Changes since 1.1: +0 -0 lines
File MIME type: text/plain
First import

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

root@recompile.se
ViewVC Help
Powered by ViewVC 1.1.26