jetson_jpeg_decoder.h 752 B

12345678910111213141516171819202122232425262728293031323334
  1. #ifndef JETSON_JPEG_DECODER_H_
  2. #define JETSON_JPEG_DECODER_H_
  3. #include <memory>
  4. #include "jetson_jpeg_decoder_pool.h"
  5. class NvJPEGDecoder;
  6. namespace sora {
  7. class JetsonJpegDecoderPool;
  8. class JetsonJpegDecoder {
  9. public:
  10. JetsonJpegDecoder(std::shared_ptr<JetsonJpegDecoderPool> pool,
  11. std::shared_ptr<NvJPEGDecoder> decoder);
  12. ~JetsonJpegDecoder();
  13. int DecodeToFd(int& fd,
  14. unsigned char* in_buf,
  15. unsigned long in_buf_size,
  16. uint32_t& pixfmt,
  17. uint32_t& width,
  18. uint32_t& height);
  19. private:
  20. std::shared_ptr<JetsonJpegDecoderPool> pool_;
  21. std::shared_ptr<NvJPEGDecoder> decoder_;
  22. };
  23. } // namespace sora
  24. #endif //JETSON_JPEG_DECODER_H_