VART-X  0.3.0
vart::VideoFrameImplBase Class Referenceabstract

Abstract base class for video frame implementation used by VideoFrame. More...

#include <vart_videoframe_impl_base.hpp>

Collaboration diagram for vart::VideoFrameImplBase:

Public Member Functions

 VideoFrameImplBase ()=delete
 
 VideoFrameImplBase (std::shared_ptr< Device > dev)
 VideoFrameImplBase() - Constructor that takes device instance as an input. More...
 
virtual ~VideoFrameImplBase ()
 Virtual destructor to ensure proper cleanup of derived implementations. More...
 
virtual const VideoFrameMapInfomap (DataMapFlags map_flags)=0
 map() - Maps video frame data to user space More...
 
virtual void unmap ()=0
 unmap() - Unmaps video frame data from user space. More...
 
virtual const VideoInfoget_video_info ()=0
 get_video_info() - Retrieves the video frame information from the current frame More...
 
virtual std::shared_ptr< Deviceget_device_handle ()=0
 get_device_handle() - Retrieves the device handle associated with the current frame More...
 
virtual int export_buffer () const =0
 export_buffer() - Export the video frame buffer as a dma-buf file descriptor. More...
 

Protected Attributes

VideoInfo vinfo
 
VideoFrameMapInfo vmap_info
 
std::shared_ptr< Devicedevice
 

Detailed Description

Abstract base class for video frame implementation used by VideoFrame.

Note
Applications should use vart::VideoFrame rather than this type directly, unless extending or implementing a new backend.

Constructor & Destructor Documentation

◆ VideoFrameImplBase() [1/2]

vart::VideoFrameImplBase::VideoFrameImplBase ( )
delete

◆ VideoFrameImplBase() [2/2]

vart::VideoFrameImplBase::VideoFrameImplBase ( std::shared_ptr< Device dev)
inline

VideoFrameImplBase() - Constructor that takes device instance as an input.

Parameters
devDevice instance

◆ ~VideoFrameImplBase()

virtual vart::VideoFrameImplBase::~VideoFrameImplBase ( )
inlinevirtual

Virtual destructor to ensure proper cleanup of derived implementations.

Member Function Documentation

◆ export_buffer()

virtual int vart::VideoFrameImplBase::export_buffer ( ) const
pure virtual

export_buffer() - Export the video frame buffer as a dma-buf file descriptor.

Returns
File descriptor representing the exported buffer. Implementations may return -1 to indicate that exporting is not supported for this memory type.

◆ get_device_handle()

virtual std::shared_ptr<Device> vart::VideoFrameImplBase::get_device_handle ( )
pure virtual

get_device_handle() - Retrieves the device handle associated with the current frame

Returns
Returns the device handle associated with the current frame.

◆ get_video_info()

virtual const VideoInfo& vart::VideoFrameImplBase::get_video_info ( )
pure virtual

get_video_info() - Retrieves the video frame information from the current frame

Returns
Returns information related to video frame

◆ map()

virtual const VideoFrameMapInfo& vart::VideoFrameImplBase::map ( DataMapFlags  map_flags)
pure virtual

map() - Maps video frame data to user space

Parameters
[in]map_flagsFlag used to indicate mode of memory mapping. May combine bits from DataMapFlags.
Returns
Const reference to the cached VideoFrameMapInfo. Implementations should refresh vmap_info on each successful call.

◆ unmap()

virtual void vart::VideoFrameImplBase::unmap ( )
pure virtual

unmap() - Unmaps video frame data from user space.

Member Data Documentation

◆ device

std::shared_ptr<Device> vart::VideoFrameImplBase::device
protected

◆ vinfo

VideoInfo vart::VideoFrameImplBase::vinfo
protected

◆ vmap_info

VideoFrameMapInfo vart::VideoFrameImplBase::vmap_info
protected

The documentation for this class was generated from the following file: