diff --git a/UnityWebcam/UnityCamService/CapFilter.cpp b/UnityWebcam/UnityCamService/CapFilter.cpp index 2d3ca1e..7fa3424 100644 --- a/UnityWebcam/UnityCamService/CapFilter.cpp +++ b/UnityWebcam/UnityCamService/CapFilter.cpp @@ -114,7 +114,7 @@ STDAPI DllRegisterServer() RegOpenKeyEx(HKEY_LOCAL_MACHINE, str_video_capture_device_key.c_str(), 0, KEY_ALL_ACCESS, &hKey); LPCSTR value = ("DevicePath"); LPCSTR data = "foo:bar"; - RegSetValueExA(hKey, value, 0, REG_SZ, (LPBYTE)data, strlen(data) + 1); + RegSetValueExA(hKey, value, 0, REG_SZ, (LPBYTE)data, (DWORD)strlen(data) + 1); RegCloseKey(hKey); if (!SUCCEEDED(res)) { diff --git a/UnityWebcam/UnityCamService/CaptureSource.h b/UnityWebcam/UnityCamService/CaptureSource.h index 97c0c83..474ea80 100644 --- a/UnityWebcam/UnityCamService/CaptureSource.h +++ b/UnityWebcam/UnityCamService/CaptureSource.h @@ -38,7 +38,7 @@ class CaptureSource : private: HRESULT Init(CaptureSharedMemory* pReceiver, int fps); - class CaptureStream : public CSourceStream, public IAMStreamControl, public IKsPropertySet, public IAMStreamConfig, public IAMPushSource, public IAMLatency + class CaptureStream : public CSourceStream, public IAMStreamControl, public IKsPropertySet, public IAMStreamConfig, public IAMPushSource { public: diff --git a/UnityWebcam/UnityWebcam/UnityAPI.cpp b/UnityWebcam/UnityWebcam/UnityAPI.cpp index b8d91b2..876f50a 100644 --- a/UnityWebcam/UnityWebcam/UnityAPI.cpp +++ b/UnityWebcam/UnityWebcam/UnityAPI.cpp @@ -30,9 +30,9 @@ extern "C" UNITY_INTERFACE_EXPORT bool SendTexture(void* wrapper, void* TextureI } -extern "C" __declspec(dllexport) bool SendTexture(const unsigned char* data, int width, int height) -{ - if (!wrapper) - wrapper = new SharedImageWrapper(); - wrapper->SendImage(data, width, height); -} +//extern "C" __declspec(dllexport) bool SendTexture(const unsigned char* data, int width, int height) +//{ +// if (!wrapper) +// wrapper = new SharedImageWrapper(); +// wrapper->SendImage(data, width, height); +//} diff --git a/UnityWebcam/UnityWebcam/UnityAPI.h b/UnityWebcam/UnityWebcam/UnityAPI.h index d4783e7..1ea8dab 100644 --- a/UnityWebcam/UnityWebcam/UnityAPI.h +++ b/UnityWebcam/UnityWebcam/UnityAPI.h @@ -8,8 +8,8 @@ extern "C" UNITY_INTERFACE_EXPORT void* CreateTextureWrapper(); extern "C" UNITY_INTERFACE_EXPORT void DeleteTextureWrapper(void* wrapper); extern "C" UNITY_INTERFACE_EXPORT bool SendTexture(void* wrapper,void* TextureID); -extern "C" __declspec(dllexport) bool SendTexture(const unsigned char* data, int width, int height); -SharedImageWrapper* wrapper; +//extern "C" __declspec(dllexport) bool SendTexture(const unsigned char* data, int width, int height); +//SharedImageWrapper* wrapper; #endif