ESP_IOT v2.5
IOT ESP Coding
SimStreamer.cpp
Go to the documentation of this file.
1
2#include "../../../Defines.h"
3
4#ifdef USE_CAMERA_MODULE
5
6#include "SimStreamer.h"
7#include "JPEGSamples.h"
8
9
10#ifdef INCLUDE_SIMDATA
11SimStreamer::SimStreamer(SOCKET aClient, bool showBig) : CStreamer(aClient, showBig ? 800 : 640, showBig ? 600 : 480)
12{
13 m_showBig = showBig;
14}
15
16void SimStreamer::streamImage(uint32_t curMsec)
17{
18 if(m_showBig) {
19 BufPtr bytes = capture_jpg;
20 uint32_t len = capture_jpg_len;
21
22 streamFrame(bytes, len, curMsec);
23 }
24 else {
25 BufPtr bytes = octo_jpg;
26 uint32_t len = octo_jpg_len;
27
28 streamFrame(bytes, len, curMsec);
29 }
30}
31
32#endif
33
34#endif