I’m using Astra PRO version. I was trying to modify the SimpleColorViewer-SFML sample to open Astra Pro color stream in HD 1280x720 30fps mode this way:
auto colorStream = reader.stream<astra::ColorStream>();
auto oldMode = colorStream.mode();
astra::ImageStreamMode colorMode;
colorMode.set_width(1280);
colorMode.set_height(720);
colorMode.set_pixel_format(astra_pixel_formats::ASTRA_PIXEL_FORMAT_RGB888);
colorMode.set_fps(30);
colorStream.set_mode(colorMode);
auto newMode = colorStream.mode();
printf("Changed color mode: %dx%d @ %d -> %dx%d @ %d\n", oldMode.width(), oldMode.height(),
oldMode.fps(), newMode.width(), newMode.height(), newMode.fps());
colorStream.start();
It looks like the SDK doesn’t support this mode because it silently fails to change from default 640x480 30fps as reported by the printf log:
Changed color mode: 640x480 @ 30 -> 640x480 @ 30
But if a reduce the fps to 10
colorMode.set_fps(10);
Then the SDK successfully is changing the restitution:
Changed color mode: 640x480 @ 30 -> 1280x720 @ 10
The Astra Pro specs say that it supports 30 fps at HD resolution. Is it a bug or a limitation of the SDK?