maix::http
maix.http module
This is
maix::httpmodule of MaixCDK.
All of these elements are in namespacemaix::http.For MaixCDK developer: DO NOT edit this doc file manually, this doc is auto generated!
Module
No module
Enum
Variable
Function
Class
JpegStreamer
JpegStreamer class
C++ defination code:
class JpegStreamer
JpegStreamer
Construct a new jpeg streamer object
| item | description |
|---|---|
| type | func |
| note | You can get the picture stream through http://host:port/stream, you can also get it through http://ip:port, and you can add personal style through set_html() at this time |
| param | host: http host port: http port, default is 8000 client_number: the max number of client |
| static | False |
C++ defination code:
JpegStreamer(std::string host = std::string(), int port = 8000, int client_number = 16)
start
start jpeg streame
| item | description |
|---|---|
| type | func |
| return | error code, err::ERR_NONE means success, others means failed |
| static | False |
C++ defination code:
err::Err start()
stop
stop http
| item | description |
|---|---|
| type | func |
| return | error code, err::ERR_NONE means success, others means failed |
| static | False |
C++ defination code:
err::Err stop()
write
Write data to http
| item | description |
|---|---|
| type | func |
| param | img: image object |
| return | error code, err::ERR_NONE means success, others means failed |
| static | False |
C++ defination code:
err::Err write(image::Image *img)
set_html
add your style in this api\ndefault is:\n\n
\nJPG Stream
\n| item | description |
|---|---|
| type | func |
| param | data: html code |
| return | error code, err::ERR_NONE means success, others means failed |
| static | False |
C++ defination code:
err::Err set_html(std::string data)
host
Get host
| item | description |
|---|---|
| type | func |
| return | host name |
| static | False |
C++ defination code:
std::string host()
port
Get port
| item | description |
|---|---|
| type | func |
| return | port |
| static | False |
C++ defination code:
int port()