Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of uvchost by
usb_mjpeg.h
00001 #ifndef USB_MJPEG_H 00002 #define USB_MJPEG_H 00003 #include "UsbInc.h" 00004 00005 class usb_stream { 00006 public: 00007 virtual void input(uint16_t frame, uint8_t* buf, int len) = 0; 00008 }; 00009 00010 class usb_mjpeg : public usb_stream { 00011 public: 00012 usb_mjpeg(uint8_t* buf = NULL, int size = 4800); 00013 ~usb_mjpeg(); 00014 virtual void input(uint16_t frame, uint8_t* buf, int len); 00015 int status(); 00016 uint16_t ReportErrorFID; 00017 uint16_t ReportErrorPTS; 00018 private: 00019 void _open(); 00020 void _wrtie(uint8_t* buf, int len); 00021 void _close(); 00022 00023 uint8_t* m_buf; 00024 int m_pos; 00025 bool check_SOI(uint8_t* buf, int len); 00026 bool check_EOI(uint8_t* buf, int len); 00027 void analyticsJPEG(uint8_t* buf, int len); 00028 int m_seq; 00029 int m_size; 00030 uint8_t m_bfh; 00031 uint32_t m_pts; 00032 }; 00033 #endif //USB_MJPEG_H
Generated on Wed Jul 13 2022 01:34:55 by
1.7.2
