Commit 73f80669 authored by Alistair Leslie-Hughes's avatar Alistair Leslie-Hughes Committed by Alexandre Julliard

wmvcore: Support IWMReaderPlaylistBurn interface in IWMReader.

parent b15c3985
...@@ -81,6 +81,7 @@ static void test_wmreader_interfaces(void) ...@@ -81,6 +81,7 @@ static void test_wmreader_interfaces(void)
IWMDRMReader *drmreader; IWMDRMReader *drmreader;
IWMDRMReader2 *drmreader2; IWMDRMReader2 *drmreader2;
IWMDRMReader3 *drmreader3; IWMDRMReader3 *drmreader3;
IWMReaderPlaylistBurn *playlist;
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);
...@@ -147,6 +148,9 @@ static void test_wmreader_interfaces(void) ...@@ -147,6 +148,9 @@ static void test_wmreader_interfaces(void)
hr = IWMReader_QueryInterface(reader, &IID_IWMDRMReader3, (void **)&drmreader3); hr = IWMReader_QueryInterface(reader, &IID_IWMDRMReader3, (void **)&drmreader3);
ok(hr == E_NOINTERFACE, "Failed 0x%08x\n", hr); ok(hr == E_NOINTERFACE, "Failed 0x%08x\n", hr);
hr = IWMReader_QueryInterface(reader, &IID_IWMReaderPlaylistBurn, (void **)&playlist);
ok(hr == S_OK, "Failed 0x%08x\n", hr);
if(packet) if(packet)
IWMPacketSize_Release(packet); IWMPacketSize_Release(packet);
if(packet2) if(packet2)
...@@ -179,6 +183,8 @@ static void test_wmreader_interfaces(void) ...@@ -179,6 +183,8 @@ static void test_wmreader_interfaces(void)
IWMReaderStreamClock_Release(clock); IWMReaderStreamClock_Release(clock);
if(negotiation) if(negotiation)
IWMReaderTypeNegotiation_Release(negotiation); IWMReaderTypeNegotiation_Release(negotiation);
if(playlist)
IWMReaderPlaylistBurn_Release(playlist);
IWMReader_Release(reader); IWMReader_Release(reader);
} }
......
...@@ -71,6 +71,7 @@ typedef struct { ...@@ -71,6 +71,7 @@ typedef struct {
IWMReaderStreamClock IWMReaderStreamClock_iface; IWMReaderStreamClock IWMReaderStreamClock_iface;
IWMReaderTypeNegotiation IWMReaderTypeNegotiation_iface; IWMReaderTypeNegotiation IWMReaderTypeNegotiation_iface;
IWMReaderTimecode IWMReaderTimecode_iface; IWMReaderTimecode IWMReaderTimecode_iface;
IWMReaderPlaylistBurn IWMReaderPlaylistBurn_iface;
LONG ref; LONG ref;
} WMReader; } WMReader;
...@@ -125,6 +126,9 @@ static HRESULT WINAPI WMReader_QueryInterface(IWMReader *iface, REFIID riid, voi ...@@ -125,6 +126,9 @@ static HRESULT WINAPI WMReader_QueryInterface(IWMReader *iface, REFIID riid, voi
}else if(IsEqualGUID(riid, &IID_IWMReaderTimecode)) { }else if(IsEqualGUID(riid, &IID_IWMReaderTimecode)) {
TRACE("(%p)->(IWMReaderTimecode %p)\n", This, ppv); TRACE("(%p)->(IWMReaderTimecode %p)\n", This, ppv);
*ppv = &This->IWMReaderTimecode_iface; *ppv = &This->IWMReaderTimecode_iface;
}else if(IsEqualGUID(riid, &IID_IWMReaderPlaylistBurn)) {
TRACE("(%p)->(IWMReaderPlaylistBurn %p)\n", This, ppv);
*ppv = &This->IWMReaderPlaylistBurn_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);
...@@ -1283,6 +1287,70 @@ static const IWMReaderTimecodeVtbl WMReaderTimecodeVtbl = ...@@ -1283,6 +1287,70 @@ static const IWMReaderTimecodeVtbl WMReaderTimecodeVtbl =
timecode_GetTimecodeRangeBounds timecode_GetTimecodeRangeBounds
}; };
static inline WMReader *impl_from_IWMReaderPlaylistBurn(IWMReaderPlaylistBurn *iface)
{
return CONTAINING_RECORD(iface, WMReader, IWMReaderPlaylistBurn_iface);
}
static HRESULT WINAPI playlist_QueryInterface(IWMReaderPlaylistBurn *iface, REFIID riid, void **ppv)
{
WMReader *This = impl_from_IWMReaderPlaylistBurn(iface);
return IWMReader_QueryInterface(&This->IWMReader_iface, riid, ppv);
}
static ULONG WINAPI playlist_AddRef(IWMReaderPlaylistBurn *iface)
{
WMReader *This = impl_from_IWMReaderPlaylistBurn(iface);
return IWMReader_AddRef(&This->IWMReader_iface);
}
static ULONG WINAPI playlist_Release(IWMReaderPlaylistBurn *iface)
{
WMReader *This = impl_from_IWMReaderPlaylistBurn(iface);
return IWMReader_Release(&This->IWMReader_iface);
}
static HRESULT WINAPI playlist_InitPlaylistBurn(IWMReaderPlaylistBurn *iface, DWORD count,
LPCWSTR_WMSDK_TYPE_SAFE *filenames, IWMStatusCallback *callback, void *context)
{
WMReader *This = impl_from_IWMReaderPlaylistBurn(iface);
FIXME("%p, %d, %p, %p, %p\n", This, count, filenames, callback, context);
return E_NOTIMPL;
}
static HRESULT WINAPI playlist_GetInitResults(IWMReaderPlaylistBurn *iface, DWORD count, HRESULT *stat)
{
WMReader *This = impl_from_IWMReaderPlaylistBurn(iface);
FIXME("%p, %d, %p\n", This, count, stat);
return E_NOTIMPL;
}
static HRESULT WINAPI playlist_Cancel(IWMReaderPlaylistBurn *iface)
{
WMReader *This = impl_from_IWMReaderPlaylistBurn(iface);
FIXME("%p\n", This);
return E_NOTIMPL;
}
static HRESULT WINAPI playlist_EndPlaylistBurn(IWMReaderPlaylistBurn *iface, HRESULT result)
{
WMReader *This = impl_from_IWMReaderPlaylistBurn(iface);
FIXME("%p, 0x%08x\n", This, result);
return E_NOTIMPL;
}
static const IWMReaderPlaylistBurnVtbl WMReaderPlaylistBurnVtbl =
{
playlist_QueryInterface,
playlist_AddRef,
playlist_Release,
playlist_InitPlaylistBurn,
playlist_GetInitResults,
playlist_Cancel,
playlist_EndPlaylistBurn
};
HRESULT WINAPI WMCreateReader(IUnknown *reserved, DWORD rights, IWMReader **ret_reader) HRESULT WINAPI WMCreateReader(IUnknown *reserved, DWORD rights, IWMReader **ret_reader)
{ {
WMReader *reader; WMReader *reader;
...@@ -1300,6 +1368,7 @@ HRESULT WINAPI WMCreateReader(IUnknown *reserved, DWORD rights, IWMReader **ret_ ...@@ -1300,6 +1368,7 @@ HRESULT WINAPI WMCreateReader(IUnknown *reserved, DWORD rights, IWMReader **ret_
reader->IWMReaderStreamClock_iface.lpVtbl = &WMReaderStreamClockVtbl; reader->IWMReaderStreamClock_iface.lpVtbl = &WMReaderStreamClockVtbl;
reader->IWMReaderTypeNegotiation_iface.lpVtbl = &WMReaderTypeNegotiationVtbl; reader->IWMReaderTypeNegotiation_iface.lpVtbl = &WMReaderTypeNegotiationVtbl;
reader->IWMReaderTimecode_iface.lpVtbl = &WMReaderTimecodeVtbl; reader->IWMReaderTimecode_iface.lpVtbl = &WMReaderTimecodeVtbl;
reader->IWMReaderPlaylistBurn_iface.lpVtbl = &WMReaderPlaylistBurnVtbl;
reader->ref = 1; reader->ref = 1;
*ret_reader = &reader->IWMReader_iface; *ret_reader = &reader->IWMReader_iface;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment