Skip to content

Commit

Permalink
Some renaming and CR changes
Browse files Browse the repository at this point in the history
  • Loading branch information
zivsha committed Jul 16, 2017
1 parent 3fe3359 commit 9af160c
Show file tree
Hide file tree
Showing 14 changed files with 19 additions and 21 deletions.
10 changes: 5 additions & 5 deletions include/librealsense/rs2.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1201,7 +1201,7 @@ namespace rs2
* returns the list of adjacent devices, sharing the same physical parent composite device
* \return the list of adjacent devices
*/
virtual std::vector<sensor> query_sensors() const
std::vector<sensor> query_sensors() const
{
rs2_error* e = nullptr;
std::shared_ptr<rs2_sensor_list> list(
Expand Down Expand Up @@ -1242,7 +1242,7 @@ namespace rs2
* \param[in] info the parameter to check for support
* \return true if the parameter both exist and well-defined for the specific device
*/
virtual bool supports(rs2_camera_info info) const
bool supports(rs2_camera_info info) const
{
rs2_error* e = nullptr;
auto is_supported = rs2_supports_device_info(_dev.get(), info, &e);
Expand All @@ -1255,7 +1255,7 @@ namespace rs2
* \param[in] info camera info type to retrieve
* \return the requested camera info string, in a format specific to the device model
*/
virtual const char* get_info(rs2_camera_info info) const
const char* get_info(rs2_camera_info info) const
{
rs2_error* e = nullptr;
auto result = rs2_get_device_info(_dev.get(), info, &e);
Expand All @@ -1266,7 +1266,7 @@ namespace rs2
/**
* send hardware reset request to the device
*/
virtual void hardware_reset()
void hardware_reset()
{
rs2_error* e = nullptr;

Expand All @@ -1288,7 +1288,7 @@ namespace rs2
}
device() : _dev(nullptr) {}

virtual operator bool() const
operator bool() const
{
return _dev != nullptr;
}
Expand Down
6 changes: 3 additions & 3 deletions src/archive.h
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ namespace librealsense
int2* get_pixel_coordinates();
};

DEFINE_MAPPING(RS2_EXTENSION_TYPE_POINTS, librealsense::points);
MAP_EXTENSION(RS2_EXTENSION_TYPE_POINTS, librealsense::points);

class composite_frame : public frame
{
Expand Down Expand Up @@ -214,7 +214,7 @@ namespace librealsense
}
};

DEFINE_MAPPING(RS2_EXTENSION_TYPE_COMPOSITE_FRAME, librealsense::composite_frame);
MAP_EXTENSION(RS2_EXTENSION_TYPE_COMPOSITE_FRAME, librealsense::composite_frame);

class video_frame : public frame
{
Expand All @@ -240,7 +240,7 @@ namespace librealsense
int _width, _height, _bpp, _stride;
};

DEFINE_MAPPING(RS2_EXTENSION_TYPE_VIDEO_FRAME, librealsense::video_frame);
MAP_EXTENSION(RS2_EXTENSION_TYPE_VIDEO_FRAME, librealsense::video_frame);

//TODO: Define Motion Frame

Expand Down
2 changes: 1 addition & 1 deletion src/concurrency.h
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ class dispatcher
_thread.join();
}

void sync()
void flush()
{
std::mutex m;
std::condition_variable cv;
Expand Down
2 changes: 1 addition & 1 deletion src/core/advanced_mode.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ namespace librealsense
virtual ~ds5_advanced_mode_interface() = default;
};

DEFINE_MAPPING(RS2_EXTENSION_TYPE_ADVANCED_MODE, librealsense::ds5_advanced_mode_interface);
MAP_EXTENSION(RS2_EXTENSION_TYPE_ADVANCED_MODE, librealsense::ds5_advanced_mode_interface);

class advanced_mode_preset_option;

Expand Down
2 changes: 1 addition & 1 deletion src/core/debug.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace librealsense
virtual std::vector<uint8_t> send_receive_raw_data(const std::vector<uint8_t>& input) = 0;
};

DEFINE_MAPPING(RS2_EXTENSION_TYPE_DEBUG, librealsense::debug_interface);
MAP_EXTENSION(RS2_EXTENSION_TYPE_DEBUG, librealsense::debug_interface);

class debug_snapshot : public extension_snapshot, public debug_interface
{
Expand Down
2 changes: 1 addition & 1 deletion src/core/extension.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include <functional>

//Preprocessor Macro to define mapping between rs2_extension_type and their respective interface (and vice versa)
#define DEFINE_MAPPING(E, T) \
#define MAP_EXTENSION(E, T) \
template<> struct ExtensionsToTypes<E> { \
using type = T; \
}; \
Expand Down
2 changes: 1 addition & 1 deletion src/core/info.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ namespace librealsense
virtual ~info_interface() = default;
};

DEFINE_MAPPING(RS2_EXTENSION_TYPE_INFO, librealsense::info_interface);
MAP_EXTENSION(RS2_EXTENSION_TYPE_INFO, librealsense::info_interface);

class info_container : public virtual info_interface
{
Expand Down
2 changes: 1 addition & 1 deletion src/core/motion.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ namespace librealsense
virtual rs2_motion_device_intrinsic get_motion_intrinsics(rs2_stream stream) const = 0;
};

DEFINE_MAPPING(RS2_EXTENSION_TYPE_MOTION, librealsense::motion_sensor_interface);
MAP_EXTENSION(RS2_EXTENSION_TYPE_MOTION, librealsense::motion_sensor_interface);
}
2 changes: 1 addition & 1 deletion src/core/options.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ namespace librealsense
virtual ~options_interface() = default;
};

DEFINE_MAPPING(RS2_EXTENSION_TYPE_OPTIONS, librealsense::options_interface);
MAP_EXTENSION(RS2_EXTENSION_TYPE_OPTIONS, librealsense::options_interface);

class options_container : public virtual options_interface
{
Expand Down
2 changes: 1 addition & 1 deletion src/core/roi.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@ namespace librealsense
virtual void set_roi_method(std::shared_ptr<region_of_interest_method> roi_method) = 0;
};

DEFINE_MAPPING(RS2_EXTENSION_TYPE_ROI, librealsense::roi_sensor_interface);
MAP_EXTENSION(RS2_EXTENSION_TYPE_ROI, librealsense::roi_sensor_interface);
}
2 changes: 1 addition & 1 deletion src/core/streaming.h
Original file line number Diff line number Diff line change
Expand Up @@ -138,5 +138,5 @@ namespace librealsense
virtual ~depth_sensor() = default;
};

DEFINE_MAPPING(RS2_EXTENSION_TYPE_DEPTH_SENSOR, librealsense::depth_sensor);
MAP_EXTENSION(RS2_EXTENSION_TYPE_DEPTH_SENSOR, librealsense::depth_sensor);
}
2 changes: 1 addition & 1 deletion src/core/video.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ namespace librealsense
virtual rs2_intrinsics get_intrinsics(const stream_profile& profile) const = 0;
};

DEFINE_MAPPING(RS2_EXTENSION_TYPE_VIDEO, librealsense::video_sensor_interface);
MAP_EXTENSION(RS2_EXTENSION_TYPE_VIDEO, librealsense::video_sensor_interface);
}
2 changes: 1 addition & 1 deletion src/playback_device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ playback_device::~playback_device()
sensor.second->stop(); //TODO: make sure this works with this dispatcher
}
});
(*m_read_thread)->sync();
(*m_read_thread)->flush();
(*m_read_thread)->stop();
}
sensor_interface& playback_device::get_sensor(size_t i)
Expand Down
2 changes: 0 additions & 2 deletions src/record_device.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,6 @@ namespace librealsense
std::chrono::high_resolution_clock::duration m_record_pause_time;
std::chrono::high_resolution_clock::time_point m_time_of_pause;

friend struct mylambda;

std::mutex m_mutex;
bool m_is_recording;
std::once_flag m_first_frame_flag;
Expand Down

0 comments on commit 9af160c

Please sign in to comment.