BLE demo for mbed Ported RunningElectronics's SBDBT firmware for BLE. It can communicate with iOS

Dependencies:   FatFileSystem mbed

Fork of BTstack by Norimasa Okamoto

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers usb_mjpeg.h Source File

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