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
July 2020
----- 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
1 participants
826 discussions
Start a n
N
ew thread
Zebediah Figura : wpp: Correct the spelling of "ellipsis".
by Alexandre Julliard
29 Jul '20
29 Jul '20
Module: wine Branch: master Commit: 047827b1c9f92c31350bca6179d2b22093e4721c URL:
https://source.winehq.org/git/wine.git/?a=commit;h=047827b1c9f92c31350bca61…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Tue Jul 28 16:32:19 2020 -0500 wpp: Correct the spelling of "ellipsis". Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- libs/wpp/ppl.l | 2 +- libs/wpp/ppy.y | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libs/wpp/ppl.l b/libs/wpp/ppl.l index a68124355b..566cf2f73f 100644 --- a/libs/wpp/ppl.l +++ b/libs/wpp/ppl.l @@ -522,7 +522,7 @@ void pp_writestring(const char *format, ...) <pp_macro>{ws}+ ; <pp_macro>{cident} ppy_lval.cptr = pp_xstrdup(ppy_text); return tIDENT; <pp_macro>, return ','; -<pp_macro>"..." return tELIPSIS; +<pp_macro>"..." return tELLIPSIS; <pp_macro>(\\\r?)|(\n)|(.)|(\.\.?) ppy_error("Argument identifier expected"); <pp_macro>\\\r?\n newline(0); diff --git a/libs/wpp/ppy.y b/libs/wpp/ppy.y index eb4f15a4b8..a6c0957994 100644 --- a/libs/wpp/ppy.y +++ b/libs/wpp/ppy.y @@ -140,7 +140,7 @@ static int nmacro_args; %token tRCINCLUDE %token tIF tIFDEF tIFNDEF tELSE tELIF tENDIF tDEFINED tNL %token tINCLUDE tLINE tGCCLINE tERROR tWARNING tPRAGMA tPPIDENT -%token tUNDEF tMACROEND tCONCAT tELIPSIS tSTRINGIZE +%token tUNDEF tMACROEND tCONCAT tELLIPSIS tSTRINGIZE %token <cptr> tIDENT tLITERAL tMACRO tDEFINE %token <cptr> tDQSTRING tSQSTRING tIQSTRING %token <uint> tUINT @@ -333,7 +333,7 @@ allmargs: /* Empty */ { $$ = 0; macro_args = NULL; nmacro_args = 0; } ; emargs : margs { $$ = $1; } - | margs ',' tELIPSIS { $$ = add_new_marg(NULL, arg_list); nmacro_args *= -1; } + | margs ',' tELLIPSIS { $$ = add_new_marg(NULL, arg_list); nmacro_args *= -1; } ; margs : margs ',' tIDENT { $$ = add_new_marg($3, arg_single); }
1
0
0
0
Myah Caron : amstream: Implement IMediaStreamFilter::GetStopPosition.
by Alexandre Julliard
29 Jul '20
29 Jul '20
Module: wine Branch: master Commit: fc74e4b3dca5a8d4f22e53025a1f99ef1dff7fe6 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=fc74e4b3dca5a8d4f22e5302…
Author: Myah Caron <qsniyg(a)protonmail.com> Date: Tue Jul 28 16:14:01 2020 -0500 amstream: Implement IMediaStreamFilter::GetStopPosition. Signed-off-by: Myah Caron <qsniyg(a)protonmail.com> Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/amstream/filter.c | 19 +++++- dlls/amstream/tests/amstream.c | 139 ++++++++++++++++++++++++++++++++++++++++- 2 files changed, 154 insertions(+), 4 deletions(-) diff --git a/dlls/amstream/filter.c b/dlls/amstream/filter.c index b99cc4cda0..13fd30c3a5 100644 --- a/dlls/amstream/filter.c +++ b/dlls/amstream/filter.c @@ -795,9 +795,24 @@ static HRESULT WINAPI filter_seeking_GetDuration(IMediaSeeking *iface, LONGLONG static HRESULT WINAPI filter_seeking_GetStopPosition(IMediaSeeking *iface, LONGLONG *stop) { - FIXME("iface %p, stop %p, stub!\n", iface, stop); + struct filter *filter = impl_from_IMediaSeeking(iface); + IMediaSeeking *seeking; + HRESULT hr; - return E_NOTIMPL; + TRACE("filter %p, stop %p.\n", filter, stop); + + EnterCriticalSection(&filter->cs); + + if (!(seeking = get_seeking(filter->seekable_stream))) + { + LeaveCriticalSection(&filter->cs); + return E_NOTIMPL; + } + hr = IMediaSeeking_GetStopPosition(seeking, stop); + IMediaSeeking_Release(seeking); + + LeaveCriticalSection(&filter->cs); + return hr; } static HRESULT WINAPI filter_seeking_GetCurrentPosition(IMediaSeeking *iface, LONGLONG *current) diff --git a/dlls/amstream/tests/amstream.c b/dlls/amstream/tests/amstream.c index 85dcac91ad..c5cdd7aaee 100644 --- a/dlls/amstream/tests/amstream.c +++ b/dlls/amstream/tests/amstream.c @@ -814,6 +814,7 @@ struct testfilter LONGLONG current_position; LONGLONG stop_position; HRESULT get_duration_hr; + HRESULT get_stop_position_hr; HRESULT set_positions_hr; HRESULT init_stream_hr; HRESULT cleanup_stream_hr; @@ -997,8 +998,12 @@ static HRESULT WINAPI testsource_seeking_GetDuration(IMediaSeeking *iface, LONGL static HRESULT WINAPI testsource_seeking_GetStopPosition(IMediaSeeking *iface, LONGLONG *stop) { - ok(0, "Unexpected call.\n"); - return E_NOTIMPL; + struct testfilter *filter = impl_from_IMediaSeeking(iface); + + if (SUCCEEDED(filter->get_stop_position_hr)) + *stop = 0x8000000000000000ULL; + + return filter->get_stop_position_hr; } static HRESULT WINAPI testsource_seeking_GetCurrentPosition(IMediaSeeking *iface, LONGLONG *current) @@ -5307,6 +5312,135 @@ static void test_mediastreamfilter_get_duration(void) ok(!ref, "Got outstanding refcount %d.\n", ref); } +static void test_mediastreamfilter_get_stop_position(void) +{ + IAMMultiMediaStream *mmstream = create_ammultimediastream(); + static const MSPID mspid1 = {0x88888888, 1}; + static const MSPID mspid2 = {0x88888888, 2}; + static const MSPID mspid3 = {0x88888888, 3}; + struct testfilter source1, source2, source3; + IAMMediaStream *stream1, *stream2, *stream3; + IMediaStreamFilter *filter; + IPin *pin1, *pin2, *pin3; + IMediaSeeking *seeking; + IGraphBuilder *graph; + LONGLONG stop; + HRESULT hr; + ULONG ref; + + hr = IAMMultiMediaStream_Initialize(mmstream, STREAMTYPE_READ, 0, NULL); + ok(hr == S_OK, "Got hr %#x.\n", hr); + hr = CoCreateInstance(&CLSID_AMAudioStream, NULL, CLSCTX_INPROC_SERVER, &IID_IAMMediaStream, (void **)&stream1); + ok(hr == S_OK, "Got hr %#x.\n", hr); + hr = CoCreateInstance(&CLSID_AMAudioStream, NULL, CLSCTX_INPROC_SERVER, &IID_IAMMediaStream, (void **)&stream2); + ok(hr == S_OK, "Got hr %#x.\n", hr); + hr = CoCreateInstance(&CLSID_AMAudioStream, NULL, CLSCTX_INPROC_SERVER, &IID_IAMMediaStream, (void **)&stream3); + ok(hr == S_OK, "Got hr %#x.\n", hr); + hr = IAMMediaStream_Initialize(stream1, NULL, 0, &mspid1, STREAMTYPE_READ); + ok(hr == S_OK, "Got hr %#x.\n", hr); + hr = IAMMediaStream_Initialize(stream2, NULL, 0, &mspid2, STREAMTYPE_READ); + ok(hr == S_OK, "Got hr %#x.\n", hr); + hr = IAMMediaStream_Initialize(stream3, NULL, 0, &mspid3, STREAMTYPE_READ); + ok(hr == S_OK, "Got hr %#x.\n", hr); + hr = IAMMultiMediaStream_AddMediaStream(mmstream, (IUnknown *)stream1, &mspid1, 0, NULL); + ok(hr == S_OK, "Got hr %#x.\n", hr); + hr = IAMMultiMediaStream_AddMediaStream(mmstream, (IUnknown *)stream2, &mspid2, 0, NULL); + ok(hr == S_OK, "Got hr %#x.\n", hr); + hr = IAMMultiMediaStream_AddMediaStream(mmstream, (IUnknown *)stream3, &mspid3, 0, NULL); + ok(hr == S_OK, "Got hr %#x.\n", hr); + hr = IAMMediaStream_QueryInterface(stream1, &IID_IPin, (void **)&pin1); + ok(hr == S_OK, "Got hr %#x.\n", hr); + hr = IAMMediaStream_QueryInterface(stream2, &IID_IPin, (void **)&pin2); + ok(hr == S_OK, "Got hr %#x.\n", hr); + hr = IAMMediaStream_QueryInterface(stream3, &IID_IPin, (void **)&pin3); + ok(hr == S_OK, "Got hr %#x.\n", hr); + hr = IAMMultiMediaStream_GetFilter(mmstream, &filter); + ok(hr == S_OK, "Got hr %#x.\n", hr); + hr = IAMMultiMediaStream_GetFilterGraph(mmstream, &graph); + ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(graph != NULL, "Expected non-NULL graph.\n"); + testfilter_init(&source1); + testfilter_init(&source2); + testfilter_init(&source3); + source1.IMediaSeeking_iface.lpVtbl = &testsource_seeking_vtbl; + source2.IMediaSeeking_iface.lpVtbl = &testsource_seeking_vtbl; + source3.IMediaSeeking_iface.lpVtbl = &testsource_seeking_vtbl; + hr = IGraphBuilder_AddFilter(graph, &source1.filter.IBaseFilter_iface, NULL); + ok(hr == S_OK, "Got hr %#x.\n", hr); + hr = IGraphBuilder_AddFilter(graph, &source2.filter.IBaseFilter_iface, NULL); + ok(hr == S_OK, "Got hr %#x.\n", hr); + hr = IGraphBuilder_AddFilter(graph, &source3.filter.IBaseFilter_iface, NULL); + ok(hr == S_OK, "Got hr %#x.\n", hr); + + hr = IGraphBuilder_ConnectDirect(graph, &source2.source.pin.IPin_iface, pin2, &audio_mt); + ok(hr == S_OK, "Got hr %#x.\n", hr); + hr = IGraphBuilder_ConnectDirect(graph, &source3.source.pin.IPin_iface, pin3, &audio_mt); + ok(hr == S_OK, "Got hr %#x.\n", hr); + + hr = IMediaStreamFilter_SupportSeeking(filter, TRUE); + ok(hr == S_OK, "Got hr %#x.\n", hr); + + hr = IGraphBuilder_ConnectDirect(graph, &source1.source.pin.IPin_iface, pin1, &audio_mt); + ok(hr == S_OK, "Got hr %#x.\n", hr); + + hr = IMediaStreamFilter_QueryInterface(filter, &IID_IMediaSeeking, (void **)&seeking); + ok(hr == S_OK, "Got hr %#x.\n", hr); + + stop = 0xdeadbeefdeadbeefULL; + hr = IMediaSeeking_GetStopPosition(seeking, &stop); + ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(stop == 0x8000000000000000ULL, "Got stop position %s.\n", wine_dbgstr_longlong(stop)); + + source2.get_stop_position_hr = E_FAIL; + stop = 0xdeadbeefdeadbeefULL; + hr = IMediaSeeking_GetStopPosition(seeking, &stop); + ok(hr == E_FAIL, "Got hr %#x.\n", hr); + ok(stop == 0xdeadbeefdeadbeefULL, "Got stop position %s.\n", wine_dbgstr_longlong(stop)); + + source2.get_stop_position_hr = E_NOTIMPL; + stop = 0xdeadbeefdeadbeefULL; + hr = IMediaSeeking_GetStopPosition(seeking, &stop); + ok(hr == E_NOTIMPL, "Got hr %#x.\n", hr); + ok(stop == 0xdeadbeefdeadbeefULL, "Got stop position %s.\n", wine_dbgstr_longlong(stop)); + + source2.IMediaSeeking_iface.lpVtbl = NULL; + stop = 0xdeadbeefdeadbeefULL; + hr = IMediaSeeking_GetStopPosition(seeking, &stop); + ok(hr == E_NOTIMPL, "Got hr %#x.\n", hr); + ok(stop == 0xdeadbeefdeadbeefULL, "Got stop position %s.\n", wine_dbgstr_longlong(stop)); + + IGraphBuilder_Disconnect(graph, pin2); + IGraphBuilder_Disconnect(graph, &source2.source.pin.IPin_iface); + + source2.IMediaSeeking_iface.lpVtbl = NULL; + stop = 0xdeadbeefdeadbeefULL; + hr = IMediaSeeking_GetStopPosition(seeking, &stop); + ok(hr == E_NOTIMPL, "Got hr %#x.\n", hr); + ok(stop == 0xdeadbeefdeadbeefULL, "Got stop position %s.\n", wine_dbgstr_longlong(stop)); + + IGraphBuilder_Disconnect(graph, pin2); + IGraphBuilder_Disconnect(graph, &source2.source.pin.IPin_iface); + IGraphBuilder_Disconnect(graph, pin3); + IGraphBuilder_Disconnect(graph, &source3.source.pin.IPin_iface); + + ref = IAMMultiMediaStream_Release(mmstream); + ok(!ref, "Got outstanding refcount %d.\n", ref); + ref = IGraphBuilder_Release(graph); + ok(!ref, "Got outstanding refcount %d.\n", ref); + IMediaSeeking_Release(seeking); + ref = IMediaStreamFilter_Release(filter); + ok(!ref, "Got outstanding refcount %d.\n", ref); + IPin_Release(pin1); + ref = IAMMediaStream_Release(stream1); + ok(!ref, "Got outstanding refcount %d.\n", ref); + IPin_Release(pin2); + ref = IAMMediaStream_Release(stream2); + ok(!ref, "Got outstanding refcount %d.\n", ref); + IPin_Release(pin3); + ref = IAMMediaStream_Release(stream3); + ok(!ref, "Got outstanding refcount %d.\n", ref); +} + static void test_mediastreamfilter_get_current_stream_time(void) { IMediaStreamFilter *filter; @@ -5550,6 +5684,7 @@ START_TEST(amstream) test_mediastreamfilter_support_seeking(); test_mediastreamfilter_set_positions(); test_mediastreamfilter_get_duration(); + test_mediastreamfilter_get_stop_position(); test_mediastreamfilter_get_current_stream_time(); CoUninitialize();
1
0
0
0
Myah Caron : amstream: Implement IAMMultiMediaStream::GetDuration.
by Alexandre Julliard
29 Jul '20
29 Jul '20
Module: wine Branch: master Commit: b0fcdf9405be5edc2c83fe542a5aca4c284d1404 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=b0fcdf9405be5edc2c83fe54…
Author: Myah Caron <qsniyg(a)protonmail.com> Date: Tue Jul 28 16:14:00 2020 -0500 amstream: Implement IAMMultiMediaStream::GetDuration. Signed-off-by: Myah Caron <qsniyg(a)protonmail.com> Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/amstream/multimedia.c | 10 +++--- dlls/amstream/tests/amstream.c | 80 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 86 insertions(+), 4 deletions(-) diff --git a/dlls/amstream/multimedia.c b/dlls/amstream/multimedia.c index 200bd5c4a5..414a903cf2 100644 --- a/dlls/amstream/multimedia.c +++ b/dlls/amstream/multimedia.c @@ -173,13 +173,15 @@ static HRESULT WINAPI multimedia_stream_GetTime(IAMMultiMediaStream *iface, STRE return E_NOTIMPL; } -static HRESULT WINAPI multimedia_stream_GetDuration(IAMMultiMediaStream *iface, STREAM_TIME *pDuration) +static HRESULT WINAPI multimedia_stream_GetDuration(IAMMultiMediaStream *iface, STREAM_TIME *duration) { - struct multimedia_stream *This = impl_from_IAMMultiMediaStream(iface); + struct multimedia_stream *mmstream = impl_from_IAMMultiMediaStream(iface); - FIXME("(%p/%p)->(%p) stub!\n", This, iface, pDuration); + TRACE("mmstream %p, duration %p.\n", mmstream, duration); - return E_NOTIMPL; + if (!mmstream->media_seeking) + return E_NOINTERFACE; + return IMediaSeeking_GetDuration(mmstream->media_seeking, duration); } static HRESULT WINAPI multimedia_stream_Seek(IAMMultiMediaStream *iface, STREAM_TIME seek_time) diff --git a/dlls/amstream/tests/amstream.c b/dlls/amstream/tests/amstream.c index 5402734b3d..85dcac91ad 100644 --- a/dlls/amstream/tests/amstream.c +++ b/dlls/amstream/tests/amstream.c @@ -336,6 +336,85 @@ static void test_openfile(const WCHAR *test_avi_path) ok(!ref, "Got outstanding refcount %d.\n", ref); } +static void test_mmstream_get_duration(const WCHAR *test_avi_path) +{ + IAMMultiMediaStream *mmstream = create_ammultimediastream(); + HRESULT hr, audio_hr; + LONGLONG duration; + ULONG ref; + + duration = 0xdeadbeefdeadbeefULL; + hr = IAMMultiMediaStream_GetDuration(mmstream, &duration); + ok(hr == E_NOINTERFACE, "Got hr %#x.\n", hr); + ok(duration == 0xdeadbeefdeadbeefULL, "Got duration %s.\n", wine_dbgstr_longlong(duration)); + + hr = IAMMultiMediaStream_AddMediaStream(mmstream, NULL, &MSPID_PrimaryVideo, 0, NULL); + ok(hr == S_OK, "Got hr %#x.\n", hr); + + hr = IAMMultiMediaStream_AddMediaStream(mmstream, NULL, &MSPID_PrimaryAudio, AMMSF_ADDDEFAULTRENDERER, NULL); + ok(hr == S_OK || hr == VFW_E_NO_AUDIO_HARDWARE, "Got hr %#x.\n", hr); + audio_hr = hr; + + hr = IAMMultiMediaStream_OpenFile(mmstream, test_avi_path, 0); + ok(hr == S_OK, "Got hr %#x.\n", hr); + + duration = 0xdeadbeefdeadbeefULL; + hr = IAMMultiMediaStream_GetDuration(mmstream, &duration); + if (audio_hr == S_OK) + { + ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(duration == 1000000LL, "Got duration %s.\n", wine_dbgstr_longlong(duration)); + } + else + { + ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(!duration, "Got duration %s.\n", wine_dbgstr_longlong(duration)); + } + + ref = IAMMultiMediaStream_Release(mmstream); + ok(!ref, "Got outstanding refcount %d.\n", ref); + + mmstream = create_ammultimediastream(); + hr = IAMMultiMediaStream_AddMediaStream(mmstream, NULL, &MSPID_PrimaryAudio, 0, NULL); + ok(hr == S_OK, "Got hr %#x.\n", hr); + + duration = 0xdeadbeefdeadbeefULL; + hr = IAMMultiMediaStream_GetDuration(mmstream, &duration); + todo_wine ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(duration == 0, "Got duration %s.\n", wine_dbgstr_longlong(duration)); + + ref = IAMMultiMediaStream_Release(mmstream); + ok(!ref, "Got outstanding refcount %d.\n", ref); + + mmstream = create_ammultimediastream(); + + hr = IAMMultiMediaStream_OpenFile(mmstream, test_avi_path, 0); + todo_wine ok(hr == VFW_E_CANNOT_CONNECT, "Got hr %#x.\n", hr); + + duration = 0xdeadbeefdeadbeefULL; + hr = IAMMultiMediaStream_GetDuration(mmstream, &duration); + todo_wine ok(hr == S_FALSE, "Got hr %#x.\n", hr); + todo_wine ok(duration == 0, "Got duration %s.\n", wine_dbgstr_longlong(duration)); + + ref = IAMMultiMediaStream_Release(mmstream); + ok(!ref, "Got outstanding refcount %d.\n", ref); + + mmstream = create_ammultimediastream(); + hr = IAMMultiMediaStream_AddMediaStream(mmstream, NULL, &MSPID_PrimaryAudio, 0, NULL); + ok(hr == S_OK, "Got hr %#x.\n", hr); + + hr = IAMMultiMediaStream_OpenFile(mmstream, test_avi_path, AMMSF_NORENDER); + ok(hr == S_OK, "Got hr %#x.\n", hr); + + duration = 0xdeadbeefdeadbeefULL; + hr = IAMMultiMediaStream_GetDuration(mmstream, &duration); + todo_wine ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(duration == 0, "Got duration %s.\n", wine_dbgstr_longlong(duration)); + + ref = IAMMultiMediaStream_Release(mmstream); + ok(!ref, "Got outstanding refcount %d.\n", ref); +} + static void test_renderfile(const WCHAR *test_avi_path) { IAMMultiMediaStream *pams; @@ -5432,6 +5511,7 @@ START_TEST(amstream) test_avi_path = load_resource(L"test.avi"); test_openfile(test_avi_path); + test_mmstream_get_duration(test_avi_path); test_renderfile(test_avi_path); unload_resource(test_avi_path);
1
0
0
0
Myah Caron : amstream: Implement IMediaStreamFilter::GetDuration.
by Alexandre Julliard
29 Jul '20
29 Jul '20
Module: wine Branch: master Commit: 17f766a853ede17e3f4365692c593d16c9e657cd URL:
https://source.winehq.org/git/wine.git/?a=commit;h=17f766a853ede17e3f436569…
Author: Myah Caron <qsniyg(a)protonmail.com> Date: Tue Jul 28 16:13:59 2020 -0500 amstream: Implement IMediaStreamFilter::GetDuration. Signed-off-by: Myah Caron <qsniyg(a)protonmail.com> Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/amstream/filter.c | 19 +++++- dlls/amstream/tests/amstream.c | 130 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 147 insertions(+), 2 deletions(-) diff --git a/dlls/amstream/filter.c b/dlls/amstream/filter.c index 0a06e78180..b99cc4cda0 100644 --- a/dlls/amstream/filter.c +++ b/dlls/amstream/filter.c @@ -773,9 +773,24 @@ static HRESULT WINAPI filter_seeking_SetTimeFormat(IMediaSeeking *iface, const G static HRESULT WINAPI filter_seeking_GetDuration(IMediaSeeking *iface, LONGLONG *duration) { - FIXME("iface %p, duration %p, stub!\n", iface, duration); + struct filter *filter = impl_from_IMediaSeeking(iface); + IMediaSeeking *seeking; + HRESULT hr; - return E_NOTIMPL; + TRACE("filter %p, duration %p.\n", filter, duration); + + EnterCriticalSection(&filter->cs); + + if (!(seeking = get_seeking(filter->seekable_stream))) + { + LeaveCriticalSection(&filter->cs); + return E_NOTIMPL; + } + hr = IMediaSeeking_GetDuration(seeking, duration); + IMediaSeeking_Release(seeking); + + LeaveCriticalSection(&filter->cs); + return hr; } static HRESULT WINAPI filter_seeking_GetStopPosition(IMediaSeeking *iface, LONGLONG *stop) diff --git a/dlls/amstream/tests/amstream.c b/dlls/amstream/tests/amstream.c index 68d2b9c18f..5402734b3d 100644 --- a/dlls/amstream/tests/amstream.c +++ b/dlls/amstream/tests/amstream.c @@ -5099,6 +5099,135 @@ static void test_mediastreamfilter_set_positions(void) ok(!ref, "Got outstanding refcount %d.\n", ref); } +static void test_mediastreamfilter_get_duration(void) +{ + IAMMultiMediaStream *mmstream = create_ammultimediastream(); + static const MSPID mspid1 = {0x88888888, 1}; + static const MSPID mspid2 = {0x88888888, 2}; + static const MSPID mspid3 = {0x88888888, 3}; + struct testfilter source1, source2, source3; + IAMMediaStream *stream1, *stream2, *stream3; + IMediaStreamFilter *filter; + IPin *pin1, *pin2, *pin3; + IMediaSeeking *seeking; + IGraphBuilder *graph; + LONGLONG duration; + HRESULT hr; + ULONG ref; + + hr = IAMMultiMediaStream_Initialize(mmstream, STREAMTYPE_READ, 0, NULL); + ok(hr == S_OK, "Got hr %#x.\n", hr); + hr = CoCreateInstance(&CLSID_AMAudioStream, NULL, CLSCTX_INPROC_SERVER, &IID_IAMMediaStream, (void **)&stream1); + ok(hr == S_OK, "Got hr %#x.\n", hr); + hr = CoCreateInstance(&CLSID_AMAudioStream, NULL, CLSCTX_INPROC_SERVER, &IID_IAMMediaStream, (void **)&stream2); + ok(hr == S_OK, "Got hr %#x.\n", hr); + hr = CoCreateInstance(&CLSID_AMAudioStream, NULL, CLSCTX_INPROC_SERVER, &IID_IAMMediaStream, (void **)&stream3); + ok(hr == S_OK, "Got hr %#x.\n", hr); + hr = IAMMediaStream_Initialize(stream1, NULL, 0, &mspid1, STREAMTYPE_READ); + ok(hr == S_OK, "Got hr %#x.\n", hr); + hr = IAMMediaStream_Initialize(stream2, NULL, 0, &mspid2, STREAMTYPE_READ); + ok(hr == S_OK, "Got hr %#x.\n", hr); + hr = IAMMediaStream_Initialize(stream3, NULL, 0, &mspid3, STREAMTYPE_READ); + ok(hr == S_OK, "Got hr %#x.\n", hr); + hr = IAMMultiMediaStream_AddMediaStream(mmstream, (IUnknown *)stream1, &mspid1, 0, NULL); + ok(hr == S_OK, "Got hr %#x.\n", hr); + hr = IAMMultiMediaStream_AddMediaStream(mmstream, (IUnknown *)stream2, &mspid2, 0, NULL); + ok(hr == S_OK, "Got hr %#x.\n", hr); + hr = IAMMultiMediaStream_AddMediaStream(mmstream, (IUnknown *)stream3, &mspid3, 0, NULL); + ok(hr == S_OK, "Got hr %#x.\n", hr); + hr = IAMMediaStream_QueryInterface(stream1, &IID_IPin, (void **)&pin1); + ok(hr == S_OK, "Got hr %#x.\n", hr); + hr = IAMMediaStream_QueryInterface(stream2, &IID_IPin, (void **)&pin2); + ok(hr == S_OK, "Got hr %#x.\n", hr); + hr = IAMMediaStream_QueryInterface(stream3, &IID_IPin, (void **)&pin3); + ok(hr == S_OK, "Got hr %#x.\n", hr); + hr = IAMMultiMediaStream_GetFilter(mmstream, &filter); + ok(hr == S_OK, "Got hr %#x.\n", hr); + hr = IAMMultiMediaStream_GetFilterGraph(mmstream, &graph); + ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(graph != NULL, "Expected non-NULL graph.\n"); + testfilter_init(&source1); + testfilter_init(&source2); + testfilter_init(&source3); + source1.IMediaSeeking_iface.lpVtbl = &testsource_seeking_vtbl; + source2.IMediaSeeking_iface.lpVtbl = &testsource_seeking_vtbl; + source3.IMediaSeeking_iface.lpVtbl = &testsource_seeking_vtbl; + hr = IGraphBuilder_AddFilter(graph, &source1.filter.IBaseFilter_iface, NULL); + ok(hr == S_OK, "Got hr %#x.\n", hr); + hr = IGraphBuilder_AddFilter(graph, &source2.filter.IBaseFilter_iface, NULL); + ok(hr == S_OK, "Got hr %#x.\n", hr); + hr = IGraphBuilder_AddFilter(graph, &source3.filter.IBaseFilter_iface, NULL); + ok(hr == S_OK, "Got hr %#x.\n", hr); + + hr = IGraphBuilder_ConnectDirect(graph, &source2.source.pin.IPin_iface, pin2, &audio_mt); + ok(hr == S_OK, "Got hr %#x.\n", hr); + hr = IGraphBuilder_ConnectDirect(graph, &source3.source.pin.IPin_iface, pin3, &audio_mt); + ok(hr == S_OK, "Got hr %#x.\n", hr); + + hr = IMediaStreamFilter_SupportSeeking(filter, TRUE); + ok(hr == S_OK, "Got hr %#x.\n", hr); + + hr = IGraphBuilder_ConnectDirect(graph, &source1.source.pin.IPin_iface, pin1, &audio_mt); + ok(hr == S_OK, "Got hr %#x.\n", hr); + + hr = IMediaStreamFilter_QueryInterface(filter, &IID_IMediaSeeking, (void **)&seeking); + ok(hr == S_OK, "Got hr %#x.\n", hr); + + duration = 0xdeadbeefdeadbeefULL; + hr = IMediaSeeking_GetDuration(seeking, &duration); + ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(duration == 0x8000000000000000ULL, "Got duration %s.\n", wine_dbgstr_longlong(duration)); + + source2.get_duration_hr = E_FAIL; + duration = 0xdeadbeefdeadbeefULL; + hr = IMediaSeeking_GetDuration(seeking, &duration); + ok(hr == E_FAIL, "Got hr %#x.\n", hr); + ok(duration == 0xdeadbeefdeadbeefULL, "Got duration %s.\n", wine_dbgstr_longlong(duration)); + + source2.get_duration_hr = E_NOTIMPL; + duration = 0xdeadbeefdeadbeefULL; + hr = IMediaSeeking_GetDuration(seeking, &duration); + ok(hr == E_NOTIMPL, "Got hr %#x.\n", hr); + ok(duration == 0xdeadbeefdeadbeefULL, "Got duration %s.\n", wine_dbgstr_longlong(duration)); + + source2.IMediaSeeking_iface.lpVtbl = NULL; + duration = 0xdeadbeefdeadbeefULL; + hr = IMediaSeeking_GetDuration(seeking, &duration); + ok(hr == E_NOTIMPL, "Got hr %#x.\n", hr); + ok(duration == 0xdeadbeefdeadbeefULL, "Got duration %s.\n", wine_dbgstr_longlong(duration)); + + IGraphBuilder_Disconnect(graph, pin2); + IGraphBuilder_Disconnect(graph, &source2.source.pin.IPin_iface); + + source2.IMediaSeeking_iface.lpVtbl = NULL; + duration = 0xdeadbeefdeadbeefULL; + hr = IMediaSeeking_GetDuration(seeking, &duration); + ok(hr == E_NOTIMPL, "Got hr %#x.\n", hr); + ok(duration == 0xdeadbeefdeadbeefULL, "Got duration %s.\n", wine_dbgstr_longlong(duration)); + + IGraphBuilder_Disconnect(graph, pin2); + IGraphBuilder_Disconnect(graph, &source2.source.pin.IPin_iface); + IGraphBuilder_Disconnect(graph, pin3); + IGraphBuilder_Disconnect(graph, &source3.source.pin.IPin_iface); + + ref = IAMMultiMediaStream_Release(mmstream); + ok(!ref, "Got outstanding refcount %d.\n", ref); + ref = IGraphBuilder_Release(graph); + ok(!ref, "Got outstanding refcount %d.\n", ref); + IMediaSeeking_Release(seeking); + ref = IMediaStreamFilter_Release(filter); + ok(!ref, "Got outstanding refcount %d.\n", ref); + IPin_Release(pin1); + ref = IAMMediaStream_Release(stream1); + ok(!ref, "Got outstanding refcount %d.\n", ref); + IPin_Release(pin2); + ref = IAMMediaStream_Release(stream2); + ok(!ref, "Got outstanding refcount %d.\n", ref); + IPin_Release(pin3); + ref = IAMMediaStream_Release(stream3); + ok(!ref, "Got outstanding refcount %d.\n", ref); +} + static void test_mediastreamfilter_get_current_stream_time(void) { IMediaStreamFilter *filter; @@ -5340,6 +5469,7 @@ START_TEST(amstream) test_mediastreamfilter_stop_pause_run(); test_mediastreamfilter_support_seeking(); test_mediastreamfilter_set_positions(); + test_mediastreamfilter_get_duration(); test_mediastreamfilter_get_current_stream_time(); CoUninitialize();
1
0
0
0
Myah Caron : include: Add IShellLinkDual interface.
by Alexandre Julliard
28 Jul '20
28 Jul '20
Module: wine Branch: master Commit: 6d66efa3fee7f529bba6c478e71d54e0d66995f5 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=6d66efa3fee7f529bba6c478…
Author: Myah Caron <qsniyg(a)protonmail.com> Date: Mon Jul 27 07:30:25 2020 +0000 include: Add IShellLinkDual interface. Signed-off-by: Myah Caron <qsniyg(a)protonmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- include/shldisp.idl | 76 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) diff --git a/include/shldisp.idl b/include/shldisp.idl index 19f2d73ed0..9032b94ea0 100644 --- a/include/shldisp.idl +++ b/include/shldisp.idl @@ -738,6 +738,82 @@ coclass ShellFolderView [default, source] dispinterface DShellFolderViewEvents; } +/***************************************************************************** + * IShellLinkDual interface + */ +[ + uuid (88a05c00-f000-11ce-8350-444553540000), + oleautomation, + dual, + hidden + ] +interface IShellLinkDual : IDispatch { + [propget] + HRESULT Path ([out, retval] BSTR *pbs); + + [propput] + HRESULT Path ([in] BSTR bs); + + [propget] + HRESULT Description ([out, retval] BSTR *pbs); + + [propput] + HRESULT Description ([in] BSTR bs); + + [propget] + HRESULT WorkingDirectory ([out, retval] BSTR *pbs); + + [propput] + HRESULT WorkingDirectory ([in] BSTR bs); + + [propget] + HRESULT Arguments ([out, retval] BSTR *pbs); + + [propput] + HRESULT Arguments ([in] BSTR bs); + + [propget] + HRESULT Hotkey ([out, retval] int *piHK); + + [propput] + HRESULT Hotkey ([in] int iHK); + + [propget] + HRESULT ShowCommand ([out, retval] int *piShowCommand); + + [propput] + HRESULT ShowCommand ([in] int iShowCommand); + + HRESULT Resolve ([in] int fFlags); + + HRESULT GetIconLocation ([out] BSTR *pbs, + [out, retval] int *piIcon); + + HRESULT SetIconLocation ([in] BSTR bs, + [in] int iIcon); + + HRESULT Save ([in, optional] VARIANT vWhere); +} + +[ + uuid (317ee249-f12e-11d2-b1e4-00c04f8eeb3e), + oleautomation, + dual, + hidden +] +interface IShellLinkDual2 : IShellLinkDual { + [propget] + HRESULT Target ([out, retval] FolderItem **ppfi); +} + +[ + uuid (11219420-1768-11d1-95be-00609797ea4f), + noncreatable +] +coclass ShellLinkObject { + [default] interface IShellLinkDual2; +} + } /* library Shell32 */ /*****************************************************************************
1
0
0
0
Jacek Caban : kernel32/tests: Add more console output reading tests.
by Alexandre Julliard
28 Jul '20
28 Jul '20
Module: wine Branch: master Commit: 1e5cd8fadcb80b68391de6589304d9f2654dbdd8 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=1e5cd8fadcb80b68391de658…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Jul 28 17:11:19 2020 +0200 kernel32/tests: Add more console output reading tests. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/kernel32/tests/console.c | 176 +++++++++++++++++++++++++++++++++++++++++- dlls/kernelbase/console.c | 2 + 2 files changed, 175 insertions(+), 3 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=1e5cd8fadcb80b68391d…
1
0
0
0
Jacek Caban : server: Remove no longer used read_console_output request.
by Alexandre Julliard
28 Jul '20
28 Jul '20
Module: wine Branch: master Commit: f6fb372a045256d84d6e18d4757b9f59e209cf0e URL:
https://source.winehq.org/git/wine.git/?a=commit;h=f6fb372a045256d84d6e18d4…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Jul 28 17:11:09 2020 +0200 server: Remove no longer used read_console_output request. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- include/wine/server_protocol.h | 24 +------------- server/console.c | 73 ------------------------------------------ server/protocol.def | 14 -------- server/request.h | 11 ------- server/trace.c | 19 ----------- 5 files changed, 1 insertion(+), 140 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=f6fb372a045256d84d6e…
1
0
0
0
Jacek Caban : kernelbase: Use IOCTL_CONDRV_READ_OUTPUT in ReadConsoleOutputW.
by Alexandre Julliard
28 Jul '20
28 Jul '20
Module: wine Branch: master Commit: f8fa6fd68608b53def2c34a489b5af2416f47cd7 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=f8fa6fd68608b53def2c34a4…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Jul 28 17:10:56 2020 +0200 kernelbase: Use IOCTL_CONDRV_READ_OUTPUT in ReadConsoleOutputW. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/kernelbase/console.c | 59 ++++++++++++++++++++++++++++------------------- 1 file changed, 35 insertions(+), 24 deletions(-) diff --git a/dlls/kernelbase/console.c b/dlls/kernelbase/console.c index a4b9b8c491..b97cf140d6 100644 --- a/dlls/kernelbase/console.c +++ b/dlls/kernelbase/console.c @@ -894,37 +894,48 @@ BOOL WINAPI DECLSPEC_HOTPATCH ReadConsoleOutputA( HANDLE handle, CHAR_INFO *buff BOOL WINAPI DECLSPEC_HOTPATCH ReadConsoleOutputW( HANDLE handle, CHAR_INFO *buffer, COORD size, COORD coord, SMALL_RECT *region ) { - int width, height, y; - BOOL ret = TRUE; + struct condrv_output_params params; + unsigned int width, height, y; + SMALL_RECT *result; + DWORD count; + BOOL ret; + if (region->Left > region->Right || region->Top > region->Bottom) + { + SetLastError( ERROR_NOT_ENOUGH_MEMORY ); + return FALSE; + } + if (size.X <= coord.X || size.Y <= coord.Y) + { + region->Right = region->Left - 1; + region->Bottom = region->Top - 1; + SetLastError( ERROR_INVALID_FUNCTION ); + return FALSE; + } width = min( region->Right - region->Left + 1, size.X - coord.X ); height = min( region->Bottom - region->Top + 1, size.Y - coord.Y ); - if (width > 0 && height > 0) + count = sizeof(*result) + width * height * sizeof(*buffer); + if (!(result = HeapAlloc( GetProcessHeap(), 0, count ))) { + SetLastError( ERROR_NOT_ENOUGH_MEMORY ); + return FALSE; + } + + params.mode = CHAR_INFO_MODE_TEXTATTR; + params.x = region->Left; + params.y = region->Top; + params.width = width; + if ((ret = console_ioctl( handle, IOCTL_CONDRV_READ_OUTPUT, ¶ms, sizeof(params), result, count, &count )) && count) + { + CHAR_INFO *char_info = (CHAR_INFO *)(result + 1); + *region = *result; + width = region->Right - region->Left + 1; + height = region->Bottom - region->Top + 1; for (y = 0; y < height; y++) - { - SERVER_START_REQ( read_console_output ) - { - req->handle = console_handle_unmap( handle ); - req->x = region->Left; - req->y = region->Top + y; - req->mode = CHAR_INFO_MODE_TEXTATTR; - req->wrap = FALSE; - wine_server_set_reply( req, &buffer[(y+coord.Y) * size.X + coord.X], - width * sizeof(CHAR_INFO) ); - if ((ret = !wine_server_call_err( req ))) - { - width = min( width, reply->width - region->Left ); - height = min( height, reply->height - region->Top ); - } - } - SERVER_END_REQ; - if (!ret) break; - } + memcpy( &buffer[(y + coord.Y) * size.X + coord.X], &char_info[y * width], width * sizeof(*buffer) ); } - region->Bottom = region->Top + height - 1; - region->Right = region->Left + width - 1; + HeapFree( GetProcessHeap(), 0, result ); return ret; }
1
0
0
0
Jacek Caban : kernelbase: Use IOCTL_CONDRV_READ_OUTPUT in ReadConsoleOutputAttribute.
by Alexandre Julliard
28 Jul '20
28 Jul '20
Module: wine Branch: master Commit: 5f6bb63800c14a46a4124c5a5e42094cae3a38fc URL:
https://source.winehq.org/git/wine.git/?a=commit;h=5f6bb63800c14a46a4124c5a…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Jul 28 17:10:40 2020 +0200 kernelbase: Use IOCTL_CONDRV_READ_OUTPUT in ReadConsoleOutputAttribute. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/kernelbase/console.c | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/dlls/kernelbase/console.c b/dlls/kernelbase/console.c index 63e9b20292..a4b9b8c491 100644 --- a/dlls/kernelbase/console.c +++ b/dlls/kernelbase/console.c @@ -786,6 +786,7 @@ BOOL WINAPI DECLSPEC_HOTPATCH PeekConsoleInputW( HANDLE handle, INPUT_RECORD *bu BOOL WINAPI DECLSPEC_HOTPATCH ReadConsoleOutputAttribute( HANDLE handle, WORD *attr, DWORD length, COORD coord, DWORD *count ) { + struct condrv_output_params params; BOOL ret; TRACE( "(%p,%p,%d,%dx%d,%p)\n", handle, attr, length, coord.X, coord.Y, count ); @@ -796,18 +797,13 @@ BOOL WINAPI DECLSPEC_HOTPATCH ReadConsoleOutputAttribute( HANDLE handle, WORD *a return FALSE; } - *count = 0; - SERVER_START_REQ( read_console_output ) - { - req->handle = console_handle_unmap( handle ); - req->x = coord.X; - req->y = coord.Y; - req->mode = CHAR_INFO_MODE_ATTR; - req->wrap = TRUE; - wine_server_set_reply( req, attr, length * sizeof(WORD) ); - if ((ret = !wine_server_call_err( req ))) *count = wine_server_reply_size(reply) / sizeof(WORD); - } - SERVER_END_REQ; + params.mode = CHAR_INFO_MODE_ATTR; + params.x = coord.X; + params.y = coord.Y; + params.width = 0; + ret = console_ioctl( handle, IOCTL_CONDRV_READ_OUTPUT, ¶ms, sizeof(params), + attr, length * sizeof(*attr), count ); + *count /= sizeof(*attr); return ret; }
1
0
0
0
Jacek Caban : kernelbase: Use IOCTL_CONDRV_READ_OUTPUT in ReadConsoleOutputCharacterW.
by Alexandre Julliard
28 Jul '20
28 Jul '20
Module: wine Branch: master Commit: 300a01f467e84bb69bf6387e52545ddbc9c456dc URL:
https://source.winehq.org/git/wine.git/?a=commit;h=300a01f467e84bb69bf6387e…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Jul 28 17:10:32 2020 +0200 kernelbase: Use IOCTL_CONDRV_READ_OUTPUT in ReadConsoleOutputCharacterW. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/kernelbase/console.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/dlls/kernelbase/console.c b/dlls/kernelbase/console.c index 23f0696124..63e9b20292 100644 --- a/dlls/kernelbase/console.c +++ b/dlls/kernelbase/console.c @@ -99,6 +99,7 @@ static BOOL console_ioctl( HANDLE handle, DWORD code, void *in_buff, DWORD in_co status = STATUS_INVALID_HANDLE; break; } + if (read) *read = 0; return set_ntstatus( status ); } @@ -849,6 +850,7 @@ BOOL WINAPI DECLSPEC_HOTPATCH ReadConsoleOutputCharacterA( HANDLE handle, LPSTR BOOL WINAPI DECLSPEC_HOTPATCH ReadConsoleOutputCharacterW( HANDLE handle, LPWSTR buffer, DWORD length, COORD coord, DWORD *count ) { + struct condrv_output_params params; BOOL ret; TRACE( "(%p,%p,%d,%dx%d,%p)\n", handle, buffer, length, coord.X, coord.Y, count ); @@ -859,18 +861,13 @@ BOOL WINAPI DECLSPEC_HOTPATCH ReadConsoleOutputCharacterW( HANDLE handle, LPWSTR return FALSE; } - *count = 0; - SERVER_START_REQ( read_console_output ) - { - req->handle = console_handle_unmap( handle ); - req->x = coord.X; - req->y = coord.Y; - req->mode = CHAR_INFO_MODE_TEXT; - req->wrap = TRUE; - wine_server_set_reply( req, buffer, length * sizeof(WCHAR) ); - if ((ret = !wine_server_call_err( req ))) *count = wine_server_reply_size(reply) / sizeof(WCHAR); - } - SERVER_END_REQ; + params.mode = CHAR_INFO_MODE_TEXT; + params.x = coord.X; + params.y = coord.Y; + params.width = 0; + ret = console_ioctl( handle, IOCTL_CONDRV_READ_OUTPUT, ¶ms, sizeof(params), buffer, + length * sizeof(*buffer), count ); + *count /= sizeof(*buffer); return ret; }
1
0
0
0
← Newer
1
2
3
4
5
6
7
8
9
...
83
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
Results per page:
10
25
50
100
200