nx_server_plugin_sdk 1.0 Server Plugin SDK

Public Types | Public Member Functions | Static Public Member Functions | List of all members
rpi_cam::RPiCamera Class Reference

Raspberry Pi camera unit. More...

`#include <rpi_camera.h>`

## Public Types
enum | { FLAG_EOS = OMX_BUFFERFLAG_EOS, FLAG_DECODEONLY = OMX_BUFFERFLAG_DECODEONLY, FLAG_DATACORRUPT = OMX_BUFFERFLAG_DATACORRUPT, FLAG_ENDOFFRAME = OMX_BUFFERFLAG_ENDOFFRAME, FLAG_SYNCFRAME = OMX_BUFFERFLAG_SYNCFRAME, FLAG_EXTRADATA = OMX_BUFFERFLAG_EXTRADATA, FLAG_CODECCONFIG = OMX_BUFFERFLAG_CODECCONFIG }
typedef rw_lock::OneWriterManyReaders | RWLock

## Public Member Functions
| RPiCamera (const CameraParameters &camParams)
bool | isOK () const
bool | read (unsigned streamNo, std::vector< uint8_t > &data, uint64_t &timeStamp, unsigned &flags)
void | getEncoderConfig (unsigned streamNo, unsigned &width, unsigned &height, unsigned &fps, unsigned &bitrateKbps) const
void | configEncoder (unsigned streamNo, unsigned width, unsigned height, unsigned framerate, unsigned bitrateKbps)
void | update ()

## Static Public Member Functions
static constexpr unsigned | STREAMS_NUM ()
static constexpr unsigned | BITRATE_0 ()
static constexpr unsigned | BITRATE_1 ()
static constexpr unsigned | IFRAME_PERIOD ()
static void | init ()
static void | deinit ()
static const rpi_omx::VideoFromat * | getVideoFormats (unsigned &num, bool resized=false)

## Detailed Description

Raspberry Pi camera unit.

## Member Function Documentation

## ◆ read()

bool rpi_cam::RPiCamera::read | ( | unsigned | streamNo,
|  | std::vector< uint8_t > & | data,
|  | uint64_t & | ts,
|  | unsigned & | flags
| ) |  |

Warning
  This method is called from separate threads (one per stream). So it can't lock common mutex. But it needs a guarantee, that another thread doesn't destroy components the same time.

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

- samples/device/rpi_camera_plugin/src/rpi_camera.h
- samples/device/rpi_camera_plugin/src/rpi_camera.cpp