maix.rtsp
maix.rtsp module
You can use
maix.rtsp
to access this module with MaixPy
This module is generated from MaixCDK
Module
No module
Enum
RtspStreamType
item | doc |
---|---|
brief | The stream type of rtsp |
values | RTSP_STREAM_NONE: format invalid RTSP_STREAM_H265: |
C++ defination code:
enum RtspStreamType
{
RTSP_STREAM_NONE = 0, // format invalid
RTSP_STREAM_H265,
}
Variable
Function
Class
Region
item | doc |
---|---|
brief | Region class |
C++ defination code:
class Region
__init__
def __init__(self, x: int, y: int, width: int, height: int, format: maix.image.Format, camera: maix.camera.Camera) -> None
item | doc |
---|---|
type | func |
brief | Construct a new Region object |
param | x: region coordinate x y: region coordinate y width: region width height: region height format: region format camera: bind region to camera |
static | False |
C++ defination code:
Region(int x, int y, int width, int height, image::Format format, camera::Camera *camera)
get_canvas
def get_canvas(self) -> maix.image.Image
item | doc |
---|---|
type | func |
brief | Return an image object from region |
return | image object |
static | False |
C++ defination code:
image::Image *get_canvas()
update_canvas
def update_canvas(self) -> maix.err.Err
item | doc |
---|---|
type | func |
brief | Update canvas |
return | error code |
static | False |
C++ defination code:
err::Err update_canvas()
Rtsp
item | doc |
---|---|
brief | Rtsp class |
C++ defination code:
class Rtsp
__init__
item | doc |
---|---|
type | func |
brief | Construct a new Video object |
param | ip: rtsp ip port: rtsp port fps: rtsp fps stream_type: rtsp stream type |
static | False |
C++ defination code:
Rtsp(std::string ip = std::string(), int port = 8554, int fps = 30, rtsp::RtspStreamType stream_type = rtsp::RtspStreamType::RTSP_STREAM_H265)
start
item | doc |
---|---|
type | func |
brief | start rtsp |
return | error code, err::ERR_NONE means success, others means failed |
static | False |
C++ defination code:
err::Err start()
start (overload 1)
item | doc |
---|---|
type | func |
brief | stop rtsp |
return | error code, err::ERR_NONE means success, others means failed |
static | False |
C++ defination code:
err::Err stop()
bind_camera
item | doc |
---|---|
type | func |
brief | Bind camera |
param | camera: camera object |
return | error code, err::ERR_NONE means success, others means failed |
static | False |
C++ defination code:
err::Err bind_camera(camera::Camera *camera)
write
item | doc |
---|---|
type | func |
brief | Write data to rtsp |
param | type: rtsp stream type data: rtsp stream data fps: rtsp stream data size |
return | error code, err::ERR_NONE means success, others means failed |
static | False |
C++ defination code:
err::Err write(video::Frame &stream)
get_url
item | doc |
---|---|
type | func |
brief | Get url of rtsp |
return | url of rtsp |
static | False |
C++ defination code:
std::string get_url()
to_camera
item | doc |
---|---|
type | func |
brief | Get camera object from rtsp |
return | camera object |
static | False |
C++ defination code:
camera::Camera *to_camera()
rtsp_is_start
item | doc |
---|---|
type | func |
brief | return rtsp start status |
return | true means rtsp is start, false means rtsp is stop. |
static | False |
C++ defination code:
bool rtsp_is_start()
add_region
item | doc |
---|---|
type | func |
brief | return a region object, you can draw image on the region. |
param | x: region coordinate x y: region coordinate y width: region width height: region height format: region format, support Format::FMT_BGRA8888 only |
return | the reigon object |
static | False |
C++ defination code:
rtsp::Region *add_region(int x, int y, int width, int height, image::Format format = image::Format::FMT_BGRA8888)
update_region
item | doc |
---|---|
type | func |
brief | update and show region |
return | error code |
static | False |
C++ defination code:
err::Err update_region(rtsp::Region ®ion)