Anton Baskanov (@baskanov) commented about dlls/amstream/tests/amstream.c:
+ ok(hr == S_OK, "Got hr %#lx.\n", hr); + + source.preferred_mt = NULL; + source.query_accept_hr = S_OK; + + hr = IDirectDrawMediaStream_SetFormat(ddraw_stream, &rgb555_format, NULL); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(IsEqualGUID(&source.source.pin.mt.subtype, &MEDIASUBTYPE_RGB8), + "Got subtype %s.\n", wine_dbgstr_guid(&source.source.pin.mt.subtype)); + hr = IDirectDrawMediaStream_GetFormat(ddraw_stream, ¤t_format, NULL, &desired_format, NULL); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr); + todo_wine ok(current_format.ddpfPixelFormat.u1.dwRGBBitCount == 16, + "Got rgb bit count %lu.\n", current_format.ddpfPixelFormat.u1.dwRGBBitCount); + todo_wine ok(desired_format.ddpfPixelFormat.u1.dwRGBBitCount == 16, + "Got rgb bit count %lu.\n", desired_format.ddpfPixelFormat.u1.dwRGBBitCount); + Could you please also test that the allocated samples have the new media type set? Something like this:
hr = IDirectDrawMediaStream_CreateSample(ddraw_stream, NULL, NULL, 0, &ddraw_sample1);
ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IDirectDrawStreamSample_Update(ddraw_sample1, SSUPDATE_ASYNC, NULL, NULL, 0);
ok(hr == MS_S_PENDING, "Got hr %#lx.\n", hr);
hr = IDirectDrawMediaStream_CreateSample(ddraw_stream, NULL, NULL, 0, &ddraw_sample2);
ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IDirectDrawStreamSample_Update(ddraw_sample2, SSUPDATE_ASYNC, NULL, NULL, 0);
ok(hr == MS_S_PENDING, "Got hr %#lx.\n", hr);
hr = IDirectDrawMediaStream_QueryInterface(ddraw_stream, &IID_IMemAllocator, (void **)&allocator);
ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMemAllocator_GetBuffer(allocator, &media_sample1, NULL, NULL, 0);
ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaSample_GetMediaType(media_sample1, &sample_mt);
todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr);
if (sample_mt)
{
ok(IsEqualGUID(&sample_mt->subtype, &MEDIASUBTYPE_RGB555), "Got subtype %s.\n", wine_dbgstr_guid(&sample_mt->subtype));
DeleteMediaType(sample_mt);
}
hr = IMemAllocator_GetBuffer(allocator, &media_sample2, NULL, NULL, 0);
ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaSample_GetMediaType(media_sample2, &sample_mt);
todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr);
if (sample_mt)
{
ok(IsEqualGUID(&sample_mt->subtype, &MEDIASUBTYPE_RGB555), "Got subtype %s.\n", wine_dbgstr_guid(&sample_mt->subtype));
DeleteMediaType(sample_mt);
}
IMediaSample_Release(media_sample1);
IMediaSample_Release(media_sample2);
IMemAllocator_Release(allocator);
IDirectDrawStreamSample_Release(ddraw_sample1);
IDirectDrawStreamSample_Release(ddraw_sample2);
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/7715#note_99686