Commit 0070860e authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

mf: Return sink flags for SAR.

parent 509bef71
......@@ -99,9 +99,16 @@ static ULONG WINAPI audio_renderer_sink_Release(IMFMediaSink *iface)
static HRESULT WINAPI audio_renderer_sink_GetCharacteristics(IMFMediaSink *iface, DWORD *flags)
{
FIXME("%p, %p.\n", iface, flags);
struct audio_renderer *renderer = impl_from_IMFMediaSink(iface);
return E_NOTIMPL;
TRACE("%p, %p.\n", iface, flags);
if (renderer->is_shut_down)
return MF_E_SHUTDOWN;
*flags = MEDIASINK_FIXED_STREAMS | MEDIASINK_CAN_PREROLL;
return S_OK;
}
static HRESULT WINAPI audio_renderer_sink_AddStreamSink(IMFMediaSink *iface, DWORD stream_sink_id,
......
......@@ -2639,6 +2639,7 @@ static void test_sar(void)
MFCLOCK_STATE state;
DWORD flags, count;
IMFClock *clock;
IUnknown *unk;
HRESULT hr;
hr = CoInitialize(NULL);
......@@ -2693,6 +2694,14 @@ if (SUCCEEDED(hr))
ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
ok(count == 1, "Unexpected count %u.\n", count);
hr = IMFMediaSink_GetCharacteristics(sink, &flags);
ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
ok(flags == (MEDIASINK_FIXED_STREAMS | MEDIASINK_CAN_PREROLL), "Unexpected flags %#x.\n", flags);
hr = IMFMediaSink_QueryInterface(sink, &IID_IMFMediaSinkPreroll, (void **)&unk);
ok(hr == S_OK, "Failed to get interface, hr %#x.\n", hr);
IUnknown_Release(unk);
/* Shutdown */
hr = IMFMediaSink_Shutdown(sink);
ok(hr == S_OK, "Failed to shut down, hr %#x.\n", hr);
......@@ -2712,6 +2721,9 @@ if (SUCCEEDED(hr))
hr = IMFMediaSink_GetStreamSinkCount(sink, &count);
ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#x.\n", hr);
hr = IMFMediaSink_GetCharacteristics(sink, &flags);
ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#x.\n", hr);
IMFMediaSink_Release(sink);
/* Activation */
......@@ -2727,7 +2739,6 @@ if (SUCCEEDED(hr))
IMFMediaSink_Release(sink2);
hr = IMFMediaSink_GetCharacteristics(sink, &flags);
todo_wine
ok(hr == S_OK, "Failed to get sink flags, hr %#x.\n", hr);
hr = IMFActivate_ShutdownObject(activate);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment