esp32cam
OV2640 camera on ESP32-CAM
Toggle main menu visibility
Main Page
Related Pages
Namespaces
Namespace List
Namespace Members
All
Functions
Variables
Enumerations
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
~
Functions
a
b
c
d
e
f
g
i
l
m
n
o
p
r
s
t
u
w
~
Variables
b
c
d
f
g
h
l
m
p
r
s
v
x
Typedefs
Enumerations
Enumerator
Related Symbols
Files
File List
File Members
All
a
b
c
e
i
l
m
s
u
Functions
Variables
Macros
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
Loading...
Searching...
No Matches
src
esp32cam
frame.hpp
Go to the documentation of this file.
1
#ifndef ESP32CAM_FRAME_HPP
2
#define ESP32CAM_FRAME_HPP
3
4
#include <cstddef>
5
#include <cstdint>
6
7
class
Client;
8
class
Print;
9
10
namespace
esp32cam
{
11
13
class
Frame
{
14
public
:
// access
15
~Frame
();
16
17
uint8_t*
data
()
const
{
18
return
m_data;
19
}
17
uint8_t*
data
()
const
{
…
}
20
21
size_t
size
()
const
{
22
return
m_size;
23
}
21
size_t
size
()
const
{
…
}
24
25
int
getWidth
()
const
{
26
return
m_width;
27
}
25
int
getWidth
()
const
{
…
}
28
29
int
getHeight
()
const
{
30
return
m_height;
31
}
29
int
getHeight
()
const
{
…
}
32
40
bool
writeTo
(Print& os,
int
timeout = 10000);
41
49
bool
writeTo
(Client& os,
int
timeout = 10000);
50
51
public
:
// conversion
52
bool
isJpeg
()
const
;
53
58
bool
toJpeg
(
int
quality);
59
60
bool
isBmp
()
const
;
61
63
bool
toBmp
();
64
65
private
:
66
Frame
();
67
68
explicit
Frame
(
void
* fb);
69
70
bool
writeToImpl(Print& os,
int
timeout, Client* client);
71
72
void
releaseFb();
73
74
private
:
75
class
CameraFbT;
76
CameraFbT* m_fb =
nullptr
;
77
uint8_t* m_data =
nullptr
;
78
size_t
m_size = 0;
79
int
m_width = -1;
80
int
m_height = -1;
81
int
m_pixFormat = -1;
82
83
friend
class
CameraClass
;
84
};
13
class
Frame
{
…
};
85
86
}
// namespace esp32cam
87
88
#endif
// ESP32CAM_FRAME_HPP
esp32cam::CameraClass
Definition
camera.hpp:10
esp32cam::Frame
A frame of picture.
Definition
frame.hpp:13
esp32cam::Frame::writeTo
bool writeTo(Print &os, int timeout=10000)
Write frame buffer to os .
Definition
frame.cpp:40
esp32cam::Frame::toJpeg
bool toJpeg(int quality)
Convert frame to JPEG.
Definition
frame.cpp:68
esp32cam::Frame::data
uint8_t * data() const
Definition
frame.hpp:17
esp32cam::Frame::toBmp
bool toBmp()
Convert frame to BMP.
Definition
frame.cpp:104
esp32cam::Frame::getWidth
int getWidth() const
Definition
frame.hpp:25
esp32cam::Frame::getHeight
int getHeight() const
Definition
frame.hpp:29
esp32cam::Frame::size
size_t size() const
Definition
frame.hpp:21
esp32cam::Frame::isJpeg
bool isJpeg() const
Definition
frame.cpp:63
esp32cam::Frame::isBmp
bool isBmp() const
Definition
frame.cpp:99
esp32cam::Frame::~Frame
~Frame()
Definition
frame.cpp:23
esp32cam
Definition
esp32cam.h:14
Generated by
1.9.8