Commit 15e04490 authored by Alexandre Julliard's avatar Alexandre Julliard

qcap: Use the Unix call helpers.

parent c46d25b1
...@@ -27,8 +27,6 @@ ...@@ -27,8 +27,6 @@
WINE_DEFAULT_DEBUG_CHANNEL(quartz); WINE_DEFAULT_DEBUG_CHANNEL(quartz);
HINSTANCE qcap_instance;
struct class_factory struct class_factory
{ {
IClassFactory IClassFactory_iface; IClassFactory IClassFactory_iface;
...@@ -109,16 +107,6 @@ static struct class_factory file_writer_cf = {{&class_factory_vtbl}, file_writer ...@@ -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 smart_tee_cf = {{&class_factory_vtbl}, smart_tee_create};
static struct class_factory vfw_capture_cf = {{&class_factory_vtbl}, vfw_capture_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) HRESULT WINAPI DllGetClassObject(REFCLSID clsid, REFIID iid, void **out)
{ {
struct class_factory *factory; struct class_factory *factory;
......
...@@ -30,8 +30,6 @@ ...@@ -30,8 +30,6 @@
#include "wine/debug.h" #include "wine/debug.h"
#include "wine/strmbase.h" #include "wine/strmbase.h"
extern HINSTANCE qcap_instance DECLSPEC_HIDDEN;
HRESULT audio_record_create(IUnknown *outer, IUnknown **out) DECLSPEC_HIDDEN; HRESULT audio_record_create(IUnknown *outer, IUnknown **out) DECLSPEC_HIDDEN;
HRESULT avi_compressor_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; HRESULT avi_mux_create(IUnknown *outer, IUnknown **out) DECLSPEC_HIDDEN;
......
...@@ -23,9 +23,7 @@ ...@@ -23,9 +23,7 @@
WINE_DEFAULT_DEBUG_CHANNEL(quartz); WINE_DEFAULT_DEBUG_CHANNEL(quartz);
static unixlib_handle_t v4l_handle; #define V4L_CALL( func, params ) WINE_UNIX_CALL( unix_ ## func, params )
#define V4L_CALL( func, params ) __wine_unix_call( v4l_handle, unix_ ## func, params )
struct vfw_capture struct vfw_capture
{ {
...@@ -876,8 +874,7 @@ static const IAMVideoControlVtbl IAMVideoControl_VTable = ...@@ -876,8 +874,7 @@ static const IAMVideoControlVtbl IAMVideoControl_VTable =
static BOOL WINAPI load_capture_funcs(INIT_ONCE *once, void *param, void **context) static BOOL WINAPI load_capture_funcs(INIT_ONCE *once, void *param, void **context)
{ {
NtQueryVirtualMemory( GetCurrentProcess(), qcap_instance, MemoryWineUnixFuncs, __wine_init_unix_call();
&v4l_handle, sizeof(v4l_handle), NULL );
return TRUE; return TRUE;
} }
...@@ -887,7 +884,7 @@ HRESULT vfw_capture_create(IUnknown *outer, IUnknown **out) ...@@ -887,7 +884,7 @@ HRESULT vfw_capture_create(IUnknown *outer, IUnknown **out)
{ {
struct vfw_capture *object; 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; return E_FAIL;
if (!(object = calloc(1, sizeof(*object)))) if (!(object = calloc(1, sizeof(*object))))
......
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