diff --git a/dlls/evr/mixer.c b/dlls/evr/mixer.c index 54da3a9ce1c..631cc796ea0 100644 --- a/dlls/evr/mixer.c +++ b/dlls/evr/mixer.c @@ -79,6 +79,8 @@ struct video_mixer IMFAttributes *attributes; IMFAttributes *internal_attributes; unsigned int mixing_flags; + LONGLONG lower_bound; + LONGLONG upper_bound; CRITICAL_SECTION cs; }; @@ -814,9 +816,18 @@ static HRESULT WINAPI video_mixer_transform_GetOutputStatus(IMFTransform *iface, static HRESULT WINAPI video_mixer_transform_SetOutputBounds(IMFTransform *iface, LONGLONG lower, LONGLONG upper) { - FIXME("%p, %s, %s.\n", iface, wine_dbgstr_longlong(lower), wine_dbgstr_longlong(upper)); + struct video_mixer *mixer = impl_from_IMFTransform(iface); - return E_NOTIMPL; + TRACE("%p, %s, %s.\n", iface, wine_dbgstr_longlong(lower), wine_dbgstr_longlong(upper)); + + EnterCriticalSection(&mixer->cs); + + mixer->lower_bound = lower; + mixer->upper_bound = upper; + + LeaveCriticalSection(&mixer->cs); + + return S_OK; } static HRESULT WINAPI video_mixer_transform_ProcessEvent(IMFTransform *iface, DWORD id, IMFMediaEvent *event) @@ -1879,6 +1890,8 @@ HRESULT evr_mixer_create(IUnknown *outer, void **out) object->outer_unk = outer ? outer : &object->IUnknown_inner; object->refcount = 1; object->input_count = 1; + object->lower_bound = MFT_OUTPUT_BOUND_LOWER_UNBOUNDED; + object->upper_bound = MFT_OUTPUT_BOUND_UPPER_UNBOUNDED; video_mixer_init_input(&object->inputs[0]); InitializeCriticalSection(&object->cs); if (FAILED(hr = MFCreateAttributes(&object->attributes, 0))) diff --git a/dlls/evr/tests/evr.c b/dlls/evr/tests/evr.c index 175c30e8188..13a07c42c5d 100644 --- a/dlls/evr/tests/evr.c +++ b/dlls/evr/tests/evr.c @@ -531,6 +531,9 @@ todo_wine ok(hr == S_OK, "Unexpected hr %#x.\n", hr); IUnknown_Release(unk); + hr = IMFTransform_SetOutputBounds(transform, 100, 10); + ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + hr = IMFTransform_QueryInterface(transform, &IID_IMFVideoDeviceID, (void **)&deviceid); ok(hr == S_OK, "Unexpected hr %#x.\n", hr); diff --git a/include/basetsd.h b/include/basetsd.h index c9f5c90e863..7087b592d1a 100644 --- a/include/basetsd.h +++ b/include/basetsd.h @@ -265,6 +265,8 @@ typedef ULONG_PTR SIZE_T, *PSIZE_T; typedef ULONG_PTR KAFFINITY, *PKAFFINITY; +#define MINLONGLONG ((LONGLONG)~MAXLONGLONG) + /* Some Wine-specific definitions */ /* Architecture dependent settings. */ diff --git a/include/mftransform.idl b/include/mftransform.idl index 1b402a5cc77..3f4b5500204 100644 --- a/include/mftransform.idl +++ b/include/mftransform.idl @@ -18,6 +18,9 @@ import "mfobjects.idl"; +cpp_quote("#define MFT_OUTPUT_BOUND_LOWER_UNBOUNDED MINLONGLONG") +cpp_quote("#define MFT_OUTPUT_BOUND_UPPER_UNBOUNDED MAXLONGLONG") + typedef [v1_enum] enum _MFT_MESSAGE_TYPE { MFT_MESSAGE_COMMAND_FLUSH = 0x00000000,