Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/quartz/filesource.c | 79 +++++++++++++++++++--------------------- 1 file changed, 38 insertions(+), 41 deletions(-)
diff --git a/dlls/quartz/filesource.c b/dlls/quartz/filesource.c index a8a68680659..b1586bc1bb1 100644 --- a/dlls/quartz/filesource.c +++ b/dlls/quartz/filesource.c @@ -53,7 +53,7 @@ struct request OVERLAPPED ovl; };
-typedef struct AsyncReader +struct async_reader { struct strmbase_filter filter; IFileSourceFilter IFileSourceFilter_iface; @@ -70,18 +70,18 @@ typedef struct AsyncReader struct request *requests; unsigned int max_requests; CONDITION_VARIABLE sample_cv; -} AsyncReader; +};
static const struct strmbase_source_ops source_ops;
-static inline AsyncReader *impl_from_strmbase_filter(struct strmbase_filter *iface) +static inline struct async_reader *impl_from_strmbase_filter(struct strmbase_filter *iface) { - return CONTAINING_RECORD(iface, AsyncReader, filter); + return CONTAINING_RECORD(iface, struct async_reader, filter); }
-static inline AsyncReader *impl_from_IFileSourceFilter(IFileSourceFilter *iface) +static inline struct async_reader *impl_from_IFileSourceFilter(IFileSourceFilter *iface) { - return CONTAINING_RECORD(iface, AsyncReader, IFileSourceFilter_iface); + return CONTAINING_RECORD(iface, struct async_reader, IFileSourceFilter_iface); }
static const IFileSourceFilterVtbl FileSource_Vtbl; @@ -311,7 +311,7 @@ BOOL get_media_type(const WCHAR *filename, GUID *majortype, GUID *subtype, GUID
static struct strmbase_pin *async_reader_get_pin(struct strmbase_filter *iface, unsigned int index) { - AsyncReader *filter = impl_from_strmbase_filter(iface); + struct async_reader *filter = impl_from_strmbase_filter(iface);
if (!index && filter->pszFileName) return &filter->source.pin; @@ -320,7 +320,7 @@ static struct strmbase_pin *async_reader_get_pin(struct strmbase_filter *iface,
static void async_reader_destroy(struct strmbase_filter *iface) { - AsyncReader *filter = impl_from_strmbase_filter(iface); + struct async_reader *filter = impl_from_strmbase_filter(iface);
if (filter->pszFileName) { @@ -359,7 +359,7 @@ static void async_reader_destroy(struct strmbase_filter *iface)
static HRESULT async_reader_query_interface(struct strmbase_filter *iface, REFIID iid, void **out) { - AsyncReader *filter = impl_from_strmbase_filter(iface); + struct async_reader *filter = impl_from_strmbase_filter(iface);
if (IsEqualGUID(iid, &IID_IFileSourceFilter)) { @@ -380,7 +380,7 @@ static const struct strmbase_filter_ops filter_ops =
static DWORD CALLBACK io_thread(void *arg) { - AsyncReader *filter = arg; + struct async_reader *filter = arg; struct request *req; OVERLAPPED *ovl; ULONG_PTR key; @@ -416,7 +416,7 @@ static DWORD CALLBACK io_thread(void *arg)
HRESULT async_reader_create(IUnknown *outer, IUnknown **out) { - AsyncReader *object; + struct async_reader *object;
if (!(object = calloc(1, sizeof(*object)))) return E_OUTOFMEMORY; @@ -439,29 +439,26 @@ HRESULT async_reader_create(IUnknown *outer, IUnknown **out)
static HRESULT WINAPI FileSource_QueryInterface(IFileSourceFilter * iface, REFIID riid, LPVOID * ppv) { - AsyncReader *This = impl_from_IFileSourceFilter(iface); - - return IBaseFilter_QueryInterface(&This->filter.IBaseFilter_iface, riid, ppv); + struct async_reader *filter = impl_from_IFileSourceFilter(iface); + return IBaseFilter_QueryInterface(&filter->filter.IBaseFilter_iface, riid, ppv); }
static ULONG WINAPI FileSource_AddRef(IFileSourceFilter * iface) { - AsyncReader *This = impl_from_IFileSourceFilter(iface); - - return IBaseFilter_AddRef(&This->filter.IBaseFilter_iface); + struct async_reader *filter = impl_from_IFileSourceFilter(iface); + return IBaseFilter_AddRef(&filter->filter.IBaseFilter_iface); }
static ULONG WINAPI FileSource_Release(IFileSourceFilter * iface) { - AsyncReader *This = impl_from_IFileSourceFilter(iface); - - return IBaseFilter_Release(&This->filter.IBaseFilter_iface); + struct async_reader *filter = impl_from_IFileSourceFilter(iface); + return IBaseFilter_Release(&filter->filter.IBaseFilter_iface); }
static HRESULT WINAPI FileSource_Load(IFileSourceFilter * iface, LPCOLESTR pszFileName, const AM_MEDIA_TYPE * pmt) { + struct async_reader *This = impl_from_IFileSourceFilter(iface); HANDLE hFile; - AsyncReader *This = impl_from_IFileSourceFilter(iface);
TRACE("%p->(%s, %p)\n", This, debugstr_w(pszFileName), pmt); strmbase_dump_media_type(pmt); @@ -514,7 +511,7 @@ static HRESULT WINAPI FileSource_Load(IFileSourceFilter * iface, LPCOLESTR pszFi
static HRESULT WINAPI FileSource_GetCurFile(IFileSourceFilter *iface, LPOLESTR *ppszFileName, AM_MEDIA_TYPE *mt) { - AsyncReader *This = impl_from_IFileSourceFilter(iface); + struct async_reader *This = impl_from_IFileSourceFilter(iface);
TRACE("filter %p, filename %p, mt %p.\n", This, ppszFileName, mt);
@@ -548,19 +545,19 @@ static const IFileSourceFilterVtbl FileSource_Vtbl = FileSource_GetCurFile };
-static inline AsyncReader *impl_from_strmbase_pin(struct strmbase_pin *iface) +static inline struct async_reader *impl_from_strmbase_pin(struct strmbase_pin *iface) { - return CONTAINING_RECORD(iface, AsyncReader, source.pin); + return CONTAINING_RECORD(iface, struct async_reader, source.pin); }
-static inline AsyncReader *impl_from_IAsyncReader(IAsyncReader *iface) +static inline struct async_reader *impl_from_IAsyncReader(IAsyncReader *iface) { - return CONTAINING_RECORD(iface, AsyncReader, IAsyncReader_iface); + return CONTAINING_RECORD(iface, struct async_reader, IAsyncReader_iface); }
static HRESULT source_query_accept(struct strmbase_pin *iface, const AM_MEDIA_TYPE *mt) { - AsyncReader *filter = impl_from_strmbase_pin(iface); + struct async_reader *filter = impl_from_strmbase_pin(iface);
if (IsEqualGUID(&mt->majortype, &filter->mt.majortype) && (!IsEqualGUID(&mt->subtype, &GUID_NULL) @@ -572,7 +569,7 @@ static HRESULT source_query_accept(struct strmbase_pin *iface, const AM_MEDIA_TY
static HRESULT source_get_media_type(struct strmbase_pin *iface, unsigned int index, AM_MEDIA_TYPE *mt) { - AsyncReader *filter = impl_from_strmbase_pin(iface); + struct async_reader *filter = impl_from_strmbase_pin(iface);
if (index > 1) return VFW_S_NO_MORE_ITEMS; @@ -586,7 +583,7 @@ static HRESULT source_get_media_type(struct strmbase_pin *iface, unsigned int in
static HRESULT source_query_interface(struct strmbase_pin *iface, REFIID iid, void **out) { - AsyncReader *filter = impl_from_strmbase_pin(iface); + struct async_reader *filter = impl_from_strmbase_pin(iface);
if (IsEqualGUID(iid, &IID_IAsyncReader)) { @@ -607,7 +604,7 @@ static HRESULT source_query_interface(struct strmbase_pin *iface, REFIID iid, vo static HRESULT WINAPI FileAsyncReaderPin_AttemptConnection(struct strmbase_source *This, IPin *pReceivePin, const AM_MEDIA_TYPE *pmt) { - AsyncReader *filter = impl_from_strmbase_pin(&This->pin); + struct async_reader *filter = impl_from_strmbase_pin(&This->pin); HRESULT hr;
TRACE("%p->(%p, %p)\n", This, pReceivePin, pmt); @@ -649,26 +646,26 @@ static const struct strmbase_source_ops source_ops =
static HRESULT WINAPI FileAsyncReader_QueryInterface(IAsyncReader *iface, REFIID iid, void **out) { - AsyncReader *filter = impl_from_IAsyncReader(iface); + struct async_reader *filter = impl_from_IAsyncReader(iface); return IPin_QueryInterface(&filter->source.pin.IPin_iface, iid, out); }
static ULONG WINAPI FileAsyncReader_AddRef(IAsyncReader * iface) { - AsyncReader *filter = impl_from_IAsyncReader(iface); + struct async_reader *filter = impl_from_IAsyncReader(iface); return IPin_AddRef(&filter->source.pin.IPin_iface); }
static ULONG WINAPI FileAsyncReader_Release(IAsyncReader * iface) { - AsyncReader *filter = impl_from_IAsyncReader(iface); + struct async_reader *filter = impl_from_IAsyncReader(iface); return IPin_Release(&filter->source.pin.IPin_iface); }
static HRESULT WINAPI FileAsyncReader_RequestAllocator(IAsyncReader *iface, IMemAllocator *preferred, ALLOCATOR_PROPERTIES *props, IMemAllocator **ret_allocator) { - AsyncReader *filter = impl_from_IAsyncReader(iface); + struct async_reader *filter = impl_from_IAsyncReader(iface); IMemAllocator *allocator; unsigned int i; HRESULT hr; @@ -716,7 +713,7 @@ static HRESULT WINAPI FileAsyncReader_RequestAllocator(IAsyncReader *iface,
static HRESULT WINAPI FileAsyncReader_Request(IAsyncReader *iface, IMediaSample *sample, DWORD_PTR cookie) { - AsyncReader *filter = impl_from_IAsyncReader(iface); + struct async_reader *filter = impl_from_IAsyncReader(iface); REFERENCE_TIME start, end; struct request *req; unsigned int i; @@ -770,7 +767,7 @@ static HRESULT WINAPI FileAsyncReader_Request(IAsyncReader *iface, IMediaSample static HRESULT WINAPI FileAsyncReader_WaitForNext(IAsyncReader *iface, DWORD timeout, IMediaSample **sample, DWORD_PTR *cookie) { - AsyncReader *filter = impl_from_IAsyncReader(iface); + struct async_reader *filter = impl_from_IAsyncReader(iface); unsigned int i;
TRACE("filter %p, timeout %u, sample %p, cookie %p.\n", filter, timeout, sample, cookie); @@ -840,7 +837,7 @@ static BOOL sync_read(HANDLE file, LONGLONG offset, LONG length, BYTE *buffer, D
static HRESULT WINAPI FileAsyncReader_SyncReadAligned(IAsyncReader *iface, IMediaSample *sample) { - AsyncReader *filter = impl_from_IAsyncReader(iface); + struct async_reader *filter = impl_from_IAsyncReader(iface); REFERENCE_TIME start_time, end_time; DWORD read_len; BYTE *buffer; @@ -876,7 +873,7 @@ static HRESULT WINAPI FileAsyncReader_SyncReadAligned(IAsyncReader *iface, IMedi static HRESULT WINAPI FileAsyncReader_SyncRead(IAsyncReader *iface, LONGLONG offset, LONG length, BYTE *buffer) { - AsyncReader *filter = impl_from_IAsyncReader(iface); + struct async_reader *filter = impl_from_IAsyncReader(iface); DWORD read_len; HRESULT hr; BOOL ret; @@ -897,7 +894,7 @@ static HRESULT WINAPI FileAsyncReader_SyncRead(IAsyncReader *iface,
static HRESULT WINAPI FileAsyncReader_Length(IAsyncReader *iface, LONGLONG *total, LONGLONG *available) { - AsyncReader *filter = impl_from_IAsyncReader(iface); + struct async_reader *filter = impl_from_IAsyncReader(iface); DWORD low, high;
TRACE("iface %p, total %p, available %p.\n", iface, total, available); @@ -912,7 +909,7 @@ static HRESULT WINAPI FileAsyncReader_Length(IAsyncReader *iface, LONGLONG *tota
static HRESULT WINAPI FileAsyncReader_BeginFlush(IAsyncReader * iface) { - AsyncReader *filter = impl_from_IAsyncReader(iface); + struct async_reader *filter = impl_from_IAsyncReader(iface); unsigned int i;
TRACE("iface %p.\n", iface); @@ -932,7 +929,7 @@ static HRESULT WINAPI FileAsyncReader_BeginFlush(IAsyncReader * iface)
static HRESULT WINAPI FileAsyncReader_EndFlush(IAsyncReader * iface) { - AsyncReader *filter = impl_from_IAsyncReader(iface); + struct async_reader *filter = impl_from_IAsyncReader(iface);
TRACE("iface %p.\n", iface);
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/quartz/videorenderer.c | 40 +++++++++++++++---------------------- 1 file changed, 16 insertions(+), 24 deletions(-)
diff --git a/dlls/quartz/videorenderer.c b/dlls/quartz/videorenderer.c index 9301e8d769c..8fb3a9e422c 100644 --- a/dlls/quartz/videorenderer.c +++ b/dlls/quartz/videorenderer.c @@ -247,7 +247,7 @@ static void video_renderer_destroy(struct strmbase_renderer *iface) BaseControlVideo_Destroy(&filter->baseControlVideo); CloseHandle(filter->run_event); strmbase_renderer_cleanup(&filter->renderer); - CoTaskMemFree(filter); + free(filter);
InterlockedDecrement(&object_locks); } @@ -701,46 +701,38 @@ static const IOverlayVtbl overlay_vtbl =
HRESULT video_renderer_create(IUnknown *outer, IUnknown **out) { + VideoRendererImpl *object; HRESULT hr; - VideoRendererImpl * pVideoRenderer;
- *out = NULL; - - pVideoRenderer = CoTaskMemAlloc(sizeof(VideoRendererImpl)); - - pVideoRenderer->init = FALSE; - ZeroMemory(&pVideoRenderer->SourceRect, sizeof(RECT)); - ZeroMemory(&pVideoRenderer->DestRect, sizeof(RECT)); - ZeroMemory(&pVideoRenderer->WindowPos, sizeof(RECT)); - pVideoRenderer->FullScreenMode = OAFALSE; - - pVideoRenderer->IOverlay_iface.lpVtbl = &overlay_vtbl; + if (!(object = calloc(1, sizeof(*object)))) + return E_OUTOFMEMORY;
- strmbase_renderer_init(&pVideoRenderer->renderer, outer, - &CLSID_VideoRenderer, L"In", &renderer_ops); + strmbase_renderer_init(&object->renderer, outer, &CLSID_VideoRenderer, L"In", &renderer_ops); + object->IOverlay_iface.lpVtbl = &overlay_vtbl;
- hr = video_window_init(&pVideoRenderer->baseControlWindow, &IVideoWindow_VTable, - &pVideoRenderer->renderer.filter, &pVideoRenderer->renderer.sink.pin, + hr = video_window_init(&object->baseControlWindow, &IVideoWindow_VTable, + &object->renderer.filter, &object->renderer.sink.pin, &renderer_BaseWindowFuncTable); if (FAILED(hr)) goto fail;
- hr = basic_video_init(&pVideoRenderer->baseControlVideo, &pVideoRenderer->renderer.filter, - &pVideoRenderer->renderer.sink.pin, &renderer_BaseControlVideoFuncTable); + hr = basic_video_init(&object->baseControlVideo, &object->renderer.filter, + &object->renderer.sink.pin, &renderer_BaseControlVideoFuncTable); if (FAILED(hr)) goto fail;
- if (FAILED(hr = BaseWindowImpl_PrepareWindow(&pVideoRenderer->baseControlWindow.baseWindow))) + if (FAILED(hr = BaseWindowImpl_PrepareWindow(&object->baseControlWindow.baseWindow))) goto fail;
- pVideoRenderer->run_event = CreateEventW(NULL, TRUE, FALSE, NULL); + object->run_event = CreateEventW(NULL, TRUE, FALSE, NULL);
- *out = &pVideoRenderer->renderer.filter.IUnknown_inner; + TRACE("Created video renderer %p.\n", object); + *out = &object->renderer.filter.IUnknown_inner; return S_OK;
fail: - strmbase_renderer_cleanup(&pVideoRenderer->renderer); - CoTaskMemFree(pVideoRenderer); + strmbase_renderer_cleanup(&object->renderer); + free(object); return hr; }
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=68759
Your paranoid android.
=== debiant (build log) ===
error: patch failed: dlls/quartz/filesource.c:548 Task: Patch failed to apply
=== debiant (build log) ===
error: patch failed: dlls/quartz/filesource.c:548 Task: Patch failed to apply
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/quartz/videorenderer.c | 80 ++++++++++++++++++------------------- 1 file changed, 40 insertions(+), 40 deletions(-)
diff --git a/dlls/quartz/videorenderer.c b/dlls/quartz/videorenderer.c index 8fb3a9e422c..73c23603f84 100644 --- a/dlls/quartz/videorenderer.c +++ b/dlls/quartz/videorenderer.c @@ -36,7 +36,7 @@
WINE_DEFAULT_DEBUG_CHANNEL(quartz);
-typedef struct VideoRendererImpl +struct video_renderer { struct strmbase_renderer renderer; BaseControlWindow baseControlWindow; @@ -57,29 +57,29 @@ typedef struct VideoRendererImpl
HANDLE run_event; IMediaSample *current_sample; -} VideoRendererImpl; +};
-static inline VideoRendererImpl *impl_from_BaseWindow(BaseWindow *iface) +static inline struct video_renderer *impl_from_BaseWindow(BaseWindow *iface) { - return CONTAINING_RECORD(iface, VideoRendererImpl, baseControlWindow.baseWindow); + return CONTAINING_RECORD(iface, struct video_renderer, baseControlWindow.baseWindow); }
-static inline VideoRendererImpl *impl_from_strmbase_renderer(struct strmbase_renderer *iface) +static inline struct video_renderer *impl_from_strmbase_renderer(struct strmbase_renderer *iface) { - return CONTAINING_RECORD(iface, VideoRendererImpl, renderer); + return CONTAINING_RECORD(iface, struct video_renderer, renderer); }
-static inline VideoRendererImpl *impl_from_IVideoWindow(IVideoWindow *iface) +static inline struct video_renderer *impl_from_IVideoWindow(IVideoWindow *iface) { - return CONTAINING_RECORD(iface, VideoRendererImpl, baseControlWindow.IVideoWindow_iface); + return CONTAINING_RECORD(iface, struct video_renderer, baseControlWindow.IVideoWindow_iface); }
-static inline VideoRendererImpl *impl_from_BaseControlVideo(BaseControlVideo *iface) +static inline struct video_renderer *impl_from_BaseControlVideo(BaseControlVideo *iface) { - return CONTAINING_RECORD(iface, VideoRendererImpl, baseControlVideo); + return CONTAINING_RECORD(iface, struct video_renderer, baseControlVideo); }
-static void VideoRenderer_AutoShowWindow(VideoRendererImpl *This) +static void VideoRenderer_AutoShowWindow(struct video_renderer *This) { if (!This->init && (!This->WindowPos.right || !This->WindowPos.top)) { @@ -143,7 +143,7 @@ static HRESULT WINAPI VideoRenderer_ShouldDrawSampleNow(struct strmbase_renderer
static HRESULT WINAPI VideoRenderer_DoRenderSample(struct strmbase_renderer *iface, IMediaSample *pSample) { - VideoRendererImpl *filter = impl_from_strmbase_renderer(iface); + struct video_renderer *filter = impl_from_strmbase_renderer(iface); const AM_MEDIA_TYPE *mt = &filter->renderer.sink.pin.mt; LPBYTE pbSrcStream = NULL; BITMAPINFOHEADER *bih; @@ -192,7 +192,7 @@ static HRESULT WINAPI VideoRenderer_DoRenderSample(struct strmbase_renderer *ifa
static HRESULT WINAPI VideoRenderer_CheckMediaType(struct strmbase_renderer *iface, const AM_MEDIA_TYPE *pmt) { - VideoRendererImpl *This = impl_from_strmbase_renderer(iface); + struct video_renderer *This = impl_from_strmbase_renderer(iface);
if (!IsEqualIID(&pmt->majortype, &MEDIATYPE_Video)) return S_FALSE; @@ -241,7 +241,7 @@ static HRESULT WINAPI VideoRenderer_CheckMediaType(struct strmbase_renderer *ifa
static void video_renderer_destroy(struct strmbase_renderer *iface) { - VideoRendererImpl *filter = impl_from_strmbase_renderer(iface); + struct video_renderer *filter = impl_from_strmbase_renderer(iface);
BaseControlWindow_Destroy(&filter->baseControlWindow); BaseControlVideo_Destroy(&filter->baseControlVideo); @@ -254,7 +254,7 @@ static void video_renderer_destroy(struct strmbase_renderer *iface)
static HRESULT video_renderer_query_interface(struct strmbase_renderer *iface, REFIID iid, void **out) { - VideoRendererImpl *filter = impl_from_strmbase_renderer(iface); + struct video_renderer *filter = impl_from_strmbase_renderer(iface);
if (IsEqualGUID(iid, &IID_IBasicVideo)) *out = &filter->baseControlVideo.IBasicVideo_iface; @@ -269,7 +269,7 @@ static HRESULT video_renderer_query_interface(struct strmbase_renderer *iface, R
static HRESULT video_renderer_pin_query_interface(struct strmbase_renderer *iface, REFIID iid, void **out) { - VideoRendererImpl *filter = impl_from_strmbase_renderer(iface); + struct video_renderer *filter = impl_from_strmbase_renderer(iface);
if (IsEqualGUID(iid, &IID_IOverlay)) *out = &filter->IOverlay_iface; @@ -282,14 +282,14 @@ static HRESULT video_renderer_pin_query_interface(struct strmbase_renderer *ifac
static void video_renderer_start_stream(struct strmbase_renderer *iface) { - VideoRendererImpl *filter = impl_from_strmbase_renderer(iface); + struct video_renderer *filter = impl_from_strmbase_renderer(iface);
SetEvent(filter->run_event); }
static void video_renderer_stop_stream(struct strmbase_renderer *iface) { - VideoRendererImpl *This = impl_from_strmbase_renderer(iface); + struct video_renderer *This = impl_from_strmbase_renderer(iface);
TRACE("(%p)->()\n", This);
@@ -302,14 +302,14 @@ static void video_renderer_stop_stream(struct strmbase_renderer *iface)
static void video_renderer_init_stream(struct strmbase_renderer *iface) { - VideoRendererImpl *filter = impl_from_strmbase_renderer(iface); + struct video_renderer *filter = impl_from_strmbase_renderer(iface);
VideoRenderer_AutoShowWindow(filter); }
static RECT WINAPI VideoRenderer_GetDefaultRect(BaseWindow *iface) { - VideoRendererImpl *This = impl_from_BaseWindow(iface); + struct video_renderer *This = impl_from_BaseWindow(iface); static RECT defRect;
SetRect(&defRect, 0, 0, This->VideoWidth, This->VideoHeight); @@ -319,7 +319,7 @@ static RECT WINAPI VideoRenderer_GetDefaultRect(BaseWindow *iface)
static BOOL WINAPI VideoRenderer_OnSize(BaseWindow *iface, LONG Width, LONG Height) { - VideoRendererImpl *This = impl_from_BaseWindow(iface); + struct video_renderer *This = impl_from_BaseWindow(iface);
TRACE("WM_SIZE %d %d\n", Width, Height); GetClientRect(iface->hWnd, &This->DestRect); @@ -352,14 +352,14 @@ static const BaseWindowFuncTable renderer_BaseWindowFuncTable = {
static HRESULT WINAPI VideoRenderer_GetSourceRect(BaseControlVideo* iface, RECT *pSourceRect) { - VideoRendererImpl *This = impl_from_BaseControlVideo(iface); + struct video_renderer *This = impl_from_BaseControlVideo(iface); CopyRect(pSourceRect,&This->SourceRect); return S_OK; }
static HRESULT WINAPI VideoRenderer_GetStaticImage(BaseControlVideo *iface, LONG *size, LONG *image) { - VideoRendererImpl *filter = impl_from_BaseControlVideo(iface); + struct video_renderer *filter = impl_from_BaseControlVideo(iface); const AM_MEDIA_TYPE *mt = &filter->renderer.sink.pin.mt; const BITMAPINFOHEADER *bih; size_t image_size; @@ -410,14 +410,14 @@ static HRESULT WINAPI VideoRenderer_GetStaticImage(BaseControlVideo *iface, LONG
static HRESULT WINAPI VideoRenderer_GetTargetRect(BaseControlVideo* iface, RECT *pTargetRect) { - VideoRendererImpl *This = impl_from_BaseControlVideo(iface); + struct video_renderer *This = impl_from_BaseControlVideo(iface); CopyRect(pTargetRect,&This->DestRect); return S_OK; }
static VIDEOINFOHEADER* WINAPI VideoRenderer_GetVideoFormat(BaseControlVideo* iface) { - VideoRendererImpl *This = impl_from_BaseControlVideo(iface); + struct video_renderer *This = impl_from_BaseControlVideo(iface); AM_MEDIA_TYPE *pmt;
TRACE("(%p/%p)\n", This, iface); @@ -439,7 +439,7 @@ static VIDEOINFOHEADER* WINAPI VideoRenderer_GetVideoFormat(BaseControlVideo* if
static HRESULT WINAPI VideoRenderer_IsDefaultSourceRect(BaseControlVideo* iface) { - VideoRendererImpl *This = impl_from_BaseControlVideo(iface); + struct video_renderer *This = impl_from_BaseControlVideo(iface); FIXME("(%p/%p)->(): stub !!!\n", This, iface);
return S_OK; @@ -447,7 +447,7 @@ static HRESULT WINAPI VideoRenderer_IsDefaultSourceRect(BaseControlVideo* iface)
static HRESULT WINAPI VideoRenderer_IsDefaultTargetRect(BaseControlVideo* iface) { - VideoRendererImpl *This = impl_from_BaseControlVideo(iface); + struct video_renderer *This = impl_from_BaseControlVideo(iface); FIXME("(%p/%p)->(): stub !!!\n", This, iface);
return S_OK; @@ -455,7 +455,7 @@ static HRESULT WINAPI VideoRenderer_IsDefaultTargetRect(BaseControlVideo* iface)
static HRESULT WINAPI VideoRenderer_SetDefaultSourceRect(BaseControlVideo* iface) { - VideoRendererImpl *This = impl_from_BaseControlVideo(iface); + struct video_renderer *This = impl_from_BaseControlVideo(iface);
SetRect(&This->SourceRect, 0, 0, This->VideoWidth, This->VideoHeight);
@@ -464,7 +464,7 @@ static HRESULT WINAPI VideoRenderer_SetDefaultSourceRect(BaseControlVideo* iface
static HRESULT WINAPI VideoRenderer_SetDefaultTargetRect(BaseControlVideo* iface) { - VideoRendererImpl *This = impl_from_BaseControlVideo(iface); + struct video_renderer *This = impl_from_BaseControlVideo(iface); RECT rect;
if (!GetClientRect(This->baseControlWindow.baseWindow.hWnd, &rect)) @@ -477,14 +477,14 @@ static HRESULT WINAPI VideoRenderer_SetDefaultTargetRect(BaseControlVideo* iface
static HRESULT WINAPI VideoRenderer_SetSourceRect(BaseControlVideo* iface, RECT *pSourceRect) { - VideoRendererImpl *This = impl_from_BaseControlVideo(iface); + struct video_renderer *This = impl_from_BaseControlVideo(iface); CopyRect(&This->SourceRect,pSourceRect); return S_OK; }
static HRESULT WINAPI VideoRenderer_SetTargetRect(BaseControlVideo* iface, RECT *pTargetRect) { - VideoRendererImpl *This = impl_from_BaseControlVideo(iface); + struct video_renderer *This = impl_from_BaseControlVideo(iface); CopyRect(&This->DestRect,pTargetRect); return S_OK; } @@ -505,7 +505,7 @@ static const BaseControlVideoFuncTable renderer_BaseControlVideoFuncTable = { static HRESULT WINAPI VideoWindow_get_FullScreenMode(IVideoWindow *iface, LONG *FullScreenMode) { - VideoRendererImpl *This = impl_from_IVideoWindow(iface); + struct video_renderer *This = impl_from_IVideoWindow(iface);
TRACE("(%p/%p)->(%p): %d\n", This, iface, FullScreenMode, This->FullScreenMode);
@@ -520,7 +520,7 @@ static HRESULT WINAPI VideoWindow_get_FullScreenMode(IVideoWindow *iface, static HRESULT WINAPI VideoWindow_put_FullScreenMode(IVideoWindow *iface, LONG FullScreenMode) { - VideoRendererImpl *This = impl_from_IVideoWindow(iface); + struct video_renderer *This = impl_from_IVideoWindow(iface);
FIXME("(%p/%p)->(%d): stub !!!\n", This, iface, FullScreenMode);
@@ -595,26 +595,26 @@ static const IVideoWindowVtbl IVideoWindow_VTable = BaseControlWindowImpl_IsCursorHidden };
-static inline VideoRendererImpl *impl_from_IOverlay(IOverlay *iface) +static inline struct video_renderer *impl_from_IOverlay(IOverlay *iface) { - return CONTAINING_RECORD(iface, VideoRendererImpl, IOverlay_iface); + return CONTAINING_RECORD(iface, struct video_renderer, IOverlay_iface); }
static HRESULT WINAPI overlay_QueryInterface(IOverlay *iface, REFIID iid, void **out) { - VideoRendererImpl *filter = impl_from_IOverlay(iface); + struct video_renderer *filter = impl_from_IOverlay(iface); return IPin_QueryInterface(&filter->renderer.sink.pin.IPin_iface, iid, out); }
static ULONG WINAPI overlay_AddRef(IOverlay *iface) { - VideoRendererImpl *filter = impl_from_IOverlay(iface); + struct video_renderer *filter = impl_from_IOverlay(iface); return IPin_AddRef(&filter->renderer.sink.pin.IPin_iface); }
static ULONG WINAPI overlay_Release(IOverlay *iface) { - VideoRendererImpl *filter = impl_from_IOverlay(iface); + struct video_renderer *filter = impl_from_IOverlay(iface); return IPin_Release(&filter->renderer.sink.pin.IPin_iface); }
@@ -650,7 +650,7 @@ static HRESULT WINAPI overlay_SetColorKey(IOverlay *iface, COLORKEY *key)
static HRESULT WINAPI overlay_GetWindowHandle(IOverlay *iface, HWND *window) { - VideoRendererImpl *filter = impl_from_IOverlay(iface); + struct video_renderer *filter = impl_from_IOverlay(iface);
TRACE("filter %p, window %p.\n", filter, window);
@@ -701,7 +701,7 @@ static const IOverlayVtbl overlay_vtbl =
HRESULT video_renderer_create(IUnknown *outer, IUnknown **out) { - VideoRendererImpl *object; + struct video_renderer *object; HRESULT hr;
if (!(object = calloc(1, sizeof(*object))))
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=68760
Your paranoid android.
=== debiant (build log) ===
error: patch failed: dlls/quartz/filesource.c:548 Task: Patch failed to apply
=== debiant (build log) ===
error: patch failed: dlls/quartz/filesource.c:548 Task: Patch failed to apply
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/quartz/vmr9.c | 119 +++++++++++++++++++-------------------------- 1 file changed, 50 insertions(+), 69 deletions(-)
diff --git a/dlls/quartz/vmr9.c b/dlls/quartz/vmr9.c index c44607b3ef2..58fbef54335 100644 --- a/dlls/quartz/vmr9.c +++ b/dlls/quartz/vmr9.c @@ -597,7 +597,7 @@ static void vmr_destroy(struct strmbase_renderer *iface) FreeLibrary(filter->hD3d9); BaseControlWindow_Destroy(&filter->baseControlWindow); strmbase_renderer_cleanup(&filter->renderer); - CoTaskMemFree(filter); + free(filter);
InterlockedDecrement(&object_locks); } @@ -2291,69 +2291,57 @@ static const IOverlayVtbl overlay_vtbl =
static HRESULT vmr_create(IUnknown *outer, IUnknown **out, const CLSID *clsid) { + struct quartz_vmr *object; HRESULT hr; - struct quartz_vmr* pVMR;
- *out = NULL; - - pVMR = CoTaskMemAlloc(sizeof(struct quartz_vmr)); + if (!(object = calloc(1, sizeof(*object)))) + return E_OUTOFMEMORY;
- pVMR->hD3d9 = LoadLibraryA("d3d9.dll"); - if (!pVMR->hD3d9 ) + object->hD3d9 = LoadLibraryA("d3d9.dll"); + if (!object->hD3d9) { WARN("Could not load d3d9.dll\n"); - CoTaskMemFree(pVMR); + free(object); return VFW_E_DDRAW_CAPS_NOT_SUITABLE; }
- pVMR->IAMCertifiedOutputProtection_iface.lpVtbl = &IAMCertifiedOutputProtection_Vtbl; - pVMR->IAMFilterMiscFlags_iface.lpVtbl = &IAMFilterMiscFlags_Vtbl; - - pVMR->mode = 0; - pVMR->allocator_d3d9_dev = NULL; - pVMR->allocator_mon= NULL; - pVMR->num_surfaces = pVMR->cur_surface = 0; - pVMR->allocator = NULL; - pVMR->presenter = NULL; - pVMR->hWndClippingWindow = NULL; - pVMR->IVMRFilterConfig_iface.lpVtbl = &VMR7_FilterConfig_Vtbl; - pVMR->IVMRFilterConfig9_iface.lpVtbl = &VMR9_FilterConfig_Vtbl; - pVMR->IVMRMonitorConfig_iface.lpVtbl = &VMR7_MonitorConfig_Vtbl; - pVMR->IVMRMonitorConfig9_iface.lpVtbl = &VMR9_MonitorConfig_Vtbl; - pVMR->IVMRSurfaceAllocatorNotify_iface.lpVtbl = &VMR7_SurfaceAllocatorNotify_Vtbl; - pVMR->IVMRSurfaceAllocatorNotify9_iface.lpVtbl = &VMR9_SurfaceAllocatorNotify_Vtbl; - pVMR->IVMRWindowlessControl_iface.lpVtbl = &VMR7_WindowlessControl_Vtbl; - pVMR->IVMRWindowlessControl9_iface.lpVtbl = &VMR9_WindowlessControl_Vtbl; - pVMR->IOverlay_iface.lpVtbl = &overlay_vtbl; - - strmbase_renderer_init(&pVMR->renderer, outer, clsid, L"VMR Input0", &renderer_ops); - - hr = video_window_init(&pVMR->baseControlWindow, &IVideoWindow_VTable, - &pVMR->renderer.filter, &pVMR->renderer.sink.pin, &renderer_BaseWindowFuncTable); + strmbase_renderer_init(&object->renderer, outer, clsid, L"VMR Input0", &renderer_ops); + object->IAMCertifiedOutputProtection_iface.lpVtbl = &IAMCertifiedOutputProtection_Vtbl; + object->IAMFilterMiscFlags_iface.lpVtbl = &IAMFilterMiscFlags_Vtbl; + object->IVMRFilterConfig_iface.lpVtbl = &VMR7_FilterConfig_Vtbl; + object->IVMRFilterConfig9_iface.lpVtbl = &VMR9_FilterConfig_Vtbl; + object->IVMRMonitorConfig_iface.lpVtbl = &VMR7_MonitorConfig_Vtbl; + object->IVMRMonitorConfig9_iface.lpVtbl = &VMR9_MonitorConfig_Vtbl; + object->IVMRSurfaceAllocatorNotify_iface.lpVtbl = &VMR7_SurfaceAllocatorNotify_Vtbl; + object->IVMRSurfaceAllocatorNotify9_iface.lpVtbl = &VMR9_SurfaceAllocatorNotify_Vtbl; + object->IVMRWindowlessControl_iface.lpVtbl = &VMR7_WindowlessControl_Vtbl; + object->IVMRWindowlessControl9_iface.lpVtbl = &VMR9_WindowlessControl_Vtbl; + object->IOverlay_iface.lpVtbl = &overlay_vtbl; + + hr = video_window_init(&object->baseControlWindow, &IVideoWindow_VTable, + &object->renderer.filter, &object->renderer.sink.pin, &renderer_BaseWindowFuncTable); if (FAILED(hr)) goto fail;
- if (FAILED(hr = BaseWindowImpl_PrepareWindow(&pVMR->baseControlWindow.baseWindow))) + if (FAILED(hr = BaseWindowImpl_PrepareWindow(&object->baseControlWindow.baseWindow))) goto fail;
- hr = basic_video_init(&pVMR->baseControlVideo, &pVMR->renderer.filter, - &pVMR->renderer.sink.pin, &renderer_BaseControlVideoFuncTable); + hr = basic_video_init(&object->baseControlVideo, &object->renderer.filter, + &object->renderer.sink.pin, &renderer_BaseControlVideoFuncTable); if (FAILED(hr)) goto fail;
- pVMR->run_event = CreateEventW(NULL, TRUE, FALSE, NULL); + object->run_event = CreateEventW(NULL, TRUE, FALSE, NULL);
- *out = &pVMR->renderer.filter.IUnknown_inner; - ZeroMemory(&pVMR->source_rect, sizeof(RECT)); - ZeroMemory(&pVMR->target_rect, sizeof(RECT)); - TRACE("Created at %p\n", pVMR); + TRACE("Created VMR %p.\n", object); + *out = &object->renderer.filter.IUnknown_inner; return hr;
fail: - BaseWindowImpl_DoneWithWindow(&pVMR->baseControlWindow.baseWindow); - strmbase_renderer_cleanup(&pVMR->renderer); - FreeLibrary(pVMR->hD3d9); - CoTaskMemFree(pVMR); + BaseWindowImpl_DoneWithWindow(&object->baseControlWindow.baseWindow); + strmbase_renderer_cleanup(&object->renderer); + FreeLibrary(object->hD3d9); + free(object); return hr; }
@@ -2423,7 +2411,7 @@ static ULONG WINAPI VMR9_ImagePresenter_Release(IVMRImagePresenter9 *iface) IDirect3DSurface9_Release(surface); }
- CoTaskMemFree(This->d3d9_surfaces); + free(This->d3d9_surfaces); This->d3d9_surfaces = NULL; This->num_surfaces = 0; if (This->d3d9_vertex) @@ -2431,7 +2419,7 @@ static ULONG WINAPI VMR9_ImagePresenter_Release(IVMRImagePresenter9 *iface) IDirect3DVertexBuffer9_Release(This->d3d9_vertex); This->d3d9_vertex = NULL; } - CoTaskMemFree(This); + free(This); return 0; } return refCount; @@ -2699,8 +2687,8 @@ static BOOL CreateRenderingWindow(VMR9DefaultAllocatorPresenterImpl *This, VMR9A } IVMRSurfaceAllocatorNotify9_SetD3DDevice(This->SurfaceAllocatorNotify, This->d3d9_dev, This->hMon);
- This->d3d9_surfaces = CoTaskMemAlloc(*numbuffers * sizeof(IDirect3DSurface9 *)); - ZeroMemory(This->d3d9_surfaces, *numbuffers * sizeof(IDirect3DSurface9 *)); + if (!(This->d3d9_surfaces = calloc(*numbuffers, sizeof(IDirect3DSurface9 *)))) + return FALSE;
hr = VMR9_SurfaceAllocator_SetAllocationSettings(This, info); if (FAILED(hr)) @@ -2915,19 +2903,18 @@ static IDirect3D9 *init_d3d9(HMODULE d3d9_handle)
static HRESULT VMR9DefaultAllocatorPresenterImpl_create(struct quartz_vmr *parent, LPVOID * ppv) { + VMR9DefaultAllocatorPresenterImpl *object; HRESULT hr = S_OK; int i; - VMR9DefaultAllocatorPresenterImpl* This;
- This = CoTaskMemAlloc(sizeof(VMR9DefaultAllocatorPresenterImpl)); - if (!This) + if (!(object = calloc(1, sizeof(*object)))) return E_OUTOFMEMORY;
- This->d3d9_ptr = init_d3d9(parent->hD3d9); - if (!This->d3d9_ptr) + object->d3d9_ptr = init_d3d9(parent->hD3d9); + if (!object->d3d9_ptr) { WARN("Could not initialize d3d9.dll\n"); - CoTaskMemFree(This); + free(object); return VFW_E_DDRAW_CAPS_NOT_SUITABLE; }
@@ -2936,7 +2923,7 @@ static HRESULT VMR9DefaultAllocatorPresenterImpl_create(struct quartz_vmr *paren { D3DDISPLAYMODE mode;
- hr = IDirect3D9_EnumAdapterModes(This->d3d9_ptr, i++, D3DFMT_X8R8G8B8, 0, &mode); + hr = IDirect3D9_EnumAdapterModes(object->d3d9_ptr, i++, D3DFMT_X8R8G8B8, 0, &mode); if (hr == D3DERR_INVALIDCALL) break; /* out of adapters */ } while (FAILED(hr)); if (FAILED(hr)) @@ -2944,24 +2931,18 @@ static HRESULT VMR9DefaultAllocatorPresenterImpl_create(struct quartz_vmr *paren if (hr == D3DERR_NOTAVAILABLE) { ERR("Format not supported\n"); - IDirect3D9_Release(This->d3d9_ptr); - CoTaskMemFree(This); + IDirect3D9_Release(object->d3d9_ptr); + free(object); return VFW_E_DDRAW_CAPS_NOT_SUITABLE; }
- This->IVMRImagePresenter9_iface.lpVtbl = &VMR9_ImagePresenter; - This->IVMRSurfaceAllocatorEx9_iface.lpVtbl = &VMR9_SurfaceAllocator; + object->IVMRImagePresenter9_iface.lpVtbl = &VMR9_ImagePresenter; + object->IVMRSurfaceAllocatorEx9_iface.lpVtbl = &VMR9_SurfaceAllocator;
- This->refCount = 1; - This->pVMR9 = parent; - This->d3d9_surfaces = NULL; - This->d3d9_dev = NULL; - This->hMon = 0; - This->d3d9_vertex = NULL; - This->num_surfaces = 0; - This->SurfaceAllocatorNotify = NULL; - This->reset = FALSE; + object->refCount = 1; + object->pVMR9 = parent;
- *ppv = &This->IVMRImagePresenter9_iface; + TRACE("Created default presenter %p.\n", object); + *ppv = &object->IVMRImagePresenter9_iface; return S_OK; }
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=68761
Your paranoid android.
=== debiant (build log) ===
error: patch failed: dlls/quartz/filesource.c:548 Task: Patch failed to apply
=== debiant (build log) ===
error: patch failed: dlls/quartz/filesource.c:548 Task: Patch failed to apply
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/quartz/vmr9.c | 49 +++++++++++++++++++++++----------------------- 1 file changed, 25 insertions(+), 24 deletions(-)
diff --git a/dlls/quartz/vmr9.c b/dlls/quartz/vmr9.c index 58fbef54335..07a3dbc241b 100644 --- a/dlls/quartz/vmr9.c +++ b/dlls/quartz/vmr9.c @@ -151,7 +151,7 @@ static inline struct quartz_vmr *impl_from_IVMRWindowlessControl9(IVMRWindowless return CONTAINING_RECORD(iface, struct quartz_vmr, IVMRWindowlessControl9_iface); }
-typedef struct +struct default_presenter { IVMRImagePresenter9 IVMRImagePresenter9_iface; IVMRSurfaceAllocatorEx9 IVMRSurfaceAllocatorEx9_iface; @@ -170,16 +170,16 @@ typedef struct
struct quartz_vmr* pVMR9; IVMRSurfaceAllocatorNotify9 *SurfaceAllocatorNotify; -} VMR9DefaultAllocatorPresenterImpl; +};
-static inline VMR9DefaultAllocatorPresenterImpl *impl_from_IVMRImagePresenter9( IVMRImagePresenter9 *iface) +static inline struct default_presenter *impl_from_IVMRImagePresenter9(IVMRImagePresenter9 *iface) { - return CONTAINING_RECORD(iface, VMR9DefaultAllocatorPresenterImpl, IVMRImagePresenter9_iface); + return CONTAINING_RECORD(iface, struct default_presenter, IVMRImagePresenter9_iface); }
-static inline VMR9DefaultAllocatorPresenterImpl *impl_from_IVMRSurfaceAllocatorEx9( IVMRSurfaceAllocatorEx9 *iface) +static inline struct default_presenter *impl_from_IVMRSurfaceAllocatorEx9(IVMRSurfaceAllocatorEx9 *iface) { - return CONTAINING_RECORD(iface, VMR9DefaultAllocatorPresenterImpl, IVMRSurfaceAllocatorEx9_iface); + return CONTAINING_RECORD(iface, struct default_presenter, IVMRSurfaceAllocatorEx9_iface); }
static HRESULT VMR9DefaultAllocatorPresenterImpl_create(struct quartz_vmr *parent, LPVOID * ppv); @@ -2358,7 +2358,8 @@ HRESULT vmr9_create(IUnknown *outer, IUnknown **out)
static HRESULT WINAPI VMR9_ImagePresenter_QueryInterface(IVMRImagePresenter9 *iface, REFIID riid, void **ppv) { - VMR9DefaultAllocatorPresenterImpl *This = impl_from_IVMRImagePresenter9(iface); + struct default_presenter *This = impl_from_IVMRImagePresenter9(iface); + TRACE("(%p/%p)->(%s, %p)\n", This, iface, qzdebugstr_guid(riid), ppv);
*ppv = NULL; @@ -2381,7 +2382,7 @@ static HRESULT WINAPI VMR9_ImagePresenter_QueryInterface(IVMRImagePresenter9 *if
static ULONG WINAPI VMR9_ImagePresenter_AddRef(IVMRImagePresenter9 *iface) { - VMR9DefaultAllocatorPresenterImpl *This = impl_from_IVMRImagePresenter9(iface); + struct default_presenter *This = impl_from_IVMRImagePresenter9(iface); ULONG refCount = InterlockedIncrement(&This->refCount);
TRACE("(%p)->() AddRef from %d\n", iface, refCount - 1); @@ -2391,7 +2392,7 @@ static ULONG WINAPI VMR9_ImagePresenter_AddRef(IVMRImagePresenter9 *iface)
static ULONG WINAPI VMR9_ImagePresenter_Release(IVMRImagePresenter9 *iface) { - VMR9DefaultAllocatorPresenterImpl *This = impl_from_IVMRImagePresenter9(iface); + struct default_presenter *This = impl_from_IVMRImagePresenter9(iface); ULONG refCount = InterlockedDecrement(&This->refCount);
TRACE("(%p)->() Release from %d\n", iface, refCount + 1); @@ -2427,7 +2428,7 @@ static ULONG WINAPI VMR9_ImagePresenter_Release(IVMRImagePresenter9 *iface)
static HRESULT WINAPI VMR9_ImagePresenter_StartPresenting(IVMRImagePresenter9 *iface, DWORD_PTR id) { - VMR9DefaultAllocatorPresenterImpl *This = impl_from_IVMRImagePresenter9(iface); + struct default_presenter *This = impl_from_IVMRImagePresenter9(iface);
TRACE("(%p/%p/%p)->(...) stub\n", iface, This,This->pVMR9); return S_OK; @@ -2435,7 +2436,7 @@ static HRESULT WINAPI VMR9_ImagePresenter_StartPresenting(IVMRImagePresenter9 *i
static HRESULT WINAPI VMR9_ImagePresenter_StopPresenting(IVMRImagePresenter9 *iface, DWORD_PTR id) { - VMR9DefaultAllocatorPresenterImpl *This = impl_from_IVMRImagePresenter9(iface); + struct default_presenter *This = impl_from_IVMRImagePresenter9(iface);
TRACE("(%p/%p/%p)->(...) stub\n", iface, This,This->pVMR9); return S_OK; @@ -2444,7 +2445,7 @@ static HRESULT WINAPI VMR9_ImagePresenter_StopPresenting(IVMRImagePresenter9 *if #define USED_FVF (D3DFVF_XYZRHW | D3DFVF_TEX1) struct VERTEX { float x, y, z, rhw, u, v; };
-static HRESULT VMR9_ImagePresenter_PresentTexture(VMR9DefaultAllocatorPresenterImpl *This, IDirect3DSurface9 *surface) +static HRESULT VMR9_ImagePresenter_PresentTexture(struct default_presenter *This, IDirect3DSurface9 *surface) { IDirect3DTexture9 *texture = NULL; HRESULT hr; @@ -2487,7 +2488,7 @@ static HRESULT VMR9_ImagePresenter_PresentTexture(VMR9DefaultAllocatorPresenterI return S_OK; }
-static HRESULT VMR9_ImagePresenter_PresentOffscreenSurface(VMR9DefaultAllocatorPresenterImpl *This, IDirect3DSurface9 *surface) +static HRESULT VMR9_ImagePresenter_PresentOffscreenSurface(struct default_presenter *This, IDirect3DSurface9 *surface) { HRESULT hr; IDirect3DSurface9 *target = NULL; @@ -2514,7 +2515,7 @@ static HRESULT VMR9_ImagePresenter_PresentOffscreenSurface(VMR9DefaultAllocatorP
static HRESULT WINAPI VMR9_ImagePresenter_PresentImage(IVMRImagePresenter9 *iface, DWORD_PTR id, VMR9PresentationInfo *info) { - VMR9DefaultAllocatorPresenterImpl *This = impl_from_IVMRImagePresenter9(iface); + struct default_presenter *This = impl_from_IVMRImagePresenter9(iface); HRESULT hr; RECT output; BOOL render = FALSE; @@ -2565,26 +2566,26 @@ static const IVMRImagePresenter9Vtbl VMR9_ImagePresenter =
static HRESULT WINAPI VMR9_SurfaceAllocator_QueryInterface(IVMRSurfaceAllocatorEx9 *iface, REFIID riid, LPVOID * ppv) { - VMR9DefaultAllocatorPresenterImpl *This = impl_from_IVMRSurfaceAllocatorEx9(iface); + struct default_presenter *This = impl_from_IVMRSurfaceAllocatorEx9(iface);
return VMR9_ImagePresenter_QueryInterface(&This->IVMRImagePresenter9_iface, riid, ppv); }
static ULONG WINAPI VMR9_SurfaceAllocator_AddRef(IVMRSurfaceAllocatorEx9 *iface) { - VMR9DefaultAllocatorPresenterImpl *This = impl_from_IVMRSurfaceAllocatorEx9(iface); + struct default_presenter *This = impl_from_IVMRSurfaceAllocatorEx9(iface);
return VMR9_ImagePresenter_AddRef(&This->IVMRImagePresenter9_iface); }
static ULONG WINAPI VMR9_SurfaceAllocator_Release(IVMRSurfaceAllocatorEx9 *iface) { - VMR9DefaultAllocatorPresenterImpl *This = impl_from_IVMRSurfaceAllocatorEx9(iface); + struct default_presenter *This = impl_from_IVMRSurfaceAllocatorEx9(iface);
return VMR9_ImagePresenter_Release(&This->IVMRImagePresenter9_iface); }
-static HRESULT VMR9_SurfaceAllocator_SetAllocationSettings(VMR9DefaultAllocatorPresenterImpl *This, VMR9AllocationInfo *allocinfo) +static HRESULT VMR9_SurfaceAllocator_SetAllocationSettings(struct default_presenter *This, VMR9AllocationInfo *allocinfo) { D3DCAPS9 caps; UINT width, height; @@ -2660,7 +2661,7 @@ static UINT d3d9_adapter_from_hwnd(IDirect3D9 *d3d9, HWND hwnd, HMONITOR *mon_ou return d3d9_adapter; }
-static BOOL CreateRenderingWindow(VMR9DefaultAllocatorPresenterImpl *This, VMR9AllocationInfo *info, DWORD *numbuffers) +static BOOL CreateRenderingWindow(struct default_presenter *This, VMR9AllocationInfo *info, DWORD *numbuffers) { D3DPRESENT_PARAMETERS d3dpp; DWORD d3d9_adapter; @@ -2714,7 +2715,7 @@ static BOOL CreateRenderingWindow(VMR9DefaultAllocatorPresenterImpl *This, VMR9A
static HRESULT WINAPI VMR9_SurfaceAllocator_InitializeDevice(IVMRSurfaceAllocatorEx9 *iface, DWORD_PTR id, VMR9AllocationInfo *allocinfo, DWORD *numbuffers) { - VMR9DefaultAllocatorPresenterImpl *This = impl_from_IVMRSurfaceAllocatorEx9(iface); + struct default_presenter *This = impl_from_IVMRSurfaceAllocatorEx9(iface);
if (This->pVMR9->mode != VMR9Mode_Windowed && !This->pVMR9->hWndClippingWindow) { @@ -2741,7 +2742,7 @@ static HRESULT WINAPI VMR9_SurfaceAllocator_TerminateDevice(IVMRSurfaceAllocator }
/* Recreate all surfaces (If allocated as D3DPOOL_DEFAULT) and survive! */ -static HRESULT VMR9_SurfaceAllocator_UpdateDeviceReset(VMR9DefaultAllocatorPresenterImpl *This) +static HRESULT VMR9_SurfaceAllocator_UpdateDeviceReset(struct default_presenter *This) { struct VERTEX t_vert[4]; UINT width, height; @@ -2846,7 +2847,7 @@ static HRESULT VMR9_SurfaceAllocator_UpdateDeviceReset(VMR9DefaultAllocatorPrese
static HRESULT WINAPI VMR9_SurfaceAllocator_GetSurface(IVMRSurfaceAllocatorEx9 *iface, DWORD_PTR id, DWORD surfaceindex, DWORD flags, IDirect3DSurface9 **surface) { - VMR9DefaultAllocatorPresenterImpl *This = impl_from_IVMRSurfaceAllocatorEx9(iface); + struct default_presenter *This = impl_from_IVMRSurfaceAllocatorEx9(iface);
/* Update everything first, this is needed because the surface might be destroyed in the reset */ if (!This->d3d9_dev) @@ -2870,7 +2871,7 @@ static HRESULT WINAPI VMR9_SurfaceAllocator_GetSurface(IVMRSurfaceAllocatorEx9 *
static HRESULT WINAPI VMR9_SurfaceAllocator_AdviseNotify(IVMRSurfaceAllocatorEx9 *iface, IVMRSurfaceAllocatorNotify9 *allocnotify) { - VMR9DefaultAllocatorPresenterImpl *This = impl_from_IVMRSurfaceAllocatorEx9(iface); + struct default_presenter *This = impl_from_IVMRSurfaceAllocatorEx9(iface);
TRACE("(%p/%p)->(...)\n", iface, This);
@@ -2903,7 +2904,7 @@ static IDirect3D9 *init_d3d9(HMODULE d3d9_handle)
static HRESULT VMR9DefaultAllocatorPresenterImpl_create(struct quartz_vmr *parent, LPVOID * ppv) { - VMR9DefaultAllocatorPresenterImpl *object; + struct default_presenter *object; HRESULT hr = S_OK; int i;
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=68762
Your paranoid android.
=== debiant (build log) ===
error: patch failed: dlls/quartz/filesource.c:548 Task: Patch failed to apply
=== debiant (build log) ===
error: patch failed: dlls/quartz/filesource.c:548 Task: Patch failed to apply
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=68758
Your paranoid android.
=== debiant (build log) ===
error: patch failed: dlls/quartz/filesource.c:548 Task: Patch failed to apply
=== debiant (build log) ===
error: patch failed: dlls/quartz/filesource.c:548 Task: Patch failed to apply