-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Closed
Labels
Description
| Required Info | |
|---|---|
| Camera Model | D400 |
| SDK Version | 2.10.3 |
Issue Description
rs2::pipeline can't correctly playback two IR streams from bag file that recorded two IR streams.
Is this a specification of rs2::pipeline? Or is this a bug?
This code is record IR streams to bag file.
// Record IR Streams to File
rs2::config config;
config.enable_stream( rs2_stream::RS2_STREAM_INFRARED, 1, width, height, rs2_format::RS2_FORMAT_Y8, fps );
config.enable_stream( rs2_stream::RS2_STREAM_INFRARED, 2, width, height, rs2_format::RS2_FORMAT_Y8, fps );
config.enable_record_to_file( "two_ir_streams.bag" );
rs2::pipeline pipeline;
const rs2::pipeline_profile pipeline_profile = pipeline.start( config );
// Output Enable Streams Name
const std::vector<rs2::stream_profile> stream_profiles = pipeline_profile.get_streams();
for( const rs2::stream_profile& stream_profile : stream_profiles ){
std::cout << stream_profile.stream_name() << std::endl;
}
// e.g. Get 100 Frames for Record
for( uint32_t i = 0; i < 100; i++ ){
rs2::frameset frameset = pipeline.wait_for_frames();
}Output is following. It is correctly output the two IR streams.
And, that recorded file can be playback two IR streams correctly using RealSense Viewer.
Infrared 1
Infrared 2
This code is playback IR streams from bag file that recorded two IR streams.
// Playback IR Streams from File
rs2::config config;
config.enable_device_from_file( "two_ir_streams.bag" );
rs2::pipeline pipeline;
const rs2::pipeline_profile pipeline_profile = pipeline.start( config );
// Output Enable Streams Name
const std::vector<rs2::stream_profile> stream_profiles = pipeline_profile.get_streams();
for( const rs2::stream_profile& stream_profile : stream_profiles ){
std::cout << stream_profile.stream_name() << std::endl;
}Output is following. Infrared 2 is missing. Why?
Infrared 1