Skip to content

Commit

Permalink
benchmark fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
nohayassin committed May 10, 2021
1 parent 3b5c2ff commit 79d01ea
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions tools/benchmark/rs-benchmark.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -208,18 +208,14 @@ class gl_blocks : public suite
int main(int argc, char** argv) try
{
std::string serial;
enum second_stream {
rgb_stream,
ir_stream
};
second_stream second_stream;
rs2_stream second_stream;
if (!device_with_streams({ RS2_STREAM_DEPTH }, serial))
return EXIT_SUCCESS;

if (device_with_streams({ RS2_STREAM_COLOR }, serial))
second_stream = rgb_stream;
second_stream = RS2_STREAM_COLOR;
else if (device_with_streams({ RS2_STREAM_INFRARED }, serial))
second_stream = ir_stream;
second_stream = RS2_STREAM_INFRARED;
else
{
std::cout<< " Connect a Depth Camera that supports either RGB or Infrared streams." <<std::endl;
Expand Down Expand Up @@ -259,7 +255,7 @@ int main(int argc, char** argv) try
if (!serial.empty())
cfg.enable_device(serial);
cfg.enable_stream(RS2_STREAM_DEPTH);
if(second_stream == rgb_stream)
if(second_stream == RS2_STREAM_COLOR)
cfg.enable_stream(RS2_STREAM_COLOR, RS2_FORMAT_YUYV, 30);
else
cfg.enable_stream(RS2_STREAM_INFRARED);
Expand Down

0 comments on commit 79d01ea

Please sign in to comment.