jkevin / PS3EyeDirectShow

DirectShow source filter for PS3 Eye via WinUSB
GNU General Public License v3.0
326 stars 45 forks source link

60 FPS support #14

Open StanislawMinksztym opened 3 years ago

StanislawMinksztym commented 3 years ago

Hi,

Would it be possible to have this driver set the ps3 eye framerate to 60fps?

alkapone312 commented 3 years ago

I'm writing openCV program and there is an option to change camera fps or resolution, i would rather suggest somehow allowing to mess with gain, exposure and other values too. But anyways, without this driver i would be lost. So thanks @jkevin :D

mirh commented 3 years ago

https://github.com/jkevin/PS3EyeDirectShow/blob/1.0b2/DirectShowFilter/PS3EyePushPin.cpp#L64L87 It seems hardcoded here.. maybe it's just one line to adjust?

mangkoran commented 3 years ago

Is there any way how to do this? I want to use this driver as it supports webcam usage, but the frame rate holds me back.

minch-dev commented 2 years ago

Is there any way how to do this? I want to use this driver as it supports webcam usage, but the frame rate holds me back.

Just fix the hardcoded values mentioned above and compile, should work.

Lunaero1 commented 2 years ago

Is there any way how to do this? I want to use this driver as it supports webcam usage, but the frame rate holds me back.

Just fix the hardcoded values mentioned above and compile, should work.

exactly what values do I change? I see several FPS values in the cpp file but I do not know WHAT EXACTLY is to be changed for 60fps support image

haze1986 commented 2 years ago

Is there any way how to do this? I want to use this driver as it supports webcam usage, but the frame rate holds me back.

Just fix the hardcoded values mentioned above and compile, should work.

exactly what values do I change? I see several FPS values in the cpp file but I do not know WHAT EXACTLY is to be changed for 60fps support image

int fps = 10;
if (iPosition / 3 == 0) {
    // 640x480, {30, 60, 15} fps
    pvi->bmiHeader.biWidth = 640;
    pvi->bmiHeader.biHeight = 480;
    fps = iPosition == 2 ? 15 : 30 * (iPosition+1);
}
else  {
    // 320x240, {30, 60, 15} fps
    pvi->bmiHeader.biWidth = 320;
    pvi->bmiHeader.biHeight = 240;

    fps = iPosition == 5 ? 15 : 30 * (iPosition-2);
}

based on the code:
for 480p:
if iPosition = 0, 1, 2
fps will be 30, 60, and 15 fps respectively,
for 240p:
if iPosition = 3, 4, 5
fps will be 30, 60, and 15 fps respectively

If i'm not wrong just overide would work?
`fps = 60;`
minch-dev commented 2 years ago

You just need to set iPosition = 1 for 640x480/60 fps, I would just change the value provided to the function where it's getting called, but you can do it in a function body as well. Just overriding the value altogether should work too, although it's a bit less elegant of a solution here.