Commit dd182a92 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

winegstreamer: Move the IWMReaderPlaylistBurn implementation to the wm_reader object.

parent 4f10b95c
......@@ -119,6 +119,7 @@ struct wm_reader
IWMLanguageList IWMLanguageList_iface;
IWMPacketSize2 IWMPacketSize2_iface;
IWMProfile3 IWMProfile3_iface;
IWMReaderPlaylistBurn IWMReaderPlaylistBurn_iface;
LONG refcount;
const struct wm_reader_ops *ops;
......
......@@ -31,7 +31,6 @@ struct async_reader
IWMReaderStreamClock IWMReaderStreamClock_iface;
IWMReaderTypeNegotiation IWMReaderTypeNegotiation_iface;
IWMReaderTimecode IWMReaderTimecode_iface;
IWMReaderPlaylistBurn IWMReaderPlaylistBurn_iface;
IReferenceClock IReferenceClock_iface;
};
......@@ -1191,70 +1190,6 @@ static const IWMReaderTimecodeVtbl WMReaderTimecodeVtbl =
timecode_GetTimecodeRangeBounds
};
static struct async_reader *impl_from_IWMReaderPlaylistBurn(IWMReaderPlaylistBurn *iface)
{
return CONTAINING_RECORD(iface, struct async_reader, IWMReaderPlaylistBurn_iface);
}
static HRESULT WINAPI playlist_QueryInterface(IWMReaderPlaylistBurn *iface, REFIID riid, void **ppv)
{
struct async_reader *This = impl_from_IWMReaderPlaylistBurn(iface);
return IWMReader_QueryInterface(&This->IWMReader_iface, riid, ppv);
}
static ULONG WINAPI playlist_AddRef(IWMReaderPlaylistBurn *iface)
{
struct async_reader *This = impl_from_IWMReaderPlaylistBurn(iface);
return IWMReader_AddRef(&This->IWMReader_iface);
}
static ULONG WINAPI playlist_Release(IWMReaderPlaylistBurn *iface)
{
struct async_reader *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)
{
struct async_reader *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)
{
struct async_reader *This = impl_from_IWMReaderPlaylistBurn(iface);
FIXME("%p, %d, %p\n", This, count, stat);
return E_NOTIMPL;
}
static HRESULT WINAPI playlist_Cancel(IWMReaderPlaylistBurn *iface)
{
struct async_reader *This = impl_from_IWMReaderPlaylistBurn(iface);
FIXME("%p\n", This);
return E_NOTIMPL;
}
static HRESULT WINAPI playlist_EndPlaylistBurn(IWMReaderPlaylistBurn *iface, HRESULT result)
{
struct async_reader *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
};
static struct async_reader *impl_from_IReferenceClock(IReferenceClock *iface)
{
return CONTAINING_RECORD(iface, struct async_reader, IReferenceClock_iface);
......@@ -1353,9 +1288,6 @@ static void *async_reader_query_interface(struct wm_reader *iface, REFIID iid)
|| IsEqualIID(iid, &IID_IWMReaderNetworkConfig2))
return &reader->IWMReaderNetworkConfig2_iface;
if (IsEqualIID(iid, &IID_IWMReaderPlaylistBurn))
return &reader->IWMReaderPlaylistBurn_iface;
if (IsEqualIID(iid, &IID_IWMReaderStreamClock))
return &reader->IWMReaderStreamClock_iface;
......@@ -1399,7 +1331,6 @@ HRESULT WINAPI winegstreamer_create_wm_async_reader(IWMReader **reader)
object->IWMReaderAdvanced6_iface.lpVtbl = &WMReaderAdvanced6Vtbl;
object->IWMReaderAccelerator_iface.lpVtbl = &WMReaderAcceleratorVtbl;
object->IWMReaderNetworkConfig2_iface.lpVtbl = &WMReaderNetworkConfig2Vtbl;
object->IWMReaderPlaylistBurn_iface.lpVtbl = &WMReaderPlaylistBurnVtbl;
object->IWMReaderStreamClock_iface.lpVtbl = &WMReaderStreamClockVtbl;
object->IWMReaderTimecode_iface.lpVtbl = &WMReaderTimecodeVtbl;
object->IWMReaderTypeNegotiation_iface.lpVtbl = &WMReaderTypeNegotiationVtbl;
......
......@@ -53,6 +53,10 @@ static HRESULT WINAPI profile_QueryInterface(IWMProfile3 *iface, REFIID iid, voi
{
*out = &reader->IWMProfile3_iface;
}
else if (IsEqualIID(iid, &IID_IWMReaderPlaylistBurn))
{
*out = &reader->IWMReaderPlaylistBurn_iface;
}
else if (!(*out = reader->ops->query_interface(reader, iid)))
{
WARN("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(iid));
......@@ -638,12 +642,76 @@ static const IWMPacketSize2Vtbl packet_size_vtbl =
packet_size_SetMinPacketSize,
};
static struct wm_reader *impl_from_IWMReaderPlaylistBurn(IWMReaderPlaylistBurn *iface)
{
return CONTAINING_RECORD(iface, struct wm_reader, IWMReaderPlaylistBurn_iface);
}
static HRESULT WINAPI playlist_QueryInterface(IWMReaderPlaylistBurn *iface, REFIID iid, void **out)
{
struct wm_reader *reader = impl_from_IWMReaderPlaylistBurn(iface);
return IWMProfile3_QueryInterface(&reader->IWMProfile3_iface, iid, out);
}
static ULONG WINAPI playlist_AddRef(IWMReaderPlaylistBurn *iface)
{
struct wm_reader *reader = impl_from_IWMReaderPlaylistBurn(iface);
return IWMProfile3_AddRef(&reader->IWMProfile3_iface);
}
static ULONG WINAPI playlist_Release(IWMReaderPlaylistBurn *iface)
{
struct wm_reader *reader = impl_from_IWMReaderPlaylistBurn(iface);
return IWMProfile3_Release(&reader->IWMProfile3_iface);
}
static HRESULT WINAPI playlist_InitPlaylistBurn(IWMReaderPlaylistBurn *iface, DWORD count,
const WCHAR **filenames, IWMStatusCallback *callback, void *context)
{
FIXME("iface %p, count %u, filenames %p, callback %p, context %p, stub!\n",
iface, count, filenames, callback, context);
return E_NOTIMPL;
}
static HRESULT WINAPI playlist_GetInitResults(IWMReaderPlaylistBurn *iface, DWORD count, HRESULT *hrs)
{
FIXME("iface %p, count %u, hrs %p, stub!\n", iface, count, hrs);
return E_NOTIMPL;
}
static HRESULT WINAPI playlist_Cancel(IWMReaderPlaylistBurn *iface)
{
FIXME("iface %p, stub!\n", iface);
return E_NOTIMPL;
}
static HRESULT WINAPI playlist_EndPlaylistBurn(IWMReaderPlaylistBurn *iface, HRESULT hr)
{
FIXME("iface %p, hr %#x, stub!\n", iface, hr);
return E_NOTIMPL;
}
static const IWMReaderPlaylistBurnVtbl playlist_vtbl =
{
playlist_QueryInterface,
playlist_AddRef,
playlist_Release,
playlist_InitPlaylistBurn,
playlist_GetInitResults,
playlist_Cancel,
playlist_EndPlaylistBurn,
};
void wm_reader_init(struct wm_reader *reader, const struct wm_reader_ops *ops)
{
reader->IWMHeaderInfo3_iface.lpVtbl = &header_info_vtbl;
reader->IWMLanguageList_iface.lpVtbl = &language_list_vtbl;
reader->IWMPacketSize2_iface.lpVtbl = &packet_size_vtbl;
reader->IWMProfile3_iface.lpVtbl = &profile_vtbl;
reader->IWMReaderPlaylistBurn_iface.lpVtbl = &playlist_vtbl;
reader->refcount = 1;
reader->ops = ops;
}
......@@ -153,7 +153,7 @@ static void test_wmsyncreader_interfaces(void)
check_interface(reader, &IID_IWMProfile, TRUE);
check_interface(reader, &IID_IWMProfile2, TRUE);
check_interface(reader, &IID_IWMProfile3, TRUE);
todo_wine check_interface(reader, &IID_IWMReaderPlaylistBurn, TRUE);
check_interface(reader, &IID_IWMReaderPlaylistBurn, TRUE);
todo_wine check_interface(reader, &IID_IWMReaderTimecode, TRUE);
check_interface(reader, &IID_IWMSyncReader, TRUE);
check_interface(reader, &IID_IWMSyncReader2, TRUE);
......
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