maix::rtsp
maix.rtsp module
This is
maix::rtsp
module of MaixCDK.
All of these elements are in namespacemaix::rtsp
.For MaixCDK developer: DO NOT edit this doc file manually, this doc is auto generated!
Module
No module
Enum
RtspStreamType
The stream type of rtsp
item | describe |
---|---|
values | RTSP_STREAM_NONE: format invalid RTSP_STREAM_H264: RTSP_STREAM_H265: |
C++ defination code:
enum RtspStreamType { RTSP_STREAM_NONE = 0, // format invalid RTSP_STREAM_H264, RTSP_STREAM_H265, }
Variable
Function
Class
Region
Region class
C++ defination code:
class Region
Region
Construct a new Region object
item | description |
---|---|
type | func |
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
Return an image object from region
item | description |
---|---|
type | func |
return | image object |
static | False |
C++ defination code:
image::Image *get_canvas()
update_canvas
Update canvas
item | description |
---|---|
type | func |
return | error code |
static | False |
C++ defination code:
err::Err update_canvas()
Rtsp
Rtsp class
C++ defination code:
class Rtsp
Rtsp
Construct a new Video object
item | description |
---|---|
type | func |
param | ip: rtsp ip port: rtsp port fps: rtsp fps stream_type: rtsp stream type bitrate: rtsp bitrate |
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_H264, int bitrate = 3000 * 1000)
start
start rtsp
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 rtsp
item | description |
---|---|
type | func |
return | error code, err::ERR_NONE means success, others means failed |
static | False |
C++ defination code:
err::Err stop()
bind_camera
Bind camera
item | description |
---|---|
type | func |
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)
bind_audio_recorder
Bind audio recorder
item | description |
---|---|
type | func |
note | If the audio_recorder object is bound, the audio_recorder object cannot be used elsewhere. |
param | recorder: audio_recorder object |
return | error code, err::ERR_NONE means success, others means failed |
static | False |
C++ defination code:
err::Err bind_audio_recorder(audio::Recorder *recorder)
write
Write data to rtsp(This function will be removed in the future)
item | description |
---|---|
type | func |
param | frame: video frame data |
return | error code, err::ERR_NONE means success, others means failed |
static | False |
C++ defination code:
err::Err write(video::Frame &frame)
get_url
Get url of rtsp
item | description |
---|---|
type | func |
return | url of rtsp |
static | False |
C++ defination code:
std::string get_url()
get_urls
Get url list of rtsp
item | description |
---|---|
type | func |
return | url list of rtsp |
static | False |
C++ defination code:
std::vector<std::string> get_urls()
to_camera
Get camera object from rtsp
item | description |
---|---|
type | func |
return | camera object |
static | False |
C++ defination code:
camera::Camera *to_camera()
rtsp_is_start
return rtsp start status
item | description |
---|---|
type | func |
return | true means rtsp is start, false means rtsp is stop. |
static | False |
C++ defination code:
bool rtsp_is_start()
add_region
return a region object, you can draw image on the region.(This function will be removed in the future)
item | description |
---|---|
type | func |
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
update and show region(This function will be removed in the future)
item | description |
---|---|
type | func |
return | error code |
static | False |
C++ defination code:
err::Err update_region(rtsp::Region ®ion)
del_region
del region(This function will be removed in the future)
item | description |
---|---|
type | func |
return | error code |
static | False |
C++ defination code:
err::Err del_region(rtsp::Region *region)
draw_rect
Draw a rectangle on the canvas(This function will be removed in the future)
item | description |
---|---|
type | func |
param | id: region id x: rectangle coordinate x y: rectangle coordinate y width: rectangle width height: rectangle height color: rectangle color thickness: rectangle thickness. If you set it to -1, the rectangle will be filled. |
return | error code |
static | False |
C++ defination code:
err::Err draw_rect(int id, int x, int y, int width, int height, image::Color color, int thickness = 1)
draw_string
Draw a string on the canvas(This function will be removed in the future)
item | description |
---|---|
type | func |
param | id: region id x: string coordinate x y: string coordinate y str: string color: string color size: string size thickness: string thickness |
return | error code |
static | False |
C++ defination code:
err::Err draw_string(int id, int x, int y, const char *str, image::Color color, int size = 16, int thickness = 1)