mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-06 04:51:11 +00:00
wmp: Implement IWMPPlaylist::get_count.
Signed-off-by: Gijs Vermeulen <gijsvrm@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
649e294886
commit
188992a1d2
|
@ -297,7 +297,7 @@ static HRESULT WINAPI WMPPlayer4_get_currentPlaylist(IWMPPlayer4 *iface, IWMPPla
|
|||
if (This->playlist == NULL)
|
||||
return S_FALSE;
|
||||
|
||||
return create_playlist(This->playlist->name, This->playlist->url, playlist);
|
||||
return create_playlist(This->playlist->name, This->playlist->url, This->playlist->count, playlist);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI WMPPlayer4_put_currentPlaylist(IWMPPlayer4 *iface, IWMPPlaylist *pPL)
|
||||
|
@ -355,7 +355,8 @@ static HRESULT WINAPI WMPPlayer4_newPlaylist(IWMPPlayer4 *iface, BSTR name, BSTR
|
|||
|
||||
TRACE("(%p)->(%s %s %p)\n", This, debugstr_w(name), debugstr_w(url), playlist);
|
||||
|
||||
return create_playlist(name, url, playlist);
|
||||
/* FIXME: count should be the number of items in the playlist */
|
||||
return create_playlist(name, url, 0, playlist);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI WMPPlayer4_newMedia(IWMPPlayer4 *iface, BSTR url, IWMPMedia **media)
|
||||
|
@ -2036,8 +2037,13 @@ static HRESULT WINAPI WMPPlaylist_Invoke(IWMPPlaylist *iface, DISPID dispIdMembe
|
|||
static HRESULT WINAPI WMPPlaylist_get_count(IWMPPlaylist *iface, LONG *count)
|
||||
{
|
||||
WMPPlaylist *This = impl_from_IWMPPlaylist(iface);
|
||||
FIXME("(%p)->(%p)\n", This, count);
|
||||
return E_NOTIMPL;
|
||||
|
||||
TRACE("(%p)->(%p)\n", This, count);
|
||||
|
||||
if (!count) return E_POINTER;
|
||||
*count = This->count;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI WMPPlaylist_get_name(IWMPPlaylist *iface, BSTR *name)
|
||||
|
@ -2226,7 +2232,7 @@ BOOL init_player(WindowsMediaPlayer *wmp)
|
|||
wmp->IWMPNetwork_iface.lpVtbl = &WMPNetworkVtbl;
|
||||
|
||||
name = SysAllocString(nameW);
|
||||
if (SUCCEEDED(create_playlist(name, NULL, &playlist)))
|
||||
if (SUCCEEDED(create_playlist(name, NULL, 0, &playlist)))
|
||||
wmp->playlist = unsafe_impl_from_IWMPPlaylist(playlist);
|
||||
else
|
||||
wmp->playlist = NULL;
|
||||
|
@ -2325,7 +2331,7 @@ HRESULT create_media_from_url(BSTR url, double duration, IWMPMedia **ppMedia)
|
|||
return E_OUTOFMEMORY;
|
||||
}
|
||||
|
||||
HRESULT create_playlist(BSTR name, BSTR url, IWMPPlaylist **ppPlaylist)
|
||||
HRESULT create_playlist(BSTR name, BSTR url, LONG count, IWMPPlaylist **ppPlaylist)
|
||||
{
|
||||
WMPPlaylist *playlist;
|
||||
|
||||
|
@ -2337,6 +2343,7 @@ HRESULT create_playlist(BSTR name, BSTR url, IWMPPlaylist **ppPlaylist)
|
|||
playlist->url = url ? heap_strdupW(url) : heap_strdupW(emptyW);
|
||||
playlist->name = name ? heap_strdupW(name) : heap_strdupW(emptyW);
|
||||
playlist->ref = 1;
|
||||
playlist->count = count;
|
||||
|
||||
if (playlist->url)
|
||||
{
|
||||
|
|
|
@ -65,6 +65,7 @@ typedef struct {
|
|||
IWMPPlaylist IWMPPlaylist_iface;
|
||||
|
||||
LONG ref;
|
||||
LONG count;
|
||||
|
||||
WCHAR *url;
|
||||
WCHAR *name;
|
||||
|
@ -116,7 +117,7 @@ void destroy_player(WindowsMediaPlayer*) DECLSPEC_HIDDEN;
|
|||
WMPMedia *unsafe_impl_from_IWMPMedia(IWMPMedia *iface) DECLSPEC_HIDDEN;
|
||||
WMPPlaylist *unsafe_impl_from_IWMPPlaylist(IWMPPlaylist *iface) DECLSPEC_HIDDEN;
|
||||
HRESULT create_media_from_url(BSTR url, double duration, IWMPMedia **ppMedia) DECLSPEC_HIDDEN;
|
||||
HRESULT create_playlist(BSTR name, BSTR url, IWMPPlaylist **ppPlaylist) DECLSPEC_HIDDEN;
|
||||
HRESULT create_playlist(BSTR name, BSTR url, LONG count, IWMPPlaylist **ppPlaylist) DECLSPEC_HIDDEN;
|
||||
void ConnectionPointContainer_Init(WindowsMediaPlayer *wmp) DECLSPEC_HIDDEN;
|
||||
void ConnectionPointContainer_Destroy(WindowsMediaPlayer *wmp) DECLSPEC_HIDDEN;
|
||||
void call_sink(ConnectionPoint *This, DISPID dispid, DISPPARAMS *dispparams) DECLSPEC_HIDDEN;
|
||||
|
|
Loading…
Reference in a new issue