Skip to content
This repository has been archived by the owner on Jan 24, 2018. It is now read-only.

Commit

Permalink
Fix infrared issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Boris Bolshem committed Aug 26, 2016
1 parent e6f7c78 commit e975811
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
7 changes: 3 additions & 4 deletions sdk/src/tools/capture_tool/capture_tool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,12 @@ void configure_device(rs::device* device, basic_cmd_util cl_util, std::shared_pt
for(auto it = streams.begin(); it != streams.end(); ++it)
{
auto lrs_stream = convert_stream_type(*it);
device->enable_stream(lrs_stream, rs::preset::best_quality);

bool is_stream_profile_available = cl_util.is_stream_profile_available(*it);

auto width = is_stream_profile_available ? cl_util.get_stream_width(*it) : device->get_stream_width(lrs_stream);
auto height = is_stream_profile_available ? cl_util.get_stream_height(*it) : device->get_stream_height(lrs_stream);
auto fps = is_stream_profile_available ? cl_util.get_stream_fps(*it) : device->get_stream_framerate(lrs_stream);
auto width = is_stream_profile_available ? cl_util.get_stream_width(*it) : 640;
auto height = is_stream_profile_available ? cl_util.get_stream_height(*it) : 480;
auto fps = is_stream_profile_available ? cl_util.get_stream_fps(*it) : 30;
auto format = convert_pixel_format(cl_util.get_streanm_pixel_format(*it));

device->enable_stream(lrs_stream, width, height, format, fps);
Expand Down
4 changes: 2 additions & 2 deletions sdk/src/utilities/command_line/basic_cmd_util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,11 @@ namespace rs

add_option(enabled_stream_map[stream_type::infrared], "enable infrared stream");
add_multy_args_option_safe(streams_config_map[stream_type::infrared], "set infrared stream profile - [<width>-<height>-<fps>]", 3, '-');
add_single_arg_option("-ipf", "set infrared streams pixel format", "y16", "y16");
add_single_arg_option("-ipf", "set infrared streams pixel format", "y8 y16", "y8");

add_option(enabled_stream_map[stream_type::infrared2], "enable infrared2 stream");
add_multy_args_option_safe(streams_config_map[stream_type::infrared2], "set infrared2 stream profile - [<width>-<height>-<fps>]", 3, '-');
add_single_arg_option("-i2pf", "set infrared2 streams pixel format", "y16", "y16");
add_single_arg_option("-i2pf", "set infrared2 streams pixel format", "y8 y16", "y8");

add_option(enabled_stream_map[stream_type::fisheye], "enable fisheye stream");
add_multy_args_option_safe(streams_config_map[stream_type::fisheye], "set fisheye stream profile - [<width>-<height>-<fps>]", 3, '-');
Expand Down

0 comments on commit e975811

Please sign in to comment.