I'm currently trying to fix CORE-16350.
The bug described there is the Windows Media Encoder 9 from Rapps fails to install due to missing qcap.dll.
I'm importing this dll from Wine (Staging) 4.14. There are no any Staging patches for qcap, as I see, so it's completely identical in both Wine versions.
I had a lot of compilation errors after importing it. For now, I was able to fix most of them, but I still have one error during compilation:
Code: Select all
In file included from ../dll/directx/wine/qcap/precomp.h:26:0:
../dll/directx/wine/qcap/capture.h:26:27: error: unknown type name 'BaseOutputPin'
Of course, I enabled imported qcap in dll/directx/wine/CMakeLists.txt and wrote dll/directx/wine/qcap/CMakeLists.txt for this. Also I added precomp.h with needed headers included. Here is a code of it:
Code: Select all
#ifndef _QCAP_PRECOMP_H_
#define _QCAP_PRECOMP_H_
#include <wine/config.h>
#include <assert.h>
#define WIN32_LEAN_AND_MEAN
#define WIN32_NO_STATUS
#define _INC_WINDOWS
#define COBJMACROS
#include "windef.h"
#include "winbase.h"
#include "wtypes.h"
#include "wingdi.h"
#include "winuser.h"
#include "dshow.h"
#include <wine/unicode.h>
#include <wine/debug.h>
#include "capture.h"
#include "qcap_main.h"
#endif /* !_QCAP_PRECOMP_H_ */
Code: Select all
add_definitions(-D__WINESRC__)
include_directories(${REACTOS_SOURCE_DIR}/sdk/include/reactos/wine)
spec2def(qcap.dll qcap.spec)
list(APPEND SOURCE
audiorecord.c
avico.c
avimux.c
capturegraph.c
enummedia.c
qcap_main.c
smartteefilter.c
v4l.c
vfwcapture.c
precomp.h)
add_library(qcap MODULE
${SOURCE}
version.rc
${CMAKE_CURRENT_BINARY_DIR}/qcap.def)
set_module_type(qcap win32dll)
target_link_libraries(qcap strmbase strmiids uuid wine)
add_importlibs(qcap ole32 oleaut32 gdi32 advapi32 msvcrt kernel32 ntdll)
add_delay_importlibs(qcap msvfw32)
add_pch(qcap precomp.h SOURCE)
add_cd_file(TARGET qcap DESTINATION reactos/system32 FOR all)
Qcap sources itself you can see here: https://source.winehq.org/git/wine.git/ ... /dlls/qcap
I didn't modify them, added as-is.
As I found out, BaseOutputPin is already defined in sdk/include/reactos/wine/strmbase.h:
https://git.reactos.org/?p=reactos.git; ... b=HEAD#l63
which is included in qcap_main.c. The last one I included in my precomp.h, both with capture.h, same as it done in other DirectX dlls (include all headers except private header).
If to include strmbase.h in capture.h, it brokes compilation more again. But without doing it, I have an error described above.
Question is, why it still fails? Probably some needed headers are still missing in my precomp.h? If so, which ones? Or maybe it needs some ReactOS-specific hacks/workarounds? Thanks.