![]() |
DvsenseDriver
1.3.0
The SDK for dvsense products.
|
Shared streaming, recording, and synchronization implementation for the DVSync family. More...
#include <DVSyncCameraBase.hpp>
Public Member Functions | |
| DVSyncCameraBase (CameraDescription desc) | |
| virtual | ~DVSyncCameraBase () |
| const bool | isConnected () override |
| uint32_t | addApsFrameCallback (FrameCallback cb) override |
| bool | removeApsFrameCallback (uint32_t callback_id) override |
| int | start (STREAM_TYPE type=FUSION_STREAM) override |
| int | stop (STREAM_TYPE type=FUSION_STREAM) override |
| int | destroy () override |
| int | startRecording (std::string file_path, std::string file_name, STREAM_TYPE type=FUSION_STREAM) override |
| int | stopRecording (STREAM_TYPE stream_type=FUSION_STREAM) override |
| uint16_t | getWidth (STREAM_TYPE) override |
| uint16_t | getHeight (STREAM_TYPE) override |
| void | setStatisticInfoCallback (DsStatisticInfoCallback cb) override |
| bool | writeCalibrationFile (std::string file_path) override |
| bool | readCalibrationParam (CalibratorParameters ¶m) override |
| bool | getFirmwareVersion (std::string &version) override |
| bool | getSerialNumber (std::string &version) |
| bool | setSerialNumber (std::string serial_number) |
Protected Types | |
| enum | CameraStatus { STOPPED = 0 , STARTED = 1 } |
Protected Member Functions | |
| int | init () override |
| virtual std::shared_ptr< Interface > | createInterface ()=0 |
| virtual RawEventStreamFormat | rawEventStreamFormat () const |
| virtual void | prepareDvsBuffer (DataTransfer::Buffer &buffer) |
| virtual bool | hasDeviceIdentityStorage () const |
| void | apsCameraLoop () |
| void | dvsCameraLoop () |
| virtual bool | beforeFusionStart () |
| virtual bool | afterStreamsStarted () |
| virtual void | beforeStreamsStop () |
| void | dvsEnable (bool en) |
| void | triggerInArrived (EventTriggerIn trigger) |
| int | startRecordingDvsStream (std::string file_path) |
| void | saveDvsBuffer2File (const std::uint8_t *ptr, size_t size) |
| void | prepareDvsData2Save (std::vector< uint8_t > &buffer) |
| void | dvsRecordLoop () |
| int | startRecordingApsStream (std::string file_path, std::string name) |
| void | prepareApsData2Save (std::vector< uint8_t > &buf, const TimeStamp exposure_end_ts) |
| void | prepareApsData2Save (uint8_t *data, uint32_t size, const TimeStamp exposure_end_ts) |
| void | apsRecordLoop () |
| void | dataFusionLoop () |
| void | markStreamsStopped () |
| void | statisticLoop () |
| void | eventStreamArrived (EventIterator_t begin, EventIterator_t end) |
Protected Attributes | |
| std::unordered_map< uint32_t, FrameCallback > | aps_callbacks_map_ |
| uint32_t | aps_callback_id_ = 0 |
| std::mutex | aps_callbacks_mutex_ |
| std::thread | aps_camera_loop_thread_ |
| std::thread | dvs_camera_loop_thread_ |
| std::unique_ptr< Decoder > | decoder_ |
| bool | isInited_ = false |
| std::atomic< CameraStatus > | status_ = CameraStatus::STOPPED |
| std::shared_ptr< Interface > | interface_ |
| Interface::InterfaceInitInfo | interface_init_info_ |
| std::shared_ptr< RegisterController > | register_controller_ |
| std::shared_ptr< RegisterController > | aps_register_controller_ |
| std::string | SENSOR_PREFIX = "" |
| std::unique_ptr< Sensor > | dvs_sensor_ |
| std::unique_ptr< Sensor > | aps_sensor_ |
| STREAM_TYPE | camera_stream_type_ = FUSION_STREAM |
| bool | dvs_is_recording_ = false |
| std::ofstream | dvs_ofs_ |
| std::thread | dvs_write_file_thread_ |
| std::queue< DataTransfer::BufferPtr > | dvs_file_buffer_data_queue_ |
| std::mutex | dvs_raw_data_save_mutex_ |
| std::condition_variable | dvs_raw_data_enqueue_to_record_cond_ |
| std::unique_ptr< DataTransfer::BufferPool > | dvs_raw_data_buffer_pool_ |
| DataTransfer::BufferPtr | dvs_raw_data_buffer_ptr_ |
| DvsFileInfo | dvs_file_info_ |
| bool | aps_is_recording_ = false |
| std::string | aps_file_path_ |
| std::thread | aps_write_file_thread_ |
| std::shared_ptr< DataToVideoConverter > | aps_to_mp4_ |
| std::shared_ptr< DataToVideoConverter > | aps_decoder_ |
| std::ofstream | aps_yuv_data_ofs_ |
| std::mutex | aps_raw_data_save_mutex_ |
| std::condition_variable | aps_raw_data_enqueue_to_record_cond_ |
| std::atomic< bool > | flush_mp4_video_on_ = false |
| std::unique_ptr< DataTransfer::BufferPool > | aps_raw_data_buffer_pool_ |
| DataTransfer::BufferPtr | aps_raw_data_buffer_ptr_ |
| std::queue< DataTransfer::BufferPtr > | aps_file_buffer_data_queue_ |
| std::queue< TimeStamp > | aps_file_buffer_data_exposure_end_ts_queue_ |
| TimeStamp | aps_save_to_mp4_ts_offset_ = 0 |
| std::thread | fusion_loop_thread_ |
| std::unique_ptr< ApsDataPool > | aps_rgb_frame_data_pool_ |
| std::thread | statistic_loop_thread_ |
| std::mutex | statistic_mutex_ |
| std::condition_variable | statistic_wakeup_ |
| DsStatisticInfoCallback | ds_statistic_info_callback_ = nullptr |
| std::shared_ptr< Imx415ApsCtrl > | tool_aps_ctrl_ |
| std::shared_ptr< Imx636TriggerIn > | tool_636_trigger_in_ |
| std::shared_ptr< Imx636EventRateControl > | tool_636_erc_ |
| CalibratorParameters | cali_param_ |
| bool | calibrated_ = false |
Shared streaming, recording, and synchronization implementation for the DVSync family.
Applications should open a FusionCamera through DvsCameraManager. Derived backends provide the transport and device-specific start/stop hooks; this class is not directly instantiated.
|
protected |
|
explicit |
|
virtual |
|
override |
|
override |
|
override |
|
override |
|
override |
|
override |
|
override |
|
override |
|
override |
|
override |
|
override |
|
override |
|
override |
|
override |
| bool dvsense::DVSyncCameraBase::getSerialNumber | ( | std::string & | version | ) |
| bool dvsense::DVSyncCameraBase::setSerialNumber | ( | std::string | serial_number | ) |
|
overrideprotected |
|
protectedpure virtual |
Implemented in dvsense::DVSyncCamera, and dvsense::DVSyncProCamera.
|
protectedvirtual |
Reimplemented in dvsense::DVSyncProCamera.
|
protectedvirtual |
|
inlineprotectedvirtual |
Reimplemented in dvsense::DVSyncProCamera.
|
protected |
|
protected |
|
inlineprotectedvirtual |
Reimplemented in dvsense::DVSyncProCamera.
|
inlineprotectedvirtual |
Reimplemented in dvsense::DVSyncProCamera.
|
inlineprotectedvirtual |
Reimplemented in dvsense::DVSyncProCamera.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |