Merge branch into develop

This commit is contained in:
John Zhao
2019-02-22 14:08:47 +08:00
6 changed files with 223 additions and 152 deletions

View File

@@ -92,6 +92,8 @@ class MYNTEYE_API API {
using stream_callback_t = std::function<void(const api::StreamData &data)>;
/** The api::MotionData callback. */
using motion_callback_t = std::function<void(const api::MotionData &data)>;
/** The enable/disable switch callback. */
using stream_switch_callback_t = std::function<void(const Stream &stream)>;
explicit API(std::shared_ptr<Device> device, CalibrationModel calib_model);
virtual ~API();
@@ -281,11 +283,31 @@ class MYNTEYE_API API {
* still support this stream.
*/
void EnableStreamData(const Stream &stream);
/**
* Enable the data of stream.
* callback function will call before the father processor enable.
* when try_tag is true, the function will do nothing except callback.
*/
void EnableStreamData(
const Stream &stream,
stream_switch_callback_t callback,
bool try_tag = false);
/**
* Disable the data of stream.
*/
void DisableStreamData(const Stream &stream);
/**
* Disable the data of stream.
* callback function will call before the children processor disable.
* when try_tag is true, the function will do nothing except callback.
*/
void DisableStreamData(
const Stream &stream,
stream_switch_callback_t callback,
bool try_tag = false);
/**
* Get the latest data of stream.
*/