Can't change resolution on Astra Pro

Hello,I’m trying to change the resolution for a simple color stream in the following way but i’m always getting status 2, which I saw was Device error.

astra::StreamSet streamSet;
astra::StreamReader reader = streamSet.create_reader();

auto colorStream =<astra::ColorStream>();
auto oldMode = colorStream.mode();

//We don't have to set the mode to start the stream, but if you want to here is how:
astra::ImageStreamMode colorMode;


auto newMode = colorStream.mode();
printf("Changed depth mode: %dx%d @ %d -> %dx%d @ %d\n",
    oldMode.width(), oldMode.height(), oldMode.fps(),
    newMode.width(), newMode.height(), newMode.fps());


ColorFrameListener listener;

In the documentation it says this higher resolution is supported. Idk what’s happening.

Hello UannaFF,

I think you stumped upon some kind of bug in the SDK (or we failed to learn something about it).
I tried your code and for me it does not fail with status 2, but the resolution stays 640x480 no matter what I do.

However, if I set the fps to 30 (instead of 10), then everything works fine. Could you give that a try?

By the way, I have an Astra Pro. According to product specs this is the only Astra model in the Astra series which supports a 1280x720@30fps RGB stream.


Thanks for the answer, I confirm it works with 30fps.