| 271 | }; |
| 272 | |
| 273 | class Freenect2ReplayDevice : public Freenect2Device |
| 274 | { |
| 275 | public: |
| 276 | Freenect2ReplayDevice(Freenect2ReplayImpl *context_, const std::vector<std::string>& frame_filenames, const PacketPipeline* pipeline); |
| 277 | virtual ~Freenect2ReplayDevice(); |
| 278 | |
| 279 | virtual std::string getSerialNumber(); |
| 280 | virtual std::string getFirmwareVersion(); |
| 281 | |
| 282 | virtual ColorCameraParams getColorCameraParams(); |
| 283 | virtual IrCameraParams getIrCameraParams(); |
| 284 | virtual void setColorCameraParams(const ColorCameraParams ¶ms); |
| 285 | virtual void setIrCameraParams(const IrCameraParams ¶ms); |
| 286 | virtual void setConfiguration(const Config &config); |
| 287 | |
| 288 | virtual void setColorFrameListener(FrameListener* listener); |
| 289 | virtual void setIrAndDepthFrameListener(FrameListener* listener); |
| 290 | |
| 291 | virtual void setColorAutoExposure(float exposure_compensation) {} |
| 292 | virtual void setColorSemiAutoExposure(float pseudo_exposure_time_ms) {} |
| 293 | virtual void setColorManualExposure(float integration_time_ms, float analog_gain) {} |
| 294 | virtual void setColorSetting(ColorSettingCommandType cmd, uint32_t value) {} |
| 295 | virtual void setColorSetting(ColorSettingCommandType cmd, float value) {} |
| 296 | virtual uint32_t getColorSetting(ColorSettingCommandType cmd) { return 0u; } |
| 297 | virtual float getColorSettingFloat(ColorSettingCommandType cmd) { return 0.0f; } |
| 298 | virtual void setLedStatus(LedSettings led) {} |
| 299 | |
| 300 | bool open(); |
| 301 | |
| 302 | virtual bool start(); |
| 303 | virtual bool startStreams(bool rgb, bool depth); |
| 304 | virtual bool stop(); |
| 305 | virtual bool close(); |
| 306 | |
| 307 | // X, Z, LUT tables are generated in setIrCameraParams(). |
| 308 | void loadP0Tables(unsigned char* buffer, size_t buffer_length); |
| 309 | |
| 310 | private: |
| 311 | bool processRawFrame(Frame::Type type, Frame* frame); |
| 312 | void processRgbFrame(Frame* frame); |
| 313 | void processDepthFrame(Frame* frame); |
| 314 | |
| 315 | void run(); |
| 316 | static void static_execute(void* arg); |
| 317 | |
| 318 | Freenect2ReplayImpl *context_; |
| 319 | const PacketPipeline* pipeline_; |
| 320 | size_t buffer_size_; |
| 321 | DepthPacket packet_; |
| 322 | |
| 323 | std::vector<std::string> frame_filenames_; |
| 324 | libfreenect2::thread* t_; |
| 325 | bool running_; |
| 326 | |
| 327 | Freenect2Device::IrCameraParams ir_camera_params_; |
| 328 | Freenect2Device::ColorCameraParams rgb_camera_params_; |
| 329 | }; |
| 330 |
nothing calls this directly
no outgoing calls
no test coverage detected