wmvcore: Support IWMLanguageList interfaces in IWMReader.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
b1702c41b5
commit
163aac1670
|
@ -82,6 +82,7 @@ static void test_wmreader_interfaces(void)
|
||||||
IWMDRMReader2 *drmreader2;
|
IWMDRMReader2 *drmreader2;
|
||||||
IWMDRMReader3 *drmreader3;
|
IWMDRMReader3 *drmreader3;
|
||||||
IWMReaderPlaylistBurn *playlist;
|
IWMReaderPlaylistBurn *playlist;
|
||||||
|
IWMLanguageList *langlist;
|
||||||
|
|
||||||
hr = WMCreateReader( NULL, 0, &reader );
|
hr = WMCreateReader( NULL, 0, &reader );
|
||||||
ok(hr == S_OK, "WMCreateReader failed 0x%08x\n", hr);
|
ok(hr == S_OK, "WMCreateReader failed 0x%08x\n", hr);
|
||||||
|
@ -151,6 +152,9 @@ static void test_wmreader_interfaces(void)
|
||||||
hr = IWMReader_QueryInterface(reader, &IID_IWMReaderPlaylistBurn, (void **)&playlist);
|
hr = IWMReader_QueryInterface(reader, &IID_IWMReaderPlaylistBurn, (void **)&playlist);
|
||||||
ok(hr == S_OK, "Failed 0x%08x\n", hr);
|
ok(hr == S_OK, "Failed 0x%08x\n", hr);
|
||||||
|
|
||||||
|
hr = IWMReader_QueryInterface(reader, &IID_IWMLanguageList, (void **)&langlist);
|
||||||
|
ok(hr == S_OK, "Failed 0x%08x\n", hr);
|
||||||
|
|
||||||
if(packet)
|
if(packet)
|
||||||
IWMPacketSize_Release(packet);
|
IWMPacketSize_Release(packet);
|
||||||
if(packet2)
|
if(packet2)
|
||||||
|
@ -185,6 +189,8 @@ static void test_wmreader_interfaces(void)
|
||||||
IWMReaderTypeNegotiation_Release(negotiation);
|
IWMReaderTypeNegotiation_Release(negotiation);
|
||||||
if(playlist)
|
if(playlist)
|
||||||
IWMReaderPlaylistBurn_Release(playlist);
|
IWMReaderPlaylistBurn_Release(playlist);
|
||||||
|
if(langlist)
|
||||||
|
IWMLanguageList_Release(langlist);
|
||||||
|
|
||||||
IWMReader_Release(reader);
|
IWMReader_Release(reader);
|
||||||
}
|
}
|
||||||
|
|
|
@ -73,6 +73,7 @@ typedef struct {
|
||||||
IWMReaderTimecode IWMReaderTimecode_iface;
|
IWMReaderTimecode IWMReaderTimecode_iface;
|
||||||
IWMReaderPlaylistBurn IWMReaderPlaylistBurn_iface;
|
IWMReaderPlaylistBurn IWMReaderPlaylistBurn_iface;
|
||||||
IWMHeaderInfo3 IWMHeaderInfo3_iface;
|
IWMHeaderInfo3 IWMHeaderInfo3_iface;
|
||||||
|
IWMLanguageList IWMLanguageList_iface;
|
||||||
LONG ref;
|
LONG ref;
|
||||||
} WMReader;
|
} WMReader;
|
||||||
|
|
||||||
|
@ -139,6 +140,9 @@ static HRESULT WINAPI WMReader_QueryInterface(IWMReader *iface, REFIID riid, voi
|
||||||
}else if(IsEqualGUID(riid, &IID_IWMHeaderInfo3)) {
|
}else if(IsEqualGUID(riid, &IID_IWMHeaderInfo3)) {
|
||||||
TRACE("(%p)->(IWMHeaderInfo3 %p)\n", This, ppv);
|
TRACE("(%p)->(IWMHeaderInfo3 %p)\n", This, ppv);
|
||||||
*ppv = &This->IWMHeaderInfo3_iface;
|
*ppv = &This->IWMHeaderInfo3_iface;
|
||||||
|
}else if(IsEqualGUID(riid, &IID_IWMLanguageList)) {
|
||||||
|
TRACE("(%p)->(IWMLanguageList %p)\n", This, ppv);
|
||||||
|
*ppv = &This->IWMLanguageList_iface;
|
||||||
}else {
|
}else {
|
||||||
*ppv = NULL;
|
*ppv = NULL;
|
||||||
FIXME("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppv);
|
FIXME("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppv);
|
||||||
|
@ -1580,6 +1584,63 @@ static const IWMHeaderInfo3Vtbl WMHeaderInfo3Vtbl =
|
||||||
headerinfo_AddCodecInfo
|
headerinfo_AddCodecInfo
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
static inline WMReader *impl_from_IWMLanguageList(IWMLanguageList *iface)
|
||||||
|
{
|
||||||
|
return CONTAINING_RECORD(iface, WMReader, IWMLanguageList_iface);
|
||||||
|
}
|
||||||
|
|
||||||
|
static HRESULT WINAPI langlist_QueryInterface(IWMLanguageList *iface, REFIID riid, void **ppv)
|
||||||
|
{
|
||||||
|
WMReader *This = impl_from_IWMLanguageList(iface);
|
||||||
|
return IWMReader_QueryInterface(&This->IWMReader_iface, riid, ppv);
|
||||||
|
}
|
||||||
|
|
||||||
|
static ULONG WINAPI langlist_AddRef(IWMLanguageList *iface)
|
||||||
|
{
|
||||||
|
WMReader *This = impl_from_IWMLanguageList(iface);
|
||||||
|
return IWMReader_AddRef(&This->IWMReader_iface);
|
||||||
|
}
|
||||||
|
|
||||||
|
static ULONG WINAPI langlist_Release(IWMLanguageList *iface)
|
||||||
|
{
|
||||||
|
WMReader *This = impl_from_IWMLanguageList(iface);
|
||||||
|
return IWMReader_Release(&This->IWMReader_iface);
|
||||||
|
}
|
||||||
|
|
||||||
|
static HRESULT WINAPI langlist_GetLanguageCount(IWMLanguageList *iface, WORD *count)
|
||||||
|
{
|
||||||
|
WMReader *This = impl_from_IWMLanguageList(iface);
|
||||||
|
FIXME("%p, %p\n", This, count);
|
||||||
|
return E_NOTIMPL;
|
||||||
|
}
|
||||||
|
|
||||||
|
static HRESULT WINAPI langlist_GetLanguageDetails(IWMLanguageList *iface, WORD index,
|
||||||
|
WCHAR *language, WORD *length)
|
||||||
|
{
|
||||||
|
WMReader *This = impl_from_IWMLanguageList(iface);
|
||||||
|
FIXME("%p, %d, %p, %p\n", This, index, language, length);
|
||||||
|
return E_NOTIMPL;
|
||||||
|
}
|
||||||
|
|
||||||
|
static HRESULT WINAPI langlist_AddLanguageByRFC1766String(IWMLanguageList *iface, LPCWSTR_WMSDK_TYPE_SAFE language,
|
||||||
|
WORD *index)
|
||||||
|
{
|
||||||
|
WMReader *This = impl_from_IWMLanguageList(iface);
|
||||||
|
FIXME("%p, %p, %p\n", This, language, index);
|
||||||
|
return E_NOTIMPL;
|
||||||
|
}
|
||||||
|
|
||||||
|
static const IWMLanguageListVtbl WMLanguageListVtbl =
|
||||||
|
{
|
||||||
|
langlist_QueryInterface,
|
||||||
|
langlist_AddRef,
|
||||||
|
langlist_Release,
|
||||||
|
langlist_GetLanguageCount,
|
||||||
|
langlist_GetLanguageDetails,
|
||||||
|
langlist_AddLanguageByRFC1766String
|
||||||
|
};
|
||||||
|
|
||||||
HRESULT WINAPI WMCreateReader(IUnknown *reserved, DWORD rights, IWMReader **ret_reader)
|
HRESULT WINAPI WMCreateReader(IUnknown *reserved, DWORD rights, IWMReader **ret_reader)
|
||||||
{
|
{
|
||||||
WMReader *reader;
|
WMReader *reader;
|
||||||
|
@ -1599,6 +1660,7 @@ HRESULT WINAPI WMCreateReader(IUnknown *reserved, DWORD rights, IWMReader **ret_
|
||||||
reader->IWMReaderTimecode_iface.lpVtbl = &WMReaderTimecodeVtbl;
|
reader->IWMReaderTimecode_iface.lpVtbl = &WMReaderTimecodeVtbl;
|
||||||
reader->IWMReaderPlaylistBurn_iface.lpVtbl = &WMReaderPlaylistBurnVtbl;
|
reader->IWMReaderPlaylistBurn_iface.lpVtbl = &WMReaderPlaylistBurnVtbl;
|
||||||
reader->IWMHeaderInfo3_iface.lpVtbl = &WMHeaderInfo3Vtbl;
|
reader->IWMHeaderInfo3_iface.lpVtbl = &WMHeaderInfo3Vtbl;
|
||||||
|
reader->IWMLanguageList_iface.lpVtbl = &WMLanguageListVtbl;
|
||||||
reader->ref = 1;
|
reader->ref = 1;
|
||||||
|
|
||||||
*ret_reader = &reader->IWMReader_iface;
|
*ret_reader = &reader->IWMReader_iface;
|
||||||
|
|
Loading…
Reference in New Issue