Skip to content

Commit

Permalink
move 'Frame counter reset' out of the MD parser
Browse files Browse the repository at this point in the history
  • Loading branch information
maloel committed Oct 27, 2023
1 parent a84de10 commit 1591001
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
3 changes: 3 additions & 0 deletions src/hid-sensor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,9 @@ void hid_sensor::start( frame_callback_ptr callback )
<< rs2_timestamp_domain_to_string( timestamp_domain ) << ",last_frame_number,"
<< last_frame_number << ",last_timestamp," << last_timestamp );

if( frame_counter <= last_frame_number )
LOG_INFO( "Frame counter reset" );

last_frame_number = frame_counter;
last_timestamp = timestamp;
frame_holder frame
Expand Down
4 changes: 0 additions & 4 deletions src/metadata-parser.h
Original file line number Diff line number Diff line change
Expand Up @@ -333,11 +333,7 @@ namespace librealsense
// In case of frame counter reset fallback to fps from the stream configuration
return false;
if( p_value )
{
if( frm.additional_data.frame_number <= frm.additional_data.last_frame_number )
LOG_INFO( "Frame counter reset" ); // TODO: this is not a good place!
*p_value = fps;
}
return true;
}
};
Expand Down
3 changes: 3 additions & 0 deletions src/uvc-sensor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,9 @@ void uvc_sensor::open( const stream_profiles & requests )
<< rs2_timestamp_domain_to_string( timestamp_domain ) << ",last_frame_number,"
<< last_frame_number << ",last_timestamp," << last_timestamp );

if( frame_counter <= last_frame_number )
LOG_INFO( "Frame counter reset" );

last_frame_number = frame_counter;
last_timestamp = timestamp;

Expand Down

0 comments on commit 1591001

Please sign in to comment.