winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
May 2019
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
2 participants
1019 discussions
Start a n
N
ew thread
Henri Verbeet : wined3d: Use wined3d_texture_get_level_box() in texture2d_load_texture().
by Alexandre Julliard
20 May '19
20 May '19
Module: wine Branch: master Commit: 916bd0e4c290b0ea416df43b69e3fdf9e89efa6a URL:
https://source.winehq.org/git/wine.git/?a=commit;h=916bd0e4c290b0ea416df43b…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Sun May 19 18:48:47 2019 +0430 wined3d: Use wined3d_texture_get_level_box() in texture2d_load_texture(). Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/surface.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index a95b18e..40e8bc1 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -1548,9 +1548,7 @@ BOOL texture2d_load_texture(struct wined3d_texture *texture, unsigned int sub_re } level = sub_resource_idx % texture->level_count; - width = wined3d_texture_get_level_width(texture, level); - height = wined3d_texture_get_level_height(texture, level); - wined3d_box_set(&src_box, 0, 0, width, height, 0, 1); + wined3d_texture_get_level_box(texture, level, &src_box); if (!depth && sub_resource->locations & (WINED3D_LOCATION_TEXTURE_SRGB | WINED3D_LOCATION_TEXTURE_RGB) && (texture->resource.format_flags & WINED3DFMT_FLAG_FBO_ATTACHABLE_SRGB) @@ -1560,7 +1558,7 @@ BOOL texture2d_load_texture(struct wined3d_texture *texture, unsigned int sub_re { RECT src_rect; - SetRect(&src_rect, 0, 0, width, height); + SetRect(&src_rect, src_box.left, src_box.top, src_box.right, src_box.bottom); if (srgb) texture2d_blt_fbo(device, context, WINED3D_TEXF_POINT, texture, sub_resource_idx, WINED3D_LOCATION_TEXTURE_RGB, &src_rect, @@ -1581,7 +1579,7 @@ BOOL texture2d_load_texture(struct wined3d_texture *texture, unsigned int sub_re DWORD dst_location = srgb ? WINED3D_LOCATION_TEXTURE_SRGB : WINED3D_LOCATION_TEXTURE_RGB; RECT src_rect; - SetRect(&src_rect, 0, 0, width, height); + SetRect(&src_rect, src_box.left, src_box.top, src_box.right, src_box.bottom); if (fbo_blitter_supported(WINED3D_BLIT_OP_COLOR_BLIT, gl_info, &texture->resource, src_location, &texture->resource, dst_location)) texture2d_blt_fbo(device, context, WINED3D_TEXF_POINT, texture, sub_resource_idx, @@ -1640,6 +1638,8 @@ BOOL texture2d_load_texture(struct wined3d_texture *texture, unsigned int sub_re wined3d_texture_get_memory(texture, sub_resource_idx, &data, sub_resource->locations); if (conversion) { + width = src_box.right - src_box.left; + height = src_box.bottom - src_box.top; wined3d_format_calculate_pitch(format, device->surface_alignment, width, height, &dst_row_pitch, &dst_slice_pitch);
1
0
0
0
Henri Verbeet : wined3d: Pass a wined3d_context_gl structure to context_set_pixel_format().
by Alexandre Julliard
20 May '19
20 May '19
Module: wine Branch: master Commit: 6cd822c38abbe45c1b0e744e0845919671b3e90f URL:
https://source.winehq.org/git/wine.git/?a=commit;h=6cd822c38abbe45c1b0e744e…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Sun May 19 18:48:46 2019 +0430 wined3d: Pass a wined3d_context_gl structure to context_set_pixel_format(). Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/context.c | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c index 0908ed1..aa4d260 100644 --- a/dlls/wined3d/context.c +++ b/dlls/wined3d/context.c @@ -1152,19 +1152,18 @@ static BOOL wined3d_context_gl_restore_pixel_format(struct wined3d_context_gl *c return ret; } -static BOOL context_set_pixel_format(struct wined3d_context *context) +static BOOL wined3d_context_gl_set_pixel_format(struct wined3d_context_gl *context_gl) { - struct wined3d_context_gl *context_gl = wined3d_context_gl(context); - const struct wined3d_gl_info *gl_info = context->gl_info; - BOOL private = context->hdc_is_private; - int format = context->pixel_format; - HDC dc = context->hdc; + const struct wined3d_gl_info *gl_info = context_gl->c.gl_info; + BOOL private = context_gl->c.hdc_is_private; + int format = context_gl->c.pixel_format; + HDC dc = context_gl->c.hdc; int current; - if (private && context->hdc_has_format) + if (private && context_gl->c.hdc_has_format) return TRUE; - if (!private && WindowFromDC(dc) != context->win_handle) + if (!private && WindowFromDC(dc) != context_gl->c.win_handle) return FALSE; current = gl_info->gl_ops.wgl.p_wglGetPixelFormat(dc); @@ -1180,8 +1179,8 @@ static BOOL context_set_pixel_format(struct wined3d_context *context) return FALSE; } - context->restore_pf = 0; - context->restore_pf_win = private ? NULL : WindowFromDC(dc); + context_gl->c.restore_pf = 0; + context_gl->c.restore_pf_win = private ? NULL : WindowFromDC(dc); goto success; } @@ -1201,12 +1200,12 @@ static BOOL context_set_pixel_format(struct wined3d_context *context) } win = private ? NULL : WindowFromDC(dc); - if (win != context->restore_pf_win) + if (win != context_gl->c.restore_pf_win) { wined3d_context_gl_restore_pixel_format(context_gl); - context->restore_pf = private ? 0 : current; - context->restore_pf_win = win; + context_gl->c.restore_pf = private ? 0 : current; + context_gl->c.restore_pf_win = win; } goto success; @@ -1222,16 +1221,17 @@ static BOOL context_set_pixel_format(struct wined3d_context *context) success: if (private) - context->hdc_has_format = TRUE; + context_gl->c.hdc_has_format = TRUE; return TRUE; } static BOOL context_set_gl_context(struct wined3d_context *ctx) { + struct wined3d_context_gl *context_gl = wined3d_context_gl(ctx); struct wined3d_swapchain *swapchain = ctx->swapchain; BOOL backup = FALSE; - if (!context_set_pixel_format(ctx)) + if (!wined3d_context_gl_set_pixel_format(context_gl)) { WARN("Failed to set pixel format %d on device context %p.\n", ctx->pixel_format, ctx->hdc); @@ -1265,7 +1265,7 @@ static BOOL context_set_gl_context(struct wined3d_context *ctx) ctx->hdc_is_private = TRUE; ctx->hdc_has_format = FALSE; - if (!context_set_pixel_format(ctx)) + if (!wined3d_context_gl_set_pixel_format(context_gl)) { ERR("Failed to set pixel format %d on device context %p.\n", ctx->pixel_format, ctx->hdc); @@ -2113,7 +2113,7 @@ HRESULT wined3d_context_gl_init(struct wined3d_context_gl *context_gl, struct wi context_enter(context); - if (!context_set_pixel_format(context)) + if (!wined3d_context_gl_set_pixel_format(context_gl)) { ERR("Failed to set pixel format %d on device context %p.\n", context->pixel_format, context->hdc); context_release(context);
1
0
0
0
Henri Verbeet : wined3d: Pass a wined3d_context_gl structure to wined3d_context_gl_restore_pixel_format ().
by Alexandre Julliard
20 May '19
20 May '19
Module: wine Branch: master Commit: da91e15bda87ff310a493135fef46b074b1bd974 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=da91e15bda87ff310a493135…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Sun May 19 18:48:45 2019 +0430 wined3d: Pass a wined3d_context_gl structure to wined3d_context_gl_restore_pixel_format(). Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/context.c | 37 +++++++++++++++++++++---------------- 1 file changed, 21 insertions(+), 16 deletions(-) diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c index 0847cb9..0908ed1 100644 --- a/dlls/wined3d/context.c +++ b/dlls/wined3d/context.c @@ -1120,39 +1120,41 @@ void wined3d_context_gl_texture_update(struct wined3d_context_gl *context_gl, } } -static BOOL context_restore_pixel_format(struct wined3d_context *ctx) +static BOOL wined3d_context_gl_restore_pixel_format(struct wined3d_context_gl *context_gl) { - const struct wined3d_gl_info *gl_info = ctx->gl_info; + const struct wined3d_gl_info *gl_info = context_gl->c.gl_info; BOOL ret = FALSE; - if (ctx->restore_pf && IsWindow(ctx->restore_pf_win)) + if (context_gl->c.restore_pf && IsWindow(context_gl->c.restore_pf_win)) { - if (ctx->gl_info->supported[WGL_WINE_PIXEL_FORMAT_PASSTHROUGH]) + if (context_gl->c.gl_info->supported[WGL_WINE_PIXEL_FORMAT_PASSTHROUGH]) { - HDC dc = GetDCEx(ctx->restore_pf_win, 0, DCX_USESTYLE | DCX_CACHE); + HDC dc = GetDCEx(context_gl->c.restore_pf_win, 0, DCX_USESTYLE | DCX_CACHE); if (dc) { - if (!(ret = GL_EXTCALL(wglSetPixelFormatWINE(dc, ctx->restore_pf)))) + if (!(ret = GL_EXTCALL(wglSetPixelFormatWINE(dc, context_gl->c.restore_pf)))) { - ERR("wglSetPixelFormatWINE failed to restore pixel format %d on window %p.\n", - ctx->restore_pf, ctx->restore_pf_win); + ERR("Failed to restore pixel format %d on window %p.\n", + context_gl->c.restore_pf, context_gl->c.restore_pf_win); } - ReleaseDC(ctx->restore_pf_win, dc); + ReleaseDC(context_gl->c.restore_pf_win, dc); } } else { - ERR("can't restore pixel format %d on window %p\n", ctx->restore_pf, ctx->restore_pf_win); + ERR("Unable to restore pixel format %d on window %p.\n", + context_gl->c.restore_pf, context_gl->c.restore_pf_win); } } - ctx->restore_pf = 0; - ctx->restore_pf_win = NULL; + context_gl->c.restore_pf = 0; + context_gl->c.restore_pf_win = NULL; return ret; } static BOOL context_set_pixel_format(struct wined3d_context *context) { + struct wined3d_context_gl *context_gl = wined3d_context_gl(context); const struct wined3d_gl_info *gl_info = context->gl_info; BOOL private = context->hdc_is_private; int format = context->pixel_format; @@ -1201,7 +1203,7 @@ static BOOL context_set_pixel_format(struct wined3d_context *context) win = private ? NULL : WindowFromDC(dc); if (win != context->restore_pf_win) { - context_restore_pixel_format(context); + wined3d_context_gl_restore_pixel_format(context_gl); context->restore_pf = private ? 0 : current; context->restore_pf_win = win; @@ -1324,6 +1326,7 @@ static void context_update_window(struct wined3d_context *context) void wined3d_context_cleanup(struct wined3d_context *context) { + struct wined3d_context_gl *context_gl = wined3d_context_gl(context); const struct wined3d_gl_info *gl_info = context->gl_info; HGLRC restore_ctx; HDC restore_dc; @@ -1336,7 +1339,7 @@ void wined3d_context_cleanup(struct wined3d_context *context) else if (context->valid) context_set_gl_context(context); - context_restore_pixel_format(context); + wined3d_context_gl_restore_pixel_format(context_gl); if (restore_ctx) { context_restore_gl_context(gl_info, restore_dc, restore_ctx); @@ -1499,7 +1502,7 @@ void wined3d_context_gl_cleanup(struct wined3d_context_gl *context_gl) heap_free(context_gl->texture_type); - context_restore_pixel_format(&context_gl->c); + wined3d_context_gl_restore_pixel_format(context_gl); if (restore_ctx) context_restore_gl_context(gl_info, restore_dc, restore_ctx); @@ -1582,6 +1585,8 @@ BOOL context_set_current(struct wined3d_context *ctx) void context_release(struct wined3d_context *context) { + struct wined3d_context_gl *context_gl = wined3d_context_gl(context); + TRACE("Releasing context %p, level %u.\n", context, context->level); if (WARN_ON(d3d)) @@ -1594,7 +1599,7 @@ void context_release(struct wined3d_context *context) if (!--context->level) { - if (context_restore_pixel_format(context)) + if (wined3d_context_gl_restore_pixel_format(context_gl)) context->needs_set = 1; if (context->restore_ctx) {
1
0
0
0
Henri Verbeet : wined3d: Pass a wined3d_context_gl structure to context_get_offscreen_gl_buffer().
by Alexandre Julliard
20 May '19
20 May '19
Module: wine Branch: master Commit: 74ed5d722f6bf167a6aad4dbac3885f79c37379a URL:
https://source.winehq.org/git/wine.git/?a=commit;h=74ed5d722f6bf167a6aad4db…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Sun May 19 18:48:44 2019 +0430 wined3d: Pass a wined3d_context_gl structure to context_get_offscreen_gl_buffer(). Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/context.c | 8 +++++--- dlls/wined3d/surface.c | 12 +++++++----- dlls/wined3d/wined3d_private.h | 2 +- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c index 84d6f4e..0847cb9 100644 --- a/dlls/wined3d/context.c +++ b/dlls/wined3d/context.c @@ -2724,7 +2724,7 @@ static void context_set_render_offscreen(struct wined3d_context *context, BOOL o context->render_offscreen = offscreen; } -GLenum context_get_offscreen_gl_buffer(const struct wined3d_context *context) +GLenum wined3d_context_gl_get_offscreen_gl_buffer(const struct wined3d_context_gl *context_gl) { switch (wined3d_settings.offscreen_rendering_mode) { @@ -2732,7 +2732,7 @@ GLenum context_get_offscreen_gl_buffer(const struct wined3d_context *context) return GL_COLOR_ATTACHMENT0; case ORM_BACKBUFFER: - return context->aux_buffers > 0 ? GL_AUX0 : GL_BACK; + return context_gl->c.aux_buffers > 0 ? GL_AUX0 : GL_BACK; default: FIXME("Unhandled offscreen rendering mode %#x.\n", wined3d_settings.offscreen_rendering_mode); @@ -2742,12 +2742,14 @@ GLenum context_get_offscreen_gl_buffer(const struct wined3d_context *context) static DWORD context_generate_rt_mask_no_fbo(const struct wined3d_context *context, struct wined3d_resource *rt) { + const struct wined3d_context_gl *context_gl = wined3d_context_gl_const(context); + if (!rt || rt->format->id == WINED3DFMT_NULL) return 0; else if (rt->type != WINED3D_RTYPE_BUFFER && texture_from_resource(rt)->swapchain) return context_generate_rt_mask_from_resource(rt); else - return context_generate_rt_mask(context_get_offscreen_gl_buffer(context)); + return context_generate_rt_mask(wined3d_context_gl_get_offscreen_gl_buffer(context_gl)); } /* Context activation is done by the caller. */ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index 318ac19..a95b18e 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -754,7 +754,7 @@ static void texture2d_read_from_framebuffer(struct wined3d_texture *texture, uns /* Mapping the primary render target which is not on a swapchain. * Read from the back buffer. */ TRACE("Mapping offscreen render target.\n"); - gl_info->gl_ops.gl.p_glReadBuffer(context_get_offscreen_gl_buffer(context)); + gl_info->gl_ops.gl.p_glReadBuffer(wined3d_context_gl_get_offscreen_gl_buffer(context_gl)); src_is_upside_down = TRUE; } else @@ -845,6 +845,7 @@ void texture2d_load_fb_texture(struct wined3d_texture_gl *texture_gl, { struct wined3d_texture *restore_texture; const struct wined3d_gl_info *gl_info; + struct wined3d_context_gl *context_gl; struct wined3d_resource *resource; unsigned int restore_idx, level; struct wined3d_device *device; @@ -858,17 +859,18 @@ void texture2d_load_fb_texture(struct wined3d_texture_gl *texture_gl, context = context_acquire(device, &texture_gl->t, sub_resource_idx); else restore_texture = NULL; + context_gl = wined3d_context_gl(context); gl_info = context->gl_info; device_invalidate_state(device, STATE_FRAMEBUFFER); wined3d_texture_prepare_texture(&texture_gl->t, context, srgb); - wined3d_texture_gl_bind_and_dirtify(texture_gl, wined3d_context_gl(context), srgb); + wined3d_texture_gl_bind_and_dirtify(texture_gl, context_gl, srgb); TRACE("Reading back offscreen render target %p, %u.\n", texture_gl, sub_resource_idx); if (wined3d_resource_is_offscreen(resource)) - gl_info->gl_ops.gl.p_glReadBuffer(context_get_offscreen_gl_buffer(context)); + gl_info->gl_ops.gl.p_glReadBuffer(wined3d_context_gl_get_offscreen_gl_buffer(context_gl)); else gl_info->gl_ops.gl.p_glReadBuffer(wined3d_texture_get_gl_buffer(&texture_gl->t)); checkGLcall("glReadBuffer"); @@ -922,7 +924,7 @@ static void fb_copy_to_texture_direct(struct wined3d_texture_gl *dst_texture, un { TRACE("Reading from an offscreen target\n"); upsidedown = !upsidedown; - gl_info->gl_ops.gl.p_glReadBuffer(context_get_offscreen_gl_buffer(context)); + gl_info->gl_ops.gl.p_glReadBuffer(wined3d_context_gl_get_offscreen_gl_buffer(context_gl)); } else { @@ -1036,7 +1038,7 @@ static void fb_copy_to_texture_hwstretch(struct wined3d_texture_gl *dst_texture, wined3d_context_gl_apply_ffp_blit_state(context_gl, device); wined3d_texture_load(&dst_texture->t, context, FALSE); - offscreen_buffer = context_get_offscreen_gl_buffer(context); + offscreen_buffer = wined3d_context_gl_get_offscreen_gl_buffer(context_gl); src_level = src_sub_resource_idx % src_texture->t.level_count; src_width = wined3d_texture_get_level_width(&src_texture->t, src_level); src_height = wined3d_texture_get_level_height(&src_texture->t, src_level); diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 94765cb..0fc5646 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -2081,6 +2081,7 @@ void wined3d_context_gl_free_occlusion_query(struct wined3d_occlusion_query *que void wined3d_context_gl_free_pipeline_statistics_query(struct wined3d_pipeline_statistics_query *query) DECLSPEC_HIDDEN; void wined3d_context_gl_free_so_statistics_query(struct wined3d_so_statistics_query *query) DECLSPEC_HIDDEN; void wined3d_context_gl_free_timestamp_query(struct wined3d_timestamp_query *query) DECLSPEC_HIDDEN; +GLenum wined3d_context_gl_get_offscreen_gl_buffer(const struct wined3d_context_gl *context_gl) DECLSPEC_HIDDEN; const unsigned int *wined3d_context_gl_get_tex_unit_mapping(const struct wined3d_context_gl *context_gl, const struct wined3d_shader_version *shader_version, unsigned int *base, unsigned int *count) DECLSPEC_HIDDEN; HRESULT wined3d_context_gl_init(struct wined3d_context_gl *context_gl, @@ -2246,7 +2247,6 @@ void context_draw_textured_quad(struct wined3d_context *context, struct wined3d_ void context_enable_clip_distances(struct wined3d_context *context, unsigned int mask) DECLSPEC_HIDDEN; void context_end_transform_feedback(struct wined3d_context *context) DECLSPEC_HIDDEN; struct wined3d_context *context_get_current(void) DECLSPEC_HIDDEN; -GLenum context_get_offscreen_gl_buffer(const struct wined3d_context *context) DECLSPEC_HIDDEN; DWORD context_get_tls_idx(void) DECLSPEC_HIDDEN; void context_gl_resource_released(struct wined3d_device *device, GLuint name, BOOL rb_namespace) DECLSPEC_HIDDEN;
1
0
0
0
Henri Verbeet : wined3d: Move the FBO fields from struct wined3d_context to struct wined3d_context_gl.
by Alexandre Julliard
20 May '19
20 May '19
Module: wine Branch: master Commit: f2506fc778092311102a5eb4fc77b99503dfb72d URL:
https://source.winehq.org/git/wine.git/?a=commit;h=f2506fc778092311102a5eb4…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Sun May 19 18:48:43 2019 +0430 wined3d: Move the FBO fields from struct wined3d_context to struct wined3d_context_gl. Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/context.c | 150 +++++++++++++++++++++-------------------- dlls/wined3d/wined3d_private.h | 28 ++++---- 2 files changed, 90 insertions(+), 88 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=f2506fc778092311102a…
1
0
0
0
Zebediah Figura : quartz/filtergraph: Don' t require IAMFilterMiscFlags when performing seek operations.
by Alexandre Julliard
20 May '19
20 May '19
Module: wine Branch: master Commit: 474295e34edc7554bcc0360b4f845e867cad4826 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=474295e34edc7554bcc0360b…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Sat May 18 21:38:50 2019 -0500 quartz/filtergraph: Don't require IAMFilterMiscFlags when performing seek operations. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/quartz/filtergraph.c | 9 ------ dlls/quartz/tests/filtergraph.c | 62 ++++++++++++++++++++--------------------- 2 files changed, 31 insertions(+), 40 deletions(-) diff --git a/dlls/quartz/filtergraph.c b/dlls/quartz/filtergraph.c index 02707b4..60cc368 100644 --- a/dlls/quartz/filtergraph.c +++ b/dlls/quartz/filtergraph.c @@ -2319,15 +2319,6 @@ static HRESULT all_renderers_seek(IFilterGraphImpl *This, fnFoundSeek FoundSeek, LIST_FOR_EACH_ENTRY(filter, &This->filters, struct filter, entry) { IMediaSeeking *seek = NULL; - IAMFilterMiscFlags *flags = NULL; - ULONG filterflags; - IBaseFilter_QueryInterface(filter->filter, &IID_IAMFilterMiscFlags, (void **)&flags); - if (!flags) - continue; - filterflags = IAMFilterMiscFlags_GetMiscFlags(flags); - IAMFilterMiscFlags_Release(flags); - if (filterflags != AM_FILTER_MISC_FLAGS_IS_RENDERER) - continue; IBaseFilter_QueryInterface(filter->filter, &IID_IMediaSeeking, (void **)&seek); if (!seek) diff --git a/dlls/quartz/tests/filtergraph.c b/dlls/quartz/tests/filtergraph.c index f63f738..79841e6 100644 --- a/dlls/quartz/tests/filtergraph.c +++ b/dlls/quartz/tests/filtergraph.c @@ -3448,23 +3448,23 @@ static void test_graph_seeking(void) filter1.seek_caps = AM_SEEKING_CanDoSegments | AM_SEEKING_CanGetCurrentPos; filter2.seek_caps = AM_SEEKING_CanDoSegments | AM_SEEKING_CanGetDuration; hr = IMediaSeeking_GetCapabilities(seeking, &caps); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); - todo_wine ok(caps == AM_SEEKING_CanDoSegments, "Got caps %#x.\n", caps); + ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(caps == AM_SEEKING_CanDoSegments, "Got caps %#x.\n", caps); caps = AM_SEEKING_CanDoSegments | AM_SEEKING_CanGetCurrentPos; hr = IMediaSeeking_CheckCapabilities(seeking, &caps); - todo_wine ok(hr == S_FALSE, "Got hr %#x.\n", hr); - todo_wine ok(caps == AM_SEEKING_CanDoSegments, "Got caps %#x.\n", caps); + ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(caps == AM_SEEKING_CanDoSegments, "Got caps %#x.\n", caps); caps = AM_SEEKING_CanDoSegments; hr = IMediaSeeking_CheckCapabilities(seeking, &caps); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#x.\n", hr); ok(caps == AM_SEEKING_CanDoSegments, "Got caps %#x.\n", caps); caps = AM_SEEKING_CanGetCurrentPos; hr = IMediaSeeking_CheckCapabilities(seeking, &caps); - todo_wine ok(hr == E_FAIL, "Got hr %#x.\n", hr); - todo_wine ok(!caps, "Got caps %#x.\n", caps); + ok(hr == E_FAIL, "Got hr %#x.\n", hr); + ok(!caps, "Got caps %#x.\n", caps); hr = IMediaSeeking_IsFormatSupported(seeking, &testguid); ok(hr == S_FALSE, "Got hr %#x.\n", hr); @@ -3526,25 +3526,25 @@ static void test_graph_seeking(void) filter1.seek_duration = 0x12345; filter2.seek_duration = 0x23456; hr = IMediaSeeking_GetDuration(seeking, &time); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); - todo_wine ok(time == 0x23456, "Got time %s.\n", wine_dbgstr_longlong(time)); + ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(time == 0x23456, "Got time %s.\n", wine_dbgstr_longlong(time)); filter2.seek_duration = 0x12345; filter1.seek_duration = 0x23456; hr = IMediaSeeking_GetDuration(seeking, &time); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); - todo_wine ok(time == 0x23456, "Got time %s.\n", wine_dbgstr_longlong(time)); + ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(time == 0x23456, "Got time %s.\n", wine_dbgstr_longlong(time)); filter1.seek_stop = 0x54321; filter2.seek_stop = 0x65432; hr = IMediaSeeking_GetStopPosition(seeking, &time); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#x.\n", hr); todo_wine ok(time == 0x65432, "Got time %s.\n", wine_dbgstr_longlong(time)); filter2.seek_stop = 0x54321; filter1.seek_stop = 0x65432; hr = IMediaSeeking_GetStopPosition(seeking, &time); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#x.\n", hr); todo_wine ok(time == 0x65432, "Got time %s.\n", wine_dbgstr_longlong(time)); hr = IMediaSeeking_GetCurrentPosition(seeking, &time); @@ -3553,7 +3553,7 @@ static void test_graph_seeking(void) current = stop = 0xdeadbeef; hr = IMediaSeeking_GetPositions(seeking, ¤t, &stop); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#x.\n", hr); ok(!current, "Got time %s.\n", wine_dbgstr_longlong(current)); todo_wine ok(stop == 0x65432, "Got time %s.\n", wine_dbgstr_longlong(stop)); @@ -3561,13 +3561,13 @@ static void test_graph_seeking(void) stop = 0x321; hr = IMediaSeeking_SetPositions(seeking, ¤t, AM_SEEKING_AbsolutePositioning, &stop, AM_SEEKING_AbsolutePositioning); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(current == 0x123, "Got time %s.\n", wine_dbgstr_longlong(current)); - ok(stop == 0x321, "Got time %s.\n", wine_dbgstr_longlong(stop)); + ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(current == 0x123, "Got time %s.\n", wine_dbgstr_longlong(current)); + todo_wine ok(stop == 0x321, "Got time %s.\n", wine_dbgstr_longlong(stop)); todo_wine ok(filter1.seek_current == 0x123, "Got time %s.\n", wine_dbgstr_longlong(filter1.seek_current)); todo_wine ok(filter1.seek_stop == 0x321, "Got time %s.\n", wine_dbgstr_longlong(filter1.seek_stop)); - todo_wine ok(filter2.seek_current == 0x123, "Got time %s.\n", wine_dbgstr_longlong(filter2.seek_current)); - todo_wine ok(filter2.seek_stop == 0x321, "Got time %s.\n", wine_dbgstr_longlong(filter2.seek_stop)); + ok(filter2.seek_current == 0x123, "Got time %s.\n", wine_dbgstr_longlong(filter2.seek_current)); + ok(filter2.seek_stop == 0x321, "Got time %s.\n", wine_dbgstr_longlong(filter2.seek_stop)); hr = IMediaSeeking_GetCurrentPosition(seeking, &time); ok(hr == S_OK, "Got hr %#x.\n", hr); @@ -3583,25 +3583,25 @@ static void test_graph_seeking(void) stop = 0x321; hr = IMediaSeeking_SetPositions(seeking, ¤t, AM_SEEKING_AbsolutePositioning | AM_SEEKING_ReturnTime, &stop, AM_SEEKING_AbsolutePositioning); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); - todo_wine ok(current == 0x1234, "Got time %s.\n", wine_dbgstr_longlong(current)); - ok(stop == 0x321, "Got time %s.\n", wine_dbgstr_longlong(stop)); - todo_wine ok(filter1.seek_current == 0x1234, "Got time %s.\n", wine_dbgstr_longlong(filter1.seek_current)); + ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(current == 0x1234, "Got time %s.\n", wine_dbgstr_longlong(current)); + todo_wine ok(stop == 0x321, "Got time %s.\n", wine_dbgstr_longlong(stop)); + ok(filter1.seek_current == 0x1234, "Got time %s.\n", wine_dbgstr_longlong(filter1.seek_current)); todo_wine ok(filter1.seek_stop == 0x321, "Got time %s.\n", wine_dbgstr_longlong(filter1.seek_stop)); - todo_wine ok(filter2.seek_current == 0x123, "Got time %s.\n", wine_dbgstr_longlong(filter2.seek_current)); - todo_wine ok(filter2.seek_stop == 0x321, "Got time %s.\n", wine_dbgstr_longlong(filter2.seek_stop)); + ok(filter2.seek_current == 0x123, "Got time %s.\n", wine_dbgstr_longlong(filter2.seek_current)); + ok(filter2.seek_stop == 0x321, "Got time %s.\n", wine_dbgstr_longlong(filter2.seek_stop)); current = 0x123; stop = 0x321; hr = IMediaSeeking_SetPositions(seeking, ¤t, AM_SEEKING_AbsolutePositioning, &stop, AM_SEEKING_AbsolutePositioning | AM_SEEKING_ReturnTime); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(current == 0x123, "Got time %s.\n", wine_dbgstr_longlong(current)); - todo_wine ok(stop == 0x4321, "Got time %s.\n", wine_dbgstr_longlong(stop)); + ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(current == 0x123, "Got time %s.\n", wine_dbgstr_longlong(current)); + ok(stop == 0x4321, "Got time %s.\n", wine_dbgstr_longlong(stop)); todo_wine ok(filter1.seek_current == 0x123, "Got time %s.\n", wine_dbgstr_longlong(filter1.seek_current)); - todo_wine ok(filter1.seek_stop == 0x4321, "Got time %s.\n", wine_dbgstr_longlong(filter1.seek_stop)); - todo_wine ok(filter2.seek_current == 0x123, "Got time %s.\n", wine_dbgstr_longlong(filter2.seek_current)); - todo_wine ok(filter2.seek_stop == 0x321, "Got time %s.\n", wine_dbgstr_longlong(filter2.seek_stop)); + ok(filter1.seek_stop == 0x4321, "Got time %s.\n", wine_dbgstr_longlong(filter1.seek_stop)); + ok(filter2.seek_current == 0x123, "Got time %s.\n", wine_dbgstr_longlong(filter2.seek_current)); + ok(filter2.seek_stop == 0x321, "Got time %s.\n", wine_dbgstr_longlong(filter2.seek_stop)); hr = IMediaSeeking_SetRate(seeking, 2.0); ok(hr == S_OK, "Got hr %#x.\n", hr);
1
0
0
0
Zebediah Figura : strmbase/transform: Don' t expose IQualityControl from the filter.
by Alexandre Julliard
20 May '19
20 May '19
Module: wine Branch: master Commit: c1b8ffde91d759bb90d47a4f06cc5e597b772016 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=c1b8ffde91d759bb90d47a4f…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Sat May 18 21:38:49 2019 -0500 strmbase/transform: Don't expose IQualityControl from the filter. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/quartz/tests/acmwrapper.c | 2 +- dlls/quartz/tests/avidec.c | 2 +- dlls/strmbase/transform.c | 22 +--------------------- 3 files changed, 3 insertions(+), 23 deletions(-) diff --git a/dlls/quartz/tests/acmwrapper.c b/dlls/quartz/tests/acmwrapper.c index 08ee40b..357a1ff 100644 --- a/dlls/quartz/tests/acmwrapper.c +++ b/dlls/quartz/tests/acmwrapper.c @@ -76,7 +76,7 @@ static void test_interfaces(void) check_interface(filter, &IID_IMediaPosition, FALSE); check_interface(filter, &IID_IMediaSeeking, FALSE); check_interface(filter, &IID_IPin, FALSE); - todo_wine check_interface(filter, &IID_IQualityControl, FALSE); + check_interface(filter, &IID_IQualityControl, FALSE); check_interface(filter, &IID_IQualProp, FALSE); check_interface(filter, &IID_IReferenceClock, FALSE); check_interface(filter, &IID_IVideoWindow, FALSE); diff --git a/dlls/quartz/tests/avidec.c b/dlls/quartz/tests/avidec.c index 04de373..5406c56 100644 --- a/dlls/quartz/tests/avidec.c +++ b/dlls/quartz/tests/avidec.c @@ -101,7 +101,7 @@ static void test_interfaces(void) check_interface(filter, &IID_IMediaSeeking, FALSE); check_interface(filter, &IID_IPersistPropertyBag, FALSE); check_interface(filter, &IID_IPin, FALSE); - todo_wine check_interface(filter, &IID_IQualityControl, FALSE); + check_interface(filter, &IID_IQualityControl, FALSE); check_interface(filter, &IID_IQualProp, FALSE); check_interface(filter, &IID_IReferenceClock, FALSE); check_interface(filter, &IID_IVideoWindow, FALSE); diff --git a/dlls/strmbase/transform.c b/dlls/strmbase/transform.c index ab502c9..9cb18b2 100644 --- a/dlls/strmbase/transform.c +++ b/dlls/strmbase/transform.c @@ -161,26 +161,6 @@ static const BaseOutputPinFuncTable tf_output_BaseOutputFuncTable = { BaseOutputPinImpl_DecideAllocator, }; -static HRESULT WINAPI TransformFilterImpl_QueryInterface(IBaseFilter * iface, REFIID riid, LPVOID * ppv) -{ - HRESULT hr; - TransformFilter *This = impl_from_IBaseFilter(iface); - TRACE("(%p/%p)->(%s, %p)\n", This, iface, debugstr_guid(riid), ppv); - - if (IsEqualIID(riid, &IID_IQualityControl)) { - *ppv = (IQualityControl*)This->qcimpl; - IUnknown_AddRef((IUnknown*)*ppv); - return S_OK; - } - hr = BaseFilterImpl_QueryInterface(iface, riid, ppv); - - if (FAILED(hr) && !IsEqualIID(riid, &IID_IPin) && !IsEqualIID(riid, &IID_IVideoWindow) && - !IsEqualIID(riid, &IID_IAMFilterMiscFlags)) - FIXME("No interface for %s!\n", debugstr_guid(riid)); - - return hr; -} - static ULONG WINAPI TransformFilterImpl_Release(IBaseFilter * iface) { TransformFilter *This = impl_from_IBaseFilter(iface); @@ -293,7 +273,7 @@ static HRESULT WINAPI TransformFilterImpl_Run(IBaseFilter *iface, REFERENCE_TIME static const IBaseFilterVtbl transform_vtbl = { - TransformFilterImpl_QueryInterface, + BaseFilterImpl_QueryInterface, BaseFilterImpl_AddRef, TransformFilterImpl_Release, BaseFilterImpl_GetClassID,
1
0
0
0
Zebediah Figura : strmbase/transform: Don' t expose IMediaPosition from the filter.
by Alexandre Julliard
20 May '19
20 May '19
Module: wine Branch: master Commit: 2a52c54f432b306060e5e3d6e33907ad0e2b1278 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=2a52c54f432b306060e5e3d6…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Sat May 18 21:38:48 2019 -0500 strmbase/transform: Don't expose IMediaPosition from the filter. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/quartz/tests/acmwrapper.c | 2 +- dlls/quartz/tests/avidec.c | 2 +- dlls/strmbase/transform.c | 4 ---- 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/dlls/quartz/tests/acmwrapper.c b/dlls/quartz/tests/acmwrapper.c index 5acc91e..08ee40b 100644 --- a/dlls/quartz/tests/acmwrapper.c +++ b/dlls/quartz/tests/acmwrapper.c @@ -73,7 +73,7 @@ static void test_interfaces(void) check_interface(filter, &IID_IBasicAudio, FALSE); check_interface(filter, &IID_IBasicVideo, FALSE); check_interface(filter, &IID_IKsPropertySet, FALSE); - todo_wine check_interface(filter, &IID_IMediaPosition, FALSE); + check_interface(filter, &IID_IMediaPosition, FALSE); check_interface(filter, &IID_IMediaSeeking, FALSE); check_interface(filter, &IID_IPin, FALSE); todo_wine check_interface(filter, &IID_IQualityControl, FALSE); diff --git a/dlls/quartz/tests/avidec.c b/dlls/quartz/tests/avidec.c index ffea059..04de373 100644 --- a/dlls/quartz/tests/avidec.c +++ b/dlls/quartz/tests/avidec.c @@ -97,7 +97,7 @@ static void test_interfaces(void) check_interface(filter, &IID_IBasicAudio, FALSE); check_interface(filter, &IID_IBasicVideo, FALSE); check_interface(filter, &IID_IKsPropertySet, FALSE); - todo_wine check_interface(filter, &IID_IMediaPosition, FALSE); + check_interface(filter, &IID_IMediaPosition, FALSE); check_interface(filter, &IID_IMediaSeeking, FALSE); check_interface(filter, &IID_IPersistPropertyBag, FALSE); check_interface(filter, &IID_IPin, FALSE); diff --git a/dlls/strmbase/transform.c b/dlls/strmbase/transform.c index fa9abb0..ab502c9 100644 --- a/dlls/strmbase/transform.c +++ b/dlls/strmbase/transform.c @@ -172,10 +172,6 @@ static HRESULT WINAPI TransformFilterImpl_QueryInterface(IBaseFilter * iface, RE IUnknown_AddRef((IUnknown*)*ppv); return S_OK; } - else if (IsEqualIID(riid, &IID_IMediaPosition)) - { - return IUnknown_QueryInterface(This->seekthru_unk, riid, ppv); - } hr = BaseFilterImpl_QueryInterface(iface, riid, ppv); if (FAILED(hr) && !IsEqualIID(riid, &IID_IPin) && !IsEqualIID(riid, &IID_IVideoWindow) &&
1
0
0
0
Zebediah Figura : strmbase/transform: Don' t expose IMediaSeeking from the filter.
by Alexandre Julliard
20 May '19
20 May '19
Module: wine Branch: master Commit: 25c3bf9c10bf7c4372acb7c55a32bd461b88183f URL:
https://source.winehq.org/git/wine.git/?a=commit;h=25c3bf9c10bf7c4372acb7c5…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Sat May 18 21:38:47 2019 -0500 strmbase/transform: Don't expose IMediaSeeking from the filter. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/quartz/tests/acmwrapper.c | 4 ++-- dlls/quartz/tests/avidec.c | 4 ++-- dlls/strmbase/transform.c | 25 ++++++++++++++++++++++--- 3 files changed, 26 insertions(+), 7 deletions(-) diff --git a/dlls/quartz/tests/acmwrapper.c b/dlls/quartz/tests/acmwrapper.c index a543893..5acc91e 100644 --- a/dlls/quartz/tests/acmwrapper.c +++ b/dlls/quartz/tests/acmwrapper.c @@ -74,7 +74,7 @@ static void test_interfaces(void) check_interface(filter, &IID_IBasicVideo, FALSE); check_interface(filter, &IID_IKsPropertySet, FALSE); todo_wine check_interface(filter, &IID_IMediaPosition, FALSE); - todo_wine check_interface(filter, &IID_IMediaSeeking, FALSE); + check_interface(filter, &IID_IMediaSeeking, FALSE); check_interface(filter, &IID_IPin, FALSE); todo_wine check_interface(filter, &IID_IQualityControl, FALSE); check_interface(filter, &IID_IQualProp, FALSE); @@ -89,7 +89,7 @@ static void test_interfaces(void) check_interface(pin, &IID_IUnknown, TRUE); check_interface(pin, &IID_IMediaPosition, FALSE); - todo_wine check_interface(pin, &IID_IMediaSeeking, FALSE); + check_interface(pin, &IID_IMediaSeeking, FALSE); IPin_Release(pin); diff --git a/dlls/quartz/tests/avidec.c b/dlls/quartz/tests/avidec.c index e897af4..ffea059 100644 --- a/dlls/quartz/tests/avidec.c +++ b/dlls/quartz/tests/avidec.c @@ -98,7 +98,7 @@ static void test_interfaces(void) check_interface(filter, &IID_IBasicVideo, FALSE); check_interface(filter, &IID_IKsPropertySet, FALSE); todo_wine check_interface(filter, &IID_IMediaPosition, FALSE); - todo_wine check_interface(filter, &IID_IMediaSeeking, FALSE); + check_interface(filter, &IID_IMediaSeeking, FALSE); check_interface(filter, &IID_IPersistPropertyBag, FALSE); check_interface(filter, &IID_IPin, FALSE); todo_wine check_interface(filter, &IID_IQualityControl, FALSE); @@ -114,7 +114,7 @@ static void test_interfaces(void) check_interface(pin, &IID_IUnknown, TRUE); check_interface(pin, &IID_IMediaPosition, FALSE); - todo_wine check_interface(pin, &IID_IMediaSeeking, FALSE); + check_interface(pin, &IID_IMediaSeeking, FALSE); IPin_Release(pin); diff --git a/dlls/strmbase/transform.c b/dlls/strmbase/transform.c index df16b67..fa9abb0 100644 --- a/dlls/strmbase/transform.c +++ b/dlls/strmbase/transform.c @@ -172,8 +172,7 @@ static HRESULT WINAPI TransformFilterImpl_QueryInterface(IBaseFilter * iface, RE IUnknown_AddRef((IUnknown*)*ppv); return S_OK; } - else if (IsEqualIID(riid, &IID_IMediaSeeking) || - IsEqualIID(riid, &IID_IMediaPosition)) + else if (IsEqualIID(riid, &IID_IMediaPosition)) { return IUnknown_QueryInterface(This->seekthru_unk, riid, ppv); } @@ -558,9 +557,29 @@ static const IPinVtbl TransformFilter_InputPin_Vtbl = TransformFilter_InputPin_NewSegment }; +static HRESULT WINAPI transform_source_QueryInterface(IPin *iface, REFIID iid, void **out) +{ + TransformFilter *filter = impl_from_IBaseFilter(impl_BaseOutputPin_from_IPin(iface)->pin.pinInfo.pFilter); + if (IsEqualGUID(iid, &IID_IUnknown) || IsEqualGUID(iid, &IID_IPin)) + *out = iface; + else if (IsEqualGUID(iid, &IID_IQualityControl)) + *out = &filter->qcimpl->IQualityControl_iface; + else if (IsEqualGUID(iid, &IID_IMediaSeeking)) + return IUnknown_QueryInterface(filter->seekthru_unk, iid, out); + else + { + WARN("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(iid)); + *out = NULL; + return E_NOINTERFACE; + } + + IUnknown_AddRef((IUnknown *)*out); + return S_OK; +} + static const IPinVtbl TransformFilter_OutputPin_Vtbl = { - BaseOutputPinImpl_QueryInterface, + transform_source_QueryInterface, BasePinImpl_AddRef, BaseOutputPinImpl_Release, BaseOutputPinImpl_Connect,
1
0
0
0
Zebediah Figura : qcap/tests: Add some tests for IMediaSeeking on the AVI mux filter.
by Alexandre Julliard
20 May '19
20 May '19
Module: wine Branch: master Commit: ba8023e925526a0963f232061f6ec3d3081cb036 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=ba8023e925526a0963f23206…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Sat May 18 21:38:46 2019 -0500 qcap/tests: Add some tests for IMediaSeeking on the AVI mux filter. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/qcap/tests/avimux.c | 137 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 137 insertions(+) diff --git a/dlls/qcap/tests/avimux.c b/dlls/qcap/tests/avimux.c index e204ec7..81c82ee 100644 --- a/dlls/qcap/tests/avimux.c +++ b/dlls/qcap/tests/avimux.c @@ -23,6 +23,8 @@ #include "vfw.h" #include "wine/test.h" +static const GUID testguid = {0xfacade}; + static IBaseFilter *create_avi_mux(void) { IBaseFilter *filter = NULL; @@ -76,11 +78,146 @@ static void test_interfaces(void) IBaseFilter_Release(filter); } +static void test_seeking(void) +{ + IBaseFilter *filter = create_avi_mux(); + LONGLONG time, current, stop; + IMediaSeeking *seeking; + unsigned int i; + GUID format; + HRESULT hr; + DWORD caps; + ULONG ref; + + static const struct + { + const GUID *guid; + HRESULT hr; + } + format_tests[] = + { + {&TIME_FORMAT_MEDIA_TIME, S_OK}, + {&TIME_FORMAT_BYTE, S_OK}, + + {&TIME_FORMAT_NONE, S_FALSE}, + {&TIME_FORMAT_FRAME, S_FALSE}, + {&TIME_FORMAT_SAMPLE, S_FALSE}, + {&TIME_FORMAT_FIELD, S_FALSE}, + {&testguid, S_FALSE}, + }; + + IBaseFilter_QueryInterface(filter, &IID_IMediaSeeking, (void **)&seeking); + + hr = IMediaSeeking_GetCapabilities(seeking, &caps); + todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(caps == (AM_SEEKING_CanGetCurrentPos | AM_SEEKING_CanGetDuration), "Got caps %#x.\n", caps); + + caps = AM_SEEKING_CanGetCurrentPos; + hr = IMediaSeeking_CheckCapabilities(seeking, &caps); + todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(caps == AM_SEEKING_CanGetCurrentPos, "Got caps %#x.\n", caps); + + caps = AM_SEEKING_CanDoSegments | AM_SEEKING_CanGetCurrentPos; + hr = IMediaSeeking_CheckCapabilities(seeking, &caps); + todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(caps == AM_SEEKING_CanGetCurrentPos, "Got caps %#x.\n", caps); + + caps = AM_SEEKING_CanDoSegments; + hr = IMediaSeeking_CheckCapabilities(seeking, &caps); + todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(!caps, "Got caps %#x.\n", caps); + + for (i = 0; i < ARRAY_SIZE(format_tests); ++i) + { + hr = IMediaSeeking_IsFormatSupported(seeking, format_tests[i].guid); + todo_wine ok(hr == format_tests[i].hr, "Got hr %#x for format %s.\n", hr, wine_dbgstr_guid(format_tests[i].guid)); + } + + hr = IMediaSeeking_QueryPreferredFormat(seeking, &format); + todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(IsEqualGUID(&format, &TIME_FORMAT_MEDIA_TIME), "Got format %s.\n", wine_dbgstr_guid(&format)); + + hr = IMediaSeeking_GetTimeFormat(seeking, &format); + todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(IsEqualGUID(&format, &TIME_FORMAT_MEDIA_TIME), "Got format %s.\n", wine_dbgstr_guid(&format)); + + hr = IMediaSeeking_IsUsingTimeFormat(seeking, &TIME_FORMAT_MEDIA_TIME); + todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + hr = IMediaSeeking_IsUsingTimeFormat(seeking, &TIME_FORMAT_BYTE); + todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + + hr = IMediaSeeking_SetTimeFormat(seeking, &TIME_FORMAT_SAMPLE); + todo_wine ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + + hr = IMediaSeeking_SetTimeFormat(seeking, &TIME_FORMAT_BYTE); + todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + + hr = IMediaSeeking_QueryPreferredFormat(seeking, &format); + todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(IsEqualGUID(&format, &TIME_FORMAT_MEDIA_TIME), "Got format %s.\n", wine_dbgstr_guid(&format)); + + hr = IMediaSeeking_GetTimeFormat(seeking, &format); + todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(IsEqualGUID(&format, &TIME_FORMAT_BYTE), "Got format %s.\n", wine_dbgstr_guid(&format)); + + hr = IMediaSeeking_IsUsingTimeFormat(seeking, &TIME_FORMAT_MEDIA_TIME); + todo_wine ok(hr == S_FALSE, "Got hr %#x.\n", hr); + hr = IMediaSeeking_IsUsingTimeFormat(seeking, &TIME_FORMAT_BYTE); + todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + + hr = IMediaSeeking_SetTimeFormat(seeking, &TIME_FORMAT_MEDIA_TIME); + todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + + hr = IMediaSeeking_IsUsingTimeFormat(seeking, &TIME_FORMAT_MEDIA_TIME); + todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + hr = IMediaSeeking_IsUsingTimeFormat(seeking, &TIME_FORMAT_BYTE); + todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + + hr = IMediaSeeking_ConvertTimeFormat(seeking, &time, NULL, 0x123456789a, NULL); + ok(hr == E_NOTIMPL, "Got hr %#x.\n", hr); + hr = IMediaSeeking_ConvertTimeFormat(seeking, &time, &TIME_FORMAT_MEDIA_TIME, 0x123456789a, &TIME_FORMAT_BYTE); + ok(hr == E_NOTIMPL, "Got hr %#x.\n", hr); + + current = 0x123; + stop = 0x321; + hr = IMediaSeeking_SetPositions(seeking, ¤t, AM_SEEKING_AbsolutePositioning, + &stop, AM_SEEKING_AbsolutePositioning); + ok(hr == E_NOTIMPL, "Got hr %#x.\n", hr); + hr = IMediaSeeking_SetPositions(seeking, ¤t, AM_SEEKING_NoPositioning, + &stop, AM_SEEKING_NoPositioning); + ok(hr == E_NOTIMPL, "Got hr %#x.\n", hr); + + hr = IMediaSeeking_GetPositions(seeking, NULL, NULL); + ok(hr == E_NOTIMPL, "Got hr %#x.\n", hr); + hr = IMediaSeeking_GetPositions(seeking, NULL, &stop); + ok(hr == E_NOTIMPL, "Got hr %#x.\n", hr); + hr = IMediaSeeking_GetPositions(seeking, ¤t, &stop); + ok(hr == E_NOTIMPL, "Got hr %#x.\n", hr); + hr = IMediaSeeking_GetPositions(seeking, ¤t, NULL); + ok(hr == E_NOTIMPL, "Got hr %#x.\n", hr); + + hr = IMediaSeeking_GetDuration(seeking, &time); + todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(!time, "Got duration %s.\n", wine_dbgstr_longlong(time)); + + hr = IMediaSeeking_GetCurrentPosition(seeking, &time); + todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(!time, "Got duration %s.\n", wine_dbgstr_longlong(time)); + + hr = IMediaSeeking_GetStopPosition(seeking, &time); + ok(hr == E_NOTIMPL, "Got hr %#x.\n", hr); + + IMediaSeeking_Release(seeking); + ref = IBaseFilter_Release(filter); + ok(!ref, "Got unexpected refcount %d.\n", ref); +} + START_TEST(avimux) { CoInitialize(NULL); test_interfaces(); + test_seeking(); CoUninitialize(); }
1
0
0
0
← Newer
1
...
36
37
38
39
40
41
42
...
102
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
Results per page:
10
25
50
100
200