nx_video_source_sdk
1.0
Video Source SDK
|
Provides base camera operations: getting/settings fps, resolution, bitrate, media stream url(s). Also provides pointer to other camera-management interfaces. More...
#include <camera_plugin.h>
Public Types | |
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 } |
Enumeration of supported camera capabilities (bit flags) More... | |
Public Member Functions | |
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... | |
![]() | |
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... | |
Provides base camera operations: getting/settings fps, resolution, bitrate, media stream url(s). Also provides pointer to other camera-management interfaces.
Mediaserver uses this interface in following way:
Enumeration of supported camera capabilities (bit flags)
Enumerator | |
---|---|
hardwareMotionCapability | camera supports hardware motion. Plugin, returning this flag, MUST implement BaseCameraManager::nativeMediaStreamCapability also |
relayInputCapability | if this flag is enabled, CameraRelayIOManager MUST be implemented |
relayOutputCapability | if this flag is enabled, CameraRelayIOManager MUST be implemented |
ptzCapability | if this flag is enabled, CameraPTZManager MUST be implemented |
audioCapability | if set, camera supports audio |
shareFpsCapability | if second stream is running whatever fps it has => first stream can get maximumFps - secondstreamFps |
sharePixelsCapability | if second stream is running whatever megapixel it has => first stream can get maxMegapixels - secondstreamPixels |
shareIpCapability | allow multiple instances on a same IP address |
dtsArchiveCapability | camera has archive storage and provides access to its archive |
nativeMediaStreamCapability | provides media stream through StreamReader interface, otherwise - CameraMediaEncoder::getMediaUrl is used |
primaryStreamSoftMotionCapability | it is allowed to detect motion by primary stream (if no dual streaming on camera) |
cameraParamsPersistentCapability | camera parameters can be read/set even if camera is not accessible at the moment |
searchByMotionMaskCapability | if present, nxcip::BaseCameraManager2::find supports ArchiveSearchOptions::motionMask() |
motionRegionCapability | if present, nxcip::BaseCameraManager3::setMotionMask is implemented |
needIFrameDetectionCapability | packet will be tested if it's a I-Frame. Use it if plugin can't set fKeyPacket |
relativeTimestampCapability | camera provides relative timestamps. It need to align them to the current time. |
customMediaUrlCapability | camera's media streams are editable and can be provided directly via setProperty API call. |
cameraTimeCapability | Camera sends absolute timestamps in media stream. |
fixedQualityCapability | Camera does not allow to change stream quality/fps. |
MulticastStreamCapability | Camera supports multicast streaming. |
ServerBoundCapability | Camera is bound to a particular server. |
dontAutoOpenCamera | Server should not open video from camera at its will. |
noAnalytics | Analytics Engine mustn't bind to the Device. |
|
pure virtual |
Return bit set of camera capabilities (CameraCapability enumeration)
[out] | capabilitiesMask |
Implemented in AxisCameraManager, CameraManager, and rpi_cam::CameraManager.
|
pure virtual |
Fills info struct with camera data.
[out] | info |
Implemented in AxisCameraManager, CameraManager, and rpi_cam::CameraManager.
|
pure virtual |
MUST return not-NULL if hardwareMotionCapability is present.
Implemented in AxisCameraManager, CameraManager, and rpi_cam::CameraManager.
|
pure virtual |
MUST return not-NULL if BaseCameraManager::relayInputCapability is present.
Implemented in AxisCameraManager, CameraManager, and rpi_cam::CameraManager.
|
pure virtual |
Returns encoder by index.
Most likely will return same pointer on multiple requests with same encoderIndex
[in] | encoderIndex | encoder index starts with 0 |
[out] | encoderPtr |
Implemented in AxisCameraManager, CameraManager, and rpi_cam::CameraManager.
|
pure virtual |
Provides maximum number of available encoders.
E.g., if 2 means that camera supports dual-streaming, 3 - for triple-streaming and so on.
[out] | encoderCount | Contains encoder count on return |
Implemented in AxisCameraManager, rpi_cam::CameraManager, and CameraManager.
|
pure virtual |
Returns text description of the last error.
[out] | errorString | Buffer of size MAX_TEXT_LEN |
Implemented in AxisCameraManager, CameraManager, and rpi_cam::CameraManager.
|
pure virtual |
MUST return not-NULL if ptzCapability is present.
Implemented in AxisCameraManager, CameraManager, and rpi_cam::CameraManager.
|
pure virtual |
Turn on/off audio on ALL encoders.
[in] | audioEnabled | If non-zero, audio should be enabled on ALL encoders, else - disabled |
Implemented in AxisCameraManager, CameraManager, and rpi_cam::CameraManager.