remove sqlite, rs2::recording_context & ::mock_context - #11345
Conversation
|
|
||
| /** | ||
| * Create librealsense context that will try to record all operations over librealsense into a file | ||
| * \deprecated |
There was a problem hiding this comment.
Please explain what do you mean by deprecated? what will happen if someone calls this method? Will he get an exception? It would be great if this would be written besides the "deprecated" comment
There was a problem hiding this comment.
It means the function will be marked as deprecated, as the Doxygen documentation states.
If you check rs.cpp, you'll see that it now throws an exception with the text deprecated...
| standard, | ||
| record, | ||
| playback | ||
| standard |
There was a problem hiding this comment.
do we need to let this enum, now that it has only one unique value?
There was a problem hiding this comment.
I started removing it, but kept it because of changed in the dds branch.
There was a problem hiding this comment.
you mean there is another value in this enum for the dds branch?
There was a problem hiding this comment.
Not another value -- other constructors, one with no parameters and another one, with another parameter type.
| const char* section = nullptr, | ||
| rs2_recording_mode mode = RS2_RECORDING_MODE_COUNT, | ||
| std::string min_api_version = "0.0.0"); | ||
| explicit context( backend_type type ); |
There was a problem hiding this comment.
If you choose to keep this enum, maybe we should add as default value the unique value. Agree?
There was a problem hiding this comment.
No. On the 'dds` branch there's a default ctor, so this distinguishes it from another usage.
There was a problem hiding this comment.
So maybe there is an issue there, because it does not seem right that "standard" is not default, even if there are other possible values.
Let's talk about it tomorrow, please
There was a problem hiding this comment.
I want it to be explicit, just like it has been until now. You want this constructor, you specify standard.
| #include "sr300-fw-update-device.h" | ||
| #include "sr300.h" | ||
| #include "ivcam-private.h" | ||
| #include <librealsense2/h/rs_internal.h> |
There was a problem hiding this comment.
Please confirm this is really needed
There was a problem hiding this comment.
Yes, needed -- I removed an #include in context.h which included this one. Not that it's removed, I needed to add it elsewhere.
| #include "firmware_logger_device.h" | ||
| #include "device-calibration.h" | ||
| #include "calibrated-sensor.h" | ||
| #include <librealsense2/h/rs_internal.h> |
There was a problem hiding this comment.
Please confirm this is needed here
| verify_version_compatibility(api_version); | ||
|
|
||
| return new rs2_context{ std::make_shared<librealsense::context>(librealsense::backend_type::standard) }; | ||
| return new rs2_context{ std::make_shared< librealsense::context >( librealsense::backend_type::standard ) }; |
There was a problem hiding this comment.
I do not like these spaces beside the "<>", but... your style :-)
There was a problem hiding this comment.
No, it's our style.
There is a .clang-format file that you should be using. See me tomorrow if you do not :)
There was a problem hiding this comment.
ok - feel free to send it to me
| verify_version_compatibility(api_version); | ||
|
|
||
| return new rs2_context{ std::make_shared<librealsense::context>(librealsense::backend_type::record, filename, section, mode) }; | ||
| throw not_implemented_exception( "deprecated" ); |
There was a problem hiding this comment.
This answers one of my previous comments, but please add there the fact that exception is thrown when calling the deprecated api methods.
There was a problem hiding this comment.
No. A deprecated method should not be called. If someone does, he get an exception.
| inline bool make_context(const char* id, rs2::context* ctx, std::string min_api_version = "0.0.0") | ||
| { | ||
| rs2::log_to_file(RS2_LOG_SEVERITY_DEBUG); | ||
| min_api_version; |
There was a problem hiding this comment.
Please confirm this line is needed, and explain why if it is.
There was a problem hiding this comment.
To avoid "unused variable" warnings.
There was a problem hiding this comment.
Sorry, but I do not agree - I prefer to get a warning than seeing this - don't you?
There was a problem hiding this comment.
Normally the usual way to do it is (that I have seen):
(void) min_api_version;
There was a problem hiding this comment.
You are correct, but I still do not understand exactly why... there is also std::ignore. I'll fix it in the dds branch when I merge there?
| } | ||
|
|
||
| command_line_params::instance()._found_any_section = true; | ||
| return true; |
There was a problem hiding this comment.
Should this method be kept if this is the only things it does?
There was a problem hiding this comment.
It's also modified, but differently, on the dds branch. Live tests are old and we'll not invest much in improving them. For now this change you're suggesting may happen, but in a different PR.
There was a problem hiding this comment.
ok, please open a ticket for that
There was a problem hiding this comment.
No, Remi. We won't waste time on live-tests. I'll do it if I happen to be messing around in live-tests again. Leave it be... you're welcome to open a ticket if you insist.
There was a problem hiding this comment.
One thing I can offer is that right after we merge this I'll be merging with the dds branch, where there will be conflicts. I'll take a look then to see what can be removed.
| #include "core/streaming.h" | ||
| #include "device.h" | ||
| #include "context.h" | ||
| #include <librealsense2/h/rs_internal.h> |
There was a problem hiding this comment.
Please confirm this line is needed
remibettan
left a comment
There was a problem hiding this comment.
Few comments added - thanks!
Thank You :) |
SQL usage is by
rs2::recording_contextandrs2::mock_context, both only in use in the legacy live-tests but never actually run. These are removed, as well, andrs2_create_recording_context/_mock_contextare deprecated.Tracked on [LRS-625]