1
0
mirror of https://github.com/wine-mirror/wine synced 2024-07-08 03:45:57 +00:00

qcap: Use the Unix call helpers.

This commit is contained in:
Alexandre Julliard 2022-11-28 11:41:13 +01:00
parent c46d25b135
commit 15e044905b
3 changed files with 3 additions and 20 deletions

View File

@ -27,8 +27,6 @@
WINE_DEFAULT_DEBUG_CHANNEL(quartz);
HINSTANCE qcap_instance;
struct class_factory
{
IClassFactory IClassFactory_iface;
@ -109,16 +107,6 @@ static struct class_factory file_writer_cf = {{&class_factory_vtbl}, file_writer
static struct class_factory smart_tee_cf = {{&class_factory_vtbl}, smart_tee_create};
static struct class_factory vfw_capture_cf = {{&class_factory_vtbl}, vfw_capture_create};
BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, void *reserved)
{
if (reason == DLL_PROCESS_ATTACH)
{
qcap_instance = instance;
DisableThreadLibraryCalls(instance);
}
return TRUE;
}
HRESULT WINAPI DllGetClassObject(REFCLSID clsid, REFIID iid, void **out)
{
struct class_factory *factory;

View File

@ -30,8 +30,6 @@
#include "wine/debug.h"
#include "wine/strmbase.h"
extern HINSTANCE qcap_instance DECLSPEC_HIDDEN;
HRESULT audio_record_create(IUnknown *outer, IUnknown **out) DECLSPEC_HIDDEN;
HRESULT avi_compressor_create(IUnknown *outer, IUnknown **out) DECLSPEC_HIDDEN;
HRESULT avi_mux_create(IUnknown *outer, IUnknown **out) DECLSPEC_HIDDEN;

View File

@ -23,9 +23,7 @@
WINE_DEFAULT_DEBUG_CHANNEL(quartz);
static unixlib_handle_t v4l_handle;
#define V4L_CALL( func, params ) __wine_unix_call( v4l_handle, unix_ ## func, params )
#define V4L_CALL( func, params ) WINE_UNIX_CALL( unix_ ## func, params )
struct vfw_capture
{
@ -876,8 +874,7 @@ static const IAMVideoControlVtbl IAMVideoControl_VTable =
static BOOL WINAPI load_capture_funcs(INIT_ONCE *once, void *param, void **context)
{
NtQueryVirtualMemory( GetCurrentProcess(), qcap_instance, MemoryWineUnixFuncs,
&v4l_handle, sizeof(v4l_handle), NULL );
__wine_init_unix_call();
return TRUE;
}
@ -887,7 +884,7 @@ HRESULT vfw_capture_create(IUnknown *outer, IUnknown **out)
{
struct vfw_capture *object;
if (!InitOnceExecuteOnce(&init_once, load_capture_funcs, NULL, NULL) || !v4l_handle)
if (!InitOnceExecuteOnce(&init_once, load_capture_funcs, NULL, NULL) || !__wine_unixlib_handle)
return E_FAIL;
if (!(object = calloc(1, sizeof(*object))))