ESP_IOT v2.5
IOT ESP Coding
OV2640Streamer.cpp
Go to the documentation of this file.
1
2#include "../../../Defines.h"
3
4#ifdef USE_CAMERA_MODULE
5
6#include "OV2640Streamer.h"
7#include <assert.h>
8
9
10
11OV2640Streamer::OV2640Streamer(SOCKET aClient, OV2640 &cam) : CStreamer(aClient, cam.getWidth(), cam.getHeight()), m_cam(cam)
12{
13 printf("Created streamer width=%d, height=%d\n", cam.getWidth(), cam.getHeight());
14}
15
16void OV2640Streamer::streamImage(uint32_t curMsec)
17{
18 m_cam.run();// queue up a read for next time
19
20 BufPtr bytes = m_cam.getfb();
21 streamFrame(bytes, m_cam.getSize(), curMsec);
22}
23
24#endif