evr/tests: Add basic creation test for default mixer object.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
f5e342b2a6
commit
d492f7bbf8
|
@ -1,10 +1,12 @@
|
|||
MODULE = evr.dll
|
||||
IMPORTLIB = evr
|
||||
IMPORTS = mfuuid strmiids strmbase uuid ole32 oleaut32
|
||||
|
||||
EXTRADLLFLAGS = -mno-cygwin
|
||||
|
||||
C_SRCS = \
|
||||
evr.c \
|
||||
main.c
|
||||
main.c \
|
||||
mixer.c
|
||||
|
||||
IDL_SRCS = evr_classes.idl
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
@ stub MFCreateVideoMediaTypeFromSubtype
|
||||
@ stub MFCreateVideoMediaTypeFromVideoInfoHeader2
|
||||
@ stub MFCreateVideoMediaTypeFromVideoInfoHeader
|
||||
@ stub MFCreateVideoMixer
|
||||
@ stdcall MFCreateVideoMixer(ptr ptr ptr ptr)
|
||||
@ stub MFCreateVideoMixerAndPresenter
|
||||
@ stub MFCreateVideoOTA
|
||||
@ stub MFCreateVideoPresenter2
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
/*
|
||||
* Copyright 2020 Nikolay Sivov
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include "wine/debug.h"
|
||||
#include "evr.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(evr);
|
||||
|
||||
HRESULT WINAPI MFCreateVideoMixer(IUnknown *owner, REFIID riid_device, REFIID riid, void **obj)
|
||||
{
|
||||
FIXME("%p, %s, %s, %p.\n", owner, debugstr_guid(riid_device), debugstr_guid(riid), obj);
|
||||
return E_NOTIMPL;
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
TESTDLL = evr.dll
|
||||
IMPORTS = mfuuid strmiids uuid ole32 oleaut32
|
||||
IMPORTS = mfuuid strmiids uuid dxguid ole32 oleaut32 evr
|
||||
|
||||
C_SRCS = \
|
||||
evr.c
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
#include "dshow.h"
|
||||
#include "wine/test.h"
|
||||
#include "d3d9.h"
|
||||
#include "evr.h"
|
||||
#include "initguid.h"
|
||||
#include "dxva2api.h"
|
||||
|
||||
|
@ -337,6 +338,36 @@ static void test_pin_info(void)
|
|||
ok(!ref, "Got outstanding refcount %d.\n", ref);
|
||||
}
|
||||
|
||||
static void test_default_mixer(void)
|
||||
{
|
||||
IMFTransform *transform;
|
||||
IUnknown *unk;
|
||||
HRESULT hr;
|
||||
|
||||
hr = MFCreateVideoMixer(NULL, &IID_IDirect3DDevice9, &IID_IMFTransform, (void **)&transform);
|
||||
todo_wine
|
||||
ok(hr == S_OK, "Failed to create default mixer, hr %#x.\n", hr);
|
||||
if (FAILED(hr))
|
||||
return;
|
||||
|
||||
hr = IMFTransform_QueryInterface(transform, &IID_IMFTopologyServiceLookupClient, (void **)&unk);
|
||||
ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
|
||||
IUnknown_Release(unk);
|
||||
|
||||
hr = IMFTransform_QueryInterface(transform, &IID_IMFVideoDeviceID, (void **)&unk);
|
||||
ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
|
||||
IUnknown_Release(unk);
|
||||
|
||||
IMFTransform_Release(transform);
|
||||
|
||||
hr = MFCreateVideoMixer(NULL, &IID_IMFTransform, &IID_IMFTransform, (void **)&transform);
|
||||
ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr);
|
||||
|
||||
hr = CoCreateInstance(&CLSID_MFVideoMixer9, NULL, CLSCTX_INPROC_SERVER, &IID_IMFTransform, (void **)&transform);
|
||||
ok(hr == S_OK, "Failed to create default mixer, hr %#x.\n", hr);
|
||||
IMFTransform_Release(transform);
|
||||
}
|
||||
|
||||
START_TEST(evr)
|
||||
{
|
||||
CoInitialize(NULL);
|
||||
|
@ -346,6 +377,7 @@ START_TEST(evr)
|
|||
test_enum_pins();
|
||||
test_find_pin();
|
||||
test_pin_info();
|
||||
test_default_mixer();
|
||||
|
||||
CoUninitialize();
|
||||
}
|
||||
|
|
|
@ -107,3 +107,57 @@ interface IMFVideoRenderer : IUnknown
|
|||
[in] IMFVideoPresenter *pVideoPresenter
|
||||
);
|
||||
}
|
||||
|
||||
typedef enum _MF_SERVICE_LOOKUP_TYPE
|
||||
{
|
||||
MF_SERVICE_LOOKUP_UPSTREAM,
|
||||
MF_SERVICE_LOOKUP_UPSTREAM_DIRECT,
|
||||
MF_SERVICE_LOOKUP_DOWNSTREAM,
|
||||
MF_SERVICE_LOOKUP_DOWNSTREAM_DIRECT,
|
||||
MF_SERVICE_LOOKUP_ALL,
|
||||
MF_SERVICE_LOOKUP_GLOBAL,
|
||||
} MF_SERVICE_LOOKUP_TYPE;
|
||||
|
||||
[
|
||||
object,
|
||||
uuid(fa993889-4383-415a-a930-dd472a8cf6f7),
|
||||
local
|
||||
]
|
||||
interface IMFTopologyServiceLookup : IUnknown
|
||||
{
|
||||
HRESULT LookupService(
|
||||
[in] MF_SERVICE_LOOKUP_TYPE lookup_type,
|
||||
[in] DWORD index,
|
||||
[in] REFGUID service,
|
||||
[in] REFIID riid,
|
||||
[out, iid_is(riid)] void **objects,
|
||||
[in, out] DWORD *num_objects
|
||||
);
|
||||
}
|
||||
|
||||
[
|
||||
object,
|
||||
uuid(fa99388a-4383-415a-a930-dd472a8cf6f7),
|
||||
local
|
||||
]
|
||||
interface IMFTopologyServiceLookupClient : IUnknown
|
||||
{
|
||||
HRESULT InitServicePointers(
|
||||
[in] IMFTopologyServiceLookup *service_lookup
|
||||
);
|
||||
HRESULT ReleaseServicePointers();
|
||||
}
|
||||
|
||||
[
|
||||
object,
|
||||
uuid(a38d9567-5a9c-4f3c-b293-8eb415b279ba),
|
||||
local
|
||||
]
|
||||
interface IMFVideoDeviceID : IUnknown
|
||||
{
|
||||
HRESULT GetDeviceID(
|
||||
[out] IID *device_id
|
||||
);
|
||||
}
|
||||
|
||||
cpp_quote("HRESULT WINAPI MFCreateVideoMixer(IUnknown *owner, REFIID riid_device, REFIID riid, void **obj);")
|
||||
|
|
Loading…
Reference in New Issue