evr/mixer: Implement GetOutputStatus().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
5496b88917
commit
d63ff3403b
|
@ -934,11 +934,37 @@ static HRESULT WINAPI video_mixer_transform_GetInputStatus(IMFTransform *iface,
|
|||
return hr;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI video_mixer_transform_GetOutputStatus(IMFTransform *iface, DWORD *flags)
|
||||
static HRESULT WINAPI video_mixer_transform_GetOutputStatus(IMFTransform *iface, DWORD *status)
|
||||
{
|
||||
FIXME("%p, %p.\n", iface, flags);
|
||||
struct video_mixer *mixer = impl_from_IMFTransform(iface);
|
||||
HRESULT hr = S_OK;
|
||||
unsigned int i;
|
||||
|
||||
return E_NOTIMPL;
|
||||
TRACE("%p, %p.\n", iface, status);
|
||||
|
||||
if (!status)
|
||||
return E_POINTER;
|
||||
|
||||
EnterCriticalSection(&mixer->cs);
|
||||
|
||||
if (!mixer->output.media_type)
|
||||
hr = MF_E_TRANSFORM_TYPE_NOT_SET;
|
||||
else
|
||||
{
|
||||
*status = MFT_OUTPUT_STATUS_SAMPLE_READY;
|
||||
for (i = 0; i < mixer->input_count; ++i)
|
||||
{
|
||||
if (!mixer->inputs[i].sample)
|
||||
{
|
||||
*status = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
LeaveCriticalSection(&mixer->cs);
|
||||
|
||||
return hr;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI video_mixer_transform_SetOutputBounds(IMFTransform *iface, LONGLONG lower, LONGLONG upper)
|
||||
|
|
|
@ -2098,6 +2098,12 @@ static void test_mixer_samples(void)
|
|||
hr = IMFTransform_GetInputStatus(mixer, 1, &status);
|
||||
ok(hr == MF_E_TRANSFORM_TYPE_NOT_SET, "Unexpected hr %#x.\n", hr);
|
||||
|
||||
hr = IMFTransform_GetOutputStatus(mixer, NULL);
|
||||
ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr);
|
||||
|
||||
hr = IMFTransform_GetOutputStatus(mixer, &status);
|
||||
ok(hr == MF_E_TRANSFORM_TYPE_NOT_SET, "Unexpected hr %#x.\n", hr);
|
||||
|
||||
/* Configure device and media types. */
|
||||
hr = DXVA2CreateDirect3DDeviceManager9(&token, &manager);
|
||||
ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
|
||||
|
@ -2132,6 +2138,11 @@ static void test_mixer_samples(void)
|
|||
hr = IMFTransform_GetInputStatus(mixer, 1, &status);
|
||||
ok(hr == MF_E_INVALIDSTREAMNUMBER, "Unexpected hr %#x.\n", hr);
|
||||
|
||||
status = ~0u;
|
||||
hr = IMFTransform_GetOutputStatus(mixer, &status);
|
||||
ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
|
||||
ok(!status, "Unexpected status %#x.\n", status);
|
||||
|
||||
IMFMediaType_Release(video_type);
|
||||
|
||||
memset(&buffer, 0, sizeof(buffer));
|
||||
|
@ -2190,6 +2201,11 @@ todo_wine
|
|||
ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
|
||||
ok(status == MFT_INPUT_STATUS_ACCEPT_DATA, "Unexpected status %#x.\n", status);
|
||||
|
||||
status = ~0u;
|
||||
hr = IMFTransform_GetOutputStatus(mixer, &status);
|
||||
ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
|
||||
ok(!status, "Unexpected status %#x.\n", status);
|
||||
|
||||
hr = IMFTransform_ProcessInput(mixer, 0, sample, 0);
|
||||
ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
|
||||
|
||||
|
@ -2198,6 +2214,10 @@ todo_wine
|
|||
ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
|
||||
ok(!status, "Unexpected status %#x.\n", status);
|
||||
|
||||
hr = IMFTransform_GetOutputStatus(mixer, &status);
|
||||
ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
|
||||
ok(status == MFT_OUTPUT_STATUS_SAMPLE_READY, "Unexpected status %#x.\n", status);
|
||||
|
||||
hr = IMFTransform_ProcessInput(mixer, 0, sample, 0);
|
||||
ok(hr == MF_E_NOTACCEPTING, "Unexpected hr %#x.\n", hr);
|
||||
|
||||
|
|
Loading…
Reference in New Issue