QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
CpuVideoFramePool::FrameMapping Class Reference

#include <CpuVideoFramePool.h>

Public Member Functions

 FrameMapping ()=default
 ~FrameMapping ()
 FrameMapping (const FrameMapping &)=delete
FrameMapping & operator= (const FrameMapping &)=delete
bool mapFrame (GstBuffer *buffer, const GstVideoInfo &info, GstMapFlags flags=GST_MAP_READ)
 Maps buffer with flags on the first call; false when that fails.
const GstVideoFrame & frame () const
 The mapped frame; valid while mapFrame() succeeded and unmap() hasn't run.
QAbstractVideoBuffer::MapData map (GstBuffer *buffer, const GstVideoInfo &info)
 mapFrame() for reading, as Qt map data; empty when the map fails.
void unmap () noexcept

Detailed Description

A buffer's gst_video_frame_map, held until unmap() or destruction: the CPU view behind a buffer's QAbstractVideoBuffer::map(), or any other scoped frame map.

Definition at line 59 of file CpuVideoFramePool.h.

Constructor & Destructor Documentation

◆ FrameMapping() [1/2]

CpuVideoFramePool::FrameMapping::FrameMapping ( )
default

Referenced by FrameMapping(), and operator=().

◆ ~FrameMapping()

CpuVideoFramePool::FrameMapping::~FrameMapping ( )
inline

Definition at line 64 of file CpuVideoFramePool.h.

References unmap().

◆ FrameMapping() [2/2]

CpuVideoFramePool::FrameMapping::FrameMapping ( const FrameMapping & )
delete

References FrameMapping().

Member Function Documentation

◆ frame()

const GstVideoFrame & CpuVideoFramePool::FrameMapping::frame ( ) const
inline

The mapped frame; valid while mapFrame() succeeded and unmap() hasn't run.

Definition at line 73 of file CpuVideoFramePool.h.

Referenced by CpuVideoFramePool::copyFromBuffer().

◆ map()

QAbstractVideoBuffer::MapData CpuVideoFramePool::FrameMapping::map ( GstBuffer * buffer,
const GstVideoInfo & info )

mapFrame() for reading, as Qt map data; empty when the map fails.

Definition at line 157 of file CpuVideoFramePool.cc.

References CpuVideoFramePool::mapDataFor(), and mapFrame().

◆ mapFrame()

bool CpuVideoFramePool::FrameMapping::mapFrame ( GstBuffer * buffer,
const GstVideoInfo & info,
GstMapFlags flags = GST_MAP_READ )

Maps buffer with flags on the first call; false when that fails.

Definition at line 149 of file CpuVideoFramePool.cc.

Referenced by CpuVideoFramePool::copyFromBuffer(), and map().

◆ operator=()

FrameMapping & CpuVideoFramePool::FrameMapping::operator= ( const FrameMapping & )
delete

References FrameMapping().

◆ unmap()

void CpuVideoFramePool::FrameMapping::unmap ( )
noexcept

Definition at line 165 of file CpuVideoFramePool.cc.

Referenced by ~FrameMapping().


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