The VVASFrame stores information related to a video frame. The GStreamer infrastructure plug-ins allocate the VVASFrame handle for input and output video frames and sends them to the VVAS kernel processing APIs. Also, the VVASFrame can be allocated by the kernel libraries for internal memory requirements (that is, memory for filter coefficients).
typedef struct _vvas_frame_props VVASFrameProps;
typedef struct _vvas_frame VVASFrame;
// frame properties hold information about video frame
struct _vvas_frame_props {
uint32_t width;
uint32_t height;
uint32_t stride;
VVASVideoFormat fmt;
};
struct _vvas_frame {
uint32_t bo[VIDEO_MAX_PLANES]; // ignore: currently not used
void *vaddr[VIDEO_MAX_PLANES]; // virtual/user space address of
//video frame memory
uint64_t paddr[VIDEO_MAX_PLANES]; // physical address of video frame
uint32_t size[VIDEO_MAX_PLANES];
void *meta_data;
VVASFrameProps props; /* properties of video frame */
/* application's private data */
void *app_priv; /* assigned to GstBuffer by GStreamer infrastructure plugin */
VVASMemoryType mem_type;
/*number of planes in props.fmt */
uint32_t n_planes; // number of planes based on color format
};