mf/tests: Split IMFTransform tests to transform.c.

This commit is contained in:
Rémi Bernon 2022-09-08 09:01:32 +02:00 committed by Alexandre Julliard
parent bd8de2a882
commit db56d2f2a3
4 changed files with 4410 additions and 4267 deletions

View file

@ -1,7 +1,8 @@
TESTDLL = mf.dll
IMPORTS = mf mfplat mfuuid ole32 user32 propsys msdmo
IMPORTS = mf mfplat dmoguids mfuuid strmiids uuid wmcodecdspuuid ole32 user32 propsys msdmo
C_SRCS = \
mf.c
mf.c \
transform.c
RC_SRCS = resource.rc

File diff suppressed because it is too large Load diff

58
dlls/mf/tests/mf_test.h Normal file
View file

@ -0,0 +1,58 @@
/*
* Unit tests for mf.dll.
*
* Copyright 2017 Nikolay Sivov
* Copyright 2022 Rémi Bernon for CodeWeavers
*
* 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 <stdarg.h>
#include <string.h>
#define COBJMACROS
#include "windef.h"
#include "winbase.h"
#include "mfapi.h"
#include "mfidl.h"
#include "mftransform.h"
extern HRESULT (WINAPI *pMFCreateSampleCopierMFT)(IMFTransform **copier);
extern HRESULT (WINAPI *pMFGetTopoNodeCurrentType)(IMFTopologyNode *node, DWORD stream, BOOL output, IMFMediaType **type);
extern BOOL has_video_processor;
void init_functions(void);
struct attribute_desc
{
const GUID *key;
const char *name;
PROPVARIANT value;
BOOL ratio;
BOOL todo;
BOOL todo_value;
};
typedef struct attribute_desc media_type_desc[32];
#define ATTR_GUID(k, g, ...) {.key = &k, .name = #k, {.vt = VT_CLSID, .puuid = (GUID *)&g}, __VA_ARGS__ }
#define ATTR_UINT32(k, v, ...) {.key = &k, .name = #k, {.vt = VT_UI4, .ulVal = v}, __VA_ARGS__ }
#define ATTR_BLOB(k, p, n, ...) {.key = &k, .name = #k, {.vt = VT_VECTOR | VT_UI1, .caub = {.pElems = (void *)p, .cElems = n}}, __VA_ARGS__ }
#define ATTR_RATIO(k, n, d, ...) {.key = &k, .name = #k, {.vt = VT_UI8, .uhVal = {.HighPart = n, .LowPart = d}}, .ratio = TRUE, __VA_ARGS__ }
#define ATTR_UINT64(k, v, ...) {.key = &k, .name = #k, {.vt = VT_UI8, .uhVal = {.QuadPart = v}}, __VA_ARGS__ }
#define check_media_type(a, b, c) check_attributes_(__LINE__, (IMFAttributes *)a, b, c)
#define check_attributes(a, b, c) check_attributes_(__LINE__, a, b, c)
extern void check_attributes_(int line, IMFAttributes *attributes, const struct attribute_desc *desc, ULONG limit);
extern void init_media_type(IMFMediaType *mediatype, const struct attribute_desc *desc, ULONG limit);

4321
dlls/mf/tests/transform.c Normal file

File diff suppressed because it is too large Load diff