Logo
ApraPipes 1.0
Loading...
Searching...
No Matches
NvV4L2CameraHelper Class Reference

#include <NvV4L2CameraHelper.h>

Collaboration diagram for NvV4L2CameraHelper:
Collaboration graph

Public Types

typedef std::function< void(frame_sp &)> SendFrame
 

Public Member Functions

 NvV4L2CameraHelper (SendFrame sendFrame, std::function< frame_sp()> _makeFrame)
 
 ~NvV4L2CameraHelper ()
 
bool start (uint32_t width, uint32_t height, uint32_t maxConcurrentFrames, bool isMirror)
 
bool stop ()
 
void operator() ()
 
bool queueBufferToCamera ()
 

Static Public Member Functions

static std::shared_ptr< NvV4L2CameraHelpercreate (SendFrame sendFrame, std::function< frame_sp()> _makeFrame)
 

Private Member Functions

bool cameraInitialize (bool isMirror)
 
bool prepareBuffers ()
 
bool startStream ()
 
bool requestCameraBuff ()
 
bool stopStream ()
 

Private Attributes

std::thread mThread
 
std::mutex mBufferFDMutex
 
std::function< frame_sp()> mMakeFrame
 
const char * mCamDevname
 
int mCamFD
 
unsigned int mCamPixFmt
 
unsigned int mCamWidth
 
unsigned int mCamHeight
 
uint32_t mMaxConcurrentFrames
 
bool mRunning
 
SendFrame mSendFrame
 
std::map< int, frame_sp > mBufferFD
 

Member Typedef Documentation

◆ SendFrame

std::function<void (frame_sp&)> NvV4L2CameraHelper::SendFrame

Constructor & Destructor Documentation

◆ NvV4L2CameraHelper()

NvV4L2CameraHelper::NvV4L2CameraHelper ( SendFrame sendFrame,
std::function< frame_sp()> _makeFrame )

◆ ~NvV4L2CameraHelper()

NvV4L2CameraHelper::~NvV4L2CameraHelper ( )

Member Function Documentation

◆ cameraInitialize()

bool NvV4L2CameraHelper::cameraInitialize ( bool isMirror)
private
Here is the caller graph for this function:

◆ create()

static std::shared_ptr< NvV4L2CameraHelper > NvV4L2CameraHelper::create ( SendFrame sendFrame,
std::function< frame_sp()> _makeFrame )
static

◆ operator()()

void NvV4L2CameraHelper::operator() ( )

◆ prepareBuffers()

bool NvV4L2CameraHelper::prepareBuffers ( )
private

◆ queueBufferToCamera()

bool NvV4L2CameraHelper::queueBufferToCamera ( )
Here is the caller graph for this function:

◆ requestCameraBuff()

bool NvV4L2CameraHelper::requestCameraBuff ( )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ start()

bool NvV4L2CameraHelper::start ( uint32_t width,
uint32_t height,
uint32_t maxConcurrentFrames,
bool isMirror )
Here is the call graph for this function:

◆ startStream()

bool NvV4L2CameraHelper::startStream ( )
private
Here is the caller graph for this function:

◆ stop()

bool NvV4L2CameraHelper::stop ( )
Here is the call graph for this function:

◆ stopStream()

bool NvV4L2CameraHelper::stopStream ( )
private
Here is the caller graph for this function:

Member Data Documentation

◆ mBufferFD

std::map<int, frame_sp> NvV4L2CameraHelper::mBufferFD
private

◆ mBufferFDMutex

std::mutex NvV4L2CameraHelper::mBufferFDMutex
private

◆ mCamDevname

const char* NvV4L2CameraHelper::mCamDevname
private

◆ mCamFD

int NvV4L2CameraHelper::mCamFD
private

◆ mCamHeight

unsigned int NvV4L2CameraHelper::mCamHeight
private

◆ mCamPixFmt

unsigned int NvV4L2CameraHelper::mCamPixFmt
private

◆ mCamWidth

unsigned int NvV4L2CameraHelper::mCamWidth
private

◆ mMakeFrame

std::function<frame_sp()> NvV4L2CameraHelper::mMakeFrame
private

◆ mMaxConcurrentFrames

uint32_t NvV4L2CameraHelper::mMaxConcurrentFrames
private

◆ mRunning

bool NvV4L2CameraHelper::mRunning
private

◆ mSendFrame

SendFrame NvV4L2CameraHelper::mSendFrame
private

◆ mThread

std::thread NvV4L2CameraHelper::mThread
private

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