Encoder.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /***** (C) Copyright, Shenzhen SUNWIN Intelligent Co.,Ltd. ******source file****
  2. * File name : Encoder.h
  3. * Author : ShengYin Li
  4. * Brief :
  5. ********************************************************************************
  6. * modify
  7. * Version Date Author Described
  8. * V1.00 2021/07/06 ShengYin Li Created
  9. *******************************************************************************/
  10. #pragma once
  11. #include <iostream>
  12. #include <stdio.h>
  13. #include <string.h>
  14. #include "sdc_def_ext.h"
  15. #include "sdc.h"
  16. #include <stdint.h>
  17. #include <sys/uio.h>
  18. using namespace std;
  19. class Encoder
  20. {
  21. private:
  22. protected:
  23. int32_t m_codecFd = -1; // 图片解码文件描述符
  24. public:
  25. Encoder();
  26. ~Encoder();
  27. int32_t Init();
  28. int32_t Yuv2Jpeg(const sdc_yuv_frame_s &yuv_frame, const sdc_osd_region_s &osd_region, sdc_jpeg_frame_s &jpeg_frame);
  29. int32_t FreeJpeg(sdc_jpeg_frame_s &jpeg_frame);
  30. int32_t SaveJpeg(const sdc_jpeg_frame_s &jpeg_frame, const string &jpegPath);
  31. };
  32. /******** (C) Copyright, Shenzhen SUNWIN Intelligent Co.,Ltd. ******** End *****/