Skip to content

Commit e18e01c

Browse files
committed
benchmark fixes
1 parent 3857304 commit e18e01c

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

tools/benchmark/rs-benchmark.cpp

+4-8
Original file line numberDiff line numberDiff line change
@@ -208,18 +208,14 @@ class gl_blocks : public suite
208208
int main(int argc, char** argv) try
209209
{
210210
std::string serial;
211-
enum second_stream {
212-
rgb_stream,
213-
ir_stream
214-
};
215-
second_stream second_stream;
211+
rs2_stream second_stream;
216212
if (!device_with_streams({ RS2_STREAM_DEPTH }, serial))
217213
return EXIT_SUCCESS;
218214

219215
if (device_with_streams({ RS2_STREAM_COLOR }, serial))
220-
second_stream = rgb_stream;
216+
second_stream = RS2_STREAM_COLOR;
221217
else if (device_with_streams({ RS2_STREAM_INFRARED }, serial))
222-
second_stream = ir_stream;
218+
second_stream = RS2_STREAM_INFRARED;
223219
else
224220
{
225221
std::cout<< " Connect a Depth Camera that supports either RGB or Infrared streams." <<std::endl;
@@ -259,7 +255,7 @@ int main(int argc, char** argv) try
259255
if (!serial.empty())
260256
cfg.enable_device(serial);
261257
cfg.enable_stream(RS2_STREAM_DEPTH);
262-
if(second_stream == rgb_stream)
258+
if(second_stream == RS2_STREAM_COLOR)
263259
cfg.enable_stream(RS2_STREAM_COLOR, RS2_FORMAT_YUYV, 30);
264260
else
265261
cfg.enable_stream(RS2_STREAM_INFRARED);

0 commit comments

Comments
 (0)