maix.uvc
maix.uvc module
You can use
maix.uvcto access this module with MaixPy
This module is generated from MaixPy and MaixCDK
Module
No module
Enum
Variable
Function
helper_fill_mjpg_image
def helper_fill_mjpg_image(buf: capsule, size: int, img: maix.image.Image) -> int
helper_fill_mjpg_image
| item | description |
|---|---|
| param | buf: to be filled size: to be set img: image::Image |
| return | int |
C++ defination code:
int helper_fill_mjpg_image(void* buf, uint32_t* size, image::Image *img)
Class
UvcServer
UvcServer class
C++ defination code:
class UvcServer
set_cb
def set_cb(self, cb: typing.Callable[[capsule, int], int]) -> None
set UvcServer's cb
| item | description |
|---|---|
| type | func |
| param | cb: callback function |
| return | void |
| static | False |
C++ defination code:
void set_cb(std::function<int(void* buf, uint32_t* size)> cb)
run
def run(self) -> None
run UvcServer
| item | description |
|---|---|
| type | func |
| return | void |
| static | False |
C++ defination code:
void run()
stop
def stop(self) -> None
stop UvcServer
| item | description |
|---|---|
| type | func |
| return | void |
| static | False |
C++ defination code:
void stop()
__init__
def __init__(self, cb: typing.Callable[[capsule, int], int] = None) -> None
Construct a new jpeg server 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 |
| static | False |
C++ defination code:
UvcServer(std::function<int(void* buf, uint32_t* size)> cb = nullptr)
UvcStreamer
UvcStreamer class
C++ defination code:
class UvcStreamer
__init__
def __init__(self) -> 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 |
| static | False |
C++ defination code:
UvcStreamer()
show
def show(self, img: maix.image.Image) -> maix.err.Err
Write data to uvc
| 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 show(image::Image *img)
use_mjpg
def use_mjpg(self, b: int = 1) -> None
use mjpg on uvc
| item | description |
|---|---|
| type | func |
| param | b: using mjpg: 0 for NOT, others to use |
| return | void |
| static | False |
C++ defination code:
void use_mjpg(uint32_t b=1)