maix::pipeline
maix.pipeline module, video stream processing via pipeline
This is
maix::pipeline
module of MaixCDK.
All of these elements are in namespacemaix::pipeline
.For MaixCDK developer: DO NOT edit this doc file manually, this doc is auto generated!
Module
No module
Enum
Variable
Function
Class
Stream
Stream class, saved the video stream data
C++ defination code:
class Stream
Stream
Construct a new Stream object
item | description |
---|---|
type | func |
param | stream: stream handle auto_delete: auto delete stream when object is destroyed from: When releasing the object, the 'from' parameter will be referenced to determine the release method. |
static | False |
C++ defination code:
Stream(void *stream, bool auto_delete = false, std::string from = "")
Stream (overload 1)
Create a stream object
item | description |
---|---|
type | func |
param | data: data pointer data_size: data size pts: presentation timestamp copy: if copy is true, the data will be copied |
static | False |
C++ defination code:
Stream(uint8_t *data, size_t data_size, size_t pts, bool copy = true)
data_count
Since a single stream may contain multiple pieces of data, this returns the number of data segments present.
item | description |
---|---|
type | func |
static | False |
C++ defination code:
int data_count()
data
Get the data stream at index
item | description |
---|---|
type | func |
param | idx: data index, must be less than data_count(). |
return | Returns the data at index. Note: when using C++, you need to manually release the memory. |
static | False |
C++ defination code:
Bytes *data(int idx)
data_size
Get the data size at index
item | description |
---|---|
type | func |
param | idx: data index, must be less than data_count(). |
return | Returns the data size at index. |
static | False |
C++ defination code:
int data_size(int idx)
get_sps_frame
Get the SPS frame data; if the frame does not exist, return null.
item | description |
---|---|
type | func |
return | SPS frame data. |
static | False |
C++ defination code:
Bytes *get_sps_frame()
get_pps_frame
Get the PPS frame data; if the frame does not exist, return null.
item | description |
---|---|
type | func |
return | PPS frame data. |
static | False |
C++ defination code:
Bytes *get_pps_frame()
get_i_frame
Get the I frame data; if the frame does not exist, return null.
item | description |
---|---|
type | func |
return | I frame data. |
static | False |
C++ defination code:
Bytes *get_i_frame()
get_p_frame
Get the PTS(Presentation Timestamp) of the stream.
item | description |
---|---|
type | func |
return | P frame data. |
static | False |
C++ defination code:
Bytes *get_p_frame()
has_pps_frame
Check if the stream has PPS frame.
item | description |
---|---|
type | func |
return | PPS frame data. |
static | False |
C++ defination code:
bool has_pps_frame()
has_sps_frame
Check if the stream has SPS frame.
item | description |
---|---|
type | func |
return | SPS frame data. |
static | False |
C++ defination code:
bool has_sps_frame()
has_i_frame
Check if the stream has I frame.
item | description |
---|---|
type | func |
return | True if the stream has I frame, otherwise false. |
static | False |
C++ defination code:
bool has_i_frame()
has_p_frame
Check if the stream has P frame.
item | description |
---|---|
type | func |
return | True if the stream has P frame, otherwise false. |
static | False |
C++ defination code:
bool has_p_frame()
pts
Get the pts(Presentation Timestamp) of the stream
item | description |
---|---|
type | func |
return | Returns the pts of the stream. |
static | False |
C++ defination code:
size_t pts()
stream
Get frame
item | description |
---|---|
type | func |
return | Returns the frame. |
static | False |
C++ defination code:
void *stream()
Frame
Frame class, saved the image data
C++ defination code:
class Frame
Frame
Construct a new Frame object
item | description |
---|---|
type | func |
param | frame: frame handle auto_delete: auto delete frame when object is destroyed from: When releasing the object, the 'from' parameter will be referenced to determine the release method. |
static | False |
C++ defination code:
Frame(void *frame, bool auto_delete = false, std::string from = "")
width
Get the width of the frame
item | description |
---|---|
type | func |
return | Returns the width of the frame. |
static | False |
C++ defination code:
int width()
height
Get the height of the frame
item | description |
---|---|
type | func |
return | Returns the height of the frame. |
static | False |
C++ defination code:
int height()
format
Get the format of the frame
item | description |
---|---|
type | func |
return | Returns the format of the frame. |
static | False |
C++ defination code:
image::Format format()
to_image
Convert the frame to an image
item | description |
---|---|
type | func |
return | Returns an image object. |
static | False |
C++ defination code:
image::Image *to_image()
stride
Get the stride of the plane. Stride represents the number of bytes occupied in memory by each row of image data.\nIt is usually greater than or equal to the number of bytes actually used by the pixels in that row.\nIn image processing, different image formats are divided into multiple planes.\nTypically, RGB images have only one valid plane, while NV21/NV12 images have two valid planes.
item | description |
---|---|
type | func |
param | idx: plane index. |
return | Returns the stride of the frame. |
static | False |
C++ defination code:
int stride(int idx)
virtual_address
Get the virtual address of the plane. In image processing, different image formats are divided into multiple planes.\nTypically, RGB images have only one valid plane, while NV21/NV12 images have two valid planes.
item | description |
---|---|
type | func |
note | You can read image data from this address, but you need to be very careful. If the current object has been released, operating on this address is prohibited. |
param | idx: plane index. |
return | Returns the virtual address of the frame. |
static | False |
C++ defination code:
uint64_t virtual_address(int idx)
physical_address
Get the physical address of the plane. In image processing, different image formats are divided into multiple planes.\nTypically, RGB images have only one valid plane, while NV21/NV12 images have two valid planes.
item | description |
---|---|
type | func |
note | Don’t operate on this address. |
param | idx: plane index. |
return | Returns the physical address of the frame. |
static | False |
C++ defination code:
uint64_t physical_address(int idx)
frame
Get frame
item | description |
---|---|
type | func |
return | Returns the frame. |
static | False |
C++ defination code:
void *frame()