2 * Copyright 2014 Jacek Caban for CodeWeavers
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
22 #include "wine/heap.h"
23 #include "wine/unicode.h"
29 IConnectionPoint IConnectionPoint_iface
;
31 IConnectionPointContainer
*container
;
40 IWMPMedia IWMPMedia_iface
;
49 struct WindowsMediaPlayer
{
50 IOleObject IOleObject_iface
;
51 IProvideClassInfo2 IProvideClassInfo2_iface
;
52 IPersistStreamInit IPersistStreamInit_iface
;
53 IOleInPlaceObjectWindowless IOleInPlaceObjectWindowless_iface
;
54 IConnectionPointContainer IConnectionPointContainer_iface
;
55 IOleControl IOleControl_iface
;
56 IWMPPlayer4 IWMPPlayer4_iface
;
57 IWMPPlayer IWMPPlayer_iface
;
58 IWMPSettings IWMPSettings_iface
;
59 IWMPControls IWMPControls_iface
;
60 IWMPNetwork IWMPNetwork_iface
;
64 IOleClientSite
*client_site
;
69 VARIANT_BOOL auto_start
;
70 VARIANT_BOOL invoke_urls
;
71 VARIANT_BOOL enable_error_dialogs
;
73 ConnectionPoint
*wmpocx
;
77 /* DirectShow stuff */
78 IGraphBuilder
* filter_graph
;
79 IMediaControl
* media_control
;
80 IMediaEvent
* media_event
;
81 IMediaSeeking
* media_seeking
;
83 /* Async event notification */
87 BOOL
init_player(WindowsMediaPlayer
*) DECLSPEC_HIDDEN
;
88 void destroy_player(WindowsMediaPlayer
*) DECLSPEC_HIDDEN
;
89 WMPMedia
*unsafe_impl_from_IWMPMedia(IWMPMedia
*iface
) DECLSPEC_HIDDEN
;
90 HRESULT
create_media_from_url(BSTR url
, IWMPMedia
**ppMedia
) DECLSPEC_HIDDEN
;
91 void ConnectionPointContainer_Init(WindowsMediaPlayer
*wmp
) DECLSPEC_HIDDEN
;
92 void ConnectionPointContainer_Destroy(WindowsMediaPlayer
*wmp
) DECLSPEC_HIDDEN
;
93 void call_sink(ConnectionPoint
*This
, DISPID dispid
, DISPPARAMS
*dispparams
) DECLSPEC_HIDDEN
;
95 HRESULT WINAPI
WMPFactory_CreateInstance(IClassFactory
*,IUnknown
*,REFIID
,void**) DECLSPEC_HIDDEN
;
97 void unregister_wmp_class(void) DECLSPEC_HIDDEN
;
98 void unregister_player_msg_class(void) DECLSPEC_HIDDEN
;
100 extern HINSTANCE wmp_instance DECLSPEC_HIDDEN
;
102 static inline WCHAR
*heap_strdupW(const WCHAR
*str
)
107 size_t size
= strlenW(str
)+1;
108 ret
= heap_alloc(size
*sizeof(WCHAR
));
110 memcpy(ret
, str
, size
*sizeof(WCHAR
));