# ArgusSamples::ConsumerThread Class Reference

Inheritance diagram for ArgusSamples::ConsumerThread:

List of all members.

## Public Member Functions

| ConsumerThread (OutputStream *stream)
virtual | ~ConsumerThread ()
| ConsumerThread (OutputStream *stream)
| ~ConsumerThread ()
bool | isInError ()
| ConsumerThread (OutputStream *stream)
| ~ConsumerThread ()
bool | isInError ()

## Protected Member Functions

virtual bool | processV4L2Fd (int32_t fd, uint64_t frameNumber)=0
Thread methods
virtual bool | threadInitialize ()
virtual bool | threadExecute ()
virtual bool | threadShutdown ()

## Protected Attributes

OutputStream * | m_stream
UniqueObj< FrameConsumer > | m_consumer
int | m_dmabuf

## Private Member Functions

bool | createVideoEncoder ()
void | abort ()
bool | createImageConverter ()
void | abort ()
void | writeFrameToOpencvConsumer (camera_caffe_context *p_ctx, NvBuffer *buffer)
Thread methods
virtual bool | threadInitialize ()
virtual bool | threadExecute ()
virtual bool | threadShutdown ()
Thread methods
virtual bool | threadInitialize ()
virtual bool | threadExecute ()
virtual bool | threadShutdown ()

## Static Private Member Functions

static bool | encoderCapturePlaneDqCallback (struct v4l2_buffer *v4l2_buf, NvBuffer *buffer, NvBuffer *shared_buffer, void *arg)
static bool | converterCapturePlaneDqCallback (struct v4l2_buffer *v4l2_buf, NvBuffer *buffer, NvBuffer *shared_buffer, void *arg)
static bool | converterOutputPlaneDqCallback (struct v4l2_buffer *v4l2_buf, NvBuffer *buffer, NvBuffer *shared_buffer, void *arg)

## Private Attributes

NvVideoEncoder * | m_VideoEncoder
std::ofstream * | m_outputFile
bool | m_gotError
NvVideoConverter * | m_ImageConverter
std::queue< NvBuffer * > * | m_ConvOutputPlaneBufQueue
pthread_mutex_t | m_queueLock
pthread_cond_t | m_queueCond
int | conv_buf_num
int | m_numPendingFrames
camera_caffe_context * | m_pContext

## Detailed Description

Definition at line 74 of file main.cpp.

## Constructor & Destructor Documentation

ArgusSamples::ConsumerThread::ConsumerThread | ( | OutputStream * | stream | ) | `[inline, explicit]`

Definition at line 77 of file main.cpp.

ArgusSamples::ConsumerThread::~ConsumerThread | ( |  | ) | `[virtual]`

Definition at line 99 of file main.cpp.

ArgusSamples::ConsumerThread::ConsumerThread | ( | OutputStream * | stream | ) | `[explicit]`

ArgusSamples::ConsumerThread::~ConsumerThread | ( |  | ) |

ArgusSamples::ConsumerThread::ConsumerThread | ( | OutputStream * | stream | ) | `[explicit]`

ArgusSamples::ConsumerThread::~ConsumerThread | ( |  | ) |

## Member Function Documentation

void ArgusSamples::ConsumerThread::abort | ( |  | ) | `[private]`

void ArgusSamples::ConsumerThread::abort | ( |  | ) | `[private]`

Definition at line 353 of file main.cpp.

bool ArgusSamples::ConsumerThread::converterCapturePlaneDqCallback | ( | struct v4l2_buffer * | v4l2_buf,
|  | NvBuffer * | buffer,
|  | NvBuffer * | shared_buffer,
|  | void * | arg |
| ) |  |  | `[static, private]`

Definition at line 261 of file camera_caffe_main.cpp.

bool ArgusSamples::ConsumerThread::converterOutputPlaneDqCallback | ( | struct v4l2_buffer * | v4l2_buf,
|  | NvBuffer * | buffer,
|  | NvBuffer * | shared_buffer,
|  | void * | arg |
| ) |  |  | `[static, private]`

Definition at line 292 of file camera_caffe_main.cpp.

bool ArgusSamples::ConsumerThread::createImageConverter | ( |  | ) | `[private]`

Definition at line 323 of file camera_caffe_main.cpp.

bool ArgusSamples::ConsumerThread::createVideoEncoder | ( |  | ) | `[private]`

Definition at line 282 of file main.cpp.

bool ArgusSamples::ConsumerThread::encoderCapturePlaneDqCallback | ( | struct v4l2_buffer * | v4l2_buf,
|  | NvBuffer * | buffer,
|  | NvBuffer * | shared_buffer,
|  | void * | arg |
| ) |  |  | `[static, private]`

Definition at line 359 of file main.cpp.

bool ArgusSamples::ConsumerThread::isInError | ( |  | ) | `[inline]`

Definition at line 70 of file camera_caffe_main.cpp.

bool ArgusSamples::ConsumerThread::isInError | ( |  | ) | `[inline]`

Definition at line 87 of file main.cpp.

virtual bool ArgusSamples::ConsumerThread::processV4L2Fd | ( | int32_t | fd,
|  | uint64_t | frameNumber |
| ) |  |  | `[protected, pure virtual]`

Implemented in ArgusSamples::PreviewConsumerThread, and ArgusSamples::CaptureConsumerThread.

virtual bool ArgusSamples::ConsumerThread::threadExecute | ( |  | ) | `[private, virtual]`

virtual bool ArgusSamples::ConsumerThread::threadExecute | ( |  | ) | `[private, virtual]`

bool ArgusSamples::ConsumerThread::threadExecute | ( |  | ) | `[protected, virtual]`

Definition at line 115 of file main.cpp.

virtual bool ArgusSamples::ConsumerThread::threadInitialize | ( |  | ) | `[private, virtual]`

Reimplemented in ArgusSamples::PreviewConsumerThread, and ArgusSamples::CaptureConsumerThread.

virtual bool ArgusSamples::ConsumerThread::threadInitialize | ( |  | ) | `[private, virtual]`

Reimplemented in ArgusSamples::PreviewConsumerThread, and ArgusSamples::CaptureConsumerThread.

bool ArgusSamples::ConsumerThread::threadInitialize | ( |  | ) | `[protected, virtual]`

Reimplemented in ArgusSamples::PreviewConsumerThread, and ArgusSamples::CaptureConsumerThread.

Definition at line 105 of file main.cpp.

virtual bool ArgusSamples::ConsumerThread::threadShutdown | ( |  | ) | `[private, virtual]`

Reimplemented in ArgusSamples::PreviewConsumerThread, and ArgusSamples::CaptureConsumerThread.

virtual bool ArgusSamples::ConsumerThread::threadShutdown | ( |  | ) | `[private, virtual]`

Reimplemented in ArgusSamples::PreviewConsumerThread, and ArgusSamples::CaptureConsumerThread.

bool ArgusSamples::ConsumerThread::threadShutdown | ( |  | ) | `[protected, virtual]`

Reimplemented in ArgusSamples::PreviewConsumerThread, and ArgusSamples::CaptureConsumerThread.

Definition at line 166 of file main.cpp.

void ArgusSamples::ConsumerThread::writeFrameToOpencvConsumer | ( | camera_caffe_context * | p_ctx,
|  | NvBuffer * | buffer |
| ) |  |  | `[private]`

Definition at line 247 of file camera_caffe_main.cpp.

## Member Data Documentation

int ArgusSamples::ConsumerThread::conv_buf_num `[private]`

Definition at line 107 of file camera_caffe_main.cpp.

UniqueObj< FrameConsumer > ArgusSamples::ConsumerThread::m_consumer `[protected]`

Definition at line 95 of file main.cpp.

std::queue< NvBuffer * >* ArgusSamples::ConsumerThread::m_ConvOutputPlaneBufQueue `[private]`

Definition at line 104 of file camera_caffe_main.cpp.

int ArgusSamples::ConsumerThread::m_dmabuf `[protected]`

Definition at line 96 of file main.cpp.

bool ArgusSamples::ConsumerThread::m_gotError `[private]`

Definition at line 113 of file main.cpp.

NvVideoConverter* ArgusSamples::ConsumerThread::m_ImageConverter `[private]`

Definition at line 103 of file camera_caffe_main.cpp.

int ArgusSamples::ConsumerThread::m_numPendingFrames `[private]`

Definition at line 108 of file camera_caffe_main.cpp.

std::ofstream* ArgusSamples::ConsumerThread::m_outputFile `[private]`

Definition at line 112 of file main.cpp.

camera_caffe_context* ArgusSamples::ConsumerThread::m_pContext `[private]`

Definition at line 110 of file camera_caffe_main.cpp.

pthread_cond_t ArgusSamples::ConsumerThread::m_queueCond `[private]`

Definition at line 106 of file camera_caffe_main.cpp.

pthread_mutex_t ArgusSamples::ConsumerThread::m_queueLock `[private]`

Definition at line 105 of file camera_caffe_main.cpp.

OutputStream * ArgusSamples::ConsumerThread::m_stream `[protected]`

Definition at line 94 of file main.cpp.

NvVideoEncoder* ArgusSamples::ConsumerThread::m_VideoEncoder `[private]`

Definition at line 111 of file main.cpp.

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

- samples/09_camera_jpeg_capture/main.cpp
- samples/10_camera_recording/main.cpp
- samples/11_camera_object_identification/camera_caffe_main.cpp