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>
(cherry picked from commit 3088ce35cb
)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
This commit is contained in:
parent
910d7e52e5
commit
f16cda7e63
|
@ -7795,6 +7795,22 @@ static void test_ddrawstreamsample_update(void)
|
||||||
hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_RUN);
|
hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_RUN);
|
||||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
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);
|
hr = IDirectDrawStreamSample_Update(stream_sample, SSUPDATE_ASYNC, NULL, NULL, 0);
|
||||||
ok(hr == MS_S_PENDING, "Got hr %#x.\n", hr);
|
ok(hr == MS_S_PENDING, "Got hr %#x.\n", hr);
|
||||||
EXPECT_REF(stream_sample, 1);
|
EXPECT_REF(stream_sample, 1);
|
||||||
|
|
Loading…
Reference in New Issue