Commit 5a919ad6 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

mf/tests: Add a test for SAR time source.

parent d5b79e6a
......@@ -2552,6 +2552,38 @@ static void test_quality_manager(void)
IMFQualityManager_Release(manager);
}
static void test_sar(void)
{
IMFPresentationTimeSource *time_source;
IMFMediaSink *sink;
HRESULT hr;
hr = CoInitialize(NULL);
ok(hr == S_OK, "Failed to initialize, hr %#x.\n", hr);
hr = MFCreateAudioRenderer(NULL, &sink);
if (hr == MF_E_NO_AUDIO_PLAYBACK_DEVICE)
{
skip("No audio playback device available.\n");
CoUninitialize();
return;
}
todo_wine
ok(hr == S_OK, "Failed to create renderer, hr %#x.\n", hr);
if (SUCCEEDED(hr))
{
hr = IMFMediaSink_QueryInterface(sink, &IID_IMFPresentationTimeSource, (void **)&time_source);
ok(hr == S_OK, "Failed to get time source interface, hr %#x.\n", hr);
IMFPresentationTimeSource_Release(time_source);
IMFMediaSink_Release(sink);
}
CoUninitialize();
}
START_TEST(mf)
{
test_topology();
......@@ -2564,4 +2596,5 @@ START_TEST(mf)
test_sample_grabber();
test_video_processor();
test_quality_manager();
test_sar();
}
......@@ -108,6 +108,18 @@
#define MF_E_SINK_NO_SAMPLES_PROCESSED _HRESULT_TYPEDEF_(0xc00d4a44)
#define MF_E_SINK_HEADERS_NOT_FOUND _HRESULT_TYPEDEF_(0xc00d4a45)
#define MF_E_VIDEO_REN_NO_PROCAMP_HW _HRESULT_TYPEDEF_(0xc00d4e20)
#define MF_E_VIDEO_REN_NO_DEINTERLACE_HW _HRESULT_TYPEDEF_(0xc00d4e21)
#define MF_E_VIDEO_REN_COPYPROT_FAILED _HRESULT_TYPEDEF_(0xc00d4e22)
#define MF_E_VIDEO_REN_SURFACE_NOT_SHARED _HRESULT_TYPEDEF_(0xc00d4e23)
#define MF_E_VIDEO_DEVICE_LOCKED _HRESULT_TYPEDEF_(0xc00d4e24)
#define MF_E_NEW_VIDEO_DEVICE _HRESULT_TYPEDEF_(0xc00d4e25)
#define MF_E_NO_VIDEO_SAMPLE_AVAILABLE _HRESULT_TYPEDEF_(0xc00d4e26)
#define MF_E_NO_AUDIO_PLAYBACK_DEVICE _HRESULT_TYPEDEF_(0xc00d4e84)
#define MF_E_AUDIO_PLAYBACK_DEVICE_IN_USE _HRESULT_TYPEDEF_(0xc00d4e85)
#define MF_E_AUDIO_PLAYBACK_DEVICE_INVALIDATED _HRESULT_TYPEDEF_(0xc00d4e86)
#define MF_E_AUDIO_SERVICE_NOT_RUNNING _HRESULT_TYPEDEF_(0xc00d4e87)
#define MF_E_TOPO_INVALID_OPTIONAL_NODE _HRESULT_TYPEDEF_(0xc00d520e)
#define MF_E_TOPO_CANNOT_FIND_DECRYPTOR _HRESULT_TYPEDEF_(0xc00d5211)
#define MF_E_TOPO_CODEC_NOT_FOUND _HRESULT_TYPEDEF_(0xc00d5212)
......
......@@ -567,6 +567,8 @@ interface IMFSampleGrabberSinkCallback2 : IMFSampleGrabberSinkCallback
}
cpp_quote("HRESULT WINAPI CreatePropertyStore(IPropertyStore **store);")
cpp_quote("HRESULT WINAPI MFCreateAudioRenderer(IMFAttributes *config, IMFMediaSink **sink);")
cpp_quote("HRESULT WINAPI MFCreateAudioRendererActivate(IMFActivate **activate);")
cpp_quote("HRESULT WINAPI MFCreateMediaSession(IMFAttributes *config, IMFMediaSession **session);")
cpp_quote("HRESULT WINAPI MFCreateMFByteStreamOnStream(IStream *stream, IMFByteStream **bytestream);" )
cpp_quote("HRESULT WINAPI MFCreateMFByteStreamOnStreamEx(IUnknown *stream, IMFByteStream **bytestream);")
......
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