Commit f6960011 authored by Thiago Santini's avatar Thiago Santini

Adds prefered selections for new pupil labs camera

parent b7022930
......@@ -61,14 +61,15 @@ QCameraViewfinderSettings Camera::getViewfinderSettings(const QCameraInfo camera
// Recommend based on known cameras
QString description = cameraInfo.description();
if (description == "Pupil Cam1 ID0") {
recommended.setMaximumFrameRate(90);
recommended.setMinimumFrameRate(90);
if (description == "Pupil Cam1 ID0") { // Pupil V1
recommended.setMaximumFrameRate(60);
recommended.setMinimumFrameRate(60);
recommended.setResolution(640, 480);
recommended.setPixelFormat( QVideoFrame::Format_Jpeg);
} else if (description == "Pupil Cam1 ID1") {
recommended.setMaximumFrameRate(90);
recommended.setMinimumFrameRate(90);
recommended.setMaximumFrameRate(60);
recommended.setMinimumFrameRate(60);
recommended.setResolution(640, 480);
recommended.setPixelFormat( QVideoFrame::Format_Jpeg);
} else if (description == "Pupil Cam1 ID2") {
......@@ -76,6 +77,21 @@ QCameraViewfinderSettings Camera::getViewfinderSettings(const QCameraInfo camera
recommended.setMinimumFrameRate(30);
recommended.setResolution(1280, 720);
recommended.setPixelFormat( QVideoFrame::Format_Jpeg);
} else if (description == "Pupil Cam2 ID0") { // Pupil V2
recommended.setMaximumFrameRate(60);
recommended.setMinimumFrameRate(60);
recommended.setResolution(320, 240);
recommended.setPixelFormat( QVideoFrame::Format_Jpeg);
} else if (description == "Pupil Cam2 ID1") {
recommended.setMaximumFrameRate(60);
recommended.setMinimumFrameRate(60);
recommended.setResolution(320, 240);
recommended.setPixelFormat( QVideoFrame::Format_Jpeg);
} else if (description == "Pupil Cam2 ID2") {
recommended.setMaximumFrameRate(30);
recommended.setMinimumFrameRate(30);
recommended.setResolution(1280, 720);
recommended.setPixelFormat( QVideoFrame::Format_Jpeg);
} else {
// Unknown; recommend to maximize fps and minimize resolution
recommended = camera->viewfinderSettings();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment