Module: wine Branch: master Commit: dd182a924f89b948010ecc0d79f43aec83adfe65 URL: https://source.winehq.org/git/wine.git/?a=commit;h=dd182a924f89b948010ecc0d7...
Author: Zebediah Figura zfigura@codeweavers.com Date: Wed Oct 20 22:48:40 2021 -0500
winegstreamer: Move the IWMReaderPlaylistBurn implementation to the wm_reader object.
Signed-off-by: Zebediah Figura zfigura@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/winegstreamer/gst_private.h | 1 + dlls/winegstreamer/wm_asyncreader.c | 69 ------------------------------------- dlls/winegstreamer/wm_reader.c | 68 ++++++++++++++++++++++++++++++++++++ dlls/wmvcore/tests/wmvcore.c | 2 +- 4 files changed, 70 insertions(+), 70 deletions(-)
diff --git a/dlls/winegstreamer/gst_private.h b/dlls/winegstreamer/gst_private.h index 519be33dadd..be72f6694c7 100644 --- a/dlls/winegstreamer/gst_private.h +++ b/dlls/winegstreamer/gst_private.h @@ -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; diff --git a/dlls/winegstreamer/wm_asyncreader.c b/dlls/winegstreamer/wm_asyncreader.c index d2891730bfb..0a240ff55c5 100644 --- a/dlls/winegstreamer/wm_asyncreader.c +++ b/dlls/winegstreamer/wm_asyncreader.c @@ -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; diff --git a/dlls/winegstreamer/wm_reader.c b/dlls/winegstreamer/wm_reader.c index edf8f227308..1627dead3d6 100644 --- a/dlls/winegstreamer/wm_reader.c +++ b/dlls/winegstreamer/wm_reader.c @@ -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; } diff --git a/dlls/wmvcore/tests/wmvcore.c b/dlls/wmvcore/tests/wmvcore.c index 0662c035617..5c9e9551495 100644 --- a/dlls/wmvcore/tests/wmvcore.c +++ b/dlls/wmvcore/tests/wmvcore.c @@ -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);