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
September 2022
----- 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
553 discussions
Start a n
N
ew thread
Rémi Bernon : mf/tests: Factor IMFTransform_Get(Input|Output)StreamInfo checks together.
by Alexandre Julliard
29 Sep '22
29 Sep '22
Module: wine Branch: master Commit: 566314689047e02a7634fcb1da2c4b9058074e88 URL:
https://gitlab.winehq.org/wine/wine/-/commit/566314689047e02a7634fcb1da2c4b…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Sat Sep 17 17:44:15 2022 +0200 mf/tests: Factor IMFTransform_Get(Input|Output)StreamInfo checks together. --- dlls/mf/tests/transform.c | 538 +++++++++++++++++++--------------------------- 1 file changed, 226 insertions(+), 312 deletions(-)
1
0
0
0
Rémi Bernon : winegstreamer: Stop requiring input type in H264 decoder GetInputStreamInfo.
by Alexandre Julliard
29 Sep '22
29 Sep '22
Module: wine Branch: master Commit: 1f5ab7cab88beb0749f214d17dad4d437283e10a URL:
https://gitlab.winehq.org/wine/wine/-/commit/1f5ab7cab88beb0749f214d17dad4d…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Mon Sep 26 11:58:13 2022 +0200 winegstreamer: Stop requiring input type in H264 decoder GetInputStreamInfo. --- dlls/mf/tests/transform.c | 3 --- dlls/winegstreamer/h264_decoder.c | 6 ------ 2 files changed, 9 deletions(-) diff --git a/dlls/mf/tests/transform.c b/dlls/mf/tests/transform.c index 21f7b44cdde..488f8227fd4 100644 --- a/dlls/mf/tests/transform.c +++ b/dlls/mf/tests/transform.c @@ -2816,12 +2816,9 @@ static void test_h264_decoder(void) flags = MFT_INPUT_STREAM_WHOLE_SAMPLES | MFT_INPUT_STREAM_SINGLE_SAMPLE_PER_BUFFER | MFT_INPUT_STREAM_FIXED_SAMPLE_SIZE; memset(&input_info, 0xcd, sizeof(input_info)); hr = IMFTransform_GetInputStreamInfo(transform, 0, &input_info); - todo_wine ok(hr == S_OK, "GetInputStreamInfo returned %#lx\n", hr); ok(input_info.hnsMaxLatency == 0, "got hnsMaxLatency %s\n", wine_dbgstr_longlong(input_info.hnsMaxLatency)); - todo_wine ok(input_info.dwFlags == flags, "got dwFlags %#lx\n", input_info.dwFlags); - todo_wine ok(input_info.cbSize == 0x1000, "got cbSize %lu\n", input_info.cbSize); ok(input_info.cbMaxLookahead == 0, "got cbMaxLookahead %#lx\n", input_info.cbMaxLookahead); ok(input_info.cbAlignment == 0, "got cbAlignment %#lx\n", input_info.cbAlignment); diff --git a/dlls/winegstreamer/h264_decoder.c b/dlls/winegstreamer/h264_decoder.c index aaed3213633..7e722de4c88 100644 --- a/dlls/winegstreamer/h264_decoder.c +++ b/dlls/winegstreamer/h264_decoder.c @@ -288,12 +288,6 @@ static HRESULT WINAPI transform_GetInputStreamInfo(IMFTransform *iface, DWORD id TRACE("iface %p, id %#lx, info %p.\n", iface, id, info); - if (!decoder->input_type) - { - memset(info, 0, sizeof(*info)); - return MF_E_TRANSFORM_TYPE_NOT_SET; - } - *info = decoder->input_info; return S_OK; }
1
0
0
0
Rémi Bernon : winegstreamer: Keep input / output stream info in struct h264_decoder.
by Alexandre Julliard
29 Sep '22
29 Sep '22
Module: wine Branch: master Commit: eaee9b5bef5982b99d57b03a2c48adc2aa7c8c02 URL:
https://gitlab.winehq.org/wine/wine/-/commit/eaee9b5bef5982b99d57b03a2c48ad…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Mon Sep 26 11:43:57 2022 +0200 winegstreamer: Keep input / output stream info in struct h264_decoder. And calculate the sizes when media type is successfully changed. --- dlls/mf/tests/transform.c | 5 ----- dlls/winegstreamer/h264_decoder.c | 35 +++++++++++++++++++++-------------- 2 files changed, 21 insertions(+), 19 deletions(-) diff --git a/dlls/mf/tests/transform.c b/dlls/mf/tests/transform.c index 8845df2eb12..21f7b44cdde 100644 --- a/dlls/mf/tests/transform.c +++ b/dlls/mf/tests/transform.c @@ -2818,15 +2818,12 @@ static void test_h264_decoder(void) hr = IMFTransform_GetInputStreamInfo(transform, 0, &input_info); todo_wine ok(hr == S_OK, "GetInputStreamInfo returned %#lx\n", hr); - todo_wine ok(input_info.hnsMaxLatency == 0, "got hnsMaxLatency %s\n", wine_dbgstr_longlong(input_info.hnsMaxLatency)); todo_wine ok(input_info.dwFlags == flags, "got dwFlags %#lx\n", input_info.dwFlags); todo_wine ok(input_info.cbSize == 0x1000, "got cbSize %lu\n", input_info.cbSize); - todo_wine ok(input_info.cbMaxLookahead == 0, "got cbMaxLookahead %#lx\n", input_info.cbMaxLookahead); - todo_wine ok(input_info.cbAlignment == 0, "got cbAlignment %#lx\n", input_info.cbAlignment); flags = MFT_OUTPUT_STREAM_WHOLE_SAMPLES | MFT_OUTPUT_STREAM_SINGLE_SAMPLE_PER_BUFFER | MFT_OUTPUT_STREAM_FIXED_SAMPLE_SIZE; @@ -2865,7 +2862,6 @@ static void test_h264_decoder(void) hr = IMFTransform_GetOutputStreamInfo(transform, 0, &output_info); ok(hr == S_OK, "GetOutputStreamInfo returned %#lx\n", hr); ok(output_info.dwFlags == flags, "got dwFlags %#lx\n", output_info.dwFlags); - todo_wine ok(output_info.cbSize == input_width * input_height * 2, "got cbSize %#lx\n", output_info.cbSize); ok(output_info.cbAlignment == 0, "got cbAlignment %#lx\n", output_info.cbAlignment); @@ -2930,7 +2926,6 @@ static void test_h264_decoder(void) hr = IMFTransform_GetOutputStreamInfo(transform, 0, &output_info); ok(hr == S_OK, "GetOutputStreamInfo returned %#lx\n", hr); ok(output_info.dwFlags == flags, "got dwFlags %#lx\n", output_info.dwFlags); - todo_wine ok(output_info.cbSize == input_width * input_height * 2, "got cbSize %#lx\n", output_info.cbSize); ok(output_info.cbAlignment == 0, "got cbAlignment %#lx\n", output_info.cbAlignment); diff --git a/dlls/winegstreamer/h264_decoder.c b/dlls/winegstreamer/h264_decoder.c index 12031588365..aaed3213633 100644 --- a/dlls/winegstreamer/h264_decoder.c +++ b/dlls/winegstreamer/h264_decoder.c @@ -29,6 +29,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(mfplat); WINE_DECLARE_DEBUG_CHANNEL(winediag); +#define ALIGN_SIZE(size, alignment) (((size) + (alignment)) & ~((alignment))) + static const GUID *const h264_decoder_input_types[] = { &MFVideoFormat_H264, @@ -50,8 +52,11 @@ struct h264_decoder IMFAttributes *attributes; IMFAttributes *output_attributes; + IMFMediaType *input_type; + MFT_INPUT_STREAM_INFO input_info; IMFMediaType *output_type; + MFT_OUTPUT_STREAM_INFO output_info; struct wg_format wg_format; struct wg_transform *wg_transform; @@ -284,31 +289,22 @@ static HRESULT WINAPI transform_GetInputStreamInfo(IMFTransform *iface, DWORD id TRACE("iface %p, id %#lx, info %p.\n", iface, id, info); if (!decoder->input_type) + { + memset(info, 0, sizeof(*info)); return MF_E_TRANSFORM_TYPE_NOT_SET; + } - info->hnsMaxLatency = 0; - info->dwFlags = MFT_INPUT_STREAM_WHOLE_SAMPLES | MFT_INPUT_STREAM_SINGLE_SAMPLE_PER_BUFFER | MFT_INPUT_STREAM_FIXED_SAMPLE_SIZE; - info->cbSize = 0x1000; - info->cbMaxLookahead = 0; - info->cbAlignment = 0; - + *info = decoder->input_info; return S_OK; } static HRESULT WINAPI transform_GetOutputStreamInfo(IMFTransform *iface, DWORD id, MFT_OUTPUT_STREAM_INFO *info) { struct h264_decoder *decoder = impl_from_IMFTransform(iface); - UINT32 actual_width, actual_height; TRACE("iface %p, id %#lx, info %p.\n", iface, id, info); - actual_width = (decoder->wg_format.u.video.width + 15) & ~15; - actual_height = (decoder->wg_format.u.video.height + 15) & ~15; - - info->dwFlags = MFT_OUTPUT_STREAM_WHOLE_SAMPLES | MFT_OUTPUT_STREAM_SINGLE_SAMPLE_PER_BUFFER | MFT_OUTPUT_STREAM_FIXED_SAMPLE_SIZE; - info->cbSize = actual_width * actual_height * 2; - info->cbAlignment = 0; - + *info = decoder->output_info; return S_OK; } @@ -460,6 +456,8 @@ static HRESULT WINAPI transform_SetInputType(IMFTransform *iface, DWORD id, IMFM { decoder->wg_format.u.video.width = frame_size >> 32; decoder->wg_format.u.video.height = (UINT32)frame_size; + decoder->output_info.cbSize = decoder->wg_format.u.video.width + * decoder->wg_format.u.video.height * 2; } return S_OK; @@ -643,6 +641,8 @@ static HRESULT WINAPI transform_ProcessOutput(IMFTransform *iface, DWORD flags, if (hr == MF_E_TRANSFORM_STREAM_CHANGE) { decoder->wg_format = wg_format; + decoder->output_info.cbSize = ALIGN_SIZE(decoder->wg_format.u.video.width, 0xf) + * ALIGN_SIZE(decoder->wg_format.u.video.height, 0xf) * 2; /* keep the frame rate that was requested, GStreamer doesn't provide any */ if (SUCCEEDED(IMFMediaType_GetUINT64(decoder->output_type, &MF_MT_FRAME_RATE, &frame_rate))) @@ -725,6 +725,13 @@ HRESULT h264_decoder_create(REFIID riid, void **ret) decoder->wg_format.u.video.fps_n = 30000; decoder->wg_format.u.video.fps_d = 1001; + decoder->input_info.dwFlags = MFT_INPUT_STREAM_WHOLE_SAMPLES | MFT_INPUT_STREAM_SINGLE_SAMPLE_PER_BUFFER + | MFT_INPUT_STREAM_FIXED_SAMPLE_SIZE; + decoder->input_info.cbSize = 0x1000; + decoder->output_info.dwFlags = MFT_OUTPUT_STREAM_WHOLE_SAMPLES | MFT_OUTPUT_STREAM_SINGLE_SAMPLE_PER_BUFFER + | MFT_OUTPUT_STREAM_FIXED_SAMPLE_SIZE; + decoder->output_info.cbSize = 1920 * 1088 * 2; + if (FAILED(hr = MFCreateAttributes(&decoder->attributes, 16))) goto failed; if (FAILED(hr = IMFAttributes_SetUINT32(decoder->attributes, &MF_LOW_LATENCY, 0)))
1
0
0
0
Rémi Bernon : winegstreamer: Keep input / output stream info in struct wma_decoder.
by Alexandre Julliard
29 Sep '22
29 Sep '22
Module: wine Branch: master Commit: 72d18a48228d35163c6d32ad04c52ac70d7615b6 URL:
https://gitlab.winehq.org/wine/wine/-/commit/72d18a48228d35163c6d32ad04c52a…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Mon Sep 26 11:43:57 2022 +0200 winegstreamer: Keep input / output stream info in struct wma_decoder. And calculate the sizes when media type is successfully changed. --- dlls/winegstreamer/wma_decoder.c | 54 +++++++++++++++++++--------------------- 1 file changed, 25 insertions(+), 29 deletions(-) diff --git a/dlls/winegstreamer/wma_decoder.c b/dlls/winegstreamer/wma_decoder.c index 99328103bad..a5271572b7c 100644 --- a/dlls/winegstreamer/wma_decoder.c +++ b/dlls/winegstreamer/wma_decoder.c @@ -52,8 +52,11 @@ struct wma_decoder IPropertyBag IPropertyBag_iface; IUnknown *outer; LONG refcount; + IMFMediaType *input_type; + MFT_INPUT_STREAM_INFO input_info; IMFMediaType *output_type; + MFT_OUTPUT_STREAM_INFO output_info; struct wg_transform *wg_transform; struct wg_sample_queue *wg_sample_queue; @@ -201,46 +204,32 @@ static HRESULT WINAPI transform_GetStreamIDs(IMFTransform *iface, DWORD input_si static HRESULT WINAPI transform_GetInputStreamInfo(IMFTransform *iface, DWORD id, MFT_INPUT_STREAM_INFO *info) { struct wma_decoder *decoder = impl_from_IMFTransform(iface); - UINT32 block_alignment; - HRESULT hr; TRACE("iface %p, id %lu, info %p.\n", iface, id, info); if (!decoder->input_type || !decoder->output_type) + { + memset(info, 0, sizeof(*info)); return MF_E_TRANSFORM_TYPE_NOT_SET; + } - if (FAILED(hr = IMFMediaType_GetUINT32(decoder->input_type, &MF_MT_AUDIO_BLOCK_ALIGNMENT, &block_alignment))) - return hr; - - info->hnsMaxLatency = 0; - info->dwFlags = 0; - info->cbSize = block_alignment; - info->cbMaxLookahead = 0; - info->cbAlignment = 1; - + *info = decoder->input_info; return S_OK; } static HRESULT WINAPI transform_GetOutputStreamInfo(IMFTransform *iface, DWORD id, MFT_OUTPUT_STREAM_INFO *info) { struct wma_decoder *decoder = impl_from_IMFTransform(iface); - UINT32 channel_count, block_alignment; - HRESULT hr; TRACE("iface %p, id %lu, info %p.\n", iface, id, info); if (!decoder->input_type || !decoder->output_type) + { + memset(info, 0, sizeof(*info)); return MF_E_TRANSFORM_TYPE_NOT_SET; + } - if (FAILED(hr = IMFMediaType_GetUINT32(decoder->output_type, &MF_MT_AUDIO_NUM_CHANNELS, &channel_count))) - return hr; - if (FAILED(hr = IMFMediaType_GetUINT32(decoder->output_type, &MF_MT_AUDIO_BLOCK_ALIGNMENT, &block_alignment))) - return hr; - - info->dwFlags = 0; - info->cbSize = 1024 * block_alignment * channel_count; - info->cbAlignment = 1; - + *info = decoder->output_info; return S_OK; } @@ -358,6 +347,7 @@ static HRESULT WINAPI transform_SetInputType(IMFTransform *iface, DWORD id, IMFM { struct wma_decoder *decoder = impl_from_IMFTransform(iface); MF_ATTRIBUTE_TYPE item_type; + UINT32 block_alignment; GUID major, subtype; HRESULT hr; ULONG i; @@ -380,8 +370,7 @@ static HRESULT WINAPI transform_SetInputType(IMFTransform *iface, DWORD id, IMFM if (FAILED(IMFMediaType_GetItemType(type, &MF_MT_USER_DATA, &item_type)) || item_type != MF_ATTRIBUTE_BLOB) return MF_E_INVALIDMEDIATYPE; - if (FAILED(IMFMediaType_GetItemType(type, &MF_MT_AUDIO_BLOCK_ALIGNMENT, &item_type)) || - item_type != MF_ATTRIBUTE_UINT32) + if (FAILED(IMFMediaType_GetUINT32(type, &MF_MT_AUDIO_BLOCK_ALIGNMENT, &block_alignment))) return MF_E_INVALIDMEDIATYPE; if (FAILED(IMFMediaType_GetItemType(type, &MF_MT_AUDIO_SAMPLES_PER_SECOND, &item_type)) || item_type != MF_ATTRIBUTE_UINT32) @@ -401,9 +390,12 @@ static HRESULT WINAPI transform_SetInputType(IMFTransform *iface, DWORD id, IMFM decoder->output_type = NULL; } - if (FAILED(hr = IMFMediaType_CopyAllItems(type, (IMFAttributes *)decoder->input_type))) + if (SUCCEEDED(hr = IMFMediaType_CopyAllItems(type, (IMFAttributes *)decoder->input_type))) + decoder->input_info.cbSize = block_alignment; + else { IMFMediaType_Release(decoder->input_type); + decoder->input_info.cbSize = 0; decoder->input_type = NULL; } @@ -413,6 +405,7 @@ static HRESULT WINAPI transform_SetInputType(IMFTransform *iface, DWORD id, IMFM static HRESULT WINAPI transform_SetOutputType(IMFTransform *iface, DWORD id, IMFMediaType *type, DWORD flags) { struct wma_decoder *decoder = impl_from_IMFTransform(iface); + UINT32 channel_count, block_alignment; MF_ATTRIBUTE_TYPE item_type; ULONG i, sample_size; GUID major, subtype; @@ -453,14 +446,12 @@ static HRESULT WINAPI transform_SetOutputType(IMFTransform *iface, DWORD id, IMF if (FAILED(IMFMediaType_GetItemType(type, &MF_MT_AUDIO_BITS_PER_SAMPLE, &item_type)) || item_type != MF_ATTRIBUTE_UINT32) return MF_E_INVALIDMEDIATYPE; - if (FAILED(IMFMediaType_GetItemType(type, &MF_MT_AUDIO_NUM_CHANNELS, &item_type)) || - item_type != MF_ATTRIBUTE_UINT32) + if (FAILED(IMFMediaType_GetUINT32(type, &MF_MT_AUDIO_NUM_CHANNELS, &channel_count))) return MF_E_INVALIDMEDIATYPE; if (FAILED(IMFMediaType_GetItemType(type, &MF_MT_AUDIO_SAMPLES_PER_SECOND, &item_type)) || item_type != MF_ATTRIBUTE_UINT32) return MF_E_INVALIDMEDIATYPE; - if (FAILED(IMFMediaType_GetItemType(type, &MF_MT_AUDIO_BLOCK_ALIGNMENT, &item_type)) || - item_type != MF_ATTRIBUTE_UINT32) + if (FAILED(IMFMediaType_GetUINT32(type, &MF_MT_AUDIO_BLOCK_ALIGNMENT, &block_alignment))) return MF_E_INVALIDMEDIATYPE; if (flags & MFT_SET_TYPE_TEST_ONLY) return S_OK; @@ -477,10 +468,12 @@ static HRESULT WINAPI transform_SetOutputType(IMFTransform *iface, DWORD id, IMF if (FAILED(hr = try_create_wg_transform(decoder))) goto failed; + decoder->output_info.cbSize = 1024 * block_alignment * channel_count; return S_OK; failed: IMFMediaType_Release(decoder->output_type); + decoder->output_info.cbSize = 0; decoder->output_type = NULL; return hr; } @@ -901,6 +894,9 @@ HRESULT wma_decoder_create(IUnknown *outer, IUnknown **out) decoder->refcount = 1; decoder->outer = outer ? outer : &decoder->IUnknown_inner; + decoder->input_info.cbAlignment = 1; + decoder->output_info.cbAlignment = 1; + *out = &decoder->IUnknown_inner; TRACE("Created decoder %p\n", *out); return S_OK;
1
0
0
0
Rémi Bernon : winegstreamer: Keep input / output stream info in struct video_processor.
by Alexandre Julliard
29 Sep '22
29 Sep '22
Module: wine Branch: master Commit: 7878903855390558a8ce27377efb295777d455d8 URL:
https://gitlab.winehq.org/wine/wine/-/commit/7878903855390558a8ce27377efb29…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Mon Sep 26 11:43:57 2022 +0200 winegstreamer: Keep input / output stream info in struct video_processor. And calculate the sizes when media type is successfully changed. --- dlls/winegstreamer/video_processor.c | 47 ++++++++++++------------------------ 1 file changed, 15 insertions(+), 32 deletions(-) diff --git a/dlls/winegstreamer/video_processor.c b/dlls/winegstreamer/video_processor.c index a67ed8d6efd..a0f1c52f356 100644 --- a/dlls/winegstreamer/video_processor.c +++ b/dlls/winegstreamer/video_processor.c @@ -73,11 +73,14 @@ struct video_processor IMFTransform IMFTransform_iface; LONG refcount; - IMFMediaType *input_type; - IMFMediaType *output_type; IMFAttributes *attributes; IMFAttributes *output_attributes; + IMFMediaType *input_type; + MFT_INPUT_STREAM_INFO input_info; + IMFMediaType *output_type; + MFT_OUTPUT_STREAM_INFO output_info; + struct wg_transform *wg_transform; struct wg_sample_queue *wg_sample_queue; }; @@ -192,54 +195,26 @@ static HRESULT WINAPI video_processor_GetStreamIDs(IMFTransform *iface, DWORD in static HRESULT WINAPI video_processor_GetInputStreamInfo(IMFTransform *iface, DWORD id, MFT_INPUT_STREAM_INFO *info) { struct video_processor *impl = impl_from_IMFTransform(iface); - UINT32 sample_size; - UINT64 framesize; - GUID subtype; - HRESULT hr; TRACE("iface %p, id %#lx, info %p.\n", iface, id, info); if (id) return MF_E_INVALIDSTREAMNUMBER; - if (impl->input_type && SUCCEEDED(hr = IMFMediaType_GetGUID(impl->input_type, &MF_MT_SUBTYPE, &subtype)) - && SUCCEEDED(hr = IMFMediaType_GetUINT64(impl->input_type, &MF_MT_FRAME_SIZE, &framesize))) - MFCalculateImageSize(&subtype, framesize >> 32, (UINT32)framesize, &sample_size); - else - sample_size = 0; - - info->dwFlags = 0; - info->cbSize = sample_size; - info->cbAlignment = 0; - info->hnsMaxLatency = 0; - info->cbMaxLookahead = 0; - + *info = impl->input_info; return S_OK; } static HRESULT WINAPI video_processor_GetOutputStreamInfo(IMFTransform *iface, DWORD id, MFT_OUTPUT_STREAM_INFO *info) { struct video_processor *impl = impl_from_IMFTransform(iface); - UINT32 sample_size; - UINT64 framesize; - GUID subtype; - HRESULT hr; TRACE("iface %p, id %#lx, info %p.\n", iface, id, info); if (id) return MF_E_INVALIDSTREAMNUMBER; - if (impl->output_type && SUCCEEDED(hr = IMFMediaType_GetGUID(impl->output_type, &MF_MT_SUBTYPE, &subtype)) - && SUCCEEDED(hr = IMFMediaType_GetUINT64(impl->output_type, &MF_MT_FRAME_SIZE, &framesize))) - MFCalculateImageSize(&subtype, framesize >> 32, (UINT32)framesize, &sample_size); - else - sample_size = 0; - - info->dwFlags = 0; - info->cbSize = sample_size; - info->cbAlignment = 0; - + *info = impl->output_info; return S_OK; } @@ -397,6 +372,10 @@ static HRESULT WINAPI video_processor_SetInputType(IMFTransform *iface, DWORD id impl->input_type = NULL; } + if (FAILED(hr) || FAILED(MFCalculateImageSize(&subtype, frame_size >> 32, (UINT32)frame_size, + (UINT32 *)&impl->input_info.cbSize))) + impl->input_info.cbSize = 0; + return hr; } @@ -436,6 +415,10 @@ static HRESULT WINAPI video_processor_SetOutputType(IMFTransform *iface, DWORD i impl->output_type = NULL; } + if (FAILED(hr) || FAILED(MFCalculateImageSize(&subtype, frame_size >> 32, (UINT32)frame_size, + (UINT32 *)&impl->output_info.cbSize))) + impl->output_info.cbSize = 0; + return hr; }
1
0
0
0
Rémi Bernon : winegstreamer: Keep input / output stream info in struct resampler.
by Alexandre Julliard
29 Sep '22
29 Sep '22
Module: wine Branch: master Commit: e06284fd262d8da568386253aff4496ebed6141b URL:
https://gitlab.winehq.org/wine/wine/-/commit/e06284fd262d8da568386253aff449…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Mon Sep 26 11:43:57 2022 +0200 winegstreamer: Keep input / output stream info in struct resampler. And calculate the sizes when media type is successfully changed. --- dlls/winegstreamer/resampler.c | 50 ++++++++++++++++++++++-------------------- 1 file changed, 26 insertions(+), 24 deletions(-) diff --git a/dlls/winegstreamer/resampler.c b/dlls/winegstreamer/resampler.c index b0646c3759f..7dd50da1c2d 100644 --- a/dlls/winegstreamer/resampler.c +++ b/dlls/winegstreamer/resampler.c @@ -43,8 +43,11 @@ struct resampler IPropertyStore IPropertyStore_iface; IUnknown *outer; LONG refcount; + IMFMediaType *input_type; + MFT_INPUT_STREAM_INFO input_info; IMFMediaType *output_type; + MFT_OUTPUT_STREAM_INFO output_info; struct wg_transform *wg_transform; struct wg_sample_queue *wg_sample_queue; @@ -191,44 +194,32 @@ static HRESULT WINAPI transform_GetStreamIDs(IMFTransform *iface, DWORD input_si static HRESULT WINAPI transform_GetInputStreamInfo(IMFTransform *iface, DWORD id, MFT_INPUT_STREAM_INFO *info) { struct resampler *impl = impl_from_IMFTransform(iface); - UINT32 block_alignment; - HRESULT hr; TRACE("iface %p, id %#lx, info %p.\n", iface, id, info); if (!impl->input_type || !impl->output_type) + { + memset(info, 0, sizeof(*info)); return MF_E_TRANSFORM_TYPE_NOT_SET; + } - if (FAILED(hr = IMFMediaType_GetUINT32(impl->input_type, &MF_MT_AUDIO_BLOCK_ALIGNMENT, &block_alignment))) - return hr; - - info->dwFlags = 0; - info->cbSize = block_alignment; - info->cbAlignment = 1; - info->hnsMaxLatency = 0; - info->cbMaxLookahead = 0; - + *info = impl->input_info; return S_OK; } static HRESULT WINAPI transform_GetOutputStreamInfo(IMFTransform *iface, DWORD id, MFT_OUTPUT_STREAM_INFO *info) { struct resampler *impl = impl_from_IMFTransform(iface); - UINT32 block_alignment; - HRESULT hr; TRACE("iface %p, id %#lx, info %p.\n", iface, id, info); if (!impl->input_type || !impl->output_type) + { + memset(info, 0, sizeof(*info)); return MF_E_TRANSFORM_TYPE_NOT_SET; + } - if (FAILED(hr = IMFMediaType_GetUINT32(impl->output_type, &MF_MT_AUDIO_BLOCK_ALIGNMENT, &block_alignment))) - return hr; - - info->dwFlags = 0; - info->cbSize = block_alignment; - info->cbAlignment = 1; - + *info = impl->output_info; return S_OK; } @@ -367,9 +358,6 @@ static HRESULT check_media_type(IMFMediaType *type) if (FAILED(IMFMediaType_GetItemType(type, &MF_MT_AUDIO_SAMPLES_PER_SECOND, &item_type)) || item_type != MF_ATTRIBUTE_UINT32) return MF_E_INVALIDMEDIATYPE; - if (FAILED(IMFMediaType_GetItemType(type, &MF_MT_AUDIO_BLOCK_ALIGNMENT, &item_type)) || - item_type != MF_ATTRIBUTE_UINT32) - return MF_E_INVALIDMEDIATYPE; return S_OK; } @@ -377,12 +365,15 @@ static HRESULT check_media_type(IMFMediaType *type) static HRESULT WINAPI transform_SetInputType(IMFTransform *iface, DWORD id, IMFMediaType *type, DWORD flags) { struct resampler *impl = impl_from_IMFTransform(iface); + UINT32 block_alignment; HRESULT hr; TRACE("iface %p, id %#lx, type %p, flags %#lx.\n", iface, id, type, flags); if (FAILED(hr = check_media_type(type))) return hr; + if (FAILED(hr = IMFMediaType_GetUINT32(type, &MF_MT_AUDIO_BLOCK_ALIGNMENT, &block_alignment))) + return MF_E_INVALIDMEDIATYPE; if (flags & MFT_SET_TYPE_TEST_ONLY) return S_OK; @@ -395,9 +386,12 @@ static HRESULT WINAPI transform_SetInputType(IMFTransform *iface, DWORD id, IMFM impl->output_type = NULL; } - if (FAILED(hr = IMFMediaType_CopyAllItems(type, (IMFAttributes *)impl->input_type))) + if (SUCCEEDED(hr = IMFMediaType_CopyAllItems(type, (IMFAttributes *)impl->input_type))) + impl->input_info.cbSize = block_alignment; + else { IMFMediaType_Release(impl->input_type); + impl->input_info.cbSize = 0; impl->input_type = NULL; } @@ -407,6 +401,7 @@ static HRESULT WINAPI transform_SetInputType(IMFTransform *iface, DWORD id, IMFM static HRESULT WINAPI transform_SetOutputType(IMFTransform *iface, DWORD id, IMFMediaType *type, DWORD flags) { struct resampler *impl = impl_from_IMFTransform(iface); + UINT32 block_alignment; HRESULT hr; TRACE("iface %p, id %#lx, type %p, flags %#lx.\n", iface, id, type, flags); @@ -416,6 +411,8 @@ static HRESULT WINAPI transform_SetOutputType(IMFTransform *iface, DWORD id, IMF if (FAILED(hr = check_media_type(type))) return hr; + if (FAILED(hr = IMFMediaType_GetUINT32(type, &MF_MT_AUDIO_BLOCK_ALIGNMENT, &block_alignment))) + return MF_E_INVALIDMEDIATYPE; if (flags & MFT_SET_TYPE_TEST_ONLY) return S_OK; @@ -428,10 +425,12 @@ static HRESULT WINAPI transform_SetOutputType(IMFTransform *iface, DWORD id, IMF if (FAILED(hr = try_create_wg_transform(impl))) goto failed; + impl->output_info.cbSize = block_alignment; return hr; failed: IMFMediaType_Release(impl->output_type); + impl->output_info.cbSize = 0; impl->output_type = NULL; return hr; } @@ -940,6 +939,9 @@ HRESULT resampler_create(IUnknown *outer, IUnknown **out) impl->refcount = 1; impl->outer = outer ? outer : &impl->IUnknown_inner; + impl->input_info.cbAlignment = 1; + impl->output_info.cbAlignment = 1; + *out = &impl->IUnknown_inner; TRACE("Created %p\n", *out); return S_OK;
1
0
0
0
Rémi Bernon : winegstreamer: Keep input / output stream info in struct color_convert.
by Alexandre Julliard
29 Sep '22
29 Sep '22
Module: wine Branch: master Commit: d98eae895b812c38415519ce308b70eedfd74ff7 URL:
https://gitlab.winehq.org/wine/wine/-/commit/d98eae895b812c38415519ce308b70…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Mon Sep 26 11:43:57 2022 +0200 winegstreamer: Keep input / output stream info in struct color_convert. And calculate the sizes when media type is successfully changed. --- dlls/winegstreamer/color_convert.c | 62 ++++++++++++++++---------------------- 1 file changed, 26 insertions(+), 36 deletions(-) diff --git a/dlls/winegstreamer/color_convert.c b/dlls/winegstreamer/color_convert.c index f7e72e0e514..7ffe29de907 100644 --- a/dlls/winegstreamer/color_convert.c +++ b/dlls/winegstreamer/color_convert.c @@ -80,8 +80,11 @@ struct color_convert IPropertyStore IPropertyStore_iface; IUnknown *outer; LONG refcount; + IMFMediaType *input_type; + MFT_INPUT_STREAM_INFO input_info; IMFMediaType *output_type; + MFT_OUTPUT_STREAM_INFO output_info; struct wg_transform *wg_transform; struct wg_sample_queue *wg_sample_queue; @@ -228,54 +231,32 @@ static HRESULT WINAPI transform_GetStreamIDs(IMFTransform *iface, DWORD input_si static HRESULT WINAPI transform_GetInputStreamInfo(IMFTransform *iface, DWORD id, MFT_INPUT_STREAM_INFO *info) { struct color_convert *impl = impl_from_IMFTransform(iface); - UINT32 sample_size; - UINT64 framesize; - GUID subtype; - HRESULT hr; TRACE("iface %p, id %#lx, info %p.\n", iface, id, info); if (!impl->input_type || !impl->output_type) + { + memset(info, 0, sizeof(*info)); return MF_E_TRANSFORM_TYPE_NOT_SET; + } - if (SUCCEEDED(hr = IMFMediaType_GetGUID(impl->input_type, &MF_MT_SUBTYPE, &subtype)) && - SUCCEEDED(hr = IMFMediaType_GetUINT64(impl->input_type, &MF_MT_FRAME_SIZE, &framesize))) - MFCalculateImageSize(&subtype, framesize >> 32, (UINT32)framesize, &sample_size); - else - sample_size = 0; - - info->dwFlags = 0; - info->cbSize = sample_size; - info->cbAlignment = 1; - info->hnsMaxLatency = 0; - info->cbMaxLookahead = 0; - + *info = impl->input_info; return S_OK; } static HRESULT WINAPI transform_GetOutputStreamInfo(IMFTransform *iface, DWORD id, MFT_OUTPUT_STREAM_INFO *info) { struct color_convert *impl = impl_from_IMFTransform(iface); - UINT32 sample_size; - UINT64 framesize; - GUID subtype; - HRESULT hr; TRACE("iface %p, id %#lx, info %p.\n", iface, id, info); if (!impl->input_type || !impl->output_type) + { + memset(info, 0, sizeof(*info)); return MF_E_TRANSFORM_TYPE_NOT_SET; + } - if (SUCCEEDED(hr = IMFMediaType_GetGUID(impl->output_type, &MF_MT_SUBTYPE, &subtype)) && - SUCCEEDED(hr = IMFMediaType_GetUINT64(impl->output_type, &MF_MT_FRAME_SIZE, &framesize))) - MFCalculateImageSize(&subtype, framesize >> 32, (UINT32)framesize, &sample_size); - else - sample_size = 0; - - info->dwFlags = 0; - info->cbSize = sample_size; - info->cbAlignment = 1; - + *info = impl->output_info; return S_OK; } @@ -380,8 +361,8 @@ done: static HRESULT WINAPI transform_SetInputType(IMFTransform *iface, DWORD id, IMFMediaType *type, DWORD flags) { struct color_convert *impl = impl_from_IMFTransform(iface); - MF_ATTRIBUTE_TYPE item_type; GUID major, subtype; + UINT64 frame_size; HRESULT hr; ULONG i; @@ -392,8 +373,7 @@ static HRESULT WINAPI transform_SetInputType(IMFTransform *iface, DWORD id, IMFM return MF_E_ATTRIBUTENOTFOUND; if (!IsEqualGUID(&major, &MFMediaType_Video) - || FAILED(IMFMediaType_GetItemType(type, &MF_MT_FRAME_SIZE, &item_type)) - || item_type != MF_ATTRIBUTE_UINT64) + || IMFMediaType_GetUINT64(type, &MF_MT_FRAME_SIZE, &frame_size)) return E_INVALIDARG; for (i = 0; i < ARRAY_SIZE(input_types); ++i) @@ -419,14 +399,18 @@ static HRESULT WINAPI transform_SetInputType(IMFTransform *iface, DWORD id, IMFM impl->input_type = NULL; } + if (FAILED(hr) || FAILED(MFCalculateImageSize(&subtype, frame_size >> 32, (UINT32)frame_size, + (UINT32 *)&impl->input_info.cbSize))) + impl->input_info.cbSize = 0; + return hr; } static HRESULT WINAPI transform_SetOutputType(IMFTransform *iface, DWORD id, IMFMediaType *type, DWORD flags) { struct color_convert *impl = impl_from_IMFTransform(iface); - MF_ATTRIBUTE_TYPE item_type; GUID major, subtype; + UINT64 frame_size; HRESULT hr; ULONG i; @@ -437,8 +421,7 @@ static HRESULT WINAPI transform_SetOutputType(IMFTransform *iface, DWORD id, IMF return MF_E_ATTRIBUTENOTFOUND; if (!IsEqualGUID(&major, &MFMediaType_Video) - || FAILED(IMFMediaType_GetItemType(type, &MF_MT_FRAME_SIZE, &item_type)) - || item_type != MF_ATTRIBUTE_UINT64) + || IMFMediaType_GetUINT64(type, &MF_MT_FRAME_SIZE, &frame_size)) return E_INVALIDARG; for (i = 0; i < ARRAY_SIZE(output_types); ++i) @@ -464,6 +447,10 @@ static HRESULT WINAPI transform_SetOutputType(IMFTransform *iface, DWORD id, IMF impl->output_type = NULL; } + if (FAILED(hr) || FAILED(MFCalculateImageSize(&subtype, frame_size >> 32, (UINT32)frame_size, + (UINT32 *)&impl->output_info.cbSize))) + impl->output_info.cbSize = 0; + return hr; } @@ -963,6 +950,9 @@ HRESULT color_convert_create(IUnknown *outer, IUnknown **out) impl->refcount = 1; impl->outer = outer ? outer : &impl->IUnknown_inner; + impl->input_info.cbAlignment = 1; + impl->output_info.cbAlignment = 1; + *out = &impl->IUnknown_inner; TRACE("Created %p\n", *out); return S_OK;
1
0
0
0
Rémi Bernon : winegstreamer: Remove FIXME / stub! from optional transform methods.
by Alexandre Julliard
29 Sep '22
29 Sep '22
Module: wine Branch: master Commit: 076f348cd1dd68f7725ea3c523962f09b55d21ca URL:
https://gitlab.winehq.org/wine/wine/-/commit/076f348cd1dd68f7725ea3c523962f…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Tue Sep 6 08:58:16 2022 +0200 winegstreamer: Remove FIXME / stub! from optional transform methods. --- dlls/winegstreamer/color_convert.c | 14 +++++++------- dlls/winegstreamer/h264_decoder.c | 14 +++++++------- dlls/winegstreamer/resampler.c | 14 +++++++------- dlls/winegstreamer/video_processor.c | 14 +++++++------- dlls/winegstreamer/wma_decoder.c | 15 +++++++-------- 5 files changed, 35 insertions(+), 36 deletions(-)
1
0
0
0
Rémi Bernon : mf/tests: Test miscellaneous and optional IMFTransform methods.
by Alexandre Julliard
29 Sep '22
29 Sep '22
Module: wine Branch: master Commit: 41d9806677ff1070d025761081d189f5e0d9f37e URL:
https://gitlab.winehq.org/wine/wine/-/commit/41d9806677ff1070d025761081d189…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Sun Sep 18 15:00:11 2022 +0200 mf/tests: Test miscellaneous and optional IMFTransform methods. --- dlls/mf/tests/transform.c | 318 +++++++++++++++++++++++++++------------------- 1 file changed, 184 insertions(+), 134 deletions(-)
1
0
0
0
Rémi Bernon : winegstreamer: Return E_NOTIMPL from color_convert GetInputStreamAttributes.
by Alexandre Julliard
29 Sep '22
29 Sep '22
Module: wine Branch: master Commit: 53dedf69d7cb580317708476a6fdd78e6e25a497 URL:
https://gitlab.winehq.org/wine/wine/-/commit/53dedf69d7cb580317708476a6fdd7…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Mon Sep 26 13:24:49 2022 +0200 winegstreamer: Return E_NOTIMPL from color_convert GetInputStreamAttributes. --- dlls/winegstreamer/color_convert.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/winegstreamer/color_convert.c b/dlls/winegstreamer/color_convert.c index e4fb78752b0..9be68d5cb11 100644 --- a/dlls/winegstreamer/color_convert.c +++ b/dlls/winegstreamer/color_convert.c @@ -288,7 +288,7 @@ static HRESULT WINAPI transform_GetAttributes(IMFTransform *iface, IMFAttributes static HRESULT WINAPI transform_GetInputStreamAttributes(IMFTransform *iface, DWORD id, IMFAttributes **attributes) { FIXME("iface %p, id %#lx, attributes %p stub!\n", iface, id, attributes); - return MFCreateAttributes(attributes, 0); + return E_NOTIMPL; } static HRESULT WINAPI transform_GetOutputStreamAttributes(IMFTransform *iface, DWORD id, IMFAttributes **attributes)
1
0
0
0
← Newer
1
2
3
4
5
6
7
...
56
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
Results per page:
10
25
50
100
200