pc_encoder.h 825 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. #ifndef DEPTHGUIDE_PC_ENCODER_H
  2. #define DEPTHGUIDE_PC_ENCODER_H
  3. #include "pc_codec.hpp"
  4. #include "codec/image_encoder.h"
  5. #include "core/pc_utility.h"
  6. #include "image_process/cuda_impl/fake_color.cuh"
  7. #include "network/binary_utility.hpp"
  8. #include <memory>
  9. class pc_encoder {
  10. public:
  11. struct create_config {
  12. using method_type =
  13. pc_codec::encode_method_enum;
  14. method_type method = pc_codec::PC_RGB_DEPTH;
  15. fake_color_method depth_method = FAKE_800P;
  16. smart_cuda_stream *stream = nullptr;
  17. image_encoder *img_enc = nullptr;
  18. };
  19. explicit pc_encoder(const create_config &conf);
  20. ~pc_encoder();
  21. data_type encode(const pc_ptr &pc);
  22. void clear_cache();
  23. private:
  24. struct impl;
  25. std::unique_ptr<impl> pimpl;
  26. };
  27. #endif //DEPTHGUIDE_PC_ENCODER_H