amstream/tests: Add a test for event parameter of IDirectDrawStreamSample::Update.

Signed-off-by: Anton Baskanov <baskanov@gmail.com>
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Anton Baskanov 2021-04-21 12:53:33 +07:00 committed by Alexandre Julliard
parent c19fb3d70d
commit 3088ce35cb

View file

@ -8511,6 +8511,22 @@ static void test_ddrawstreamsample_update(void)
hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_RUN);
ok(hr == S_OK, "Got hr %#x.\n", hr);
hr = IDirectDrawStreamSample_Update(stream_sample, 0, event, NULL, 0);
todo_wine ok(hr == MS_S_PENDING, "Got hr %#x.\n", hr);
ok(WaitForSingleObject(event, 0) == WAIT_TIMEOUT, "Event should not be signaled.\n");
if (hr == MS_S_PENDING)
{
media_sample = ammediastream_allocate_sample(&source, test_data, sizeof(test_data));
hr = IMemInputPin_Receive(source.source.pMemInputPin, media_sample);
ok(hr == S_OK, "Got hr %#x.\n", hr);
ref = IMediaSample_Release(media_sample);
ok(!ref, "Got outstanding refcount %d.\n", ref);
}
todo_wine ok(WaitForSingleObject(event, 0) == 0, "Event should be signaled.\n");
hr = IDirectDrawStreamSample_Update(stream_sample, SSUPDATE_ASYNC, NULL, NULL, 0);
ok(hr == MS_S_PENDING, "Got hr %#x.\n", hr);
EXPECT_REF(stream_sample, 1);