]>
Commit | Line | Data |
---|---|---|
557002cf VZ |
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 | |
557002cf VZ |
7 | // Copyright: (c) Ryan Norton |
8 | // Licence: wxWindows licence | |
9 | ///////////////////////////////////////////////////////////////////////////// | |
10 | ||
11 | // TODO: Actually test the CE IWMP.... | |
12 | // TODO: Actually test HTTP proxies... | |
13 | ||
14 | //-----------------Introduction---------------------------------------------- | |
15 | // This is the media backend for Windows Media Player 6 and ActiveMovie, | |
16 | // as well as PocketPC 2000, Windows Media Player Mobile 7 and 8. | |
17 | // | |
18 | // We use a combination of the WMP 6 IMediaPlayer interface as well as the | |
19 | // ActiveMovie interface IActiveMovie that even exists on Windows 3. For | |
20 | // mobile systems we switch to IWMP for WMP mobile 7 and 8 and possibly | |
21 | // earlier. We just use ifdefs for differentiating between IWMP and | |
22 | // IActiveMovie/IMediaPlayer as the IWMP and IMediaPlayer are virtually | |
23 | // identical with a few minor exceptions. | |
24 | // | |
25 | // For supporting HTTP proxies and such we query the media player | |
26 | // interface (IActiveMovie/IWMP) for the INSPlay (NetShow) interface. | |
27 | // | |
28 | // The IMediaPlayer/IActiveMovie/IWMP are rather clean and straightforward | |
29 | // interfaces that are fairly simplistic. | |
30 | // | |
31 | // Docs for IMediaPlayer are at | |
32 | // http://msdn.microsoft.com/library/en-us/wmp6sdk/htm/microsoftwindowsmediaplayercontrolversion64sdk.asp | |
33 | // | |
34 | // Docs for IWMP are at | |
35 | // http://msdn.microsoft.com/library/en-us/wcewmp/html/_wcesdk_asx_wmp_control_reference.asp | |
36 | ||
37 | //=========================================================================== | |
38 | // DECLARATIONS | |
39 | //=========================================================================== | |
40 | ||
41 | //--------------------------------------------------------------------------- | |
42 | // Pre-compiled header stuff | |
43 | //--------------------------------------------------------------------------- | |
44 | ||
45 | // For compilers that support precompilation, includes "wx.h". | |
46 | #include "wx/wxprec.h" | |
47 | ||
48 | #ifdef __BORLANDC__ | |
e4db172a | 49 | #pragma hdrstop |
557002cf VZ |
50 | #endif |
51 | ||
52 | // disable "cast truncates constant value" for VARIANT_BOOL values | |
53 | // passed as parameters in VC6 | |
54 | #ifdef _MSC_VER | |
55 | #pragma warning (disable:4310) | |
56 | #endif | |
57 | ||
e38b61ed | 58 | #if wxUSE_MEDIACTRL && wxUSE_ACTIVEX |
e4db172a | 59 | |
557002cf VZ |
60 | #include "wx/mediactrl.h" |
61 | ||
e4db172a WS |
62 | #ifndef WX_PRECOMP |
63 | #include "wx/log.h" | |
ed4b0fdc | 64 | #include "wx/dcclient.h" |
c0badb70 | 65 | #include "wx/timer.h" |
18680f86 | 66 | #include "wx/math.h" // log10 & pow |
bb90a3e6 | 67 | #include "wx/stopwatch.h" |
e4db172a | 68 | #endif |
557002cf | 69 | |
557002cf | 70 | #include "wx/msw/private.h" // user info and wndproc setting/getting |
557002cf | 71 | #include "wx/dynlib.h" |
557002cf VZ |
72 | |
73 | //--------------------------------------------------------------------------- | |
74 | // wxActiveXContainer - includes all the COM-specific stuff we need | |
75 | //--------------------------------------------------------------------------- | |
76 | #include "wx/msw/ole/activex.h" | |
77 | ||
78 | // It may sound odd, but you can actually compile this with | |
79 | // __WXWINCE__ enabled on non-CE windows | |
80 | //#define __WXWINCE__ | |
81 | ||
82 | //--------------------------------------------------------------------------- | |
83 | // IIDS - used by CoCreateInstance and IUnknown::QueryInterface | |
84 | // | |
85 | // [idl name] [idl decription] | |
86 | // amcompat.idl Microsoft Active Movie Control (Ver 2.0) | |
87 | // nscompat.idl Microsoft NetShow Player (Ver 1.0) | |
88 | // msdxm.idl Windows Media Player (Ver 1.0) | |
89 | // quartz.idl | |
90 | // | |
91 | // First, when I say I "from XXX.idl", I mean I go into the COM Browser | |
92 | // ($Microsoft Visual Studio$/Common/Tools/OLEVIEW.EXE), open | |
93 | // "type libraries", open a specific type library (for quartz for example its | |
94 | // "ActiveMovie control type library (V1.0)"), save it as an .idl, compile the | |
95 | // idl using the midl compiler that comes with visual studio | |
96 | // ($Microsoft Visual Studio$/VC98/bin/midl.exe on VC6) with the /h argument | |
97 | // to make it generate stubs (a .h & .c file), then clean up the generated | |
98 | // interfaces I want with the STDMETHOD wrappers and then put them into | |
99 | // mediactrl.cpp. | |
100 | // | |
101 | // According to the MSDN docs, IMediaPlayer requires Windows 98 SE | |
102 | // or greater. NetShow is available on Windows 3.1 and I'm guessing | |
103 | // IActiveMovie is too. IMediaPlayer is essentially the Windows Media | |
104 | // Player 6.4 SDK. | |
105 | // | |
106 | // IWMP is from PlayerOCX.idl on PocketPC 2000, which uses CLSID_MediaPlayer | |
107 | // as well as the main windows line. | |
108 | // | |
109 | // Some of these are not used but are kept here for future reference anyway | |
110 | //--------------------------------------------------------------------------- | |
111 | const IID IID_IActiveMovie = {0x05589FA2,0xC356,0x11CE,{0xBF,0x01,0x00,0xAA,0x00,0x55,0x59,0x5A}}; | |
112 | const IID IID_IActiveMovie2 = {0xB6CD6554,0xE9CB,0x11D0,{0x82,0x1F,0x00,0xA0,0xC9,0x1F,0x9C,0xA0}}; | |
113 | const IID IID_IActiveMovie3 = {0x265EC140,0xAE62,0x11D1,{0x85,0x00,0x00,0xA0,0xC9,0x1F,0x9C,0xA0}}; | |
114 | ||
115 | const IID IID_INSOPlay = {0x2179C5D1,0xEBFF,0x11CF,{0xB6,0xFD,0x00,0xAA,0x00,0xB4,0xE2,0x20}}; | |
116 | const IID IID_INSPlay = {0xE7C4BE80,0x7960,0x11D0,{0xB7,0x27,0x00,0xAA,0x00,0xB4,0xE2,0x20}}; | |
117 | const IID IID_INSPlay1 = {0x265EC141,0xAE62,0x11D1,{0x85,0x00,0x00,0xA0,0xC9,0x1F,0x9C,0xA0}}; | |
118 | ||
119 | const IID IID_IMediaPlayer = {0x22D6F311,0xB0F6,0x11D0,{0x94,0xAB,0x00,0x80,0xC7,0x4C,0x7E,0x95}}; | |
120 | const IID IID_IMediaPlayer2 = {0x20D4F5E0,0x5475,0x11D2,{0x97,0x74,0x00,0x00,0xF8,0x08,0x55,0xE6}}; | |
121 | ||
122 | ||
123 | #ifdef __WXWINCE__ | |
124 | const IID IID_IWMP = {0x136B66EC,0xF30D,0x46A8,{0x88,0xDD,0xF2,0xD0,0x55,0x16,0x3E,0x49}}; | |
125 | #endif | |
126 | ||
127 | const CLSID CLSID_ActiveMovie = {0x05589FA1,0xC356,0x11CE,{0xBF,0x01,0x00,0xAA,0x00,0x55,0x59,0x5A}}; | |
128 | const CLSID CLSID_MediaPlayer = {0x22D6F312,0xB0F6,0x11D0,{0x94,0xAB,0x00,0x80,0xC7,0x4C,0x7E,0x95}}; | |
129 | const CLSID CLSID_NSPlay = {0x2179C5D3,0xEBFF,0x11CF,{0xB6,0xFD,0x00,0xAA,0x00,0xB4,0xE2,0x20}}; | |
130 | ||
131 | const IID IID_IAMOpenProgress = {0x8E1C39A1, 0xDE53, 0x11CF,{0xAA, 0x63, 0x00, 0x80, 0xC7, 0x44, 0x52, 0x8D}}; | |
132 | ||
133 | // QUARTZ | |
134 | const CLSID CLSID_FilgraphManager = {0xE436EBB3,0x524F,0x11CE,{0x9F,0x53,0x00,0x20,0xAF,0x0B,0xA7,0x70}}; | |
135 | const IID IID_IMediaEvent = {0x56A868B6,0x0AD4,0x11CE,{0xB0,0x3A,0x00,0x20,0xAF,0x0B,0xA7,0x70}}; | |
136 | ||
137 | //?? QUARTZ Also? | |
138 | const CLSID CLSID_VideoMixingRenderer9 ={0x51B4ABF3, 0x748F, 0x4E3B,{0xA2, 0x76, 0xC8, 0x28, 0x33, 0x0E, 0x92, 0x6A}}; | |
139 | const IID IID_IVMRWindowlessControl9 = {0x8F537D09, 0xF85E, 0x4414,{0xB2, 0x3B, 0x50, 0x2E, 0x54, 0xC7, 0x99, 0x27}}; | |
140 | const IID IID_IFilterGraph = {0x56A8689F, 0x0AD4, 0x11CE,{0xB0, 0x3A, 0x00, 0x20, 0xAF, 0x0B, 0xA7, 0x70}}; | |
141 | const IID IID_IGraphBuilder = {0x56A868A9, 0x0AD4, 0x11CE,{0xB0, 0x3A, 0x00, 0x20, 0xAF, 0x0B, 0xA7, 0x70}}; | |
142 | const IID IID_IVMRFilterConfig9 = {0x5A804648, 0x4F66, 0x4867,{0x9C, 0x43, 0x4F, 0x5C, 0x82, 0x2C, 0xF1, 0xB8}}; | |
143 | const IID IID_IBaseFilter = {0x56A86895, 0x0AD4, 0x11CE,{0xB0, 0x3A, 0x00, 0x20, 0xAF, 0x0B, 0xA7, 0x70}}; | |
144 | ||
145 | //--------------------------------------------------------------------------- | |
146 | // QUARTZ COM INTERFACES (dumped from quartz.idl from MSVC COM Browser) | |
147 | //--------------------------------------------------------------------------- | |
148 | ||
149 | struct IAMOpenProgress : public IUnknown | |
150 | { | |
151 | STDMETHOD(QueryProgress)(LONGLONG *pllTotal, LONGLONG *pllCurrent) PURE; | |
152 | STDMETHOD(AbortOperation)(void) PURE; | |
153 | }; | |
154 | ||
155 | struct IMediaEvent : public IDispatch | |
156 | { | |
157 | STDMETHOD(GetEventHandle)(LONG_PTR *) PURE; | |
158 | STDMETHOD(GetEvent)(long *, LONG_PTR *, LONG_PTR *, long) PURE; | |
159 | STDMETHOD(WaitForCompletion)(long, long *) PURE; | |
160 | STDMETHOD(CancelDefaultHandling)(long) PURE; | |
161 | STDMETHOD(RestoreDefaultHandling)(long) PURE; | |
162 | STDMETHOD(FreeEventParams)(long, LONG_PTR, LONG_PTR) PURE; | |
163 | }; | |
164 | ||
165 | //--------------------------------------------------------------------------- | |
166 | // ACTIVEMOVIE COM INTERFACES (dumped from amcompat.idl from MSVC COM Browser) | |
167 | //--------------------------------------------------------------------------- | |
168 | ||
169 | enum ReadyStateConstants | |
170 | { | |
171 | amvUninitialized = 0, | |
172 | amvLoading = 1, | |
173 | amvInteractive = 3, | |
174 | amvComplete = 4 | |
175 | }; | |
176 | ||
177 | enum StateConstants | |
178 | { | |
179 | amvNotLoaded = -1, | |
180 | amvStopped = 0, | |
181 | amvPaused = 1, | |
182 | amvRunning = 2 | |
183 | }; | |
184 | ||
185 | enum DisplayModeConstants | |
186 | { | |
187 | amvTime = 0, | |
188 | amvFrames = 1 | |
189 | }; | |
190 | ||
191 | enum WindowSizeConstants | |
192 | { | |
193 | amvOriginalSize = 0, | |
194 | amvDoubleOriginalSize = 1, | |
195 | amvOneSixteenthScreen = 2, | |
196 | amvOneFourthScreen = 3, | |
197 | amvOneHalfScreen = 4 | |
198 | }; | |
199 | ||
200 | enum AppearanceConstants | |
201 | { | |
202 | amvFlat = 0, | |
203 | amv3D = 1 | |
204 | }; | |
205 | ||
206 | enum BorderStyleConstants | |
207 | { | |
208 | amvNone = 0, | |
209 | amvFixedSingle = 1 | |
210 | }; | |
211 | ||
212 | struct IActiveMovie : public IDispatch | |
213 | { | |
214 | STDMETHOD(AboutBox)( void) PURE; | |
215 | STDMETHOD(Run)( void) PURE; | |
216 | STDMETHOD(Pause)( void) PURE; | |
217 | STDMETHOD(Stop)( void) PURE; | |
218 | STDMETHOD(get_ImageSourceWidth)(long __RPC_FAR *pWidth) PURE; | |
219 | STDMETHOD(get_ImageSourceHeight)(long __RPC_FAR *pHeight) PURE; | |
220 | STDMETHOD(get_Author)(BSTR __RPC_FAR *pbstrAuthor) PURE; | |
221 | STDMETHOD(get_Title)(BSTR __RPC_FAR *pbstrTitle) PURE; | |
222 | STDMETHOD(get_Copyright)(BSTR __RPC_FAR *pbstrCopyright) PURE; | |
223 | STDMETHOD(get_Description)(BSTR __RPC_FAR *pbstrDescription) PURE; | |
224 | STDMETHOD(get_Rating)(BSTR __RPC_FAR *pbstrRating) PURE; | |
225 | STDMETHOD(get_FileName)(BSTR __RPC_FAR *pbstrFileName) PURE; | |
226 | STDMETHOD(put_FileName)(BSTR pbstrFileName) PURE; | |
227 | STDMETHOD(get_Duration)(double __RPC_FAR *pValue) PURE; | |
228 | STDMETHOD(get_CurrentPosition)(double __RPC_FAR *pValue) PURE; | |
229 | STDMETHOD(put_CurrentPosition)(double pValue) PURE; | |
230 | STDMETHOD(get_PlayCount)(long __RPC_FAR *pPlayCount) PURE; | |
231 | STDMETHOD(put_PlayCount)(long pPlayCount) PURE; | |
232 | STDMETHOD(get_SelectionStart)(double __RPC_FAR *pValue) PURE; | |
233 | STDMETHOD(put_SelectionStart)(double pValue) PURE; | |
234 | STDMETHOD(get_SelectionEnd)(double __RPC_FAR *pValue) PURE; | |
235 | STDMETHOD(put_SelectionEnd)(double pValue) PURE; | |
236 | STDMETHOD(get_CurrentState)(StateConstants __RPC_FAR *pState) PURE; | |
237 | STDMETHOD(get_Rate)(double __RPC_FAR *pValue) PURE; | |
238 | STDMETHOD(put_Rate)(double pValue) PURE; | |
239 | STDMETHOD(get_Volume)(long __RPC_FAR *pValue) PURE; | |
240 | STDMETHOD(put_Volume)(long pValue) PURE; | |
241 | STDMETHOD(get_Balance)(long __RPC_FAR *pValue) PURE; | |
242 | STDMETHOD(put_Balance)(long pValue) PURE; | |
243 | STDMETHOD(get_EnableContextMenu)(VARIANT_BOOL __RPC_FAR *pEnable) PURE; | |
244 | STDMETHOD(put_EnableContextMenu)(VARIANT_BOOL pEnable) PURE; | |
245 | STDMETHOD(get_ShowDisplay)(VARIANT_BOOL __RPC_FAR *Show) PURE; | |
246 | STDMETHOD(put_ShowDisplay)(VARIANT_BOOL Show) PURE; | |
247 | STDMETHOD(get_ShowControls)(VARIANT_BOOL __RPC_FAR *Show) PURE; | |
248 | STDMETHOD(put_ShowControls)(VARIANT_BOOL Show) PURE; | |
249 | STDMETHOD(get_ShowPositionControls)(VARIANT_BOOL __RPC_FAR *Show) PURE; | |
250 | STDMETHOD(put_ShowPositionControls)(VARIANT_BOOL Show) PURE; | |
251 | STDMETHOD(get_ShowSelectionControls)(VARIANT_BOOL __RPC_FAR *Show) PURE; | |
252 | STDMETHOD(put_ShowSelectionControls)(VARIANT_BOOL Show) PURE; | |
253 | STDMETHOD(get_ShowTracker)(VARIANT_BOOL __RPC_FAR *Show) PURE; | |
254 | STDMETHOD(put_ShowTracker)(VARIANT_BOOL Show) PURE; | |
255 | STDMETHOD(get_EnablePositionControls)(VARIANT_BOOL __RPC_FAR *Enable) PURE; | |
256 | STDMETHOD(put_EnablePositionControls)(VARIANT_BOOL Enable) PURE; | |
257 | STDMETHOD(get_EnableSelectionControls)(VARIANT_BOOL __RPC_FAR *Enable) PURE; | |
258 | STDMETHOD(put_EnableSelectionControls)(VARIANT_BOOL Enable) PURE; | |
259 | STDMETHOD(get_EnableTracker)(VARIANT_BOOL __RPC_FAR *Enable) PURE; | |
260 | STDMETHOD(put_EnableTracker)(VARIANT_BOOL Enable) PURE; | |
261 | STDMETHOD(get_AllowHideDisplay)(VARIANT_BOOL __RPC_FAR *Show) PURE; | |
262 | STDMETHOD(put_AllowHideDisplay)(VARIANT_BOOL Show) PURE; | |
263 | STDMETHOD(get_AllowHideControls)(VARIANT_BOOL __RPC_FAR *Show) PURE; | |
264 | STDMETHOD(put_AllowHideControls)(VARIANT_BOOL Show) PURE; | |
265 | STDMETHOD(get_DisplayMode)(DisplayModeConstants __RPC_FAR *pValue) PURE; | |
266 | STDMETHOD(put_DisplayMode)(DisplayModeConstants pValue) PURE; | |
267 | STDMETHOD(get_AllowChangeDisplayMode)(VARIANT_BOOL __RPC_FAR *fAllow) PURE; | |
268 | STDMETHOD(put_AllowChangeDisplayMode)(VARIANT_BOOL fAllow) PURE; | |
269 | STDMETHOD(get_FilterGraph)(IUnknown __RPC_FAR *__RPC_FAR *ppFilterGraph) PURE; | |
270 | STDMETHOD(put_FilterGraph)(IUnknown __RPC_FAR *ppFilterGraph) PURE; | |
271 | STDMETHOD(get_FilterGraphDispatch)(IDispatch __RPC_FAR *__RPC_FAR *pDispatch) PURE; | |
272 | STDMETHOD(get_DisplayForeColor)(unsigned long __RPC_FAR *ForeColor) PURE; | |
273 | STDMETHOD(put_DisplayForeColor)(unsigned long ForeColor) PURE; | |
274 | STDMETHOD(get_DisplayBackColor)(unsigned long __RPC_FAR *BackColor) PURE; | |
275 | STDMETHOD(put_DisplayBackColor)(unsigned long BackColor) PURE; | |
276 | STDMETHOD(get_MovieWindowSize)(WindowSizeConstants __RPC_FAR *WindowSize) PURE; | |
277 | STDMETHOD(put_MovieWindowSize)(WindowSizeConstants WindowSize) PURE; | |
278 | STDMETHOD(get_FullScreenMode)(VARIANT_BOOL __RPC_FAR *pEnable) PURE; | |
279 | STDMETHOD(put_FullScreenMode)(VARIANT_BOOL pEnable) PURE; | |
280 | STDMETHOD(get_AutoStart)(VARIANT_BOOL __RPC_FAR *pEnable) PURE; | |
281 | STDMETHOD(put_AutoStart)(VARIANT_BOOL pEnable) PURE; | |
282 | STDMETHOD(get_AutoRewind)(VARIANT_BOOL __RPC_FAR *pEnable) PURE; | |
283 | STDMETHOD(put_AutoRewind)(VARIANT_BOOL pEnable) PURE; | |
284 | STDMETHOD(get_hWnd)(long __RPC_FAR *hWnd) PURE; | |
285 | STDMETHOD(get_Appearance)(AppearanceConstants __RPC_FAR *pAppearance) PURE; | |
286 | STDMETHOD(put_Appearance)(AppearanceConstants pAppearance) PURE; | |
287 | STDMETHOD(get_BorderStyle)(BorderStyleConstants __RPC_FAR *pBorderStyle) PURE; | |
288 | STDMETHOD(put_BorderStyle)(BorderStyleConstants pBorderStyle) PURE; | |
289 | STDMETHOD(get_Enabled)(VARIANT_BOOL __RPC_FAR *pEnabled) PURE; | |
290 | STDMETHOD(put_Enabled)(VARIANT_BOOL pEnabled) PURE; | |
291 | STDMETHOD(get_Info)(long __RPC_FAR *ppInfo) PURE; | |
292 | }; | |
293 | ||
294 | ||
295 | ||
296 | struct IActiveMovie2 : public IActiveMovie | |
297 | { | |
298 | STDMETHOD(IsSoundCardEnabled)(VARIANT_BOOL __RPC_FAR *pbSoundCard) PURE; | |
299 | STDMETHOD(get_ReadyState)(ReadyStateConstants __RPC_FAR *pValue) PURE; | |
300 | }; | |
301 | ||
302 | struct IActiveMovie3 : public IActiveMovie2 | |
303 | { | |
304 | STDMETHOD(get_MediaPlayer)(IDispatch __RPC_FAR *__RPC_FAR *ppDispatch) PURE; | |
305 | }; | |
306 | ||
307 | ||
308 | //--------------------------------------------------------------------------- | |
309 | // MEDIAPLAYER COM INTERFACES (dumped from msdxm.idl from MSVC COM Browser) | |
310 | //--------------------------------------------------------------------------- | |
311 | ||
312 | enum MPPlayStateConstants | |
313 | { | |
314 | mpStopped = 0, | |
315 | mpPaused = 1, | |
316 | mpPlaying = 2, | |
317 | mpWaiting = 3, | |
318 | mpScanForward = 4, | |
319 | mpScanReverse = 5, | |
320 | mpClosed = 6 | |
321 | }; | |
322 | ||
323 | enum MPDisplaySizeConstants | |
324 | { | |
325 | mpDefaultSize = 0, | |
326 | mpHalfSize = 1, | |
327 | mpDoubleSize = 2, | |
328 | mpFullScreen = 3, | |
329 | mpFitToSize = 4, | |
330 | mpOneSixteenthScreen = 5, | |
331 | mpOneFourthScreen = 6, | |
332 | mpOneHalfScreen = 7 | |
333 | }; | |
334 | ||
335 | enum MPReadyStateConstants | |
336 | { | |
337 | mpReadyStateUninitialized = 0, | |
338 | mpReadyStateLoading = 1, | |
339 | mpReadyStateInteractive = 3, | |
340 | mpReadyStateComplete = 4 | |
341 | }; | |
342 | ||
343 | typedef unsigned long VB_OLE_COLOR; | |
344 | ||
345 | enum MPDisplayModeConstants | |
346 | { | |
347 | mpTime = 0, | |
348 | mpFrames = 1 | |
349 | }; | |
350 | ||
351 | enum MPMoreInfoType | |
352 | { | |
353 | mpShowURL = 0, | |
354 | mpClipURL = 1, | |
355 | mpBannerURL = 2 | |
356 | }; | |
357 | ||
358 | enum MPMediaInfoType | |
359 | { | |
360 | mpShowFilename = 0, | |
361 | mpShowTitle = 1, | |
362 | mpShowAuthor = 2, | |
363 | mpShowCopyright = 3, | |
364 | mpShowRating = 4, | |
365 | mpShowDescription = 5, | |
366 | mpShowLogoIcon = 6, | |
367 | mpClipFilename = 7, | |
368 | mpClipTitle = 8, | |
369 | mpClipAuthor = 9, | |
370 | mpClipCopyright = 10, | |
371 | mpClipRating = 11, | |
372 | mpClipDescription = 12, | |
373 | mpClipLogoIcon = 13, | |
374 | mpBannerImage = 14, | |
375 | mpBannerMoreInfo = 15, | |
376 | mpWatermark = 16 | |
377 | }; | |
378 | ||
379 | enum DVDMenuIDConstants | |
380 | { | |
381 | dvdMenu_Title = 2, | |
382 | dvdMenu_Root = 3, | |
383 | dvdMenu_Subpicture = 4, | |
384 | dvdMenu_Audio = 5, | |
385 | dvdMenu_Angle = 6, | |
386 | dvdMenu_Chapter = 7 | |
387 | }; | |
388 | ||
389 | enum MPShowDialogConstants | |
390 | { | |
391 | mpShowDialogHelp = 0, | |
392 | mpShowDialogStatistics = 1, | |
393 | mpShowDialogOptions = 2, | |
394 | mpShowDialogContextMenu = 3 | |
395 | }; | |
396 | ||
397 | ||
398 | struct IMediaPlayer : public IDispatch | |
399 | { | |
400 | STDMETHOD(get_CurrentPosition)(double __RPC_FAR *pCurrentPosition) PURE; | |
401 | STDMETHOD(put_CurrentPosition)(double pCurrentPosition) PURE; | |
402 | STDMETHOD(get_Duration)(double __RPC_FAR *pDuration) PURE; | |
403 | STDMETHOD(get_ImageSourceWidth)(long __RPC_FAR *pWidth) PURE; | |
404 | STDMETHOD(get_ImageSourceHeight)(long __RPC_FAR *pHeight) PURE; | |
405 | STDMETHOD(get_MarkerCount)(long __RPC_FAR *pMarkerCount) PURE; | |
406 | STDMETHOD(get_CanScan)(VARIANT_BOOL __RPC_FAR *pCanScan) PURE; | |
407 | STDMETHOD(get_CanSeek)(VARIANT_BOOL __RPC_FAR *pCanSeek) PURE; | |
408 | STDMETHOD(get_CanSeekToMarkers)(VARIANT_BOOL __RPC_FAR *pCanSeekToMarkers) PURE; | |
409 | STDMETHOD(get_CurrentMarker)(long __RPC_FAR *pCurrentMarker) PURE; | |
410 | STDMETHOD(put_CurrentMarker)(long pCurrentMarker) PURE; | |
411 | STDMETHOD(get_FileName)(BSTR __RPC_FAR *pbstrFileName) PURE; | |
412 | STDMETHOD(put_FileName)(BSTR pbstrFileName) PURE; | |
413 | STDMETHOD(get_SourceLink)(BSTR __RPC_FAR *pbstrSourceLink) PURE; | |
414 | STDMETHOD(get_CreationDate)(DATE __RPC_FAR *pCreationDate) PURE; | |
415 | STDMETHOD(get_ErrorCorrection)(BSTR __RPC_FAR *pbstrErrorCorrection) PURE; | |
416 | STDMETHOD(get_Bandwidth)(long __RPC_FAR *pBandwidth) PURE; | |
417 | STDMETHOD(get_SourceProtocol)(long __RPC_FAR *pSourceProtocol) PURE; | |
418 | STDMETHOD(get_ReceivedPackets)(long __RPC_FAR *pReceivedPackets) PURE; | |
419 | STDMETHOD(get_RecoveredPackets)(long __RPC_FAR *pRecoveredPackets) PURE; | |
420 | STDMETHOD(get_LostPackets)(long __RPC_FAR *pLostPackets) PURE; | |
421 | STDMETHOD(get_ReceptionQuality)(long __RPC_FAR *pReceptionQuality) PURE; | |
422 | STDMETHOD(get_BufferingCount)(long __RPC_FAR *pBufferingCount) PURE; | |
423 | STDMETHOD(get_IsBroadcast)(VARIANT_BOOL __RPC_FAR *pIsBroadcast) PURE; | |
424 | STDMETHOD(get_BufferingProgress)(long __RPC_FAR *pBufferingProgress) PURE; | |
425 | STDMETHOD(get_ChannelName)(BSTR __RPC_FAR *pbstrChannelName) PURE; | |
426 | STDMETHOD(get_ChannelDescription)(BSTR __RPC_FAR *pbstrChannelDescription) PURE; | |
427 | STDMETHOD(get_ChannelURL)(BSTR __RPC_FAR *pbstrChannelURL) PURE; | |
428 | STDMETHOD(get_ContactAddress)(BSTR __RPC_FAR *pbstrContactAddress) PURE; | |
429 | STDMETHOD(get_ContactPhone)(BSTR __RPC_FAR *pbstrContactPhone) PURE; | |
430 | STDMETHOD(get_ContactEmail)(BSTR __RPC_FAR *pbstrContactEmail) PURE; | |
431 | STDMETHOD(get_BufferingTime)(double __RPC_FAR *pBufferingTime) PURE; | |
432 | STDMETHOD(put_BufferingTime)(double pBufferingTime) PURE; | |
433 | STDMETHOD(get_AutoStart)(VARIANT_BOOL __RPC_FAR *pAutoStart) PURE; | |
434 | STDMETHOD(put_AutoStart)(VARIANT_BOOL pAutoStart) PURE; | |
435 | STDMETHOD(get_AutoRewind)(VARIANT_BOOL __RPC_FAR *pAutoRewind) PURE; | |
436 | STDMETHOD(put_AutoRewind)(VARIANT_BOOL pAutoRewind) PURE; | |
437 | STDMETHOD(get_Rate)(double __RPC_FAR *pRate) PURE; | |
438 | STDMETHOD(put_Rate)(double pRate) PURE; | |
439 | STDMETHOD(get_SendKeyboardEvents)(VARIANT_BOOL __RPC_FAR *pSendKeyboardEvents) PURE; | |
440 | STDMETHOD(put_SendKeyboardEvents)(VARIANT_BOOL pSendKeyboardEvents) PURE; | |
441 | STDMETHOD(get_SendMouseClickEvents)(VARIANT_BOOL __RPC_FAR *pSendMouseClickEvents) PURE; | |
442 | STDMETHOD(put_SendMouseClickEvents)(VARIANT_BOOL pSendMouseClickEvents) PURE; | |
443 | STDMETHOD(get_SendMouseMoveEvents)(VARIANT_BOOL __RPC_FAR *pSendMouseMoveEvents) PURE; | |
444 | STDMETHOD(put_SendMouseMoveEvents)(VARIANT_BOOL pSendMouseMoveEvents) PURE; | |
445 | STDMETHOD(get_PlayCount)(long __RPC_FAR *pPlayCount) PURE; | |
446 | STDMETHOD(put_PlayCount)(long pPlayCount) PURE; | |
447 | STDMETHOD(get_ClickToPlay)(VARIANT_BOOL __RPC_FAR *pClickToPlay) PURE; | |
448 | STDMETHOD(put_ClickToPlay)(VARIANT_BOOL pClickToPlay) PURE; | |
449 | STDMETHOD(get_AllowScan)(VARIANT_BOOL __RPC_FAR *pAllowScan) PURE; | |
450 | STDMETHOD(put_AllowScan)(VARIANT_BOOL pAllowScan) PURE; | |
451 | STDMETHOD(get_EnableContextMenu)(VARIANT_BOOL __RPC_FAR *pEnableContextMenu) PURE; | |
452 | STDMETHOD(put_EnableContextMenu)(VARIANT_BOOL pEnableContextMenu) PURE; | |
453 | STDMETHOD(get_CursorType)(long __RPC_FAR *pCursorType) PURE; | |
454 | STDMETHOD(put_CursorType)(long pCursorType) PURE; | |
455 | STDMETHOD(get_CodecCount)(long __RPC_FAR *pCodecCount) PURE; | |
456 | STDMETHOD(get_AllowChangeDisplaySize)(VARIANT_BOOL __RPC_FAR *pAllowChangeDisplaySize) PURE; | |
457 | STDMETHOD(put_AllowChangeDisplaySize)( VARIANT_BOOL pAllowChangeDisplaySize) PURE; | |
458 | STDMETHOD(get_IsDurationValid)(VARIANT_BOOL __RPC_FAR *pIsDurationValid) PURE; | |
459 | STDMETHOD(get_OpenState)(long __RPC_FAR *pOpenState) PURE; | |
460 | STDMETHOD(get_SendOpenStateChangeEvents)(VARIANT_BOOL __RPC_FAR *pSendOpenStateChangeEvents) PURE; | |
461 | STDMETHOD(put_SendOpenStateChangeEvents)(VARIANT_BOOL pSendOpenStateChangeEvents) PURE; | |
462 | STDMETHOD(get_SendWarningEvents)( VARIANT_BOOL __RPC_FAR *pSendWarningEvents) PURE; | |
463 | STDMETHOD(put_SendWarningEvents)(VARIANT_BOOL pSendWarningEvents) PURE; | |
464 | STDMETHOD(get_SendErrorEvents)(VARIANT_BOOL __RPC_FAR *pSendErrorEvents) PURE; | |
465 | STDMETHOD(put_SendErrorEvents)(VARIANT_BOOL pSendErrorEvents) PURE; | |
466 | STDMETHOD(get_PlayState)(MPPlayStateConstants __RPC_FAR *pPlayState) PURE; | |
467 | STDMETHOD(get_SendPlayStateChangeEvents)(VARIANT_BOOL __RPC_FAR *pSendPlayStateChangeEvents) PURE; | |
468 | STDMETHOD(put_SendPlayStateChangeEvents)(VARIANT_BOOL pSendPlayStateChangeEvents) PURE; | |
469 | STDMETHOD(get_DisplaySize)(MPDisplaySizeConstants __RPC_FAR *pDisplaySize) PURE; | |
470 | STDMETHOD(put_DisplaySize)(MPDisplaySizeConstants pDisplaySize) PURE; | |
471 | STDMETHOD(get_InvokeURLs)(VARIANT_BOOL __RPC_FAR *pInvokeURLs) PURE; | |
472 | STDMETHOD(put_InvokeURLs)(VARIANT_BOOL pInvokeURLs) PURE; | |
473 | STDMETHOD(get_BaseURL)(BSTR __RPC_FAR *pbstrBaseURL) PURE; | |
474 | STDMETHOD(put_BaseURL)(BSTR pbstrBaseURL) PURE; | |
475 | STDMETHOD(get_DefaultFrame)(BSTR __RPC_FAR *pbstrDefaultFrame) PURE; | |
476 | STDMETHOD(put_DefaultFrame)(BSTR pbstrDefaultFrame) PURE; | |
477 | STDMETHOD(get_HasError)(VARIANT_BOOL __RPC_FAR *pHasError) PURE; | |
478 | STDMETHOD(get_ErrorDescription)(BSTR __RPC_FAR *pbstrErrorDescription) PURE; | |
479 | STDMETHOD(get_ErrorCode)(long __RPC_FAR *pErrorCode) PURE; | |
480 | STDMETHOD(get_AnimationAtStart)(VARIANT_BOOL __RPC_FAR *pAnimationAtStart) PURE; | |
481 | STDMETHOD(put_AnimationAtStart)(VARIANT_BOOL pAnimationAtStart) PURE; | |
482 | STDMETHOD(get_TransparentAtStart)( VARIANT_BOOL __RPC_FAR *pTransparentAtStart) PURE; | |
483 | STDMETHOD(put_TransparentAtStart)(VARIANT_BOOL pTransparentAtStart) PURE; | |
484 | STDMETHOD(get_Volume)(long __RPC_FAR *pVolume) PURE; | |
485 | STDMETHOD(put_Volume)(long pVolume) PURE; | |
486 | STDMETHOD(get_Balance)(long __RPC_FAR *pBalance) PURE; | |
487 | STDMETHOD(put_Balance)(long pBalance) PURE; | |
488 | STDMETHOD(get_ReadyState)(MPReadyStateConstants __RPC_FAR *pValue) PURE; | |
489 | STDMETHOD(get_SelectionStart)(double __RPC_FAR *pValue) PURE; | |
490 | STDMETHOD(put_SelectionStart)(double pValue) PURE; | |
491 | STDMETHOD(get_SelectionEnd)(double __RPC_FAR *pValue) PURE; | |
492 | STDMETHOD(put_SelectionEnd)(double pValue) PURE; | |
493 | STDMETHOD(get_ShowDisplay)(VARIANT_BOOL __RPC_FAR *Show) PURE; | |
494 | STDMETHOD(put_ShowDisplay)(VARIANT_BOOL Show) PURE; | |
495 | STDMETHOD(get_ShowControls)(VARIANT_BOOL __RPC_FAR *Show) PURE; | |
496 | STDMETHOD(put_ShowControls)(VARIANT_BOOL Show) PURE; | |
497 | STDMETHOD(get_ShowPositionControls)(VARIANT_BOOL __RPC_FAR *Show) PURE; | |
498 | STDMETHOD(put_ShowPositionControls)(VARIANT_BOOL Show) PURE; | |
499 | STDMETHOD(get_ShowTracker)(VARIANT_BOOL __RPC_FAR *Show) PURE; | |
500 | STDMETHOD(put_ShowTracker)(VARIANT_BOOL Show) PURE; | |
501 | STDMETHOD(get_EnablePositionControls)(VARIANT_BOOL __RPC_FAR *Enable) PURE; | |
502 | STDMETHOD(put_EnablePositionControls)(VARIANT_BOOL Enable) PURE; | |
503 | STDMETHOD(get_EnableTracker)(VARIANT_BOOL __RPC_FAR *Enable) PURE; | |
504 | STDMETHOD(put_EnableTracker)(VARIANT_BOOL Enable) PURE; | |
505 | STDMETHOD(get_Enabled)(VARIANT_BOOL __RPC_FAR *pEnabled) PURE; | |
506 | STDMETHOD(put_Enabled)(VARIANT_BOOL pEnabled) PURE; | |
507 | STDMETHOD(get_DisplayForeColor)(VB_OLE_COLOR __RPC_FAR *ForeColor) PURE; | |
508 | STDMETHOD(put_DisplayForeColor)(VB_OLE_COLOR ForeColor) PURE; | |
509 | STDMETHOD(get_DisplayBackColor)(VB_OLE_COLOR __RPC_FAR *BackColor) PURE; | |
510 | STDMETHOD(put_DisplayBackColor)(VB_OLE_COLOR BackColor) PURE; | |
511 | STDMETHOD(get_DisplayMode)(MPDisplayModeConstants __RPC_FAR *pValue) PURE; | |
512 | STDMETHOD(put_DisplayMode)(MPDisplayModeConstants pValue) PURE; | |
513 | STDMETHOD(get_VideoBorder3D)(VARIANT_BOOL __RPC_FAR *pVideoBorderWidth) PURE; | |
514 | STDMETHOD(put_VideoBorder3D)(VARIANT_BOOL pVideoBorderWidth) PURE; | |
515 | STDMETHOD(get_VideoBorderWidth)(long __RPC_FAR *pVideoBorderWidth) PURE; | |
516 | STDMETHOD(put_VideoBorderWidth)(long pVideoBorderWidth) PURE; | |
517 | STDMETHOD(get_VideoBorderColor)(VB_OLE_COLOR __RPC_FAR *pVideoBorderWidth) PURE; | |
518 | STDMETHOD(put_VideoBorderColor)(VB_OLE_COLOR pVideoBorderWidth) PURE; | |
519 | STDMETHOD(get_ShowGotoBar)(VARIANT_BOOL __RPC_FAR *pbool) PURE; | |
520 | STDMETHOD(put_ShowGotoBar)(VARIANT_BOOL pbool) PURE; | |
521 | STDMETHOD(get_ShowStatusBar)(VARIANT_BOOL __RPC_FAR *pbool) PURE; | |
522 | STDMETHOD(put_ShowStatusBar)(VARIANT_BOOL pbool) PURE; | |
523 | STDMETHOD(get_ShowCaptioning)(VARIANT_BOOL __RPC_FAR *pbool) PURE; | |
524 | STDMETHOD(put_ShowCaptioning)(VARIANT_BOOL pbool) PURE; | |
525 | STDMETHOD(get_ShowAudioControls)(VARIANT_BOOL __RPC_FAR *pbool) PURE; | |
526 | STDMETHOD(put_ShowAudioControls)(VARIANT_BOOL pbool) PURE; | |
527 | STDMETHOD(get_CaptioningID)( BSTR __RPC_FAR *pstrText) PURE; | |
528 | STDMETHOD(put_CaptioningID)(BSTR pstrText) PURE; | |
529 | STDMETHOD(get_Mute)(VARIANT_BOOL __RPC_FAR *vbool) PURE; | |
530 | STDMETHOD(put_Mute)(VARIANT_BOOL vbool) PURE; | |
531 | STDMETHOD(get_CanPreview)(VARIANT_BOOL __RPC_FAR *pCanPreview) PURE; | |
532 | STDMETHOD(get_PreviewMode)(VARIANT_BOOL __RPC_FAR *pPreviewMode) PURE; | |
533 | STDMETHOD(put_PreviewMode)(VARIANT_BOOL pPreviewMode) PURE; | |
534 | STDMETHOD(get_HasMultipleItems)(VARIANT_BOOL __RPC_FAR *pHasMuliItems) PURE; | |
535 | STDMETHOD(get_Language)(long __RPC_FAR *pLanguage) PURE; | |
536 | STDMETHOD(put_Language)(long pLanguage) PURE; | |
537 | STDMETHOD(get_AudioStream)(long __RPC_FAR *pStream) PURE; | |
538 | STDMETHOD(put_AudioStream)(long pStream) PURE; | |
539 | STDMETHOD(get_SAMIStyle)(BSTR __RPC_FAR *pbstrStyle) PURE; | |
540 | STDMETHOD(put_SAMIStyle)(BSTR pbstrStyle) PURE; | |
541 | STDMETHOD(get_SAMILang)(BSTR __RPC_FAR *pbstrLang) PURE; | |
542 | STDMETHOD(put_SAMILang)(BSTR pbstrLang) PURE; | |
543 | STDMETHOD(get_SAMIFileName)(BSTR __RPC_FAR *pbstrFileName) PURE; | |
544 | STDMETHOD(put_SAMIFileName)(BSTR pbstrFileName) PURE; | |
545 | STDMETHOD(get_StreamCount)( long __RPC_FAR *pStreamCount) PURE; | |
546 | STDMETHOD(get_ClientId)(BSTR __RPC_FAR *pbstrClientId) PURE; | |
547 | STDMETHOD(get_ConnectionSpeed)(long __RPC_FAR *plConnectionSpeed) PURE; | |
548 | STDMETHOD(get_AutoSize)(VARIANT_BOOL __RPC_FAR *pbool) PURE; | |
549 | STDMETHOD(put_AutoSize)(VARIANT_BOOL pbool) PURE; | |
550 | STDMETHOD(get_EnableFullScreenControls)(VARIANT_BOOL __RPC_FAR *pbVal) PURE; | |
551 | STDMETHOD(put_EnableFullScreenControls)(VARIANT_BOOL pbVal) PURE; | |
552 | STDMETHOD(get_ActiveMovie)(IDispatch __RPC_FAR *__RPC_FAR *ppdispatch) PURE; | |
553 | STDMETHOD(get_NSPlay)(IDispatch __RPC_FAR *__RPC_FAR *ppdispatch) PURE; | |
554 | STDMETHOD(get_WindowlessVideo)(VARIANT_BOOL __RPC_FAR *pbool) PURE; | |
555 | STDMETHOD(put_WindowlessVideo)(VARIANT_BOOL pbool) PURE; | |
556 | STDMETHOD(Play)(void) PURE; | |
557 | STDMETHOD(Stop)(void) PURE; | |
558 | STDMETHOD(Pause)(void) PURE; | |
559 | STDMETHOD(GetMarkerTime)(long MarkerNum, | |
560 | double __RPC_FAR *pMarkerTime) PURE; | |
561 | STDMETHOD(GetMarkerName)(long MarkerNum, | |
562 | BSTR __RPC_FAR *pbstrMarkerName) PURE; | |
563 | STDMETHOD(AboutBox)(void) PURE; | |
564 | STDMETHOD(GetCodecInstalled)(long CodecNum, | |
565 | VARIANT_BOOL __RPC_FAR *pCodecInstalled) PURE; | |
566 | STDMETHOD(GetCodecDescription)(long CodecNum, | |
567 | BSTR __RPC_FAR *pbstrCodecDescription) PURE; | |
568 | STDMETHOD(GetCodecURL)(long CodecNum, | |
569 | BSTR __RPC_FAR *pbstrCodecURL) PURE; | |
570 | STDMETHOD(GetMoreInfoURL)(MPMoreInfoType MoreInfoType, | |
571 | BSTR __RPC_FAR *pbstrMoreInfoURL) PURE; | |
572 | STDMETHOD(GetMediaInfoString)(MPMediaInfoType MediaInfoType, | |
573 | BSTR __RPC_FAR *pbstrMediaInfo) PURE; | |
574 | STDMETHOD(Cancel)(void) PURE; | |
575 | STDMETHOD(Open)(BSTR bstrFileName) PURE; | |
576 | STDMETHOD(IsSoundCardEnabled)(VARIANT_BOOL __RPC_FAR *pbSoundCard) PURE; | |
577 | STDMETHOD(Next)(void) PURE; | |
578 | STDMETHOD(Previous)(void) PURE; | |
579 | STDMETHOD(StreamSelect)(long StreamNum) PURE; | |
580 | STDMETHOD(FastForward)(void) PURE; | |
581 | STDMETHOD(FastReverse)(void) PURE; | |
582 | STDMETHOD(GetStreamName)(long StreamNum, | |
583 | BSTR __RPC_FAR *pbstrStreamName) PURE; | |
584 | STDMETHOD(GetStreamGroup)(long StreamNum, | |
585 | long __RPC_FAR *pStreamGroup) PURE; | |
586 | STDMETHOD(GetStreamSelected)(long StreamNum, VARIANT_BOOL __RPC_FAR *pStreamSelected) PURE; | |
587 | }; | |
588 | ||
589 | struct IMediaPlayer2 : public IMediaPlayer | |
590 | { | |
591 | STDMETHOD(get_DVD)(struct IMediaPlayerDvd __RPC_FAR *__RPC_FAR *ppdispatch) PURE; | |
592 | STDMETHOD(GetMediaParameter)(long EntryNum, BSTR bstrParameterName, BSTR __RPC_FAR *pbstrParameterValue) PURE; | |
593 | STDMETHOD(GetMediaParameterName(long EntryNum, long Index, BSTR __RPC_FAR *pbstrParameterName) PURE; | |
594 | STDMETHOD(get_EntryCount)(long __RPC_FAR *pNumberEntries) PURE; | |
595 | STDMETHOD(GetCurrentEntry)(long __RPC_FAR *pEntryNumber) PURE; | |
596 | STDMETHOD(SetCurrentEntry)(long EntryNumber) PURE; | |
597 | STDMETHOD(ShowDialog)(MPShowDialogConstants mpDialogIndex) PURE; | |
598 | }; | |
599 | ||
600 | //--------------------------------------------------------------------------- | |
601 | // NETSHOW COM INTERFACES (dumped from nscompat.idl from MSVC COM Browser) | |
602 | //--------------------------------------------------------------------------- | |
603 | ||
604 | struct INSOPlay : public IDispatch | |
605 | { | |
606 | STDMETHOD(get_ImageSourceWidth)(long __RPC_FAR *pWidth) PURE; | |
607 | STDMETHOD(get_ImageSourceHeight)(long __RPC_FAR *pHeight) PURE; | |
608 | STDMETHOD(get_Duration)(double __RPC_FAR *pDuration) PURE; | |
609 | STDMETHOD(get_Author)(BSTR __RPC_FAR *pbstrAuthor) PURE; | |
610 | STDMETHOD(get_Copyright)(BSTR __RPC_FAR *pbstrCopyright) PURE; | |
611 | STDMETHOD(get_Description)(BSTR __RPC_FAR *pbstrDescription) PURE; | |
612 | STDMETHOD(get_Rating)(BSTR __RPC_FAR *pbstrRating) PURE; | |
613 | STDMETHOD(get_Title)(BSTR __RPC_FAR *pbstrTitle) PURE; | |
614 | STDMETHOD(get_SourceLink)(BSTR __RPC_FAR *pbstrSourceLink) PURE; | |
615 | STDMETHOD(get_MarkerCount)(long __RPC_FAR *pMarkerCount) PURE; | |
616 | STDMETHOD(get_CanScan)(VARIANT_BOOL __RPC_FAR *pCanScan) PURE; | |
617 | STDMETHOD(get_CanSeek)(VARIANT_BOOL __RPC_FAR *pCanSeek) PURE; | |
618 | STDMETHOD(get_CanSeekToMarkers)(VARIANT_BOOL __RPC_FAR *pCanSeekToMarkers) PURE; | |
619 | STDMETHOD(get_CreationDate)(DATE __RPC_FAR *pCreationDate) PURE; | |
620 | STDMETHOD(get_Bandwidth)(long __RPC_FAR *pBandwidth) PURE; | |
621 | STDMETHOD(get_ErrorCorrection)(BSTR __RPC_FAR *pbstrErrorCorrection) PURE; | |
622 | STDMETHOD(get_AutoStart)(VARIANT_BOOL __RPC_FAR *pAutoStart) PURE; | |
623 | STDMETHOD(put_AutoStart)(VARIANT_BOOL pAutoStart) PURE; | |
624 | STDMETHOD(get_AutoRewind)(VARIANT_BOOL __RPC_FAR *pAutoRewind) PURE; | |
625 | STDMETHOD(put_AutoRewind)(VARIANT_BOOL pAutoRewind) PURE; | |
626 | STDMETHOD(get_AllowChangeControlType)(VARIANT_BOOL __RPC_FAR *pAllowChangeControlType) PURE; | |
627 | STDMETHOD(put_AllowChangeControlType)(VARIANT_BOOL pAllowChangeControlType) PURE; | |
628 | STDMETHOD(get_InvokeURLs)(VARIANT_BOOL __RPC_FAR *pInvokeURLs) PURE; | |
629 | STDMETHOD(put_InvokeURLs)(VARIANT_BOOL pInvokeURLs) PURE; | |
630 | STDMETHOD(get_EnableContextMenu)(VARIANT_BOOL __RPC_FAR *pEnableContextMenu) PURE; | |
631 | STDMETHOD(put_EnableContextMenu)(VARIANT_BOOL pEnableContextMenu) PURE; | |
632 | STDMETHOD(get_TransparentAtStart)(VARIANT_BOOL __RPC_FAR *pTransparentAtStart) PURE; | |
633 | STDMETHOD(put_TransparentAtStart)(VARIANT_BOOL pTransparentAtStart) PURE; | |
634 | STDMETHOD(get_TransparentOnStop)(VARIANT_BOOL __RPC_FAR *pTransparentOnStop) PURE; | |
635 | STDMETHOD(put_TransparentOnStop)(VARIANT_BOOL pTransparentOnStop) PURE; | |
636 | STDMETHOD(get_ClickToPlay)(VARIANT_BOOL __RPC_FAR *pClickToPlay) PURE; | |
637 | STDMETHOD(put_ClickToPlay)(VARIANT_BOOL pClickToPlay) PURE; | |
638 | STDMETHOD(get_FileName)(BSTR __RPC_FAR *pbstrFileName) PURE; | |
639 | STDMETHOD(put_FileName)(BSTR pbstrFileName) PURE; | |
640 | STDMETHOD(get_CurrentPosition)(double __RPC_FAR *pCurrentPosition) PURE; | |
641 | STDMETHOD(put_CurrentPosition)(double pCurrentPosition) PURE; | |
642 | STDMETHOD(get_Rate)(double __RPC_FAR *pRate) PURE; | |
643 | STDMETHOD(put_Rate)(double pRate) PURE; | |
644 | STDMETHOD(get_CurrentMarker)(long __RPC_FAR *pCurrentMarker) PURE; | |
645 | STDMETHOD(put_CurrentMarker)(long pCurrentMarker) PURE; | |
646 | STDMETHOD(get_PlayCount)(long __RPC_FAR *pPlayCount) PURE; | |
647 | STDMETHOD(put_PlayCount)(long pPlayCount) PURE; | |
648 | STDMETHOD(get_CurrentState)(long __RPC_FAR *pCurrentState) PURE; | |
649 | STDMETHOD(get_DisplaySize)(long __RPC_FAR *pDisplaySize) PURE; | |
650 | STDMETHOD(put_DisplaySize)(long pDisplaySize) PURE; | |
651 | STDMETHOD(get_MainWindow)(long __RPC_FAR *pMainWindow) PURE; | |
652 | STDMETHOD(get_ControlType)(long __RPC_FAR *pControlType) PURE; | |
653 | STDMETHOD(put_ControlType)(long pControlType) PURE; | |
654 | STDMETHOD(get_AllowScan)(VARIANT_BOOL __RPC_FAR *pAllowScan) PURE; | |
655 | STDMETHOD(put_AllowScan)(VARIANT_BOOL pAllowScan) PURE; | |
656 | STDMETHOD(get_SendKeyboardEvents)(VARIANT_BOOL __RPC_FAR *pSendKeyboardEvents) PURE; | |
657 | STDMETHOD(put_SendKeyboardEvents)(VARIANT_BOOL pSendKeyboardEvents) PURE; | |
658 | STDMETHOD(get_SendMouseClickEvents)(VARIANT_BOOL __RPC_FAR *pSendMouseClickEvents) PURE; | |
659 | STDMETHOD(put_SendMouseClickEvents)(VARIANT_BOOL pSendMouseClickEvents) PURE; | |
660 | STDMETHOD(get_SendMouseMoveEvents)(VARIANT_BOOL __RPC_FAR *pSendMouseMoveEvents) PURE; | |
661 | STDMETHOD(put_SendMouseMoveEvents)(VARIANT_BOOL pSendMouseMoveEvents) PURE; | |
662 | STDMETHOD(get_SendStateChangeEvents)(VARIANT_BOOL __RPC_FAR *pSendStateChangeEvents) PURE; | |
663 | STDMETHOD(put_SendStateChangeEvents)(VARIANT_BOOL pSendStateChangeEvents) PURE; | |
664 | STDMETHOD(get_ReceivedPackets)(long __RPC_FAR *pReceivedPackets) PURE; | |
665 | STDMETHOD(get_RecoveredPackets)(long __RPC_FAR *pRecoveredPackets) PURE; | |
666 | STDMETHOD(get_LostPackets)(long __RPC_FAR *pLostPackets) PURE; | |
667 | STDMETHOD(get_ReceptionQuality)(long __RPC_FAR *pReceptionQuality) PURE; | |
668 | STDMETHOD(get_BufferingCount)(long __RPC_FAR *pBufferingCount) PURE; | |
669 | STDMETHOD(get_CursorType)(long __RPC_FAR *pCursorType) PURE; | |
670 | STDMETHOD(put_CursorType)(long pCursorType) PURE; | |
671 | STDMETHOD(get_AnimationAtStart)(VARIANT_BOOL __RPC_FAR *pAnimationAtStart) PURE; | |
672 | STDMETHOD(put_AnimationAtStart)(VARIANT_BOOL pAnimationAtStart) PURE; | |
673 | STDMETHOD(get_AnimationOnStop)(VARIANT_BOOL __RPC_FAR *pAnimationOnStop) PURE; | |
674 | STDMETHOD(put_AnimationOnStop)(VARIANT_BOOL pAnimationOnStop) PURE; | |
675 | STDMETHOD(Play)(void) PURE; | |
676 | STDMETHOD(Pause)(void) PURE; | |
677 | STDMETHOD(Stop)(void) PURE; | |
678 | STDMETHOD(GetMarkerTime)(long MarkerNum, double __RPC_FAR *pMarkerTime) PURE; | |
679 | STDMETHOD(GetMarkerName)(long MarkerNum, BSTR __RPC_FAR *pbstrMarkerName) PURE; | |
680 | }; | |
681 | ||
682 | struct INSPlay : public INSOPlay | |
683 | { | |
684 | STDMETHOD(get_ChannelName)(BSTR __RPC_FAR *pbstrChannelName) PURE; | |
685 | STDMETHOD(get_ChannelDescription)(BSTR __RPC_FAR *pbstrChannelDescription) PURE; | |
686 | STDMETHOD(get_ChannelURL)(BSTR __RPC_FAR *pbstrChannelURL) PURE; | |
687 | STDMETHOD(get_ContactAddress)(BSTR __RPC_FAR *pbstrContactAddress) PURE; | |
688 | STDMETHOD(get_ContactPhone)(BSTR __RPC_FAR *pbstrContactPhone) PURE; | |
689 | STDMETHOD(get_ContactEmail)(BSTR __RPC_FAR *pbstrContactEmail) PURE; | |
690 | STDMETHOD(get_AllowChangeDisplaySize)(VARIANT_BOOL __RPC_FAR *pAllowChangeDisplaySize) PURE; | |
691 | STDMETHOD(put_AllowChangeDisplaySize)(VARIANT_BOOL pAllowChangeDisplaySize) PURE; | |
692 | STDMETHOD(get_CodecCount)(long __RPC_FAR *pCodecCount) PURE; | |
693 | STDMETHOD(get_IsBroadcast)(VARIANT_BOOL __RPC_FAR *pIsBroadcast) PURE; | |
694 | STDMETHOD(get_IsDurationValid)(VARIANT_BOOL __RPC_FAR *pIsDurationValid) PURE; | |
695 | STDMETHOD(get_SourceProtocol)(long __RPC_FAR *pSourceProtocol) PURE; | |
696 | STDMETHOD(get_OpenState)(long __RPC_FAR *pOpenState) PURE; | |
697 | STDMETHOD(get_SendOpenStateChangeEvents)(VARIANT_BOOL __RPC_FAR *pSendOpenStateChangeEvents) PURE; | |
698 | STDMETHOD(put_SendOpenStateChangeEvents)(VARIANT_BOOL pSendOpenStateChangeEvents) PURE; | |
699 | STDMETHOD(get_SendWarningEvents)(VARIANT_BOOL __RPC_FAR *pSendWarningEvents) PURE; | |
700 | STDMETHOD(put_SendWarningEvents)(VARIANT_BOOL pSendWarningEvents) PURE; | |
701 | STDMETHOD(get_SendErrorEvents)(VARIANT_BOOL __RPC_FAR *pSendErrorEvents) PURE; | |
702 | STDMETHOD(put_SendErrorEvents)(VARIANT_BOOL pSendErrorEvents) PURE; | |
703 | STDMETHOD(get_HasError)(VARIANT_BOOL __RPC_FAR *pHasError) PURE; | |
704 | STDMETHOD(get_ErrorDescription)(BSTR __RPC_FAR *pbstrErrorDescription) PURE; | |
705 | STDMETHOD(get_ErrorCode)(long __RPC_FAR *pErrorCode) PURE; | |
706 | STDMETHOD(get_PlayState)(long __RPC_FAR *pPlayState) PURE; | |
707 | STDMETHOD(get_SendPlayStateChangeEvents)(VARIANT_BOOL __RPC_FAR *pSendPlayStateChangeEvents) PURE; | |
708 | STDMETHOD(put_SendPlayStateChangeEvents)(VARIANT_BOOL pSendPlayStateChangeEvents) PURE; | |
709 | STDMETHOD(get_BufferingTime)(double __RPC_FAR *pBufferingTime) PURE; | |
710 | STDMETHOD(put_BufferingTime)(double pBufferingTime) PURE; | |
711 | STDMETHOD(get_UseFixedUDPPort)(VARIANT_BOOL __RPC_FAR *pUseFixedUDPPort) PURE; | |
712 | STDMETHOD(put_UseFixedUDPPort)(VARIANT_BOOL pUseFixedUDPPort) PURE; | |
713 | STDMETHOD(get_FixedUDPPort)(long __RPC_FAR *pFixedUDPPort) PURE; | |
714 | STDMETHOD(put_FixedUDPPort)(long pFixedUDPPort) PURE; | |
715 | STDMETHOD(get_UseHTTPProxy)(VARIANT_BOOL __RPC_FAR *pUseHTTPProxy) PURE; | |
716 | STDMETHOD(put_UseHTTPProxy)(VARIANT_BOOL pUseHTTPProxy) PURE; | |
717 | STDMETHOD(get_EnableAutoProxy)(VARIANT_BOOL __RPC_FAR *pEnableAutoProxy) PURE; | |
718 | STDMETHOD(put_EnableAutoProxy)(VARIANT_BOOL pEnableAutoProxy) PURE; | |
719 | STDMETHOD(get_HTTPProxyHost)(BSTR __RPC_FAR *pbstrHTTPProxyHost) PURE; | |
720 | STDMETHOD(put_HTTPProxyHost)(BSTR pbstrHTTPProxyHost) PURE; | |
721 | STDMETHOD(get_HTTPProxyPort)(long __RPC_FAR *pHTTPProxyPort) PURE; | |
722 | STDMETHOD(put_HTTPProxyPort)(long pHTTPProxyPort) PURE; | |
723 | STDMETHOD(get_EnableMulticast)(VARIANT_BOOL __RPC_FAR *pEnableMulticast) PURE; | |
724 | STDMETHOD(put_EnableMulticast)(VARIANT_BOOL pEnableMulticast) PURE; | |
725 | STDMETHOD(get_EnableUDP)(VARIANT_BOOL __RPC_FAR *pEnableUDP) PURE; | |
726 | STDMETHOD(put_EnableUDP)(VARIANT_BOOL pEnableUDP) PURE; | |
727 | STDMETHOD(get_EnableTCP)(VARIANT_BOOL __RPC_FAR *pEnableTCP) PURE; | |
728 | STDMETHOD(put_EnableTCP)(VARIANT_BOOL pEnableTCP) PURE; | |
729 | STDMETHOD(get_EnableHTTP)(VARIANT_BOOL __RPC_FAR *pEnableHTTP) PURE; | |
730 | STDMETHOD(put_EnableHTTP)(VARIANT_BOOL pEnableHTTP) PURE; | |
731 | STDMETHOD(get_BufferingProgress)(long __RPC_FAR *pBufferingProgress) PURE; | |
732 | STDMETHOD(get_BaseURL)(BSTR __RPC_FAR *pbstrBaseURL) PURE; | |
733 | STDMETHOD(put_BaseURL)(BSTR pbstrBaseURL) PURE; | |
734 | STDMETHOD(get_DefaultFrame)(BSTR __RPC_FAR *pbstrDefaultFrame) PURE; | |
735 | STDMETHOD(put_DefaultFrame)(BSTR pbstrDefaultFrame) PURE; | |
736 | STDMETHOD(AboutBox))(void) PURE; | |
737 | STDMETHOD(Cancel)(void) PURE; | |
738 | STDMETHOD(GetCodecInstalled)(long CodecNum, VARIANT_BOOL __RPC_FAR *pCodecInstalled) PURE; | |
739 | STDMETHOD(GetCodecDescription)(long CodecNum, BSTR __RPC_FAR *pbstrCodecDescription) PURE; | |
740 | STDMETHOD(GetCodecURL)(long CodecNum, BSTR __RPC_FAR *pbstrCodecURL) PURE; | |
741 | STDMETHOD(Open)(BSTR bstrFileName) PURE; | |
742 | }; | |
743 | ||
744 | ||
745 | struct INSPlay1 : public INSPlay | |
746 | { | |
747 | STDMETHOD(get_MediaPlayer)(IDispatch __RPC_FAR *__RPC_FAR *ppdispatch) PURE; | |
748 | }; | |
749 | ||
750 | //--------------------------------------------------------------------------- | |
751 | // IWMP (PocketPC 2000) COM INTERFACES (dumped from PlayerOCX.idl) | |
752 | //--------------------------------------------------------------------------- | |
753 | ||
754 | #ifdef __WXWINCE__ | |
755 | ||
756 | struct IWMP : public IDispatch | |
757 | { | |
758 | public: | |
759 | virtual /* [id][propput] */ HRESULT STDMETHODCALLTYPE put_AutoSize( | |
760 | /* [in] */ VARIANT_BOOL vbool) = 0; | |
761 | ||
762 | virtual /* [id][propget] */ HRESULT STDMETHODCALLTYPE get_AutoSize( | |
763 | /* [retval][out] */ VARIANT_BOOL __RPC_FAR *pbool) = 0; | |
764 | ||
765 | virtual /* [id][propput] */ HRESULT STDMETHODCALLTYPE put_BorderStyle( | |
766 | /* [in] */ long style) = 0; | |
767 | ||
768 | virtual /* [id][propget] */ HRESULT STDMETHODCALLTYPE get_BorderStyle( | |
769 | /* [retval][out] */ long __RPC_FAR *pstyle) = 0; | |
770 | ||
771 | virtual /* [id][propput] */ HRESULT STDMETHODCALLTYPE put_Enabled( | |
772 | /* [in] */ VARIANT_BOOL vbool) = 0; | |
773 | ||
774 | virtual /* [id][propget] */ HRESULT STDMETHODCALLTYPE get_Enabled( | |
775 | /* [retval][out] */ VARIANT_BOOL __RPC_FAR *pbool) = 0; | |
776 | ||
777 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_FileName( | |
778 | /* [retval][out] */ BSTR __RPC_FAR *pVal) = 0; | |
779 | ||
780 | virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_FileName( | |
781 | /* [in] */ BSTR newVal) = 0; | |
782 | ||
783 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_Volume( | |
784 | /* [retval][out] */ long __RPC_FAR *pVal) = 0; | |
785 | ||
786 | virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_Volume( | |
787 | /* [in] */ long newVal) = 0; | |
788 | ||
789 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_Mute( | |
790 | /* [retval][out] */ VARIANT_BOOL __RPC_FAR *pVal) = 0; | |
791 | ||
792 | virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_Mute( | |
793 | /* [in] */ VARIANT_BOOL newVal) = 0; | |
794 | ||
795 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_AutoStart( | |
796 | /* [retval][out] */ VARIANT_BOOL __RPC_FAR *pVal) = 0; | |
797 | ||
798 | virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_AutoStart( | |
799 | /* [in] */ VARIANT_BOOL newVal) = 0; | |
800 | ||
801 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_PlayCount( | |
802 | /* [retval][out] */ long __RPC_FAR *pVal) = 0; | |
803 | ||
804 | virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_PlayCount( | |
805 | /* [in] */ long newVal) = 0; | |
806 | ||
807 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_ShowStatusBar( | |
808 | /* [retval][out] */ VARIANT_BOOL __RPC_FAR *pVal) = 0; | |
809 | ||
810 | virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_ShowStatusBar( | |
811 | /* [in] */ VARIANT_BOOL newVal) = 0; | |
812 | ||
813 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_ShowAudioControls( | |
814 | /* [retval][out] */ VARIANT_BOOL __RPC_FAR *pVal) = 0; | |
815 | ||
816 | virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_ShowAudioControls( | |
817 | /* [in] */ VARIANT_BOOL newVal) = 0; | |
818 | ||
819 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_ShowCaptioning( | |
820 | /* [retval][out] */ VARIANT_BOOL __RPC_FAR *pVal) = 0; | |
821 | ||
822 | virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_ShowCaptioning( | |
823 | /* [in] */ VARIANT_BOOL newVal) = 0; | |
824 | ||
825 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_ShowControls( | |
826 | /* [retval][out] */ VARIANT_BOOL __RPC_FAR *pVal) = 0; | |
827 | ||
828 | virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_ShowControls( | |
829 | /* [in] */ VARIANT_BOOL newVal) = 0; | |
830 | ||
831 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_ShowDisplay( | |
832 | /* [retval][out] */ VARIANT_BOOL __RPC_FAR *pVal) = 0; | |
833 | ||
834 | virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_ShowDisplay( | |
835 | /* [in] */ VARIANT_BOOL newVal) = 0; | |
836 | ||
837 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_ShowGotoBar( | |
838 | /* [retval][out] */ VARIANT_BOOL __RPC_FAR *pVal) = 0; | |
839 | ||
840 | virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_ShowGotoBar( | |
841 | /* [in] */ VARIANT_BOOL newVal) = 0; | |
842 | ||
843 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_ShowPositionControls( | |
844 | /* [retval][out] */ VARIANT_BOOL __RPC_FAR *pVal) = 0; | |
845 | ||
846 | virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_ShowPositionControls( | |
847 | /* [in] */ VARIANT_BOOL newVal) = 0; | |
848 | ||
849 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_ShowTracker( | |
850 | /* [retval][out] */ VARIANT_BOOL __RPC_FAR *pVal) = 0; | |
851 | ||
852 | virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_ShowTracker( | |
853 | /* [in] */ VARIANT_BOOL newVal) = 0; | |
854 | ||
855 | virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE Startup( void) = 0; | |
856 | ||
857 | virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE Shutdown( void) = 0; | |
858 | ||
859 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_Bandwidth( | |
860 | /* [retval][out] */ long __RPC_FAR *pVal) = 0; | |
861 | ||
862 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_BaseURL( | |
863 | /* [retval][out] */ BSTR __RPC_FAR *pVal) = 0; | |
864 | ||
865 | virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_BaseURL( | |
866 | /* [in] */ BSTR pVal) = 0; | |
867 | ||
868 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_BufferingCount( | |
869 | /* [retval][out] */ long __RPC_FAR *pVal) = 0; | |
870 | ||
871 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_BufferingProgress( | |
872 | /* [retval][out] */ long __RPC_FAR *pVal) = 0; | |
873 | ||
874 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_BufferingTime( | |
875 | /* [retval][out] */ double __RPC_FAR *pVal) = 0; | |
876 | ||
877 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_CanSeek( | |
878 | /* [retval][out] */ VARIANT_BOOL __RPC_FAR *pVal) = 0; | |
879 | ||
880 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_CanSeekToMarkers( | |
881 | /* [retval][out] */ VARIANT_BOOL __RPC_FAR *pVal) = 0; | |
882 | ||
883 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_ChannelDescription( | |
884 | /* [retval][out] */ BSTR __RPC_FAR *pVal) = 0; | |
885 | ||
886 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_ChannelName( | |
887 | /* [retval][out] */ BSTR __RPC_FAR *pVal) = 0; | |
888 | ||
889 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_ChannelURL( | |
890 | /* [retval][out] */ BSTR __RPC_FAR *pVal) = 0; | |
891 | ||
892 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_ClientID( | |
893 | /* [retval][out] */ BSTR __RPC_FAR *pVal) = 0; | |
894 | ||
895 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_ConnectionSpeed( | |
896 | /* [retval][out] */ long __RPC_FAR *pVal) = 0; | |
897 | ||
898 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_ContactAddress( | |
899 | /* [retval][out] */ BSTR __RPC_FAR *pVal) = 0; | |
900 | ||
901 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_ContactEmail( | |
902 | /* [retval][out] */ BSTR __RPC_FAR *pVal) = 0; | |
903 | ||
904 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_ContactPhone( | |
905 | /* [retval][out] */ BSTR __RPC_FAR *pVal) = 0; | |
906 | ||
907 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_CurrentMarker( | |
908 | /* [retval][out] */ long __RPC_FAR *pVal) = 0; | |
909 | ||
910 | virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_CurrentMarker( | |
911 | /* [in] */ long newVal) = 0; | |
912 | ||
913 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_CurrentPosition( | |
914 | /* [retval][out] */ double __RPC_FAR *pVal) = 0; | |
915 | ||
916 | virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_CurrentPosition( | |
917 | /* [in] */ double newVal) = 0; | |
918 | ||
919 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_DefaultFrame( | |
920 | /* [retval][out] */ BSTR __RPC_FAR *pVal) = 0; | |
921 | ||
922 | virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_DefaultFrame( | |
923 | /* [in] */ BSTR newVal) = 0; | |
924 | ||
925 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_Duration( | |
926 | /* [retval][out] */ double __RPC_FAR *pVal) = 0; | |
927 | ||
928 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_EntryCount( | |
929 | /* [retval][out] */ long __RPC_FAR *pVal) = 0; | |
930 | ||
931 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_ErrorCode( | |
932 | /* [retval][out] */ long __RPC_FAR *pVal) = 0; | |
933 | ||
934 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_ErrorDescription( | |
935 | /* [retval][out] */ BSTR __RPC_FAR *pVal) = 0; | |
936 | ||
937 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_HasError( | |
938 | /* [retval][out] */ VARIANT_BOOL __RPC_FAR *pVal) = 0; | |
939 | ||
940 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_HasMultipleItems( | |
941 | /* [retval][out] */ VARIANT_BOOL __RPC_FAR *pVal) = 0; | |
942 | ||
943 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_ImageSourceHeight( | |
944 | /* [retval][out] */ long __RPC_FAR *pVal) = 0; | |
945 | ||
946 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_ImageSourceWidth( | |
947 | /* [retval][out] */ long __RPC_FAR *pVal) = 0; | |
948 | ||
949 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_InvokeURLs( | |
950 | /* [retval][out] */ VARIANT_BOOL __RPC_FAR *pVal) = 0; | |
951 | ||
952 | virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_InvokeURLs( | |
953 | /* [in] */ VARIANT_BOOL newVal) = 0; | |
954 | ||
955 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_IsBroadcast( | |
956 | /* [retval][out] */ VARIANT_BOOL __RPC_FAR *pVal) = 0; | |
957 | ||
958 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_IsDurationValid( | |
959 | /* [retval][out] */ VARIANT_BOOL __RPC_FAR *pVal) = 0; | |
960 | ||
961 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_LostPackets( | |
962 | /* [retval][out] */ long __RPC_FAR *pVal) = 0; | |
963 | ||
964 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_MarkerCount( | |
965 | /* [retval][out] */ long __RPC_FAR *pVal) = 0; | |
966 | ||
967 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_OpenState( | |
968 | /* [retval][out] */ long __RPC_FAR *pVal) = 0; | |
969 | ||
970 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_PlayState( | |
971 | /* [retval][out] */ long __RPC_FAR *pVal) = 0; | |
972 | ||
973 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_PreviewMode( | |
974 | /* [retval][out] */ VARIANT_BOOL __RPC_FAR *pVal) = 0; | |
975 | ||
976 | virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_PreviewMode( | |
977 | /* [in] */ VARIANT_BOOL newVal) = 0; | |
978 | ||
979 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_ReadyState( | |
980 | /* [retval][out] */ long __RPC_FAR *pVal) = 0; | |
981 | ||
982 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_ReceivedPackets( | |
983 | /* [retval][out] */ long __RPC_FAR *pVal) = 0; | |
984 | ||
985 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_ReceptionQuality( | |
986 | /* [retval][out] */ long __RPC_FAR *pVal) = 0; | |
987 | ||
988 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_RecoveredPackets( | |
989 | /* [retval][out] */ long __RPC_FAR *pVal) = 0; | |
990 | ||
991 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_SAMIFileName( | |
992 | /* [retval][out] */ BSTR __RPC_FAR *pVal) = 0; | |
993 | ||
994 | virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_SAMIFileName( | |
995 | /* [in] */ BSTR newVal) = 0; | |
996 | ||
997 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_SAMILang( | |
998 | /* [retval][out] */ BSTR __RPC_FAR *pVal) = 0; | |
999 | ||
1000 | virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_SAMILang( | |
1001 | /* [in] */ BSTR newVal) = 0; | |
1002 | ||
1003 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_SAMIStyle( | |
1004 | /* [retval][out] */ BSTR __RPC_FAR *pVal) = 0; | |
1005 | ||
1006 | virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_SAMIStyle( | |
1007 | /* [in] */ BSTR newVal) = 0; | |
1008 | ||
1009 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_SelectionEnd( | |
1010 | /* [retval][out] */ double __RPC_FAR *pVal) = 0; | |
1011 | ||
1012 | virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_SelectionEnd( | |
1013 | /* [in] */ double newVal) = 0; | |
1014 | ||
1015 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_SelectionStart( | |
1016 | /* [retval][out] */ double __RPC_FAR *pVal) = 0; | |
1017 | ||
1018 | virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_SelectionStart( | |
1019 | /* [in] */ double newVal) = 0; | |
1020 | ||
1021 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_SendErrorEvents( | |
1022 | /* [retval][out] */ VARIANT_BOOL __RPC_FAR *pVal) = 0; | |
1023 | ||
1024 | virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_SendErrorEvents( | |
1025 | /* [in] */ VARIANT_BOOL newVal) = 0; | |
1026 | ||
1027 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_SendKeyboardEvents( | |
1028 | /* [retval][out] */ VARIANT_BOOL __RPC_FAR *pVal) = 0; | |
1029 | ||
1030 | virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_SendKeyboardEvents( | |
1031 | /* [in] */ VARIANT_BOOL newVal) = 0; | |
1032 | ||
1033 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_SendMouseClickEvents( | |
1034 | /* [retval][out] */ VARIANT_BOOL __RPC_FAR *pVal) = 0; | |
1035 | ||
1036 | virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_SendMouseClickEvents( | |
1037 | /* [in] */ VARIANT_BOOL newVal) = 0; | |
1038 | ||
1039 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_SendMouseMoveEvents( | |
1040 | /* [retval][out] */ VARIANT_BOOL __RPC_FAR *pVal) = 0; | |
1041 | ||
1042 | virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_SendMouseMoveEvents( | |
1043 | /* [in] */ VARIANT_BOOL newVal) = 0; | |
1044 | ||
1045 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_SendOpenStateChangeEvents( | |
1046 | /* [retval][out] */ VARIANT_BOOL __RPC_FAR *pVal) = 0; | |
1047 | ||
1048 | virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_SendOpenStateChangeEvents( | |
1049 | /* [in] */ VARIANT_BOOL newVal) = 0; | |
1050 | ||
1051 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_SendPlayStateChangeEvents( | |
1052 | /* [retval][out] */ VARIANT_BOOL __RPC_FAR *pVal) = 0; | |
1053 | ||
1054 | virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_SendPlayStateChangeEvents( | |
1055 | /* [in] */ VARIANT_BOOL newVal) = 0; | |
1056 | ||
1057 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_SendWarningEvents( | |
1058 | /* [retval][out] */ VARIANT_BOOL __RPC_FAR *pVal) = 0; | |
1059 | ||
1060 | virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_SendWarningEvents( | |
1061 | /* [in] */ VARIANT_BOOL newVal) = 0; | |
1062 | ||
1063 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_SourceLink( | |
1064 | /* [retval][out] */ BSTR __RPC_FAR *pVal) = 0; | |
1065 | ||
1066 | virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE AboutBox( void) = 0; | |
1067 | ||
1068 | virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE Cancel( void) = 0; | |
1069 | ||
1070 | virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetCodecDescription( | |
1071 | /* [in] */ long nCodec, | |
1072 | /* [retval][out] */ BSTR __RPC_FAR *pDescription) = 0; | |
1073 | ||
1074 | virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetCodecInstalled( | |
1075 | /* [in] */ BSTR __RPC_FAR *pstrCodec, | |
1076 | /* [retval][out] */ VARIANT_BOOL __RPC_FAR *pIsInstalled) = 0; | |
1077 | ||
1078 | virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetCurrentEntry( | |
1079 | /* [retval][out] */ long __RPC_FAR *pVal) = 0; | |
1080 | ||
1081 | virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetMarkerName( | |
1082 | /* [in] */ long nMarker, | |
1083 | /* [retval][out] */ BSTR __RPC_FAR *pMarkerName) = 0; | |
1084 | ||
1085 | virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetMarkerTime( | |
1086 | /* [in] */ long nMarker, | |
1087 | /* [retval][out] */ double __RPC_FAR *pMarkerTime) = 0; | |
1088 | ||
1089 | virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetMediaInfoString( | |
1090 | /* [in] */ long MPMediaInfoType, | |
1091 | /* [retval][out] */ BSTR __RPC_FAR *pstrMediaInfo) = 0; | |
1092 | ||
1093 | virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE Next( void) = 0; | |
1094 | ||
1095 | virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE Open( | |
1096 | BSTR pstrClip) = 0; | |
1097 | ||
1098 | virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE Pause( void) = 0; | |
1099 | ||
1100 | virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE Play( void) = 0; | |
1101 | ||
1102 | virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE Previous( void) = 0; | |
1103 | ||
1104 | virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE Stop( void) = 0; | |
1105 | ||
1106 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_Rate( | |
1107 | /* [retval][out] */ double __RPC_FAR *pVal) = 0; | |
1108 | ||
1109 | virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_Rate( | |
1110 | /* [in] */ double newVal) = 0; | |
1111 | ||
1112 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_DisplaySize( | |
1113 | /* [retval][out] */ long __RPC_FAR *pVal) = 0; | |
1114 | ||
1115 | virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_DisplaySize( | |
1116 | /* [in] */ long newVal) = 0; | |
1117 | ||
1118 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_SourceProtocol( | |
1119 | /* [retval][out] */ long __RPC_FAR *pVal) = 0; | |
1120 | ||
1121 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_ErrorCorrection( | |
1122 | /* [retval][out] */ BSTR __RPC_FAR *pVal) = 0; | |
1123 | ||
1124 | virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE FinalConstruct( void) = 0; | |
1125 | ||
1126 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_AllowChangeDisplaySize( | |
1127 | /* [retval][out] */ VARIANT_BOOL __RPC_FAR *pVal) = 0; | |
1128 | ||
1129 | virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_AllowChangeDisplaySize( | |
1130 | /* [in] */ VARIANT_BOOL newVal) = 0; | |
1131 | ||
1132 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_AllowScan( | |
1133 | /* [retval][out] */ VARIANT_BOOL __RPC_FAR *pVal) = 0; | |
1134 | ||
1135 | virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_AllowScan( | |
1136 | /* [in] */ VARIANT_BOOL newVal) = 0; | |
1137 | ||
1138 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_AnimationAtStart( | |
1139 | /* [retval][out] */ VARIANT_BOOL __RPC_FAR *pVal) = 0; | |
1140 | ||
1141 | virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_AnimationAtStart( | |
1142 | /* [in] */ VARIANT_BOOL newVal) = 0; | |
1143 | ||
1144 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_AudioStream( | |
1145 | /* [retval][out] */ long __RPC_FAR *pVal) = 0; | |
1146 | ||
1147 | virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_AudioStream( | |
1148 | /* [in] */ long newVal) = 0; | |
1149 | ||
1150 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_AutoRewind( | |
1151 | /* [retval][out] */ VARIANT_BOOL __RPC_FAR *pVal) = 0; | |
1152 | ||
1153 | virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_AutoRewind( | |
1154 | /* [in] */ VARIANT_BOOL newVal) = 0; | |
1155 | ||
1156 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_Balance( | |
1157 | /* [retval][out] */ long __RPC_FAR *pVal) = 0; | |
1158 | ||
1159 | virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_Balance( | |
1160 | /* [in] */ long newVal) = 0; | |
1161 | ||
1162 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_CanPreview( | |
1163 | /* [retval][out] */ VARIANT_BOOL __RPC_FAR *pVal) = 0; | |
1164 | ||
1165 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_CanScan( | |
1166 | /* [retval][out] */ VARIANT_BOOL __RPC_FAR *pVal) = 0; | |
1167 | ||
1168 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_CaptioningID( | |
1169 | /* [retval][out] */ BSTR __RPC_FAR *pVal) = 0; | |
1170 | ||
1171 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_ClickToPlay( | |
1172 | /* [retval][out] */ VARIANT_BOOL __RPC_FAR *pVal) = 0; | |
1173 | ||
1174 | virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_ClickToPlay( | |
1175 | /* [in] */ VARIANT_BOOL newVal) = 0; | |
1176 | ||
1177 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_CodecCount( | |
1178 | /* [retval][out] */ long __RPC_FAR *pVal) = 0; | |
1179 | ||
1180 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_CreationDate( | |
1181 | /* [retval][out] */ DATE __RPC_FAR *pVal) = 0; | |
1182 | ||
1183 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_CursorType( | |
1184 | /* [retval][out] */ long __RPC_FAR *pVal) = 0; | |
1185 | ||
1186 | virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_CursorType( | |
1187 | /* [in] */ long newVal) = 0; | |
1188 | ||
1189 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_DisplayBackColor( | |
1190 | /* [retval][out] */ VB_OLE_COLOR __RPC_FAR *pVal) = 0; | |
1191 | ||
1192 | virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_DisplayBackColor( | |
1193 | /* [in] */ VB_OLE_COLOR newVal) = 0; | |
1194 | ||
1195 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_DisplayForeColor( | |
1196 | /* [retval][out] */ VB_OLE_COLOR __RPC_FAR *pVal) = 0; | |
1197 | ||
1198 | virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_DisplayForeColor( | |
1199 | /* [in] */ VB_OLE_COLOR newVal) = 0; | |
1200 | ||
1201 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_DisplayMode( | |
1202 | /* [retval][out] */ long __RPC_FAR *pVal) = 0; | |
1203 | ||
1204 | virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_DisplayMode( | |
1205 | /* [in] */ long newVal) = 0; | |
1206 | ||
1207 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_EnableContextMenu( | |
1208 | /* [retval][out] */ VARIANT_BOOL __RPC_FAR *pVal) = 0; | |
1209 | ||
1210 | virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_EnableContextMenu( | |
1211 | /* [in] */ VARIANT_BOOL newVal) = 0; | |
1212 | ||
1213 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_EnableFullScreenControls( | |
1214 | /* [retval][out] */ VARIANT_BOOL __RPC_FAR *pVal) = 0; | |
1215 | ||
1216 | virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_EnableFullScreenControls( | |
1217 | /* [in] */ VARIANT_BOOL newVal) = 0; | |
1218 | ||
1219 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_EnablePositionControls( | |
1220 | /* [retval][out] */ VARIANT_BOOL __RPC_FAR *pVal) = 0; | |
1221 | ||
1222 | virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_EnablePositionControls( | |
1223 | /* [in] */ VARIANT_BOOL newVal) = 0; | |
1224 | ||
1225 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_EnableTracker( | |
1226 | /* [retval][out] */ VARIANT_BOOL __RPC_FAR *pVal) = 0; | |
1227 | ||
1228 | virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_EnableTracker( | |
1229 | /* [in] */ VARIANT_BOOL newVal) = 0; | |
1230 | ||
1231 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_Language( | |
1232 | /* [retval][out] */ long __RPC_FAR *pVal) = 0; | |
1233 | ||
1234 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_StreamCount( | |
1235 | /* [retval][out] */ long __RPC_FAR *pVal) = 0; | |
1236 | ||
1237 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_TransparentAtStart( | |
1238 | /* [retval][out] */ VARIANT_BOOL __RPC_FAR *pVal) = 0; | |
1239 | ||
1240 | virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_TransparentAtStart( | |
1241 | /* [in] */ VARIANT_BOOL newVal) = 0; | |
1242 | ||
1243 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_VideoBorder3D( | |
1244 | /* [retval][out] */ VARIANT_BOOL __RPC_FAR *pVal) = 0; | |
1245 | ||
1246 | virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_VideoBorder3D( | |
1247 | /* [in] */ VARIANT_BOOL newVal) = 0; | |
1248 | ||
1249 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_VideoBorderColor( | |
1250 | /* [retval][out] */ long __RPC_FAR *pVal) = 0; | |
1251 | ||
1252 | virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_VideoBorderColor( | |
1253 | /* [in] */ long newVal) = 0; | |
1254 | ||
1255 | virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_VideoBorderWidth( | |
1256 | /* [retval][out] */ long __RPC_FAR *pVal) = 0; | |
1257 | ||
1258 | virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_VideoBorderWidth( | |
1259 | /* [in] */ long newVal) = 0; | |
1260 | ||
1261 | virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE FastForward( void) = 0; | |
1262 | ||
1263 | virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE FastReverse( void) = 0; | |
1264 | ||
1265 | virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetCodecURL( | |
1266 | /* [retval][out] */ BSTR __RPC_FAR *pstrCodecURL) = 0; | |
1267 | ||
1268 | virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetMediaParameter( | |
1269 | /* [in] */ long nParam, | |
1270 | BSTR szParameterName, | |
1271 | /* [retval][out] */ BSTR __RPC_FAR *pstrParameterValue) = 0; | |
1272 | ||
1273 | virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetMediaParameterName( | |
1274 | /* [in] */ long nParam, | |
1275 | long nIndex, | |
1276 | /* [retval][out] */ BSTR __RPC_FAR *pstrParameterName) = 0; | |
1277 | ||
1278 | virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetMoreInfoURL( | |
1279 | /* [retval][out] */ BSTR __RPC_FAR *pstrMoreInfoURL) = 0; | |
1280 | ||
1281 | virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetStreamGroup( | |
1282 | /* [retval][out] */ BSTR __RPC_FAR *pstrStreamGroup) = 0; | |
1283 | ||
1284 | virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetStreamName( | |
1285 | /* [retval][out] */ BSTR __RPC_FAR *pstrStreamName) = 0; | |
1286 | ||
1287 | virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetStreamSelected( | |
1288 | /* [in] */ long nStream, | |
1289 | /* [retval][out] */ VARIANT_BOOL __RPC_FAR *fIsSelected) = 0; | |
1290 | ||
1291 | virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE IsSoundCardEnabled( | |
1292 | /* [retval][out] */ VARIANT_BOOL __RPC_FAR *fIsEnabled) = 0; | |
1293 | ||
1294 | virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE SetCurrentEntry( | |
1295 | long nValue) = 0; | |
1296 | ||
1297 | virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE ShowDialog( | |
1298 | long nValue) = 0; | |
1299 | ||
1300 | virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE StreamSelect( | |
1301 | long nSelect) = 0; | |
1302 | ||
1303 | virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE OnWindowMessage( | |
1304 | UINT msg, | |
1305 | WPARAM wParam, | |
1306 | LPARAM lParam, | |
1307 | LRESULT __RPC_FAR *plResult) = 0; | |
1308 | ||
1309 | }; | |
1310 | ||
1311 | ||
1312 | #endif // CE | |
1313 | ||
1314 | //--------------------------------------------------------------------------- | |
1315 | // MISC COM INTERFACES | |
1316 | //--------------------------------------------------------------------------- | |
1317 | typedef enum _FilterState | |
1318 | { | |
1319 | State_Stopped, | |
1320 | State_Paused, | |
1321 | State_Running | |
1322 | } FILTER_STATE; | |
1323 | typedef enum _PinDirection { | |
1324 | PINDIR_INPUT, | |
1325 | PINDIR_OUTPUT | |
1326 | } PIN_DIRECTION; | |
1327 | ||
1328 | typedef struct _FilterInfo { | |
1329 | WCHAR achName[128]; | |
1330 | struct IFilterGraph *pGraph; | |
1331 | } FILTER_INFO; | |
1332 | ||
1333 | typedef struct _PinInfo { | |
1334 | struct IBaseFilter *pFilter; | |
1335 | PIN_DIRECTION dir; | |
1336 | WCHAR achName[128]; | |
1337 | } PIN_INFO; | |
1338 | ||
1339 | struct IBaseFilter; | |
1340 | struct IPin; | |
1341 | struct IEnumFilters; | |
1342 | typedef struct _MediaType { | |
1343 | GUID majortype; | |
1344 | GUID subtype; | |
1345 | BOOL bFixedSizeSamples; | |
1346 | BOOL bTemporalCompression; | |
1347 | ULONG lSampleSize; | |
1348 | GUID formattype; | |
1349 | IUnknown *pUnk; | |
1350 | ULONG cbFormat; | |
1351 | BYTE *pbFormat; | |
1352 | } AM_MEDIA_TYPE; | |
1353 | ||
1354 | struct IFilterGraph : public IUnknown | |
1355 | { | |
1356 | STDMETHOD(AddFilter)(IBaseFilter *, LPCWSTR) PURE; | |
1357 | STDMETHOD(RemoveFilter)(IBaseFilter *) PURE; | |
1358 | STDMETHOD(EnumFilters)(IEnumFilters **) PURE; | |
1359 | STDMETHOD(FindFilterByName)(LPCWSTR, IBaseFilter **) PURE; | |
1360 | STDMETHOD(ConnectDirect)(IPin *, IPin *, const AM_MEDIA_TYPE *) PURE; | |
1361 | STDMETHOD(Reconnect)(IPin *) PURE; | |
1362 | STDMETHOD(Disconnect)(IPin *) PURE; | |
1363 | STDMETHOD(SetDefaultSyncSource)() PURE; | |
1364 | }; | |
1365 | ||
1366 | struct IGraphBuilder : public IFilterGraph | |
1367 | { | |
1368 | STDMETHOD(Connect)(IPin *, IPin *) PURE; | |
1369 | STDMETHOD(Render)(IPin *) PURE; | |
1370 | STDMETHOD(RenderFile)(LPCWSTR, LPCWSTR) PURE; | |
1371 | STDMETHOD(AddSourceFilter)(LPCWSTR, LPCWSTR, IBaseFilter **) PURE; | |
1372 | STDMETHOD(SetLogFile)(DWORD_PTR) PURE; | |
1373 | STDMETHOD(Abort)() PURE; | |
1374 | STDMETHOD(ShouldOperationContinue)() PURE; | |
1375 | }; | |
1376 | ||
1377 | struct IReferenceClock; | |
1378 | struct IEnumPins; | |
1379 | #define REFERENCE_TIME LONGLONG | |
1380 | struct IMediaFilter : public IPersist | |
1381 | { | |
1382 | STDMETHOD(Stop)( void) PURE; | |
1383 | STDMETHOD(Pause)( void) PURE; | |
1384 | STDMETHOD(Run)(REFERENCE_TIME tStart) PURE; | |
1385 | STDMETHOD(GetState)(DWORD dwMilliSecsTimeout, | |
1386 | FILTER_STATE *State) PURE; | |
1387 | STDMETHOD(SetSyncSource)(IReferenceClock *pClock) PURE; | |
1388 | STDMETHOD(GetSyncSource)(IReferenceClock **pClock) PURE; | |
1389 | }; | |
1390 | ||
1391 | struct IBaseFilter : public IMediaFilter | |
1392 | { | |
1393 | STDMETHOD(EnumPins)(IEnumPins **ppEnum) PURE; | |
1394 | STDMETHOD(FindPin)(LPCWSTR Id, IPin **ppPin) PURE; | |
1395 | STDMETHOD(QueryFilterInfo)(FILTER_INFO *pInfo) PURE; | |
1396 | STDMETHOD(JoinFilterGraph)(IFilterGraph *pGraph, LPCWSTR pName) PURE; | |
1397 | STDMETHOD(QueryVendorInfo)(LPWSTR *pVendorInfo) PURE; | |
1398 | }; | |
1399 | ||
1400 | ||
1401 | //--------------------------------------------------------------------------- | |
1402 | // | |
1403 | // wxAMMediaBackend | |
1404 | // | |
1405 | //--------------------------------------------------------------------------- | |
1406 | ||
1407 | typedef BOOL (WINAPI* LPAMGETERRORTEXT)(HRESULT, wxChar *, DWORD); | |
1408 | ||
1409 | class WXDLLIMPEXP_MEDIA wxAMMediaBackend : public wxMediaBackendCommonBase | |
1410 | { | |
1411 | public: | |
1412 | wxAMMediaBackend(); | |
1413 | virtual ~wxAMMediaBackend(); | |
1414 | ||
1415 | virtual bool CreateControl(wxControl* ctrl, wxWindow* parent, | |
1416 | wxWindowID id, | |
1417 | const wxPoint& pos, | |
1418 | const wxSize& size, | |
1419 | long style, | |
1420 | const wxValidator& validator, | |
1421 | const wxString& name); | |
1422 | ||
1423 | virtual bool Play(); | |
1424 | virtual bool Pause(); | |
1425 | virtual bool Stop(); | |
1426 | ||
1427 | virtual bool Load(const wxString& fileName); | |
1428 | virtual bool Load(const wxURI& location); | |
1429 | virtual bool Load(const wxURI& location, const wxURI& proxy); | |
1430 | ||
1431 | bool DoLoad(const wxString& location); | |
1432 | void FinishLoad(); | |
1433 | ||
1434 | virtual wxMediaState GetState(); | |
1435 | ||
1436 | virtual bool SetPosition(wxLongLong where); | |
1437 | virtual wxLongLong GetPosition(); | |
1438 | virtual wxLongLong GetDuration(); | |
1439 | ||
1440 | virtual void Move(int x, int y, int w, int h); | |
1441 | wxSize GetVideoSize() const; | |
1442 | ||
1443 | virtual double GetPlaybackRate(); | |
1444 | virtual bool SetPlaybackRate(double); | |
1445 | ||
1446 | virtual double GetVolume(); | |
1447 | virtual bool SetVolume(double); | |
1448 | ||
1449 | virtual bool ShowPlayerControls(wxMediaCtrlPlayerControls flags); | |
1450 | ||
1451 | void DoGetDownloadProgress(wxLongLong*, wxLongLong*); | |
1452 | virtual wxLongLong GetDownloadProgress() | |
1453 | { | |
1454 | wxLongLong progress, total; | |
1455 | DoGetDownloadProgress(&progress, &total); | |
1456 | return progress; | |
1457 | } | |
1458 | virtual wxLongLong GetDownloadTotal() | |
1459 | { | |
1460 | wxLongLong progress, total; | |
1461 | DoGetDownloadProgress(&progress, &total); | |
1462 | return total; | |
1463 | } | |
1464 | ||
1465 | wxActiveXContainer* m_pAX; // ActiveX host | |
1466 | #ifdef __WXWINCE__ | |
1467 | IWMP* m_pWMP; | |
1468 | ||
1469 | IWMP* GetMP() {return m_pWMP;} | |
1470 | IWMP* GetAM() {return m_pWMP;} | |
1471 | #else | |
1472 | IActiveMovie* m_pAM; | |
1473 | IMediaPlayer* m_pMP; | |
1474 | ||
1475 | IMediaPlayer* GetMP() {return m_pMP;} | |
1476 | IActiveMovie* GetAM() {return m_pAM;} | |
1477 | #endif | |
1478 | wxSize m_bestSize; // Cached size | |
1479 | ||
4b6a582b VZ |
1480 | // Stuff for getting useful debugging strings |
1481 | #if wxDEBUG_LEVEL | |
557002cf VZ |
1482 | wxDynamicLibrary m_dllQuartz; |
1483 | LPAMGETERRORTEXT m_lpAMGetErrorText; | |
1484 | wxString GetErrorString(HRESULT hrdsv); | |
4b6a582b | 1485 | #endif // wxDEBUG_LEVEL |
0fa5ce0c | 1486 | wxEvtHandler* m_evthandler; |
557002cf VZ |
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 | ||
c0c133e1 | 1512 | wxDECLARE_NO_COPY_CLASS(wxAMMediaEvtHandler); |
557002cf VZ |
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 | //--------------------------------------------------------------------------- | |
4b6a582b | 1530 | #if wxDEBUG_LEVEL |
557002cf VZ |
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") | |
070d6391 | 1542 | wxT("occurred"), |
557002cf VZ |
1543 | szError, (int)hrdsv); |
1544 | } | |
1545 | else | |
1546 | { | |
1547 | return wxString::Format(wxT("Unknown error \n") | |
1548 | wxT("(numeric %X)\n") | |
070d6391 | 1549 | wxT("occurred"), |
557002cf VZ |
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__ | |
3d0a1631 | 1570 | m_pWMP(NULL), |
557002cf VZ |
1571 | #else |
1572 | m_pAM(NULL), | |
3d0a1631 | 1573 | m_pMP(NULL), |
557002cf | 1574 | #endif |
3d0a1631 | 1575 | m_bestSize(wxDefaultSize) |
557002cf | 1576 | { |
0fa5ce0c | 1577 | m_evthandler = NULL; |
557002cf VZ |
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 | ||
0fa5ce0c VZ |
1596 | if (m_evthandler) |
1597 | { | |
1598 | m_ctrl->RemoveEventHandler(m_evthandler); | |
1599 | delete m_evthandler; | |
1600 | } | |
557002cf VZ |
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 | |
4b6a582b | 1617 | #if wxDEBUG_LEVEL |
9a83f860 | 1618 | if ( m_dllQuartz.Load(wxT("quartz.dll"), wxDL_VERBATIM) ) |
557002cf VZ |
1619 | { |
1620 | m_lpAMGetErrorText = (LPAMGETERRORTEXT) | |
1621 | m_dllQuartz.GetSymbolAorW(wxT("AMGetErrorText")); | |
1622 | } | |
4b6a582b | 1623 | #endif // wxDEBUG_LEVEL |
557002cf VZ |
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 | |
0fa5ce0c VZ |
1692 | m_evthandler = new wxAMMediaEvtHandler(this); |
1693 | m_ctrl->PushEventHandler(m_evthandler); | |
557002cf VZ |
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 | ||
3d0a1631 | 1802 | m_bestSize = wxDefaultSize; |
557002cf VZ |
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 | { | |
557002cf VZ |
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 | |
4c51a665 DS |
1825 | // default but IActiveMovie does - so let's try to keep |
1826 | // the interface consistent. | |
557002cf VZ |
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 | //--------------------------------------------------------------------------- | |
6e0e8862 | 1959 | // wxAMMediaBackend::GetVolume and SetVolume() |
557002cf | 1960 | // |
6e0e8862 VZ |
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. | |
557002cf | 1963 | //--------------------------------------------------------------------------- |
6e0e8862 | 1964 | |
557002cf VZ |
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 | ||
6e0e8862 VZ |
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] | |
557002cf | 1979 | |
557002cf VZ |
1980 | return dVolume; |
1981 | } | |
1982 | ||
557002cf VZ |
1983 | bool wxAMMediaBackend::SetVolume(double dVolume) |
1984 | { | |
6e0e8862 | 1985 | // inverse the transformation above |
5c33522f | 1986 | long lVolume = static_cast<long>(2000*log10(dVolume + (1 - dVolume)*0.00001)); |
6e0e8862 VZ |
1987 | |
1988 | HRESULT hr = GetAM()->put_Volume(lVolume); | |
557002cf VZ |
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); | |
40f48834 | 2011 | switch ( hr ) |
557002cf | 2012 | { |
40f48834 VZ |
2013 | default: |
2014 | wxAMLOG(hr); | |
2015 | // fall through | |
557002cf | 2016 | |
40f48834 VZ |
2017 | case S_FALSE: |
2018 | return 0; | |
557002cf | 2019 | |
40f48834 VZ |
2020 | case S_OK: |
2021 | // outDuration is in seconds, we need milliseconds | |
47e442de VZ |
2022 | #ifdef wxLongLong_t |
2023 | return static_cast<wxLongLong_t>(outDuration * 1000); | |
2024 | #else | |
2025 | // In principle it's possible to have video of duration greater | |
2026 | // than ~1193 hours which corresponds LONG_MAX in milliseconds so | |
2027 | // cast to wxLongLong first and multiply by 1000 only then to avoid | |
2028 | // the overflow (resulting in maximal duration of ~136 years). | |
2029 | return wxLongLong(static_cast<long>(outDuration)) * 1000; | |
2030 | #endif | |
40f48834 | 2031 | } |
557002cf VZ |
2032 | } |
2033 | ||
2034 | //--------------------------------------------------------------------------- | |
2035 | // wxAMMediaBackend::GetState | |
2036 | // | |
2037 | // Returns the cached state | |
2038 | //--------------------------------------------------------------------------- | |
2039 | wxMediaState wxAMMediaBackend::GetState() | |
2040 | { | |
2041 | StateConstants nState; | |
2042 | #ifdef __WXWINCE__ | |
2043 | HRESULT hr = m_pWMP->get_PlayState((long*)&nState); | |
2044 | #else | |
2045 | HRESULT hr = GetAM()->get_CurrentState(&nState); | |
2046 | #endif | |
2047 | if(FAILED(hr)) | |
2048 | { | |
2049 | wxAMLOG(hr); | |
2050 | return wxMEDIASTATE_STOPPED; | |
2051 | } | |
2052 | ||
2053 | return (wxMediaState)nState; | |
2054 | } | |
2055 | ||
2056 | //--------------------------------------------------------------------------- | |
2057 | // wxAMMediaBackend::GetPlaybackRate | |
2058 | // | |
2059 | // Pretty simple way of obtaining the playback rate from | |
2060 | // the IActiveMovie interface | |
2061 | //--------------------------------------------------------------------------- | |
2062 | double wxAMMediaBackend::GetPlaybackRate() | |
2063 | { | |
2064 | double dRate; | |
2065 | HRESULT hr = GetAM()->get_Rate(&dRate); | |
2066 | if(FAILED(hr)) | |
2067 | { | |
2068 | wxAMLOG(hr); | |
2069 | return 0.0; | |
2070 | } | |
2071 | return dRate; | |
2072 | } | |
2073 | ||
2074 | //--------------------------------------------------------------------------- | |
2075 | // wxAMMediaBackend::SetPlaybackRate | |
2076 | // | |
2077 | // Sets the playback rate of the media - DirectShow is pretty good | |
2078 | // about this, actually | |
2079 | //--------------------------------------------------------------------------- | |
2080 | bool wxAMMediaBackend::SetPlaybackRate(double dRate) | |
2081 | { | |
2082 | HRESULT hr = GetAM()->put_Rate(dRate); | |
2083 | if(FAILED(hr)) | |
2084 | { | |
2085 | wxAMLOG(hr); | |
2086 | return false; | |
2087 | } | |
2088 | ||
2089 | return true; | |
2090 | } | |
2091 | ||
2092 | //--------------------------------------------------------------------------- | |
2093 | // wxAMMediaBackend::GetDownloadXXX | |
2094 | // | |
2095 | // Queries for and gets the total size of the file and the current | |
2096 | // progress in downloading that file from the IAMOpenProgress | |
2097 | // interface from the media player interface's filter graph | |
2098 | //--------------------------------------------------------------------------- | |
2099 | void wxAMMediaBackend::DoGetDownloadProgress(wxLongLong* pLoadProgress, | |
2100 | wxLongLong* pLoadTotal) | |
2101 | { | |
2102 | #ifndef __WXWINCE__ | |
f836fe35 VZ |
2103 | IUnknown* pFG = NULL; |
2104 | ||
2105 | HRESULT hr = m_pAM->get_FilterGraph(&pFG); | |
2106 | ||
2107 | // notice that the call above may return S_FALSE and leave pFG NULL | |
2108 | if(SUCCEEDED(hr) && pFG) | |
557002cf | 2109 | { |
f836fe35 | 2110 | IAMOpenProgress* pOP = NULL; |
557002cf | 2111 | hr = pFG->QueryInterface(IID_IAMOpenProgress, (void**)&pOP); |
f836fe35 VZ |
2112 | if(SUCCEEDED(hr) && pOP) |
2113 | { | |
2114 | LONGLONG | |
2115 | loadTotal = 0, | |
2116 | loadProgress = 0; | |
557002cf VZ |
2117 | hr = pOP->QueryProgress(&loadTotal, &loadProgress); |
2118 | pOP->Release(); | |
f836fe35 VZ |
2119 | |
2120 | if(SUCCEEDED(hr)) | |
2121 | { | |
2122 | *pLoadProgress = loadProgress; | |
2123 | *pLoadTotal = loadTotal; | |
2124 | pFG->Release(); | |
2125 | return; | |
2126 | } | |
557002cf VZ |
2127 | } |
2128 | pFG->Release(); | |
2129 | } | |
f836fe35 | 2130 | #endif // !__WXWINCE__ |
557002cf | 2131 | |
f836fe35 VZ |
2132 | *pLoadProgress = 0; |
2133 | *pLoadTotal = 0; | |
557002cf VZ |
2134 | } |
2135 | ||
2136 | //--------------------------------------------------------------------------- | |
2137 | // wxAMMediaBackend::GetVideoSize | |
2138 | // | |
2139 | // Obtains the cached original video size | |
2140 | //--------------------------------------------------------------------------- | |
2141 | wxSize wxAMMediaBackend::GetVideoSize() const | |
2142 | { | |
3d0a1631 RD |
2143 | if (m_bestSize == wxDefaultSize) |
2144 | { | |
2145 | wxAMMediaBackend* self = wxConstCast(this, wxAMMediaBackend); | |
2146 | long w = 0; | |
2147 | long h = 0; | |
2148 | ||
2149 | self->GetAM()->get_ImageSourceWidth(&w); | |
2150 | self->GetAM()->get_ImageSourceHeight(&h); | |
2151 | ||
2152 | if (w != 0 && h != 0) | |
2153 | self->m_bestSize.Set(w, h); | |
2154 | else | |
2155 | return wxSize(0,0); | |
2156 | } | |
2157 | ||
2158 | return m_bestSize; | |
557002cf VZ |
2159 | } |
2160 | ||
2161 | //--------------------------------------------------------------------------- | |
2162 | // wxAMMediaBackend::Move | |
2163 | // | |
2164 | // We take care of this in our redrawing | |
2165 | //--------------------------------------------------------------------------- | |
2166 | void wxAMMediaBackend::Move(int WXUNUSED(x), int WXUNUSED(y), | |
2167 | int WXUNUSED(w), int WXUNUSED(h)) | |
2168 | { | |
2169 | } | |
2170 | ||
2171 | //--------------------------------------------------------------------------- | |
2172 | // wxAMMediaBackend::OnActiveX | |
2173 | // | |
2174 | // Handle events sent from our activex control (IActiveMovie/IMediaPlayer). | |
2175 | // | |
2176 | // The weird numbers in the switch statement here are "dispatch ids" | |
2177 | // (the numbers in the id field like ( id(xxx) ) ) from amcompat.idl | |
2178 | // and msdxm.idl. | |
2179 | //--------------------------------------------------------------------------- | |
2180 | void wxAMMediaEvtHandler::OnActiveX(wxActiveXEvent& event) | |
2181 | { | |
2182 | switch(event.GetDispatchId()) | |
2183 | { | |
2184 | #ifndef __WXWINCE__ | |
2185 | case 0x00000001: // statechange in IActiveMovie | |
2186 | case 0x00000bc4: // playstatechange in IMediaPlayer | |
2187 | #else | |
2188 | case 0x00000011: // 17 == playstatechange on IWMP | |
2189 | #endif | |
2190 | if(event.ParamCount() >= 2) | |
2191 | { | |
2192 | switch (event[1].GetInteger()) | |
2193 | { | |
2194 | case 0: // stopping | |
2195 | if( m_amb->wxAMMediaBackend::GetPosition() == | |
2196 | m_amb->wxAMMediaBackend::GetDuration() ) | |
2197 | { | |
2198 | if ( m_amb->SendStopEvent() ) | |
2199 | { | |
2200 | // Seek to beginning of movie | |
2201 | m_amb->wxAMMediaBackend::SetPosition(0); | |
2202 | ||
2203 | // send the event to our child | |
2204 | m_amb->QueueFinishEvent(); | |
2205 | } | |
2206 | } | |
2207 | else | |
2208 | { | |
2209 | m_amb->QueueStopEvent(); | |
2210 | } | |
2211 | break; | |
2212 | case 1: // pause | |
2213 | m_amb->QueuePauseEvent(); | |
2214 | break; | |
2215 | case 2: // play | |
2216 | m_amb->QueuePlayEvent(); | |
2217 | break; | |
2218 | default: | |
2219 | break; | |
2220 | } | |
2221 | } | |
2222 | else | |
2223 | event.Skip(); | |
2224 | break; | |
2225 | ||
2226 | #ifndef __WXWINCE__ | |
2227 | case 0x00000032: // opencomplete in IActiveMovie | |
2228 | if(!m_bLoadEventSent) | |
2229 | { | |
2230 | m_amb->FinishLoad(); | |
2231 | } | |
2232 | break; | |
2233 | ||
2234 | case 0xfffffd9f: // readystatechange in IActiveMovie2 and IMediaPlayer | |
2235 | #else | |
2236 | case 0x00000013: // 19 == readystatechange in IWMP | |
2237 | #endif | |
2238 | if(event.ParamCount() >= 1) | |
2239 | { | |
2240 | if(event[0].GetInteger() == 0) | |
2241 | { | |
2242 | m_bLoadEventSent = false; | |
2243 | } | |
2244 | // Originally this was >= 3 here but on 3 we can't get the | |
2245 | // size of the video (will error) - however on 4 | |
2246 | // it won't play on downloaded things until it is | |
2247 | // completely downloaded so we use the lesser of two evils... | |
2248 | else if(event[0].GetInteger() == 3 && | |
2249 | !m_bLoadEventSent) | |
2250 | { | |
2251 | m_bLoadEventSent = true; | |
2252 | m_amb->FinishLoad(); | |
2253 | } | |
2254 | } | |
2255 | else | |
2256 | event.Skip(); | |
2257 | break; | |
2258 | ||
2259 | default: | |
2260 | event.Skip(); | |
2261 | return; | |
2262 | } | |
2263 | } | |
2264 | ||
2265 | //--------------------------------------------------------------------------- | |
2266 | // End of wxAMMediaBackend | |
2267 | //--------------------------------------------------------------------------- | |
2268 | ||
6161dd2d VZ |
2269 | // Allow the user code to use wxFORCE_LINK_MODULE() to ensure that this object |
2270 | // file is not discarded by the linker. | |
2271 | #include "wx/link.h" | |
2272 | wxFORCE_LINK_THIS_MODULE(wxmediabackend_am) | |
557002cf | 2273 | |
e38b61ed | 2274 | #endif // wxUSE_MEDIACTRL && wxUSE_ACTIVEX |