Skip to content

Commit

Permalink
support SR306 camera
Browse files Browse the repository at this point in the history
  • Loading branch information
nohayassin committed Apr 5, 2021
1 parent 103c364 commit c77983d
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions tools/benchmark/rs-benchmark.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -237,11 +237,23 @@ int main(int argc, char** argv) try
rs2::context ctx;
auto list = ctx.query_devices();
auto dev = list.front();
auto sensors = dev.query_sensors();
pipeline p;
config cfg;
for (auto& s : sensors)
{
auto streams = s.get_stream_profiles();
for (auto stream : streams)
{
if (stream.stream_type() == RS2_STREAM_COLOR)
{
cfg.enable_stream(RS2_STREAM_COLOR, RS2_FORMAT_YUYV, 30);
break;
}
}
}

cfg.enable_stream(RS2_STREAM_DEPTH);
if (std::string(dev.get_info(RS2_CAMERA_INFO_PRODUCT_ID)) != "0AA3") // pid of sr306
cfg.enable_stream(RS2_STREAM_COLOR, RS2_FORMAT_YUYV, 30);
auto prof = p.start(cfg);
auto name = dev.get_info(RS2_CAMERA_INFO_NAME);
cout << "|**Device Name** |" << name << " |" << endl << endl;
Expand Down

0 comments on commit c77983d

Please sign in to comment.