nx_video_source_sdk  1.0
Video Source SDK
Classes | Typedefs | Enumerations | Variables
nxcip Namespace Reference

VMS Camera Integration Plugin API (c++) More...

Classes

struct  ArchiveSearchOptions
 Set of options, used to search archive. More...
 
struct  AudioFormat
 
class  BaseCameraManager
 Provides base camera operations: getting/settings fps, resolution, bitrate, media stream url(s). Also provides pointer to other camera-management interfaces. More...
 
class  BaseCameraManager2
 Extends BaseCameraManager by adding remote archive storage support (e.g., storage is mounted directly to camera) More...
 
class  BaseCameraManager3
 Extends BaseCameraManager2 by adding editable parameters. More...
 
class  CameraDiscoveryManager
 This interface is used to find cameras and create BaseCameraManager instance. More...
 
class  CameraDiscoveryManager2
 
class  CameraDiscoveryManager3
 
struct  CameraInfo
 Contains base camera information. More...
 
struct  CameraInfo2
 
class  CameraInputEventHandler
 Receives events on input port state change. More...
 
class  CameraMediaEncoder
 Provides encoder parameter configuration and media stream access (by providing media stream url) More...
 
class  CameraMediaEncoder2
 Extends CameraMediaEncoder by adding functionality for plugin to directly provide live media stream. More...
 
class  CameraMediaEncoder3
 
class  CameraMediaEncoder4
 
class  CameraMediaEncoder5
 
class  CameraMotionDataProvider
 Provides access to motion detection support, implemented on camera. More...
 
class  CameraPtzManager
 Pan-tilt-zoom management. More...
 
class  CameraRelayIOManager
 Relay input/output management. More...
 
class  DtsArchiveReader
 Provides access to archive, stored on camera. More...
 
class  Encryptable
 
struct  LiveStreamConfig
 
class  MediaDataPacket
 Portion of media data. More...
 
class  MediaDataPacket2
 
class  Picture
 Picture. More...
 
struct  RcOverride
 
struct  Resolution
 Resolution of video stream picture. More...
 
struct  ResolutionInfo
 Contains resolution and maximum fps, supported by camera for this resolution. More...
 
class  StreamReader
 Used for reading media stream from camera. More...
 
class  TimePeriods
 Array of time periods. More...
 
class  VideoDataPacket
 Video packet. MUST contain complete frame (or field in case of interlaced video) More...
 

Typedefs

typedef unsigned long long int UsecUTCTimestamp
 

Enumerations

enum  DataPacketType {
  dptAudio, dptVideo, dptEmpty, dptUnknown,
  dptData
}
 Type of packets provided by StreamReader. More...
 
enum  MediaStreamQuality { msqDefault = 0, msqHigh, msqLow }
 
enum  CompressionType {
  AV_CODEC_ID_NONE, AV_CODEC_ID_MPEG2VIDEO, AV_CODEC_ID_H263, AV_CODEC_ID_MJPEG,
  AV_CODEC_ID_MPEG4, AV_CODEC_ID_H264, AV_CODEC_ID_THEORA, AV_CODEC_ID_PNG,
  AV_CODEC_ID_GIF, AV_CODEC_ID_HEVC, AV_CODEC_ID_VP8, AV_CODEC_ID_VP9,
  AV_CODEC_ID_MP2 = 0x15000, AV_CODEC_ID_MP3, AV_CODEC_ID_AAC, AV_CODEC_ID_AC3,
  AV_CODEC_ID_DTS, AV_CODEC_ID_PCM_S16LE, AV_CODEC_ID_PCM_MULAW, AV_CODEC_ID_VORBIS,
  AV_CODEC_ID_TEXT, AV_CODEC_ID_BIN_DATA
}
 
enum  PixelFormat {
  AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUV422P, AV_PIX_FMT_YUV444P, AV_PIX_FMT_MONOBLACK,
  AV_PIX_FMT_GRAY8, AV_PIX_FMT_RGB24, AV_PIX_FMT_NV12, AV_PIX_FMT_BGRA,
  AV_PIX_FMT_RGBA, AV_PIX_FMT_YUVA420P, AV_PIX_FMT_YUVJ420P, AV_PIX_FMT_NONE
}
 
enum  MediaType {
  AVMEDIA_TYPE_UNKNOWN = -1, AVMEDIA_TYPE_VIDEO, AVMEDIA_TYPE_AUDIO, AVMEDIA_TYPE_DATA,
  AVMEDIA_TYPE_SUBTITLE, AVMEDIA_TYPE_ATTACHMENT, AVMEDIA_TYPE_NB
}
 
enum  SampleFormat {
  AV_SAMPLE_FMT_NONE = -1, AV_SAMPLE_FMT_U8, AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_S32,
  AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_DBL, AV_SAMPLE_FMT_U8P, AV_SAMPLE_FMT_S16P,
  AV_SAMPLE_FMT_S32P, AV_SAMPLE_FMT_FLTP, AV_SAMPLE_FMT_DBLP, AV_SAMPLE_FMT_NB
}
 

Variables

static const UsecUTCTimestamp INVALID_TIMESTAMP_VALUE = (UsecUTCTimestamp)-1LL
 
static const int MAX_TEXT_LEN = 1024
 
static const int NX_NO_ERROR = 0
 
static const int NX_NOT_AUTHORIZED = -1
 
static const int NX_INVALID_ENCODER_NUMBER = -2
 
static const int NX_UNKNOWN_PORT_NAME = -3
 
static const int NX_UNSUPPORTED_CODEC = -8
 
static const int NX_UNSUPPORTED_RESOLUTION = -9
 
static const int NX_UNDEFINED_BEHAVOUR = -20
 
static const int NX_NOT_IMPLEMENTED = -21
 
static const int NX_NETWORK_ERROR = -22
 
static const int NX_MORE_DATA = -23
 
static const int NX_NO_DATA = -24
 
static const int NX_IO_ERROR = -25
 
static const int NX_TRY_AGAIN = -26
 Operation could not be completed now, but it may still be available later.
 
static const int NX_INTERRUPTED = -27
 Blocking call has been interrupted (e.g., by StreamReader::interrupt)
 
static const int NX_PARAM_READ_ONLY = -40
 
static const int NX_UNKNOWN_PARAMETER = -41
 
static const int NX_INVALID_PARAM_VALUE = -42
 
static const int NX_OTHER_ERROR = -100
 
static const nxpl::NX_GUID IID_CameraDiscoveryManager = { { 0x0d, 0x06, 0x13, 0x4f, 0x16, 0xd0, 0x41, 0xc8, 0x97, 0x52, 0xa3, 0x3e, 0x81, 0xfe, 0x9c, 0x75 } }
 
static const nxpl::NX_GUID IID_CameraDiscoveryManager2 = { { 0x0d, 0x06, 0x13, 0x4f, 0x16, 0xd0, 0x41, 0xc8, 0x97, 0x52, 0xa3, 0x3e, 0x81, 0xfe, 0x9c, 0x74 } }
 
static const nxpl::NX_GUID IID_CameraDiscoveryManager3 = { { 0xFE, 0xA0, 0x45, 0x2D, 0x84, 0x93, 0x4F, 0xF3, 0x83, 0xE9, 0x72, 0xD5, 0xBF, 0x75, 0xA9, 0xDE } }
 
static const int CAMERA_INFO_ARRAY_SIZE = 256
 
static const int MAX_MODEL_NAME_SIZE = 256
 
static const nxpl::NX_GUID IID_CameraMediaEncoder = { { 0x52, 0x8f, 0xd6, 0x41, 0x52, 0xbb, 0x4f, 0x8b, 0xb2, 0x79, 0x6c, 0x21, 0xfe, 0xf5, 0xa2, 0xbb } }
 
static const int MAX_RESOLUTION_LIST_SIZE = 64
 
static const nxpl::NX_GUID IID_CameraMediaEncoder2 = { { 0x9a, 0x1b, 0xda, 0x18, 0x56, 0x3c, 0x42, 0xde, 0x8e, 0x23, 0xb9, 0x24, 0x4f, 0xd0, 0x6, 0x58 } }
 
static const nxpl::NX_GUID IID_CameraMediaEncoder3 = { { 0xd1, 0xc7, 0xf0, 0x82, 0xb6, 0xf9, 0x45, 0xf3, 0x82, 0xd6, 0x3c, 0xfe, 0x3e, 0xae, 0x2, 0x60 } }
 
static const nxpl::NX_GUID IID_CameraMediaEncoder4 = { { 0x98, 0x07, 0xEA ,0x20, 0xFA, 0x37, 0x4E, 0xA7, 0xBF, 0x07, 0x9A, 0xC6 ,0x15 ,0x11 ,0xE1, 0xDF } }
 
static const nxpl::NX_GUID IID_CameraMediaEncoder5 = { { 0x95, 0xd6, 0x92 ,0x38, 0x7a, 0x07, 0x46, 0x2f, 0x93, 0x64, 0x97, 0x1d ,0xd5 ,0x8b ,0x31, 0x5e } }
 
static const nxpl::NX_GUID IID_BaseCameraManager = { { 0xb7, 0xaa, 0x2f, 0xe8, 0x75, 0x92, 0x44, 0x59, 0xa5, 0x2f, 0xb0, 0x5e, 0x8e, 0x8, 0x9a, 0xfe } }
 
static const nxpl::NX_GUID IID_Picture = { { 0xa2, 0x01, 0x7c, 0x29, 0xce, 0x9e, 0x48, 0x29, 0x87, 0xbe, 0x92, 0x87, 0x59, 0x8a, 0x13, 0x58 } }
 
static const nxpl::NX_GUID IID_TimePeriods = { { 0x80, 0x06, 0xcc, 0x9f, 0x7b, 0xdd, 0x4a, 0x4c, 0x89, 0x20, 0xac, 0x55, 0x46, 0xd4, 0x92, 0x4a } }
 
static const nxpl::NX_GUID IID_BaseCameraManager2 = { { 0x11, 0x81, 0xf2, 0x3b, 0x07, 0x1c, 0x46, 0x08, 0x89, 0xe3, 0x64, 0x8e, 0x1a, 0x73, 0x5b, 0x54 } }
 
static const nxpl::NX_GUID IID_BaseCameraManager3 = { { 0x84, 0x0d, 0xee, 0xcd, 0x2f, 0x9b, 0x48, 0x59, 0x90, 0x81, 0x95, 0x92, 0xd1, 0x71, 0x77, 0xf8 } }
 
static const nxpl::NX_GUID IID_CameraPTZManager = { { 0x8b, 0xab, 0x5b, 0xc7, 0xbe, 0xfc, 0x46, 0x29, 0x92, 0x1f, 0x83, 0x90, 0xa2, 0x9d, 0x8a, 0x16 } }
 
static const nxpl::NX_GUID IID_MediaDataPacket = { { 0x76, 0x3c, 0x93, 0xdc, 0xa7, 0x7d, 0x41, 0xff, 0x80, 0x71, 0xb6, 0x4c, 0x4d, 0x3a, 0xfc, 0xff } }
 
static const unsigned int MEDIA_DATA_BUFFER_ALIGNMENT = 32
 Required alignment of MediaDataPacket::data() buffer.
 
static const unsigned int MEDIA_PACKET_BUFFER_PADDING_SIZE = 32
 Required padding after media data (see MediaDataPacket::data() description)
 
static const nxpl::NX_GUID IID_MediaDataPacket2 = { { 0x65, 0xe9, 0x54, 0x8d, 0x0b, 0xa6, 0x48, 0xcb, 0xa2, 0x17, 0xae, 0x6a, 0xe2, 0x70, 0xce, 0x7d } }
 
static const nxpl::NX_GUID IID_Encryptable = { { 0xa3, 0xf5, 0xd1, 0xba, 0x5a, 0x74, 0x42, 0xbd, 0x88, 0x90, 0xa1, 0xc6, 0xe0, 0x19, 0x7c, 0x4 } }
 
static const unsigned int DEFAULT_MOTION_DATA_PICTURE_WIDTH = 44
 
static const unsigned int DEFAULT_MOTION_DATA_PICTURE_HEIGHT = 32
 
static const nxpl::NX_GUID IID_VideoDataPacket = { { 0xa8, 0x5d, 0x88, 0x4b, 0xf0, 0x5e, 0x4f, 0xff, 0x8b, 0x5a, 0xe3, 0x65, 0x70, 0xe7, 0x30, 0x67 } }
 
static const nxpl::NX_GUID IID_StreamReader = { { 0xaf, 0xe4, 0xee, 0xda, 0x37, 0x70, 0x42, 0xc3, 0x83, 0x81, 0xee, 0x3b, 0x55, 0x52, 0x25, 0x51 } }
 
static const nxpl::NX_GUID IID_DtsArchiveReader = { { 0xce, 0xb9, 0x78, 0x32, 0xe9, 0x31, 0x49, 0x65, 0x9b, 0x18, 0xa8, 0xa1, 0x55, 0x71, 0x7, 0xd7 } }
 
static const nxpl::NX_GUID IID_CameraMotionDataProvider = { { 0xc6, 0xf0, 0x6a, 0x48, 0x8e, 0x3a, 0x46, 0x90, 0x8b, 0x21, 0xca, 0xc4, 0xa9, 0x55, 0xd7, 0xed } }
 
static const nxpl::NX_GUID IID_CameraRelayIOManager = { { 0x87, 0x2f, 0x47, 0x3f, 0x72, 0xcf, 0x43, 0x97, 0x81, 0xe6, 0xc0, 0x6d, 0x42, 0xe9, 0x71, 0x13 } }
 
static const int MAX_ID_LEN = 64
 
static const int MAX_RELAY_PORT_COUNT = 32
 
static const nxpl::NX_GUID IID_CameraInputEventHandler = { { 0xcc, 0x1e, 0x74, 0x9f, 0x2e, 0xc6, 0x4b, 0x73, 0xbe, 0xc9, 0x8f, 0x2a, 0xe9, 0xb7, 0xfc, 0xce } }
 

Detailed Description

VMS Camera Integration Plugin API (c++)

Contains structures and abstract classes to be implemented in real plugin.

Following interfaces can be implemented by plugin:
Note
all text values are NULL-terminated utf-8
If not specified in interface's description, plugin interfaces are used in multithreaded environment the following way:
  • single interface instance is never used concurrently by multiple threads, but different instances of the same interface (e.g., nxcip::BaseCameraManager) can be used by different threads concurrently

Enumeration Type Documentation

◆ DataPacketType

Type of packets provided by StreamReader.

Enumerator
dptAudio 

Audio packet. Can contain multiple audio frames.

dptVideo 

Video packet. Usually contains one frame. Video packet class MUST inherit nxcip::VideoDataPacket.

dptEmpty 

Packet containing no data (e.g., signals end of stream)

Packet of this type MUST have MediaDataPacket::fReverseStream flag set properly

◆ MediaStreamQuality

Enumerator
msqDefault 

Default quality SHOULD be high quality.

msqHigh 

High quality.

It is implementation specific what is considered high quality. Generally, low quality SHOULD have bitrate several times lower than high

msqLow 

Low quality.

◆ MediaType

Enumerator
AVMEDIA_TYPE_UNKNOWN 

Usually treated as AVMEDIA_TYPE_DATA.

AVMEDIA_TYPE_DATA 

Opaque data information usually continuous.

AVMEDIA_TYPE_ATTACHMENT 

Opaque data information usually sparse.

◆ PixelFormat

Enumerator
AV_PIX_FMT_YUV420P 

planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)

AV_PIX_FMT_YUV422P 

planar YUV 4:2:2, 16bpp, (1 Cr & Cb sample per 2x1 Y samples)

AV_PIX_FMT_YUV444P 

planar YUV 4:4:4, 24bpp, (1 Cr & Cb sample per 1x1 Y samples)

AV_PIX_FMT_MONOBLACK 

1bpp, 0 is black, 1 is white, in each byte pixels are ordered from the msb to the lsb

AV_PIX_FMT_GRAY8 

Y plane only, 8bpp.

AV_PIX_FMT_RGB24 

packed RGB 8:8:8, 24bpp, RGBRGB...

AV_PIX_FMT_NV12 

planar YUV 4:2:0, 12bpp, 1 plane for Y and 1 plane for the UV components, which are interleaved (first byte U and the following byte V)

AV_PIX_FMT_BGRA 

packed BGRA 8:8:8:8, 32bpp, BGRABGRA...

AV_PIX_FMT_RGBA 

packed RGBA 8:8:8:8, 32bpp, RGBARGBA...

AV_PIX_FMT_YUVA420P 

planar YUV 4:2:0, 20bpp, (1 Cr & Cb sample per 2x2 Y & A samples)

◆ SampleFormat

Enumerator
AV_SAMPLE_FMT_U8 

unsigned 8 bits

AV_SAMPLE_FMT_S16 

signed 16 bits

AV_SAMPLE_FMT_S32 

signed 32 bits

AV_SAMPLE_FMT_FLT 

float

AV_SAMPLE_FMT_DBL 

double

AV_SAMPLE_FMT_U8P 

unsigned 8 bits, planar

AV_SAMPLE_FMT_S16P 

signed 16 bits, planar

AV_SAMPLE_FMT_S32P 

signed 32 bits, planar

AV_SAMPLE_FMT_FLTP 

float, planar

AV_SAMPLE_FMT_DBLP 

double, planar

AV_SAMPLE_FMT_NB 

Number of sample formats. DO NOT USE if linking dynamically.