Class vart::VideoFrame#
-
class VideoFrame
This module simplifies the management of frame memory complexities and provides APIs for reading and writing a frame.
The VideoFrame class offers flexibility for applications to encapsulate their own memory into the VideoFrame class. In such instances, the application bears the responsibility for deallocating the frame memory.
Public Functions
VideoFrame() - Constructor for creating video frame instance using implementation specific method based on input ‘type’.
- Parameters:
type – Enum class to specify which type of memory allocation method to use
size – Size of the buffer
mbank_idx – memory bank index on which memory needss to be allocated
vinfo – VideoInfo instance which contains video frame specific information
device – Device handle to be used by implementation
VideoFrame() - Constructor for creating video frame instance using input data pointers.
- Parameters:
type – Enum class to specify which type of memory allocation method to use
data_vec – Vector of user allocated buffer pointers
vinfo – VideoInfo instance which contains video frame specific information
device – Device handle to be used by implementation
VideoFrame() - Constructor for creating video frame instance using input XRT Buffer object(BO)
- Parameters:
type – Enum class to specify which type of memory allocation method to use
mbank_idx – memory bank index on which memory was allocated
bo_vec – Vector of XRT BOs allocated by user
vinfo – VideoInfo instance which contains video frame specific information
device – Device handle to be used by implementation
-
~VideoFrame() = default#
-
const VideoFrameMapInfo &map(DataMapFlags map_flags)#
map() - Maps video frame data to user space
- Parameters:
map_flags – Flag used to indicate mode of memory mapping
- Returns:
Returns information containing user space data pointer(s) and its corresponding video frame information.
-
const VideoInfo &get_video_info() const#
get_video_info() - Retrieves the video frame information from video frame
- Returns:
Returns infomation related to video frame
-
std::shared_ptr<Device> get_device_handle() const#
get_device_handle() - Retrieves the device handle associated with the current frame
-
const std::shared_ptr<VideoFrameImplBase> &get_pimpl_handle() const#
get_pimpl_handle() - Retrieves pointer to implementation class.
- Returns:
Returns a constant reference of pointer to implementation class.
Private Members
-
std::shared_ptr<VideoFrameImplBase> pimpl#