nx_server_plugin_sdk 1.0 Server Plugin SDK

camera_plugin.h
1 // Copyright 2018-present Network Optix, Inc. Licensed under MPL 2.0: www.mozilla.org/MPL/2.0/
2
3 #ifndef NX_CAMERA_PLUGIN_H
4 #define NX_CAMERA_PLUGIN_H
5
6 #include <cstring>
7
8 #include <stdint.h>
9
10 #include <plugins/plugin_api.h>
11
12 #include "camera_plugin_types.h"
13
15
30 namespace nxcip
31 {
32 // TODO: Change to signed int64_t.
33 typedef unsigned long long int UsecUTCTimestamp;
34 static const UsecUTCTimestamp INVALID_TIMESTAMP_VALUE = (UsecUTCTimestamp)-1LL;
35
36 static const int MAX_TEXT_LEN = 1024;
37
38 //Error codes. Interface implementation MUST use these error codes when appropriate
39
40 static const int NX_NO_ERROR = 0;
41 static const int NX_NOT_AUTHORIZED = -1;
42 static const int NX_INVALID_ENCODER_NUMBER = -2;
43 static const int NX_UNKNOWN_PORT_NAME = -3;
44 static const int NX_UNSUPPORTED_CODEC = -8;
45 static const int NX_UNSUPPORTED_RESOLUTION = -9;
46 static const int NX_UNDEFINED_BEHAVOUR = -20;
47 static const int NX_NOT_IMPLEMENTED = -21;
48 static const int NX_NETWORK_ERROR = -22;
49 static const int NX_MORE_DATA = -23;
50 static const int NX_NO_DATA = -24;
51 static const int NX_IO_ERROR = -25;
53 static const int NX_TRY_AGAIN = -26;
55 static const int NX_INTERRUPTED = -27;
56 static const int NX_PARAM_READ_ONLY = -40;
57 static const int NX_UNKNOWN_PARAMETER = -41;
58 static const int NX_INVALID_PARAM_VALUE = -42;
59 static const int NX_OTHER_ERROR = -100;
60
61 class BaseCameraManager;
62
63 // {0D06134F-16D0-41c8-9752-A33E81FE9C75}
64 static const nxpl::NX_GUID IID_CameraDiscoveryManager = { { 0x0d, 0x06, 0x13, 0x4f, 0x16, 0xd0, 0x41, 0xc8, 0x97, 0x52, 0xa3, 0x3e, 0x81, 0xfe, 0x9c, 0x75 } };
65
66 // {0D06134F-16D0-41c8-9752-A33E81FE9C74}
67 static const nxpl::NX_GUID IID_CameraDiscoveryManager2 = { { 0x0d, 0x06, 0x13, 0x4f, 0x16, 0xd0, 0x41, 0xc8, 0x97, 0x52, 0xa3, 0x3e, 0x81, 0xfe, 0x9c, 0x74 } };
68
69 // {FEA0452D-8493-4FF3-83E9-72D5BF75A9DE}
70 static const nxpl::NX_GUID IID_CameraDiscoveryManager3 = { { 0xFE, 0xA0, 0x45, 0x2D, 0x84, 0x93, 0x4F, 0xF3, 0x83, 0xE9, 0x72, 0xD5, 0xBF, 0x75, 0xA9, 0xDE } };
71
73 struct CameraInfo
74 {
76 char modelName[256] = {};
78 char firmware[256] = {};
80 char uid[256] = {};
82 char url[MAX_TEXT_LEN] = {};
84 char auxiliaryData[256] = {};
86 char defaultLogin[256] = {};
88 char defaultPassword[256] = {};
89
91 CameraInfo() = default;
92
93 CameraInfo(const CameraInfo& value)
94 {
95 strncpy(modelName, value.modelName, sizeof(modelName) - 1);
96 modelName[sizeof(modelName) - 1] = '\0';
97
98 strncpy(firmware, value.firmware, sizeof(firmware) - 1);
99 firmware[sizeof(firmware) - 1] = '\0';
100
101 strncpy(uid, value.uid, sizeof(uid) - 1);
102 uid[sizeof(uid) - 1] = '\0';
103
104 strncpy(url, value.url, sizeof(url) - 1);
105 url[sizeof(url) - 1] = '\0';
106
107 strncpy(auxiliaryData, value.auxiliaryData, sizeof(auxiliaryData) - 1);
108 auxiliaryData[sizeof(auxiliaryData) - 1] = '\0';
109
110 strncpy(defaultLogin, value.defaultLogin, sizeof(defaultLogin) - 1);
111 defaultLogin[sizeof(defaultLogin) - 1] = '\0';
112
113 strncpy(defaultPassword, value.defaultPassword, sizeof(defaultPassword) - 1);
114 defaultPassword[sizeof(defaultPassword) - 1] = '\0';
115 }
116 };
117
118 struct CameraInfo2: public CameraInfo
119 {
120 CameraInfo2(): CameraInfo()
121 {
122 groupId[0] = 0;
123 groupName[0] = 0;
124 }
125
126 CameraInfo2(const CameraInfo& value):
127 CameraInfo(value)
128 {
129 groupId[0] = 0;
130 groupName[0] = 0;
131 }
132
133 CameraInfo2(const CameraInfo2& value):
134 CameraInfo(value)
135 {
136 strncpy(groupId, value.groupId, sizeof(groupId) - 1);
137 strncpy(groupName, value.groupName, sizeof(groupName) - 1);
138 }
139
140 char groupId[256];
141 char groupName[256];
142 };
143
144 static const int CAMERA_INFO_ARRAY_SIZE = 256;
145 static const int MAX_MODEL_NAME_SIZE = 256;
146
148
161 class CameraDiscoveryManager: public nxpl::PluginInterface
162 {
163 public:
164 virtual ~CameraDiscoveryManager() {}
165
167
170 virtual void getVendorName( char* buf ) const = 0;
171
173
180 virtual int findCameras( CameraInfo* cameras, const char* serverURL ) = 0;
182
192 virtual int checkHostAddress( CameraInfo* cameras, const char* address, const char* login, const char* password ) = 0;
194
204 virtual int fromMDNSData(
205 const char* discoveryAddress,
206 const unsigned char* mdnsResponsePacket,
207 int mdnsResponsePacketSize,
208 CameraInfo* cameraInfo ) = 0;
210
219 virtual int fromUpnpData( const char* upnpXMLData, int upnpXMLDataSize, CameraInfo* cameraInfo ) = 0;
220
222
225 virtual BaseCameraManager* createCameraManager( const CameraInfo& info ) = 0;
226
228
240 virtual int getReservedModelList( char** modelList, int* count ) = 0;
241 };
242
243 class CameraDiscoveryManager2: public CameraDiscoveryManager
244 {
245 public:
246 CameraDiscoveryManager2() = default;
247
248 virtual int checkHostAddress2(nxcip::CameraInfo2* cameras, const char* address, const char* login, const char* password) = 0;
249 virtual int findCameras2(CameraInfo2* cameras, const char* serverURL) = 0;
250 };
251
252 class CameraDiscoveryManager3 : public CameraDiscoveryManager2
253 {
254 public:
255 enum Capability
256 {
257 noCapability = 0,
258 findLocalResources = 1 //< CameraDiscovery can find local resources without IP.
259 };
260
261 CameraDiscoveryManager3() = default;
262 virtual int getCapabilities() const = 0;
263 };
264
266 struct Resolution
267 {
269 int width;
271 int height;
272
273 Resolution( int _width = 0, int _height = 0 )
274 :
275 width( _width ),
276 height( _height )
277 {
278 }
279 };
280
282 struct ResolutionInfo
283 {
285 Resolution resolution;
287 float maxFps;
288
289 ResolutionInfo()
290 :
291 maxFps( 0 )
292 {
293 }
294 };
295
296 class StreamReader;
297
298 // {528FD641-52BB-4f8b-B279-6C21FEF5A2BB}
299 static const nxpl::NX_GUID IID_CameraMediaEncoder = { { 0x52, 0x8f, 0xd6, 0x41, 0x52, 0xbb, 0x4f, 0x8b, 0xb2, 0x79, 0x6c, 0x21, 0xfe, 0xf5, 0xa2, 0xbb } };
300
301 static const int MAX_RESOLUTION_LIST_SIZE = 64;
302
304 class CameraMediaEncoder
305 :
306 public nxpl::PluginInterface
307 {
308 public:
309 virtual ~CameraMediaEncoder() {}
310
312
320 virtual int getMediaUrl( char* urlBuf ) const = 0;
321
323
329 virtual int getResolutionList( ResolutionInfo* infoList, int* infoListCount ) const = 0;
330
332
336 virtual int getMaxBitrate( int* maxBitrate ) const = 0;
337
339
343 virtual int setResolution( const Resolution& resolution ) = 0;
344
351 virtual int setFps( const float& fps, float* selectedFps ) = 0;
352
359 virtual int setBitrate( int bitrateKbps, int* selectedBitrateKbps ) = 0;
360 };
361
362 struct AudioFormat
363 {
364 enum SampleType
365 {
366 stNone = -1,
367 stU8,
368 stS16,
369 stS32,
370 stFLT,
371 stDBL,
372 stU8P,
373 stS16P,
374 stS32P,
375 stFLTP,
376 stDBLP,
377 stS64,
378 stS64P,
379 };
380
381 enum ByteOrderType
382 {
383 boLittleEndian,
384 boBigEndian
385 };
386
387 CompressionType compressionType;
388 int sampleRate;
390 int bitrate;
391 ByteOrderType byteOrder;
392 int channels;
393 SampleType sampleFmt;
394 int channelLayout;
395 int blockAlign;
396 int bitsPerCodedSample;
397
398 AudioFormat()
399 :
400 compressionType(AV_CODEC_ID_NONE),
401 sampleRate(0),
402 bitrate(0),
403 byteOrder(boLittleEndian),
404 channels(0),
405 sampleFmt(stU8),
406 channelLayout(0),
407 blockAlign(0),
408 bitsPerCodedSample(0)
409 {
410 }
411 };
412
413 // {9A1BDA18-563C-42de-8E23-B9244FD00658}
414 static const nxpl::NX_GUID IID_CameraMediaEncoder2 = { { 0x9a, 0x1b, 0xda, 0x18, 0x56, 0x3c, 0x42, 0xde, 0x8e, 0x23, 0xb9, 0x24, 0x4f, 0xd0, 0x6, 0x58 } };
415
417 class CameraMediaEncoder2: public CameraMediaEncoder
418 {
419 public:
420 virtual ~CameraMediaEncoder2() override {}
421
423
428 virtual StreamReader* getLiveStreamReader() = 0;
430 virtual int getAudioFormat( AudioFormat* audioFormat ) const = 0;
431 };
432
433 #ifndef __GNUC__
434 #pragma pack(push, 1)
435 #define PACKED
436 #else
437 #define PACKED __attribute__((__packed__))
438 #endif
439
441 struct PACKED LiveStreamConfig
442 {
443 enum LiveStreamFlags
444 {
445 LIVE_STREAM_FLAG_AUDIO_ENABLED = 0x1
446 };
447
448 int32_t reserved_head;
449 int32_t flags;
450 int32_t codec;
451 int32_t width;
452 int32_t height;
453 float framerate;
454 int32_t bitrateKbps;
455 int16_t quality;
456 int16_t gopLength;
457 uint8_t reserved_tail[96];
458 };
459 #ifndef __GNUC__
460 #pragma pack(pop)
461 #endif
462 #undef PACKED
463
464 // {D1C7F082-B6F9-45F3-82D6-3CFE3EAE0260}
465 static const nxpl::NX_GUID IID_CameraMediaEncoder3 = { { 0xd1, 0xc7, 0xf0, 0x82, 0xb6, 0xf9, 0x45, 0xf3, 0x82, 0xd6, 0x3c, 0xfe, 0x3e, 0xae, 0x2, 0x60 } };
466
467 class CameraMediaEncoder3: public CameraMediaEncoder2
468 {
469 public:
471
481 virtual int getConfiguredLiveStreamReader(LiveStreamConfig * config, StreamReader ** reader) = 0;
482
484
492 virtual int getVideoFormat(CompressionType * codec, PixelFormat * pixelFormat) const = 0;
493 };
494
495 // {9807EA20-FA37-4EA7-BF07-9AC61511E1DF}
496 static const nxpl::NX_GUID IID_CameraMediaEncoder4 = { { 0x98, 0x07, 0xEA ,0x20, 0xFA, 0x37, 0x4E, 0xA7, 0xBF, 0x07, 0x9A, 0xC6 ,0x15 ,0x11 ,0xE1, 0xDF } };
497 class CameraMediaEncoder4: public CameraMediaEncoder3
498 {
499 public:
501 virtual int setMediaUrl(const char url[nxcip::MAX_TEXT_LEN]) = 0;
502 };
503
504 // {95d69238-7a07-462f-9364-971dd58b315e}
505 static const nxpl::NX_GUID IID_CameraMediaEncoder5 = { { 0x95, 0xd6, 0x92 ,0x38, 0x7a, 0x07, 0x46, 0x2f, 0x93, 0x64, 0x97, 0x1d ,0xd5 ,0x8b ,0x31, 0x5e } };
506 class CameraMediaEncoder5: public CameraMediaEncoder4
507 {
508 public:
510 virtual const char* audioExtradata() const = 0;
511
513 virtual int audioExtradataSize() const = 0;
514 };
515
516 class CameraPtzManager;
517 class CameraMotionDataProvider;
518 class CameraRelayIOManager;
519 class DtsArchiveReader;
520
521 // {B7AA2FE8-7592-4459-A52F-B05E8E089AFE}
522 static const nxpl::NX_GUID IID_BaseCameraManager = { { 0xb7, 0xaa, 0x2f, 0xe8, 0x75, 0x92, 0x44, 0x59, 0xa5, 0x2f, 0xb0, 0x5e, 0x8e, 0x8, 0x9a, 0xfe } };
523
525
533 class BaseCameraManager
534 :
535 public nxpl::PluginInterface
536 {
537 public:
538 virtual ~BaseCameraManager() {}
539
541
550 virtual int getEncoderCount( int* encoderCount ) const = 0;
551
553
562 virtual int getEncoder( int encoderIndex, CameraMediaEncoder** encoderPtr ) = 0;
563
565
570 virtual int getCameraInfo( CameraInfo* info ) const = 0;
571
573 enum CameraCapability
574 {
575 hardwareMotionCapability = 0x0001,
576 relayInputCapability = 0x0002,
577 relayOutputCapability = 0x0004,
578 ptzCapability = 0x0008,
579 audioCapability = 0x0010,
580 shareFpsCapability = 0x0020,
581 sharePixelsCapability = 0x0040,
582 shareIpCapability = 0x0080,
583 dtsArchiveCapability = 0x0100,
584 nativeMediaStreamCapability = 0x0200,
585 primaryStreamSoftMotionCapability = 0x0400,
586 cameraParamsPersistentCapability = 0x0800,
587 searchByMotionMaskCapability = 0x1000,
588 motionRegionCapability = 0x2000,
589 needIFrameDetectionCapability = 0x4000,
590 relativeTimestampCapability = 0x8000,
591 customMediaUrlCapability = 0x10000,
592 cameraTimeCapability = 0x20000,
593 fixedQualityCapability = 0x40000,
594 MulticastStreamCapability = 0x80000,
595 ServerBoundCapability = 0x100000,
596 dontAutoOpenCamera = 0x200000,
597 noAnalytics = 0x400000,
598 noVideo = 0x800000,
599
603 ioDeviceCapability = 0x1000000
604 };
605
607
611 virtual int getCameraCapabilities( unsigned int* capabilitiesMask ) const = 0;
612
614 virtual void setCredentials( const char* username, const char* password ) = 0;
615
617
621 virtual int setAudioEnabled( int audioEnabled ) = 0;
622
624
628 virtual CameraPtzManager* getPtzManager() const = 0;
630
635 virtual CameraMotionDataProvider* getCameraMotionDataProvider() const = 0;
637
641 virtual CameraRelayIOManager* getCameraRelayIOManager() const = 0;
642
644
647 virtual void getLastErrorString( char* errorString ) const = 0;
648 };
649
650 // {A2017C29-CE9E-4829-87BE-9287598A1358}
651 static const nxpl::NX_GUID IID_Picture = { { 0xa2, 0x01, 0x7c, 0x29, 0xce, 0x9e, 0x48, 0x29, 0x87, 0xbe, 0x92, 0x87, 0x59, 0x8a, 0x13, 0x58 } };
652
654 class Picture
655 :
656 public nxpl::PluginInterface
657 {
658 public:
659 virtual ~Picture() {}
660
662 virtual PixelFormat pixelFormat() const = 0;
664 virtual int planeCount() const = 0;
666 virtual int width() const = 0;
668 virtual int height() const = 0;
670 virtual int xStride( int planeNumber ) const = 0;
672 virtual const void* scanLine( int planeNumber, int lineNumber ) const = 0;
674 virtual void* scanLine( int planeNumber, int lineNumber ) = 0;
679 virtual void* data() = 0;
680 virtual const void* data() const = 0;
681 };
682
683 // {8006CC9F-7BDD-4a4c-8920-AC5546D4924A}
684 static const nxpl::NX_GUID IID_TimePeriods = { { 0x80, 0x06, 0xcc, 0x9f, 0x7b, 0xdd, 0x4a, 0x4c, 0x89, 0x20, 0xac, 0x55, 0x46, 0xd4, 0x92, 0x4a } };
685
687 class TimePeriods
688 :
689 public nxpl::PluginInterface
690 {
691 public:
693 virtual void goToBeginning() = 0;
697 virtual bool next() = 0;
701 virtual bool atEnd() const = 0;
707 virtual bool get( UsecUTCTimestamp* start, UsecUTCTimestamp* end ) const = 0;
708 };
709
711 struct ArchiveSearchOptions
712 {
713 public:
723 Picture* motionMask;
725 UsecUTCTimestamp startTime;
727 UsecUTCTimestamp endTime;
735 unsigned long long periodDetailLevel;
736
741 bool keepSmallChunks;
742
746 int limit;
747
751 bool descSortOrder;
752
753 ArchiveSearchOptions()
754 :
755 motionMask( 0 ),
756 startTime( INVALID_TIMESTAMP_VALUE ),
757 endTime( INVALID_TIMESTAMP_VALUE ),
758 periodDetailLevel(0),
759 keepSmallChunks(0),
760 limit(0),
761 descSortOrder(false)
762 {
763 }
764 };
765
766 // {1181F23B-071C-4608-89E3-648E1A735B54}
767 static const nxpl::NX_GUID IID_BaseCameraManager2 = { { 0x11, 0x81, 0xf2, 0x3b, 0x07, 0x1c, 0x46, 0x08, 0x89, 0xe3, 0x64, 0x8e, 0x1a, 0x73, 0x5b, 0x54 } };
768
770 class BaseCameraManager2
771 :
772 public BaseCameraManager
773 {
774 public:
776 enum CameraCapability2
777 {
778 searchByMotionMaskCapability = 0x1000,
779 motionRegionCapability = 0x2000
780 };
781
782 virtual ~BaseCameraManager2() {}
783
785
790 virtual int createDtsArchiveReader( DtsArchiveReader** dtsArchiveReader ) const = 0;
792
799 virtual int find( ArchiveSearchOptions* searchOptions, TimePeriods** timePeriods ) const = 0;
801
811 virtual int setMotionMask( Picture* motionMask ) = 0;
812 };
813
814 // {840DEECD-2F9B-4859-9081-9592D17177F8}
815 static const nxpl::NX_GUID IID_BaseCameraManager3 = { { 0x84, 0x0d, 0xee, 0xcd, 0x2f, 0x9b, 0x48, 0x59, 0x90, 0x81, 0x95, 0x92, 0xd1, 0x71, 0x77, 0xf8 } };
816
818
822 class BaseCameraManager3
823 :
824 public BaseCameraManager2
825 {
826 public:
827 enum CameraCapability3
828 {
829 cameraParamsPersistentCapability = 0x0800,
830 };
831
833
837 virtual const char* getParametersDescriptionXML() const = 0;
839
847 virtual int getParamValue( const char* paramName, char* valueBuf, int* valueBufSize ) const = 0;
849
858 virtual int setParamValue( const char* paramName, const char* value ) = 0;
859 };
860
861 // {8BAB5BC7-BEFC-4629-921F-8390A29D8A16}
862 static const nxpl::NX_GUID IID_CameraPTZManager = { { 0x8b, 0xab, 0x5b, 0xc7, 0xbe, 0xfc, 0x46, 0x29, 0x92, 0x1f, 0x83, 0x90, 0xa2, 0x9d, 0x8a, 0x16 } };
863
865
883 class CameraPtzManager
884 :
885 public nxpl::PluginInterface
886 {
887 public:
888 virtual ~CameraPtzManager() {}
889
890 enum Capability
891 {
892 ContinuousPanCapability = 0x00000001,
893 ContinuousTiltCapability = 0x00000002,
894 ContinuousZoomCapability = 0x00000004,
895
896 AbsolutePanCapability = 0x00000010,
897 AbsoluteTiltCapability = 0x00000020,
898 AbsoluteZoomCapability = 0x00000040,
899
900 FlipPtzCapability = 0x00000100,
901 LimitsPtzCapability = 0x00000200,
902
903 DevicePositioningPtzCapability = 0x00001000,
904 LogicalPositioningPtzCapability = 0x00002000,
905
907 ContinuousPtzCapabilities = ContinuousPanCapability | ContinuousTiltCapability | ContinuousZoomCapability,
908 AbsolutePtzCapabilities = AbsolutePanCapability | AbsoluteTiltCapability | AbsoluteZoomCapability,
909 };
910
911 enum CoordinateSpace
912 {
913 DevicePtzCoordinateSpace,
914 LogicalPtzCoordinateSpace
915 };
916
917 enum Orientation
918 {
919 Horizontal = 0x1,
920 Vertical = 0x2
921 };
922
923 struct Limits {
924 double minPan;
925 double maxPan;
926 double minTilt;
927 double maxTilt;
928 double minFov;
929 double maxFov;
930 };
931
933 virtual int getCapabilities() const = 0;
934
936
951 virtual int continuousMove( double panSpeed, double tiltSpeed, double zoomSpeed ) = 0;
952
954
970 virtual int absoluteMove( CoordinateSpace space, double pan, double tilt, double zoom, double speed ) = 0;
971
973
984 virtual int getPosition( CoordinateSpace space, double *pan, double *tilt, double *zoom ) = 0;
985
987
995 virtual int getLimits( CoordinateSpace space, Limits *limits ) = 0;
996
998
1006 virtual int getFlip( int *flip ) = 0;
1007 };
1008
1010 enum DataPacketType
1011 {
1013 dptAudio,
1015 dptVideo,
1017
1020 dptEmpty,
1021 dptUnknown,
1022 dptData,
1023 };
1024
1025 // {763C93DC-A77D-41ff-8071-B64C4D3AFCFF}
1026 static const nxpl::NX_GUID IID_MediaDataPacket = { { 0x76, 0x3c, 0x93, 0xdc, 0xa7, 0x7d, 0x41, 0xff, 0x80, 0x71, 0xb6, 0x4c, 0x4d, 0x3a, 0xfc, 0xff } };
1028 static const unsigned int MEDIA_DATA_BUFFER_ALIGNMENT = 64;
1030 static const unsigned int MEDIA_PACKET_BUFFER_PADDING_SIZE = 64;
1031
1033
1037 class MediaDataPacket
1038 :
1039 public nxpl::PluginInterface
1040 {
1041 public:
1042 enum Flags
1043 {
1045 fKeyPacket = 0x01,
1047 fReverseStream = 0x02,
1049 fReverseBlockStart = 0x04,
1050 DEPRECATED_fLowQuality = 0x08,
1055 fStreamReset = 0x10
1056 };
1057
1059 virtual UsecUTCTimestamp timestamp() const = 0;
1061 virtual DataPacketType type() const = 0;
1063
1074 virtual const void* data() const = 0;
1076
1080 virtual unsigned int dataSize() const = 0;
1085 virtual unsigned int channelNumber() const = 0;
1086
1092 virtual CompressionType codecType() const = 0;
1093
1095 virtual unsigned int flags() const = 0;
1097
1101 virtual unsigned int cSeq() const = 0;
1102 };
1103
1104 // {65E9548D-0BA6-48CB-A217-AE6AE270CE7D}
1105 static const nxpl::NX_GUID IID_MediaDataPacket2 = { { 0x65, 0xe9, 0x54, 0x8d, 0x0b, 0xa6, 0x48, 0xcb, 0xa2, 0x17, 0xae, 0x6a, 0xe2, 0x70, 0xce, 0x7d } };
1106
1107 class MediaDataPacket2: public MediaDataPacket
1108 {
1109 public:
1111 virtual const char* extradata() const = 0;
1112
1114 virtual int extradataSize() const = 0;
1115 };
1116
1117 // {A3F5D1BA-5A74-42BD-8890-A1C6E0197C04}
1118 static const nxpl::NX_GUID IID_Encryptable = { { 0xa3, 0xf5, 0xd1, 0xba, 0x5a, 0x74, 0x42, 0xbd, 0x88, 0x90, 0xa1, 0xc6, 0xe0, 0x19, 0x7c, 0x4 } };
1119
1125 class Encryptable
1126 {
1127 public:
1128 virtual const uint8_t* encryptionData() const = 0;
1129 virtual int encryptionDataSize() const = 0;
1130 };
1131
1132 static const unsigned int DEFAULT_MOTION_DATA_PICTURE_WIDTH = 44;
1133 static const unsigned int DEFAULT_MOTION_DATA_PICTURE_HEIGHT = 32;
1134
1135 // {A85D884B-F05E-4fff-8B5A-E36570E73067}
1136 static const nxpl::NX_GUID IID_VideoDataPacket = { { 0xa8, 0x5d, 0x88, 0x4b, 0xf0, 0x5e, 0x4f, 0xff, 0x8b, 0x5a, 0xe3, 0x65, 0x70, 0xe7, 0x30, 0x67 } };
1137
1139 class VideoDataPacket
1140 :
1141 public MediaDataPacket
1142 {
1143 public:
1145
1155 virtual Picture* getMotionData() const = 0;
1156 };
1157
1158 // {AFE4EEDA-3770-42c3-8381-EE3B55522551}
1159 static const nxpl::NX_GUID IID_StreamReader = { { 0xaf, 0xe4, 0xee, 0xda, 0x37, 0x70, 0x42, 0xc3, 0x83, 0x81, 0xee, 0x3b, 0x55, 0x52, 0x25, 0x51 } };
1160
1162
1168 class StreamReader
1169 :
1170 public nxpl::PluginInterface
1171 {
1172 public:
1174
1183 virtual int getNextData( MediaDataPacket** packet ) = 0;
1184
1186 virtual void interrupt() = 0;
1187 };
1188
1189 enum MediaStreamQuality
1190 {
1192 msqDefault = 0,
1194
1197 msqHigh,
1199 msqLow
1200 };
1201
1202 // {CEB97832-E931-4965-9B18-A8A1557107D7}
1203 static const nxpl::NX_GUID IID_DtsArchiveReader = { { 0xce, 0xb9, 0x78, 0x32, 0xe9, 0x31, 0x49, 0x65, 0x9b, 0x18, 0xa8, 0xa1, 0x55, 0x71, 0x7, 0xd7 } };
1204
1206
1219 class DtsArchiveReader
1220 :
1221 public nxpl::PluginInterface
1222 {
1223 public:
1224 enum Capabilities
1225 {
1227
1267 reverseGopModeCapability = 0x01,
1269
1272 skipFramesCapability = 0x02,
1274 motionDataCapability = 0x04
1275 };
1276
1278 virtual unsigned int getCapabilities() const = 0;
1279
1281
1284 virtual int open() = 0;
1286
1289 virtual StreamReader* getStreamReader() = 0;
1291
1294 virtual UsecUTCTimestamp startTime() const = 0;
1296
1299 virtual UsecUTCTimestamp endTime() const = 0;
1301
1313 virtual int seek(
1314 unsigned int cSeq,
1315 UsecUTCTimestamp timestamp,
1316 bool findKeyFrame,
1317 UsecUTCTimestamp* selectedPosition ) = 0;
1319
1330 virtual int setReverseMode(
1331 unsigned int cSeq,
1332 bool isReverse,
1333 UsecUTCTimestamp timestamp,
1334 UsecUTCTimestamp* selectedPosition ) = 0;
1336 virtual bool isReverseModeEnabled() const = 0;
1338
1342 virtual int setMotionDataEnabled( bool motionPresent ) = 0;
1344
1354 virtual int setQuality(
1355 MediaStreamQuality quality,
1356 bool waitForKeyFrame ) = 0;
1358
1370 virtual int playRange(
1371 unsigned int cSeq,
1372 UsecUTCTimestamp start,
1373 UsecUTCTimestamp endTimeHint,
1374 unsigned int step ) = 0;
1375
1377
1380 virtual void getLastErrorString( char* errorString ) const = 0;
1381 };
1382
1383 // {C6F06A48-8E3A-4690-8B21-CAC4A955D7ED}
1384 static const nxpl::NX_GUID IID_CameraMotionDataProvider = { { 0xc6, 0xf0, 0x6a, 0x48, 0x8e, 0x3a, 0x46, 0x90, 0x8b, 0x21, 0xca, 0xc4, 0xa9, 0x55, 0xd7, 0xed } };
1385
1387 class CameraMotionDataProvider
1388 :
1389 public nxpl::PluginInterface
1390 {
1391 public:
1392 //TODO for future use
1393 };
1394
1395 class CameraInputEventHandler;
1396
1397 // {872F473F-72CF-4397-81E6-C06D42E97113}
1398 static const nxpl::NX_GUID IID_CameraRelayIOManager = { { 0x87, 0x2f, 0x47, 0x3f, 0x72, 0xcf, 0x43, 0x97, 0x81, 0xe6, 0xc0, 0x6d, 0x42, 0xe9, 0x71, 0x13 } };
1399
1400 static const int MAX_ID_LEN = 64;
1401 static const int MAX_RELAY_PORT_COUNT = 32;
1402
1404
1407 class CameraRelayIOManager
1408 :
1409 public nxpl::PluginInterface
1410 {
1411 public:
1413
1418 virtual int getRelayOutputList( char** idList, int* idNum ) const = 0;
1419
1421
1426 virtual int getInputPortList( char** idList, int* idNum ) const = 0;
1427
1429
1435 virtual int setRelayOutputState(
1436 const char* outputId,
1437 int activate,
1438 unsigned int autoResetTimeoutMS ) = 0;
1439
1441
1446 virtual int startInputPortMonitoring() = 0;
1447
1449
1456 virtual void stopInputPortMonitoring() = 0;
1457
1459
1463 virtual void registerEventHandler( CameraInputEventHandler* handler ) = 0;
1464
1466
1475 virtual void unregisterEventHandler( CameraInputEventHandler* handler ) = 0;
1476
1478
1481 virtual void getLastErrorString( char* errorString ) const = 0;
1482 };
1483
1484 // {CC1E749F-2EC6-4b73-BEC9-8F2AE9B7FCCE}
1485 static const nxpl::NX_GUID IID_CameraInputEventHandler = { { 0xcc, 0x1e, 0x74, 0x9f, 0x2e, 0xc6, 0x4b, 0x73, 0xbe, 0xc9, 0x8f, 0x2a, 0xe9, 0xb7, 0xfc, 0xce } };
1486
1488 class CameraInputEventHandler
1489 :
1490 public nxpl::PluginInterface
1491 {
1492 public:
1493 virtual ~CameraInputEventHandler() {}
1494
1496
1503 virtual void inputPortStateChanged(
1504 CameraRelayIOManager* source,
1505 const char* inputPortID,
1506 int newState,
1507 unsigned long int timestamp ) = 0;
1508 };
1509 }
1510
1511 #endif //NX_CAMERA_PLUGIN_H
TimePeriods
Definition: time_periods.h:11
nxcip::ResolutionInfo::resolution
Resolution resolution
Guess what.
Definition: camera_plugin.h:285
nxcip
VMS Camera Integration Plugin API (c++)
Definition: camera_plugin.h:30
nxcip::BaseCameraManager::getEncoderCount
virtual int getEncoderCount(int *encoderCount) const =0
Provides maximum number of available encoders.
nxcip::CameraPtzManager::DevicePositioningPtzCapability
Camera supports absolute positioning in device-specific coordinate space.
Definition: camera_plugin.h:903
nxcip::Picture::scanLine
virtual const void * scanLine(int planeNumber, int lineNumber) const =0
Returns pointer to horizontal line lineNumber (starting with 0) of plane planeNumber.
nxcip::BaseCameraManager3::CameraCapability3
CameraCapability3
Definition: camera_plugin.h:827
nxcip::TimePeriods::next
virtual bool next()=0
nxcip::BaseCameraManager::cameraTimeCapability
Camera sends absolute timestamps in media stream.
Definition: camera_plugin.h:592
nxcip::MediaDataPacket2::extradataSize
virtual int extradataSize() const =0
Returns size of extradata blob in bytes.
nxcip::MediaDataPacket::dataSize
virtual unsigned int dataSize() const =0
Returns size (in bytes) of packet&#39;s data.
nxcip::AudioFormat::bitrate
int bitrate
in bps
Definition: camera_plugin.h:390
nxcip::CameraInfo::modelName
char modelName[256]
Camera model name in any human readable format. MUST NOT be empty.
Definition: camera_plugin.h:76
nxcip::AudioFormat::stS32P
signed 32 bits, planar
Definition: camera_plugin.h:374
nxcip::ArchiveSearchOptions
Set of options, used to search archive.
Definition: camera_plugin.h:711
nxcip::MediaDataPacket::cSeq
virtual unsigned int cSeq() const =0
Returns sequence number of command this packet belongs to.
nxcip::DtsArchiveReader::getStreamReader
virtual StreamReader * getStreamReader()=0
Returns stream reader.
nxcip::Resolution::width
int width
Width in pixels.
Definition: camera_plugin.h:269
nxcip::Picture::width
virtual int width() const =0
Width (pixels)
nxcip::CameraMediaEncoder
Provides encoder parameter configuration and media stream access (by providing media stream url) ...
Definition: camera_plugin.h:304
nxcip::CameraMediaEncoder::getMaxBitrate
virtual int getMaxBitrate(int *maxBitrate) const =0
Returns maximum bitrate in Kbps. 0 is interpreted as unlimited bitrate value.
nxcip::BaseCameraManager::setCredentials
virtual void setCredentials(const char *username, const char *password)=0
Set credentials for camera access.
nxcip::CameraInfo::auxiliaryData
char auxiliaryData[256]
Any data in implementation defined format (for internal plugin usage)
Definition: camera_plugin.h:84
nxcip::BaseCameraManager3
Extends BaseCameraManager2 by adding editable parameters.
Definition: camera_plugin.h:822
nxcip::CameraDiscoveryManager::getReservedModelList
virtual int getReservedModelList(char **modelList, int *count)=0
Get model names, reserved by the plugin.
nxcip::Encryptable
Definition: camera_plugin.h:1125
nxcip::CameraPtzManager::CoordinateSpace
CoordinateSpace
Definition: camera_plugin.h:911
nxcip::BaseCameraManager2::searchByMotionMaskCapability
if present, nxcip::BaseCameraManager2::find supports ArchiveSearchOptions::motionMask() ...
Definition: camera_plugin.h:778
nxcip::DtsArchiveReader::getLastErrorString
virtual void getLastErrorString(char *errorString) const =0
Returns text description of the last error.
nxcip::DataPacketType
DataPacketType
Type of packets provided by StreamReader.
Definition: camera_plugin.h:1010
nxcip::CameraMotionDataProvider
Provides access to motion detection support, implemented on camera.
Definition: camera_plugin.h:1387
nxcip::ArchiveSearchOptions::descSortOrder
bool descSortOrder
Definition: camera_plugin.h:751
nxcip::MediaDataPacket::channelNumber
virtual unsigned int channelNumber() const =0
nxcip::CameraPtzManager::Limits
Definition: camera_plugin.h:923
nxcip::NX_INTERRUPTED
static const int NX_INTERRUPTED
Blocking call has been interrupted (e.g., by StreamReader::interrupt)
Definition: camera_plugin.h:55
nxcip::CameraMediaEncoder5::audioExtradataSize
virtual int audioExtradataSize() const =0
Returns size of audio extra data in bytes.
nxcip::CameraMediaEncoder::getResolutionList
virtual int getResolutionList(ResolutionInfo *infoList, int *infoListCount) const =0
Returns supported resolution list.
nxcip::BaseCameraManager::nativeMediaStreamCapability
provides media stream through StreamReader interface, otherwise - CameraMediaEncoder::getMediaUrl is ...
Definition: camera_plugin.h:584
nxcip::BaseCameraManager::shareIpCapability
allow multiple instances on a same IP address
Definition: camera_plugin.h:582
nxcip::Picture::height
virtual int height() const =0
Height (pixels)
nxcip::CameraMediaEncoder3::getConfiguredLiveStreamReader
virtual int getConfiguredLiveStreamReader(LiveStreamConfig *config, StreamReader **reader)=0
Returns configured stream reader, providing live data stream. Required method!
nxcip::TimePeriods::atEnd
virtual bool atEnd() const =0
nxcip::CameraDiscoveryManager::getVendorName
virtual void getVendorName(char *buf) const =0
Returns utf-8 camera vendor name.
nxcip::BaseCameraManager::getCameraMotionDataProvider
virtual CameraMotionDataProvider * getCameraMotionDataProvider() const =0
MUST return not-NULL if hardwareMotionCapability is present.
nxcip::DtsArchiveReader::setQuality
virtual int setQuality(MediaStreamQuality quality, bool waitForKeyFrame)=0
Select media stream quality (used for dynamic media stream adaptation)
nxcip::ResolutionInfo::maxFps
float maxFps
Maximum fps, allowed for resolution.
Definition: camera_plugin.h:287
nxcip::CameraMediaEncoder5::audioExtradata
virtual const char * audioExtradata() const =0
Returns pointer to audio extra data.
nxcip::BaseCameraManager::CameraCapability
CameraCapability
Enumeration of supported camera capabilities (bit flags)
Definition: camera_plugin.h:573
nxcip::CameraDiscoveryManager3
Definition: camera_plugin.h:252
nxcip::LiveStreamConfig
Definition: camera_plugin.h:441
nxcip::CameraPtzManager::AbsolutePanCapability
Camera supports absolute pan.
Definition: camera_plugin.h:896
nxcip::BaseCameraManager::relayOutputCapability
if this flag is enabled, CameraRelayIOManager MUST be implemented
Definition: camera_plugin.h:577
nxcip::CameraPtzManager::AbsoluteZoomCapability
Camera supports absolute zoom.
Definition: camera_plugin.h:898
nxcip::CameraInputEventHandler::inputPortStateChanged
virtual void inputPortStateChanged(CameraRelayIOManager *source, const char *inputPortID, int newState, unsigned long int timestamp)=0
Called by CameraRelayIOManager on input port event.
nxcip::CameraRelayIOManager::unregisterEventHandler
virtual void unregisterEventHandler(CameraInputEventHandler *handler)=0
Removes handler from event receiver list.
nxcip::CameraRelayIOManager::stopInputPortMonitoring
virtual void stopInputPortMonitoring()=0
Stops input port monitoring if internal monitoring counter has reached zero.
nxcip::ResolutionInfo
Contains resolution and maximum fps, supported by camera for this resolution.
Definition: camera_plugin.h:282
nxcip::CameraPtzManager::continuousMove
virtual int continuousMove(double panSpeed, double tiltSpeed, double zoomSpeed)=0
Starts or stops continuous PTZ movement.
nxcip::BaseCameraManager::ServerBoundCapability
Camera is bound to a particular server.
Definition: camera_plugin.h:595
nxcip::DtsArchiveReader::isReverseModeEnabled
virtual bool isReverseModeEnabled() const =0
Returns true if reverse mode is currently on.
nxpl::PluginInterface
Base class for every interface, provided by plugin.
Definition: plugin_api.h:44
nxcip::BaseCameraManager3::getParametersDescriptionXML
virtual const char * getParametersDescriptionXML() const =0
Returns XML describing camera parameters.
nxcip::MediaDataPacket::flags
virtual unsigned int flags() const =0
Returns combination of values from MediaDataPacket::Flags enumeration.
nxcip::MediaDataPacket::Flags
Flags
Definition: camera_plugin.h:1042
nxcip::CameraMediaEncoder::setFps
virtual int setFps(const float &fps, float *selectedFps)=0
nxcip::MediaDataPacket::codecType
virtual CompressionType codecType() const =0
nxcip::Picture::planeCount
virtual int planeCount() const =0
Returns number of planes in picture (this depends on format)
nxcip::DtsArchiveReader::startTime
virtual UsecUTCTimestamp startTime() const =0
Returns timestamp (usec (microseconds) since 1970-01-01, UTC) of oldest data, present in the archive...
nxcip::AudioFormat
Definition: camera_plugin.h:362
nxcip::StreamReader::interrupt
virtual void interrupt()=0
Interrupt StreamReader::getNextData blocked in other thread.
nxcip::BaseCameraManager::cameraParamsPersistentCapability
camera parameters can be read/set even if camera is not accessible at the moment
Definition: camera_plugin.h:586
nxcip::ArchiveSearchOptions::keepSmallChunks
bool keepSmallChunks
Definition: camera_plugin.h:741
nxcip::CameraRelayIOManager::getRelayOutputList
virtual int getRelayOutputList(char **idList, int *idNum) const =0
Returns list of IDs of available relay output ports.
nxcip::DtsArchiveReader::seek
virtual int seek(unsigned int cSeq, UsecUTCTimestamp timestamp, bool findKeyFrame, UsecUTCTimestamp *selectedPosition)=0
Seek to specified position in stream.
nxcip::StreamReader
Used for reading media stream from camera.
Definition: camera_plugin.h:1168
nxcip::MediaDataPacket::fKeyPacket
e.g., h.264 IDR frame
Definition: camera_plugin.h:1045
nxcip::CameraPtzManager::absoluteMove
virtual int absoluteMove(CoordinateSpace space, double pan, double tilt, double zoom, double speed)=0
Sets camera PTZ position in the given coordinate space.
nxcip::CameraMediaEncoder2::getLiveStreamReader
virtual StreamReader * getLiveStreamReader()=0
Returns stream reader, providing live data stream.
nxcip::TimePeriods::goToBeginning
virtual void goToBeginning()=0
Move cursor to the first position.
nxcip::Picture::data
virtual void * data()=0
nxcip::AudioFormat::stS16P
signed 16 bits, planar
Definition: camera_plugin.h:373
nxcip::BaseCameraManager2::CameraCapability2
CameraCapability2
Enumeration of supported camera capabilities (bit flags)
Definition: camera_plugin.h:776
nxcip::AudioFormat::stS16
signed 16 bits
Definition: camera_plugin.h:368
nxcip::CameraInputEventHandler
Receives events on input port state change.
Definition: camera_plugin.h:1488
nxcip::MediaDataPacket2
Definition: camera_plugin.h:1107
nxcip::msqDefault
Default quality SHOULD be high quality.
Definition: camera_plugin.h:1192
nxcip::CameraMediaEncoder5
Definition: camera_plugin.h:506
nxcip::CameraInfo::url
char url[MAX_TEXT_LEN]
Camera management url. Can contain just address. MUST NOT be empty.
Definition: camera_plugin.h:82
nxcip::MediaDataPacket2::extradata
virtual const char * extradata() const =0
Returns pointer to extradata blob.
nxcip::MEDIA_DATA_BUFFER_ALIGNMENT
static const unsigned int MEDIA_DATA_BUFFER_ALIGNMENT
Required alignment of MediaDataPacket::data() buffer.
Definition: camera_plugin.h:1028
nxcip::CameraPtzManager::getFlip
virtual int getFlip(int *flip)=0
Gets the camera streams&#39;s flipped state.
nxcip::ArchiveSearchOptions::motionMask
Picture * motionMask
Definition: camera_plugin.h:723
nxcip::LiveStreamConfig::reserved_head
int32_t reserved_head
reserved, do not use
Definition: camera_plugin.h:448
nxcip::DtsArchiveReader
Provides access to archive, stored on camera.
Definition: camera_plugin.h:1219
nxcip::AudioFormat::SampleType
SampleType
Definition: camera_plugin.h:364
nxcip::BaseCameraManager::audioCapability
if set, camera supports audio
Definition: camera_plugin.h:579
nxcip::BaseCameraManager2::motionRegionCapability
if present, nxcip::BaseCameraManager3::setMotionMask is implemented
Definition: camera_plugin.h:779
nxcip::DtsArchiveReader::getCapabilities
virtual unsigned int getCapabilities() const =0
Returns bit mask with supported capabilities.
nxcip::DtsArchiveReader::motionDataCapability
motion data can be provided in media stream
Definition: camera_plugin.h:1274
nxpl::NX_GUID
GUID of plugin interface.
Definition: plugin_api.h:26
nxcip::CameraMediaEncoder::getMediaUrl
virtual int getMediaUrl(char *urlBuf) const =0
Returns url of media stream as NULL-terminated utf-8 string.
nxcip::DtsArchiveReader::setMotionDataEnabled
virtual int setMotionDataEnabled(bool motionPresent)=0
Toggle motion data in media stream on/off.
nxcip::CameraDiscoveryManager
This interface is used to find cameras and create BaseCameraManager instance.
Definition: camera_plugin.h:161
nxcip::CameraDiscoveryManager::findCameras
virtual int findCameras(CameraInfo *cameras, const char *serverURL)=0
Vendor-specific camera search method. Returns list of found cameras.
nxcip::MediaDataPacket::timestamp
virtual UsecUTCTimestamp timestamp() const =0
Packet&#39;s timestamp (usec (microseconds) since 1970-01-01, UTC)
nxcip::BaseCameraManager2
Extends BaseCameraManager by adding remote archive storage support (e.g., storage is mounted directly...
Definition: camera_plugin.h:770
nxcip::CameraPtzManager::LogicalPtzCoordinateSpace
Logical coordinate space — degrees for pan, tilt and fov (zoom).
Definition: camera_plugin.h:914
nxcip::DtsArchiveReader::open
virtual int open()=0
Initialize connection to archive.
nxcip::CameraDiscoveryManager::checkHostAddress
virtual int checkHostAddress(CameraInfo *cameras, const char *address, const char *login, const char *password)=0
Check host for camera presence.
nxcip::CameraInfo
Contains base camera information.
Definition: camera_plugin.h:73
nxcip::dptAudio
Audio packet. Can contain multiple audio frames.
Definition: camera_plugin.h:1013
nxcip::DtsArchiveReader::Capabilities
Capabilities
Definition: camera_plugin.h:1224
nxcip::CameraMediaEncoder::setBitrate
virtual int setBitrate(int bitrateKbps, int *selectedBitrateKbps)=0
nxcip::LiveStreamConfig::codec
int32_t codec
Definition: camera_plugin.h:450
nxcip::Resolution
Resolution of video stream picture.
Definition: camera_plugin.h:266
nxcip::BaseCameraManager::getLastErrorString
virtual void getLastErrorString(char *errorString) const =0
Returns text description of the last error.
nxcip::BaseCameraManager::sharePixelsCapability
if second stream is running whatever megapixel it has => first stream can get maxMegapixels - seconds...
Definition: camera_plugin.h:581
nxcip::MEDIA_PACKET_BUFFER_PADDING_SIZE
static const unsigned int MEDIA_PACKET_BUFFER_PADDING_SIZE
Required padding after media data (see MediaDataPacket::data() description)
Definition: camera_plugin.h:1030
nxcip::CameraRelayIOManager::startInputPortMonitoring
virtual int startInputPortMonitoring()=0
Starts relay input monitoring or increments internal counter, if already started. ...
nxcip::CameraPtzManager
Pan-tilt-zoom management.
Definition: camera_plugin.h:883
nxcip::CameraPtzManager::ContinuousTiltCapability
Camera supports continuous tilt.
Definition: camera_plugin.h:893
nxcip::BaseCameraManager::customMediaUrlCapability
camera&#39;s media streams are editable and can be provided directly via setProperty API call...
Definition: camera_plugin.h:591
nxcip::BaseCameraManager3::getParamValue
virtual int getParamValue(const char *paramName, char *valueBuf, int *valueBufSize) const =0
Reads value of parameter paramName.
nxcip::AudioFormat::stFLT
float
Definition: camera_plugin.h:370
nxcip::CameraDiscoveryManager2
Definition: camera_plugin.h:243
nxcip::Picture
Picture.
Definition: camera_plugin.h:654
nxcip::CameraMediaEncoder2
Extends CameraMediaEncoder by adding functionality for plugin to directly provide live media stream...
Definition: camera_plugin.h:417
nxcip::AudioFormat::stS32
signed 32 bits
Definition: camera_plugin.h:369
nxcip::CameraInfo::defaultPassword
char defaultPassword[256]
Plugin can specify default credentials to use with camera.
Definition: camera_plugin.h:88
nxcip::BaseCameraManager::motionRegionCapability
if present, nxcip::BaseCameraManager3::setMotionMask is implemented
Definition: camera_plugin.h:588
nxcip::AudioFormat::stU8
unsigned 8 bits
Definition: camera_plugin.h:367
nxcip::CameraRelayIOManager
Relay input/output management.
Definition: camera_plugin.h:1407
nxcip::CameraInfo::firmware
char firmware[256]
Firmware version in any human readable format. Optional.
Definition: camera_plugin.h:78
nxcip::CameraInfo2
Definition: camera_plugin.h:118
nxcip::msqLow
Low quality.
Definition: camera_plugin.h:1199
nxcip::AudioFormat::stDBLP
double, planar
Definition: camera_plugin.h:376
nxcip::DtsArchiveReader::reverseGopModeCapability
Signals that reverse playback by GOP (group of picture) reordering is supported.
Definition: camera_plugin.h:1267
nxcip::CameraRelayIOManager::getLastErrorString
virtual void getLastErrorString(char *errorString) const =0
Returns text description of last error.
nxcip::BaseCameraManager::getCameraCapabilities
virtual int getCameraCapabilities(unsigned int *capabilitiesMask) const =0
Return bit set of camera capabilities (CameraCapability enumeration)
nxcip::CameraPtzManager::getCapabilities
virtual int getCapabilities() const =0
Returns bitset of Capability enumeration members.
nxcip::CameraPtzManager::FlipPtzCapability
Camera supports flip state queries.
Definition: camera_plugin.h:900
nxcip::MediaDataPacket::fReverseBlockStart
set in first packet of gop block of reverse stream (see nxcip::DtsArchiveReader::setReverseMode) ...
Definition: camera_plugin.h:1049
nxcip::BaseCameraManager::hardwareMotionCapability
camera supports hardware motion. Plugin, returning this flag, MUST implement BaseCameraManager::nativ...
Definition: camera_plugin.h:575
nxcip::BaseCameraManager::getCameraInfo
virtual int getCameraInfo(CameraInfo *info) const =0
Fills info struct with camera data.
nxcip::DtsArchiveReader::endTime
virtual UsecUTCTimestamp endTime() const =0
Returns timestamp (usec (microseconds) since 1970-01-01, UTC) of newest data, present in the archive...
nxcip::CameraPtzManager::LogicalPositioningPtzCapability
Definition: camera_plugin.h:904
nxcip::MediaDataPacket::fReverseStream
packet has been generated during playback of reverse stream. Packets of type dptEmpty MUST have this ...
Definition: camera_plugin.h:1047
nxcip::BaseCameraManager::relayInputCapability
if this flag is enabled, CameraRelayIOManager MUST be implemented
Definition: camera_plugin.h:576
nxcip::CameraDiscoveryManager::fromUpnpData
virtual int fromUpnpData(const char *upnpXMLData, int upnpXMLDataSize, CameraInfo *cameraInfo)=0
UPNP camera search method.
nxcip::CameraPtzManager::getPosition
virtual int getPosition(CoordinateSpace space, double *pan, double *tilt, double *zoom)=0
Gets PTZ position from camera in the given coordinate space.
nxcip::VideoDataPacket::getMotionData
virtual Picture * getMotionData() const =0
Returns motion data. Can be NULL, if no motion.
nxcip::dptVideo
Video packet. Usually contains one frame. Video packet class MUST inherit nxcip::VideoDataPacket.
Definition: camera_plugin.h:1015
nxcip::BaseCameraManager::ioDeviceCapability
Definition: camera_plugin.h:603
nxcip::BaseCameraManager::getPtzManager
virtual CameraPtzManager * getPtzManager() const =0
MUST return not-NULL if ptzCapability is present.
nxcip::TimePeriods
Array of time periods.
Definition: camera_plugin.h:687
nxcip::BaseCameraManager::searchByMotionMaskCapability
if present, nxcip::BaseCameraManager2::find supports ArchiveSearchOptions::motionMask() ...
Definition: camera_plugin.h:587
nxcip::CameraMediaEncoder4
Definition: camera_plugin.h:497
nxcip::BaseCameraManager2::find
virtual int find(ArchiveSearchOptions *searchOptions, TimePeriods **timePeriods) const =0
Find regions of archive, satisfying given conditions.
nxcip::CameraRelayIOManager::getInputPortList
virtual int getInputPortList(char **idList, int *idNum) const =0
Returns list of IDs of available relay input ports.
nxcip::MediaDataPacket::type
virtual DataPacketType type() const =0
Packet type.
nxcip::CameraRelayIOManager::registerEventHandler
virtual void registerEventHandler(CameraInputEventHandler *handler)=0
Registers handler as event receiver.
nxcip::AudioFormat::stU8P
unsigned 8 bits, planar
Definition: camera_plugin.h:372
nxcip::AudioFormat::stFLTP
float, planar
Definition: camera_plugin.h:375
nxcip::BaseCameraManager::getCameraRelayIOManager
virtual CameraRelayIOManager * getCameraRelayIOManager() const =0
MUST return not-NULL if BaseCameraManager::relayInputCapability is present.
nxcip::CameraMediaEncoder2::getAudioFormat
virtual int getAudioFormat(AudioFormat *audioFormat) const =0
Returns audio format, if audio is supported.
nxcip::BaseCameraManager::needIFrameDetectionCapability
packet will be tested if it&#39;s a I-Frame. Use it if plugin can&#39;t set fKeyPacket
Definition: camera_plugin.h:589
nxcip::CameraPtzManager::ContinuousZoomCapability
Camera supports continuous zoom.
Definition: camera_plugin.h:894
nxcip::BaseCameraManager::ptzCapability
if this flag is enabled, CameraPTZManager MUST be implemented
Definition: camera_plugin.h:578
nxcip::ArchiveSearchOptions::limit
int limit
Definition: camera_plugin.h:746
nxcip::CameraInfo::uid
char uid[256]
Camera&#39;s unique identifier. MAC address can be used. MUST NOT be empty.
Definition: camera_plugin.h:80
nxcip::BaseCameraManager::setAudioEnabled
virtual int setAudioEnabled(int audioEnabled)=0
Turn on/off audio on ALL encoders.
nxcip::AudioFormat::stS64P
signed 64 bits, planar
Definition: camera_plugin.h:378
nxcip::AudioFormat::stS64
signed 64 bits
Definition: camera_plugin.h:377
nxcip::CameraPtzManager::AbsoluteTiltCapability
Camera supports absolute tilt.
Definition: camera_plugin.h:897
nxcip::CameraPtzManager::getLimits
virtual int getLimits(CoordinateSpace space, Limits *limits)=0
Gets PTZ limits of the camera.
LL
#define LL
Definition: debug.h:139
nxcip::BaseCameraManager::relativeTimestampCapability
camera provides relative timestamps. It need to align them to the current time.
Definition: camera_plugin.h:590
nxcip::BaseCameraManager3::setParamValue
virtual int setParamValue(const char *paramName, const char *value)=0
Set value of parameter paramName to value.
nxcip::CameraPtzManager::Capability
Capability
Definition: camera_plugin.h:890
nxcip::BaseCameraManager
Provides base camera operations: getting/settings fps, resolution, bitrate, media stream url(s)...
Definition: camera_plugin.h:533
nxcip::ArchiveSearchOptions::startTime
UsecUTCTimestamp startTime
Min data timestamp that is of interest.
Definition: camera_plugin.h:725
nxcip::BaseCameraManager::dtsArchiveCapability
camera has archive storage and provides access to its archive
Definition: camera_plugin.h:583
nxcip::CameraMediaEncoder3::getVideoFormat
virtual int getVideoFormat(CompressionType *codec, PixelFormat *pixelFormat) const =0
Returns video format. Optional method.
nxcip::MediaDataPacket::data
virtual const void * data() const =0
Coded media stream data.
nxcip::LiveStreamConfig::flags
int32_t flags
Definition: camera_plugin.h:449
nxcip::CameraDiscoveryManager::fromMDNSData
virtual int fromMDNSData(const char *discoveryAddress, const unsigned char *mdnsResponsePacket, int mdnsResponsePacketSize, CameraInfo *cameraInfo)=0
MDNS camera search method.
nxcip::StreamReader::getNextData
virtual int getNextData(MediaDataPacket **packet)=0
Returns media packet or NULL in case of error.
nxcip::CameraInfo::defaultLogin
char defaultLogin[256]
Plugin can specify default credentials to use with camera.
Definition: camera_plugin.h:86
nxcip::MediaDataPacket
Portion of media data.
Definition: camera_plugin.h:1037
nxcip::BaseCameraManager::dontAutoOpenCamera
Server should not open video from camera at its will.
Definition: camera_plugin.h:596
nxcip::CameraPtzManager::LimitsPtzCapability
Camera supports coordinate space limits queries.
Definition: camera_plugin.h:901
nxcip::VideoDataPacket
Video packet. MUST contain complete frame (or field in case of interlaced video)
Definition: camera_plugin.h:1139
nxcip::CameraInfo::CameraInfo
CameraInfo()=default
Initializes all values with zeros/empty strings.
nxcip::CameraPtzManager::ContinuousPanCapability
Camera supports continuous pan.
Definition: camera_plugin.h:892
nxcip::Picture::xStride
virtual int xStride(int planeNumber) const =0
Length of horizontal line (in bytes) of plane planeNumber.
nxcip::Picture::pixelFormat
virtual PixelFormat pixelFormat() const =0
Returns pixel format.
nxcip::CameraMediaEncoder4::setMediaUrl
virtual int setMediaUrl(const char url[nxcip::MAX_TEXT_LEN])=0
nxcip::CameraMediaEncoder::setResolution
virtual int setResolution(const Resolution &resolution)=0
Change resolution on specified encoder.
nxcip::PixelFormat
PixelFormat
Definition: camera_plugin_types.h:39
nxcip::Resolution::height
int height
Height in pixels.
Definition: camera_plugin.h:271
nxcip::DtsArchiveReader::playRange
virtual int playRange(unsigned int cSeq, UsecUTCTimestamp start, UsecUTCTimestamp endTimeHint, unsigned int step)=0
Play time range [start; end) skipping frames.
nxcip::ArchiveSearchOptions::endTime
UsecUTCTimestamp endTime
Max data timestamp that is of interest.
Definition: camera_plugin.h:727
nxcip::CameraRelayIOManager::setRelayOutputState
virtual int setRelayOutputState(const char *outputId, int activate, unsigned int autoResetTimeoutMS)=0
Change state of relay output port.
nxcip::BaseCameraManager::noAnalytics
Analytics Engine mustn&#39;t bind to the Device.
Definition: camera_plugin.h:597
nxcip::MediaDataPacket::fStreamReset
Definition: camera_plugin.h:1055
nxcip::BaseCameraManager2::setMotionMask
virtual int setMotionMask(Picture *motionMask)=0
If camera plugin implements this method, it MUST report motion only on for region specified (motionMa...
nxcip::DtsArchiveReader::setReverseMode
virtual int setReverseMode(unsigned int cSeq, bool isReverse, UsecUTCTimestamp timestamp, UsecUTCTimestamp *selectedPosition)=0
Set playback direction (forward/reverse)
nxcip::ArchiveSearchOptions::periodDetailLevel
unsigned long long periodDetailLevel
Definition: camera_plugin.h:735
nxcip::MediaStreamQuality
MediaStreamQuality
Definition: camera_plugin.h:1189
nxcip::BaseCameraManager3::cameraParamsPersistentCapability
Camera parameters can be read/set even if camera is not accessible at the moment. ...
Definition: camera_plugin.h:829
nxcip::BaseCameraManager::MulticastStreamCapability
Camera supports multicast streaming.
Definition: camera_plugin.h:594
nxcip::CameraDiscoveryManager::createCameraManager
virtual BaseCameraManager * createCameraManager(const CameraInfo &info)=0
Instantiates camera manager instance based on info.
nxcip::BaseCameraManager::noVideo
Audio only device.
Definition: camera_plugin.h:598
nxcip::CameraMediaEncoder3
Definition: camera_plugin.h:467
nxcip::dptEmpty
Packet containing no data (e.g., signals end of stream)
Definition: camera_plugin.h:1020
nxcip::CameraPtzManager::DevicePtzCoordinateSpace
Device-specific coordinate space.
Definition: camera_plugin.h:913
nxcip::msqHigh
High quality.
Definition: camera_plugin.h:1197
nxcip::BaseCameraManager::getEncoder
virtual int getEncoder(int encoderIndex, CameraMediaEncoder **encoderPtr)=0
Returns encoder by index.
StreamReader
Reads picture files from specified directory as video-stream.
Definition: stream_reader.h:18
nxcip::NX_TRY_AGAIN
static const int NX_TRY_AGAIN
Operation could not be completed now, but it may still be available later.
Definition: camera_plugin.h:53
nxcip::BaseCameraManager2::createDtsArchiveReader
virtual int createDtsArchiveReader(DtsArchiveReader **dtsArchiveReader) const =0
Returns not NULL if BaseCameraManager::dtsArchiveCapability is supported.
nxcip::BaseCameraManager::fixedQualityCapability
Camera does not allow to change stream quality/fps.
Definition: camera_plugin.h:593
nxcip::BaseCameraManager::primaryStreamSoftMotionCapability
it is allowed to detect motion by primary stream (if no dual streaming on camera) ...
Definition: camera_plugin.h:585
nxcip::AudioFormat::stDBL
double
Definition: camera_plugin.h:371
nxcip::DtsArchiveReader::skipFramesCapability
frame skipping with DtsArchiveReader::setSkipFrames method is supported
Definition: camera_plugin.h:1272
nxcip::BaseCameraManager::shareFpsCapability
if second stream is running whatever fps it has => first stream can get maximumFps - secondstreamFps ...
Definition: camera_plugin.h:580