quartz/vmr9: Implement IVMRFilterConfig9::GetNumberOfStreams().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
14decee4ca
commit
2d77107823
|
@ -170,16 +170,14 @@ static void test_filter_config(void)
|
|||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||
|
||||
hr = IVMRFilterConfig9_GetNumberOfStreams(config, &count);
|
||||
todo_wine ok(hr == VFW_E_VMR_NOT_IN_MIXER_MODE, "Got hr %#x.\n", hr);
|
||||
ok(hr == VFW_E_VMR_NOT_IN_MIXER_MODE, "Got hr %#x.\n", hr);
|
||||
|
||||
hr = IVMRFilterConfig9_SetNumberOfStreams(config, 3);
|
||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||
|
||||
hr = IVMRFilterConfig9_GetNumberOfStreams(config, &count);
|
||||
todo_wine {
|
||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||
ok(count == 3, "Got count %u.\n", count);
|
||||
}
|
||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||
ok(count == 3, "Got count %u.\n", count);
|
||||
|
||||
hr = IVMRFilterConfig9_GetRenderingMode(config, &mode);
|
||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||
|
@ -195,10 +193,8 @@ static void test_filter_config(void)
|
|||
ok(mode == VMR9Mode_Windowless, "Got mode %#x.\n", mode);
|
||||
|
||||
hr = IVMRFilterConfig9_GetNumberOfStreams(config, &count);
|
||||
todo_wine {
|
||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||
ok(count == 3, "Got count %u.\n", count);
|
||||
}
|
||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||
ok(count == 3, "Got count %u.\n", count);
|
||||
|
||||
ref = IVMRFilterConfig9_Release(config);
|
||||
ok(!ref, "Got outstanding refcount %d.\n", ref);
|
||||
|
@ -3147,14 +3143,14 @@ static void test_mixing_mode(void)
|
|||
ok(hr == E_NOINTERFACE, "Got hr %#x.\n", hr);
|
||||
|
||||
hr = IVMRFilterConfig9_GetNumberOfStreams(config, &stream_count);
|
||||
todo_wine ok(hr == VFW_E_VMR_NOT_IN_MIXER_MODE, "Got hr %#x.\n", hr);
|
||||
ok(hr == VFW_E_VMR_NOT_IN_MIXER_MODE, "Got hr %#x.\n", hr);
|
||||
|
||||
hr = IVMRFilterConfig9_SetNumberOfStreams(config, 1);
|
||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||
|
||||
hr = IVMRFilterConfig9_GetNumberOfStreams(config, &stream_count);
|
||||
todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||
todo_wine ok(stream_count == 1, "Got %u streams.\n", stream_count);
|
||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||
ok(stream_count == 1, "Got %u streams.\n", stream_count);
|
||||
|
||||
hr = IBaseFilter_QueryInterface(filter, &IID_IVMRMixerControl9, (void **)&mixer_control);
|
||||
todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||
|
@ -3165,8 +3161,8 @@ static void test_mixing_mode(void)
|
|||
ok(hr == VFW_E_WRONG_STATE, "Got hr %#x.\n", hr);
|
||||
|
||||
hr = IVMRFilterConfig9_GetNumberOfStreams(config, &stream_count);
|
||||
todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||
todo_wine ok(stream_count == 1, "Got %u streams.\n", stream_count);
|
||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||
ok(stream_count == 1, "Got %u streams.\n", stream_count);
|
||||
|
||||
IVMRFilterConfig9_Release(config);
|
||||
ref = IBaseFilter_Release(filter);
|
||||
|
@ -3195,7 +3191,7 @@ static void test_mixing_mode(void)
|
|||
todo_wine ok(hr == VFW_E_WRONG_STATE, "Got hr %#x.\n", hr);
|
||||
|
||||
hr = IVMRFilterConfig9_GetNumberOfStreams(config, &stream_count);
|
||||
todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||
todo_wine ok(stream_count == 4, "Got %u streams.\n", stream_count);
|
||||
|
||||
IVMRWindowlessControl9_Release(windowless_control);
|
||||
|
|
|
@ -1301,12 +1301,24 @@ static HRESULT WINAPI VMR9FilterConfig_SetNumberOfStreams(IVMRFilterConfig9 *ifa
|
|||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI VMR9FilterConfig_GetNumberOfStreams(IVMRFilterConfig9 *iface, DWORD *max)
|
||||
static HRESULT WINAPI VMR9FilterConfig_GetNumberOfStreams(IVMRFilterConfig9 *iface, DWORD *count)
|
||||
{
|
||||
struct quartz_vmr *This = impl_from_IVMRFilterConfig9(iface);
|
||||
struct quartz_vmr *filter = impl_from_IVMRFilterConfig9(iface);
|
||||
|
||||
FIXME("(%p/%p)->(%p) stub\n", iface, This, max);
|
||||
return E_NOTIMPL;
|
||||
TRACE("filter %p, count %p.\n", filter, count);
|
||||
|
||||
EnterCriticalSection(&filter->renderer.filter.csFilter);
|
||||
|
||||
if (!filter->stream_count)
|
||||
{
|
||||
LeaveCriticalSection(&filter->renderer.filter.csFilter);
|
||||
return VFW_E_VMR_NOT_IN_MIXER_MODE;
|
||||
}
|
||||
|
||||
*count = filter->stream_count;
|
||||
|
||||
LeaveCriticalSection(&filter->renderer.filter.csFilter);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI VMR9FilterConfig_SetRenderingPrefs(IVMRFilterConfig9 *iface, DWORD renderflags)
|
||||
|
|
Loading…
Reference in New Issue