-
Notifications
You must be signed in to change notification settings - Fork 4.9k
clean up types.h #12372
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
clean up types.h #12372
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
d113162
remove unused code from types.h
maloel 0c1e02b
move some callbacks into rs.cpp
maloel bf4aa51
move hid_data to platform/hid-data.h
maloel 146f5e8
remove uvc & usb device-info
maloel 9eac26b
move RS2_USER_QUEUE_SIZE to frame-archive.h
maloel 1c2bcd5
remove byte definition
maloel 3ee8392
use std::abs everywhere; remove using in types.h
maloel 08cf692
remove types.h references in common/
maloel 1cb6489
move callback ptr typedef into rs_types.hpp
maloel 4dbd233
move into core/notification.h & .cpp
maloel 238d357
move update_progress_callback into rs.cpp
maloel 71f709a
move logging functions into log.h
maloel c0869be
remove unique_id
maloel ad4d601
move notifications_callback into rs.cpp
maloel d65f7bb
remove device_changed_callback
maloel ed9393a
move pack() to hw-monitor
maloel 4472e8c
move calc_crc32 to rsutils
maloel bb8d0af
move array2str into ds-private.h
maloel 25c4481
remove make_less_screamy (it's in rsutils)
maloel 42d1380
remove clamp_val
maloel c7acc8c
move to firmware-version.h
maloel c5ca188
remove file_exists
maloel 43858bd
move to fourcc.h
maloel File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| // License: Apache 2.0. See LICENSE file in root directory. | ||
| // Copyright(c) 2023 Intel Corporation. All Rights Reserved. | ||
| #pragma once | ||
|
|
||
| #include <librealsense2/hpp/rs_types.hpp> | ||
| #include <memory> | ||
| #include <functional> | ||
|
|
||
|
|
||
| namespace librealsense { | ||
|
|
||
|
|
||
| class frame_interface; | ||
|
|
||
|
|
||
| struct frame_callback : public rs2_frame_callback | ||
| { | ||
| using fn = std::function< void( frame_interface * ) >; | ||
|
|
||
| explicit frame_callback( fn && on_frame ) | ||
| : _on_frame( std::move( on_frame ) ) | ||
| { | ||
| } | ||
|
|
||
| void on_frame( rs2_frame * fref ) override { _on_frame( (frame_interface *)( fref ) ); } | ||
|
|
||
| void release() override { delete this; } | ||
|
|
||
| private: | ||
| fn _on_frame; | ||
| }; | ||
|
|
||
|
|
||
| inline rs2_frame_callback_sptr make_frame_callback( std::function< void( frame_interface * ) > && callback ) | ||
| { | ||
| return { new frame_callback( std::move( callback ) ), | ||
| []( rs2_frame_callback * p ) { p->release(); } }; | ||
| } | ||
|
|
||
|
|
||
| } // namespace librealsense |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BTW, Reflectivity & MUR can both be deleted totally., not used.
Both are L515 only and was origin by L515 reflectivity issues
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes I know, we spoke about it and, at least for now, I decided to leave them alone. Let's discuss offline.