Skip to content

Added #ifdef CAMERA_CONTROL_USE_PS3EYE_DRIVER#179

Merged
thp merged 1 commit into
thp:masterfrom
ronin18:master
Jul 1, 2015
Merged

Added #ifdef CAMERA_CONTROL_USE_PS3EYE_DRIVER#179
thp merged 1 commit into
thp:masterfrom
ronin18:master

Conversation

@ronin18
Copy link
Copy Markdown
Contributor

@ronin18 ronin18 commented Jun 17, 2015

so cc->eye will only be used when configured

@cboulay
Copy link
Copy Markdown
Contributor

cboulay commented Jun 17, 2015

What does this do? You're already in an
#elif defined(PSMOVE_USE_PSEYE) // #if defined(CAMERA_CONTROL_USE_CL_DRIVER)
in a Windows-only function. How else does one use the PSEYE in Windows without the CL_DRIVER except with the PSEYEDriver?

What problem were you encountering?

@Lirrec
Copy link
Copy Markdown
Contributor

Lirrec commented Jun 17, 2015

CL also provides a standalone ps3eye driver ( without an SDK), which is configured via the registry settings which are set in the lines above the ifdef.
USE_PSEYE only enables this, while the usage of the pseyedriver is enabled via CAMERA_CONTROL_USE_PSEYE_DRIVER.

So there are actually three options: clsdk, cl driver via registry and pseye.

Also I think the cmakelists will never set CAMERA_CONTROL_USE_PSEYE_DRIVER on Windows atm, as it stills assumes it's osx only ( have to check this tomorrow )

@cboulay
Copy link
Copy Markdown
Contributor

cboulay commented Jun 17, 2015

Oh, I never heard about the CL driver that requires the registry. In fact, when I made psmoveapi work with PS3EYEDriver on Windows, I encountered the need for registry settings which didn't exist on my system, so I created a small .reg file that inserted those settings. However, I then realized that these registry settings were simply performing the same function as an .ini file was performing in Linux, so I changed the Windows implementation to use the ini file too. It's a surprise to me that these registry settings exist for another reason. Are you saying that modifying these registry entries is the only way to modify the camera settings when using this obscure driver?

If so, then I'll have to rethink a lot of my changes to the psmoveapi to make it work better in Windows (including supporting building in MSVC2013, see #163 which requires some work to address Thomas' comments and rebase it on the latest master).

I don't want people using the PS3EYEDriver to have to create these registry entries which are essentially useless to them, so I guess we'll have to make 3 separate paths.

@ronin18
Copy link
Copy Markdown
Contributor Author

ronin18 commented Jun 18, 2015

Compiling the project failed stating that 'CameraControl' has no member called 'eye'.
In the struct in camera_control_private.h the 'eye' member is enclosed in an
#if defined(CAMERA_CONTROL_USE_PS3EYE_DRIVER).
So I set up the #ifdef to keep the code from using this member.
Like @Lirrec said I'm using the CL Driver without the SDK.
Registry settings are the only option to control the cam.

Link to the driver: https://codelaboratories.com/products/eye/driver/

@cboulay
Copy link
Copy Markdown
Contributor

cboulay commented Jun 18, 2015

Now that I see the site, I remember that there were 2 different drivers. I was not aware that one required registry settings to control it and the other did not, nor that there were two different code paths in the psmoveapi for controlling them.

For now, I guess this patch can work around the issue. That's up to @thp.

In the future, I think we really should get the runtime camera detection working. Do you happen to know how to distinguish CL Eye driver vs CL Eye SDK vs PS3EYEDriver (vs kernel driver, vs iSight, vs other webcam) at runtime?

thp added a commit that referenced this pull request Jul 1, 2015
Added #ifdef CAMERA_CONTROL_USE_PS3EYE_DRIVER
@thp thp merged commit cc8cb0e into thp:master Jul 1, 2015
@thp
Copy link
Copy Markdown
Owner

thp commented Jul 1, 2015

Merged, thanks. Agree with @cboulay that we should think about which camera capture options we have and which ones we still support. If we can make all these decisions at runtime, that'd be even better, that would remove some compile-time options (we probably still need the CL Eye SDK compile-time option, or we simply remove it).

@cboulay
Copy link
Copy Markdown
Contributor

cboulay commented Jul 2, 2015

I've never used it, but I think the CL Eye SDK has the advantage that it enables the PSEye to be used as a regular webcam. Is that correct? If so, the CL Eye driver option will probably still be desirable to some users.

@ronin18
Copy link
Copy Markdown
Contributor Author

ronin18 commented Jul 3, 2015

The CL Driver also enables the PSEye as Webcam.
Iirc the only difference for the user is that the driver can only use one eye per computer.
The SDK can use multiple eyes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants