Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion UnityWebcam/UnityCamService/CapFilter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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))
{
Expand Down
2 changes: 1 addition & 1 deletion UnityWebcam/UnityCamService/CaptureSource.h
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
12 changes: 6 additions & 6 deletions UnityWebcam/UnityWebcam/UnityAPI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this API is commented out?

{
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);
//}
4 changes: 2 additions & 2 deletions UnityWebcam/UnityWebcam/UnityAPI.h
Original file line number Diff line number Diff line change
Expand Up @@ -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