nx_video_source_sdk
1.0
Video Source SDK
|
This interface is used to find cameras and create BaseCameraManager instance. More...
#include <camera_plugin.h>
Public Member Functions | |
virtual void | getVendorName (char *buf) const =0 |
Returns utf-8 camera vendor name. More... | |
virtual int | findCameras (CameraInfo *cameras, const char *serverURL)=0 |
Vendor-specific camera search method. Returns list of found cameras. More... | |
virtual int | checkHostAddress (CameraInfo *cameras, const char *address, const char *login, const char *password)=0 |
Check host for camera presence. More... | |
virtual int | fromMDNSData (const char *discoveryAddress, const unsigned char *mdnsResponsePacket, int mdnsResponsePacketSize, CameraInfo *cameraInfo)=0 |
MDNS camera search method. More... | |
virtual int | fromUpnpData (const char *upnpXMLData, int upnpXMLDataSize, CameraInfo *cameraInfo)=0 |
UPNP camera search method. More... | |
virtual BaseCameraManager * | createCameraManager (const CameraInfo &info)=0 |
Instantiates camera manager instance based on info. More... | |
virtual int | getReservedModelList (char **modelList, int *count)=0 |
Get model names, reserved by the plugin. 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... | |
This interface is used to find cameras and create BaseCameraManager instance.
Mediaserver has built-in UPNP & MDNS support, plugin needs only implement nxcip::CameraDiscoveryManager::fromUpnpData or nxcip::CameraDiscoveryManager::fromMDNSData method. If camera do support neither UPNP nor MDNS, plugin can provide its own search method by implementing nxcip::CameraDiscoveryManager::findCameras
In case camera is supported by multiple plugins, plugin to use is selected under following rules:
|
pure virtual |
Check host for camera presence.
Plugin should investigate address for supported camera presence and fill cameras array with found camera(s) information This method is used to add camera with known ip (e.g., if multicast is disabled in network)
[out] | cameras | Array of size CAMERA_INFO_ARRAY_SIZE |
[in] | address | String "host:port", port is optional |
[in] | login | Login to access address. If NULL, default login should be used |
[in] | password | Password to access address. If NULL, default password should be used |
Implemented in AxisCameraDiscoveryManager, rpi_cam::DiscoveryManager, and DiscoveryManager.
|
pure virtual |
Instantiates camera manager instance based on info.
Implemented in AxisCameraDiscoveryManager, DiscoveryManager, and rpi_cam::DiscoveryManager.
|
pure virtual |
Vendor-specific camera search method. Returns list of found cameras.
It is recommended that this method works in asynchronous mode (only returning list of already found cameras). This method is called periodically.
[out] | cameras | Array of size CAMERA_INFO_ARRAY_SIZE. Implementation filles this array with found camera(s) information |
[in] | serverURL | Server URL. If camera do not have own URL it should use this one |
Implemented in AxisCameraDiscoveryManager, rpi_cam::DiscoveryManager, and DiscoveryManager.
|
pure virtual |
MDNS camera search method.
Mediaserver calls this method when it has found unknown MDNS host.
If non-zero value is returned, cameraInfo MUST be filled by this method (it will be used later in call to nxcip::CameraDiscoveryManager::createCameraManager).
[in] | discoveryAddress | Source address of mdnsResponsePacket (for ipv4 it is ip-address) |
[in] | mdnsResponsePacket | Received MDNS packet |
[in] | mdnsResponsePacketSize | Size of mdnsResponsePacket in bytes |
[out] | cameraInfo | If MDNS host is recognized, this structure is filled with camera parameters |
Implemented in AxisCameraDiscoveryManager, rpi_cam::DiscoveryManager, and DiscoveryManager.
|
pure virtual |
UPNP camera search method.
Mediaserver calls this method when it has found unknown UPNP device.
If non-zero value is returned, cameraInfo MUST be filled by this method (it will be used later in call to nxcip::CameraDiscoveryManager::createCameraManager).
[in] | upnpXMLData | Contains upnp data as specified in [UPnP Device Architecture 1.1, section 2.3] |
[in] | upnpXMLDataSize | Size of upnpXMLData in bytes |
[out] | cameraInfo | If upnp host is recognized, this structure is filled with camera data |
Implemented in AxisCameraDiscoveryManager, DiscoveryManager, and rpi_cam::DiscoveryManager.
|
pure virtual |
Get model names, reserved by the plugin.
For example, let camera support ONVIF, and plugin uses native API. In this case, plugin MUST implement this function and reserve model name, provided by onvif implementation. Also, CameraDiscoveryManager::getVendorName MUST be same as ONVIF vendor anem
[out] | modelList | Array of char* buffers of size MAX_MODEL_NAME_SIZE where camera model names will be written. May be NULL. |
[in,out] | count | A pointer to a variable that specifies the size of array pointed to by the modelList parameter. When the function returns, this variable contains the number of model names copied to modelList. If the buffer specified by modelList parameter is not large enough to hold the data, the function returns NX_MORE_DATA and stores the required buffer size in the variable pointed to by count. In this case, the contents of the modelList array are undefined. |
Implemented in AxisCameraDiscoveryManager, DiscoveryManager, and rpi_cam::DiscoveryManager.
|
pure virtual |
Returns utf-8 camera vendor name.
[out] | buf | Buffer of MAX_TEXT_LEN size |
Implemented in AxisCameraDiscoveryManager, rpi_cam::DiscoveryManager, and DiscoveryManager.