maix.http

maix.http module

You can use maix.http to access this module with MaixPy
This module is generated from MaixPy and MaixCDK

Module

No module

Enum

Variable

Function

Class

JpegStreamer

JpegStreamer class

C++ defination code:

class JpegStreamer

__init__

def __init__(self, host: str = '', port: int = 8000, client_number: int = 16) -> None

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

def start(self) -> maix.err.Err

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()

start (overload 1)

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

def write(self, img: maix.image.Image) -> maix.err.Err

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

def set_html(self, data: str) -> maix.err.Err

add your style in this api\ndefault is:\n\n\n

JPG Stream

\n\n\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

def host(self) -> str

Get host

item description
type func
return host name
static False

C++ defination code:

std::string host()

port

def port(self) -> int

Get port

item description
type func
return port
static False

C++ defination code:

int port()