]>
Commit | Line | Data |
---|---|---|
1 | ///////////////////////////////////////////////////////////////////////////// | |
2 | // Name: src/msw/mediactrl_am.cpp | |
3 | // Purpose: ActiveMovie/WMP6/PocketPC 2000 Media Backend for Windows | |
4 | // Author: Ryan Norton <wxprojects@comcast.net> | |
5 | // Modified by: | |
6 | // Created: 01/29/05 | |
7 | // RCS-ID: $Id$ | |
8 | // Copyright: (c) Ryan Norton | |
9 | // Licence: wxWindows licence | |
10 | ///////////////////////////////////////////////////////////////////////////// | |
11 | ||
12 | // TODO: Actually test the CE IWMP.... | |
13 | // TODO: Actually test HTTP proxies... | |
14 | ||
15 | //-----------------Introduction---------------------------------------------- | |
16 | // This is the media backend for Windows Media Player 6 and ActiveMovie, | |
17 | // as well as PocketPC 2000, Windows Media Player Mobile 7 and 8. | |
18 | // | |
19 | // We use a combination of the WMP 6 IMediaPlayer interface as well as the | |
20 | // ActiveMovie interface IActiveMovie that even exists on Windows 3. For | |
21 | // mobile systems we switch to IWMP for WMP mobile 7 and 8 and possibly | |
22 | // earlier. We just use ifdefs for differentiating between IWMP and | |
23 | // IActiveMovie/IMediaPlayer as the IWMP and IMediaPlayer are virtually | |
24 | // identical with a few minor exceptions. | |
25 | // | |
26 | // For supporting HTTP proxies and such we query the media player | |
27 | // interface (IActiveMovie/IWMP) for the INSPlay (NetShow) interface. | |
28 | // | |
29 | // The IMediaPlayer/IActiveMovie/IWMP are rather clean and straightforward | |
30 | // interfaces that are fairly simplistic. | |
31 | // | |
32 | // Docs for IMediaPlayer are at | |
33 | // http://msdn.microsoft.com/library/en-us/wmp6sdk/htm/microsoftwindowsmediaplayercontrolversion64sdk.asp | |
34 | // | |
35 | // Docs for IWMP are at | |
36 | // http://msdn.microsoft.com/library/en-us/wcewmp/html/_wcesdk_asx_wmp_control_reference.asp | |
37 | ||
38 | //=========================================================================== | |
39 | // DECLARATIONS | |
40 | //=========================================================================== | |
41 | ||
42 | //--------------------------------------------------------------------------- | |
43 | // Pre-compiled header stuff | |
44 | //--------------------------------------------------------------------------- | |
45 | ||
46 | // For compilers that support precompilation, includes "wx.h". | |
47 | #include "wx/wxprec.h" | |
48 | ||
49 | #ifdef __BORLANDC__ | |
50 | #pragma hdrstop | |
51 | #endif | |
52 | ||
53 | // disable "cast truncates constant value" for VARIANT_BOOL values | |
54 | // passed as parameters in VC6 | |
55 | #ifdef _MSC_VER | |
56 | #pragma warning (disable:4310) | |
57 | #endif | |
58 | ||
59 | #if wxUSE_MEDIACTRL && wxUSE_ACTIVEX | |
60 | ||
61 | #include "wx/mediactrl.h" | |
62 | ||
63 | #ifndef WX_PRECOMP | |
64 | #include "wx/log.h" | |
65 | #include "wx/dcclient.h" | |
66 | #include "wx/timer.h" | |
67 | #include "wx/math.h" // log10 & pow | |
68 | #include "wx/stopwatch.h" | |
69 | #endif | |
70 | ||
71 | #include "wx/msw/private.h" // user info and wndproc setting/getting | |
72 | #include "wx/dynlib.h" | |
73 | ||
74 | //--------------------------------------------------------------------------- | |
75 | // wxActiveXContainer - includes all the COM-specific stuff we need | |
76 | //--------------------------------------------------------------------------- | |
77 | #include "wx/msw/ole/activex.h" | |
78 | ||
79 | // It may sound odd, but you can actually compile this with | |
80 | // __WXWINCE__ enabled on non-CE windows | |
81 | //#define __WXWINCE__ | |
82 | ||
83 | //--------------------------------------------------------------------------- | |
84 | // IIDS - used by CoCreateInstance and IUnknown::QueryInterface | |
85 | // | |
86 | // [idl name] [idl decription] | |
87 | // amcompat.idl Microsoft Active Movie Control (Ver 2.0) | |
88 | // nscompat.idl Microsoft NetShow Player (Ver 1.0) | |
89 | // msdxm.idl Windows Media Player (Ver 1.0) | |
90 | // quartz.idl | |
91 | // | |
92 | // First, when I say I "from XXX.idl", I mean I go into the COM Browser | |
93 | // ($Microsoft Visual Studio$/Common/Tools/OLEVIEW.EXE), open | |
94 | // "type libraries", open a specific type library (for quartz for example its | |
95 | // "ActiveMovie control type library (V1.0)"), save it as an .idl, compile the | |
96 | // idl using the midl compiler that comes with visual studio | |
97 | // ($Microsoft Visual Studio$/VC98/bin/midl.exe on VC6) with the /h argument | |
98 | // to make it generate stubs (a .h & .c file), then clean up the generated | |
99 | // interfaces I want with the STDMETHOD wrappers and then put them into | |
100 | // mediactrl.cpp. | |
101 | // | |
102 | // According to the MSDN docs, IMediaPlayer requires Windows 98 SE | |
103 | // or greater. NetShow is available on Windows 3.1 and I'm guessing | |
104 | // IActiveMovie is too. IMediaPlayer is essentially the Windows Media | |
105 | // Player 6.4 SDK. | |
106 | // | |
107 | // IWMP is from PlayerOCX.idl on PocketPC 2000, which uses CLSID_MediaPlayer | |
108 | // as well as the main windows line. | |
109 | // | |
110 | // Some of these are not used but are kept here for future reference anyway | |
111 | //--------------------------------------------------------------------------- | |
112 | const IID IID_IActiveMovie = {0x05589FA2,0xC356,0x11CE,{0xBF,0x01,0x00,0xAA,0x00,0x55,0x59,0x5A}}; | |
113 | const IID IID_IActiveMovie2 = {0xB6CD6554,0xE9CB,0x11D0,{0x82,0x1F,0x00,0xA0,0xC9,0x1F,0x9C,0xA0}}; | |
114 | const IID IID_IActiveMovie3 = {0x265EC140,0xAE62,0x11D1,{0x85,0x00,0x00,0xA0,0xC9,0x1F,0x9C,0xA0}}; | |
115 | ||
116 | const IID IID_INSOPlay = {0x2179C5D1,0xEBFF,0x11CF,{0xB6,0xFD,0x00,0xAA,0x00,0xB4,0xE2,0x20}}; | |
117 | const IID IID_INSPlay = {0xE7C4BE80,0x7960,0x11D0,{0xB7,0x27,0x00,0xAA,0x00,0xB4,0xE2,0x20}}; | |
118 | const IID IID_INSPlay1 = {0x265EC141,0xAE62,0x11D1,{0x85,0x00,0x00,0xA0,0xC9,0x1F,0x9C,0xA0}}; | |
119 | ||
120 | const IID IID_IMediaPlayer = {0x22D6F311,0xB0F6,0x11D0,{0x94,0xAB,0x00,0x80,0xC7,0x4C,0x7E,0x95}}; | |
121 | const IID IID_IMediaPlayer2 = {0x20D4F5E0,0x5475,0x11D2,{0x97,0x74,0x00,0x00,0xF8,0x08,0x55,0xE6}}; | |
122 | ||
123 | ||
124 | #ifdef __WXWINCE__ | |
125 | const IID IID_IWMP = {0x136B66EC,0xF30D,0x46A8,{0x88,0xDD,0xF2,0xD0,0x55,0x16,0x3E,0x49}}; | |
126 | #endif | |
127 | ||
128 | const CLSID CLSID_ActiveMovie = {0x05589FA1,0xC356,0x11CE,{0xBF,0x01,0x00,0xAA,0x00,0x55,0x59,0x5A}}; | |
129 | const CLSID CLSID_MediaPlayer = {0x22D6F312,0xB0F6,0x11D0,{0x94,0xAB,0x00,0x80,0xC7,0x4C,0x7E,0x95}}; | |
130 | const CLSID CLSID_NSPlay = {0x2179C5D3,0xEBFF,0x11CF,{0xB6,0xFD,0x00,0xAA,0x00,0xB4,0xE2,0x20}}; | |
131 | ||
132 | const IID IID_IAMOpenProgress = {0x8E1C39A1, 0xDE53, 0x11CF,{0xAA, 0x63, 0x00, 0x80, 0xC7, 0x44, 0x52, 0x8D}}; | |
133 | ||
134 | // QUARTZ | |
135 | const CLSID CLSID_FilgraphManager = {0xE436EBB3,0x524F,0x11CE,{0x9F,0x53,0x00,0x20,0xAF,0x0B,0xA7,0x70}}; | |
136 | const IID IID_IMediaEvent = {0x56A868B6,0x0AD4,0x11CE,{0xB0,0x3A,0x00,0x20,0xAF,0x0B,0xA7,0x70}}; | |
137 | ||
138 | //?? QUARTZ Also? | |
139 | const CLSID CLSID_VideoMixingRenderer9 ={0x51B4ABF3, 0x748F, 0x4E3B,{0xA2, 0x76, 0xC8, 0x28, 0x33, 0x0E, 0x92, 0x6A}}; | |
140 | const IID IID_IVMRWindowlessControl9 = {0x8F537D09, 0xF85E, 0x4414,{0xB2, 0x3B, 0x50, 0x2E, 0x54, 0xC7, 0x99, 0x27}}; | |
141 | const IID IID_IFilterGraph = {0x56A8689F, 0x0AD4, 0x11CE,{0xB0, 0x3A, 0x00, 0x20, 0xAF, 0x0B, 0xA7, 0x70}}; | |
142 | const IID IID_IGraphBuilder = {0x56A868A9, 0x0AD4, 0x11CE,{0xB0, 0x3A, 0x00, 0x20, 0xAF, 0x0B, 0xA7, 0x70}}; | |
143 | const IID IID_IVMRFilterConfig9 = {0x5A804648, 0x4F66, 0x4867,{0x9C, 0x43, 0x4F, 0x5C, 0x82, 0x2C, 0xF1, 0xB8}}; | |
144 | const IID IID_IBaseFilter = {0x56A86895, 0x0AD4, 0x11CE,{0xB0, 0x3A, 0x00, 0x20, 0xAF, 0x0B, 0xA7, 0x70}}; | |
145 | ||
146 | //--------------------------------------------------------------------------- | |
147 | // QUARTZ COM INTERFACES (dumped from quartz.idl from MSVC COM Browser) | |
148 | //--------------------------------------------------------------------------- | |
149 | ||
150 | struct IAMOpenProgress : public IUnknown | |
151 | { | |
152 | STDMETHOD(QueryProgress)(LONGLONG *pllTotal, LONGLONG *pllCurrent) PURE; | |
153 | STDMETHOD(AbortOperation)(void) PURE; | |
154 | }; | |
155 | ||
156 | struct IMediaEvent : public IDispatch | |
157 | { | |
158 | STDMETHOD(GetEventHandle)(LONG_PTR *) PURE; | |
159 | STDMETHOD(GetEvent)(long *, LONG_PTR *, LONG_PTR *, long) PURE; | |
160 | STDMETHOD(WaitForCompletion)(long, long *) PURE; | |
161 | STDMETHOD(CancelDefaultHandling)(long) PURE; | |
162 | STDMETHOD(RestoreDefaultHandling)(long) PURE; | |
163 | STDMETHOD(FreeEventParams)(long, LONG_PTR, LONG_PTR) PURE; | |
164 | }; | |
165 | ||
166 | //--------------------------------------------------------------------------- | |
167 | // ACTIVEMOVIE COM INTERFACES (dumped from amcompat.idl from MSVC COM Browser) | |
168 | //--------------------------------------------------------------------------- | |
169 | ||
170 | enum ReadyStateConstants | |
171 | { | |
172 | amvUninitialized = 0, | |
173 | amvLoading = 1, | |
174 | amvInteractive = 3, | |
175 | amvComplete = 4 | |
176 | }; | |
177 | ||
178 | enum StateConstants | |
179 | { | |
180 | amvNotLoaded = -1, | |
181 | amvStopped = 0, | |
182 | amvPaused = 1, | |
183 | amvRunning = 2 | |
184 | }; | |
185 | ||
186 | enum DisplayModeConstants | |
187 | { | |
188 | amvTime = 0, | |
189 | amvFrames = 1 | |
190 | }; | |
191 | ||
192 | enum WindowSizeConstants | |
193 | { | |
194 | amvOriginalSize = 0, | |
195 | amvDoubleOriginalSize = 1, | |
196 | amvOneSixteenthScreen = 2, | |
197 | amvOneFourthScreen = 3, | |
198 | amvOneHalfScreen = 4 | |
199 | }; | |
200 | ||
201 | enum AppearanceConstants | |
202 | { | |
203 | amvFlat = 0, | |
204 | amv3D = 1 | |
205 | }; | |
206 | ||
207 | enum BorderStyleConstants | |
208 | { | |
209 | amvNone = 0, | |
210 | amvFixedSingle = 1 | |
211 | }; | |
212 | ||
213 | struct IActiveMovie : public IDispatch | |
214 | { | |
215 | STDMETHOD(AboutBox)( void) PURE; | |
216 | STDMETHOD(Run)( void) PURE; | |
217 | STDMETHOD(Pause)( void) PURE; | |
218 | STDMETHOD(Stop)( void) PURE; | |
219 | STDMETHOD(get_ImageSourceWidth)(long __RPC_FAR *pWidth) PURE; | |
220 | STDMETHOD(get_ImageSourceHeight)(long __RPC_FAR *pHeight) PURE; | |
221 | STDMETHOD(get_Author)(BSTR __RPC_FAR *pbstrAuthor) PURE; | |
222 | STDMETHOD(get_Title)(BSTR __RPC_FAR *pbstrTitle) PURE; | |
223 | STDMETHOD(get_Copyright)(BSTR __RPC_FAR *pbstrCopyright) PURE; | |
224 | STDMETHOD(get_Description)(BSTR __RPC_FAR *pbstrDescription) PURE; | |
225 | STDMETHOD(get_Rating)(BSTR __RPC_FAR *pbstrRating) PURE; | |
226 | STDMETHOD(get_FileName)(BSTR __RPC_FAR *pbstrFileName) PURE; | |
227 | STDMETHOD(put_FileName)(BSTR pbstrFileName) PURE; | |
228 | STDMETHOD(get_Duration)(double __RPC_FAR *pValue) PURE; | |
229 | STDMETHOD(get_CurrentPosition)(double __RPC_FAR *pValue) PURE; | |
230 | STDMETHOD(put_CurrentPosition)(double pValue) PURE; | |
231 | STDMETHOD(get_PlayCount)(long __RPC_FAR *pPlayCount) PURE; | |
232 | STDMETHOD(put_PlayCount)(long pPlayCount) PURE; | |
233 | STDMETHOD(get_SelectionStart)(double __RPC_FAR *pValue) PURE; | |
234 | STDMETHOD(put_SelectionStart)(double pValue) PURE; | |
235 | STDMETHOD(get_SelectionEnd)(double __RPC_FAR *pValue) PURE; | |
236 | STDMETHOD(put_SelectionEnd)(double pValue) PURE; | |
237 | STDMETHOD(get_CurrentState)(StateConstants __RPC_FAR *pState) PURE; | |
238 | STDMETHOD(get_Rate)(double __RPC_FAR *pValue) PURE; | |
239 | STDMETHOD(put_Rate)(double pValue) PURE; | |
240 | STDMETHOD(get_Volume)(long __RPC_FAR *pValue) PURE; | |
241 | STDMETHOD(put_Volume)(long pValue) PURE; | |
242 | STDMETHOD(get_Balance)(long __RPC_FAR *pValue) PURE; | |
243 | STDMETHOD(put_Balance)(long pValue) PURE; | |
244 | STDMETHOD(get_EnableContextMenu)(VARIANT_BOOL __RPC_FAR *pEnable) PURE; | |
245 | STDMETHOD(put_EnableContextMenu)(VARIANT_BOOL pEnable) PURE; | |
246 | STDMETHOD(get_ShowDisplay)(VARIANT_BOOL __RPC_FAR *Show) PURE; | |
247 | STDMETHOD(put_ShowDisplay)(VARIANT_BOOL Show) PURE; | |
248 | STDMETHOD(get_ShowControls)(VARIANT_BOOL __RPC_FAR *Show) PURE; | |
249 | STDMETHOD(put_ShowControls)(VARIANT_BOOL Show) PURE; | |
250 | STDMETHOD(get_ShowPositionControls)(VARIANT_BOOL __RPC_FAR *Show) PURE; | |
251 | STDMETHOD(put_ShowPositionControls)(VARIANT_BOOL Show) PURE; | |
252 | STDMETHOD(get_ShowSelectionControls)(VARIANT_BOOL __RPC_FAR *Show) PURE; | |
253 | STDMETHOD(put_ShowSelectionControls)(VARIANT_BOOL Show) PURE; | |
254 | STDMETHOD(get_ShowTracker)(VARIANT_BOOL __RPC_FAR *Show) PURE; | |
255 | STDMETHOD(put_ShowTracker)(VARIANT_BOOL Show) PURE; | |
256 | STDMETHOD(get_EnablePositionControls)(VARIANT_BOOL __RPC_FAR *Enable) PURE; | |
257 | STDMETHOD(put_EnablePositionControls)(VARIANT_BOOL Enable) PURE; | |
258 | STDMETHOD(get_EnableSelectionControls)(VARIANT_BOOL __RPC_FAR *Enable) PURE; | |
259 | STDMETHOD(put_EnableSelectionControls)(VARIANT_BOOL Enable) PURE; | |
260 | STDMETHOD(get_EnableTracker)(VARIANT_BOOL __RPC_FAR *Enable) PURE; | |
261 | STDMETHOD(put_EnableTracker)(VARIANT_BOOL Enable) PURE; | |
262 | STDMETHOD(get_AllowHideDisplay)(VARIANT_BOOL __RPC_FAR *Show) PURE; | |
263 | STDMETHOD(put_AllowHideDisplay)(VARIANT_BOOL Show) PURE; | |
264 | STDMETHOD(get_AllowHideControls)(VARIANT_BOOL __RPC_FAR *Show) PURE; | |
265 | STDMETHOD(put_AllowHideControls)(VARIANT_BOOL Show) PURE; | |
266 | STDMETHOD(get_DisplayMode)(DisplayModeConstants __RPC_FAR *pValue) PURE; | |
267 | STDMETHOD(put_DisplayMode)(DisplayModeConstants pValue) PURE; | |
268 | STDMETHOD(get_AllowChangeDisplayMode)(VARIANT_BOOL __RPC_FAR *fAllow) PURE; | |
269 | STDMETHOD(put_AllowChangeDisplayMode)(VARIANT_BOOL fAllow) PURE; | |
270 | STDMETHOD(get_FilterGraph)(IUnknown __RPC_FAR *__RPC_FAR *ppFilterGraph) PURE; | |
271 | STDMETHOD(put_FilterGraph)(IUnknown __RPC_FAR *ppFilterGraph) PURE; | |
272 | STDMETHOD(get_FilterGraphDispatch)(IDispatch __RPC_FAR *__RPC_FAR *pDispatch) PURE; | |
273 | STDMETHOD(get_DisplayForeColor)(unsigned long __RPC_FAR *ForeColor) PURE; | |
274 | STDMETHOD(put_DisplayForeColor)(unsigned long ForeColor) PURE; | |
275 | STDMETHOD(get_DisplayBackColor)(unsigned long __RPC_FAR *BackColor) PURE; | |
276 | STDMETHOD(put_DisplayBackColor)(unsigned long BackColor) PURE; | |
277 | STDMETHOD(get_MovieWindowSize)(WindowSizeConstants __RPC_FAR *WindowSize) PURE; | |
278 | STDMETHOD(put_MovieWindowSize)(WindowSizeConstants WindowSize) PURE; | |
279 | STDMETHOD(get_FullScreenMode)(VARIANT_BOOL __RPC_FAR *pEnable) PURE; | |
280 | STDMETHOD(put_FullScreenMode)(VARIANT_BOOL pEnable) PURE; | |
281 | STDMETHOD(get_AutoStart)(VARIANT_BOOL __RPC_FAR *pEnable) PURE; | |
282 | STDMETHOD(put_AutoStart)(VARIANT_BOOL pEnable) PURE; | |
283 | STDMETHOD(get_AutoRewind)(VARIANT_BOOL __RPC_FAR *pEnable) PURE; | |
284 | STDMETHOD(put_AutoRewind)(VARIANT_BOOL pEnable) PURE; | |
285 | STDMETHOD(get_hWnd)(long __RPC_FAR *hWnd) PURE; | |
286 | STDMETHOD(get_Appearance)(AppearanceConstants __RPC_FAR *pAppearance) PURE; | |
287 | STDMETHOD(put_Appearance)(AppearanceConstants pAppearance) PURE; | |
288 | STDMETHOD(get_BorderStyle)(BorderStyleConstants __RPC_FAR *pBorderStyle) PURE; | |
289 | STDMETHOD(put_BorderStyle)(BorderStyleConstants pBorderStyle) PURE; | |
290 | STDMETHOD(get_Enabled)(VARIANT_BOOL __RPC_FAR *pEnabled) PURE; | |
291 | STDMETHOD(put_Enabled)(VARIANT_BOOL pEnabled) PURE; | |
292 | STDMETHOD(get_Info)(long __RPC_FAR *ppInfo) PURE; | |
293 | }; | |
294 | ||
295 | ||
296 | ||
297 | struct IActiveMovie2 : public IActiveMovie | |
298 | { | |
299 | STDMETHOD(IsSoundCardEnabled)(VARIANT_BOOL __RPC_FAR *pbSoundCard) PURE; | |
300 | STDMETHOD(get_ReadyState)(ReadyStateConstants __RPC_FAR *pValue) PURE; | |
301 | }; | |
302 | ||
303 | struct IActiveMovie3 : public IActiveMovie2 | |
304 | { | |
305 | STDMETHOD(get_MediaPlayer)(IDispatch __RPC_FAR *__RPC_FAR *ppDispatch) PURE; | |
306 | }; | |
307 | ||
308 | ||
309 | //--------------------------------------------------------------------------- | |
310 | // MEDIAPLAYER COM INTERFACES (dumped from msdxm.idl from MSVC COM Browser) | |
311 | //--------------------------------------------------------------------------- | |
312 | ||
313 | enum MPPlayStateConstants | |
314 | { | |
315 | mpStopped = 0, | |
316 | mpPaused = 1, | |
317 | mpPlaying = 2, | |
318 | mpWaiting = 3, | |
319 | mpScanForward = 4, | |
320 | mpScanReverse = 5, | |
321 | mpClosed = 6 | |
322 | }; | |
323 | ||
324 | enum MPDisplaySizeConstants | |
325 | { | |
326 | mpDefaultSize = 0, | |
327 | mpHalfSize = 1, | |
328 | mpDoubleSize = 2, | |
329 | mpFullScreen = 3, | |
330 | mpFitToSize = 4, | |
331 | mpOneSixteenthScreen = 5, | |
332 | mpOneFourthScreen = 6, | |
333 | mpOneHalfScreen = 7 | |
334 | }; | |
335 | ||
336 | enum MPReadyStateConstants | |
337 | { | |
338 | mpReadyStateUninitialized = 0, | |
339 | mpReadyStateLoading = 1, | |
340 | mpReadyStateInteractive = 3, | |
341 | mpReadyStateComplete = 4 | |
342 | }; | |
343 | ||
344 | typedef unsigned long VB_OLE_COLOR; | |
345 | ||
346 | enum MPDisplayModeConstants | |
347 | { | |
348 | mpTime = 0, | |
349 | mpFrames = 1 | |
350 | }; | |
351 | ||
352 | enum MPMoreInfoType | |
353 | { | |
354 | mpShowURL = 0, | |
355 | mpClipURL = 1, | |
356 | mpBannerURL = 2 | |
357 | }; | |
358 | ||
359 | enum MPMediaInfoType | |
360 | { | |
361 | mpShowFilename = 0, | |
362 | mpShowTitle = 1, | |
363 | mpShowAuthor = 2, | |
364 | mpShowCopyright = 3, | |
365 | mpShowRating = 4, | |
366 | mpShowDescription = 5, | |
367 | mpShowLogoIcon = 6, | |
368 | mpClipFilename = 7, | |
369 | mpClipTitle = 8, | |
370 | mpClipAuthor = 9, | |
371 | mpClipCopyright = 10, | |
372 | mpClipRating = 11, | |
373 | mpClipDescription = 12, | |
374 | mpClipLogoIcon = 13, | |
375 | mpBannerImage = 14, | |
376 | mpBannerMoreInfo = 15, | |
377 | mpWatermark = 16 | |
378 | }; | |
379 | ||
380 | enum DVDMenuIDConstants | |
381 | { | |
382 | dvdMenu_Title = 2, | |
383 | dvdMenu_Root = 3, | |
384 | dvdMenu_Subpicture = 4, | |
385 | dvdMenu_Audio = 5, | |
386 | dvdMenu_Angle = 6, | |
387 | dvdMenu_Chapter = 7 | |
388 | }; | |
389 | ||
390 | enum MPShowDialogConstants | |
391 | { | |
392 | mpShowDialogHelp = 0, | |
393 | mpShowDialogStatistics = 1, | |
394 | mpShowDialogOptions = 2, | |
395 | mpShowDialogContextMenu = 3 | |
396 | }; | |
397 | ||
398 | ||
399 | struct IMediaPlayer : public IDispatch | |
400 | { | |
401 | STDMETHOD(get_CurrentPosition)(double __RPC_FAR *pCurrentPosition) PURE; | |
402 | STDMETHOD(put_CurrentPosition)(double pCurrentPosition) PURE; | |
403 | STDMETHOD(get_Duration)(double __RPC_FAR *pDuration) PURE; | |
404 | STDMETHOD(get_ImageSourceWidth)(long __RPC_FAR *pWidth) PURE; | |
405 | STDMETHOD(get_ImageSourceHeight)(long __RPC_FAR *pHeight) PURE; | |
406 | STDMETHOD(get_MarkerCount)(long __RPC_FAR *pMarkerCount) PURE; | |
407 | STDMETHOD(get_CanScan)(VARIANT_BOOL __RPC_FAR *pCanScan) PURE; | |
408 | STDMETHOD(get_CanSeek)(VARIANT_BOOL __RPC_FAR *pCanSeek) PURE; | |
409 | STDMETHOD(get_CanSeekToMarkers)(VARIANT_BOOL __RPC_FAR *pCanSeekToMarkers) PURE; | |
410 | STDMETHOD(get_CurrentMarker)(long __RPC_FAR *pCurrentMarker) PURE; | |
411 | STDMETHOD(put_CurrentMarker)(long pCurrentMarker) PURE; | |
412 | STDMETHOD(get_FileName)(BSTR __RPC_FAR *pbstrFileName) PURE; | |
413 | STDMETHOD(put_FileName)(BSTR pbstrFileName) PURE; | |
414 | STDMETHOD(get_SourceLink)(BSTR __RPC_FAR *pbstrSourceLink) PURE; | |
415 | STDMETHOD(get_CreationDate)(DATE __RPC_FAR *pCreationDate) PURE; | |
416 | STDMETHOD(get_ErrorCorrection)(BSTR __RPC_FAR *pbstrErrorCorrection) PURE; | |
417 | STDMETHOD(get_Bandwidth)(long __RPC_FAR *pBandwidth) PURE; | |
418 | STDMETHOD(get_SourceProtocol)(long __RPC_FAR *pSourceProtocol) PURE; | |
419 | STDMETHOD(get_ReceivedPackets)(long __RPC_FAR *pReceivedPackets) PURE; | |
420 | STDMETHOD(get_RecoveredPackets)(long __RPC_FAR *pRecoveredPackets) PURE; | |
421 | STDMETHOD(get_LostPackets)(long __RPC_FAR *pLostPackets) PURE; | |
422 | STDMETHOD(get_ReceptionQuality)(long __RPC_FAR *pReceptionQuality) PURE; | |
423 | STDMETHOD(get_BufferingCount)(long __RPC_FAR *pBufferingCount) PURE; | |
424 | STDMETHOD(get_IsBroadcast)(VARIANT_BOOL __RPC_FAR *pIsBroadcast) PURE; | |
425 | STDMETHOD(get_BufferingProgress)(long __RPC_FAR *pBufferingProgress) PURE; | |
426 | STDMETHOD(get_ChannelName)(BSTR __RPC_FAR *pbstrChannelName) PURE; | |
427 | STDMETHOD(get_ChannelDescription)(BSTR __RPC_FAR *pbstrChannelDescription) PURE; | |
428 | STDMETHOD(get_ChannelURL)(BSTR __RPC_FAR *pbstrChannelURL) PURE; | |
429 | STDMETHOD(get_ContactAddress)(BSTR __RPC_FAR *pbstrContactAddress) PURE; | |
430 | STDMETHOD(get_ContactPhone)(BSTR __RPC_FAR *pbstrContactPhone) PURE; | |
431 | STDMETHOD(get_ContactEmail)(BSTR __RPC_FAR *pbstrContactEmail) PURE; | |
432 | STDMETHOD(get_BufferingTime)(double __RPC_FAR *pBufferingTime) PURE; | |
433 | STDMETHOD(put_BufferingTime)(double pBufferingTime) PURE; | |
434 | STDMETHOD(get_AutoStart)(VARIANT_BOOL __RPC_FAR *pAutoStart) PURE; | |
435 | STDMETHOD(put_AutoStart)(VARIANT_BOOL pAutoStart) PURE; | |
436 | STDMETHOD(get_AutoRewind)(VARIANT_BOOL __RPC_FAR *pAutoRewind) PURE; | |
437 | STDMETHOD(put_AutoRewind)(VARIANT_BOOL pAutoRewind) PURE; | |
438 | STDMETHOD(get_Rate)(double __RPC_FAR *pRate) PURE; | |
439 | STDMETHOD(put_Rate)(double pRate) PURE; | |
440 | STDMETHOD(get_SendKeyboardEvents)(VARIANT_BOOL __RPC_FAR *pSendKeyboardEvents) PURE; | |
441 | STDMETHOD(put_SendKeyboardEvents)(VARIANT_BOOL pSendKeyboardEvents) PURE; | |
442 | STDMETHOD(get_SendMouseClickEvents)(VARIANT_BOOL __RPC_FAR *pSendMouseClickEvents) PURE; | |
443 | STDMETHOD(put_SendMouseClickEvents)(VARIANT_BOOL pSendMouseClickEvents) PURE; | |
444 | STDMETHOD(get_SendMouseMoveEvents)(VARIANT_BOOL __RPC_FAR *pSendMouseMoveEvents) PURE; | |
445 | STDMETHOD(put_SendMouseMoveEvents)(VARIANT_BOOL pSendMouseMoveEvents) PURE; | |
446 | STDMETHOD(get_PlayCount)(long __RPC_FAR *pPlayCount) PURE; | |
447 | STDMETHOD(put_PlayCount)(long pPlayCount) PURE; | |
448 | STDMETHOD(get_ClickToPlay)(VARIANT_BOOL __RPC_FAR *pClickToPlay) PURE; | |
449 | STDMETHOD(put_ClickToPlay)(VARIANT_BOOL pClickToPlay) PURE; | |
450 | STDMETHOD(get_AllowScan)(VARIANT_BOOL __RPC_FAR *pAllowScan) PURE; | |
451 | STDMETHOD(put_AllowScan)(VARIANT_BOOL pAllowScan) PURE; | |
452 | STDMETHOD(get_EnableContextMenu)(VARIANT_BOOL __RPC_FAR *pEnableContextMenu) PURE; | |
453 | STDMETHOD(put_EnableContextMenu)(VARIANT_BOOL pEnableContextMenu) PURE; | |
454 | STDMETHOD(get_CursorType)(long __RPC_FAR *pCursorType) PURE; | |
455 | STDMETHOD(put_CursorType)(long pCursorType) PURE; | |
456 | STDMETHOD(get_CodecCount)(long __RPC_FAR *pCodecCount) PURE; | |
457 | STDMETHOD(get_AllowChangeDisplaySize)(VARIANT_BOOL __RPC_FAR *pAllowChangeDisplaySize) PURE; | |
458 | STDMETHOD(put_AllowChangeDisplaySize)( VARIANT_BOOL pAllowChangeDisplaySize) PURE; | |
459 | STDMETHOD(get_IsDurationValid)(VARIANT_BOOL __RPC_FAR *pIsDurationValid) PURE; | |
460 | STDMETHOD(get_OpenState)(long __RPC_FAR *pOpenState) PURE; | |
461 | STDMETHOD(get_SendOpenStateChangeEvents)(VARIANT_BOOL __RPC_FAR *pSendOpenStateChangeEvents) PURE; | |
462 | STDMETHOD(put_SendOpenStateChangeEvents)(VARIANT_BOOL pSendOpenStateChangeEvents) PURE; | |
463 | STDMETHOD(get_SendWarningEvents)( VARIANT_BOOL __RPC_FAR *pSendWarningEvents) PURE; | |
464 | STDMETHOD(put_SendWarningEvents)(VARIANT_BOOL pSendWarningEvents) PURE; | |
465 | STDMETHOD(get_SendErrorEvents)(VARIANT_BOOL __RPC_FAR *pSendErrorEvents) PURE; | |
466 | STDMETHOD(put_SendErrorEvents)(VARIANT_BOOL pSendErrorEvents) PURE; | |
467 | STDMETHOD(get_PlayState)(MPPlayStateConstants __RPC_FAR *pPlayState) PURE; | |
468 | STDMETHOD(get_SendPlayStateChangeEvents)(VARIANT_BOOL __RPC_FAR *pSendPlayStateChangeEvents) PURE; | |
469 | STDMETHOD(put_SendPlayStateChangeEvents)(VARIANT_BOOL pSendPlayStateChangeEvents) PURE; | |
470 | STDMETHOD(get_DisplaySize)(MPDisplaySizeConstants __RPC_FAR *pDisplaySize) PURE; | |
471 | STDMETHOD(put_DisplaySize)(MPDisplaySizeConstants pDisplaySize) PURE; | |
472 | STDMETHOD(get_InvokeURLs)(VARIANT_BOOL __RPC_FAR *pInvokeURLs) PURE; | |
473 | STDMETHOD(put_InvokeURLs)(VARIANT_BOOL pInvokeURLs) PURE; | |
474 | STDMETHOD(get_BaseURL)(BSTR __RPC_FAR *pbstrBaseURL) PURE; | |
475 | STDMETHOD(put_BaseURL)(BSTR pbstrBaseURL) PURE; | |
476 | STDMETHOD(get_DefaultFrame)(BSTR __RPC_FAR *pbstrDefaultFrame) PURE; | |
477 | STDMETHOD(put_DefaultFrame)(BSTR pbstrDefaultFrame) PURE; | |
478 | STDMETHOD(get_HasError)(VARIANT_BOOL __RPC_FAR *pHasError) PURE; | |
479 | STDMETHOD(get_ErrorDescription)(BSTR __RPC_FAR *pbstrErrorDescription) PURE; | |
480 | STDMETHOD(get_ErrorCode)(long __RPC_FAR *pErrorCode) PURE; | |
481 | STDMETHOD(get_AnimationAtStart)(VARIANT_BOOL __RPC_FAR *pAnimationAtStart) PURE; | |
482 | STDMETHOD(put_AnimationAtStart)(VARIANT_BOOL pAnimationAtStart) PURE; | |
483 | STDMETHOD(get_TransparentAtStart)( VARIANT_BOOL __RPC_FAR *pTransparentAtStart) PURE; | |
484 | STDMETHOD(put_TransparentAtStart)(VARIANT_BOOL pTransparentAtStart) PURE; | |
485 | STDMETHOD(get_Volume)(long __RPC_FAR *pVolume) PURE; | |
486 | STDMETHOD(put_Volume)(long pVolume) PURE; | |
487 | STDMETHOD(get_Balance)(long __RPC_FAR *pBalance) PURE; | |
488 | STDMETHOD(put_Balance)(long pBalance) PURE; | |
489 | STDMETHOD(get_ReadyState)(MPReadyStateConstants __RPC_FAR *pValue) PURE; | |
490 | STDMETHOD(get_SelectionStart)(double __RPC_FAR *pValue) PURE; | |
491 | STDMETHOD(put_SelectionStart)(double pValue) PURE; | |
492 | STDMETHOD(get_SelectionEnd)(double __RPC_FAR *pValue) PURE; | |
493 | STDMETHOD(put_SelectionEnd)(double pValue) PURE; | |
494 | STDMETHOD(get_ShowDisplay)(VARIANT_BOOL __RPC_FAR *Show) PURE; | |
495 | STDMETHOD(put_ShowDisplay)(VARIANT_BOOL Show) PURE; | |
496 | STDMETHOD(get_ShowControls)(VARIANT_BOOL __RPC_FAR *Show) PURE; | |
497 | STDMETHOD(put_ShowControls)(VARIANT_BOOL Show) PURE; | |
498 | STDMETHOD(get_ShowPositionControls)(VARIANT_BOOL __RPC_FAR *Show) PURE; | |
499 | STDMETHOD(put_ShowPositionControls)(VARIANT_BOOL Show) PURE; | |
500 | STDMETHOD(get_ShowTracker)(VARIANT_BOOL __RPC_FAR *Show) PURE; | |
501 | STDMETHOD(put_ShowTracker)(VARIANT_BOOL Show) PURE; | |
502 | STDMETHOD(get_EnablePositionControls)(VARIANT_BOOL __RPC_FAR *Enable) PURE; | |
503 | STDMETHOD(put_EnablePositionControls)(VARIANT_BOOL Enable) PURE; | |
504 | STDMETHOD(get_EnableTracker)(VARIANT_BOOL __RPC_FAR *Enable) PURE; | |
505 | STDMETHOD(put_EnableTracker)(VARIANT_BOOL Enable) PURE; | |
506 | STDMETHOD(get_Enabled)(VARIANT_BOOL __RPC_FAR *pEnabled) PURE; | |
507 | STDMETHOD(put_Enabled)(VARIANT_BOOL pEnabled) PURE; | |
508 | STDMETHOD(get_DisplayForeColor)(VB_OLE_COLOR __RPC_FAR *ForeColor) PURE; | |
509 | STDMETHOD(put_DisplayForeColor)(VB_OLE_COLOR ForeColor) PURE; | |
510 | STDMETHOD(get_DisplayBackColor)(VB_OLE_COLOR __RPC_FAR *BackColor) PURE; | |
511 | STDMETHOD(put_DisplayBackColor)(VB_OLE_COLOR BackColor) PURE; | |
512 | STDMETHOD(get_DisplayMode)(MPDisplayModeConstants __RPC_FAR *pValue) PURE; | |
513 | STDMETHOD(put_DisplayMode)(MPDisplayModeConstants pValue) PURE; | |
514 | STDMETHOD(get_VideoBorder3D)(VARIANT_BOOL __RPC_FAR *pVideoBorderWidth) PURE; | |
515 | STDMETHOD(put_VideoBorder3D)(VARIANT_BOOL pVideoBorderWidth) PURE; | |
516 | STDMETHOD(get_VideoBorderWidth)(long __RPC_FAR *pVideoBorderWidth) PURE; | |
517 | STDMETHOD(put_VideoBorderWidth)(long pVideoBorderWidth) PURE; | |
518 | STDMETHOD(get_VideoBorderColor)(VB_OLE_COLOR __RPC_FAR *pVideoBorderWidth) PURE; | |
519 | STDMETHOD(put_VideoBorderColor)(VB_OLE_COLOR pVideoBorderWidth) PURE; | |
520 | STDMETHOD(get_ShowGotoBar)(VARIANT_BOOL __RPC_FAR *pbool) PURE; | |
521 | STDMETHOD(put_ShowGotoBar)(VARIANT_BOOL pbool) PURE; | |
522 | STDMETHOD(get_ShowStatusBar)(VARIANT_BOOL __RPC_FAR *pbool) PURE; | |
523 | STDMETHOD(put_ShowStatusBar)(VARIANT_BOOL pbool) PURE; | |
524 | STDMETHOD(get_ShowCaptioning)(VARIANT_BOOL __RPC_FAR *pbool) PURE; | |
525 | STDMETHOD(put_ShowCaptioning)(VARIANT_BOOL pbool) PURE; | |
526 | STDMETHOD(get_ShowAudioControls)(VARIANT_BOOL __RPC_FAR *pbool) PURE; | |
527 | STDMETHOD(put_ShowAudioControls)(VARIANT_BOOL pbool) PURE; | |
528 | STDMETHOD(get_CaptioningID)( BSTR __RPC_FAR *pstrText) PURE; | |
529 | STDMETHOD(put_CaptioningID)(BSTR pstrText) PURE; | |
530 | STDMETHOD(get_Mute)(VARIANT_BOOL __RPC_FAR *vbool) PURE; | |
531 | STDMETHOD(put_Mute)(VARIANT_BOOL vbool) PURE; | |
532 | STDMETHOD(get_CanPreview)(VARIANT_BOOL __RPC_FAR *pCanPreview) PURE; | |
533 | STDMETHOD(get_PreviewMode)(VARIANT_BOOL __RPC_FAR *pPreviewMode) PURE; | |
534 | STDMETHOD(put_PreviewMode)(VARIANT_BOOL pPreviewMode) PURE; | |
535 | STDMETHOD(get_HasMultipleItems)(VARIANT_BOOL __RPC_FAR *pHasMuliItems) PURE; | |
536 | STDMETHOD(get_Language)(long __RPC_FAR *pLanguage) PURE; | |
537 | STDMETHOD(put_Language)(long pLanguage) PURE; | |
538 | STDMETHOD(get_AudioStream)(long __RPC_FAR *pStream) PURE; | |
539 | STDMETHOD(put_AudioStream)(long pStream) PURE; | |
540 | STDMETHOD(get_SAMIStyle)(BSTR __RPC_FAR *pbstrStyle) PURE; | |
541 | STDMETHOD(put_SAMIStyle)(BSTR pbstrStyle) PURE; | |
542 | STDMETHOD(get_SAMILang)(BSTR __RPC_FAR *pbstrLang) PURE; | |
543 | STDMETHOD(put_SAMILang)(BSTR pbstrLang) PURE; | |
544 | STDMETHOD(get_SAMIFileName)(BSTR __RPC_FAR *pbstrFileName) PURE; | |
545 | STDMETHOD(put_SAMIFileName)(BSTR pbstrFileName) PURE; | |
546 | STDMETHOD(get_StreamCount)( long __RPC_FAR *pStreamCount) PURE; | |
547 | STDMETHOD(get_ClientId)(BSTR __RPC_FAR *pbstrClientId) PURE; | |
548 | STDMETHOD(get_ConnectionSpeed)(long __RPC_FAR *plConnectionSpeed) PURE; | |
549 | STDMETHOD(get_AutoSize)(VARIANT_BOOL __RPC_FAR *pbool) PURE; | |
550 | STDMETHOD(put_AutoSize)(VARIANT_BOOL pbool) PURE; | |
551 | STDMETHOD(get_EnableFullScreenControls)(VARIANT_BOOL __RPC_FAR *pbVal) PURE; | |
552 | STDMETHOD(put_EnableFullScreenControls)(VARIANT_BOOL pbVal) PURE; | |
553 | STDMETHOD(get_ActiveMovie)(IDispatch __RPC_FAR *__RPC_FAR *ppdispatch) PURE; | |
554 | STDMETHOD(get_NSPlay)(IDispatch __RPC_FAR *__RPC_FAR *ppdispatch) PURE; | |
555 | STDMETHOD(get_WindowlessVideo)(VARIANT_BOOL __RPC_FAR *pbool) PURE; | |
556 | STDMETHOD(put_WindowlessVideo)(VARIANT_BOOL pbool) PURE; | |
557 | STDMETHOD(Play)(void) PURE; | |
558 | STDMETHOD(Stop)(void) PURE; | |
559 | STDMETHOD(Pause)(void) PURE; | |
560 | STDMETHOD(GetMarkerTime)(long MarkerNum, | |
561 | double __RPC_FAR *pMarkerTime) PURE; | |
562 | STDMETHOD(GetMarkerName)(long MarkerNum, | |
563 | BSTR __RPC_FAR *pbstrMarkerName) PURE; | |
564 | STDMETHOD(AboutBox)(void) PURE; | |
565 | STDMETHOD(GetCodecInstalled)(long CodecNum, | |
566 | VARIANT_BOOL __RPC_FAR *pCodecInstalled) PURE; | |
567 | STDMETHOD(GetCodecDescription)(long CodecNum, | |
568 | BSTR __RPC_FAR *pbstrCodecDescription) PURE; | |
569 | STDMETHOD(GetCodecURL)(long CodecNum, | |
570 | BSTR __RPC_FAR *pbstrCodecURL) PURE; | |
571 | STDMETHOD(GetMoreInfoURL)(MPMoreInfoType MoreInfoType, | |
572 | BSTR __RPC_FAR *pbstrMoreInfoURL) PURE; | |
573 | STDMETHOD(GetMediaInfoString)(MPMediaInfoType MediaInfoType, | |
574 | BSTR __RPC_FAR *pbstrMediaInfo) PURE; | |
575 | STDMETHOD(Cancel)(void) PURE; | |
576 | STDMETHOD(Open)(BSTR bstrFileName) PURE; | |
577 | STDMETHOD(IsSoundCardEnabled)(VARIANT_BOOL __RPC_FAR *pbSoundCard) PURE; | |
578 | STDMETHOD(Next)(void) PURE; | |
579 | STDMETHOD(Previous)(void) PURE; | |
580 | STDMETHOD(StreamSelect)(long StreamNum) PURE; | |
581 | STDMETHOD(FastForward)(void) PURE; | |
582 | STDMETHOD(FastReverse)(void) PURE; | |
583 | STDMETHOD(GetStreamName)(long StreamNum, | |
584 | BSTR __RPC_FAR *pbstrStreamName) PURE; | |
585 | STDMETHOD(GetStreamGroup)(long StreamNum, | |
586 | long __RPC_FAR *pStreamGroup) PURE; | |
587 | STDMETHOD(GetStreamSelected)(long StreamNum, VARIANT_BOOL __RPC_FAR *pStreamSelected) PURE; | |
588 | }; | |
589 | ||
590 | struct IMediaPlayer2 : public IMediaPlayer | |
591 | { | |
592 | STDMETHOD(get_DVD)(struct IMediaPlayerDvd __RPC_FAR *__RPC_FAR *ppdispatch) PURE; | |
593 | STDMETHOD(GetMediaParameter)(long EntryNum, BSTR bstrParameterName, BSTR __RPC_FAR *pbstrParameterValue) PURE; | |
594 | STDMETHOD(GetMediaParameterName(long EntryNum, long Index, BSTR __RPC_FAR *pbstrParameterName) PURE; | |
595 | STDMETHOD(get_EntryCount)(long __RPC_FAR *pNumberEntries) PURE; | |
596 | STDMETHOD(GetCurrentEntry)(long __RPC_FAR *pEntryNumber) PURE; | |
597 | STDMETHOD(SetCurrentEntry)(long EntryNumber) PURE; | |
598 | STDMETHOD(ShowDialog)(MPShowDialogConstants mpDialogIndex) PURE; | |
599 | }; | |
600 | ||
601 | //--------------------------------------------------------------------------- | |
602 | // NETSHOW COM INTERFACES (dumped from nscompat.idl from MSVC COM Browser) | |
603 | //--------------------------------------------------------------------------- | |
604 | ||
605 | struct INSOPlay : public IDispatch | |
606 | { | |
607 | STDMETHOD(get_ImageSourceWidth)(long __RPC_FAR *pWidth) PURE; | |
608 | STDMETHOD(get_ImageSourceHeight)(long __RPC_FAR *pHeight) PURE; | |
609 | STDMETHOD(get_Duration)(double __RPC_FAR *pDuration) PURE; | |
610 | STDMETHOD(get_Author)(BSTR __RPC_FAR *pbstrAuthor) PURE; | |
611 | STDMETHOD(get_Copyright)(BSTR __RPC_FAR *pbstrCopyright) PURE; | |
612 | STDMETHOD(get_Description)(BSTR __RPC_FAR *pbstrDescription) PURE; | |
613 | STDMETHOD(get_Rating)(BSTR __RPC_FAR *pbstrRating) PURE; | |
614 | STDMETHOD(get_Title)(BSTR __RPC_FAR *pbstrTitle) PURE; | |
615 | STDMETHOD(get_SourceLink)(BSTR __RPC_FAR *pbstrSourceLink) PURE; | |
616 | STDMETHOD(get_MarkerCount)(long __RPC_FAR *pMarkerCount) PURE; | |
617 | STDMETHOD(get_CanScan)(VARIANT_BOOL __RPC_FAR *pCanScan) PURE; | |
618 | STDMETHOD(get_CanSeek)(VARIANT_BOOL __RPC_FAR *pCanSeek) PURE; | |
619 | STDMETHOD(get_CanSeekToMarkers)(VARIANT_BOOL __RPC_FAR *pCanSeekToMarkers) PURE; | |
620 | STDMETHOD(get_CreationDate)(DATE __RPC_FAR *pCreationDate) PURE; | |
621 | STDMETHOD(get_Bandwidth)(long __RPC_FAR *pBandwidth) PURE; | |
622 | STDMETHOD(get_ErrorCorrection)(BSTR __RPC_FAR *pbstrErrorCorrection) PURE; | |
623 | STDMETHOD(get_AutoStart)(VARIANT_BOOL __RPC_FAR *pAutoStart) PURE; | |
624 | STDMETHOD(put_AutoStart)(VARIANT_BOOL pAutoStart) PURE; | |
625 | STDMETHOD(get_AutoRewind)(VARIANT_BOOL __RPC_FAR *pAutoRewind) PURE; | |
626 | STDMETHOD(put_AutoRewind)(VARIANT_BOOL pAutoRewind) PURE; | |
627 | STDMETHOD(get_AllowChangeControlType)(VARIANT_BOOL __RPC_FAR *pAllowChangeControlType) PURE; | |
628 | STDMETHOD(put_AllowChangeControlType)(VARIANT_BOOL pAllowChangeControlType) PURE; | |
629 | STDMETHOD(get_InvokeURLs)(VARIANT_BOOL __RPC_FAR *pInvokeURLs) PURE; | |
630 | STDMETHOD(put_InvokeURLs)(VARIANT_BOOL pInvokeURLs) PURE; | |
631 | STDMETHOD(get_EnableContextMenu)(VARIANT_BOOL __RPC_FAR *pEnableContextMenu) PURE; | |
632 | STDMETHOD(put_EnableContextMenu)(VARIANT_BOOL pEnableContextMenu) PURE; | |
633 | STDMETHOD(get_TransparentAtStart)(VARIANT_BOOL __RPC_FAR *pTransparentAtStart) PURE; | |
634 | STDMETHOD(put_TransparentAtStart)(VARIANT_BOOL pTransparentAtStart) PURE; | |
635 | STDMETHOD(get_TransparentOnStop)(VARIANT_BOOL __RPC_FAR *pTransparentOnStop) PURE; | |
636 | STDMETHOD(put_TransparentOnStop)(VARIANT_BOOL pTransparentOnStop) PURE; | |
637 | STDMETHOD(get_ClickToPlay)(VARIANT_BOOL __RPC_FAR *pClickToPlay) PURE; | |
638 | STDMETHOD(put_ClickToPlay)(VARIANT_BOOL pClickToPlay) PURE; | |
639 | STDMETHOD(get_FileName)(BSTR __RPC_FAR *pbstrFileName) PURE; | |
640 | STDMETHOD(put_FileName)(BSTR pbstrFileName) PURE; | |
641 | STDMETHOD(get_CurrentPosition)(double __RPC_FAR *pCurrentPosition) PURE; | |
642 | STDMETHOD(put_CurrentPosition)(double pCurrentPosition) PURE; | |
643 | STDMETHOD(get_Rate)(double __RPC_FAR *pRate) PURE; | |
644 | STDMETHOD(put_Rate)(double pRate) PURE; | |
645 | STDMETHOD(get_CurrentMarker)(long __RPC_FAR *pCurrentMarker) PURE; | |
646 | STDMETHOD(put_CurrentMarker)(long pCurrentMarker) PURE; | |
647 | STDMETHOD(get_PlayCount)(long __RPC_FAR *pPlayCount) PURE; | |
648 | STDMETHOD(put_PlayCount)(long pPlayCount) PURE; | |
649 | STDMETHOD(get_CurrentState)(long __RPC_FAR *pCurrentState) PURE; | |
650 | STDMETHOD(get_DisplaySize)(long __RPC_FAR *pDisplaySize) PURE; | |
651 | STDMETHOD(put_DisplaySize)(long pDisplaySize) PURE; | |
652 | STDMETHOD(get_MainWindow)(long __RPC_FAR *pMainWindow) PURE; | |
653 | STDMETHOD(get_ControlType)(long __RPC_FAR *pControlType) PURE; | |
654 | STDMETHOD(put_ControlType)(long pControlType) PURE; | |
655 | STDMETHOD(get_AllowScan)(VARIANT_BOOL __RPC_FAR *pAllowScan) PURE; | |
656 | STDMETHOD(put_AllowScan)(VARIANT_BOOL pAllowScan) PURE; | |
657 | STDMETHOD(get_SendKeyboardEvents)(VARIANT_BOOL __RPC_FAR *pSendKeyboardEvents) PURE; | |
658 | STDMETHOD(put_SendKeyboardEvents)(VARIANT_BOOL pSendKeyboardEvents) PURE; | |
659 | STDMETHOD(get_SendMouseClickEvents)(VARIANT_BOOL __RPC_FAR *pSendMouseClickEvents) PURE; | |
660 | STDMETHOD(put_SendMouseClickEvents)(VARIANT_BOOL pSendMouseClickEvents) PURE; | |
661 | STDMETHOD(get_SendMouseMoveEvents)(VARIANT_BOOL __RPC_FAR *pSendMouseMoveEvents) PURE; | |
662 | STDMETHOD(put_SendMouseMoveEvents)(VARIANT_BOOL pSendMouseMoveEvents) PURE; | |
663 | STDMETHOD(get_SendStateChangeEvents)(VARIANT_BOOL __RPC_FAR *pSendStateChangeEvents) PURE; | |
664 | STDMETHOD(put_SendStateChangeEvents)(VARIANT_BOOL pSendStateChangeEvents) PURE; | |
665 | STDMETHOD(get_ReceivedPackets)(long __RPC_FAR *pReceivedPackets) PURE; | |
666 | STDMETHOD(get_RecoveredPackets)(long __RPC_FAR *pRecoveredPackets) PURE; | |
667 | STDMETHOD(get_LostPackets)(long __RPC_FAR *pLostPackets) PURE; | |
668 | STDMETHOD(get_ReceptionQuality)(long __RPC_FAR *pReceptionQuality) PURE; | |
669 | STDMETHOD(get_BufferingCount)(long __RPC_FAR *pBufferingCount) PURE; | |
670 | STDMETHOD(get_CursorType)(long __RPC_FAR *pCursorType) PURE; | |
671 | STDMETHOD(put_CursorType)(long pCursorType) PURE; | |
672 | STDMETHOD(get_AnimationAtStart)(VARIANT_BOOL __RPC_FAR *pAnimationAtStart) PURE; | |
673 | STDMETHOD(put_AnimationAtStart)(VARIANT_BOOL pAnimationAtStart) PURE; | |
674 | STDMETHOD(get_AnimationOnStop)(VARIANT_BOOL __RPC_FAR *pAnimationOnStop) PURE; | |
675 | STDMETHOD(put_AnimationOnStop)(VARIANT_BOOL pAnimationOnStop) PURE; | |
676 | STDMETHOD(Play)(void) PURE; | |
677 | STDMETHOD(Pause)(void) PURE; | |
678 | STDMETHOD(Stop)(void) PURE; | |
679 | STDMETHOD(GetMarkerTime)(long MarkerNum, double __RPC_FAR *pMarkerTime) PURE; | |
680 | STDMETHOD(GetMarkerName)(long MarkerNum, BSTR __RPC_FAR *pbstrMarkerName) PURE; | |
681 | }; | |
682 | ||
683 | struct INSPlay : public INSOPlay | |
684 | { | |
685 | STDMETHOD(get_ChannelName)(BSTR __RPC_FAR *pbstrChannelName) PURE; | |
686 | STDMETHOD(get_ChannelDescription)(BSTR __RPC_FAR *pbstrChannelDescription) PURE; | |
687 | STDMETHOD(get_ChannelURL)(BSTR __RPC_FAR *pbstrChannelURL) PURE; | |
688 | STDMETHOD(get_ContactAddress)(BSTR __RPC_FAR *pbstrContactAddress) PURE; | |
689 | STDMETHOD(get_ContactPhone)(BSTR __RPC_FAR *pbstrContactPhone) PURE; | |
690 | STDMETHOD(get_ContactEmail)(BSTR __RPC_FAR *pbstrContactEmail) PURE; | |
691 | STDMETHOD(get_AllowChangeDisplaySize)(VARIANT_BOOL __RPC_FAR *pAllowChangeDisplaySize) PURE; | |
692 | STDMETHOD(put_AllowChangeDisplaySize)(VARIANT_BOOL pAllowChangeDisplaySize) PURE; | |
693 | STDMETHOD(get_CodecCount)(long __RPC_FAR *pCodecCount) PURE; | |
694 | STDMETHOD(get_IsBroadcast)(VARIANT_BOOL __RPC_FAR *pIsBroadcast) PURE; | |
695 | STDMETHOD(get_IsDurationValid)(VARIANT_BOOL __RPC_FAR *pIsDurationValid) PURE; | |
696 | STDMETHOD(get_SourceProtocol)(long __RPC_FAR *pSourceProtocol) PURE; | |
697 | STDMETHOD(get_OpenState)(long __RPC_FAR *pOpenState) PURE; | |
698 | STDMETHOD(get_SendOpenStateChangeEvents)(VARIANT_BOOL __RPC_FAR *pSendOpenStateChangeEvents) PURE; | |
699 | STDMETHOD(put_SendOpenStateChangeEvents)(VARIANT_BOOL pSendOpenStateChangeEvents) PURE; | |
700 | STDMETHOD(get_SendWarningEvents)(VARIANT_BOOL __RPC_FAR *pSendWarningEvents) PURE; | |
701 | STDMETHOD(put_SendWarningEvents)(VARIANT_BOOL pSendWarningEvents) PURE; | |
702 | STDMETHOD(get_SendErrorEvents)(VARIANT_BOOL __RPC_FAR *pSendErrorEvents) PURE; | |
703 | STDMETHOD(put_SendErrorEvents)(VARIANT_BOOL pSendErrorEvents) PURE; | |
704 | STDMETHOD(get_HasError)(VARIANT_BOOL __RPC_FAR *pHasError) PURE; | |
705 | STDMETHOD(get_ErrorDescription)(BSTR __RPC_FAR *pbstrErrorDescription) PURE; | |
706 | STDMETHOD(get_ErrorCode)(long __RPC_FAR *pErrorCode) PURE; | |
707 | STDMETHOD(get_PlayState)(long __RPC_FAR *pPlayState) PURE; | |
708 | STDMETHOD(get_SendPlayStateChangeEvents)(VARIANT_BOOL __RPC_FAR *pSendPlayStateChangeEvents) PURE; | |
709 | STDMETHOD(put_SendPlayStateChangeEvents)(VARIANT_BOOL pSendPlayStateChangeEvents) PURE; | |
710 | STDMETHOD(get_BufferingTime)(double __RPC_FAR *pBufferingTime) PURE; | |
711 | STDMETHOD(put_BufferingTime)(double pBufferingTime) PURE; | |
712 | STDMETHOD(get_UseFixedUDPPort)(VARIANT_BOOL __RPC_FAR *pUseFixedUDPPort) PURE; | |
713 | STDMETHOD(put_UseFixedUDPPort)(VARIANT_BOOL pUseFixedUDPPort) PURE; | |
714 | STDMETHOD(get_FixedUDPPort)(long __RPC_FAR *pFixedUDPPort) PURE; | |
715 | STDMETHOD(put_FixedUDPPort)(long pFixedUDPPort) PURE; | |
716 | STDMETHOD(get_UseHTTPProxy)(VARIANT_BOOL __RPC_FAR *pUseHTTPProxy) PURE; | |
717 | STDMETHOD(put_UseHTTPProxy)(VARIANT_BOOL pUseHTTPProxy) PURE; | |
718 | STDMETHOD(get_EnableAutoProxy)(VARIANT_BOOL __RPC_FAR *pEnableAutoProxy) PURE; | |
719 | STDMETHOD(put_EnableAutoProxy)(VARIANT_BOOL pEnableAutoProxy) PURE; | |
720 | STDMETHOD(get_HTTPProxyHost)(BSTR __RPC_FAR *pbstrHTTPProxyHost) PURE; | |
721 | STDMETHOD(put_HTTPProxyHost)(BSTR pbstrHTTPProxyHost) PURE; | |
722 | STDMETHOD(get_HTTPProxyPort)(long __RPC_FAR *pHTTPProxyPort) PURE; | |
723 | STDMETHOD(put_HTTPProxyPort)(long pHTTPProxyPort) PURE; | |
724 | STDMETHOD(get_EnableMulticast)(VARIANT_BOOL __RPC_FAR *pEnableMulticast) PURE; | |
725 | STDMETHOD(put_EnableMulticast)(VARIANT_BOOL pEnableMulticast) PURE; | |
726 | STDMETHOD(get_EnableUDP)(VARIANT_BOOL __RPC_FAR *pEnableUDP) PURE; | |
727 | STDMETHOD(put_EnableUDP)(VARIANT_BOOL pEnableUDP) PURE; | |
728 | STDMETHOD(get_EnableTCP)(VARIANT_BOOL __RPC_FAR *pEnableTCP) PURE; | |
729 | STDMETHOD(put_EnableTCP)(VARIANT_BOOL pEnableTCP) PURE; | |
730 | STDMETHOD(get_EnableHTTP)(VARIANT_BOOL __RPC_FAR *pEnableHTTP) PURE; | |
731 | STDMETHOD(put_EnableHTTP)(VARIANT_BOOL pEnableHTTP) PURE; | |
732 | STDMETHOD(get_BufferingProgress)(long __RPC_FAR *pBufferingProgress) PURE; | |
733 | STDMETHOD(get_BaseURL)(BSTR __RPC_FAR *pbstrBaseURL) PURE; | |
734 | STDMETHOD(put_BaseURL)(BSTR pbstrBaseURL) PURE; | |
735 | STDMETHOD(get_DefaultFrame)(BSTR __RPC_FAR *pbstrDefaultFrame) PURE; | |
736 | STDMETHOD(put_DefaultFrame)(BSTR pbstrDefaultFrame) PURE; | |
737 | STDMETHOD(AboutBox))(void) PURE; | |
738 | STDMETHOD(Cancel)(void) PURE; | |
739 | STDMETHOD(GetCodecInstalled)(long CodecNum, VARIANT_BOOL __RPC_FAR *pCodecInstalled) PURE; | |
740 | STDMETHOD(GetCodecDescription)(long CodecNum, BSTR __RPC_FAR *pbstrCodecDescription) PURE; | |
741 | STDMETHOD(GetCodecURL)(long CodecNum, BSTR __RPC_FAR *pbstrCodecURL) PURE; | |
742 | STDMETHOD(Open)(BSTR bstrFileName) PURE; | |
743 | }; | |
744 | ||
745 | ||
746 | struct INSPlay1 : public INSPlay | |
747 | { | |
748 | STDMETHOD(get_MediaPlayer)(IDispatch __RPC_FAR *__RPC_FAR *ppdispatch) PURE; | |
749 | }; | |
750 | ||
751 | //--------------------------------------------------------------------------- | |
752 | // IWMP (PocketPC 2000) COM INTERFACES (dumped from PlayerOCX.idl) | |
753 | //--------------------------------------------------------------------------- | |
754 | ||
755 | #ifdef __WXWINCE__ | |
756 | ||
757 | struct IWMP : public IDispatch | |
758 | { | |
759 | public: | |
760 | virtual /* [id][propput] */ HRESULT STDMETHODCALLTYPE put_AutoSize( | |
761 | /* [in] */ VARIANT_BOOL vbool) = 0; | |
762 | ||
763 | virtual /* [id][propget] */ HRESULT STDMETHODCALLTYPE get_AutoSize( | |
764 | /* [retval][out] */ VARIANT_BOOL __RPC_FAR *pbool) = 0; | |
765 | ||
766 | virtual /* [id][propput] */ HRESULT STDMETHODCALLTYPE put_BorderStyle( | |
767 | /* [in] */ long style) = 0; | |
768 | ||
769 | virtual /* [id][propget] */ HRESULT STDMETHODCALLTYPE get_BorderStyle( | |
770 | /* [retval][out] */ long __RPC_FAR *pstyle) = 0; | |
771 | ||
772 | virtual /* [id][propput] */ HRESULT STDMETHODCALLTYPE put_Enabled( | |
773 | /* [in] */ VARIANT_BOOL vbool) = 0; | |
774 | ||
775 | virtual /* [id][propget] */ HRESULT STDMETHODCALLTYPE get_Enabled( | |
776 | /* [retval][out] */ VARIANT_BOOL __RPC_FAR *pbool) = 0; | |
777 | ||
778 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_FileName( | |
779 | /* [retval][out] */ BSTR __RPC_FAR *pVal) = 0; | |
780 | ||
781 | virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_FileName( | |
782 | /* [in] */ BSTR newVal) = 0; | |
783 | ||
784 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_Volume( | |
785 | /* [retval][out] */ long __RPC_FAR *pVal) = 0; | |
786 | ||
787 | virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_Volume( | |
788 | /* [in] */ long newVal) = 0; | |
789 | ||
790 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_Mute( | |
791 | /* [retval][out] */ VARIANT_BOOL __RPC_FAR *pVal) = 0; | |
792 | ||
793 | virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_Mute( | |
794 | /* [in] */ VARIANT_BOOL newVal) = 0; | |
795 | ||
796 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_AutoStart( | |
797 | /* [retval][out] */ VARIANT_BOOL __RPC_FAR *pVal) = 0; | |
798 | ||
799 | virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_AutoStart( | |
800 | /* [in] */ VARIANT_BOOL newVal) = 0; | |
801 | ||
802 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_PlayCount( | |
803 | /* [retval][out] */ long __RPC_FAR *pVal) = 0; | |
804 | ||
805 | virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_PlayCount( | |
806 | /* [in] */ long newVal) = 0; | |
807 | ||
808 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_ShowStatusBar( | |
809 | /* [retval][out] */ VARIANT_BOOL __RPC_FAR *pVal) = 0; | |
810 | ||
811 | virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_ShowStatusBar( | |
812 | /* [in] */ VARIANT_BOOL newVal) = 0; | |
813 | ||
814 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_ShowAudioControls( | |
815 | /* [retval][out] */ VARIANT_BOOL __RPC_FAR *pVal) = 0; | |
816 | ||
817 | virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_ShowAudioControls( | |
818 | /* [in] */ VARIANT_BOOL newVal) = 0; | |
819 | ||
820 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_ShowCaptioning( | |
821 | /* [retval][out] */ VARIANT_BOOL __RPC_FAR *pVal) = 0; | |
822 | ||
823 | virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_ShowCaptioning( | |
824 | /* [in] */ VARIANT_BOOL newVal) = 0; | |
825 | ||
826 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_ShowControls( | |
827 | /* [retval][out] */ VARIANT_BOOL __RPC_FAR *pVal) = 0; | |
828 | ||
829 | virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_ShowControls( | |
830 | /* [in] */ VARIANT_BOOL newVal) = 0; | |
831 | ||
832 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_ShowDisplay( | |
833 | /* [retval][out] */ VARIANT_BOOL __RPC_FAR *pVal) = 0; | |
834 | ||
835 | virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_ShowDisplay( | |
836 | /* [in] */ VARIANT_BOOL newVal) = 0; | |
837 | ||
838 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_ShowGotoBar( | |
839 | /* [retval][out] */ VARIANT_BOOL __RPC_FAR *pVal) = 0; | |
840 | ||
841 | virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_ShowGotoBar( | |
842 | /* [in] */ VARIANT_BOOL newVal) = 0; | |
843 | ||
844 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_ShowPositionControls( | |
845 | /* [retval][out] */ VARIANT_BOOL __RPC_FAR *pVal) = 0; | |
846 | ||
847 | virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_ShowPositionControls( | |
848 | /* [in] */ VARIANT_BOOL newVal) = 0; | |
849 | ||
850 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_ShowTracker( | |
851 | /* [retval][out] */ VARIANT_BOOL __RPC_FAR *pVal) = 0; | |
852 | ||
853 | virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_ShowTracker( | |
854 | /* [in] */ VARIANT_BOOL newVal) = 0; | |
855 | ||
856 | virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE Startup( void) = 0; | |
857 | ||
858 | virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE Shutdown( void) = 0; | |
859 | ||
860 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_Bandwidth( | |
861 | /* [retval][out] */ long __RPC_FAR *pVal) = 0; | |
862 | ||
863 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_BaseURL( | |
864 | /* [retval][out] */ BSTR __RPC_FAR *pVal) = 0; | |
865 | ||
866 | virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_BaseURL( | |
867 | /* [in] */ BSTR pVal) = 0; | |
868 | ||
869 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_BufferingCount( | |
870 | /* [retval][out] */ long __RPC_FAR *pVal) = 0; | |
871 | ||
872 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_BufferingProgress( | |
873 | /* [retval][out] */ long __RPC_FAR *pVal) = 0; | |
874 | ||
875 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_BufferingTime( | |
876 | /* [retval][out] */ double __RPC_FAR *pVal) = 0; | |
877 | ||
878 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_CanSeek( | |
879 | /* [retval][out] */ VARIANT_BOOL __RPC_FAR *pVal) = 0; | |
880 | ||
881 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_CanSeekToMarkers( | |
882 | /* [retval][out] */ VARIANT_BOOL __RPC_FAR *pVal) = 0; | |
883 | ||
884 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_ChannelDescription( | |
885 | /* [retval][out] */ BSTR __RPC_FAR *pVal) = 0; | |
886 | ||
887 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_ChannelName( | |
888 | /* [retval][out] */ BSTR __RPC_FAR *pVal) = 0; | |
889 | ||
890 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_ChannelURL( | |
891 | /* [retval][out] */ BSTR __RPC_FAR *pVal) = 0; | |
892 | ||
893 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_ClientID( | |
894 | /* [retval][out] */ BSTR __RPC_FAR *pVal) = 0; | |
895 | ||
896 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_ConnectionSpeed( | |
897 | /* [retval][out] */ long __RPC_FAR *pVal) = 0; | |
898 | ||
899 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_ContactAddress( | |
900 | /* [retval][out] */ BSTR __RPC_FAR *pVal) = 0; | |
901 | ||
902 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_ContactEmail( | |
903 | /* [retval][out] */ BSTR __RPC_FAR *pVal) = 0; | |
904 | ||
905 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_ContactPhone( | |
906 | /* [retval][out] */ BSTR __RPC_FAR *pVal) = 0; | |
907 | ||
908 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_CurrentMarker( | |
909 | /* [retval][out] */ long __RPC_FAR *pVal) = 0; | |
910 | ||
911 | virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_CurrentMarker( | |
912 | /* [in] */ long newVal) = 0; | |
913 | ||
914 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_CurrentPosition( | |
915 | /* [retval][out] */ double __RPC_FAR *pVal) = 0; | |
916 | ||
917 | virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_CurrentPosition( | |
918 | /* [in] */ double newVal) = 0; | |
919 | ||
920 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_DefaultFrame( | |
921 | /* [retval][out] */ BSTR __RPC_FAR *pVal) = 0; | |
922 | ||
923 | virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_DefaultFrame( | |
924 | /* [in] */ BSTR newVal) = 0; | |
925 | ||
926 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_Duration( | |
927 | /* [retval][out] */ double __RPC_FAR *pVal) = 0; | |
928 | ||
929 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_EntryCount( | |
930 | /* [retval][out] */ long __RPC_FAR *pVal) = 0; | |
931 | ||
932 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_ErrorCode( | |
933 | /* [retval][out] */ long __RPC_FAR *pVal) = 0; | |
934 | ||
935 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_ErrorDescription( | |
936 | /* [retval][out] */ BSTR __RPC_FAR *pVal) = 0; | |
937 | ||
938 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_HasError( | |
939 | /* [retval][out] */ VARIANT_BOOL __RPC_FAR *pVal) = 0; | |
940 | ||
941 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_HasMultipleItems( | |
942 | /* [retval][out] */ VARIANT_BOOL __RPC_FAR *pVal) = 0; | |
943 | ||
944 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_ImageSourceHeight( | |
945 | /* [retval][out] */ long __RPC_FAR *pVal) = 0; | |
946 | ||
947 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_ImageSourceWidth( | |
948 | /* [retval][out] */ long __RPC_FAR *pVal) = 0; | |
949 | ||
950 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_InvokeURLs( | |
951 | /* [retval][out] */ VARIANT_BOOL __RPC_FAR *pVal) = 0; | |
952 | ||
953 | virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_InvokeURLs( | |
954 | /* [in] */ VARIANT_BOOL newVal) = 0; | |
955 | ||
956 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_IsBroadcast( | |
957 | /* [retval][out] */ VARIANT_BOOL __RPC_FAR *pVal) = 0; | |
958 | ||
959 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_IsDurationValid( | |
960 | /* [retval][out] */ VARIANT_BOOL __RPC_FAR *pVal) = 0; | |
961 | ||
962 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_LostPackets( | |
963 | /* [retval][out] */ long __RPC_FAR *pVal) = 0; | |
964 | ||
965 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_MarkerCount( | |
966 | /* [retval][out] */ long __RPC_FAR *pVal) = 0; | |
967 | ||
968 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_OpenState( | |
969 | /* [retval][out] */ long __RPC_FAR *pVal) = 0; | |
970 | ||
971 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_PlayState( | |
972 | /* [retval][out] */ long __RPC_FAR *pVal) = 0; | |
973 | ||
974 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_PreviewMode( | |
975 | /* [retval][out] */ VARIANT_BOOL __RPC_FAR *pVal) = 0; | |
976 | ||
977 | virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_PreviewMode( | |
978 | /* [in] */ VARIANT_BOOL newVal) = 0; | |
979 | ||
980 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_ReadyState( | |
981 | /* [retval][out] */ long __RPC_FAR *pVal) = 0; | |
982 | ||
983 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_ReceivedPackets( | |
984 | /* [retval][out] */ long __RPC_FAR *pVal) = 0; | |
985 | ||
986 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_ReceptionQuality( | |
987 | /* [retval][out] */ long __RPC_FAR *pVal) = 0; | |
988 | ||
989 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_RecoveredPackets( | |
990 | /* [retval][out] */ long __RPC_FAR *pVal) = 0; | |
991 | ||
992 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_SAMIFileName( | |
993 | /* [retval][out] */ BSTR __RPC_FAR *pVal) = 0; | |
994 | ||
995 | virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_SAMIFileName( | |
996 | /* [in] */ BSTR newVal) = 0; | |
997 | ||
998 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_SAMILang( | |
999 | /* [retval][out] */ BSTR __RPC_FAR *pVal) = 0; | |
1000 | ||
1001 | virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_SAMILang( | |
1002 | /* [in] */ BSTR newVal) = 0; | |
1003 | ||
1004 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_SAMIStyle( | |
1005 | /* [retval][out] */ BSTR __RPC_FAR *pVal) = 0; | |
1006 | ||
1007 | virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_SAMIStyle( | |
1008 | /* [in] */ BSTR newVal) = 0; | |
1009 | ||
1010 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_SelectionEnd( | |
1011 | /* [retval][out] */ double __RPC_FAR *pVal) = 0; | |
1012 | ||
1013 | virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_SelectionEnd( | |
1014 | /* [in] */ double newVal) = 0; | |
1015 | ||
1016 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_SelectionStart( | |
1017 | /* [retval][out] */ double __RPC_FAR *pVal) = 0; | |
1018 | ||
1019 | virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_SelectionStart( | |
1020 | /* [in] */ double newVal) = 0; | |
1021 | ||
1022 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_SendErrorEvents( | |
1023 | /* [retval][out] */ VARIANT_BOOL __RPC_FAR *pVal) = 0; | |
1024 | ||
1025 | virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_SendErrorEvents( | |
1026 | /* [in] */ VARIANT_BOOL newVal) = 0; | |
1027 | ||
1028 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_SendKeyboardEvents( | |
1029 | /* [retval][out] */ VARIANT_BOOL __RPC_FAR *pVal) = 0; | |
1030 | ||
1031 | virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_SendKeyboardEvents( | |
1032 | /* [in] */ VARIANT_BOOL newVal) = 0; | |
1033 | ||
1034 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_SendMouseClickEvents( | |
1035 | /* [retval][out] */ VARIANT_BOOL __RPC_FAR *pVal) = 0; | |
1036 | ||
1037 | virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_SendMouseClickEvents( | |
1038 | /* [in] */ VARIANT_BOOL newVal) = 0; | |
1039 | ||
1040 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_SendMouseMoveEvents( | |
1041 | /* [retval][out] */ VARIANT_BOOL __RPC_FAR *pVal) = 0; | |
1042 | ||
1043 | virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_SendMouseMoveEvents( | |
1044 | /* [in] */ VARIANT_BOOL newVal) = 0; | |
1045 | ||
1046 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_SendOpenStateChangeEvents( | |
1047 | /* [retval][out] */ VARIANT_BOOL __RPC_FAR *pVal) = 0; | |
1048 | ||
1049 | virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_SendOpenStateChangeEvents( | |
1050 | /* [in] */ VARIANT_BOOL newVal) = 0; | |
1051 | ||
1052 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_SendPlayStateChangeEvents( | |
1053 | /* [retval][out] */ VARIANT_BOOL __RPC_FAR *pVal) = 0; | |
1054 | ||
1055 | virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_SendPlayStateChangeEvents( | |
1056 | /* [in] */ VARIANT_BOOL newVal) = 0; | |
1057 | ||
1058 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_SendWarningEvents( | |
1059 | /* [retval][out] */ VARIANT_BOOL __RPC_FAR *pVal) = 0; | |
1060 | ||
1061 | virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_SendWarningEvents( | |
1062 | /* [in] */ VARIANT_BOOL newVal) = 0; | |
1063 | ||
1064 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_SourceLink( | |
1065 | /* [retval][out] */ BSTR __RPC_FAR *pVal) = 0; | |
1066 | ||
1067 | virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE AboutBox( void) = 0; | |
1068 | ||
1069 | virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE Cancel( void) = 0; | |
1070 | ||
1071 | virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetCodecDescription( | |
1072 | /* [in] */ long nCodec, | |
1073 | /* [retval][out] */ BSTR __RPC_FAR *pDescription) = 0; | |
1074 | ||
1075 | virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetCodecInstalled( | |
1076 | /* [in] */ BSTR __RPC_FAR *pstrCodec, | |
1077 | /* [retval][out] */ VARIANT_BOOL __RPC_FAR *pIsInstalled) = 0; | |
1078 | ||
1079 | virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetCurrentEntry( | |
1080 | /* [retval][out] */ long __RPC_FAR *pVal) = 0; | |
1081 | ||
1082 | virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetMarkerName( | |
1083 | /* [in] */ long nMarker, | |
1084 | /* [retval][out] */ BSTR __RPC_FAR *pMarkerName) = 0; | |
1085 | ||
1086 | virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetMarkerTime( | |
1087 | /* [in] */ long nMarker, | |
1088 | /* [retval][out] */ double __RPC_FAR *pMarkerTime) = 0; | |
1089 | ||
1090 | virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetMediaInfoString( | |
1091 | /* [in] */ long MPMediaInfoType, | |
1092 | /* [retval][out] */ BSTR __RPC_FAR *pstrMediaInfo) = 0; | |
1093 | ||
1094 | virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE Next( void) = 0; | |
1095 | ||
1096 | virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE Open( | |
1097 | BSTR pstrClip) = 0; | |
1098 | ||
1099 | virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE Pause( void) = 0; | |
1100 | ||
1101 | virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE Play( void) = 0; | |
1102 | ||
1103 | virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE Previous( void) = 0; | |
1104 | ||
1105 | virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE Stop( void) = 0; | |
1106 | ||
1107 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_Rate( | |
1108 | /* [retval][out] */ double __RPC_FAR *pVal) = 0; | |
1109 | ||
1110 | virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_Rate( | |
1111 | /* [in] */ double newVal) = 0; | |
1112 | ||
1113 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_DisplaySize( | |
1114 | /* [retval][out] */ long __RPC_FAR *pVal) = 0; | |
1115 | ||
1116 | virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_DisplaySize( | |
1117 | /* [in] */ long newVal) = 0; | |
1118 | ||
1119 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_SourceProtocol( | |
1120 | /* [retval][out] */ long __RPC_FAR *pVal) = 0; | |
1121 | ||
1122 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_ErrorCorrection( | |
1123 | /* [retval][out] */ BSTR __RPC_FAR *pVal) = 0; | |
1124 | ||
1125 | virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE FinalConstruct( void) = 0; | |
1126 | ||
1127 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_AllowChangeDisplaySize( | |
1128 | /* [retval][out] */ VARIANT_BOOL __RPC_FAR *pVal) = 0; | |
1129 | ||
1130 | virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_AllowChangeDisplaySize( | |
1131 | /* [in] */ VARIANT_BOOL newVal) = 0; | |
1132 | ||
1133 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_AllowScan( | |
1134 | /* [retval][out] */ VARIANT_BOOL __RPC_FAR *pVal) = 0; | |
1135 | ||
1136 | virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_AllowScan( | |
1137 | /* [in] */ VARIANT_BOOL newVal) = 0; | |
1138 | ||
1139 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_AnimationAtStart( | |
1140 | /* [retval][out] */ VARIANT_BOOL __RPC_FAR *pVal) = 0; | |
1141 | ||
1142 | virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_AnimationAtStart( | |
1143 | /* [in] */ VARIANT_BOOL newVal) = 0; | |
1144 | ||
1145 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_AudioStream( | |
1146 | /* [retval][out] */ long __RPC_FAR *pVal) = 0; | |
1147 | ||
1148 | virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_AudioStream( | |
1149 | /* [in] */ long newVal) = 0; | |
1150 | ||
1151 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_AutoRewind( | |
1152 | /* [retval][out] */ VARIANT_BOOL __RPC_FAR *pVal) = 0; | |
1153 | ||
1154 | virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_AutoRewind( | |
1155 | /* [in] */ VARIANT_BOOL newVal) = 0; | |
1156 | ||
1157 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_Balance( | |
1158 | /* [retval][out] */ long __RPC_FAR *pVal) = 0; | |
1159 | ||
1160 | virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_Balance( | |
1161 | /* [in] */ long newVal) = 0; | |
1162 | ||
1163 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_CanPreview( | |
1164 | /* [retval][out] */ VARIANT_BOOL __RPC_FAR *pVal) = 0; | |
1165 | ||
1166 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_CanScan( | |
1167 | /* [retval][out] */ VARIANT_BOOL __RPC_FAR *pVal) = 0; | |
1168 | ||
1169 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_CaptioningID( | |
1170 | /* [retval][out] */ BSTR __RPC_FAR *pVal) = 0; | |
1171 | ||
1172 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_ClickToPlay( | |
1173 | /* [retval][out] */ VARIANT_BOOL __RPC_FAR *pVal) = 0; | |
1174 | ||
1175 | virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_ClickToPlay( | |
1176 | /* [in] */ VARIANT_BOOL newVal) = 0; | |
1177 | ||
1178 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_CodecCount( | |
1179 | /* [retval][out] */ long __RPC_FAR *pVal) = 0; | |
1180 | ||
1181 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_CreationDate( | |
1182 | /* [retval][out] */ DATE __RPC_FAR *pVal) = 0; | |
1183 | ||
1184 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_CursorType( | |
1185 | /* [retval][out] */ long __RPC_FAR *pVal) = 0; | |
1186 | ||
1187 | virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_CursorType( | |
1188 | /* [in] */ long newVal) = 0; | |
1189 | ||
1190 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_DisplayBackColor( | |
1191 | /* [retval][out] */ VB_OLE_COLOR __RPC_FAR *pVal) = 0; | |
1192 | ||
1193 | virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_DisplayBackColor( | |
1194 | /* [in] */ VB_OLE_COLOR newVal) = 0; | |
1195 | ||
1196 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_DisplayForeColor( | |
1197 | /* [retval][out] */ VB_OLE_COLOR __RPC_FAR *pVal) = 0; | |
1198 | ||
1199 | virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_DisplayForeColor( | |
1200 | /* [in] */ VB_OLE_COLOR newVal) = 0; | |
1201 | ||
1202 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_DisplayMode( | |
1203 | /* [retval][out] */ long __RPC_FAR *pVal) = 0; | |
1204 | ||
1205 | virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_DisplayMode( | |
1206 | /* [in] */ long newVal) = 0; | |
1207 | ||
1208 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_EnableContextMenu( | |
1209 | /* [retval][out] */ VARIANT_BOOL __RPC_FAR *pVal) = 0; | |
1210 | ||
1211 | virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_EnableContextMenu( | |
1212 | /* [in] */ VARIANT_BOOL newVal) = 0; | |
1213 | ||
1214 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_EnableFullScreenControls( | |
1215 | /* [retval][out] */ VARIANT_BOOL __RPC_FAR *pVal) = 0; | |
1216 | ||
1217 | virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_EnableFullScreenControls( | |
1218 | /* [in] */ VARIANT_BOOL newVal) = 0; | |
1219 | ||
1220 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_EnablePositionControls( | |
1221 | /* [retval][out] */ VARIANT_BOOL __RPC_FAR *pVal) = 0; | |
1222 | ||
1223 | virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_EnablePositionControls( | |
1224 | /* [in] */ VARIANT_BOOL newVal) = 0; | |
1225 | ||
1226 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_EnableTracker( | |
1227 | /* [retval][out] */ VARIANT_BOOL __RPC_FAR *pVal) = 0; | |
1228 | ||
1229 | virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_EnableTracker( | |
1230 | /* [in] */ VARIANT_BOOL newVal) = 0; | |
1231 | ||
1232 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_Language( | |
1233 | /* [retval][out] */ long __RPC_FAR *pVal) = 0; | |
1234 | ||
1235 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_StreamCount( | |
1236 | /* [retval][out] */ long __RPC_FAR *pVal) = 0; | |
1237 | ||
1238 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_TransparentAtStart( | |
1239 | /* [retval][out] */ VARIANT_BOOL __RPC_FAR *pVal) = 0; | |
1240 | ||
1241 | virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_TransparentAtStart( | |
1242 | /* [in] */ VARIANT_BOOL newVal) = 0; | |
1243 | ||
1244 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_VideoBorder3D( | |
1245 | /* [retval][out] */ VARIANT_BOOL __RPC_FAR *pVal) = 0; | |
1246 | ||
1247 | virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_VideoBorder3D( | |
1248 | /* [in] */ VARIANT_BOOL newVal) = 0; | |
1249 | ||
1250 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_VideoBorderColor( | |
1251 | /* [retval][out] */ long __RPC_FAR *pVal) = 0; | |
1252 | ||
1253 | virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_VideoBorderColor( | |
1254 | /* [in] */ long newVal) = 0; | |
1255 | ||
1256 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_VideoBorderWidth( | |
1257 | /* [retval][out] */ long __RPC_FAR *pVal) = 0; | |
1258 | ||
1259 | virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_VideoBorderWidth( | |
1260 | /* [in] */ long newVal) = 0; | |
1261 | ||
1262 | virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE FastForward( void) = 0; | |
1263 | ||
1264 | virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE FastReverse( void) = 0; | |
1265 | ||
1266 | virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetCodecURL( | |
1267 | /* [retval][out] */ BSTR __RPC_FAR *pstrCodecURL) = 0; | |
1268 | ||
1269 | virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetMediaParameter( | |
1270 | /* [in] */ long nParam, | |
1271 | BSTR szParameterName, | |
1272 | /* [retval][out] */ BSTR __RPC_FAR *pstrParameterValue) = 0; | |
1273 | ||
1274 | virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetMediaParameterName( | |
1275 | /* [in] */ long nParam, | |
1276 | long nIndex, | |
1277 | /* [retval][out] */ BSTR __RPC_FAR *pstrParameterName) = 0; | |
1278 | ||
1279 | virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetMoreInfoURL( | |
1280 | /* [retval][out] */ BSTR __RPC_FAR *pstrMoreInfoURL) = 0; | |
1281 | ||
1282 | virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetStreamGroup( | |
1283 | /* [retval][out] */ BSTR __RPC_FAR *pstrStreamGroup) = 0; | |
1284 | ||
1285 | virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetStreamName( | |
1286 | /* [retval][out] */ BSTR __RPC_FAR *pstrStreamName) = 0; | |
1287 | ||
1288 | virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetStreamSelected( | |
1289 | /* [in] */ long nStream, | |
1290 | /* [retval][out] */ VARIANT_BOOL __RPC_FAR *fIsSelected) = 0; | |
1291 | ||
1292 | virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE IsSoundCardEnabled( | |
1293 | /* [retval][out] */ VARIANT_BOOL __RPC_FAR *fIsEnabled) = 0; | |
1294 | ||
1295 | virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE SetCurrentEntry( | |
1296 | long nValue) = 0; | |
1297 | ||
1298 | virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE ShowDialog( | |
1299 | long nValue) = 0; | |
1300 | ||
1301 | virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE StreamSelect( | |
1302 | long nSelect) = 0; | |
1303 | ||
1304 | virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE OnWindowMessage( | |
1305 | UINT msg, | |
1306 | WPARAM wParam, | |
1307 | LPARAM lParam, | |
1308 | LRESULT __RPC_FAR *plResult) = 0; | |
1309 | ||
1310 | }; | |
1311 | ||
1312 | ||
1313 | #endif // CE | |
1314 | ||
1315 | //--------------------------------------------------------------------------- | |
1316 | // MISC COM INTERFACES | |
1317 | //--------------------------------------------------------------------------- | |
1318 | typedef enum _FilterState | |
1319 | { | |
1320 | State_Stopped, | |
1321 | State_Paused, | |
1322 | State_Running | |
1323 | } FILTER_STATE; | |
1324 | typedef enum _PinDirection { | |
1325 | PINDIR_INPUT, | |
1326 | PINDIR_OUTPUT | |
1327 | } PIN_DIRECTION; | |
1328 | ||
1329 | typedef struct _FilterInfo { | |
1330 | WCHAR achName[128]; | |
1331 | struct IFilterGraph *pGraph; | |
1332 | } FILTER_INFO; | |
1333 | ||
1334 | typedef struct _PinInfo { | |
1335 | struct IBaseFilter *pFilter; | |
1336 | PIN_DIRECTION dir; | |
1337 | WCHAR achName[128]; | |
1338 | } PIN_INFO; | |
1339 | ||
1340 | struct IBaseFilter; | |
1341 | struct IPin; | |
1342 | struct IEnumFilters; | |
1343 | typedef struct _MediaType { | |
1344 | GUID majortype; | |
1345 | GUID subtype; | |
1346 | BOOL bFixedSizeSamples; | |
1347 | BOOL bTemporalCompression; | |
1348 | ULONG lSampleSize; | |
1349 | GUID formattype; | |
1350 | IUnknown *pUnk; | |
1351 | ULONG cbFormat; | |
1352 | BYTE *pbFormat; | |
1353 | } AM_MEDIA_TYPE; | |
1354 | ||
1355 | struct IFilterGraph : public IUnknown | |
1356 | { | |
1357 | STDMETHOD(AddFilter)(IBaseFilter *, LPCWSTR) PURE; | |
1358 | STDMETHOD(RemoveFilter)(IBaseFilter *) PURE; | |
1359 | STDMETHOD(EnumFilters)(IEnumFilters **) PURE; | |
1360 | STDMETHOD(FindFilterByName)(LPCWSTR, IBaseFilter **) PURE; | |
1361 | STDMETHOD(ConnectDirect)(IPin *, IPin *, const AM_MEDIA_TYPE *) PURE; | |
1362 | STDMETHOD(Reconnect)(IPin *) PURE; | |
1363 | STDMETHOD(Disconnect)(IPin *) PURE; | |
1364 | STDMETHOD(SetDefaultSyncSource)() PURE; | |
1365 | }; | |
1366 | ||
1367 | struct IGraphBuilder : public IFilterGraph | |
1368 | { | |
1369 | STDMETHOD(Connect)(IPin *, IPin *) PURE; | |
1370 | STDMETHOD(Render)(IPin *) PURE; | |
1371 | STDMETHOD(RenderFile)(LPCWSTR, LPCWSTR) PURE; | |
1372 | STDMETHOD(AddSourceFilter)(LPCWSTR, LPCWSTR, IBaseFilter **) PURE; | |
1373 | STDMETHOD(SetLogFile)(DWORD_PTR) PURE; | |
1374 | STDMETHOD(Abort)() PURE; | |
1375 | STDMETHOD(ShouldOperationContinue)() PURE; | |
1376 | }; | |
1377 | ||
1378 | struct IReferenceClock; | |
1379 | struct IEnumPins; | |
1380 | #define REFERENCE_TIME LONGLONG | |
1381 | struct IMediaFilter : public IPersist | |
1382 | { | |
1383 | STDMETHOD(Stop)( void) PURE; | |
1384 | STDMETHOD(Pause)( void) PURE; | |
1385 | STDMETHOD(Run)(REFERENCE_TIME tStart) PURE; | |
1386 | STDMETHOD(GetState)(DWORD dwMilliSecsTimeout, | |
1387 | FILTER_STATE *State) PURE; | |
1388 | STDMETHOD(SetSyncSource)(IReferenceClock *pClock) PURE; | |
1389 | STDMETHOD(GetSyncSource)(IReferenceClock **pClock) PURE; | |
1390 | }; | |
1391 | ||
1392 | struct IBaseFilter : public IMediaFilter | |
1393 | { | |
1394 | STDMETHOD(EnumPins)(IEnumPins **ppEnum) PURE; | |
1395 | STDMETHOD(FindPin)(LPCWSTR Id, IPin **ppPin) PURE; | |
1396 | STDMETHOD(QueryFilterInfo)(FILTER_INFO *pInfo) PURE; | |
1397 | STDMETHOD(JoinFilterGraph)(IFilterGraph *pGraph, LPCWSTR pName) PURE; | |
1398 | STDMETHOD(QueryVendorInfo)(LPWSTR *pVendorInfo) PURE; | |
1399 | }; | |
1400 | ||
1401 | ||
1402 | //--------------------------------------------------------------------------- | |
1403 | // | |
1404 | // wxAMMediaBackend | |
1405 | // | |
1406 | //--------------------------------------------------------------------------- | |
1407 | ||
1408 | typedef BOOL (WINAPI* LPAMGETERRORTEXT)(HRESULT, wxChar *, DWORD); | |
1409 | ||
1410 | class WXDLLIMPEXP_MEDIA wxAMMediaBackend : public wxMediaBackendCommonBase | |
1411 | { | |
1412 | public: | |
1413 | wxAMMediaBackend(); | |
1414 | virtual ~wxAMMediaBackend(); | |
1415 | ||
1416 | virtual bool CreateControl(wxControl* ctrl, wxWindow* parent, | |
1417 | wxWindowID id, | |
1418 | const wxPoint& pos, | |
1419 | const wxSize& size, | |
1420 | long style, | |
1421 | const wxValidator& validator, | |
1422 | const wxString& name); | |
1423 | ||
1424 | virtual bool Play(); | |
1425 | virtual bool Pause(); | |
1426 | virtual bool Stop(); | |
1427 | ||
1428 | virtual bool Load(const wxString& fileName); | |
1429 | virtual bool Load(const wxURI& location); | |
1430 | virtual bool Load(const wxURI& location, const wxURI& proxy); | |
1431 | ||
1432 | bool DoLoad(const wxString& location); | |
1433 | void FinishLoad(); | |
1434 | ||
1435 | virtual wxMediaState GetState(); | |
1436 | ||
1437 | virtual bool SetPosition(wxLongLong where); | |
1438 | virtual wxLongLong GetPosition(); | |
1439 | virtual wxLongLong GetDuration(); | |
1440 | ||
1441 | virtual void Move(int x, int y, int w, int h); | |
1442 | wxSize GetVideoSize() const; | |
1443 | ||
1444 | virtual double GetPlaybackRate(); | |
1445 | virtual bool SetPlaybackRate(double); | |
1446 | ||
1447 | virtual double GetVolume(); | |
1448 | virtual bool SetVolume(double); | |
1449 | ||
1450 | virtual bool ShowPlayerControls(wxMediaCtrlPlayerControls flags); | |
1451 | ||
1452 | void DoGetDownloadProgress(wxLongLong*, wxLongLong*); | |
1453 | virtual wxLongLong GetDownloadProgress() | |
1454 | { | |
1455 | wxLongLong progress, total; | |
1456 | DoGetDownloadProgress(&progress, &total); | |
1457 | return progress; | |
1458 | } | |
1459 | virtual wxLongLong GetDownloadTotal() | |
1460 | { | |
1461 | wxLongLong progress, total; | |
1462 | DoGetDownloadProgress(&progress, &total); | |
1463 | return total; | |
1464 | } | |
1465 | ||
1466 | wxActiveXContainer* m_pAX; // ActiveX host | |
1467 | #ifdef __WXWINCE__ | |
1468 | IWMP* m_pWMP; | |
1469 | ||
1470 | IWMP* GetMP() {return m_pWMP;} | |
1471 | IWMP* GetAM() {return m_pWMP;} | |
1472 | #else | |
1473 | IActiveMovie* m_pAM; | |
1474 | IMediaPlayer* m_pMP; | |
1475 | ||
1476 | IMediaPlayer* GetMP() {return m_pMP;} | |
1477 | IActiveMovie* GetAM() {return m_pAM;} | |
1478 | #endif | |
1479 | wxSize m_bestSize; // Cached size | |
1480 | ||
1481 | #ifdef __WXDEBUG__ // Stuff for getting useful debugging strings | |
1482 | wxDynamicLibrary m_dllQuartz; | |
1483 | LPAMGETERRORTEXT m_lpAMGetErrorText; | |
1484 | wxString GetErrorString(HRESULT hrdsv); | |
1485 | #endif // __WXDEBUG__ | |
1486 | wxEvtHandler* m_evthandler; | |
1487 | ||
1488 | friend class wxAMMediaEvtHandler; | |
1489 | DECLARE_DYNAMIC_CLASS(wxAMMediaBackend) | |
1490 | }; | |
1491 | ||
1492 | class WXDLLIMPEXP_MEDIA wxAMMediaEvtHandler : public wxEvtHandler | |
1493 | { | |
1494 | public: | |
1495 | wxAMMediaEvtHandler(wxAMMediaBackend *amb) : | |
1496 | m_amb(amb), m_bLoadEventSent(false) | |
1497 | { | |
1498 | m_amb->m_pAX->Connect(m_amb->m_pAX->GetId(), | |
1499 | wxEVT_ACTIVEX, | |
1500 | wxActiveXEventHandler(wxAMMediaEvtHandler::OnActiveX), | |
1501 | NULL, this | |
1502 | ); | |
1503 | } | |
1504 | ||
1505 | void OnActiveX(wxActiveXEvent& event); | |
1506 | ||
1507 | private: | |
1508 | wxAMMediaBackend *m_amb; | |
1509 | bool m_bLoadEventSent; // Whether or not FinishLoaded was already called | |
1510 | // prevents it being called multiple times | |
1511 | ||
1512 | DECLARE_NO_COPY_CLASS(wxAMMediaEvtHandler) | |
1513 | }; | |
1514 | ||
1515 | //=========================================================================== | |
1516 | // IMPLEMENTATION | |
1517 | //=========================================================================== | |
1518 | ||
1519 | //--------------------------------------------------------------------------- | |
1520 | // | |
1521 | // wxAMMediaBackend | |
1522 | // | |
1523 | //--------------------------------------------------------------------------- | |
1524 | ||
1525 | IMPLEMENT_DYNAMIC_CLASS(wxAMMediaBackend, wxMediaBackend) | |
1526 | ||
1527 | //--------------------------------------------------------------------------- | |
1528 | // Usual debugging macros | |
1529 | //--------------------------------------------------------------------------- | |
1530 | #ifdef __WXDEBUG__ | |
1531 | #define MAX_ERROR_TEXT_LEN 160 | |
1532 | ||
1533 | // Get the error string for Active Movie | |
1534 | wxString wxAMMediaBackend::GetErrorString(HRESULT hrdsv) | |
1535 | { | |
1536 | wxChar szError[MAX_ERROR_TEXT_LEN]; | |
1537 | if( m_lpAMGetErrorText != NULL && | |
1538 | (*m_lpAMGetErrorText)(hrdsv, szError, MAX_ERROR_TEXT_LEN) == 0) | |
1539 | { | |
1540 | return wxString::Format(wxT("DirectShow error \"%s\" \n") | |
1541 | wxT("(numeric %X)\n") | |
1542 | wxT("occured"), | |
1543 | szError, (int)hrdsv); | |
1544 | } | |
1545 | else | |
1546 | { | |
1547 | return wxString::Format(wxT("Unknown error \n") | |
1548 | wxT("(numeric %X)\n") | |
1549 | wxT("occured"), | |
1550 | (int)hrdsv); | |
1551 | } | |
1552 | } | |
1553 | ||
1554 | #define wxAMFAIL(x) wxFAIL_MSG(GetErrorString(x)); | |
1555 | #define wxVERIFY(x) wxASSERT((x)) | |
1556 | #define wxAMLOG(x) wxLogDebug(GetErrorString(x)) | |
1557 | #else | |
1558 | #define wxAMVERIFY(x) (x) | |
1559 | #define wxVERIFY(x) (x) | |
1560 | #define wxAMLOG(x) | |
1561 | #define wxAMFAIL(x) | |
1562 | #endif | |
1563 | ||
1564 | //--------------------------------------------------------------------------- | |
1565 | // wxAMMediaBackend Constructor | |
1566 | //--------------------------------------------------------------------------- | |
1567 | wxAMMediaBackend::wxAMMediaBackend() | |
1568 | :m_pAX(NULL), | |
1569 | #ifdef __WXWINCE__ | |
1570 | m_pWMP(NULL), | |
1571 | #else | |
1572 | m_pAM(NULL), | |
1573 | m_pMP(NULL), | |
1574 | #endif | |
1575 | m_bestSize(wxDefaultSize) | |
1576 | { | |
1577 | m_evthandler = NULL; | |
1578 | } | |
1579 | ||
1580 | //--------------------------------------------------------------------------- | |
1581 | // wxAMMediaBackend Destructor | |
1582 | //--------------------------------------------------------------------------- | |
1583 | wxAMMediaBackend::~wxAMMediaBackend() | |
1584 | { | |
1585 | if(m_pAX) | |
1586 | { | |
1587 | m_pAX->DissociateHandle(); | |
1588 | delete m_pAX; | |
1589 | #ifndef __WXWINCE__ | |
1590 | m_pAM->Release(); | |
1591 | #endif | |
1592 | ||
1593 | if (GetMP()) | |
1594 | GetMP()->Release(); | |
1595 | ||
1596 | if (m_evthandler) | |
1597 | { | |
1598 | m_ctrl->RemoveEventHandler(m_evthandler); | |
1599 | delete m_evthandler; | |
1600 | } | |
1601 | } | |
1602 | } | |
1603 | ||
1604 | //--------------------------------------------------------------------------- | |
1605 | // wxAMMediaBackend::CreateControl | |
1606 | //--------------------------------------------------------------------------- | |
1607 | bool wxAMMediaBackend::CreateControl(wxControl* ctrl, wxWindow* parent, | |
1608 | wxWindowID id, | |
1609 | const wxPoint& pos, | |
1610 | const wxSize& size, | |
1611 | long style, | |
1612 | const wxValidator& validator, | |
1613 | const wxString& name) | |
1614 | { | |
1615 | // First get the AMGetErrorText procedure in debug | |
1616 | // mode for more meaningful messages | |
1617 | #ifdef __WXDEBUG__ | |
1618 | if ( m_dllQuartz.Load(_T("quartz.dll"), wxDL_VERBATIM) ) | |
1619 | { | |
1620 | m_lpAMGetErrorText = (LPAMGETERRORTEXT) | |
1621 | m_dllQuartz.GetSymbolAorW(wxT("AMGetErrorText")); | |
1622 | } | |
1623 | #endif // __WXDEBUG__ | |
1624 | ||
1625 | ||
1626 | ||
1627 | #ifdef __WXWINCE__ | |
1628 | CLSID clsid; | |
1629 | ||
1630 | // Try progids first - *.WMP is PocketPC and Mediaplayer.1 is CE.NET | |
1631 | // later versions support straight creation from CLSID | |
1632 | if (CLSIDFromProgID(L"WPCEOCX.WMP", &clsid) != S_OK && | |
1633 | CLSIDFromProgID(L"MediaPlayer.MediaPlayer.1", &clsid) != S_OK) | |
1634 | { | |
1635 | clsid = CLSID_MediaPlayer; | |
1636 | } | |
1637 | ||
1638 | // While the CLSID is the same as CLSID_MediaPlayer | |
1639 | // CE only supports the IWMP interface | |
1640 | if ( ::CoCreateInstance(clsid, NULL, | |
1641 | CLSCTX_INPROC_SERVER, | |
1642 | IID_IWMP, (void**)&m_pWMP) != 0 ) | |
1643 | { | |
1644 | return false; | |
1645 | } | |
1646 | ||
1647 | #else | |
1648 | // Now determine which (if any) media player interface is | |
1649 | // available - IMediaPlayer or IActiveMovie | |
1650 | if( ::CoCreateInstance(CLSID_MediaPlayer, NULL, | |
1651 | CLSCTX_INPROC_SERVER, | |
1652 | IID_IMediaPlayer, (void**)&m_pMP) != 0 ) | |
1653 | { | |
1654 | if( ::CoCreateInstance(CLSID_ActiveMovie, NULL, | |
1655 | CLSCTX_INPROC_SERVER, | |
1656 | IID_IActiveMovie, (void**)&m_pAM) != 0 ) | |
1657 | return false; | |
1658 | m_pAM->QueryInterface(IID_IMediaPlayer, (void**)&m_pMP); | |
1659 | } | |
1660 | else | |
1661 | { | |
1662 | m_pMP->QueryInterface(IID_IActiveMovie, (void**)&m_pAM); | |
1663 | } | |
1664 | #endif | |
1665 | ||
1666 | // | |
1667 | // Create window | |
1668 | // By default wxWindow(s) is created with a border - | |
1669 | // so we need to get rid of those | |
1670 | // | |
1671 | // Since we don't have a child window like most other | |
1672 | // backends, we don't need wxCLIP_CHILDREN | |
1673 | // | |
1674 | if ( !ctrl->wxControl::Create(parent, id, pos, size, | |
1675 | (style & ~wxBORDER_MASK) | wxBORDER_NONE, | |
1676 | validator, name) ) | |
1677 | return false; | |
1678 | ||
1679 | // | |
1680 | // Now create the ActiveX container along with the media player | |
1681 | // interface and query them | |
1682 | // | |
1683 | m_ctrl = wxStaticCast(ctrl, wxMediaCtrl); | |
1684 | m_pAX = new wxActiveXContainer(ctrl, | |
1685 | #ifdef __WXWINCE__ | |
1686 | IID_IWMP, m_pWMP | |
1687 | #else | |
1688 | m_pMP ? IID_IMediaPlayer : IID_IActiveMovie, m_pAM | |
1689 | #endif | |
1690 | ); | |
1691 | // Connect for events | |
1692 | m_evthandler = new wxAMMediaEvtHandler(this); | |
1693 | m_ctrl->PushEventHandler(m_evthandler); | |
1694 | ||
1695 | // | |
1696 | // Here we set up wx-specific stuff for the default | |
1697 | // settings wxMediaCtrl says it will stay to | |
1698 | // | |
1699 | if(GetMP()) | |
1700 | { | |
1701 | GetMP()->put_DisplaySize(mpFitToSize); | |
1702 | #ifndef __WXWINCE__ // Not in CE's IWMP | |
1703 | // TODO: Unsure what actual effect this has | |
1704 | // In DirectShow Windowless video results in less delay when | |
1705 | // dragging, for example - but this doesn't appear to really do anything | |
1706 | // in practice (it may be something different...)... | |
1707 | GetMP()->put_WindowlessVideo(VARIANT_TRUE); | |
1708 | #endif | |
1709 | ||
1710 | } | |
1711 | #ifndef __WXWINCE__ // Not in CE's IWMP | |
1712 | else | |
1713 | GetAM()->put_MovieWindowSize(amvDoubleOriginalSize); | |
1714 | #endif | |
1715 | ||
1716 | // by default true | |
1717 | GetAM()->put_AutoStart(VARIANT_FALSE); | |
1718 | // by default enabled | |
1719 | wxAMMediaBackend::ShowPlayerControls(wxMEDIACTRLPLAYERCONTROLS_NONE); | |
1720 | // by default with AM only 0.5 | |
1721 | wxAMMediaBackend::SetVolume(1.0); | |
1722 | ||
1723 | // don't erase the background of our control window so that resizing is a | |
1724 | // bit smoother | |
1725 | m_ctrl->SetBackgroundStyle(wxBG_STYLE_CUSTOM); | |
1726 | ||
1727 | // success | |
1728 | return true; | |
1729 | } | |
1730 | ||
1731 | //--------------------------------------------------------------------------- | |
1732 | // wxAMMediaBackend::Load (file version) | |
1733 | //--------------------------------------------------------------------------- | |
1734 | bool wxAMMediaBackend::Load(const wxString& fileName) | |
1735 | { | |
1736 | return DoLoad(fileName); | |
1737 | } | |
1738 | ||
1739 | //--------------------------------------------------------------------------- | |
1740 | // wxAMMediaBackend::Load (URL Version) | |
1741 | //--------------------------------------------------------------------------- | |
1742 | bool wxAMMediaBackend::Load(const wxURI& location) | |
1743 | { | |
1744 | // Turn off loading from a proxy as user | |
1745 | // may have set it previously | |
1746 | INSPlay* pPlay = NULL; | |
1747 | GetAM()->QueryInterface(IID_INSPlay, (void**) &pPlay); | |
1748 | if(pPlay) | |
1749 | { | |
1750 | pPlay->put_UseHTTPProxy(VARIANT_FALSE); | |
1751 | pPlay->Release(); | |
1752 | } | |
1753 | ||
1754 | return DoLoad(location.BuildURI()); | |
1755 | } | |
1756 | ||
1757 | //--------------------------------------------------------------------------- | |
1758 | // wxAMMediaBackend::Load (URL Version with Proxy) | |
1759 | //--------------------------------------------------------------------------- | |
1760 | bool wxAMMediaBackend::Load(const wxURI& location, const wxURI& proxy) | |
1761 | { | |
1762 | // Set the proxy of the NETSHOW interface | |
1763 | INSPlay* pPlay = NULL; | |
1764 | GetAM()->QueryInterface(IID_INSPlay, (void**) &pPlay); | |
1765 | ||
1766 | if(pPlay) | |
1767 | { | |
1768 | pPlay->put_UseHTTPProxy(VARIANT_TRUE); | |
1769 | pPlay->put_HTTPProxyHost(wxBasicString(proxy.GetServer()).Get()); | |
1770 | pPlay->put_HTTPProxyPort(wxAtoi(proxy.GetPort())); | |
1771 | pPlay->Release(); | |
1772 | } | |
1773 | ||
1774 | return DoLoad(location.BuildURI()); | |
1775 | } | |
1776 | ||
1777 | //--------------------------------------------------------------------------- | |
1778 | // wxAMMediaBackend::DoLoad | |
1779 | // | |
1780 | // Called by all functions - this actually renders | |
1781 | // the file and sets up the filter graph | |
1782 | //--------------------------------------------------------------------------- | |
1783 | bool wxAMMediaBackend::DoLoad(const wxString& location) | |
1784 | { | |
1785 | HRESULT hr; | |
1786 | ||
1787 | // Play the movie the normal way through the embedded | |
1788 | // WMP. Supposively Open is better in theory because | |
1789 | // the docs say its async and put_FileName is not - | |
1790 | // but in practice they both seem to be async anyway | |
1791 | if(GetMP()) | |
1792 | hr = GetMP()->Open( wxBasicString(location).Get() ); | |
1793 | else | |
1794 | hr = GetAM()->put_FileName( wxBasicString(location).Get() ); | |
1795 | ||
1796 | if(FAILED(hr)) | |
1797 | { | |
1798 | wxAMLOG(hr); | |
1799 | return false; | |
1800 | } | |
1801 | ||
1802 | m_bestSize = wxDefaultSize; | |
1803 | return true; | |
1804 | } | |
1805 | ||
1806 | //--------------------------------------------------------------------------- | |
1807 | // wxAMMediaBackend::FinishLoad | |
1808 | // | |
1809 | // Called when the media has finished loaded and is ready to play | |
1810 | // | |
1811 | // Here we get the original size of the video and | |
1812 | // send the loaded event to our watcher :). | |
1813 | //--------------------------------------------------------------------------- | |
1814 | void wxAMMediaBackend::FinishLoad() | |
1815 | { | |
1816 | NotifyMovieLoaded(); | |
1817 | } | |
1818 | ||
1819 | //--------------------------------------------------------------------------- | |
1820 | // wxAMMediaBackend::ShowPlayerControls | |
1821 | //--------------------------------------------------------------------------- | |
1822 | bool wxAMMediaBackend::ShowPlayerControls(wxMediaCtrlPlayerControls flags) | |
1823 | { | |
1824 | // Note that IMediaPlayer doesn't have a statusbar by | |
1825 | // default but IActiveMovie does - so lets try to keep | |
1826 | // the interface consistant | |
1827 | if(!flags) | |
1828 | { | |
1829 | GetAM()->put_Enabled(VARIANT_FALSE); | |
1830 | GetAM()->put_ShowControls(VARIANT_FALSE); | |
1831 | if(GetMP()) | |
1832 | GetMP()->put_ShowStatusBar(VARIANT_FALSE); | |
1833 | } | |
1834 | else | |
1835 | { | |
1836 | GetAM()->put_Enabled(VARIANT_TRUE); | |
1837 | GetAM()->put_ShowControls(VARIANT_TRUE); | |
1838 | ||
1839 | GetAM()->put_ShowPositionControls( | |
1840 | (flags & wxMEDIACTRLPLAYERCONTROLS_STEP) ? | |
1841 | VARIANT_TRUE : VARIANT_FALSE); | |
1842 | ||
1843 | if(GetMP()) | |
1844 | { | |
1845 | GetMP()->put_ShowStatusBar(VARIANT_TRUE); | |
1846 | GetMP()->put_ShowAudioControls( | |
1847 | (flags & wxMEDIACTRLPLAYERCONTROLS_VOLUME) ? | |
1848 | VARIANT_TRUE : VARIANT_FALSE); | |
1849 | } | |
1850 | } | |
1851 | ||
1852 | return true; | |
1853 | } | |
1854 | ||
1855 | //--------------------------------------------------------------------------- | |
1856 | // wxAMMediaBackend::Play | |
1857 | // | |
1858 | // Plays the stream. If it is non-seekable, it will restart it (implicit). | |
1859 | // | |
1860 | // Note that we use SUCCEEDED here because run/pause/stop tend to be overly | |
1861 | // picky and return warnings on pretty much every call | |
1862 | //--------------------------------------------------------------------------- | |
1863 | bool wxAMMediaBackend::Play() | |
1864 | { | |
1865 | // Actually try to play the movie (will fail if not loaded completely) | |
1866 | #ifdef __WXWINCE__ | |
1867 | HRESULT hr = m_pWMP->Play(); | |
1868 | #else | |
1869 | HRESULT hr = GetAM()->Run(); | |
1870 | #endif | |
1871 | if(SUCCEEDED(hr)) | |
1872 | { | |
1873 | return true; | |
1874 | } | |
1875 | wxAMLOG(hr); | |
1876 | return false; | |
1877 | } | |
1878 | ||
1879 | //--------------------------------------------------------------------------- | |
1880 | // wxAMMediaBackend::Pause | |
1881 | // | |
1882 | // Pauses the stream. | |
1883 | //--------------------------------------------------------------------------- | |
1884 | bool wxAMMediaBackend::Pause() | |
1885 | { | |
1886 | HRESULT hr = GetAM()->Pause(); | |
1887 | if(SUCCEEDED(hr)) | |
1888 | return true; | |
1889 | wxAMLOG(hr); | |
1890 | return false; | |
1891 | } | |
1892 | ||
1893 | //--------------------------------------------------------------------------- | |
1894 | // wxAMMediaBackend::Stop | |
1895 | // | |
1896 | // Stops the stream. | |
1897 | //--------------------------------------------------------------------------- | |
1898 | bool wxAMMediaBackend::Stop() | |
1899 | { | |
1900 | HRESULT hr = GetAM()->Stop(); | |
1901 | if(SUCCEEDED(hr)) | |
1902 | { | |
1903 | // Seek to beginning | |
1904 | wxAMMediaBackend::SetPosition(0); | |
1905 | return true; | |
1906 | } | |
1907 | wxAMLOG(hr); | |
1908 | return false; | |
1909 | } | |
1910 | ||
1911 | //--------------------------------------------------------------------------- | |
1912 | // wxAMMediaBackend::SetPosition | |
1913 | // | |
1914 | // 1) Translates the current position's time to directshow time, | |
1915 | // which is in a scale of 1 second (in a double) | |
1916 | // 2) Sets the play position of the IActiveMovie interface - | |
1917 | // passing NULL as the stop position means to keep the old | |
1918 | // stop position | |
1919 | //--------------------------------------------------------------------------- | |
1920 | bool wxAMMediaBackend::SetPosition(wxLongLong where) | |
1921 | { | |
1922 | HRESULT hr = GetAM()->put_CurrentPosition( | |
1923 | ((LONGLONG)where.GetValue()) / 1000.0 | |
1924 | ); | |
1925 | if(FAILED(hr)) | |
1926 | { | |
1927 | wxAMLOG(hr); | |
1928 | return false; | |
1929 | } | |
1930 | ||
1931 | return true; | |
1932 | } | |
1933 | ||
1934 | //--------------------------------------------------------------------------- | |
1935 | // wxAMMediaBackend::GetPosition | |
1936 | // | |
1937 | // 1) Obtains the current play and stop positions from IMediaSeeking | |
1938 | // 2) Returns the play position translated to our time base | |
1939 | //--------------------------------------------------------------------------- | |
1940 | wxLongLong wxAMMediaBackend::GetPosition() | |
1941 | { | |
1942 | double outCur; | |
1943 | HRESULT hr = GetAM()->get_CurrentPosition(&outCur); | |
1944 | if(FAILED(hr)) | |
1945 | { | |
1946 | wxAMLOG(hr); | |
1947 | return 0; | |
1948 | } | |
1949 | ||
1950 | // h,m,s,milli - outCur is in 1 second (double) | |
1951 | outCur *= 1000; | |
1952 | wxLongLong ll; | |
1953 | ll.Assign(outCur); | |
1954 | ||
1955 | return ll; | |
1956 | } | |
1957 | ||
1958 | //--------------------------------------------------------------------------- | |
1959 | // wxAMMediaBackend::GetVolume and SetVolume() | |
1960 | // | |
1961 | // Notice that for the IActiveMovie interface value ranges from 0 (MAX volume) | |
1962 | // to -10000 (minimum volume) and the scale is logarithmic in 0.01db per step. | |
1963 | //--------------------------------------------------------------------------- | |
1964 | ||
1965 | double wxAMMediaBackend::GetVolume() | |
1966 | { | |
1967 | long lVolume; | |
1968 | HRESULT hr = GetAM()->get_Volume(&lVolume); | |
1969 | if(FAILED(hr)) | |
1970 | { | |
1971 | wxAMLOG(hr); | |
1972 | return 0.0; | |
1973 | } | |
1974 | ||
1975 | double dVolume = lVolume / 2000.; // volume is now in [-5..0] range | |
1976 | dVolume = pow(10.0, dVolume); // [10^-5, 1] | |
1977 | dVolume -= 0.00001; // [0, 1-10^-5] | |
1978 | dVolume /= 1 - 0.00001; // [0, 1] | |
1979 | ||
1980 | return dVolume; | |
1981 | } | |
1982 | ||
1983 | bool wxAMMediaBackend::SetVolume(double dVolume) | |
1984 | { | |
1985 | // inverse the transformation above | |
1986 | long lVolume = static_cast<long>(2000*log10(dVolume + (1 - dVolume)*0.00001)); | |
1987 | ||
1988 | HRESULT hr = GetAM()->put_Volume(lVolume); | |
1989 | if(FAILED(hr)) | |
1990 | { | |
1991 | wxAMLOG(hr); | |
1992 | return false; | |
1993 | } | |
1994 | return true; | |
1995 | } | |
1996 | ||
1997 | //--------------------------------------------------------------------------- | |
1998 | // wxAMMediaBackend::GetDuration | |
1999 | // | |
2000 | // 1) Obtains the duration of the media from IActiveMovie | |
2001 | // 2) Converts that value to our time base, and returns it | |
2002 | // | |
2003 | // NB: With VBR MP3 files the default DirectShow MP3 render does not | |
2004 | // read the Xing header correctly, resulting in skewed values for duration | |
2005 | // and seeking | |
2006 | //--------------------------------------------------------------------------- | |
2007 | wxLongLong wxAMMediaBackend::GetDuration() | |
2008 | { | |
2009 | double outDuration; | |
2010 | HRESULT hr = GetAM()->get_Duration(&outDuration); | |
2011 | if(FAILED(hr)) | |
2012 | { | |
2013 | wxAMLOG(hr); | |
2014 | return 0; | |
2015 | } | |
2016 | ||
2017 | // h,m,s,milli - outDuration is in 1 second (double) | |
2018 | outDuration *= 1000; | |
2019 | wxLongLong ll; | |
2020 | ll.Assign(outDuration); | |
2021 | ||
2022 | return ll; | |
2023 | } | |
2024 | ||
2025 | //--------------------------------------------------------------------------- | |
2026 | // wxAMMediaBackend::GetState | |
2027 | // | |
2028 | // Returns the cached state | |
2029 | //--------------------------------------------------------------------------- | |
2030 | wxMediaState wxAMMediaBackend::GetState() | |
2031 | { | |
2032 | StateConstants nState; | |
2033 | #ifdef __WXWINCE__ | |
2034 | HRESULT hr = m_pWMP->get_PlayState((long*)&nState); | |
2035 | #else | |
2036 | HRESULT hr = GetAM()->get_CurrentState(&nState); | |
2037 | #endif | |
2038 | if(FAILED(hr)) | |
2039 | { | |
2040 | wxAMLOG(hr); | |
2041 | return wxMEDIASTATE_STOPPED; | |
2042 | } | |
2043 | ||
2044 | return (wxMediaState)nState; | |
2045 | } | |
2046 | ||
2047 | //--------------------------------------------------------------------------- | |
2048 | // wxAMMediaBackend::GetPlaybackRate | |
2049 | // | |
2050 | // Pretty simple way of obtaining the playback rate from | |
2051 | // the IActiveMovie interface | |
2052 | //--------------------------------------------------------------------------- | |
2053 | double wxAMMediaBackend::GetPlaybackRate() | |
2054 | { | |
2055 | double dRate; | |
2056 | HRESULT hr = GetAM()->get_Rate(&dRate); | |
2057 | if(FAILED(hr)) | |
2058 | { | |
2059 | wxAMLOG(hr); | |
2060 | return 0.0; | |
2061 | } | |
2062 | return dRate; | |
2063 | } | |
2064 | ||
2065 | //--------------------------------------------------------------------------- | |
2066 | // wxAMMediaBackend::SetPlaybackRate | |
2067 | // | |
2068 | // Sets the playback rate of the media - DirectShow is pretty good | |
2069 | // about this, actually | |
2070 | //--------------------------------------------------------------------------- | |
2071 | bool wxAMMediaBackend::SetPlaybackRate(double dRate) | |
2072 | { | |
2073 | HRESULT hr = GetAM()->put_Rate(dRate); | |
2074 | if(FAILED(hr)) | |
2075 | { | |
2076 | wxAMLOG(hr); | |
2077 | return false; | |
2078 | } | |
2079 | ||
2080 | return true; | |
2081 | } | |
2082 | ||
2083 | //--------------------------------------------------------------------------- | |
2084 | // wxAMMediaBackend::GetDownloadXXX | |
2085 | // | |
2086 | // Queries for and gets the total size of the file and the current | |
2087 | // progress in downloading that file from the IAMOpenProgress | |
2088 | // interface from the media player interface's filter graph | |
2089 | //--------------------------------------------------------------------------- | |
2090 | void wxAMMediaBackend::DoGetDownloadProgress(wxLongLong* pLoadProgress, | |
2091 | wxLongLong* pLoadTotal) | |
2092 | { | |
2093 | #ifndef __WXWINCE__ | |
2094 | LONGLONG loadTotal = 0, loadProgress = 0; | |
2095 | IUnknown* pFG; | |
2096 | IAMOpenProgress* pOP; | |
2097 | HRESULT hr; | |
2098 | hr = m_pAM->get_FilterGraph(&pFG); | |
2099 | if(SUCCEEDED(hr)) | |
2100 | { | |
2101 | hr = pFG->QueryInterface(IID_IAMOpenProgress, (void**)&pOP); | |
2102 | if(SUCCEEDED(hr)) | |
2103 | { | |
2104 | hr = pOP->QueryProgress(&loadTotal, &loadProgress); | |
2105 | pOP->Release(); | |
2106 | } | |
2107 | pFG->Release(); | |
2108 | } | |
2109 | ||
2110 | if(SUCCEEDED(hr)) | |
2111 | { | |
2112 | *pLoadProgress = loadProgress; | |
2113 | *pLoadTotal = loadTotal; | |
2114 | } | |
2115 | else | |
2116 | #endif | |
2117 | { | |
2118 | // When not loading from a URL QueryProgress will return | |
2119 | // E_NOINTERFACE or whatever | |
2120 | // wxAMFAIL(hr); | |
2121 | *pLoadProgress = 0; | |
2122 | *pLoadTotal = 0; | |
2123 | } | |
2124 | } | |
2125 | ||
2126 | //--------------------------------------------------------------------------- | |
2127 | // wxAMMediaBackend::GetVideoSize | |
2128 | // | |
2129 | // Obtains the cached original video size | |
2130 | //--------------------------------------------------------------------------- | |
2131 | wxSize wxAMMediaBackend::GetVideoSize() const | |
2132 | { | |
2133 | if (m_bestSize == wxDefaultSize) | |
2134 | { | |
2135 | wxAMMediaBackend* self = wxConstCast(this, wxAMMediaBackend); | |
2136 | long w = 0; | |
2137 | long h = 0; | |
2138 | ||
2139 | self->GetAM()->get_ImageSourceWidth(&w); | |
2140 | self->GetAM()->get_ImageSourceHeight(&h); | |
2141 | ||
2142 | if (w != 0 && h != 0) | |
2143 | self->m_bestSize.Set(w, h); | |
2144 | else | |
2145 | return wxSize(0,0); | |
2146 | } | |
2147 | ||
2148 | return m_bestSize; | |
2149 | } | |
2150 | ||
2151 | //--------------------------------------------------------------------------- | |
2152 | // wxAMMediaBackend::Move | |
2153 | // | |
2154 | // We take care of this in our redrawing | |
2155 | //--------------------------------------------------------------------------- | |
2156 | void wxAMMediaBackend::Move(int WXUNUSED(x), int WXUNUSED(y), | |
2157 | int WXUNUSED(w), int WXUNUSED(h)) | |
2158 | { | |
2159 | } | |
2160 | ||
2161 | //--------------------------------------------------------------------------- | |
2162 | // wxAMMediaBackend::OnActiveX | |
2163 | // | |
2164 | // Handle events sent from our activex control (IActiveMovie/IMediaPlayer). | |
2165 | // | |
2166 | // The weird numbers in the switch statement here are "dispatch ids" | |
2167 | // (the numbers in the id field like ( id(xxx) ) ) from amcompat.idl | |
2168 | // and msdxm.idl. | |
2169 | //--------------------------------------------------------------------------- | |
2170 | void wxAMMediaEvtHandler::OnActiveX(wxActiveXEvent& event) | |
2171 | { | |
2172 | switch(event.GetDispatchId()) | |
2173 | { | |
2174 | #ifndef __WXWINCE__ | |
2175 | case 0x00000001: // statechange in IActiveMovie | |
2176 | case 0x00000bc4: // playstatechange in IMediaPlayer | |
2177 | #else | |
2178 | case 0x00000011: // 17 == playstatechange on IWMP | |
2179 | #endif | |
2180 | if(event.ParamCount() >= 2) | |
2181 | { | |
2182 | switch (event[1].GetInteger()) | |
2183 | { | |
2184 | case 0: // stopping | |
2185 | if( m_amb->wxAMMediaBackend::GetPosition() == | |
2186 | m_amb->wxAMMediaBackend::GetDuration() ) | |
2187 | { | |
2188 | if ( m_amb->SendStopEvent() ) | |
2189 | { | |
2190 | // Seek to beginning of movie | |
2191 | m_amb->wxAMMediaBackend::SetPosition(0); | |
2192 | ||
2193 | // send the event to our child | |
2194 | m_amb->QueueFinishEvent(); | |
2195 | } | |
2196 | } | |
2197 | else | |
2198 | { | |
2199 | m_amb->QueueStopEvent(); | |
2200 | } | |
2201 | break; | |
2202 | case 1: // pause | |
2203 | m_amb->QueuePauseEvent(); | |
2204 | break; | |
2205 | case 2: // play | |
2206 | m_amb->QueuePlayEvent(); | |
2207 | break; | |
2208 | default: | |
2209 | break; | |
2210 | } | |
2211 | } | |
2212 | else | |
2213 | event.Skip(); | |
2214 | break; | |
2215 | ||
2216 | #ifndef __WXWINCE__ | |
2217 | case 0x00000032: // opencomplete in IActiveMovie | |
2218 | if(!m_bLoadEventSent) | |
2219 | { | |
2220 | m_amb->FinishLoad(); | |
2221 | } | |
2222 | break; | |
2223 | ||
2224 | case 0xfffffd9f: // readystatechange in IActiveMovie2 and IMediaPlayer | |
2225 | #else | |
2226 | case 0x00000013: // 19 == readystatechange in IWMP | |
2227 | #endif | |
2228 | if(event.ParamCount() >= 1) | |
2229 | { | |
2230 | if(event[0].GetInteger() == 0) | |
2231 | { | |
2232 | m_bLoadEventSent = false; | |
2233 | } | |
2234 | // Originally this was >= 3 here but on 3 we can't get the | |
2235 | // size of the video (will error) - however on 4 | |
2236 | // it won't play on downloaded things until it is | |
2237 | // completely downloaded so we use the lesser of two evils... | |
2238 | else if(event[0].GetInteger() == 3 && | |
2239 | !m_bLoadEventSent) | |
2240 | { | |
2241 | m_bLoadEventSent = true; | |
2242 | m_amb->FinishLoad(); | |
2243 | } | |
2244 | } | |
2245 | else | |
2246 | event.Skip(); | |
2247 | break; | |
2248 | ||
2249 | default: | |
2250 | event.Skip(); | |
2251 | return; | |
2252 | } | |
2253 | } | |
2254 | ||
2255 | //--------------------------------------------------------------------------- | |
2256 | // End of wxAMMediaBackend | |
2257 | //--------------------------------------------------------------------------- | |
2258 | ||
2259 | // in source file that contains stuff you don't directly use | |
2260 | #include "wx/html/forcelnk.h" | |
2261 | FORCE_LINK_ME(wxmediabackend_am) | |
2262 | ||
2263 | #endif // wxUSE_MEDIACTRL && wxUSE_ACTIVEX |