econsysqtcam / qtcam

QtCAM is a free, Open Source Linux Webcamera Software with more than 10 image control settings, extension settings and Color space switching.
http://www.e-consystems.com/opensource-linux-webcam-software-application.asp
GNU General Public License v3.0
185 stars 95 forks source link

uvccamera::sendHidCmd seems wrong #35

Open openhacker opened 5 years ago

openhacker commented 5 years ago

I'm tracing through the see3CAM_CU135::setFrameRateCtlValue (btw, love that the name for the doxygen comment doesn't agree with the function name)

// Monitor read file descriptor for 5 secs

if(0 > select(1, &rfds, NULL, NULL, &tv)){

should the 1 be hid_fd + 1 instead? The way this is written, I think it just waits 5 seconds. Turns out, tracing, hid_fd was 0 in my instance (so this worked).

We return true/false, how does the caller know how many bytes were read? Should it?