![](/media/cache/profiles/bf201d5407a6509fa536afc4b380577e.50x50_q85.jpg)
BLE demo for mbed Ported RunningElectronics's SBDBT firmware for BLE. It can communicate with iOS
Dependencies: FatFileSystem mbed
Fork of BTstack by
uvc/usb_mjpeg.h@0:1ed23ab1345f, 2012-06-26 (annotated)
- Committer:
- va009039
- Date:
- Tue Jun 26 14:27:45 2012 +0000
- Revision:
- 0:1ed23ab1345f
fix overflow spp_service_buffer
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
va009039 | 0:1ed23ab1345f | 1 | #ifndef USB_MJPEG_H |
va009039 | 0:1ed23ab1345f | 2 | #define USB_MJPEG_H |
va009039 | 0:1ed23ab1345f | 3 | #include "UsbInc.h" |
va009039 | 0:1ed23ab1345f | 4 | |
va009039 | 0:1ed23ab1345f | 5 | class usb_stream { |
va009039 | 0:1ed23ab1345f | 6 | public: |
va009039 | 0:1ed23ab1345f | 7 | virtual void input(uint16_t frame, uint8_t* buf, int len) = 0; |
va009039 | 0:1ed23ab1345f | 8 | }; |
va009039 | 0:1ed23ab1345f | 9 | |
va009039 | 0:1ed23ab1345f | 10 | class usb_mjpeg : public usb_stream { |
va009039 | 0:1ed23ab1345f | 11 | public: |
va009039 | 0:1ed23ab1345f | 12 | usb_mjpeg(uint8_t* buf = NULL, int size = 4800); |
va009039 | 0:1ed23ab1345f | 13 | ~usb_mjpeg(); |
va009039 | 0:1ed23ab1345f | 14 | virtual void input(uint16_t frame, uint8_t* buf, int len); |
va009039 | 0:1ed23ab1345f | 15 | int status(); |
va009039 | 0:1ed23ab1345f | 16 | uint16_t ReportErrorFID; |
va009039 | 0:1ed23ab1345f | 17 | uint16_t ReportErrorPTS; |
va009039 | 0:1ed23ab1345f | 18 | private: |
va009039 | 0:1ed23ab1345f | 19 | void _open(); |
va009039 | 0:1ed23ab1345f | 20 | void _wrtie(uint8_t* buf, int len); |
va009039 | 0:1ed23ab1345f | 21 | void _close(); |
va009039 | 0:1ed23ab1345f | 22 | |
va009039 | 0:1ed23ab1345f | 23 | uint8_t* m_buf; |
va009039 | 0:1ed23ab1345f | 24 | int m_pos; |
va009039 | 0:1ed23ab1345f | 25 | bool check_SOI(uint8_t* buf, int len); |
va009039 | 0:1ed23ab1345f | 26 | bool check_EOI(uint8_t* buf, int len); |
va009039 | 0:1ed23ab1345f | 27 | void analyticsJPEG(uint8_t* buf, int len); |
va009039 | 0:1ed23ab1345f | 28 | int m_seq; |
va009039 | 0:1ed23ab1345f | 29 | int m_size; |
va009039 | 0:1ed23ab1345f | 30 | uint8_t m_bfh; |
va009039 | 0:1ed23ab1345f | 31 | uint32_t m_pts; |
va009039 | 0:1ed23ab1345f | 32 | }; |
va009039 | 0:1ed23ab1345f | 33 | #endif //USB_MJPEG_H |