Module: wine Branch: master Commit: 2a83ef077f9b872832e22306e4008bd192fb40b3 URL: https://gitlab.winehq.org/wine/wine/-/commit/2a83ef077f9b872832e22306e4008bd...
Author: Ziqing Hui zhui@codeweavers.com Date: Tue May 23 12:21:09 2023 +0800
winegstreamer: Implement GetInputStatus for WMV decoder DMO.
---
dlls/mf/tests/transform.c | 7 ------- dlls/winegstreamer/wmv_decoder.c | 12 ++++++++++-- 2 files changed, 10 insertions(+), 9 deletions(-)
diff --git a/dlls/mf/tests/transform.c b/dlls/mf/tests/transform.c index 70bd2195521..031eb50f319 100644 --- a/dlls/mf/tests/transform.c +++ b/dlls/mf/tests/transform.c @@ -5580,23 +5580,18 @@ static void test_wmv_decoder_media_object(void)
/* Test GetInputStatus. */ hr = IMediaObject_GetInputStatus(media_object, 0xdeadbeef, NULL); - todo_wine ok(hr == DMO_E_INVALIDSTREAMINDEX, "GetInputStatus returned %#lx.\n", hr);
status = 0xdeadbeef; hr = IMediaObject_GetInputStatus(media_object, 0xdeadbeef, &status); - todo_wine ok(hr == DMO_E_INVALIDSTREAMINDEX, "GetInputStatus returned %#lx.\n", hr); ok(status == 0xdeadbeef, "Unexpected status %#lx.\n", status);
hr = IMediaObject_GetInputStatus(media_object, 0, NULL); - todo_wine ok(hr == E_POINTER, "GetInputStatus returned %#lx.\n", hr);
hr = IMediaObject_GetInputStatus(media_object, 0, &status); - todo_wine ok(hr == S_OK, "GetInputStatus returned %#lx.\n", hr); - todo_wine ok(status == DMO_INPUT_STATUSF_ACCEPT_DATA, "Unexpected status %#lx.\n", status);
/* Test Discontinuity. */ @@ -5610,9 +5605,7 @@ static void test_wmv_decoder_media_object(void) todo_wine ok(hr == S_OK, "Discontinuity returned %#lx.\n", hr); hr = IMediaObject_GetInputStatus(media_object, 0, &status); - todo_wine ok(hr == S_OK, "GetInputStatus returned %#lx.\n", hr); - todo_wine ok(status == DMO_INPUT_STATUSF_ACCEPT_DATA, "Unexpected status %#lx.\n", status);
/* Test Flush. */ diff --git a/dlls/winegstreamer/wmv_decoder.c b/dlls/winegstreamer/wmv_decoder.c index 82c69776bd6..75a7068a432 100644 --- a/dlls/winegstreamer/wmv_decoder.c +++ b/dlls/winegstreamer/wmv_decoder.c @@ -680,8 +680,16 @@ static HRESULT WINAPI media_object_FreeStreamingResources(IMediaObject *iface)
static HRESULT WINAPI media_object_GetInputStatus(IMediaObject *iface, DWORD index, DWORD *flags) { - FIXME("iface %p, index %lu, flags %p stub!\n", iface, index, flags); - return E_NOTIMPL; + TRACE("iface %p, index %lu, flags %p.\n", iface, index, flags); + + if (index > 0) + return DMO_E_INVALIDSTREAMINDEX; + if (!flags) + return E_POINTER; + + *flags = DMO_INPUT_STATUSF_ACCEPT_DATA; + + return S_OK; }
static HRESULT WINAPI media_object_ProcessInput(IMediaObject *iface, DWORD index,