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.
Dependencies: FatFileSystem TB6612FNG2 mbed
Diff: uvc/usb_mjpeg.h
- Revision:
- 0:de03cbbcd0ff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/uvc/usb_mjpeg.h Mon Nov 30 09:32:15 2015 +0000
@@ -0,0 +1,33 @@
+#ifndef USB_MJPEG_H
+#define USB_MJPEG_H
+#include "UsbInc.h"
+
+class usb_stream {
+public:
+ virtual void input(uint16_t frame, uint8_t* buf, int len) = 0;
+};
+
+class usb_mjpeg : public usb_stream {
+public:
+ usb_mjpeg(uint8_t* buf = NULL, int size = 4800);
+ ~usb_mjpeg();
+ virtual void input(uint16_t frame, uint8_t* buf, int len);
+ int status();
+ uint16_t ReportErrorFID;
+ uint16_t ReportErrorPTS;
+private:
+ void _open();
+ void _wrtie(uint8_t* buf, int len);
+ void _close();
+
+ uint8_t* m_buf;
+ int m_pos;
+ bool check_SOI(uint8_t* buf, int len);
+ bool check_EOI(uint8_t* buf, int len);
+ void analyticsJPEG(uint8_t* buf, int len);
+ int m_seq;
+ int m_size;
+ uint8_t m_bfh;
+ uint32_t m_pts;
+};
+#endif //USB_MJPEG_H
\ No newline at end of file