nx_server_plugin_sdk 1.0 Server Plugin SDK

Public Types | Public Member Functions | List of all members
nxcip::BaseCameraManager2 Class Referenceabstract

Extends BaseCameraManager by adding remote archive storage support (e.g., storage is mounted directly to camera) More...

`#include <camera_plugin.h>`

Inheritance diagram for nxcip::BaseCameraManager2:

## Public Types
enum | CameraCapability2 { searchByMotionMaskCapability = 0x1000, motionRegionCapability = 0x2000 }
| Enumeration of supported camera capabilities (bit flags) More...
Public Types inherited from nxcip::BaseCameraManager
enum | CameraCapability { hardwareMotionCapability = 0x0001, relayInputCapability = 0x0002, relayOutputCapability = 0x0004, ptzCapability = 0x0008, audioCapability = 0x0010, shareFpsCapability = 0x0020, sharePixelsCapability = 0x0040, shareIpCapability = 0x0080, dtsArchiveCapability = 0x0100, nativeMediaStreamCapability = 0x0200, primaryStreamSoftMotionCapability = 0x0400, cameraParamsPersistentCapability = 0x0800, searchByMotionMaskCapability = 0x1000, motionRegionCapability = 0x2000, needIFrameDetectionCapability = 0x4000, relativeTimestampCapability = 0x8000, customMediaUrlCapability = 0x10000, cameraTimeCapability = 0x20000, fixedQualityCapability = 0x40000, MulticastStreamCapability = 0x80000, ServerBoundCapability = 0x100000, dontAutoOpenCamera = 0x200000, noAnalytics = 0x400000, noVideo = 0x800000, ioDeviceCapability = 0x1000000 }
| Enumeration of supported camera capabilities (bit flags) More...

## Public Member Functions
virtual int | createDtsArchiveReader (DtsArchiveReader **dtsArchiveReader) const =0
| Returns not NULL if BaseCameraManager::dtsArchiveCapability is supported. More...
virtual int | find (ArchiveSearchOptions *searchOptions, TimePeriods **timePeriods) const =0
| Find regions of archive, satisfying given conditions. More...
virtual int | setMotionMask (Picture *motionMask)=0
| If camera plugin implements this method, it MUST report motion only on for region specified (motionMask) More...
Public Member Functions inherited from nxcip::BaseCameraManager
virtual int | getEncoderCount (int *encoderCount) const =0
| Provides maximum number of available encoders. More...
virtual int | getEncoder (int encoderIndex, CameraMediaEncoder **encoderPtr)=0
| Returns encoder by index. More...
virtual int | getCameraInfo (CameraInfo *info) const =0
| Fills info struct with camera data. More...
virtual int | getCameraCapabilities (unsigned int *capabilitiesMask) const =0
| Return bit set of camera capabilities (CameraCapability enumeration) More...
virtual void | setCredentials (const char *username, const char *password)=0
| Set credentials for camera access.
virtual int | setAudioEnabled (int audioEnabled)=0
| Turn on/off audio on ALL encoders. More...
virtual CameraPtzManager * | getPtzManager () const =0
| MUST return not-NULL if ptzCapability is present. More...
virtual CameraMotionDataProvider * | getCameraMotionDataProvider () const =0
| MUST return not-NULL if hardwareMotionCapability is present. More...
virtual CameraRelayIOManager * | getCameraRelayIOManager () const =0
| MUST return not-NULL if BaseCameraManager::relayInputCapability is present. More...
virtual void | getLastErrorString (char *errorString) const =0
| Returns text description of the last error. More...
Public Member Functions inherited from nxpl::PluginInterface
virtual void * | queryInterface (const nxpl::NX_GUID &interfaceID)=0
| Cast to type, specified by interfaceID. More...
virtual int | addRef () const =0
| Increment reference counter. More...
virtual int | releaseRef () const =0
| Decrement reference counter. More...

## Detailed Description

Extends BaseCameraManager by adding remote archive storage support (e.g., storage is mounted directly to camera)

## Member Enumeration Documentation

## ◆ CameraCapability2

enum nxcip::BaseCameraManager2::CameraCapability2

Enumeration of supported camera capabilities (bit flags)

Enumerator
searchByMotionMaskCapability | if present, nxcip::BaseCameraManager2::find supports ArchiveSearchOptions::motionMask()
motionRegionCapability | if present, nxcip::BaseCameraManager3::setMotionMask is implemented

## Member Function Documentation

## ◆ createDtsArchiveReader()

virtual int nxcip::BaseCameraManager2::createDtsArchiveReader | ( | DtsArchiveReader ** | dtsArchiveReader | ) | const
| pure virtual

Returns not NULL if BaseCameraManager::dtsArchiveCapability is supported.

Always creates new object (to allow simultaneous multiple connections to archive)

Parameters

  [out] | dtsArchiveReader | Used to return archive reader on success

Returns
  NX_NO_ERROR on success, otherwise - error code (in this case *dtsArchiveReader set to NULL)

Implemented in CameraManager.

## ◆ find()

virtual int nxcip::BaseCameraManager2::find | ( | ArchiveSearchOptions * | searchOptions,
|  | TimePeriods ** | timePeriods
| ) |  | const
| pure virtual

Find regions of archive, satisfying given conditions.

Parameters

  [in] | searchOptions | Conditions filtering archive. Implementation MUST support filtering by ArchiveSearchOptions::startTime and ArchiveSearchOptions::endTime
  [out] | timePeriods |

Returns
  NX_NO_ERROR on success (requested data present in the stream). Otherwise - error code

Note
  If nothing found, NX_NO_ERROR is returned and timePeriods is set to NULL

Implemented in CameraManager.

## ◆ setMotionMask()

virtual int nxcip::BaseCameraManager2::setMotionMask | ( | Picture * | motionMask | ) |
| pure virtual

If camera plugin implements this method, it MUST report motion only on for region specified (motionMask)

Parameters

  motionMask | 8bpp (format nxcip::AV_PIX_FMT_GRAY8) picture of size (DEFAULT_MOTION_DATA_PICTURE_WIDTH, DEFAULT_MOTION_DATA_PICTURE_HEIGHT) pixels, pixel value designates motion sensitivity for pixel position. 255 - no motion for pixel coordinates(aka motion mask), 0 - maximum possible motion sensitivity. For instance: motion detection algorithm may use this value to compare absolute difference between pixels of Y plane in subsequent frames. If difference is less then value in a mask, motion is not detected.

Warning
  motion mask is rotated by 90 degrees clock-wise! That means, motionMask is actually nxcip::DEFAULT_MOTION_DATA_PICTURE_HEIGHT pixels wide and nxcip::DEFAULT_MOTION_DATA_PICTURE_WIDTH pixels in height

Returns
  NX_NO_ERROR on success, otherwise - error code

Implemented in CameraManager.

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

- src/camera/camera_plugin.h