mf: Add missing IMFMediaEventGenerator query support for sample grabber stream.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
c169bfb428
commit
c17994c218
|
@ -141,6 +141,7 @@ static HRESULT WINAPI sample_grabber_stream_QueryInterface(IMFStreamSink *iface,
|
||||||
TRACE("%p, %s, %p.\n", iface, debugstr_guid(riid), obj);
|
TRACE("%p, %s, %p.\n", iface, debugstr_guid(riid), obj);
|
||||||
|
|
||||||
if (IsEqualIID(riid, &IID_IMFStreamSink) ||
|
if (IsEqualIID(riid, &IID_IMFStreamSink) ||
|
||||||
|
IsEqualIID(riid, &IID_IMFMediaEventGenerator) ||
|
||||||
IsEqualIID(riid, &IID_IUnknown))
|
IsEqualIID(riid, &IID_IUnknown))
|
||||||
{
|
{
|
||||||
*obj = &grabber->IMFStreamSink_iface;
|
*obj = &grabber->IMFStreamSink_iface;
|
||||||
|
|
|
@ -2028,6 +2028,10 @@ static void test_sample_grabber(void)
|
||||||
hr = IMFMediaSink_GetStreamSinkByIndex(sink, 0, &stream);
|
hr = IMFMediaSink_GetStreamSinkByIndex(sink, 0, &stream);
|
||||||
ok(hr == S_OK, "Failed to get sink stream, hr %#x.\n", hr);
|
ok(hr == S_OK, "Failed to get sink stream, hr %#x.\n", hr);
|
||||||
|
|
||||||
|
hr = IMFStreamSink_QueryInterface(stream, &IID_IMFMediaEventGenerator, (void **)&unk);
|
||||||
|
ok(hr == S_OK, "Failed to get interface, hr %#x.\n", hr);
|
||||||
|
IUnknown_Release(unk);
|
||||||
|
|
||||||
hr = IMFStreamSink_GetIdentifier(stream, &id);
|
hr = IMFStreamSink_GetIdentifier(stream, &id);
|
||||||
ok(hr == S_OK, "Failed to get stream id, hr %#x.\n", hr);
|
ok(hr == S_OK, "Failed to get stream id, hr %#x.\n", hr);
|
||||||
ok(id == 0, "Unexpected id %#x.\n", id);
|
ok(id == 0, "Unexpected id %#x.\n", id);
|
||||||
|
|
Loading…
Reference in New Issue