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>
7 // Copyright: (c) Ryan Norton
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
11 // TODO: Actually test the CE IWMP....
12 // TODO: Actually test HTTP proxies...
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.
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.
25 // For supporting HTTP proxies and such we query the media player
26 // interface (IActiveMovie/IWMP) for the INSPlay (NetShow) interface.
28 // The IMediaPlayer/IActiveMovie/IWMP are rather clean and straightforward
29 // interfaces that are fairly simplistic.
31 // Docs for IMediaPlayer are at
32 // http://msdn.microsoft.com/library/en-us/wmp6sdk/htm/microsoftwindowsmediaplayercontrolversion64sdk.asp
34 // Docs for IWMP are at
35 // http://msdn.microsoft.com/library/en-us/wcewmp/html/_wcesdk_asx_wmp_control_reference.asp
37 //===========================================================================
39 //===========================================================================
41 //---------------------------------------------------------------------------
42 // Pre-compiled header stuff
43 //---------------------------------------------------------------------------
45 // For compilers that support precompilation, includes "wx.h".
46 #include "wx/wxprec.h"
52 // disable "cast truncates constant value" for VARIANT_BOOL values
53 // passed as parameters in VC6
55 #pragma warning (disable:4310)
58 #if wxUSE_MEDIACTRL && wxUSE_ACTIVEX
60 #include "wx/mediactrl.h"
64 #include "wx/dcclient.h"
66 #include "wx/math.h" // log10 & pow
67 #include "wx/stopwatch.h"
70 #include "wx/msw/private.h" // user info and wndproc setting/getting
71 #include "wx/dynlib.h"
73 //---------------------------------------------------------------------------
74 // wxActiveXContainer - includes all the COM-specific stuff we need
75 //---------------------------------------------------------------------------
76 #include "wx/msw/ole/activex.h"
78 // It may sound odd, but you can actually compile this with
79 // __WXWINCE__ enabled on non-CE windows
82 //---------------------------------------------------------------------------
83 // IIDS - used by CoCreateInstance and IUnknown::QueryInterface
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)
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
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
106 // IWMP is from PlayerOCX.idl on PocketPC 2000, which uses CLSID_MediaPlayer
107 // as well as the main windows line.
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}};
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}};
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}};
124 const IID IID_IWMP
= {0x136B66EC,0xF30D,0x46A8,{0x88,0xDD,0xF2,0xD0,0x55,0x16,0x3E,0x49}};
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}};
131 const IID IID_IAMOpenProgress
= {0x8E1C39A1, 0xDE53, 0x11CF,{0xAA, 0x63, 0x00, 0x80, 0xC7, 0x44, 0x52, 0x8D}};
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}};
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}};
145 //---------------------------------------------------------------------------
146 // QUARTZ COM INTERFACES (dumped from quartz.idl from MSVC COM Browser)
147 //---------------------------------------------------------------------------
149 struct IAMOpenProgress
: public IUnknown
151 STDMETHOD(QueryProgress
)(LONGLONG
*pllTotal
, LONGLONG
*pllCurrent
) PURE
;
152 STDMETHOD(AbortOperation
)(void) PURE
;
155 struct IMediaEvent
: public IDispatch
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
;
165 //---------------------------------------------------------------------------
166 // ACTIVEMOVIE COM INTERFACES (dumped from amcompat.idl from MSVC COM Browser)
167 //---------------------------------------------------------------------------
169 enum ReadyStateConstants
171 amvUninitialized
= 0,
185 enum DisplayModeConstants
191 enum WindowSizeConstants
194 amvDoubleOriginalSize
= 1,
195 amvOneSixteenthScreen
= 2,
196 amvOneFourthScreen
= 3,
200 enum AppearanceConstants
206 enum BorderStyleConstants
212 struct IActiveMovie
: public IDispatch
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
;
296 struct IActiveMovie2
: public IActiveMovie
298 STDMETHOD(IsSoundCardEnabled
)(VARIANT_BOOL __RPC_FAR
*pbSoundCard
) PURE
;
299 STDMETHOD(get_ReadyState
)(ReadyStateConstants __RPC_FAR
*pValue
) PURE
;
302 struct IActiveMovie3
: public IActiveMovie2
304 STDMETHOD(get_MediaPlayer
)(IDispatch __RPC_FAR
*__RPC_FAR
*ppDispatch
) PURE
;
308 //---------------------------------------------------------------------------
309 // MEDIAPLAYER COM INTERFACES (dumped from msdxm.idl from MSVC COM Browser)
310 //---------------------------------------------------------------------------
312 enum MPPlayStateConstants
323 enum MPDisplaySizeConstants
330 mpOneSixteenthScreen
= 5,
331 mpOneFourthScreen
= 6,
335 enum MPReadyStateConstants
337 mpReadyStateUninitialized
= 0,
338 mpReadyStateLoading
= 1,
339 mpReadyStateInteractive
= 3,
340 mpReadyStateComplete
= 4
343 typedef unsigned long VB_OLE_COLOR
;
345 enum MPDisplayModeConstants
365 mpShowDescription
= 5,
370 mpClipCopyright
= 10,
372 mpClipDescription
= 12,
375 mpBannerMoreInfo
= 15,
379 enum DVDMenuIDConstants
383 dvdMenu_Subpicture
= 4,
389 enum MPShowDialogConstants
391 mpShowDialogHelp
= 0,
392 mpShowDialogStatistics
= 1,
393 mpShowDialogOptions
= 2,
394 mpShowDialogContextMenu
= 3
398 struct IMediaPlayer
: public IDispatch
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
;
589 struct IMediaPlayer2
: public IMediaPlayer
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
;
600 //---------------------------------------------------------------------------
601 // NETSHOW COM INTERFACES (dumped from nscompat.idl from MSVC COM Browser)
602 //---------------------------------------------------------------------------
604 struct INSOPlay
: public IDispatch
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
;
682 struct INSPlay
: public INSOPlay
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
;
745 struct INSPlay1
: public INSPlay
747 STDMETHOD(get_MediaPlayer
)(IDispatch __RPC_FAR
*__RPC_FAR
*ppdispatch
) PURE
;
750 //---------------------------------------------------------------------------
751 // IWMP (PocketPC 2000) COM INTERFACES (dumped from PlayerOCX.idl)
752 //---------------------------------------------------------------------------
756 struct IWMP
: public IDispatch
759 virtual /* [id][propput] */ HRESULT STDMETHODCALLTYPE
put_AutoSize(
760 /* [in] */ VARIANT_BOOL vbool
) = 0;
762 virtual /* [id][propget] */ HRESULT STDMETHODCALLTYPE
get_AutoSize(
763 /* [retval][out] */ VARIANT_BOOL __RPC_FAR
*pbool
) = 0;
765 virtual /* [id][propput] */ HRESULT STDMETHODCALLTYPE
put_BorderStyle(
766 /* [in] */ long style
) = 0;
768 virtual /* [id][propget] */ HRESULT STDMETHODCALLTYPE
get_BorderStyle(
769 /* [retval][out] */ long __RPC_FAR
*pstyle
) = 0;
771 virtual /* [id][propput] */ HRESULT STDMETHODCALLTYPE
put_Enabled(
772 /* [in] */ VARIANT_BOOL vbool
) = 0;
774 virtual /* [id][propget] */ HRESULT STDMETHODCALLTYPE
get_Enabled(
775 /* [retval][out] */ VARIANT_BOOL __RPC_FAR
*pbool
) = 0;
777 virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE
get_FileName(
778 /* [retval][out] */ BSTR __RPC_FAR
*pVal
) = 0;
780 virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE
put_FileName(
781 /* [in] */ BSTR newVal
) = 0;
783 virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE
get_Volume(
784 /* [retval][out] */ long __RPC_FAR
*pVal
) = 0;
786 virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE
put_Volume(
787 /* [in] */ long newVal
) = 0;
789 virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE
get_Mute(
790 /* [retval][out] */ VARIANT_BOOL __RPC_FAR
*pVal
) = 0;
792 virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE
put_Mute(
793 /* [in] */ VARIANT_BOOL newVal
) = 0;
795 virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE
get_AutoStart(
796 /* [retval][out] */ VARIANT_BOOL __RPC_FAR
*pVal
) = 0;
798 virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE
put_AutoStart(
799 /* [in] */ VARIANT_BOOL newVal
) = 0;
801 virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE
get_PlayCount(
802 /* [retval][out] */ long __RPC_FAR
*pVal
) = 0;
804 virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE
put_PlayCount(
805 /* [in] */ long newVal
) = 0;
807 virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE
get_ShowStatusBar(
808 /* [retval][out] */ VARIANT_BOOL __RPC_FAR
*pVal
) = 0;
810 virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE
put_ShowStatusBar(
811 /* [in] */ VARIANT_BOOL newVal
) = 0;
813 virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE
get_ShowAudioControls(
814 /* [retval][out] */ VARIANT_BOOL __RPC_FAR
*pVal
) = 0;
816 virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE
put_ShowAudioControls(
817 /* [in] */ VARIANT_BOOL newVal
) = 0;
819 virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE
get_ShowCaptioning(
820 /* [retval][out] */ VARIANT_BOOL __RPC_FAR
*pVal
) = 0;
822 virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE
put_ShowCaptioning(
823 /* [in] */ VARIANT_BOOL newVal
) = 0;
825 virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE
get_ShowControls(
826 /* [retval][out] */ VARIANT_BOOL __RPC_FAR
*pVal
) = 0;
828 virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE
put_ShowControls(
829 /* [in] */ VARIANT_BOOL newVal
) = 0;
831 virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE
get_ShowDisplay(
832 /* [retval][out] */ VARIANT_BOOL __RPC_FAR
*pVal
) = 0;
834 virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE
put_ShowDisplay(
835 /* [in] */ VARIANT_BOOL newVal
) = 0;
837 virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE
get_ShowGotoBar(
838 /* [retval][out] */ VARIANT_BOOL __RPC_FAR
*pVal
) = 0;
840 virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE
put_ShowGotoBar(
841 /* [in] */ VARIANT_BOOL newVal
) = 0;
843 virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE
get_ShowPositionControls(
844 /* [retval][out] */ VARIANT_BOOL __RPC_FAR
*pVal
) = 0;
846 virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE
put_ShowPositionControls(
847 /* [in] */ VARIANT_BOOL newVal
) = 0;
849 virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE
get_ShowTracker(
850 /* [retval][out] */ VARIANT_BOOL __RPC_FAR
*pVal
) = 0;
852 virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE
put_ShowTracker(
853 /* [in] */ VARIANT_BOOL newVal
) = 0;
855 virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE
Startup( void) = 0;
857 virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE
Shutdown( void) = 0;
859 virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE
get_Bandwidth(
860 /* [retval][out] */ long __RPC_FAR
*pVal
) = 0;
862 virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE
get_BaseURL(
863 /* [retval][out] */ BSTR __RPC_FAR
*pVal
) = 0;
865 virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE
put_BaseURL(
866 /* [in] */ BSTR pVal
) = 0;
868 virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE
get_BufferingCount(
869 /* [retval][out] */ long __RPC_FAR
*pVal
) = 0;
871 virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE
get_BufferingProgress(
872 /* [retval][out] */ long __RPC_FAR
*pVal
) = 0;
874 virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE
get_BufferingTime(
875 /* [retval][out] */ double __RPC_FAR
*pVal
) = 0;
877 virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE
get_CanSeek(
878 /* [retval][out] */ VARIANT_BOOL __RPC_FAR
*pVal
) = 0;
880 virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE
get_CanSeekToMarkers(
881 /* [retval][out] */ VARIANT_BOOL __RPC_FAR
*pVal
) = 0;
883 virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE
get_ChannelDescription(
884 /* [retval][out] */ BSTR __RPC_FAR
*pVal
) = 0;
886 virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE
get_ChannelName(
887 /* [retval][out] */ BSTR __RPC_FAR
*pVal
) = 0;
889 virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE
get_ChannelURL(
890 /* [retval][out] */ BSTR __RPC_FAR
*pVal
) = 0;
892 virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE
get_ClientID(
893 /* [retval][out] */ BSTR __RPC_FAR
*pVal
) = 0;
895 virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE
get_ConnectionSpeed(
896 /* [retval][out] */ long __RPC_FAR
*pVal
) = 0;
898 virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE
get_ContactAddress(
899 /* [retval][out] */ BSTR __RPC_FAR
*pVal
) = 0;
901 virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE
get_ContactEmail(
902 /* [retval][out] */ BSTR __RPC_FAR
*pVal
) = 0;
904 virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE
get_ContactPhone(
905 /* [retval][out] */ BSTR __RPC_FAR
*pVal
) = 0;
907 virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE
get_CurrentMarker(
908 /* [retval][out] */ long __RPC_FAR
*pVal
) = 0;
910 virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE
put_CurrentMarker(
911 /* [in] */ long newVal
) = 0;
913 virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE
get_CurrentPosition(
914 /* [retval][out] */ double __RPC_FAR
*pVal
) = 0;
916 virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE
put_CurrentPosition(
917 /* [in] */ double newVal
) = 0;
919 virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE
get_DefaultFrame(
920 /* [retval][out] */ BSTR __RPC_FAR
*pVal
) = 0;
922 virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE
put_DefaultFrame(
923 /* [in] */ BSTR newVal
) = 0;
925 virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE
get_Duration(
926 /* [retval][out] */ double __RPC_FAR
*pVal
) = 0;
928 virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE
get_EntryCount(
929 /* [retval][out] */ long __RPC_FAR
*pVal
) = 0;
931 virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE
get_ErrorCode(
932 /* [retval][out] */ long __RPC_FAR
*pVal
) = 0;
934 virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE
get_ErrorDescription(
935 /* [retval][out] */ BSTR __RPC_FAR
*pVal
) = 0;
937 virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE
get_HasError(
938 /* [retval][out] */ VARIANT_BOOL __RPC_FAR
*pVal
) = 0;
940 virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE
get_HasMultipleItems(
941 /* [retval][out] */ VARIANT_BOOL __RPC_FAR
*pVal
) = 0;
943 virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE
get_ImageSourceHeight(
944 /* [retval][out] */ long __RPC_FAR
*pVal
) = 0;
946 virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE
get_ImageSourceWidth(
947 /* [retval][out] */ long __RPC_FAR
*pVal
) = 0;
949 virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE
get_InvokeURLs(
950 /* [retval][out] */ VARIANT_BOOL __RPC_FAR
*pVal
) = 0;
952 virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE
put_InvokeURLs(
953 /* [in] */ VARIANT_BOOL newVal
) = 0;
955 virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE
get_IsBroadcast(
956 /* [retval][out] */ VARIANT_BOOL __RPC_FAR
*pVal
) = 0;
958 virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE
get_IsDurationValid(
959 /* [retval][out] */ VARIANT_BOOL __RPC_FAR
*pVal
) = 0;
961 virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE
get_LostPackets(
962 /* [retval][out] */ long __RPC_FAR
*pVal
) = 0;
964 virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE
get_MarkerCount(
965 /* [retval][out] */ long __RPC_FAR
*pVal
) = 0;
967 virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE
get_OpenState(
968 /* [retval][out] */ long __RPC_FAR
*pVal
) = 0;
970 virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE
get_PlayState(
971 /* [retval][out] */ long __RPC_FAR
*pVal
) = 0;
973 virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE
get_PreviewMode(
974 /* [retval][out] */ VARIANT_BOOL __RPC_FAR
*pVal
) = 0;
976 virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE
put_PreviewMode(
977 /* [in] */ VARIANT_BOOL newVal
) = 0;
979 virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE
get_ReadyState(
980 /* [retval][out] */ long __RPC_FAR
*pVal
) = 0;
982 virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE
get_ReceivedPackets(
983 /* [retval][out] */ long __RPC_FAR
*pVal
) = 0;
985 virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE
get_ReceptionQuality(
986 /* [retval][out] */ long __RPC_FAR
*pVal
) = 0;
988 virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE
get_RecoveredPackets(
989 /* [retval][out] */ long __RPC_FAR
*pVal
) = 0;
991 virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE
get_SAMIFileName(
992 /* [retval][out] */ BSTR __RPC_FAR
*pVal
) = 0;
994 virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE
put_SAMIFileName(
995 /* [in] */ BSTR newVal
) = 0;
997 virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE
get_SAMILang(
998 /* [retval][out] */ BSTR __RPC_FAR
*pVal
) = 0;
1000 virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE
put_SAMILang(
1001 /* [in] */ BSTR newVal
) = 0;
1003 virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE
get_SAMIStyle(
1004 /* [retval][out] */ BSTR __RPC_FAR
*pVal
) = 0;
1006 virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE
put_SAMIStyle(
1007 /* [in] */ BSTR newVal
) = 0;
1009 virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE
get_SelectionEnd(
1010 /* [retval][out] */ double __RPC_FAR
*pVal
) = 0;
1012 virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE
put_SelectionEnd(
1013 /* [in] */ double newVal
) = 0;
1015 virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE
get_SelectionStart(
1016 /* [retval][out] */ double __RPC_FAR
*pVal
) = 0;
1018 virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE
put_SelectionStart(
1019 /* [in] */ double newVal
) = 0;
1021 virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE
get_SendErrorEvents(
1022 /* [retval][out] */ VARIANT_BOOL __RPC_FAR
*pVal
) = 0;
1024 virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE
put_SendErrorEvents(
1025 /* [in] */ VARIANT_BOOL newVal
) = 0;
1027 virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE
get_SendKeyboardEvents(
1028 /* [retval][out] */ VARIANT_BOOL __RPC_FAR
*pVal
) = 0;
1030 virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE
put_SendKeyboardEvents(
1031 /* [in] */ VARIANT_BOOL newVal
) = 0;
1033 virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE
get_SendMouseClickEvents(
1034 /* [retval][out] */ VARIANT_BOOL __RPC_FAR
*pVal
) = 0;
1036 virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE
put_SendMouseClickEvents(
1037 /* [in] */ VARIANT_BOOL newVal
) = 0;
1039 virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE
get_SendMouseMoveEvents(
1040 /* [retval][out] */ VARIANT_BOOL __RPC_FAR
*pVal
) = 0;
1042 virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE
put_SendMouseMoveEvents(
1043 /* [in] */ VARIANT_BOOL newVal
) = 0;
1045 virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE
get_SendOpenStateChangeEvents(
1046 /* [retval][out] */ VARIANT_BOOL __RPC_FAR
*pVal
) = 0;
1048 virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE
put_SendOpenStateChangeEvents(
1049 /* [in] */ VARIANT_BOOL newVal
) = 0;
1051 virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE
get_SendPlayStateChangeEvents(
1052 /* [retval][out] */ VARIANT_BOOL __RPC_FAR
*pVal
) = 0;
1054 virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE
put_SendPlayStateChangeEvents(
1055 /* [in] */ VARIANT_BOOL newVal
) = 0;
1057 virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE
get_SendWarningEvents(
1058 /* [retval][out] */ VARIANT_BOOL __RPC_FAR
*pVal
) = 0;
1060 virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE
put_SendWarningEvents(
1061 /* [in] */ VARIANT_BOOL newVal
) = 0;
1063 virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE
get_SourceLink(
1064 /* [retval][out] */ BSTR __RPC_FAR
*pVal
) = 0;
1066 virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE
AboutBox( void) = 0;
1068 virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE
Cancel( void) = 0;
1070 virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE
GetCodecDescription(
1071 /* [in] */ long nCodec
,
1072 /* [retval][out] */ BSTR __RPC_FAR
*pDescription
) = 0;
1074 virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE
GetCodecInstalled(
1075 /* [in] */ BSTR __RPC_FAR
*pstrCodec
,
1076 /* [retval][out] */ VARIANT_BOOL __RPC_FAR
*pIsInstalled
) = 0;
1078 virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE
GetCurrentEntry(
1079 /* [retval][out] */ long __RPC_FAR
*pVal
) = 0;
1081 virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE
GetMarkerName(
1082 /* [in] */ long nMarker
,
1083 /* [retval][out] */ BSTR __RPC_FAR
*pMarkerName
) = 0;
1085 virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE
GetMarkerTime(
1086 /* [in] */ long nMarker
,
1087 /* [retval][out] */ double __RPC_FAR
*pMarkerTime
) = 0;
1089 virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE
GetMediaInfoString(
1090 /* [in] */ long MPMediaInfoType
,
1091 /* [retval][out] */ BSTR __RPC_FAR
*pstrMediaInfo
) = 0;
1093 virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE
Next( void) = 0;
1095 virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE
Open(
1098 virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE
Pause( void) = 0;
1100 virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE
Play( void) = 0;
1102 virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE
Previous( void) = 0;
1104 virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE
Stop( void) = 0;
1106 virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE
get_Rate(
1107 /* [retval][out] */ double __RPC_FAR
*pVal
) = 0;
1109 virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE
put_Rate(
1110 /* [in] */ double newVal
) = 0;
1112 virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE
get_DisplaySize(
1113 /* [retval][out] */ long __RPC_FAR
*pVal
) = 0;
1115 virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE
put_DisplaySize(
1116 /* [in] */ long newVal
) = 0;
1118 virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE
get_SourceProtocol(
1119 /* [retval][out] */ long __RPC_FAR
*pVal
) = 0;
1121 virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE
get_ErrorCorrection(
1122 /* [retval][out] */ BSTR __RPC_FAR
*pVal
) = 0;
1124 virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE
FinalConstruct( void) = 0;
1126 virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE
get_AllowChangeDisplaySize(
1127 /* [retval][out] */ VARIANT_BOOL __RPC_FAR
*pVal
) = 0;
1129 virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE
put_AllowChangeDisplaySize(
1130 /* [in] */ VARIANT_BOOL newVal
) = 0;
1132 virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE
get_AllowScan(
1133 /* [retval][out] */ VARIANT_BOOL __RPC_FAR
*pVal
) = 0;
1135 virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE
put_AllowScan(
1136 /* [in] */ VARIANT_BOOL newVal
) = 0;
1138 virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE
get_AnimationAtStart(
1139 /* [retval][out] */ VARIANT_BOOL __RPC_FAR
*pVal
) = 0;
1141 virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE
put_AnimationAtStart(
1142 /* [in] */ VARIANT_BOOL newVal
) = 0;
1144 virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE
get_AudioStream(
1145 /* [retval][out] */ long __RPC_FAR
*pVal
) = 0;
1147 virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE
put_AudioStream(
1148 /* [in] */ long newVal
) = 0;
1150 virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE
get_AutoRewind(
1151 /* [retval][out] */ VARIANT_BOOL __RPC_FAR
*pVal
) = 0;
1153 virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE
put_AutoRewind(
1154 /* [in] */ VARIANT_BOOL newVal
) = 0;
1156 virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE
get_Balance(
1157 /* [retval][out] */ long __RPC_FAR
*pVal
) = 0;
1159 virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE
put_Balance(
1160 /* [in] */ long newVal
) = 0;
1162 virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE
get_CanPreview(
1163 /* [retval][out] */ VARIANT_BOOL __RPC_FAR
*pVal
) = 0;
1165 virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE
get_CanScan(
1166 /* [retval][out] */ VARIANT_BOOL __RPC_FAR
*pVal
) = 0;
1168 virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE
get_CaptioningID(
1169 /* [retval][out] */ BSTR __RPC_FAR
*pVal
) = 0;
1171 virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE
get_ClickToPlay(
1172 /* [retval][out] */ VARIANT_BOOL __RPC_FAR
*pVal
) = 0;
1174 virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE
put_ClickToPlay(
1175 /* [in] */ VARIANT_BOOL newVal
) = 0;
1177 virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE
get_CodecCount(
1178 /* [retval][out] */ long __RPC_FAR
*pVal
) = 0;
1180 virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE
get_CreationDate(
1181 /* [retval][out] */ DATE __RPC_FAR
*pVal
) = 0;
1183 virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE
get_CursorType(
1184 /* [retval][out] */ long __RPC_FAR
*pVal
) = 0;
1186 virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE
put_CursorType(
1187 /* [in] */ long newVal
) = 0;
1189 virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE
get_DisplayBackColor(
1190 /* [retval][out] */ VB_OLE_COLOR __RPC_FAR
*pVal
) = 0;
1192 virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE
put_DisplayBackColor(
1193 /* [in] */ VB_OLE_COLOR newVal
) = 0;
1195 virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE
get_DisplayForeColor(
1196 /* [retval][out] */ VB_OLE_COLOR __RPC_FAR
*pVal
) = 0;
1198 virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE
put_DisplayForeColor(
1199 /* [in] */ VB_OLE_COLOR newVal
) = 0;
1201 virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE
get_DisplayMode(
1202 /* [retval][out] */ long __RPC_FAR
*pVal
) = 0;
1204 virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE
put_DisplayMode(
1205 /* [in] */ long newVal
) = 0;
1207 virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE
get_EnableContextMenu(
1208 /* [retval][out] */ VARIANT_BOOL __RPC_FAR
*pVal
) = 0;
1210 virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE
put_EnableContextMenu(
1211 /* [in] */ VARIANT_BOOL newVal
) = 0;
1213 virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE
get_EnableFullScreenControls(
1214 /* [retval][out] */ VARIANT_BOOL __RPC_FAR
*pVal
) = 0;
1216 virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE
put_EnableFullScreenControls(
1217 /* [in] */ VARIANT_BOOL newVal
) = 0;
1219 virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE
get_EnablePositionControls(
1220 /* [retval][out] */ VARIANT_BOOL __RPC_FAR
*pVal
) = 0;
1222 virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE
put_EnablePositionControls(
1223 /* [in] */ VARIANT_BOOL newVal
) = 0;
1225 virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE
get_EnableTracker(
1226 /* [retval][out] */ VARIANT_BOOL __RPC_FAR
*pVal
) = 0;
1228 virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE
put_EnableTracker(
1229 /* [in] */ VARIANT_BOOL newVal
) = 0;
1231 virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE
get_Language(
1232 /* [retval][out] */ long __RPC_FAR
*pVal
) = 0;
1234 virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE
get_StreamCount(
1235 /* [retval][out] */ long __RPC_FAR
*pVal
) = 0;
1237 virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE
get_TransparentAtStart(
1238 /* [retval][out] */ VARIANT_BOOL __RPC_FAR
*pVal
) = 0;
1240 virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE
put_TransparentAtStart(
1241 /* [in] */ VARIANT_BOOL newVal
) = 0;
1243 virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE
get_VideoBorder3D(
1244 /* [retval][out] */ VARIANT_BOOL __RPC_FAR
*pVal
) = 0;
1246 virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE
put_VideoBorder3D(
1247 /* [in] */ VARIANT_BOOL newVal
) = 0;
1249 virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE
get_VideoBorderColor(
1250 /* [retval][out] */ long __RPC_FAR
*pVal
) = 0;
1252 virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE
put_VideoBorderColor(
1253 /* [in] */ long newVal
) = 0;
1255 virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE
get_VideoBorderWidth(
1256 /* [retval][out] */ long __RPC_FAR
*pVal
) = 0;
1258 virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE
put_VideoBorderWidth(
1259 /* [in] */ long newVal
) = 0;
1261 virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE
FastForward( void) = 0;
1263 virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE
FastReverse( void) = 0;
1265 virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE
GetCodecURL(
1266 /* [retval][out] */ BSTR __RPC_FAR
*pstrCodecURL
) = 0;
1268 virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE
GetMediaParameter(
1269 /* [in] */ long nParam
,
1270 BSTR szParameterName
,
1271 /* [retval][out] */ BSTR __RPC_FAR
*pstrParameterValue
) = 0;
1273 virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE
GetMediaParameterName(
1274 /* [in] */ long nParam
,
1276 /* [retval][out] */ BSTR __RPC_FAR
*pstrParameterName
) = 0;
1278 virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE
GetMoreInfoURL(
1279 /* [retval][out] */ BSTR __RPC_FAR
*pstrMoreInfoURL
) = 0;
1281 virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE
GetStreamGroup(
1282 /* [retval][out] */ BSTR __RPC_FAR
*pstrStreamGroup
) = 0;
1284 virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE
GetStreamName(
1285 /* [retval][out] */ BSTR __RPC_FAR
*pstrStreamName
) = 0;
1287 virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE
GetStreamSelected(
1288 /* [in] */ long nStream
,
1289 /* [retval][out] */ VARIANT_BOOL __RPC_FAR
*fIsSelected
) = 0;
1291 virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE
IsSoundCardEnabled(
1292 /* [retval][out] */ VARIANT_BOOL __RPC_FAR
*fIsEnabled
) = 0;
1294 virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE
SetCurrentEntry(
1297 virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE
ShowDialog(
1300 virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE
StreamSelect(
1303 virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE
OnWindowMessage(
1307 LRESULT __RPC_FAR
*plResult
) = 0;
1314 //---------------------------------------------------------------------------
1315 // MISC COM INTERFACES
1316 //---------------------------------------------------------------------------
1317 typedef enum _FilterState
1323 typedef enum _PinDirection
{
1328 typedef struct _FilterInfo
{
1330 struct IFilterGraph
*pGraph
;
1333 typedef struct _PinInfo
{
1334 struct IBaseFilter
*pFilter
;
1341 struct IEnumFilters
;
1342 typedef struct _MediaType
{
1345 BOOL bFixedSizeSamples
;
1346 BOOL bTemporalCompression
;
1354 struct IFilterGraph
: public IUnknown
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
;
1366 struct IGraphBuilder
: public IFilterGraph
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
;
1377 struct IReferenceClock
;
1379 #define REFERENCE_TIME LONGLONG
1380 struct IMediaFilter
: public IPersist
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
;
1391 struct IBaseFilter
: public IMediaFilter
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
;
1401 //---------------------------------------------------------------------------
1405 //---------------------------------------------------------------------------
1407 typedef BOOL (WINAPI
* LPAMGETERRORTEXT
)(HRESULT
, wxChar
*, DWORD
);
1409 class WXDLLIMPEXP_MEDIA wxAMMediaBackend
: public wxMediaBackendCommonBase
1413 virtual ~wxAMMediaBackend();
1415 virtual bool CreateControl(wxControl
* ctrl
, wxWindow
* parent
,
1420 const wxValidator
& validator
,
1421 const wxString
& name
);
1423 virtual bool Play();
1424 virtual bool Pause();
1425 virtual bool Stop();
1427 virtual bool Load(const wxString
& fileName
);
1428 virtual bool Load(const wxURI
& location
);
1429 virtual bool Load(const wxURI
& location
, const wxURI
& proxy
);
1431 bool DoLoad(const wxString
& location
);
1434 virtual wxMediaState
GetState();
1436 virtual bool SetPosition(wxLongLong where
);
1437 virtual wxLongLong
GetPosition();
1438 virtual wxLongLong
GetDuration();
1440 virtual void Move(int x
, int y
, int w
, int h
);
1441 wxSize
GetVideoSize() const;
1443 virtual double GetPlaybackRate();
1444 virtual bool SetPlaybackRate(double);
1446 virtual double GetVolume();
1447 virtual bool SetVolume(double);
1449 virtual bool ShowPlayerControls(wxMediaCtrlPlayerControls flags
);
1451 void DoGetDownloadProgress(wxLongLong
*, wxLongLong
*);
1452 virtual wxLongLong
GetDownloadProgress()
1454 wxLongLong progress
, total
;
1455 DoGetDownloadProgress(&progress
, &total
);
1458 virtual wxLongLong
GetDownloadTotal()
1460 wxLongLong progress
, total
;
1461 DoGetDownloadProgress(&progress
, &total
);
1465 wxActiveXContainer
* m_pAX
; // ActiveX host
1469 IWMP
* GetMP() {return m_pWMP
;}
1470 IWMP
* GetAM() {return m_pWMP
;}
1472 IActiveMovie
* m_pAM
;
1473 IMediaPlayer
* m_pMP
;
1475 IMediaPlayer
* GetMP() {return m_pMP
;}
1476 IActiveMovie
* GetAM() {return m_pAM
;}
1478 wxSize m_bestSize
; // Cached size
1480 // Stuff for getting useful debugging strings
1482 wxDynamicLibrary m_dllQuartz
;
1483 LPAMGETERRORTEXT m_lpAMGetErrorText
;
1484 wxString
GetErrorString(HRESULT hrdsv
);
1485 #endif // wxDEBUG_LEVEL
1486 wxEvtHandler
* m_evthandler
;
1488 friend class wxAMMediaEvtHandler
;
1489 DECLARE_DYNAMIC_CLASS(wxAMMediaBackend
)
1492 class WXDLLIMPEXP_MEDIA wxAMMediaEvtHandler
: public wxEvtHandler
1495 wxAMMediaEvtHandler(wxAMMediaBackend
*amb
) :
1496 m_amb(amb
), m_bLoadEventSent(false)
1498 m_amb
->m_pAX
->Connect(m_amb
->m_pAX
->GetId(),
1500 wxActiveXEventHandler(wxAMMediaEvtHandler::OnActiveX
),
1505 void OnActiveX(wxActiveXEvent
& event
);
1508 wxAMMediaBackend
*m_amb
;
1509 bool m_bLoadEventSent
; // Whether or not FinishLoaded was already called
1510 // prevents it being called multiple times
1512 wxDECLARE_NO_COPY_CLASS(wxAMMediaEvtHandler
);
1515 //===========================================================================
1517 //===========================================================================
1519 //---------------------------------------------------------------------------
1523 //---------------------------------------------------------------------------
1525 IMPLEMENT_DYNAMIC_CLASS(wxAMMediaBackend
, wxMediaBackend
)
1527 //---------------------------------------------------------------------------
1528 // Usual debugging macros
1529 //---------------------------------------------------------------------------
1531 #define MAX_ERROR_TEXT_LEN 160
1533 // Get the error string for Active Movie
1534 wxString
wxAMMediaBackend::GetErrorString(HRESULT hrdsv
)
1536 wxChar szError
[MAX_ERROR_TEXT_LEN
];
1537 if( m_lpAMGetErrorText
!= NULL
&&
1538 (*m_lpAMGetErrorText
)(hrdsv
, szError
, MAX_ERROR_TEXT_LEN
) == 0)
1540 return wxString::Format(wxT("DirectShow error \"%s\" \n")
1541 wxT("(numeric %X)\n")
1543 szError
, (int)hrdsv
);
1547 return wxString::Format(wxT("Unknown error \n")
1548 wxT("(numeric %X)\n")
1554 #define wxAMFAIL(x) wxFAIL_MSG(GetErrorString(x));
1555 #define wxVERIFY(x) wxASSERT((x))
1556 #define wxAMLOG(x) wxLogDebug(GetErrorString(x))
1558 #define wxAMVERIFY(x) (x)
1559 #define wxVERIFY(x) (x)
1564 //---------------------------------------------------------------------------
1565 // wxAMMediaBackend Constructor
1566 //---------------------------------------------------------------------------
1567 wxAMMediaBackend::wxAMMediaBackend()
1575 m_bestSize(wxDefaultSize
)
1577 m_evthandler
= NULL
;
1580 //---------------------------------------------------------------------------
1581 // wxAMMediaBackend Destructor
1582 //---------------------------------------------------------------------------
1583 wxAMMediaBackend::~wxAMMediaBackend()
1587 m_pAX
->DissociateHandle();
1598 m_ctrl
->RemoveEventHandler(m_evthandler
);
1599 delete m_evthandler
;
1604 //---------------------------------------------------------------------------
1605 // wxAMMediaBackend::CreateControl
1606 //---------------------------------------------------------------------------
1607 bool wxAMMediaBackend::CreateControl(wxControl
* ctrl
, wxWindow
* parent
,
1612 const wxValidator
& validator
,
1613 const wxString
& name
)
1615 // First get the AMGetErrorText procedure in debug
1616 // mode for more meaningful messages
1618 if ( m_dllQuartz
.Load(wxT("quartz.dll"), wxDL_VERBATIM
) )
1620 m_lpAMGetErrorText
= (LPAMGETERRORTEXT
)
1621 m_dllQuartz
.GetSymbolAorW(wxT("AMGetErrorText"));
1623 #endif // wxDEBUG_LEVEL
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
)
1635 clsid
= CLSID_MediaPlayer
;
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 )
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 )
1654 if( ::CoCreateInstance(CLSID_ActiveMovie
, NULL
,
1655 CLSCTX_INPROC_SERVER
,
1656 IID_IActiveMovie
, (void**)&m_pAM
) != 0 )
1658 m_pAM
->QueryInterface(IID_IMediaPlayer
, (void**)&m_pMP
);
1662 m_pMP
->QueryInterface(IID_IActiveMovie
, (void**)&m_pAM
);
1668 // By default wxWindow(s) is created with a border -
1669 // so we need to get rid of those
1671 // Since we don't have a child window like most other
1672 // backends, we don't need wxCLIP_CHILDREN
1674 if ( !ctrl
->wxControl::Create(parent
, id
, pos
, size
,
1675 (style
& ~wxBORDER_MASK
) | wxBORDER_NONE
,
1680 // Now create the ActiveX container along with the media player
1681 // interface and query them
1683 m_ctrl
= wxStaticCast(ctrl
, wxMediaCtrl
);
1684 m_pAX
= new wxActiveXContainer(ctrl
,
1688 m_pMP
? IID_IMediaPlayer
: IID_IActiveMovie
, m_pAM
1691 // Connect for events
1692 m_evthandler
= new wxAMMediaEvtHandler(this);
1693 m_ctrl
->PushEventHandler(m_evthandler
);
1696 // Here we set up wx-specific stuff for the default
1697 // settings wxMediaCtrl says it will stay to
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
);
1711 #ifndef __WXWINCE__ // Not in CE's IWMP
1713 GetAM()->put_MovieWindowSize(amvDoubleOriginalSize
);
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);
1723 // don't erase the background of our control window so that resizing is a
1725 m_ctrl
->SetBackgroundStyle(wxBG_STYLE_CUSTOM
);
1731 //---------------------------------------------------------------------------
1732 // wxAMMediaBackend::Load (file version)
1733 //---------------------------------------------------------------------------
1734 bool wxAMMediaBackend::Load(const wxString
& fileName
)
1736 return DoLoad(fileName
);
1739 //---------------------------------------------------------------------------
1740 // wxAMMediaBackend::Load (URL Version)
1741 //---------------------------------------------------------------------------
1742 bool wxAMMediaBackend::Load(const wxURI
& location
)
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
);
1750 pPlay
->put_UseHTTPProxy(VARIANT_FALSE
);
1754 return DoLoad(location
.BuildURI());
1757 //---------------------------------------------------------------------------
1758 // wxAMMediaBackend::Load (URL Version with Proxy)
1759 //---------------------------------------------------------------------------
1760 bool wxAMMediaBackend::Load(const wxURI
& location
, const wxURI
& proxy
)
1762 // Set the proxy of the NETSHOW interface
1763 INSPlay
* pPlay
= NULL
;
1764 GetAM()->QueryInterface(IID_INSPlay
, (void**) &pPlay
);
1768 pPlay
->put_UseHTTPProxy(VARIANT_TRUE
);
1769 pPlay
->put_HTTPProxyHost(wxBasicString(proxy
.GetServer()).Get());
1770 pPlay
->put_HTTPProxyPort(wxAtoi(proxy
.GetPort()));
1774 return DoLoad(location
.BuildURI());
1777 //---------------------------------------------------------------------------
1778 // wxAMMediaBackend::DoLoad
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
)
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
1792 hr
= GetMP()->Open( wxBasicString(location
).Get() );
1794 hr
= GetAM()->put_FileName( wxBasicString(location
).Get() );
1802 m_bestSize
= wxDefaultSize
;
1806 //---------------------------------------------------------------------------
1807 // wxAMMediaBackend::FinishLoad
1809 // Called when the media has finished loaded and is ready to play
1811 // Here we get the original size of the video and
1812 // send the loaded event to our watcher :).
1813 //---------------------------------------------------------------------------
1814 void wxAMMediaBackend::FinishLoad()
1816 NotifyMovieLoaded();
1819 //---------------------------------------------------------------------------
1820 // wxAMMediaBackend::ShowPlayerControls
1821 //---------------------------------------------------------------------------
1822 bool wxAMMediaBackend::ShowPlayerControls(wxMediaCtrlPlayerControls flags
)
1824 // Note that IMediaPlayer doesn't have a statusbar by
1825 // default but IActiveMovie does - so let's try to keep
1826 // the interface consistent.
1829 GetAM()->put_Enabled(VARIANT_FALSE
);
1830 GetAM()->put_ShowControls(VARIANT_FALSE
);
1832 GetMP()->put_ShowStatusBar(VARIANT_FALSE
);
1836 GetAM()->put_Enabled(VARIANT_TRUE
);
1837 GetAM()->put_ShowControls(VARIANT_TRUE
);
1839 GetAM()->put_ShowPositionControls(
1840 (flags
& wxMEDIACTRLPLAYERCONTROLS_STEP
) ?
1841 VARIANT_TRUE
: VARIANT_FALSE
);
1845 GetMP()->put_ShowStatusBar(VARIANT_TRUE
);
1846 GetMP()->put_ShowAudioControls(
1847 (flags
& wxMEDIACTRLPLAYERCONTROLS_VOLUME
) ?
1848 VARIANT_TRUE
: VARIANT_FALSE
);
1855 //---------------------------------------------------------------------------
1856 // wxAMMediaBackend::Play
1858 // Plays the stream. If it is non-seekable, it will restart it (implicit).
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()
1865 // Actually try to play the movie (will fail if not loaded completely)
1867 HRESULT hr
= m_pWMP
->Play();
1869 HRESULT hr
= GetAM()->Run();
1879 //---------------------------------------------------------------------------
1880 // wxAMMediaBackend::Pause
1882 // Pauses the stream.
1883 //---------------------------------------------------------------------------
1884 bool wxAMMediaBackend::Pause()
1886 HRESULT hr
= GetAM()->Pause();
1893 //---------------------------------------------------------------------------
1894 // wxAMMediaBackend::Stop
1896 // Stops the stream.
1897 //---------------------------------------------------------------------------
1898 bool wxAMMediaBackend::Stop()
1900 HRESULT hr
= GetAM()->Stop();
1903 // Seek to beginning
1904 wxAMMediaBackend::SetPosition(0);
1911 //---------------------------------------------------------------------------
1912 // wxAMMediaBackend::SetPosition
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
1919 //---------------------------------------------------------------------------
1920 bool wxAMMediaBackend::SetPosition(wxLongLong where
)
1922 HRESULT hr
= GetAM()->put_CurrentPosition(
1923 ((LONGLONG
)where
.GetValue()) / 1000.0
1934 //---------------------------------------------------------------------------
1935 // wxAMMediaBackend::GetPosition
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()
1943 HRESULT hr
= GetAM()->get_CurrentPosition(&outCur
);
1950 // h,m,s,milli - outCur is in 1 second (double)
1958 //---------------------------------------------------------------------------
1959 // wxAMMediaBackend::GetVolume and SetVolume()
1961 // Notice that for the IActiveMovie interface value ranges from 0 (MAX volume)
1962 // to -10000 (minimum volume) and the scale is logarithmic in 0.01db per step.
1963 //---------------------------------------------------------------------------
1965 double wxAMMediaBackend::GetVolume()
1968 HRESULT hr
= GetAM()->get_Volume(&lVolume
);
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]
1983 bool wxAMMediaBackend::SetVolume(double dVolume
)
1985 // inverse the transformation above
1986 long lVolume
= static_cast<long>(2000*log10(dVolume
+ (1 - dVolume
)*0.00001));
1988 HRESULT hr
= GetAM()->put_Volume(lVolume
);
1997 //---------------------------------------------------------------------------
1998 // wxAMMediaBackend::GetDuration
2000 // 1) Obtains the duration of the media from IActiveMovie
2001 // 2) Converts that value to our time base, and returns it
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
2006 //---------------------------------------------------------------------------
2007 wxLongLong
wxAMMediaBackend::GetDuration()
2010 HRESULT hr
= GetAM()->get_Duration(&outDuration
);
2021 // outDuration is in seconds, we need milliseconds
2023 return static_cast<wxLongLong_t
>(outDuration
* 1000);
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;
2034 //---------------------------------------------------------------------------
2035 // wxAMMediaBackend::GetState
2037 // Returns the cached state
2038 //---------------------------------------------------------------------------
2039 wxMediaState
wxAMMediaBackend::GetState()
2041 StateConstants nState
;
2043 HRESULT hr
= m_pWMP
->get_PlayState((long*)&nState
);
2045 HRESULT hr
= GetAM()->get_CurrentState(&nState
);
2050 return wxMEDIASTATE_STOPPED
;
2053 return (wxMediaState
)nState
;
2056 //---------------------------------------------------------------------------
2057 // wxAMMediaBackend::GetPlaybackRate
2059 // Pretty simple way of obtaining the playback rate from
2060 // the IActiveMovie interface
2061 //---------------------------------------------------------------------------
2062 double wxAMMediaBackend::GetPlaybackRate()
2065 HRESULT hr
= GetAM()->get_Rate(&dRate
);
2074 //---------------------------------------------------------------------------
2075 // wxAMMediaBackend::SetPlaybackRate
2077 // Sets the playback rate of the media - DirectShow is pretty good
2078 // about this, actually
2079 //---------------------------------------------------------------------------
2080 bool wxAMMediaBackend::SetPlaybackRate(double dRate
)
2082 HRESULT hr
= GetAM()->put_Rate(dRate
);
2092 //---------------------------------------------------------------------------
2093 // wxAMMediaBackend::GetDownloadXXX
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
)
2103 IUnknown
* pFG
= NULL
;
2105 HRESULT hr
= m_pAM
->get_FilterGraph(&pFG
);
2107 // notice that the call above may return S_FALSE and leave pFG NULL
2108 if(SUCCEEDED(hr
) && pFG
)
2110 IAMOpenProgress
* pOP
= NULL
;
2111 hr
= pFG
->QueryInterface(IID_IAMOpenProgress
, (void**)&pOP
);
2112 if(SUCCEEDED(hr
) && pOP
)
2117 hr
= pOP
->QueryProgress(&loadTotal
, &loadProgress
);
2122 *pLoadProgress
= loadProgress
;
2123 *pLoadTotal
= loadTotal
;
2130 #endif // !__WXWINCE__
2136 //---------------------------------------------------------------------------
2137 // wxAMMediaBackend::GetVideoSize
2139 // Obtains the cached original video size
2140 //---------------------------------------------------------------------------
2141 wxSize
wxAMMediaBackend::GetVideoSize() const
2143 if (m_bestSize
== wxDefaultSize
)
2145 wxAMMediaBackend
* self
= wxConstCast(this, wxAMMediaBackend
);
2149 self
->GetAM()->get_ImageSourceWidth(&w
);
2150 self
->GetAM()->get_ImageSourceHeight(&h
);
2152 if (w
!= 0 && h
!= 0)
2153 self
->m_bestSize
.Set(w
, h
);
2161 //---------------------------------------------------------------------------
2162 // wxAMMediaBackend::Move
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
))
2171 //---------------------------------------------------------------------------
2172 // wxAMMediaBackend::OnActiveX
2174 // Handle events sent from our activex control (IActiveMovie/IMediaPlayer).
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
2179 //---------------------------------------------------------------------------
2180 void wxAMMediaEvtHandler::OnActiveX(wxActiveXEvent
& event
)
2182 switch(event
.GetDispatchId())
2185 case 0x00000001: // statechange in IActiveMovie
2186 case 0x00000bc4: // playstatechange in IMediaPlayer
2188 case 0x00000011: // 17 == playstatechange on IWMP
2190 if(event
.ParamCount() >= 2)
2192 switch (event
[1].GetInteger())
2195 if( m_amb
->wxAMMediaBackend::GetPosition() ==
2196 m_amb
->wxAMMediaBackend::GetDuration() )
2198 if ( m_amb
->SendStopEvent() )
2200 // Seek to beginning of movie
2201 m_amb
->wxAMMediaBackend::SetPosition(0);
2203 // send the event to our child
2204 m_amb
->QueueFinishEvent();
2209 m_amb
->QueueStopEvent();
2213 m_amb
->QueuePauseEvent();
2216 m_amb
->QueuePlayEvent();
2227 case 0x00000032: // opencomplete in IActiveMovie
2228 if(!m_bLoadEventSent
)
2230 m_amb
->FinishLoad();
2234 case 0xfffffd9f: // readystatechange in IActiveMovie2 and IMediaPlayer
2236 case 0x00000013: // 19 == readystatechange in IWMP
2238 if(event
.ParamCount() >= 1)
2240 if(event
[0].GetInteger() == 0)
2242 m_bLoadEventSent
= false;
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 &&
2251 m_bLoadEventSent
= true;
2252 m_amb
->FinishLoad();
2265 //---------------------------------------------------------------------------
2266 // End of wxAMMediaBackend
2267 //---------------------------------------------------------------------------
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
)
2274 #endif // wxUSE_MEDIACTRL && wxUSE_ACTIVEX