Commit 8827eb6a authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

evr/mixer: Return initial mixing preferences.

parent 3d8d05db
......@@ -73,6 +73,7 @@ struct video_mixer
IDirect3DDeviceManager9 *device_manager;
IMediaEventSink *event_sink;
IMFAttributes *attributes;
unsigned int mixing_flags;
CRITICAL_SECTION cs;
};
......@@ -1008,16 +1009,31 @@ static HRESULT WINAPI video_mixer_control_GetStreamOutputRect(IMFVideoMixerContr
static HRESULT WINAPI video_mixer_control_SetMixingPrefs(IMFVideoMixerControl2 *iface, DWORD flags)
{
FIXME("%p, %#x.\n", iface, flags);
struct video_mixer *mixer = impl_from_IMFVideoMixerControl2(iface);
return E_NOTIMPL;
TRACE("%p, %#x.\n", iface, flags);
EnterCriticalSection(&mixer->cs);
mixer->mixing_flags = flags;
LeaveCriticalSection(&mixer->cs);
return S_OK;
}
static HRESULT WINAPI video_mixer_control_GetMixingPrefs(IMFVideoMixerControl2 *iface, DWORD *flags)
{
FIXME("%p, %p.\n", iface, flags);
struct video_mixer *mixer = impl_from_IMFVideoMixerControl2(iface);
return E_NOTIMPL;
TRACE("%p, %p.\n", iface, flags);
if (!flags)
return E_POINTER;
EnterCriticalSection(&mixer->cs);
*flags = mixer->mixing_flags;
LeaveCriticalSection(&mixer->cs);
return S_OK;
}
static const IMFVideoMixerControl2Vtbl video_mixer_control_vtbl =
......
......@@ -414,6 +414,7 @@ static void test_default_mixer(void)
{
DWORD input_min, input_max, output_min, output_max;
IMFAttributes *attributes, *attributes2;
IMFVideoMixerControl2 *mixer_control2;
MFT_OUTPUT_STREAM_INFO output_info;
MFT_INPUT_STREAM_INFO input_info;
DWORD input_count, output_count;
......@@ -424,12 +425,12 @@ static void test_default_mixer(void)
IMFTransform *transform;
DXVA2_ValueRange range;
DXVA2_Fixed32 value;
DWORD flags, count;
IMFGetService *gs;
COLORREF color;
unsigned int i;
DWORD ids[16];
IUnknown *unk;
DWORD count;
GUID *guids;
HRESULT hr;
IID iid;
......@@ -455,6 +456,18 @@ static void test_default_mixer(void)
ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
IUnknown_Release(unk);
if (SUCCEEDED(IMFGetService_GetService(gs, &MR_VIDEO_MIXER_SERVICE, &IID_IMFVideoMixerControl2, (void **)&mixer_control2)))
{
hr = IMFVideoMixerControl2_GetMixingPrefs(mixer_control2, NULL);
ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr);
hr = IMFVideoMixerControl2_GetMixingPrefs(mixer_control2, &flags);
ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
ok(!flags, "Unexpected flags %#x.\n", flags);
IMFVideoMixerControl2_Release(mixer_control2);
}
hr = IMFVideoProcessor_GetBackgroundColor(processor, NULL);
ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr);
......
......@@ -184,6 +184,16 @@ interface IMFVideoMixerControl : IUnknown
);
}
typedef enum _MFVideoMixPrefs
{
MFVideoMixPrefs_ForceHalfInterlace = 0x00000001,
MFVideoMixPrefs_AllowDropToHalfInterlace = 0x00000002,
MFVideoMixPrefs_AllowDropToBob = 0x00000004,
MFVideoMixPrefs_ForceBob = 0x00000008,
MFVideoMixPrefs_EnableRotation = 0x00000010,
MFVideoMixPrefs_Mask = 0x0000001f,
} MFVideoMixPrefs;
[
object,
uuid(8459616d-966e-4930-b658-54fa7e5a16d3)
......
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