/***************************************************************************************
*
* IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
*
* By downloading, copying, installing or using the software you agree to this license.
* If you do not agree to this license, do not download, install,
* copy or use the software.
*
* Copyright (C) 2014-2024, Happytimesoft Corporation, all rights reserved.
*
* Redistribution and use in binary forms, with or without modification, are permitted.
*
* Unless required by applicable law or agreed to in writing, software distributed
* under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific
* language governing permissions and limitations under the License.
*
****************************************************************************************/
#ifndef ONVIF_COMM_H
#define ONVIF_COMM_H
/***************************************************************************************/
#define ONVIF_TOKEN_LEN 100
#define ONVIF_NAME_LEN 100
#define ONVIF_URI_LEN 300
#define ONVIF_SCOPE_LEN 128
#define MAX_PTZ_PRESETS 100
#define MAX_DNS_SERVER 2
#define MAX_SEARCHDOMAIN 4
#define MAX_NTP_SERVER 2
#define MAX_SERVER_PORT 4
#define MAX_GATEWAY 2
#define MAX_RES_NUMS 32
#define MAX_SCOPE_NUMS 100
#define MAX_USERS 10
#define MAX_IP_ADDRS 4
/* Floating point precision */
#define FPP 0.01
#define ACCESS_CTRL_MAX_LIMIT 10
#define DOOR_CTRL_MAX_LIMIT 10
#define CREDENTIAL_MAX_LIMIT 10
#define ACCESSRULES_MAX_LIMIT 10
#define SCHEDULE_MAX_LIMIT 10
/***************************************************************************************/
typedef enum
{
ONVIF_OK = 0,
ONVIF_ERR_ConnFailure = -1, // Connection failed
ONVIF_ERR_MallocFailure = -2, // Failed to allocate memory
ONVIF_ERR_NotSupportHttps = -3, // The device requires an HTTPS connection, but the onvif client library does not support it (the HTTPS compilation macro is not enabled)
ONVIF_ERR_RecvTimeout = -4, // Message receiving timeout
ONVIF_ERR_InvalidContentType = -5, // Device response message content is invalid
ONVIF_ERR_NullContent = -6, // Device response message has no content
ONVIF_ERR_ParseFailed = -7, // Parsing the message failed
ONVIF_ERR_HandleFailed = -8, // Message handling failed
ONVIF_ERR_HttpResponseError = -9, // The device responded with an error message
} ONVIF_RET;
typedef enum
{
AuthMethod_HttpDigest = 0, // Http digest auth method
AuthMethod_UsernameToken = 1 // Username Token auth method
} onvif_AuthMethod;
/***************************************************************************************/
typedef enum
{
CapabilityCategory_Invalid = -1,
CapabilityCategory_All = 0,
CapabilityCategory_Analytics = 1,
CapabilityCategory_Device = 2,
CapabilityCategory_Events = 3,
CapabilityCategory_Imaging = 4,
CapabilityCategory_Media = 5,
CapabilityCategory_PTZ = 6,
CapabilityCategory_Recording = 7,
CapabilityCategory_Search = 8,
CapabilityCategory_Replay = 9,
CapabilityCategory_AccessControl = 10,
CapabilityCategory_DoorControl = 11,
CapabilityCategory_DeviceIO = 12,
CapabilityCategory_Media2 = 13,
CapabilityCategory_Thermal = 14,
CapabilityCategory_Credential = 15,
CapabilityCategory_AccessRules = 16,
CapabilityCategory_Schedule = 17,
CapabilityCategory_Receiver = 18,
CapabilityCategory_Provisioning = 19,
} onvif_CapabilityCategory;
typedef enum
{
FactoryDefaultType_Hard = 0, // Indicates that a hard factory default is requested
FactoryDefaultType_Soft = 1 // Indicates that a soft factory default is requested
} onvif_FactoryDefaultType;
typedef enum
{
SystemLogType_System = 0, // Indicates that a system log is requested
SystemLogType_Access = 1 // Indicates that a access log is requested
} onvif_SystemLogType;
typedef enum
{
VideoEncoding_Unknown = -1,
VideoEncoding_JPEG = 0,
VideoEncoding_MPEG4 = 1,
VideoEncoding_H264 = 2
} onvif_VideoEncoding;
typedef enum
{
AudioEncoding_Unknown = -1,
AudioEncoding_G711 = 0,
AudioEncoding_G726 = 1,
AudioEncoding_AAC = 2
} onvif_AudioEncoding;
typedef enum H264Profile
{
H264Profile_Baseline = 0,
H264Profile_Main = 1,
H264Profile_Extended = 2,
H264Profile_High = 3
} onvif_H264Profile;
typedef enum
{
Mpeg4Profile_SP = 0,
Mpeg4Profile_ASP = 1
} onvif_Mpeg4Profile;
typedef enum
{
UserLevel_Administrator = 0,
UserLevel_Operator = 1,
UserLevel_User = 2,
UserLevel_Anonymous = 3,
UserLevel_Extended = 4
} onvif_UserLevel;
typedef enum
{
IPAddressFilterType_Allow = 0,
IPAddressFilterType_Deny = 1
} onvif_IPAddressFilterType;
typedef enum MoveStatus
{
MoveStatus_IDLE = 0,
MoveStatus_MOVING = 1,
MoveStatus_UNKNOWN = 2
} onvif_MoveStatus;
// OSD type
typedef enum
{
OSDType_Text = 0,
OSDType_Image = 1,
OSDType_Extended =2
} onvif_OSDType;
// OSD position type
typedef enum
{
OSDPosType_UpperLeft = 0,
OSDPosType_UpperRight = 1,
OSDPosType_LowerLeft = 2,
OSDPosType_LowerRight = 3,
OSDPosType_Custom = 4
} onvif_OSDPosType;
typedef enum
{
OSDTextType_Plain, // The Plain type means the OSD is shown as a text string which defined in the "PlainText" item
OSDTextType_Date, // The Date type means the OSD is shown as a date, format of which should be present in the "DateFormat" item
OSDTextType_Time, // The Time type means the OSD is shown as a time, format of which should be present in the "TimeFormat" item
OSDTextType_DateAndTime, // The DateAndTime type means the OSD is shown as date and time, format of which should be present in the "DateFormat" and the "TimeFormat" item
} onvif_OSDTextType;
// BacklightCompensation mode
typedef enum
{
BacklightCompensationMode_OFF = 0, // Backlight compensation is disabled
BacklightCompensationMode_ON = 1 // Backlight compensation is enabled
} onvif_BacklightCompensationMode;
// Exposure mode
typedef enum
{
ExposureMode_AUTO = 0,
ExposureMode_MANUAL = 1
} onvif_ExposureMode;
// Exposure Priority
typedef enum
{
ExposurePriority_LowNoise = 0,
ExposurePriority_FrameRate = 1
} onvif_ExposurePriority;
// AutoFocus Mode
typedef enum
{
AutoFocusMode_AUTO = 0,
AutoFocusMode_MANUAL = 1
} onvif_AutoFocusMode;
typedef enum
{
WideDynamicMode_OFF = 0,
WideDynamicMode_ON = 1
} onvif_WideDynamicMode;
typedef enum
{
IrCutFilterMode_ON = 0,
IrCutFilterMode_OFF = 1,
IrCutFilterMode_AUTO = 2
} onvif_IrCutFilterMode;
typedef enum WhiteBalanceMode
{
WhiteBalanceMode_AUTO = 0,
WhiteBalanceMode_MANUAL = 1
} onvif_WhiteBalanceMode;
typedef enum onvif_EFlipMode
{
EFlipMode_OFF = 0,
EFlipMode_ON = 1,
EFlipMode_Extended = 2
} onvif_EFlipMode;
typedef enum
{
ReverseMode_OFF = 0,
ReverseMode_ON = 1,
ReverseMode_AUTO = 2,
ReverseMode_Extended = 3
} onvif_ReverseMode;
typedef enum
{
DiscoveryMode_Discoverable = 0,
DiscoveryMode_NonDiscoverable = 1
} onvif_DiscoveryMode;
typedef enum
{
SetDateTimeType_Manual = 0, // Indicates that the date and time are set manually
SetDateTimeType_NTP = 1 // Indicates that the date and time are set through NTP
} onvif_SetDateTimeType;
typedef enum
{
StreamType_Invalid = -1,
StreamType_RTP_Unicast = 0,
StreamType_RTP_Multicast = 1
} onvif_StreamType;
typedef enum
{
TransportProtocol_Invalid = -1,
TransportProtocol_UDP = 0,
TransportProtocol_TCP = 1,
TransportProtocol_RTSP = 2,
TransportProtocol_HTTP = 3
} onvif_TransportProtocol;
typedef enum
{
TrackType_Invalid = -1,
TrackType_Video = 0,
TrackType_Audio = 1,
TrackType_Metadata = 2,
TrackType_Extended = 3
} onvif_TrackType;
typedef enum
{
DynamicDNSType_NoUpdate = 0,
DynamicDNSType_ClientUpdates = 1,
DynamicDNSType_ServerUpdates = 2
} onvif_DynamicDNSType;
typedef enum
{
PropertyOperation_Invalid = -1,
PropertyOperation_Initialized = 0,
PropertyOperation_Deleted = 1,
PropertyOperation_Changed = 2
} onvif_PropertyOperation;
typedef enum
{
RecordingStatus_Initiated = 0,
RecordingStatus_Recording = 1,
RecordingStatus_Stopped = 2,
RecordingStatus_Removing = 3,
RecordingStatus_Removed = 4,
RecordingStatus_Unknown = 5
} onvif_RecordingStatus;
typedef enum
{
SearchState_Queued = 0, // The search is queued and not yet started.
SearchState_Searching = 1, // The search is underway and not yet completed
SearchState_Completed = 2, // The search has been completed and no new results will be found
SearchState_Unknown = 3 // The state of the search is unknown. (This is not a valid response from GetSearchState.)
} onvif_SearchState;
typedef enum
{
RotateMode_OFF = 0, // Enable the Rotate feature. Degree of rotation is specified Degree parameter
RotateMode_ON = 1, // Disable the Rotate feature
RotateMode_AUTO = 2 // Rotate feature is automatically activated by the device
} onvif_RotateMode;
typedef enum
{
ScopeDefinition_Fixed = 0,
ScopeDefinition_Configurable = 1
} onvif_ScopeDefinition;
// The physical state of a Door
typedef enum
{
DoorPhysicalState_Unknown = 0, // Value is currently unknown (possibly due to initialization or monitors not giving a conclusive result)
DoorPhysicalState_Open = 1, // Door is open
DoorPhysicalState_Closed = 2, // Door is closed
DoorPhysicalState_Fault = 3 // Door monitor fault is detected
} onvif_DoorPhysicalState;
// The physical state of a Lock (including Double Lock)
typedef enum
{
LockPhysicalState_Unknown = 0, // Value is currently not known
LockPhysicalState_Locked = 1, // Lock is activated
LockPhysicalState_Unlocked = 2, // Lock is not activated
LockPhysicalState_Fault = 3 // Lock fault is detected
} onvif_LockPhysicalState;
// Describes the state of a Door with regard to alarms
typedef enum
{
DoorAlarmState_Normal = 0, // No alarm
DoorAlarmState_DoorForcedOpen = 1, // Door is forced open
DoorAlarmState_DoorOpenTooLong = 2 // Door is held open too long
} onvif_DoorAlarmState;
// Describes the state of a Tamper detector
typedef enum
{
DoorTamperState_Unknown = 0, // Value is currently not known
DoorTamperState_NotInTamper = 1, // No tampering is detected
DoorTamperState_TamperDetected = 2 // Tampering is detected
} onvif_DoorTamperState;
// Describes the state of a Door fault
typedef enum
{
DoorFaultState_Unknown = 0, // Fault state is unknown
DoorFaultState_NotInFault = 1, // No fault is detected
DoorFaultState_FaultDetected = 2 // Fault is detected
} onvif_DoorFaultState;
// DoorMode parameters describe current Door mode from a logical perspective
typedef enum
{
DoorMode_Unknown = 0, // The Door is in an Unknown state
DoorMode_Locked = 1, // The Door is in a Locked state. In this mode the device shall provide momentary access using the AccessDoor method if supported by the Door instance
DoorMode_Unlocked = 2, // The Door is in an Unlocked (Permanent Access) state. Alarms related to door timing operations such as open too long or forced are masked in this mode
DoorMode_Accessed = 3, // The Door is in an Accessed state (momentary/temporary access). Alarms related to timing operations such as "door forced" are masked in this mode
DoorMode_Blocked = 4, // The Door is in a Blocked state (Door is locked, and AccessDoor requests are ignored, i.e., it is not possible for door to go to Accessed state)
DoorMode_LockedDown = 5, // The Door is in a LockedDown state (Door is locked) until released using the LockDownReleaseDoor command. AccessDoor, LockDoor, UnlockDoor, BlockDoor and
// LockOpenDoor requests are ignored, i.e., it is not possible for door to go to Accessed, Locked, Unlocked, Blocked or LockedOpen state
DoorMode_LockedOpen = 6, // The Door is in a LockedOpen state (Door is unlocked) until released using the LockOpenReleaseDoor command. AccessDoor, LockDoor, UnlockDoor, BlockDoor and
// LockDownDoor requests are ignored, i.e., it is not possible for door to go to Accessed, Locked, Unlocked, Blocked or LockedDown state
DoorMode_DoubleLocked = 7 // The Door is in a Double Locked state - for doors with multiple locks. If the door does not have any DoubleLock, this shall be treated as a normal Locked mode.
// When changing to an Unlocked mode from the DoubleLocked mode, the door may first go to Locked state before unlocking
} onvif_DoorMode;
typedef enum
{
RelayMode_Monostable = 0, // After setting the state, the relay returns to its idle state after the specified time
RelayMode_Bistable = 1, // After setting the state, the relay remains in this state
} onvif_RelayMode;
typedef enum
{
RelayIdleState_closed = 0, // means that the relay is closed when the relay state is set to 'inactive' through the trigger command and open when the state is set to 'active' through the same command
RelayIdleState_open = 1, // means that the relay is open when the relay state is set to 'inactive' through the trigger command and closed when the state is set to 'active' through the same command
} onvif_RelayIdleState;
typedef enum
{
RelayLogicalState_active = 0, //
RelayLogicalState_inactive = 1, //
} onvif_RelayLogicalState;
typedef enum
{
DigitalIdleState_closed = 0,
DigitalIdleState_open = 1,
} onvif_DigitalIdleState;
typedef enum
{
ParityBit_None = 0,
ParityBit_Even = 1,
ParityBit_Odd = 2,
ParityBit_Mark = 3,
ParityBit_Space = 4,
ParityBit_Extended = 5
} onvif_ParityBit;
typedef enum
{
SerialPortType_RS232 = 0,
SerialPortType_RS422HalfDuplex = 1,
SerialPortType_RS422FullDuplex = 2,
SerialPortType_RS485HalfDuplex = 3,
SerialPortType_RS485FullDuplex = 4,
SerialPortType_Generic = 5
} onvif_SerialPortType;
typedef enum
{
PTZPresetTourOperation_Start = 0,
PTZPresetTourOperation_Stop = 1,
PTZPresetTourOperation_Pause = 2,
PTZPresetTourOperation_Extended = 3
} onvif_PTZPresetTourOperation;
typedef enum
{
PTZPresetTourState_Idle = 0,
PTZPresetTourState_Touring = 1,
PTZPresetTourState_Paused = 2,
PTZPresetTourState_Extended = 3
} onvif_PTZPresetTourState;
typedef enum
{
PTZPresetTourDirection_Forward = 0,
PTZPresetTourDirection_Backward = 1,
PTZPresetTourDirection_Extended = 2
} onvif_PTZPresetTourDirection;
typedef enum
{
Dot11AuthAndMangementSuite_None = 0,
Dot11AuthAndMangementSuite_Dot1X = 1,
Dot11AuthAndMangementSuite_PSK = 2,
Dot11AuthAndMangementSuite_Extended = 3
} onvif_Dot11AuthAndMangementSuite;
typedef enum
{
Dot11Cipher_CCMP = 0,
Dot11Cipher_TKIP = 1,
Dot11Cipher_Any = 2,
Dot11Cipher_Extended = 3
} onvif_Dot11Cipher;
typedef enum
{
Dot11SignalStrength_None = 0,
Dot11SignalStrength_VeryBad = 1,
Dot11SignalStrength_Bad = 2,
Dot11SignalStrength_Good = 3,
Dot11SignalStrength_VeryGood = 4,
Dot11SignalStrength_Extended = 5
} onvif_Dot11SignalStrength;
typedef enum
{
Dot11StationMode_Ad_hoc = 0,
Dot11StationMode_Infrastructure = 1,
Dot11StationMode_Extended = 2
} onvif_Dot11StationMode;
typedef enum
{
Dot11SecurityMode_None = 0,
Dot11SecurityMode_WEP = 1,
Dot11SecurityMode_PSK = 2,
Dot11SecurityMode_Dot1X = 3,
Dot11SecurityMode_Extended = 4
} onvif_Dot11SecurityMode;
typedef enum
{
ReceiverMode_AutoConnect = 0, // The receiver connects on demand, as required by consumers of the media streams
ReceiverMode_AlwaysConnect = 1, // The receiver attempts to maintain a persistent connection to the configured endpoint
ReceiverMode_NeverConnect = 2, // The receiver does not attempt to connect
ReceiverMode_Unknown = 3 // This case should never happen
} onvif_ReceiverMode;
typedef enum
{
ReceiverState_NotConnected = 0, // The receiver is not connected
ReceiverState_Connecting = 1, // The receiver is attempting to connect
ReceiverState_Connected = 2, // The receiver is connected
ReceiverState_Unknown = 3 // This case should never happen
} onvif_ReceiverState;
typedef enum
{
PanDirection_Left = 0, // Move left in relation to the video source image
PanDirection_Right = 1 // Move right in relation to the video source image
} onvif_PanDirection;
typedef enum
{
TiltDirection_Up = 0, // Move up in relation to the video source image
TiltDirection_Down = 1 // Move down in relation to the video source image
} onvif_TiltDirection;
typedef enum
{
ZoomDirection_Wide = 0, // Move video source lens toward a wider field of view
ZoomDirection_Telephoto = 1 // Move video source lens toward a narrower field of view
} onvif_ZoomDirection;
typedef enum
{
RollDirection_Clockwise = 0, // Move clockwise in relation to the video source image
RollDirection_Counterclockwise = 1, // Move counterclockwise in relation to the video source image
RollDirection_Auto = 2 // Automatically level the device in relation to the video source image
} onvif_RollDirection;
typedef enum
{
FocusDirection_Near = 0, // Move to focus on close objects
FocusDirection_Far = 1, // Move to focus on distant objects
FocusDirection_Auto = 2 // Automatically focus for the sharpest video source image
} onvif_FocusDirection;
/***************************************************************************************/
typedef struct
{
char Code[128];
char Subcode[128];
char Reason[256];
} onvif_Fault;
typedef struct
{
int https; // https connection
int port; // onvif port
char host[128]; // ip of xaddrs
char url[128]; // /onvif/device_service
} onvif_XAddr;
typedef struct
{
int Major; // required
int Minor; // required
} onvif_Version;
typedef struct
{
float Min; // required
float Max; // required
} onvif_FloatRange;
typedef struct
{
uint32 spaceFlag : 1; // Indicates whether the field space is valid
uint32 reserved : 31;
float x; // required
float y; // required
char space[256]; // optional
} onvif_Vector;
typedef struct
{
uint32 sizeItems;
int Items[10]; // optional
} onvif_IntList;
typedef struct
{
int sizeItems;
float Items[10]; // optional
} onvif_FloatList;
typedef struct
{
int sizeItems;
onvif_ParityBit Items[10]; // optional
} onvif_ParityBitList;
/* device capabilities */
typedef struct
{
// network capabilities
uint32 IPFilter : 1; // Indicates support for IP filtering
uint32 ZeroConfiguration : 1; // Indicates support for zeroconf
uint32 IPVersion6 : 1; // Indicates support for IPv6
uint32 DynDNS : 1; // Indicates support for dynamic DNS configuration
uint32 Dot11Configuration : 1; // Indicates support for IEEE 802.11 configuration
uint32 HostnameFromDHCP : 1; // Indicates support for retrieval of hostname from DHCP
uint32 DHCPv6 : 1; // Indicates support for Stateful IPv6 DHCP
// system capabilities
uint32 DiscoveryResolve : 1; // Indicates support for WS Discovery resolve requests
uint32 DiscoveryBye : 1; // Indicates support for WS-Discovery Bye
uint32 RemoteDiscovery : 1; // Indicates support for remote discovery
uint32 SystemBackup : 1; // Indicates support for system backup through MTOM
uint32 SystemLogging : 1; // Indicates support for retrieval of system logging through MTOM
uint32 FirmwareUpgrade : 1; // Indicates support for firmware upgrade through MTOM
uint32 HttpFirmwareUpgrade : 1; // Indicates support for system backup through MTOM
uint32 HttpSystemBackup : 1; // Indicates support for system backup through HTTP
uint32 HttpSystemLogging : 1; // Indicates support for retrieval of system logging through HTTP
uint32 HttpSupportInformation : 1; // Indicates support for retrieving support information through HTTP
uint32 StorageConfiguration: 1; // Indicates support for storage configuration interfaces
uint32 DiscoveryNotSupported : 1; // Indicates no support for network discovery
uint32 NetworkConfigNotSupported : 1; // Indicates no support for network configuration
uint32 UserConfigNotSupported : 1; // Indicates no support for user configuration
// scurity capabilities
uint32 TLS10 : 1; // Indicates support for TLS 1.0
uint32 TLS11 : 1; // Indicates support for TLS 1.1
uint32 TLS12 : 1; // Indicates support for TLS 1.2
uint32 OnboardKeyGeneration: 1; // Indicates support for onboard key generation
uint32 AccessPolicyConfig : 1; // Indicates support for access policy configuration
uint32 DefaultAccessPolicy : 1; // Indicates support for the ONVIF default access policy
uint32 Dot1X : 1; // Indicates support for IEEE 802.1X configuration
uint32 RemoteUserHandling : 1; // Indicates support for remote user configuration. Used when accessing another device
uint32 X509Token : 1; // Indicates support for WS-Security X.509 token
uint32 SAMLToken : 1; // Indicates support for WS-Security SAML token
uint32 KerberosToken : 1; // Indicates support for WS-Security Kerberos token
uint32 UsernameToken : 1; // Indicates support for WS-Security Username token
uint32 HttpDigest : 1; // Indicates support for WS over HTTP digest authenticated communication layer
uint32 RELToken : 1; // Indicates support for WS-Security REL token
uint32 JsonWebToken : 1; // Indicates support for JWT-based authentication with WS-Security Binary Security token
uint32 Auxiliary : 1; // Auxiliary commaond
uint32 Reserved : 27;
// IO
int InputConnectors; // optional, Number of input connectors
int RelayOutputs; // optional, Number of relay outputs
int Dot1XConfigurations; // Indicates the maximum number of Dot1X configurations supported by the device
int NTP; // Maximum number of NTP servers supported by the devices SetNTP command
int SupportedEAPMethods; // EAP Methods supported by the device.
// The int values refer to the IANA EAP Registry
int MaxUsers; // The maximum number of users that the device supports
int MaxUserNameLength; // Maximum number of characters supported for the username by CreateUsers
int MaxPasswordLength; // Maximum number of characters supported for the password by CreateUsers and SetUser
char SecurityPolicies[100]; // Indicates which security policies are supported.
// Options are: ModifyPassword (to be extended with: PasswordComplexity, PasswordHistory, AuthFailureWarning)
char HashingAlgorithms[32]; // Supported hashing algorithms as part of HTTP and RTSP Digest authentication.Example: MD5,SHA-256
int MaxStorageConfigurations; // Indicates maximum number of storage configurations supported
int GeoLocationEntries; // If present signals support for geo location. The value signals the supported number of entries
char AutoGeo[256]; // List of supported automatic GeoLocation adjustment supported by the device. Valid items are defined by tds:AutoGeoMode
// Location:Automatic adjustment of the device location
// Heading:Automatic adjustment of the device orientation relative to the compass also called yaw
// Leveling:Automatic adjustment of the deviation from the horizon also called pitch and roll
char StorageTypesSupported[256]; // Enumerates the supported StorageTypes, see tds:StorageType:
// NFS,CIFS,CDMI,FTP
char Addons[256]; // List of supported Addons by the device
// misc capabilities
char AuxiliaryCommands[256]; // Lists of commands supported by SendAuxiliaryCommand
uint32 sizeSupportedVersions; // number of Supported Versions
onvif_Version SupportedVersions[10]; // Supported Versions
onvif_Version Version; // required
onvif_XAddr XAddr;
} onvif_DevicesCapabilities;
/* media capabilities */
typedef struct
{
uint32 SnapshotUri : 1; // Indicates if GetSnapshotUri is supported
uint32 Rotation : 1; // Indicates whether or not Rotation feature is supported
uint32 VideoSourceMode : 1; // Indicates the support for changing video source mode
uint32 OSD : 1; // Indicates if OSD is supported
uint32 TemporaryOSDText : 1; // Indicates if TemporaryOSDText is supported
uint32 EXICompression : 1; // Indicates the support for the Efficient XML Interchange (EXI) binary XML format
uint32 RTPMulticast : 1; // Indicates support for RTP multicast
uint32 RTP_TCP : 1; // Indicates support for RTP over TCP
uint32 RTP_RTSP_TCP : 1; // Indicates support for RTP/RTSP/TCP
uint32 NonAggregateControl : 1; // Indicates support for non aggregate RTSP control
uint32 NoRTSPStreaming : 1; // Indicates the device does not support live media streaming via RTSP
uint32 support : 1; // Indication if the device supports media service
uint32 reserved : 20;
int MaximumNumberOfProfiles; // Maximum number of profiles supported
onvif_Version Version; // required
onvif_XAddr XAddr;
} onvif_MediaCapabilities;
/* PTZ capabilities */
typedef struct
{
uint32 EFlip : 1; // Indicates whether or not EFlip is supported
uint32 Reverse : 1; // Indicates whether or not reversing of PT control direction is supported
uint32 GetCompatibleConfigurations : 1; // Indicates support for the GetCompatibleConfigurations command
uint32 MoveStatus : 1; // Indicates that the PTZVector includes MoveStatus information
uint32 StatusPosition : 1; // Indicates that the PTZVector includes Position information
uint32 support : 1; // Indication if the device supports ptz service
uint32 reserved : 26;
char MoveAndTrack[64]; // Indication of the methods of MoveAndTrack that are supported, acceptable values are defined in tt:MoveAndTrackMethod
// PresetToken
// GeoLocation
// PTZVector
// ObjectID
onvif_Version Version; // required
onvif_XAddr XAddr;
} onvif_PTZCapabilities;
/* event capabilities */
typedef struct
{
uint32 WSSubscriptionPolicySupport : 1; // Indicates that the WS Subscription policy is supported
uint32 WSPullPointSupport : 1; // Indicates that the WS Pull Point is supported
uint32 WSPausableSubscriptionManagerInterfaceSupport : 1; // Indicates that the WS Pausable Subscription Manager Interface is supported
uint32 PersistentNotificationStorage : 1; // Indication if the device supports persistent notification storage
uint32 MetadataOverMQTT : 1; // Indicates that metadata streaming over MQTT is supported
uint32 support : 1; // Indication if the device supports events service
uint32 reserved : 26;
int MaxNotificationProducers; // Maximum number of supported notification producers as defined by WS-BaseNotification
int MaxPullPoints; // Maximum supported number of notification pull points
char EventBrokerProtocols[100]; // A space separated list of supported event broker protocols as defined by the tev:EventBrokerProtocol datatype
// mqtt
// mqtts
// ws
// wss
int MaxEventBrokers; // Maxiumum number of event broker configurations that can be added to the device
onvif_Version Version; // required
onvif_XAddr XAddr;
} onvif_EventCapabilities;
/* image capabilities */
typedef struct
{
uint32 ImageStabilization : 1; // Indicates whether or not Image Stabilization feature is supported
uint32 Presets : 1; // Indicates whether or not Presets feature is supported
uint32 AdaptablePreset : 1; // Indicates whether or not imaging preset settings can be updated
uint32 support : 1; // Indication if the device supports image service
uint32 reserved : 28;
onvif_Version Version; // required
onvif_XAddr XAddr;
} onvif_ImagingCapabilities;
/* analytics capabilities*/
typedef struct
{
uint32 RuleSupport : 1; // Indication that the device supports the rules interface and the rules syntax
uint32 AnalyticsModuleSupport : 1; // Indication that the device supports the scene analytics module interface
uint32 CellBasedSceneDescriptionSupported : 1; // Indication that the device produces the cell based scene description
uint32 RuleOptionsSupported: 1; // Indication that the device supports the GetRuleOptions operation on the rules interface
uint32 AnalyticsModuleOptionsSupported : 1; // Indication that the device supports the GetAnalyticsModuleOptions operation on the analytics interface
uint32 SupportedMetadata : 1; // Indication that the device supports the GetSupportedMetadata operation
uint32 support : 1; // Indication if the device supports Analytics service
uint32 reserved : 25;
char ImageSendingType[100]; // Indication what kinds of method that the device support for sending image
// Embedded, LocalStorage, RemoteStorage
onvif_Version Version; // required
onvif_XAddr XAddr;
} onvif_AnalyticsCapabilities;
/* recording capabilities */
typedef struct
{
uint32 ReceiverSource : 1;
uint32 MediaProfileSource : 1;
uint32 DynamicRecordings : 1; // Indication if the device supports dynamic creation and deletion of recordings
uint32 DynamicTracks : 1; // Indication if the device supports dynamic creation and deletion of tracks
uint32 Options : 1; // Indication if the device supports the GetRecordingOptions command
uint32 MetadataRecording : 1; // Indication if the device supports recording metadata
uint32 EventRecording : 1; // Indication that the device supports event triggered recording
uint32 JPEG : 1; // Indication if supports JPEG encoding
uint32 MPEG4 : 1; // Indication if supports MPEG4 encoding
uint32 H264 : 1; // Indication if supports H264 encoding
uint32 H265 : 1; // Indication if supports H265 encoding
uint32 G711 : 1; // Indication if supports G711 encoding
uint32 G726 : 1; // Indication if supports G726 encoding
uint32 AAC : 1; // Indication if supports AAC encoding
uint32 SupportedTargetFormatsFlag : 1; // Indicates whether the field SupportedTargetFormats is valid
uint32 EncryptionEntryLimitFlag : 1; // Indicates whether the field EncryptionEntryLimit is valid
uint32 SupportedEncryptionModesFlag : 1; // Indicates whether the field SupportedEncryptionModes is valid
uint32 support : 1; // Indication if the device supports recording service
uint32 reserved : 14;
uint32 MaxStringLength;
float MaxRate; // optional, Maximum supported bit rate for all tracks of a recording in kBit/s
float MaxTotalRate; // optional, Maximum supported bit rate for all recordings in kBit/s.
int MaxRecordings; // optional, Maximum number of recordings supported.
int MaxRecordingJobs; // optional, Maximum total number of supported recording jobs by the device
char SupportedExportFileFormats[100]; // optional, Indication that the device supports ExportRecordedData command for the listed export file formats.
// The list shall return at least one export file format value. The value of 'ONVIF' refers to
// ONVIF Export File Format specification
int BeforeEventLimit; // optional, If present a device shall support configuring before event durations up to the given value
int AfterEventLimit; // optional, If present a device shall support configuring after event durations up to the given value
char SupportedTargetFormats[32]; // optional, List of formats supported by the device for recording to an external target. See tt:TargetFormat for a list of definitions
// MP4 - MP4 files with all tracks in a single file
// CMAF - CMAF compliant MP4 files with 1 track per file
int EncryptionEntryLimit; // optional, Number of encryption entries supported per recording.
// By specifying multiple encryption entries per recording,
// different tracks can be encrypted with different configurations
char SupportedEncryptionModes[32]; // optional, Indicates supported encryption modes. See tt:EncryptionMode for a list of definitions.
// CENC - AES-CTR mode full sample and video NAL Subsample encryption, defined in ISO/IEC 23001-7
// CBCS - AES-CBC mode partial video NAL pattern encryption, defined in ISO/IEC 23001-7
onvif_Version Version; // required
onvif_XAddr XAddr;
} onvif_RecordingCapabilities;
/* search capabilities */
typedef struct
{
uint32 MetadataSearch : 1;
uint32 GeneralStartEvents : 1; // Indicates support for general virtual property events in the FindEvents method
uint32 support : 1; // Indication if the device supports search service
uint32 reserved : 29;
onvif_Version Version; // required
onvif_XAddr XAddr;
} onvif_SearchCapabilities;
/* replay capabilities */
typedef struct
{
uint32 ReversePlayback : 1; // Indicator that the Device supports reverse playback as defined in the ONVIF Streaming Specification
uint32 RTP_RTSP_TCP : 1; // Indicates support for RTP/RTSP/TCP
uint32 support : 1; // Indication if the device supports replay service
uint32 reserved : 29;
onvif_FloatRange SessionTimeoutRange; // The minimum and maximum valid values supported as session timeout in seconds
char RTSPWebSocketUri[256]; // If playback streaming over WebSocket is supported, this shall return the RTSP WebSocket URI
onvif_Version Version; // required
onvif_XAddr XAddr;
} onvif_ReplayCapabilities;
/* accesscontrol capabilities */
typedef struct
{
uint32 support : 1; // Indication if the device supports accesscontrol service
uint32 ClientSuppliedTokenSupported : 1; // Indicates that the client is allowed to supply the token when creating access points and areas
// To enable the use of the commands SetAccessPoint and SetArea, the value must be set to true
uint32 AccessPointManagementSupported : 1; // Indicates that the client can perform CRUD operations (create, read, update and delete) on access points
uint32 AreaManagementSupported : 1; // Indicates that the client can perform CRUD operations (create, read, update and delete) on areas
uint32 reserved : 28;
int MaxLimit; // The maximum number of entries returned by a single GetList request.
// The device shall never return more than this number of entities in a single response
int MaxAccessPoints; // Indicates the maximum number of access points supported by the device
int MaxAreas; // Indicates the maximum number of areas supported by the device
onvif_Version Version; // required
onvif_XAddr XAddr;
} onvif_AccessControlCapabilities;
/* doorcontrol capabilities */
typedef struct
{
uint32 support : 1; // Indication if the device supports doorcontrol service
uint32 ClientSuppliedTokenSupported : 1; // Indicates that the client is allowed to supply the token when creating doors.
// To enable the use of the command SetDoor, the value must be set to true
uint32 DoorManagementSupported : 1; // Indicates that the client can perform CRUD operations (create, read, update and delete) on doors.
// To enable the use of the commands GetDoors, GetDoorList, CreateDoor, ModifyDoor
// and DeleteDoor, the value must be set to true
uint32 reserved : 29;
int MaxLimit; // The maximum number of entries returned by a single GetList or Get request.
// The device shall never return more than this number of entities in a single response
int MaxDoors; // Indicates the maximum number of doors supported by the device
onvif_Version Version; // required
onvif_XAddr XAddr;
} onvif_DoorControlCapabilities;
typedef struct
{
uint32 VideoSourcesFlag : 1; // Indicates whether the field VideoSources is valid
uint32 VideoOutputsFlag : 1; // Indicates whether the field VideoSources is valid
uint32 AudioSourcesFlag : 1; // Indicates whether the field VideoSources is valid
uint32 AudioOutputsFlag : 1; // Indicates whether the field VideoSources is valid
uint32 RelayOutputsFlag : 1; // Indicates whether the field VideoSources is valid
uint32 SerialPortsFlag : 1; // Indicates whether the field VideoSources is valid
uint32 DigitalInputsFlag : 1; // Indicates whether the field VideoSources is valid
uint32 DigitalInputOptionsFlag : 1; // Indicates whether the field VideoSources is valid
uint32 support : 1; // Indication if the device supports deviceIO service
uint32 reserved : 23;
int VideoSources; // optional, Number of video sources (defaults to none)
int VideoOutputs; // optional, Number of video outputs (defaults to none)
int AudioSources; // optional, Number of audio sources (defaults to none)
int AudioOutputs; // optional, Number of audio outputs (defaults to none)
int RelayOutputs; // optional, Number of relay outputs (defaults to none)
int SerialPorts; // optional, Number of serial ports (defaults to none)
int DigitalInputs; // optional, Number of digital inputs (defaults to none)
BOOL DigitalInputOptions; // optional, Indicates support for DigitalInput configuration of the idle state (defaults to false)
onvif_Version Version; // required
onvif_XAddr XAddr;
} onvif_DeviceIOCapabilities;
typedef struct
{
uint32 MaximumNumberOfProfilesFlag : 1; // Indicates whether the field MaximumNumberOfProfiles is valid
uint32 ConfigurationsSupportedFlag : 1; // Indicates whether the field ConfigurationsSupported is valid
uint32 Reserved : 30;
int MaximumNumberOfProfiles; // optional, Maximum number of profiles supported
char ConfigurationsSupported[256]; // optional, Enumerates the configurations supported
} onvif_ProfileCapabilities;
typedef struct
{
uint32 RTSPStreaming : 1; // Indicates support for live media streaming via RTSP
uint32 RTPMulticast : 1; // Indicates support for RTP multicast
uint32 RTP_RTSP_TCP : 1; // Indicates support for RTP/RTSP/TCP
uint32 NonAggregateControl : 1; // Indicates support for non aggregate RTSP control
uint32 AutoStartMulticast : 1; // Indicates support for non-RTSP controlled multicast streaming
uint32 SecureRTSPStreaming : 1; // Indicates support for live media streaming via RTSPS and SRTP
uint32 Reserved : 26;
char RTSPWebSocketUri[256]; // optional, If streaming over websocket supported, RTSP websocket URI is provided.
// The scheme and IP part shall match the one used in the request (e.g. the GetServices request)
} onvif_StreamingCapabilities;
typedef struct
{
uint32 TKIP : 1; // required
uint32 ScanAvailableNetworks : 1; // required
uint32 MultipleConfiguration : 1; // required
uint32 AdHocStationMode : 1; // required
uint32 WEP : 1; // required
uint32 Reserved : 27;
} onvif_Dot11Capabilities;
typedef struct
{
uint32 SnapshotUri : 1; // Indicates if GetSnapshotUri is supported
uint32 Rotation : 1; // Indicates whether or not Rotation feature is supported
uint32 VideoSourceMode : 1; // Indicates the support for changing video source mode
uint32 OSD : 1; // Indicates if OSD is supported
uint32 TemporaryOSDText : 1; // Indicates if TemporaryOSDText is supported
uint32 Mask : 1; // Indicates if Masking is supported, Indicates support for mask configuration
uint32 SourceMask : 1; // Indicates if SourceMask is supported
// Indicates that privacy masks are only supported at the video source level
// and not the video source configuration level. If this is true any addition,
// deletion or change of a privacy mask done for one video source configuration
// will automatically be applied by the device to a corresponding privacy mask
// for all other video source configuration associated with the same video source.
uint32 support : 1; // Indication if the device supports media service2
uint32 Reserved : 24;
onvif_ProfileCapabilities ProfileCapabilities; // required, Media profile capabilities
onvif_StreamingCapabilities StreamingCapabilities; // required, Streaming capabilities
onvif_Version Version; // required
onvif_XAddr XAddr;
} onvif_MediaCapabilities2;
typedef struct
{
uint32 Radiometry : 1; // Indicates whether or not radiometric thermal measurements are supported by the thermal devic
uint32 support : 1; // Indication if the device supports thermal service
uint32 Reserved : 30;
onvif_Version Version; // required
onvif_XAddr XAddr;
} onvif_ThermalCapabilities;
typedef struct
{
uint32 sizeSupportedExemptionType; // sequence of elements
char SupportedExemptionType[10][32]; // optional, A list of exemptions that the device supports. Supported exemptions starting with the
// prefix pt: are reserved to define PACS specific exemption types and these reserved
// exemption types shall all share "pt:" syntax
// pt:ExemptFromAuthentication Supports ExemptedFromAuthentication
} onvif_CredentialCapabilitiesExtension;
typedef struct
{
uint32 ExtensionFlag : 1;
uint32 CredentialValiditySupported : 1; // required, Indicates that the device supports credential validity
uint32 CredentialAccessProfileValiditySupported: 1;// required, Indicates that the device supports validity on the association
// between a credential and an access profile
uint32 ValiditySupportsTimeValue : 1; // required, Indicates that the device supports both date and time value for validity.
// If set to false, then the time value is ignored
uint32 ResetAntipassbackSupported : 1; // required, Indicates the device supports resetting of anti-passback violations
// and notifying on anti-passback violations
uint32 ClientSuppliedTokenSupported: 1; // Indicates that the client is allowed to supply the token when creating credentials.
// To enable the use of the command SetCredential, the value must be set to true
uint32 support : 1; // Indication if the device supports credential service
uint32 Reserved : 25;
uint32 sizeSupportedIdentifierType; // sequence of elements
char SupportedIdentifierType[10][32]; // required, A list of identifier types that the device supports. Supported identifiers starting with
// the prefix pt: are reserved to define PACS specific identifier types and these reserved
// identifier types shall all share the "pt:" syntax
// pt:Card Supports Card identifier type
// pt:PIN Supports PIN identifier type
// pt:Fingerprint Supports Fingerprint biometric identifier type
// pt:Face Supports Face biometric identifier type
// pt:Iris Supports Iris biometric identifier type
// pt:Vein Supports Vein biometric identifier type
// pt:Palm Supports Palm biometric identifier type
// pt:Retina Supports Retina biometric identifier type
uint32 MaxLimit; // required, The maximum number of entries returned by a single request.
// The device shall never return more than this number of entities in a single response
uint32 MaxCredentials; // required, The maximum number of credential supported by the device
uint32 MaxAccessProfilesPerCredential; // required, The maximum number of access profiles for a credential
char DefaultCredentialSuspensionDuration[20]; // The default time period that the credential will temporary be suspended (e.g. by using the wrong PIN a predetermined number of times).
// The time period is defined as an [ISO 8601] duration string (e.g. PT5M).
uint32 MaxWhitelistedItems; // optional, The maximum number of whitelisted credential identifiers supported by the device
uint32 MaxBlacklistedItems; // optional, The maximum number of blacklisted credential identifiers supported by the device
onvif_CredentialCapabilitiesExtension Extension; // optional
onvif_Version Version; // required
onvif_XAddr XAddr;
} onvif_CredentialCapabilities;
typedef struct
{
uint32 MultipleSchedulesPerAccessPointSupported: 1;// required, Indicates whether or not several access policies can refer to the same access point in
// an access profile
uint32 ClientSuppliedTokenSupported : 1; // Indicates that the client is allowed to supply the token when creating access profiles.
// To enable the use of the command SetAccessProfile, the value must be set to true
uint32 support : 1; // Indication if the device supports access rules service
uint32 Reserved : 29;
uint32 MaxLimit; // required, The maximum number of entries returned by a single GetList or Get
// request. The device shall never return more than this number of entities in a single response
uint32 MaxAccessProfiles; // required, Indicates the maximum number of access profiles supported by the device
uint32 MaxAccessPoliciesPerAccessProfile; // required, Indicates the maximum number of access policies per access profile supported by the device
onvif_Version Version; // required
onvif_XAddr XAddr;
} onvif_AccessRulesCapabilities;
typedef struct
{
uint32 ExtendedRecurrenceSupported : 1; // required, If this capability is supported, then all iCalendar recurrence types shall be supported by the device
uint32 SpecialDaysSupported : 1; // required, If this capability is supported, then the device shall support special days
uint32 StateReportingSupported : 1; // required, If this capability is set to true, the device shall implement the GetScheduleState command,
// and shall notify subscribing clients whenever schedules become active or inactive
uint32 ClientSuppliedTokenSupported : 1; // Indicates that the client is allowed to supply the token when creating schedules and special day groups.
// To enable the use of the commands SetSchedule and SetSpecialDayGroup, the value must be set to true
uint32 support : 1; // Indication if the device supports schedule service
uint32 Reserved : 27;
uint32 MaxLimit; // required,
uint32 MaxSchedules; // required,
uint32 MaxTimePeriodsPerDay; // required,
uint32 MaxSpecialDayGroups; // required,
uint32 MaxDaysInSpecialDayGroup; // required,
uint32 MaxSpecialDaysSchedules; // required,
onvif_Version Version; // required
onvif_XAddr XAddr;
} onvif_ScheduleCapabilities;
typedef struct
{
uint32 RTP_USCOREMulticast : 1; // required, Indicates that the device can receive RTP multicast streams
uint32 RTP_USCORETCP : 1; // required, Indicates that the device can receive RTP/TCP streams
uint32 RTP_USCORERTSP_USCORETCP : 1; // required, Indicates that the device can receive RTP/RTSP/TCP streams
uint32 support : 1; // Indication if the device supports receiver service
uint32 Reserved : 28;
int SupportedReceivers; // required, The maximum number of receivers supported by the device
int MaximumRTSPURILength; // required, The maximum allowed length for RTSP URIs (Minimum and default value is 128 octet)
onvif_Version Version; // required
onvif_XAddr XAddr;
} onvif_ReceiverCapabilities;
typedef struct
{
uint32 MaximumPanMovesFlag : 1; // Indicates whether the field MaximumPanMoves is valid
uint32 MaximumTiltMovesFlag : 1; // Indicates whether the field MaximumTiltMoves is valid
uint32 MaximumZoomMovesFlag : 1; // Indicates whether the field MaximumZoomMoves is valid
uint32 MaximumRollMovesFlag : 1; // Indicates whether the field MaximumRollMoves is valid
uint32 AutoLevelFlag : 1; // Indicates whether the field AutoLevel is valid
uint32 MaximumFocusMovesFlag : 1; // Indicates whether the field MaximumFocusMoves is valid
uint32 AutoFocusFlag : 1; // Indicates whether the field AutoFocus is valid
uint32 Reserved : 25;
char VideoSourceToken[ONVIF_TOKEN_LEN]; // required, Unique identifier of a video source
int MaximumPanMoves; // optional, Lifetime limit of pan moves for this video source. Presence of this attribute indicates support of pan move
int MaximumTiltMoves; // optional, Lifetime limit of tilt moves for this video source. Presence of this attribute indicates support of tilt move
int MaximumZoomMoves; // optional, Lifetime limit of zoom moves for this video source. Presence of this attribute indicates support of zoom move
int MaximumRollMoves; // optional, Lifetime limit of roll moves for this video source. Presence of this attribute indicates support of roll move
BOOL AutoLevel; // optional, Indicates "auto" as a valid enum for Direction in RollMove
int MaximumFocusMoves; // optional, Lifetime limit of focus moves for this video source. Presence of this attribute indicates support of focus move
BOOL AutoFocus; // optional, Indicates "auto" as a valid enum for Direction in FocusMove
} onvif_SourceCapabilities;
typedef struct
{
uint32 support : 1; // Indication if the device supports provisioning service
uint32 Reserved : 31;
int DefaultTimeout; // external, Maximum time before stopping movement after a move operation
uint32 sizeSource; // sequence of elements
onvif_SourceCapabilities Source[4]; // optional, Capabilities per video source
onvif_Version Version; // required
onvif_XAddr XAddr;
} onvif_ProvisioningCapabilities;
typedef struct
{
onvif_DevicesCapabilities device; // The capabilities for the device service is returned in the Capabilities element
onvif_EventCapabilities events; // The capabilities for the event service is returned in the Capabilities element
onvif_Dot11Capabilities dot11; // The capabilities for the dot11
onvif_MediaCapabilities media; // The capabilities for the media service is returned in the Capabilities element
onvif_MediaCapabilities2 media2; // The capabilities for the media service2 is returned in the Capabilities element
onvif_ImagingCapabilities image; // The capabilities for the imaging service is returned in the Capabilities element
onvif_PTZCapabilities ptz; // The capabilities for the PTZ service is returned in the Capabilities element
onvif_AnalyticsCapabilities analytics; // The capabilities for the analytics service is returned in the Capabilities element
onvif_RecordingCapabilities recording; // The capabilities for the recording service is returned in the Capabilities element
onvif_SearchCapabilities search; // The capabilities for the search service is returned in the Capabilities element
onvif_ReplayCapabilities replay; // The capabilities for the replay service is returned in the Capabilities element
onvif_AccessControlCapabilities accesscontrol; // The capabilities for the accesscontrol service is returned in the Capabilities element
onvif_DoorControlCapabilities doorcontrol; // The capabilities for the doorcontrol service is returned in the Capabilities element
onvif_DeviceIOCapabilities deviceIO; // The capabilities for the deviceIO service is returned in the Capabilities element
onvif_ThermalCapabilities thermal; // The capabilities for the thermal service is returned in the Capabilities element
onvif_CredentialCapabilities credential; // The capabilities for the credential service is returned in the Capabilities element
onvif_AccessRulesCapabilities accessrules; // The capabilities for the access rules service is returned in the Capabilities element
onvif_ScheduleCapabilities schedule; // The capabilities for the schedule service is returned in the Capabilities element
onvif_ReceiverCapabilities receiver; // The capabilities for the receiver service is returned in the Capabilities element
onvif_ProvisioningCapabilities provisioning; // The capabilities for the provisioning service is returned in the Capabilities element
} onvif_Capabilities;
typedef struct
{
char Manufacturer[64]; // required, The manufactor of the device
char Model[64]; // required, The device model
char FirmwareVersion[64]; // required, The firmware version in the device
char SerialNumber[64]; // required, The serial number of the device
char HardwareId[64]; // required, The hardware ID of the device
} onvif_DeviceInformation;
typedef struct
{
int Width; // required
int Height; // required
} onvif_VideoResolution;
typedef struct
{
int Min; // required
int Max; // required
} onvif_IntRange;
typedef struct
{
int x; // required
int y; // required
int width; // required
int height; // required
} onvif_IntRectangle;
typedef struct
{
float bottom; // required
float top; // required
float right; // required
float left; // required
} onvif_Rectangle;
typedef struct
{
uint32 LevelFlag : 1; // Indicates whether the field Level is valid
uint32 Reserved : 31;
onvif_BacklightCompensationMode Mode; // required, Backlight compensation mode (on/off)
float Level; // optional, Optional level parameter (unit unspecified)
} onvif_BacklightCompensation;
typedef struct
{
uint32 PriorityFlag : 1; // Indicates whether the field Priority is valid
uint32 MinExposureTimeFlag : 1; // Indicates whether the field MinExposureTime is valid
uint32 MaxExposureTimeFlag : 1; // Indicates whether the field MaxExposureTime is valid
uint32 MinGainFlag : 1; // Indicates whether the field MinGain is valid
uint32 MaxGainFlag : 1; // Indicates whether the field MaxGain is valid
uint32 MinIrisFlag : 1; // Indicates whether the field MinIris is valid
uint32 MaxIrisFlag : 1; // Indicates whether the field MaxIris is valid
uint32 ExposureTimeFlag : 1; // Indicates whether the field ExposureTime is valid
uint32 GainFlag : 1; // Indicates whether the field Gain is valid
uint32 IrisFlag : 1; // Indicates whether the field Iris is valid
uint32 Reserved : 22;
onvif_ExposureMode Mode; // required, Auto - Enabled the exposure algorithm on the device; Manual - Disabled exposure algorithm on the device
onvif_ExposurePriority Priority; // optional, The exposure priority mode (low noise/framerate)
onvif_Rectangle Window; // required,
float MinExposureTime; // optional, Minimum value of exposure time range allowed to be used by the algorithm
float MaxExposureTime; // optional, Maximum value of exposure time range allowed to be used by the algorithm
float MinGain; // optional, Minimum value of the sensor gain range that is allowed to be used by the algorithm
float MaxGain; // optional, Maximum value of the sensor gain range that is allowed to be used by the algorithm
float MinIris; // optional, Minimum value of the iris range allowed to be used by the algorithm
float MaxIris; // optional, Maximum value of the iris range allowed to be used by the algorithm
float ExposureTime; // optional, The fixed exposure time used by the image sensor
float Gain; // optional, The fixed gain used by the image sensor (dB)
float Iris; // optional, The fixed attenuation of input light affected by the iris (dB). 0dB maps to a fully opened iris
} onvif_Exposure;
typedef struct
{
uint32 DefaultSpeedFlag : 1; // Indicates whether the field DefaultSpeed is valid
uint32 NearLimitFlag : 1; // Indicates whether the field NearLimit is valid
uint32 FarLimitFlag : 1; // Indicates whether the field FarLimit is valid
uint32 Reserved : 29;
onvif_AutoFocusMode AutoFocusMode; // required, Mode of auto fucus
float DefaultSpeed; // optional,
float NearLimit; // optional, Parameter to set autofocus near limit (unit: meter)
float FarLimit; // optional, Parameter to set autofocus far limit (unit: meter)
} onvif_FocusConfiguration;
typedef struct
{
uint32 LevelFlag : 1; // Indicates whether the field Level is valid
uint32 Reserved : 31;
onvif_WideDynamicMode Mode; // required, Wide dynamic range mode (on/off), 0-OFF, 1-ON
float Level; // optional, Optional level parameter (unit unspecified)
} onvif_WideDynamicRange;
typedef struct
{
uint32 CrGainFlag : 1; // Indicates whether the field CrGain is valid
uint32 CbGainFlag : 1; // Indicates whether the field CbGain is valid
uint32 Reserved : 30;
onvif_WhiteBalanceMode Mode; // required, 'AUTO' or 'MANUAL'
float CrGain; // optional, Rgain (unitless)
float CbGain; // optional, Bgain (unitless)
} onvif_WhiteBalance;
typedef struct
{
uint32 BacklightCompensationFlag : 1; // Indicates whether the field BacklightCompensation is valid
uint32 BrightnessFlag : 1; // Indicates whether the field Brightness is valid
uint32 ColorSaturationFlag : 1; // Indicates whether the field ColorSaturation is valid
uint32 ContrastFlag : 1; // Indicates whether the field Contrast is valid
uint32 ExposureFlag : 1; // Indicates whether the field Exposure is valid
uint32 FocusFlag : 1; // Indicates whether the field Focus is valid
uint32 IrCutFilterFlag : 1; // Indicates whether the field IrCutFilter is valid
uint32 SharpnessFlag : 1; // Indicates whether the field Sharpness is valid
uint32 WideDynamicRangeFlag : 1; // Indicates whether the field WideDynamicRange is valid
uint32 WhiteBalanceFlag : 1; // Indicates whether the field WhiteBalance is valid
uint32 Reserved : 22;
onvif_BacklightCompensation BacklightCompensation; // optional, Enabled/disabled BLC mode (on/off)
float Brightness; // optional, Image brightness (unit unspecified)
float ColorSaturation; // optional, Color saturation of the image (unit unspecified)
float Contrast; // optional, Contrast of the image (unit unspecified)
onvif_Exposure Exposure; // optional, Exposure mode of the device
onvif_FocusConfiguration Focus; // optional, Focus configuration
onvif_IrCutFilterMode IrCutFilter; // optional, Infrared Cutoff Filter settings
float Sharpness; // optional, Sharpness of the Video image
onvif_WideDynamicRange WideDynamicRange; // optional, WDR settings
onvif_WhiteBalance WhiteBalance; // optional, White balance settings
} onvif_ImagingSettings;
typedef struct
{
uint32 Mode_ON : 1; // Indicates whether mode ON is valid
uint32 Mode_OFF : 1; // Indicates whether mode OFF is valid
uint32 LevelFlag : 1; // Indicates whether the field LevelFlag is valid
uint32 Reserved : 29;
onvif_FloatRange Level; // optional, Level range of BacklightCompensation
} onvif_BacklightCompensationOptions;
typedef struct
{
uint32 Mode_AUTO : 1; // Indicates whether mode AUTO is valid
uint32 Mode_MANUAL : 1; // Indicates whether mode Manual is valid
uint32 Priority_LowNoise : 1; // Indicates whether Priority LowNoise is valid
uint32 Priority_FrameRate : 1; // Indicates whether Priority FrameRate is valid
uint32 MinExposureTimeFlag : 1; // Indicates whether the field MinExposureTime is valid
uint32 MaxExposureTimeFlag : 1; // Indicates whether the field MaxExposureTime is valid
uint32 MinGainFlag : 1; // Indicates whether the field MinGain is valid
uint32 MaxGainFlag : 1; // Indicates whether the field MaxGain is valid
uint32 MinIrisFlag : 1; // Indicates whether the field MinIris is valid
uint32 MaxIrisFlag : 1; // Indicates whether the field MaxIris is valid
uint32 ExposureTimeFlag : 1; // Indicates whether the field ExposureTime is valid
uint32 GainFlag : 1; // Indicates whether the field Gain is valid
uint32 IrisFlag : 1; // Indicates whether the field Iris is valid
uint32 Reserved : 19;
onvif_FloatRange MinExposureTime; // optional, Valid range of the Minimum ExposureTime
onvif_FloatRange MaxExposureTime; // optional, Valid range of the Maximum ExposureTime
onvif_FloatRange MinGain; // optional, Valid range of the Minimum Gain
onvif_FloatRange MaxGain; // optional, Valid range of the Maximum Gain
onvif_FloatRange MinIris; // optional, Valid range of the Minimum Iris
onvif_FloatRange MaxIris; // optional, Valid range of the Maximum Iris
onvif_FloatRange ExposureTime; // optional, Valid range of the ExposureTime
onvif_FloatRange Gain; // optional, Valid range of the Gain
onvif_FloatRange Iris; // optional, Valid range of the Iris
} onvif_ExposureOptions;
typedef struct
{
uint32 AutoFocusModes_AUTO : 1; // Indicates whether mode aUTO is valid
uint32 AutoFocusModes_MANUAL : 1; // Indicates whether mode Manual is valid
uint32 DefaultSpeedFlag : 1; // Indicates whether the field DefaultSpeed is valid
uint32 NearLimitFlag : 1; // Indicates whether the field NearLimit is valid
uint32 FarLimitFlag : 1; // Indicates whether the field FarLimit is valid
uint32 Reserved : 27;
onvif_FloatRange DefaultSpeed; // optional, Valid range of DefaultSpeed
onvif_FloatRange NearLimit; // optional, Valid range of NearLimit
onvif_FloatRange FarLimit; // optional, Valid range of FarLimit
} onvif_FocusOptions;
typedef struct
{
uint32 Mode_ON : 1; // Indicates whether mode ON is valid
uint32 Mode_OFF : 1; // Indicates whether mode OFF is valid
uint32 LevelFlag : 1; // Indicates whether the field Level is valid
uint32 Reserved : 29;
onvif_FloatRange Level; // optional, Valid range of Level
} onvif_WideDynamicRangeOptions;
typedef struct
{
uint32 Mode_AUTO : 1; // Indicates whether mode AUDO is valid
uint32 Mode_MANUAL : 1; // Indicates whether mode Manual is valid
uint32 YrGainFlag : 1; // Indicates whether the field CrGain is valid
uint32 YbGainFlag : 1; // Indicates whether the field CbGain is valid
uint32 Reserved : 28;
onvif_FloatRange YrGain; // optional, Valid range of YrGain
onvif_FloatRange YbGain; // optional, Valid range of YbGain
} onvif_WhiteBalanceOptions;
typedef struct
{
uint32 IrCutFilterMode_ON : 1; // Indicates whether IrCutFilter mode ON is valid
uint32 IrCutFilterMode_OFF : 1; // Indicates whether IrCutFilter mode OFF is valid
uint32 IrCutFilterMode_AUTO : 1; // Indicates whether IrCutFilter mode AUTO is valid
uint32 BacklightCompensationFlag : 1; // Indicates whether the field BacklightCompensation is valid
uint32 BrightnessFlag : 1; // Indicates whether the field Brightness is valid
uint32 ColorSaturationFlag : 1; // Indicates whether the field ColorSaturation is valid
uint32 ContrastFlag : 1; // Indicates whether the field Contrast is valid
uint32 ExposureFlag : 1; // Indicates whether the field Exposure is valid
uint32 FocusFlag : 1; // Indicates whether the field Focus is valid
uint32 SharpnessFlag : 1; // Indicates whether the field Sharpness is valid
uint32 WideDynamicRangeFlag : 1; // Indicates whether the field WideDynamicRange is valid
uint32 WhiteBalanceFlag : 1; // Indicates whether the field WhiteBalance is valid
uint32 Reserved : 20;
onvif_BacklightCompensationOptions BacklightCompensation; // optional, Valid range of Backlight Compensation
onvif_FloatRange Brightness; // optional, Valid range of Brightness
onvif_FloatRange ColorSaturation; // optional, alid range of Color Saturation
onvif_FloatRange Contrast; // optional, Valid range of Contrast
onvif_ExposureOptions Exposure; // optional, Valid range of Exposure
onvif_FocusOptions Focus; // optional, Valid range of Focus
onvif_FloatRange Sharpness; // optional, Valid range of Sharpness
onvif_WideDynamicRangeOptions WideDynamicRange; // optional, Valid range of WideDynamicRange
onvif_WhiteBalanceOptions WhiteBalance; // optional, Valid range of WhiteBalance
} onvif_ImagingOptions;
typedef struct
{
uint32 ErrorFlag : 1; // Indicates whether the field Error is valid
uint32 Reserved : 31;
float Position; // required, Status of focus position
onvif_MoveStatus MoveStatus; // required, Status of focus MoveStatus
char Error[100]; // optional, Error status of focus
} onvif_FocusStatus;
typedef struct
{
uint32 FocusStatusFlag : 1; // Indicates whether the field FocusStatus is valid
uint32 Reserved : 31;
onvif_FocusStatus FocusStatus; // optional, Status of focus
} onvif_ImagingStatus;
typedef struct
{
uint32 SpeedFlag : 1;
uint32 Reserved : 31;
onvif_FloatRange Position; // required, Valid ranges of the position
onvif_FloatRange Speed; // optional, Valid ranges of the speed
} onvif_AbsoluteFocusOptions;
typedef struct
{
uint32 SpeedFlag : 1;
uint32 Reserved : 31;
onvif_FloatRange Distance; // required, valid ranges of the distance
onvif_FloatRange Speed; // optional, Valid ranges of the speed
} onvif_RelativeFocusOptions20;
typedef struct
{
onvif_FloatRange Speed; // required, Valid ranges of the speed
} onvif_ContinuousFocusOptions;
typedef struct
{
uint32 AbsoluteFlag : 1;
uint32 RelativeFlag : 1;
uint32 ContinuousFlag : 1;
uint32 Reserved : 29;
onvif_AbsoluteFocusOptions Absolute; // optional, Valid ranges for the absolute control
onvif_RelativeFocusOptions20 Relative; // optional, Valid ranges for the relative control
onvif_ContinuousFocusOptions Continuous; // optional, Valid ranges for the continuous control
} onvif_MoveOptions20;
typedef struct
{
uint32 SpeedFlag : 1; // Indicates whether the field Speed is valid
uint32 Reserved : 31;
float Position; // required, Position parameter for the absolute focus control
float Speed; // optional, Speed parameter for the absolute focus control
} onvif_AbsoluteFocus;
typedef struct
{
uint32 SpeedFlag : 1; // Indicates whether the field Speed is valid
uint32 Reserved : 31;
float Distance; // required, Distance parameter for the relative focus control
float Speed; // optional, Speed parameter for the relative focus control
} onvif_RelativeFocus;
typedef struct
{
float Speed; // required, Speed parameter for the Continuous focus control
} onvif_ContinuousFocus;
typedef struct
{
uint32 AbsoluteFlag : 1; // Indicates whether the field Absolute is valid
uint32 RelativeFlag : 1; // Indicates whether the field Relative is valid
uint32 ContinuousFlag : 1; // Indicates whether the field Continuous is valid
uint32 Reserved : 29;
onvif_AbsoluteFocus Absolute; // optional, Parameters for the absolute focus control
onvif_RelativeFocus Relative; // optional, Parameters for the relative focus control
onvif_ContinuousFocus Continuous; // optional, Parameter for the continuous focus control
} onvif_FocusMove;
typedef struct
{
char Name[ONVIF_NAME_LEN]; // required, Human readable name of the Imaging Preset
char token[ONVIF_TOKEN_LEN]; // required, Unique identifier of this Imaging Preset
char type[64]; // required, Indicates Imaging Preset Type. Use ImagingPresetType
// Describes standard Imaging Preset types,
// used to facilitate Multi-language support and client display.
// "Custom" Type shall be used when Imaging Preset Name does not
// match any of the types included in the standard classification
// Custom
// ClearWeather
// Cloudy
// Fog
// Rain
// Snowing
// Snow
// WDR
// Shade
// Night
// Indoor
// Fluorescent
// Incandescent
// Sodium(Natrium)
// Sunrise(Horizon)
// Sunset(Rear)
// ExtremeHot
// ExtremeCold
// Underwater
// CloseUp
// Motion
// FlickerFree50
// FlickerFree60
} onvif_ImagingPreset;
typedef struct _ImagingPresetList
{
struct _ImagingPresetList * next;
onvif_ImagingPreset Preset;
} ImagingPresetList;
typedef struct
{
uint32 PasswordFlag : 1; // Indicates whether the field Password is valid
uint32 Reserved : 31;
char Username[ONVIF_NAME_LEN]; // required
char Password[ONVIF_NAME_LEN]; // optional
onvif_UserLevel UserLevel; // required
} onvif_User;
typedef struct
{
uint32 PasswordFlag : 1; // Indicates whether the field Password is valid
uint32 Reserved : 31;
char Username[ONVIF_NAME_LEN]; // required
char Password[ONVIF_NAME_LEN]; // optional
BOOL UseDerivedPassword; // required
} onvif_RemoteUser;
typedef struct
{
char Address[100]; // required
int PrefixLength; // required
} onvif_PrefixedIPAddress;
typedef struct
{
onvif_IPAddressFilterType Type; // required
onvif_PrefixedIPAddress IPv4Address[20]; // optional
onvif_PrefixedIPAddress IPv6Address[20]; // optional
} onvif_IPAddressFilter;
typedef struct
{
uint32 ImagingSettingsFlag : 1; // Indicates whether the field ImagingSettings is valid
uint32 Reserved : 31;
char token[ONVIF_TOKEN_LEN]; // required
float Framerate; // required, Frame rate in frames per second
onvif_VideoResolution Resolution; // required, Horizontal and vertical resolution
onvif_ImagingSettings ImagingSettings; // optional
} onvif_VideoSource;
typedef struct
{
uint32 DescriptionFlag : 1; // Indicates whether the field Description is valid
uint32 Enabled : 1; //optional, Indication of whether this mode is active. If active this value is true. In case of non-indication, it means as false.
// The value of true shall be had by only one video source mode
uint32 Reboot : 1; // required, After setting the mode if a device starts to reboot this value is true. If a device change the mode without rebooting this value is false.
// If true, configured parameters may not be guaranteed by the device after rebooting
uint32 Reserved : 29;
float MaxFramerate; // required, Max frame rate in frames per second for this video source mode
char Encodings[32]; // required, Indication which encodings are supported for this video source.
char Description[128]; // optional, Informative description of this video source mode. This field should be described in English
char token[ONVIF_TOKEN_LEN]; // required, Indicate token for video source mode
onvif_VideoResolution MaxResolution; // required, Max horizontal and vertical resolution for this video source mode
} onvif_VideoSourceMode;
typedef struct
{
uint32 DegreeFlag : 1; // Indicates whether the field Degree is valid
uint32 Reserved : 31;
onvif_RotateMode Mode; // required, Parameter to enable/disable Rotation feature
int Degree; // optional, Optional parameter to configure how much degree of clockwise rotation of image for On mode. Omitting this parameter for On mode means 180 degree rotation
} onvif_Rotate;
typedef struct
{
uint32 RotateFlag : 1; // Indicates whether the field Rotate is valid
uint32 Reserved : 31;
onvif_Rotate Rotate; // optional, Optional element to configure rotation of captured image
} onvif_VideoSourceConfigurationExtension;
typedef struct
{
uint32 ExtensionFlag : 1; // Indicates whether the field Extension is valid
uint32 Reserved : 31;
char Name[ONVIF_NAME_LEN]; // required, User readable name. Length up to 64 characters
int UseCount; // required, Number of internal references currently using this configuration. This parameter is read-only and cannot be changed by a set request
char token[ONVIF_TOKEN_LEN]; // required, Token that uniquely refernces this configuration. Length up to 64 characters
char SourceToken[ONVIF_TOKEN_LEN]; // required, Reference to the physical input
onvif_IntRectangle Bounds; // required, Rectangle specifying the Video capturing area. The capturing area shall not be larger than the whole Video source area
onvif_VideoSourceConfigurationExtension Extension; // optional
} onvif_VideoSourceConfiguration;
typedef struct
{
onvif_IntRange XRange; // required
onvif_IntRange YRange; // required
onvif_IntRange WidthRange; // required
onvif_IntRange HeightRange; // required
} onvif_IntRectangleRange;
typedef struct
{
uint32 RotateMode_OFF : 1; // Indicates whether the mode RotateMode_OFF is valid
uint32 RotateMode_ON : 1; // Indicates whether the mode RotateMode_ON is valid
uint32 RotateMode_AUTO : 1; // Indicates whether the mode RotateMode_AUTO is valid
uint32 Reboot : 1; // Signals if a device requires a reboot after changing the rotation.
// If a device can handle rotation changes without rebooting this value shall be set to false.
uint32 Reserved : 28;
uint32 sizeDegreeList;
int DegreeList[10]; // optional, List of supported degree value for rotation
} onvif_RotateOptions;
typedef struct
{
uint32 RotateFlag : 1; // Indicates whether the field Rotate is valid
uint32 Reserved : 31;
onvif_RotateOptions Rotate; // optional, Options of parameters for Rotation feature
} onvif_VideoSourceConfigurationOptionsExtension;
typedef struct
{
uint32 ExtensionFlag : 1; // Indicates whether the field Extension is valid
uint32 MaximumNumberOfProfilesFlag : 1; // Indicates whether the field MaximumNumberOfProfiles is valid
uint32 Reserved : 30;
onvif_IntRectangleRange BoundsRange; // required
uint32 sizeVideoSourceTokensAvailable;
char VideoSourceTokensAvailable[10][ONVIF_TOKEN_LEN]; // required
onvif_VideoSourceConfigurationOptionsExtension Extension; // optional
int MaximumNumberOfProfiles; // optional, Maximum number of profiles
} onvif_VideoSourceConfigurationOptions;
typedef struct
{
uint32 ConstantBitRateFlag : 1; // Indicates whether the field ConstantBitRate is valid
uint32 Reserved : 31;
int FrameRateLimit; // required, Maximum output framerate in fps. If an EncodingInterval is provided the resulting encoded framerate will be reduced by the given factor
int EncodingInterval; // required, Interval at which images are encoded and transmitted. (A value of 1 means that every frame is encoded, a value of 2 means that every 2nd frame is encoded ...)
int BitrateLimit; // required, the maximum output bitrate in kbps
BOOL ConstantBitRate; // optional, Enforce constant bitrate
} onvif_VideoRateControl;
typedef struct
{
int GovLength; // required, Determines the interval in which the I-Frames will be coded. An entry of 1 indicates I-Frames are continuously generated.
// An entry of 2 indicates that every 2nd image is an I-Frame, and 3 only every 3rd frame, etc. The frames in between are coded as P or B Frames.
onvif_Mpeg4Profile Mpeg4Profile; // required, the Mpeg4 profile, either simple profile (SP) or advanced simple profile (ASP)
} onvif_Mpeg4Configuration;
typedef struct
{
int GovLength; // required, Group of Video frames length. Determines typically the interval in which the I-Frames will be coded. An entry of 1 indicates I-Frames are continuously generated.
// An entry of 2 indicates that every 2nd image is an I-Frame, and 3 only every 3rd frame, etc. The frames in between are coded as P or B Frames
onvif_H264Profile H264Profile; // required, the H.264 profile, either baseline, main, extended or high
} onvif_H264Configuration;
typedef struct
{
char IPv4Address[32]; // required, The multicast address
int Port; // required, The RTP mutlicast destination port. A device may support RTCP. In this case the port value shall be even to allow the corresponding RTCP stream to be mapped
// to the next higher (odd) destination port number as defined in the RTSP specification
int TTL; // required, In case of IPv6 the TTL value is assumed as the hop limit. Note that for IPV6 and administratively scoped IPv4 multicast the primary use for hop limit / TTL is
// to prevent packets from (endlessly) circulating and not limiting scope. In these cases the address contains the scope
BOOL AutoStart; // required, Read only property signalling that streaming is persistant. Use the methods StartMulticastStreaming and StopMulticastStreaming to switch its state
} onvif_MulticastConfiguration;
typedef struct
{
uint32 RateControlFlag : 1; // Indicates whether the field RateControl is valid
uint32 MPEG4Flag : 1; // Indicates whether the field MPEG4 is valid
uint32 H264Flag : 1; // Indicates whether the field H264 is valid
uint32 Reserved : 29;
char Name[ONVIF_NAME_LEN]; // required, User readable name. Length up to 64 characters
int UseCount; // required, Number of internal references currently using this configuration. This parameter is read-only and cannot be changed by a set request
char token[ONVIF_TOKEN_LEN]; // required, Token that uniquely refernces this configuration. Length up to 64 characters
onvif_VideoEncoding Encoding; // required, Used video codec, either Jpeg, H.264 or Mpeg4
onvif_VideoResolution Resolution; // required, Configured video resolution
int Quality; // required, Relative value for the video quantizers and the quality of the video. A high value within supported quality range means higher quality
onvif_VideoRateControl RateControl; // optional, Optional element to configure rate control related parameters
onvif_Mpeg4Configuration MPEG4; // optional, Optional element to configure Mpeg4 related parameters
onvif_H264Configuration H264; // optional, Optional element to configure H.264 related parameters
onvif_MulticastConfiguration Multicast; // required, Defines the multicast settings that could be used for video streaming
int SessionTimeout; // required, The rtsp session timeout for the related video stream, unit is second
} onvif_VideoEncoderConfiguration;
typedef struct
{
char token[ONVIF_TOKEN_LEN]; // required
int Channels; // required, number of available audio channels. (1: mono, 2: stereo)
} onvif_AudioSource;
typedef struct
{
char Name[ONVIF_NAME_LEN]; // required, User readable name. Length up to 64 characters
int UseCount; // required, Number of internal references currently using this configuration. This parameter is read-only and cannot be changed by a set request
char token[ONVIF_TOKEN_LEN]; // required, Token that uniquely refernces this configuration. Length up to 64 characters
char SourceToken[ONVIF_TOKEN_LEN]; // required, Token of the Audio Source the configuration applies to
} onvif_AudioSourceConfiguration;
typedef struct
{
char Name[ONVIF_NAME_LEN]; // required, User readable name. Length up to 64 characters
int UseCount; // required, Number of internal references currently using this configuration. This parameter is read-only and cannot be changed by a set request
char token[ONVIF_TOKEN_LEN]; // required, Token that uniquely refernces this configuration. Length up to 64 characters
onvif_AudioEncoding Encoding; // required, Audio codec used for encoding the audio input (either G.711, G.726 or AAC)
int Bitrate; // required, The output bitrate in kbps
int SampleRate; // required, The output sample rate in kHz
onvif_MulticastConfiguration Multicast; // required, Defines the multicast settings that could be used for video streaming
int SessionTimeout; // required, The rtsp session timeout for the related audio stream, unit is second
} onvif_AudioEncoderConfiguration;
typedef struct
{
onvif_AudioEncoding Encoding; // required, The enoding used for audio data (either G.711, G.726 or AAC)
onvif_IntList BitrateList; // required, List of supported bitrates in kbps for the specified Encoding
onvif_IntList SampleRateList; // required, List of supported Sample Rates in kHz for the specified Encoding
} onvif_AudioEncoderConfigurationOption;
typedef struct
{
uint32 sizeOptions; // required, valid Options numbers
onvif_AudioEncoderConfigurationOption Options[3]; // optional, list of supported AudioEncoderConfigurations
} onvif_AudioEncoderConfigurationOptions;
typedef struct
{
onvif_VideoResolution ResolutionsAvailable[MAX_RES_NUMS]; // required, List of supported image sizes
onvif_IntRange FrameRateRange; // required, Supported frame rate in fps (frames per second)
onvif_IntRange EncodingIntervalRange; // required, Supported encoding interval range. The encoding interval corresponds to the number of frames devided by the encoded frames. An encoding interval value of "1" means that all frames are encoded
} onvif_JpegOptions;
typedef struct
{
uint32 Mpeg4Profile_SP : 1; // required, Indicates whether the SP profile is valid
uint32 Mpeg4Profile_ASP : 1; // required, Indicates whether the ASP profile is valid
uint32 Reserverd : 30;
onvif_VideoResolution ResolutionsAvailable[MAX_RES_NUMS]; // required, List of supported image sizes
onvif_IntRange GovLengthRange; // required, Supported group of Video frames length. This value typically corresponds to the I-Frame distance
onvif_IntRange FrameRateRange; // required, Supported frame rate in fps (frames per second)
onvif_IntRange EncodingIntervalRange; // required, Supported encoding interval range. The encoding interval corresponds to the number of frames devided by the encoded frames. An encoding interval value of "1" means that all frames are encoded
} onvif_Mpeg4Options;
typedef struct
{
uint32 H264Profile_Baseline : 1; // required, Indicates whether the Baseline profile is valid
uint32 H264Profile_Main : 1; // required, Indicates whether the Main profile is valid
uint32 H264Profile_Extended : 1; // required, Indicates whether the Extended profile is valid
uint32 H264Profile_High : 1; // required, Indicates whether the High profile is valid
uint32 Reserverd : 28;
onvif_VideoResolution ResolutionsAvailable[MAX_RES_NUMS]; // required, List of supported image sizes
onvif_IntRange GovLengthRange; // required, Supported group of Video frames length. This value typically corresponds to the I-Frame distance
onvif_IntRange FrameRateRange; // required, Supported frame rate in fps (frames per second)
onvif_IntRange EncodingIntervalRange; // required, Supported encoding interval range. The encoding interval corresponds to the number of frames devided by the encoded frames. An encoding interval value of "1" means that all frames are encoded
} onvif_H264Options;
typedef struct
{
onvif_JpegOptions JpegOptions; // required
onvif_IntRange BitrateRange; // required
} onvif_JpegOptions2;
typedef struct
{
onvif_Mpeg4Options Mpeg4Options; // required
onvif_IntRange BitrateRange; // required
} onvif_Mpeg4Options2;
typedef struct
{
onvif_H264Options H264Options; // required
onvif_IntRange BitrateRange; // required
} onvif_H264Options2;
typedef struct
{
uint32 JPEGFlag : 1; // Indicates whether the field JPEG is valid
uint32 MPEG4Flag : 1; // Indicates whether the field MPEG4 is valid
uint32 H264Flag : 1; // Indicates whether the field H264 is valid
uint32 Reserved : 29;
onvif_JpegOptions2 JPEG; // optional
onvif_Mpeg4Options2 MPEG4; // optional
onvif_H264Options2 H264; // optional
} onvif_VideoEncoderOptionsExtension;
typedef struct
{
uint32 JPEGFlag : 1; // Indicates whether the field JPEG is valid
uint32 MPEG4Flag : 1; // Indicates whether the field MPEG4 is valid
uint32 H264Flag : 1; // Indicates whether the field H264 is valid
uint32 ExtensionFlag : 1; // Indicates whether the field Extension is valid
uint32 Reserved : 28;
onvif_IntRange QualityRange; // required, Range of the quality values. A high value means higher quality
onvif_JpegOptions JPEG; // optional, Optional JPEG encoder settings ranges
onvif_Mpeg4Options MPEG4; // optional, Optional MPEG-4 encoder settings ranges
onvif_H264Options H264; // optional, Optional H.264 encoder settings ranges
onvif_VideoEncoderOptionsExtension Extension; // optional
} onvif_VideoEncoderConfigurationOptions;
typedef struct
{
BOOL Status; // required, True if the metadata stream shall contain the PTZ status (IDLE, MOVING or UNKNOWN)
BOOL Position; // required, True if the metadata stream shall contain the PTZ position
} onvif_PTZFilter;
typedef struct
{
char Dialect[1024]; // Dialect
char TopicExpression[256]; // TopicExpression
} onvif_EventSubscription;
typedef struct
{
uint32 PanTiltStatusSupported : 1; // required, True if the device is able to stream pan or tilt status information
uint32 ZoomStatusSupported : 1; // required, True if the device is able to stream zoom status inforamtion
uint32 PanTiltPositionSupported : 1; // optional, True if the device is able to stream the pan or tilt position
uint32 ZoomPositionSupported : 1; // optional, True if the device is able to stream zoom position information
uint32 Reserved : 28;
} onvif_PTZStatusFilterOptions;
typedef struct
{
uint32 sizeCompressionType; // sequence of elements
char CompressionType[4][32]; // optional, List of supported metadata compression type. Its options shall be chosen from tt:MetadataCompressionType
} onvif_MetadataConfigurationOptionsExtension;
typedef struct
{
uint32 GeoLocation : 1; // Optional, True if the device is able to stream the Geo Located positions of each target
uint32 ExtensionFlag : 1; // Indicates whether the field Extension is valid
uint32 Reserved : 30;
onvif_PTZStatusFilterOptions PTZStatusFilterOptions;// required, This message contains the metadata configuration options. If a metadata configuration is specified,
// the options shall concern that particular configuration. If a media profile is specified, the options shall be compatible with that media profile.
// If no tokens are specified, the options shall be considered generic for the device
onvif_MetadataConfigurationOptionsExtension Extension; // Optional
} onvif_MetadataConfigurationOptions;
typedef struct
{
uint32 PosFlag : 1; // Indicates whether the field Pos is valid
uint32 Reserved : 31;
onvif_OSDPosType Type; // required, For OSD position type
onvif_Vector Pos; // Optional, when Type is Custom, this field is valid
} onvif_OSDPosConfiguration;
typedef struct
{
uint32 ColorspaceFlag : 1; // Indicates whether the field Colorspace is valid
uint32 TransparentFlag : 1; // Indicates whether the field Transparent is valid
uint32 Reserved : 30;
float X; // required,
float Y; // required,
float Z; // required,
int Transparent; // Optional, The value range of "Transparent" could be defined by vendors only should follow this rule: the minimum value means non-transparent and the maximum value maens fully transparent
char Colorspace[256]; // Optional, support the following colorspace
// http://www.onvif.org/ver10/colorspace/YCbCr
// http://www.onvif.org/ver10/colorspace/CIELUV
// http://www.onvif.org/ver10/colorspace/CIELAB
// http://www.onvif.org/ver10/colorspace/HSV
} onvif_OSDColor;
typedef struct
{
uint32 DateFormatFlag : 1; // Indicates whether the field DateFormat is valid
uint32 TimeFormatFlag : 1; // Indicates whether the field TimeFormat is valid
uint32 FontSizeFlag : 1; // Indicates whether the field FontSize is valid
uint32 FontColorFlag : 1; // Indicates whether the field FontColor is valid
uint32 BackgroundColorFlag : 1; // Indicates whether the field BackgroundColor is valid
uint32 PlainTextFlag : 1; // Indicates whether the field PlainText is valid
uint32 Reserved : 26;
onvif_OSDTextType Type; // required,
char DateFormat[64]; // Optional, List of supported OSD date formats. This element shall be present when the value of Type field has Date or DateAndTime. The following DateFormat are defined:
/*
M/d/yyyy - e.g. 3/6/2013
MM/dd/yyyy - e.g. 03/06/2013
dd/MM/yyyy - e.g. 06/03/2013
yyyy/MM/dd - e.g. 2013/03/06
yyyy-MM-dd - e.g. 2013-06-03
dddd, MMMM dd, yyyy - e.g. Wednesday, March 06, 2013
MMMM dd, yyyy - e.g. March 06, 2013
dd MMMM, yyyy - e.g. 06 March, 2013
*/
char TimeFormat[64]; // Optional, List of supported OSD time formats. This element shall be present when the value of Type field has Time or DateAndTime. The following TimeFormat are defined:
/*
h:mm:ss tt - e.g. 2:14:21 PM
hh:mm:ss tt - e.g. 02:14:21 PM
H:mm:ss - e.g. 14:14:21
HH:mm:ss - e.g. 14:14:21
*/
int FontSize; // Optional, Font size of the text in pt
onvif_OSDColor FontColor; // Optional, Font color of the text
onvif_OSDColor BackgroundColor; // Optional, Background color of the text
char PlainText[256]; // Optional, The content of text to be displayed
} onvif_OSDTextConfiguration;
typedef struct
{
char ImgPath[256]; // required, The URI of the image which to be displayed
} onvif_OSDImgConfiguration;
typedef struct
{
uint32 TextStringFlag : 1; // Indicates whether the field TextString is valid
uint32 ImageFlag : 1; // Indicates whether the field Image is valid
uint32 Reserved : 30;
char token[ONVIF_TOKEN_LEN]; // required, OSD config token
char VideoSourceConfigurationToken[ONVIF_TOKEN_LEN]; // required, Reference to the video source configuration
onvif_OSDType Type; // required, Type of OSD
onvif_OSDPosConfiguration Position; // required, Position configuration of OSD
onvif_OSDTextConfiguration TextString; // Optional, Text configuration of OSD. It shall be present when the value of Type field is Text
onvif_OSDImgConfiguration Image; // Optional, Image configuration of OSD. It shall be present when the value of Type field is Image
} onvif_OSDConfiguration;
typedef struct
{
uint32 ImageFlag : 1; // Indicates whether the field Image is valid
uint32 PlainTextFlag : 1; // Indicates whether the field PlainText is valid
uint32 DateFlag : 1; // Indicates whether the field Date is valid
uint32 TimeFlag : 1; // Indicates whether the field Time is valid
uint32 DateAndTimeFlag : 1; // Indicates whether the field DateAndTime is valid
uint32 Reserved : 27;
int Total; // required
int Image; // optional
int PlainText; // optional
int Date; // optional
int Time; // optional
int DateAndTime; // optional
} onvif_MaximumNumberOfOSDs;
typedef struct
{
uint32 ColorspaceFlag : 1; // Indicates whether the field Colorspace is valid
uint32 LikelihoodFlag : 1; // Indicates whether the field Likelihood is valid
uint32 Reserved : 30;
float X; // required,
float Y; // required,
float Z; // required,
char Colorspace[128]; // optional, The following values are acceptable for Colourspace attribute
// http://www.onvif.org/ver10/colorspace/YCbCr - YCbCr
// http://www.onvif.org/ver10/colorspace/RGB - RGB
float Likelihood; // optional, Likelihood that the color is correct
} onvif_Color;
typedef struct
{
onvif_FloatRange X; // required
onvif_FloatRange Y; // required
onvif_FloatRange Z; // required
char Colorspace[128]; // required, The following values are acceptable for Colourspace attribute
// http://www.onvif.org/ver10/colorspace/YCbCr
// http://www.onvif.org/ver10/colorspace/CIELUV
// http://www.onvif.org/ver10/colorspace/CIELAB
// http://www.onvif.org/ver10/colorspace/HSV
} onvif_ColorspaceRange;
typedef struct
{
uint32 sizeColorList;
onvif_Color ColorList[10]; // optional, List the supported color
uint32 sizeColorspaceRange;
onvif_ColorspaceRange ColorspaceRange[10]; // optional, Define the rang of color supported
} onvif_ColorOptions;
typedef struct
{
uint32 ColorFlag : 1; // Indicates whether the field Color is valid
uint32 TransparentFlag : 1; // Indicates whether the field Transparent is valid
uint32 Reserved : 30;
onvif_ColorOptions Color; // optional, Optional list of supported colors
onvif_IntRange Transparent; // optional, Range of the transparent level. Larger means more tranparent
} onvif_OSDColorOptions;
typedef struct
{
uint32 OSDTextType_Plain : 1; // Indicates whether support OSD text type plain
uint32 OSDTextType_Date : 1; // Indicates whether support OSD text type date
uint32 OSDTextType_Time : 1; // Indicates whether support OSD text type time
uint32 OSDTextType_DateAndTime : 1; // Indicates whether support OSD text type dateandtime
uint32 FontSizeRangeFlag : 1; // Indicates whether the field FontSizeRange is valid
uint32 FontColorFlag : 1; // Indicates whether the field FontColor is valid
uint32 BackgroundColorFlag : 1; // Indicates whether the field BackgroundColor is valid
uint32 Reserved : 25;
onvif_IntRange FontSizeRange; // optional, range of the font size value
uint32 DateFormatSize;
char DateFormat[10][64]; // optional, List of supported date format
uint32 TimeFormatSize;
char TimeFormat[10][64]; // optional, List of supported time format
onvif_OSDColorOptions FontColor; // optional, List of supported font color
onvif_OSDColorOptions BackgroundColor; // optional, List of supported background color
} onvif_OSDTextOptions;
typedef struct
{
uint32 ImagePathSize;
char ImagePath[10][256]; // required, List of avaiable uris of image
} onvif_OSDImgOptions;
typedef struct
{
uint32 OSDType_Text : 1; // Indicates whether support OSD text type
uint32 OSDType_Image : 1; // Indicates whether support OSD image type
uint32 OSDType_Extended : 1; // Indicates whether support OSD extended type
uint32 OSDPosType_UpperLeft : 1; // Indicates whether support OSD position UpperLeft type
uint32 OSDPosType_UpperRight : 1; // Indicates whether support OSD position UpperRight type
uint32 OSDPosType_LowerLeft : 1; // Indicates whether support OSD position LowerLeft type
uint32 OSDPosType_LowerRight : 1; // Indicates whether support OSD position LowerRight type
uint32 OSDPosType_Custom : 1; // Indicates whether support OSD position Custom type
uint32 TextOptionFlag : 1; // Indicates whether the field TextOption is valid
uint32 ImageOptionFlag : 1; // Indicates whether the field ImageOption is valid
uint32 Reserved : 22;
onvif_MaximumNumberOfOSDs MaximumNumberOfOSDs; // required, The maximum number of OSD configurations supported for the specificate video source configuration.
// If a device limits the number of instances by OSDType, it should indicate the supported number via the related attribute
onvif_OSDTextOptions TextOption; // optional, Option of the OSD text configuration. This element shall be returned if the device is signaling the support for Text
onvif_OSDImgOptions ImageOption; // optional, Option of the OSD image configuration. This element shall be returned if the device is signaling the support for Image
} onvif_OSDConfigurationOptions;
typedef struct
{
uint32 spaceFlag : 1; // Indicates whether the field space is valid
uint32 reserved : 31;
float x; // required
char space[256]; // optional
} onvif_Vector1D;
typedef struct
{
uint32 PanTiltFlag : 1; // Indicates whether the field PanTilt is valid
uint32 ZoomFlag : 1; // Indicates whether the field Zoom is valid
uint32 Reserved : 30;
onvif_Vector PanTilt; // optional, Pan and tilt position. The x component corresponds to pan and the y component to tilt
onvif_Vector1D Zoom; // optional, A zoom position
} onvif_PTZVector;
typedef struct
{
uint32 PanTiltFlag : 1; // Indicates whether the field PanTilt is valid
uint32 ZoomFlag : 1; // Indicates whether the field Zoom is valid
uint32 Reserved : 30;
onvif_Vector PanTilt; // optional, Pan and tilt speed. The x component corresponds to pan and the y component to tilt. If omitted in a request, the current (if any) PanTilt movement should not be affected
onvif_Vector1D Zoom; // optional, A zoom speed. If omitted in a request, the current (if any) Zoom movement should not be affected
} onvif_PTZSpeed;
typedef struct
{
uint32 PTZPositionFlag : 1; // Indicates whether the field PTZPosition is valid
uint32 Reserved : 31;
char Name[ONVIF_NAME_LEN]; // required, A list of preset position name
char token[ONVIF_TOKEN_LEN]; // required
onvif_PTZVector PTZPosition; // optional, A list of preset position
} onvif_PTZPreset;
typedef struct
{
onvif_FloatRange XRange; // required
onvif_FloatRange YRange; // required
} onvif_PanTiltLimits;
typedef struct
{
onvif_FloatRange XRange; // required
} onvif_ZoomLimits;
typedef struct onvif_PTControlDirection
{
uint32 EFlipFlag : 1; // Indicates whether the field EFlip is valid
uint32 ReverseFlag : 1; // Indicates whether the field Reverse is valid
uint32 Reserved : 30;
onvif_EFlipMode EFlip; // optional, Optional element to configure related parameters for E-Flip
onvif_ReverseMode Reverse; // optional, Optional element to configure related parameters for reversing of PT Control Direction
} onvif_PTControlDirection;
typedef struct
{
uint32 PTControlDirectionFlag : 1; // Indicates whether the field PTControlDirection is valid
uint32 Reserved : 31;
onvif_PTControlDirection PTControlDirection; // optional, Optional element to configure PT Control Direction related features
} onvif_PTZConfigurationExtension;
typedef struct
{
uint32 DefaultPTZSpeedFlag : 1; // Indicates whether the field DefaultPTZSpeed is valid
uint32 DefaultPTZTimeoutFlag : 1; // Indicates whether the field DefaultPTZTimeout is valid
uint32 PanTiltLimitsFlag : 1; // Indicates whether the field PanTiltLimits is valid
uint32 ZoomLimitsFlag : 1; // Indicates whether the field ZoomLimits is valid
uint32 ExtensionFlag : 1; // Indicates whether the field Extension is valid
uint32 MoveRampFlag : 1; // Indicates whether the field MoveRamp is valid
uint32 PresetRampFlag : 1; // Indicates whether the field PresetRamp is valid
uint32 PresetTourRampFlag : 1; // Indicates whether the field PresetTourRamp is valid
uint32 Reserved : 24;
char Name[ONVIF_NAME_LEN]; // required
int UseCount; // required
char token[ONVIF_TOKEN_LEN]; // required
char NodeToken[ONVIF_TOKEN_LEN]; // required, A mandatory reference to the PTZ Node that the PTZ Configuration belongs to
onvif_PTZSpeed DefaultPTZSpeed; // optional, If the PTZ Node supports absolute or relative PTZ movements, it shall specify corresponding default Pan/Tilt and Zoom speeds
int DefaultPTZTimeout; // optional, If the PTZ Node supports continuous movements, it shall specify a default timeout, after which the movement stops
onvif_PanTiltLimits PanTiltLimits; // optional, The Pan/Tilt limits element should be present for a PTZ Node that supports an absolute Pan/Tilt. If the element is present it signals the support for configurable Pan/Tilt limits.
// If limits are enabled, the Pan/Tilt movements shall always stay within the specified range. The Pan/Tilt limits are disabled by setting the limits to -INF or +INF
onvif_ZoomLimits ZoomLimits; // optional, The Zoom limits element should be present for a PTZ Node that supports absolute zoom. If the element is present it signals the supports for configurable Zoom limits.
// If limits are enabled the zoom movements shall always stay within the specified range. The Zoom limits are disabled by settings the limits to -INF and +INF
onvif_PTZConfigurationExtension Extension; // optional
int MoveRamp; // optional, The optional acceleration ramp used by the device when moving
int PresetRamp; // optional, The optional acceleration ramp used by the device when recalling presets
int PresetTourRamp; // optional, The optional acceleration ramp used by the device when executing PresetTours
} onvif_PTZConfiguration;
typedef struct
{
// Indicates which preset tour operations are available for this PTZ Node
uint32 PTZPresetTourOperation_Start : 1;
uint32 PTZPresetTourOperation_Stop : 1;
uint32 PTZPresetTourOperation_Pause : 1;
uint32 PTZPresetTourOperation_Extended : 1;
uint32 Reserved : 28;
int MaximumNumberOfPresetTours; // required, Indicates number of preset tours that can be created. Required preset tour operations shall be available for this PTZ Node if one or more preset tour is supported
} onvif_PTZPresetTourSupported;
typedef struct
{
uint32 SupportedPresetTourFlag : 1; // Indicates whether the field SupportedPresetTour is valid
uint32 Reserved : 31;
onvif_PTZPresetTourSupported SupportedPresetTour;// optional, Detail of supported Preset Tour feature
} onvif_PTZNodeExtension;
typedef struct
{
char URI[256]; // required, A URI of coordinate systems.
onvif_FloatRange XRange; // required, A range of x-axis
onvif_FloatRange YRange; // required, A range of y-axis
} onvif_Space2DDescription;
typedef struct
{
char URI[256]; // required, A URI of coordinate systems
onvif_FloatRange XRange; // required, A range of x-axis
} onvif_Space1DDescription;
typedef struct
{
uint32 AbsolutePanTiltPositionSpaceFlag : 1; // Indicates whether the field AbsolutePanTiltPositionSpace is valid
uint32 AbsoluteZoomPositionSpaceFlag : 1; // Indicates whether the field AbsoluteZoomPositionSpace is valid
uint32 RelativePanTiltTranslationSpaceFlag : 1; // Indicates whether the field RelativePanTiltTranslationSpace is valid
uint32 RelativeZoomTranslationSpaceFlag : 1; // Indicates whether the field RelativeZoomTranslationSpace is valid
uint32 ContinuousPanTiltVelocitySpaceFlag : 1; // Indicates whether the field ContinuousPanTiltVelocitySpace is valid
uint32 ContinuousZoomVelocitySpaceFlag : 1; // Indicates whether the field ContinuousZoomVelocitySpace is valid
uint32 PanTiltSpeedSpaceFlag : 1; // Indicates whether the field PanTiltSpeedSpace is valid
uint32 ZoomSpeedSpaceFlag : 1; // Indicates whether the field ZoomSpeedSpace is valid
uint32 Reserved : 24;
onvif_Space2DDescription AbsolutePanTiltPositionSpace; // optional, The Generic Pan/Tilt Position space is provided by every PTZ node that supports absolute Pan/Tilt, since it does not relate to a specific physical range.
// Instead, the range should be defined as the full range of the PTZ unit normalized to the range -1 to 1 resulting in the following space description
onvif_Space1DDescription AbsoluteZoomPositionSpace; // optional, The Generic Zoom Position Space is provided by every PTZ node that supports absolute Zoom, since it does not relate to a specific physical range.
// Instead, the range should be defined as the full range of the Zoom normalized to the range 0 (wide) to 1 (tele).
// There is no assumption about how the generic zoom range is mapped to magnification, FOV or other physical zoom dimension
onvif_Space2DDescription RelativePanTiltTranslationSpace;// optional, The Generic Pan/Tilt translation space is provided by every PTZ node that supports relative Pan/Tilt, since it does not relate to a specific physical range.
// Instead, the range should be defined as the full positive and negative translation range of the PTZ unit normalized to the range -1 to 1,
// where positive translation would mean clockwise rotation or movement in right/up direction resulting in the following space description
onvif_Space1DDescription RelativeZoomTranslationSpace; // optional, The Generic Zoom Translation Space is provided by every PTZ node that supports relative Zoom, since it does not relate to a specific physical range.
// Instead, the corresponding absolute range should be defined as the full positive and negative translation range of the Zoom normalized to the range -1 to1,
// where a positive translation maps to a movement in TELE direction. The translation is signed to indicate direction (negative is to wide, positive is to tele).
// There is no assumption about how the generic zoom range is mapped to magnification, FOV or other physical zoom dimension. This results in the following space description
onvif_Space2DDescription ContinuousPanTiltVelocitySpace; // optional, The generic Pan/Tilt velocity space shall be provided by every PTZ node, since it does not relate to a specific physical range.
// Instead, the range should be defined as a range of the PTZ unit's speed normalized to the range -1 to 1, where a positive velocity would map to clockwise
// rotation or movement in the right/up direction. A signed speed can be independently specified for the pan and tilt component resulting in the following space description
onvif_Space1DDescription ContinuousZoomVelocitySpace; // optional, The generic zoom velocity space specifies a zoom factor velocity without knowing the underlying physical model. The range should be normalized from -1 to 1,
// where a positive velocity would map to TELE direction. A generic zoom velocity space description resembles the following
onvif_Space1DDescription PanTiltSpeedSpace; // optional, The speed space specifies the speed for a Pan/Tilt movement when moving to an absolute position or to a relative translation.
// In contrast to the velocity spaces, speed spaces do not contain any directional information. The speed of a combined Pan/Tilt
// movement is represented by a single non-negative scalar value
onvif_Space1DDescription ZoomSpeedSpace; // optional, The speed space specifies the speed for a Zoom movement when moving to an absolute position or to a relative translation.
// In contrast to the velocity spaces, speed spaces do not contain any directional information
} onvif_PTZSpaces;
typedef struct
{
uint32 NameFlag : 1; // Indicates whether the field Name is valid
uint32 ExtensionFlag : 1; // Indicates whether the field Extension is valid
uint32 Reserved : 30;
char token[ONVIF_TOKEN_LEN]; // required
char Name[ONVIF_NAME_LEN]; // optional, A unique identifier that is used to reference PTZ Nodes
onvif_PTZSpaces SupportedPTZSpaces; // required, A list of Coordinate Systems available for the PTZ Node. For each Coordinate System, the PTZ Node MUST specify its allowed range
int MaximumNumberOfPresets; // required, All preset operations MUST be available for this PTZ Node if one preset is supported
BOOL HomeSupported; // required, A boolean operator specifying the availability of a home position. If set to true, the Home Position Operations MUST be available for this PTZ Node
onvif_PTZNodeExtension Extension; // optional
BOOL FixedHomePosition; // optional, Indication whether the HomePosition of a Node is fixed or it can be changed via the SetHomePosition command
BOOL GeoMove; // optional, Indication whether the Node supports the geo-referenced move command
uint32 sizeAuxiliaryCommands; // sequence of elements
char AuxiliaryCommands[10][64]; // optional
} onvif_PTZNode;
typedef struct
{
// Supported options for EFlip feature
uint32 EFlipMode_OFF : 1;
uint32 EFlipMode_ON : 1;
uint32 EFlipMode_Extended : 1;
// Supported options for Reverse feature
uint32 ReverseMode_OFF : 1;
uint32 ReverseMode_ON : 1;
uint32 ReverseMode_AUTO : 1;
uint32 ReverseMode_Extended : 1;
uint32 Reserved : 25;
} onvif_PTControlDirectionOptions;
typedef struct
{
uint32 PTControlDirectionFlag : 1; // Indicates whether the field PTControlDirection is valid
uint32 Reserved : 31;
onvif_PTZSpaces Spaces; // required,
onvif_IntRange PTZTimeout; // required, A timeout Range within which Timeouts are accepted by the PTZ Node
onvif_PTControlDirectionOptions PTControlDirection; // optional,
} onvif_PTZConfigurationOptions;
typedef struct
{
uint32 PanTiltFlag : 1; // Indicates whether the field PanTilt is valid
uint32 ZoomFlag : 1; // Indicates whether the field Zoom is valid
uint32 Reserved : 30;
onvif_MoveStatus PanTilt; // optional
onvif_MoveStatus Zoom; // optional
} onvif_PTZMoveStatus;
typedef struct
{
uint32 PositionFlag : 1; // Indicates whether the field Position is valid
uint32 MoveStatusFlag : 1; // Indicates whether the field MoveStatus is valid
uint32 ErrorFlag : 1; // Indicates whether the field MoveStatus is valid
uint32 Reserved : 29;
onvif_PTZVector Position; // optional, Specifies the absolute position of the PTZ unit together with the Space references. The default absolute spaces of the corresponding PTZ configuration MUST be referenced within the Position element
onvif_PTZMoveStatus MoveStatus; // optional, Indicates if the Pan/Tilt/Zoom device unit is currently moving, idle or in an unknown state
char Error[100]; // optional, States a current PTZ error
time_t UtcTime; // required, Specifies the UTC time when this status was generated
} onvif_PTZStatus;
typedef struct
{
uint32 PresetTokenFlag : 1; // Indicates whether the field PresetToken is valid
uint32 HomeFlag : 1; // Indicates whether the field Home is valid
uint32 PTZPositionFlag : 1; // Indicates whether the field PTZPosition is valid
uint32 Reserved : 29;
char PresetToken[ONVIF_TOKEN_LEN]; // optional, Option to specify the preset position with Preset Token defined in advance
BOOL Home; // optional, Option to specify the preset position with the home position of this PTZ Node. "False" to this parameter shall be treated as an invalid argument
onvif_PTZVector PTZPosition; // optional, Option to specify the preset position with vector of PTZ node directly
} onvif_PTZPresetTourPresetDetail;
typedef struct
{
uint32 SpeedFlag : 1; // Indicates whether the field Speed is valid
uint32 StayTimeFlag : 1; // Indicates whether the field StayTime is valid
uint32 Reserved : 30;
onvif_PTZPresetTourPresetDetail PresetDetail; // required, Detail definition of preset position of the tour spot
onvif_PTZSpeed Speed; // optional, Optional parameter to specify Pan/Tilt and Zoom speed on moving toward this tour spot
int StayTime; // optional, Optional parameter to specify time duration of staying on this tour sport
} onvif_PTZPresetTourSpot;
typedef struct _PTZPresetTourSpotList
{
struct _PTZPresetTourSpotList * next;
onvif_PTZPresetTourSpot PTZPresetTourSpot;
} PTZPresetTourSpotList;
typedef struct
{
uint32 CurrentTourSpotFlag : 1; // Indicates whether the field CurrentTourSpot is valid
uint32 Reserved : 31;
onvif_PTZPresetTourState State; // required, Indicates state of this preset tour by Idle/Touring/Paused
onvif_PTZPresetTourSpot CurrentTourSpot; // optional, Indicates a tour spot currently staying
} onvif_PTZPresetTourStatus;
typedef struct
{
uint32 RecurringTimeFlag : 1; // Indicates whether the field RecurringTime is valid
uint32 RecurringDurationFlag : 1; // Indicates whether the field RecurringDuration is valid
uint32 DirectionFlag : 1; // Indicates whether the field Direction is valid
uint32 RandomPresetOrderFlag : 1; // Indicates whether the field RandomPresetOrder is valid
uint32 Reserved : 28;
int RecurringTime; // optional, Optional parameter to specify how many times the preset tour is recurred
int RecurringDuration; // optional, Optional parameter to specify how long time duration the preset tour is recurred
onvif_PTZPresetTourDirection Direction; // optional, Optional parameter to choose which direction the preset tour goes. Forward shall be chosen in case it is omitted
BOOL RandomPresetOrder; // optional, Execute presets in random order. If set to true and Direction is also present, Direction will be ignored and presets of the Tour will be recalled randomly
} onvif_PTZPresetTourStartingCondition;
typedef struct
{
char Name[ONVIF_NAME_LEN]; // optional, Readable name of the preset tour
char token[ONVIF_TOKEN_LEN]; // required, Unique identifier of this preset tour
BOOL AutoStart; // required, Auto Start flag of the preset tour. True allows the preset tour to be activated always
onvif_PTZPresetTourStatus Status; // required, Read only parameters to indicate the status of the preset tour
onvif_PTZPresetTourStartingCondition StartingCondition; // required, Parameters to specify the detail behavior of the preset tour
PTZPresetTourSpotList * TourSpot; // optional, A list of detail of touring spots including preset positions
} onvif_PresetTour;
typedef struct
{
int Min; // required, unit is second
int Max; // required, unit is second
} onvif_DurationRange;
typedef struct
{
uint32 RecurringTimeFlag : 1; // Indicates whether the field RecurringTime is valid
uint32 RecurringDurationFlag : 1; // Indicates whether the field RecurringDuration is valid
uint32 PTZPresetTourDirection_Forward : 1; //
uint32 PTZPresetTourDirection_Backward : 1; //
uint32 PTZPresetTourDirection_Extended : 1; //
uint32 Reserved : 27;
onvif_IntRange RecurringTime; // optional, Supported range of Recurring Time
onvif_DurationRange RecurringDuration; // optional, Supported range of Recurring Duration
} onvif_PTZPresetTourStartingConditionOptions;
typedef struct
{
uint32 HomeFlag : 1; // Indicates whether the field Home is valid
uint32 PanTiltPositionSpaceFlag : 1; // Indicates whether the field PanTiltPositionSpace is valid
uint32 ZoomPositionSpaceFlag : 1; // Indicates whether the field ZoomPositionSpace is valid
uint32 Reserved : 29;
uint32 sizePresetToken;
char PresetToken[MAX_PTZ_PRESETS][ONVIF_TOKEN_LEN]; // optional, A list of available Preset Tokens for tour spots
BOOL Home; // optional, An option to indicate Home postion for tour spots
onvif_Space2DDescription PanTiltPositionSpace; // optional, Supported range of Pan and Tilt for tour spots
onvif_Space1DDescription ZoomPositionSpace; // optional, Supported range of Zoom for a tour spot
} onvif_PTZPresetTourPresetDetailOptions;
typedef struct
{
onvif_PTZPresetTourPresetDetailOptions PresetDetail; // required, Supported options for detail definition of preset position of the tour spot
onvif_DurationRange StayTime; // required, Supported range of stay time for a tour spot
} onvif_PTZPresetTourSpotOptions;
typedef struct
{
BOOL AutoStart; // required, Indicates whether or not the AutoStart is supported
onvif_PTZPresetTourStartingConditionOptions StartingCondition; // required, Supported options for Preset Tour Starting Condition
onvif_PTZPresetTourSpotOptions TourSpot; // required, Supported options for Preset Tour Spot
} onvif_PTZPresetTourOptions;
typedef struct
{
uint32 NameFlag : 1; // Indicates whether the field Name is valid
uint32 MTUFlag : 1; // Indicates whether the field MTU is valid
uint32 Reserved : 30;
char Name[ONVIF_NAME_LEN]; // optional, Network interface name, for example eth0
char HwAddress[32]; // required, Network interface MAC address
int MTU; // optional, Maximum transmission unit
} onvif_NetworkInterfaceInfo;
typedef struct
{
char Address[32]; // required
int PrefixLength; // required
BOOL DHCP; // required, Indicates whether or not DHCP is used
} onvif_IPv4Configuration;
typedef struct
{
BOOL Enabled; // required, Indicates whether or not IPv4 is enabled
onvif_IPv4Configuration Config; // required, IPv4 configuration
} onvif_IPv4NetworkInterface;
typedef struct
{
uint32 KeyFlag : 1; // Indicates whether the field Key is valid
uint32 PassphraseFlag : 1; // Indicates whether the field Passphrase is valid
uint32 Reserved : 30;
char Key[256]; // optional, hexBinary,
// According to IEEE802.11-2007 H.4.1 the RSNA PSK consists of 256 bits,
// or 64 octets when represented in hex
// Either Key or Passphrase shall be given,
// if both are supplied Key shall be used by the device and Passphrase ignored.
char Passphrase[128]; // optional,
// According to IEEE802.11-2007 H.4.1 a pass-phrase is
// a sequence of between 8 and 63 ASCII-encoded characters and
// each character in the pass-phrase must have an encoding in the range of 32 to 126 (decimal),inclusive.
// If only Passpharse is supplied the Key shall be derived using the algorithm described in
// IEEE802.11-2007 section H.4
} onvif_Dot11PSKSet;
typedef struct
{
uint32 AlgorithmFlag : 1; // Indicates whether the field Algorithm is valid
uint32 PSKFlag : 1; // Indicates whether the field PSK is valid
uint32 Dot1XFlag : 1; // // Indicates whether the field Dot1X is valid
uint32 Reserved : 29;
onvif_Dot11SecurityMode Mode; // required
onvif_Dot11Cipher Algorithm; // optional
onvif_Dot11PSKSet PSK; // optional
char Dot1X[ONVIF_TOKEN_LEN]; // optional
} onvif_Dot11SecurityConfiguration;
typedef struct
{
char SSID[32]; // required, hexBinary
onvif_Dot11StationMode Mode; // required
char Alias[32]; // required
int Priority; // required, range is 0-31
onvif_Dot11SecurityConfiguration Security; // required element of type ns2:Dot11SecurityConfiguration */
} onvif_Dot11Configuration;
typedef struct
{
int InterfaceType; // required, tt:IANA-IfTypes, Integer indicating interface type, for example: 6 is ethernet
// ieee80211(71)
// For valid numbers, please refer to http://www.iana.org/assignments/ianaiftype-mib
uint32 sizeDot11; // sequence of elements
onvif_Dot11Configuration Dot11[4]; // optional
} onvif_NetworkInterfaceExtension;
typedef struct
{
uint32 InfoFlag : 1; // Indicates whether the field Info is valid
uint32 IPv4Flag : 1; // Indicates whether the field IPv4 is valid
uint32 ExtensionFlag : 1; // Indicates whether the field Extension is valid
uint32 Reserved : 29;
char token[ONVIF_TOKEN_LEN]; // required
BOOL Enabled; // required, Indicates whether or not an interface is enabled
onvif_NetworkInterfaceInfo Info; // optional, Network interface information
onvif_IPv4NetworkInterface IPv4; // optional, IPv4 network interface configuration
onvif_NetworkInterfaceExtension Extension; // optional,
} onvif_NetworkInterface;
typedef struct
{
BOOL HTTPFlag; // Indicates if the http protocol required
BOOL HTTPEnabled; // Indicates if the http protocol is enabled or not
BOOL HTTPSFlag; // Indicates if the https protocol required
BOOL HTTPSEnabled; // Indicates if the https protocol is enabled or not
BOOL RTSPFlag; // Indicates if the rtsp protocol required
BOOL RTSPEnabled; // Indicates if the rtsp protocol is enabled or not
int HTTPPort[MAX_SERVER_PORT]; // The port that is used by the protocol
int HTTPSPort[MAX_SERVER_PORT]; // The port that is used by the protocol
int RTSPPort[MAX_SERVER_PORT]; // The port that is used by the protocol
} onvif_NetworkProtocol;
typedef struct
{
uint32 SearchDomainFlag : 1; // Indicates whether the field SearchDomain is valid
uint32 Reserved : 31;
BOOL FromDHCP; // required, Indicates whether or not DNS information is retrieved from DHCP
char SearchDomain[MAX_SEARCHDOMAIN][64]; // optional, Search domain
char DNSServer[MAX_DNS_SERVER][32]; // required
} onvif_DNSInformation;
typedef struct
{
uint32 NameFlag : 1; // Indicates whether the field Name is valid
uint32 TTLFlag : 1; // Indicates whether the field TTL is valid
uint32 Reserved : 30;
onvif_DynamicDNSType Type; // required, Dynamic DNS type
char Name[ONVIF_NAME_LEN]; // optional, DNS name
int TTL; // optional, DNS record time to live
} onvif_DynamicDNSInformation;
typedef struct
{
BOOL FromDHCP; // required, Indicates if NTP information is to be retrieved by using DHCP
char NTPServer[MAX_NTP_SERVER][32]; // required
} onvif_NTPInformation;
typedef struct
{
uint32 NameFlag : 1; // Indicates whether the field Name is valid
uint32 Reserved : 31;
BOOL FromDHCP; // required, Indicates whether the hostname is obtained from DHCP or not
BOOL RebootNeeded; // required, Indicates whether or not a reboot is required after configuration updates
char Name[ONVIF_NAME_LEN]; // optional, Indicates the hostname
} onvif_HostnameInformation;
typedef struct
{
char IPv4Address[MAX_GATEWAY][32]; // required, IPv4 address string
} onvif_NetworkGateway;
typedef struct
{
char InterfaceToken[ONVIF_TOKEN_LEN]; // required, Unique identifier of network interface
BOOL Enabled; // required, Indicates whether the zero-configuration is enabled or not
uint32 sizeAddresses; // sequence of elements
char Addresses[4][32]; // optional, The zero-configuration IPv4 address(es)
} onvif_NetworkZeroConfiguration;
typedef struct
{
char Uri[ONVIF_URI_LEN]; // required
BOOL InvalidAfterConnect; // required
BOOL InvalidAfterReboot; // required
int Timeout; // required, unit is second
} onvif_MediaUri;
typedef struct
{
uint32 BSSIDFlag : 1;
uint32 PairCipherFlag : 1;
uint32 GroupCipherFlag : 1;
uint32 SignalStrengthFlag : 1;
uint32 Reserved : 28;
char SSID[32]; // required, hexBinary
char BSSID[64]; // optional
onvif_Dot11Cipher PairCipher; // optional
onvif_Dot11Cipher GroupCipher; // optional
onvif_Dot11SignalStrength SignalStrength; // optional
char ActiveConfigAlias[32]; // required
} onvif_Dot11Status;
typedef struct
{
uint32 BSSIDFlag : 1;
uint32 SignalStrengthFlag : 1;
uint32 Reserved : 30;
char SSID[32]; // required, hexBinary
char BSSID[64]; // optional
uint32 sizeAuthAndMangementSuite; // sequence of elements
onvif_Dot11AuthAndMangementSuite AuthAndMangementSuite[4]; // optional
uint32 sizePairCipher; // sequence of elements
onvif_Dot11Cipher PairCipher[4]; // optional
uint32 sizeGroupCipher; // sequence of elements
onvif_Dot11Cipher GroupCipher[4]; // optional
onvif_Dot11SignalStrength SignalStrength; // optional
} onvif_Dot11AvailableNetworks;
typedef struct _Dot11AvailableNetworksList
{
struct _Dot11AvailableNetworksList * next;
onvif_Dot11AvailableNetworks Networks;
} Dot11AvailableNetworksList;
typedef struct
{
char TZ[128]; // required, Posix timezone string
} onvif_TimeZone;
typedef struct
{
int Hour; // Range is 0 to 23
int Minute; // Range is 0 to 59
int Second; // Range is 0 to 61 (typically 59)
} onvif_Time;
typedef struct
{
int Year; //
int Month; // Range is 1 to 12
int Day; // Range is 1 to 31
} onvif_Date;
typedef struct
{
onvif_Time Time; // required
onvif_Date Date; // required
} onvif_DateTime;
typedef struct
{
uint32 TimeZoneFlag : 1; // Indicates whether the field TimeZone is valid
uint32 Reserved : 31;
BOOL DaylightSavings; // required, Informative indicator whether daylight savings is currently on/off
onvif_SetDateTimeType DateTimeType; // required, Indicates if the time is set manully or through NTP
onvif_TimeZone TimeZone; // optional, Timezone information in Posix format
} onvif_SystemDateTime;
typedef struct
{
onvif_ScopeDefinition ScopeDef; // required
char ScopeItem[128]; // required
} onvif_Scope;
typedef struct
{
uint32 lonFlag : 1; // Indicates whether the field lon is valid
uint32 latFlag : 1; // Indicates whether the field lat is valid
uint32 elevationFlag : 1; // Indicates whether the field elevation is valid
uint32 Reserved : 29;
double lon; // optional, East west location as angle
double lat; // optional, North south location as angle
float elevation; // optional, Hight in meters above sea level
} onvif_GeoLocation;
typedef struct
{
uint32 rollFlag : 1; // Indicates whether the field roll is valid
uint32 pitchFlag : 1; // Indicates whether the field pitch is valid
uint32 yawFlag : 1; // Indicates whether the field yaw is valid
uint32 Reserved : 29;
float roll; // optional, Rotation around the x axis
float pitch; // optional, Rotation around the y axis
float yaw; // optional, Rotation around the z axis
} onvif_GeoOrientation;
typedef struct
{
uint32 xFlag : 1; // Indicates whether the field x is valid
uint32 yFlag : 1; // Indicates whether the field y is valid
uint32 zFlag : 1; // Indicates whether the field z is valid
uint32 Reserved : 29;
float x; // optional, East west location as angle
float y; // optional, North south location as angle
float z; // optional, Offset in meters from the sea level
} onvif_LocalLocation;
typedef struct
{
uint32 panFlag : 1; // Indicates whether the field pan is valid
uint32 tiltFlag : 1; // Indicates whether the field tilt is valid
uint32 rollFlag : 1; // Indicates whether the field roll is valid
uint32 Reserved : 29;
float pan; // optional, Rotation around the y axis
float tilt; // optional, Rotation around the z axis
float roll; // optional, Rotation around the x axis
} onvif_LocalOrientation;
typedef struct
{
uint32 GeoLocationFlag : 1; // Indicates whether the field GeoLocation is valid
uint32 GeoOrientationFlag : 1; // Indicates whether the field GeoOrientation is valid
uint32 LocalLocationFlag : 1; // Indicates whether the field LocalLocation is valid
uint32 LocalOrientationFlag : 1; // Indicates whether the field LocalOrientation is valid
uint32 EntityFlag : 1; // Indicates whether the field Entity is valid
uint32 TokenFlag : 1; // Indicates whether the field Token is valid
uint32 FixedFlag : 1; // Indicates whether the field Fixed is valid
uint32 GeoSourceFlag : 1; // Indicates whether the field GeoSource is valid
uint32 AutoGeoFlag : 1; // Indicates whether the field AutoGeo is valid
uint32 Reserved : 23;
onvif_GeoLocation GeoLocation; // optional, Location on earth
onvif_GeoOrientation GeoOrientation; // optional, Orientation relative to earth
onvif_LocalLocation LocalLocation; // optional, Indoor location offset
onvif_LocalOrientation LocalOrientation; // optional, Indoor orientation offset
char Entity[200]; // optional, Entity type the entry refers to as defined in tds:Entity
char Token[ONVIF_TOKEN_LEN]; // optional, Optional entity token
BOOL Fixed; // optional, If this value is true the entity cannot be deleted
char GeoSource[256]; // optional, Optional reference to the XAddr of another devices DeviceManagement service
BOOL AutoGeo; // optional, If set the geo location is obtained internally
} onvif_LocationEntity;
typedef struct _LocationEntityList
{
struct _LocationEntityList * next;
onvif_LocationEntity Location;
} LocationEntityList;
typedef struct
{
char * ptr; // required, need call free to free the buffer
int size; // required, the ptr buffer length
} onvif_base64Binary;
typedef struct
{
uint32 contentTypeFlag : 1; // Indicates whether the field contentType is valid
uint32 Reserved : 31;
onvif_base64Binary Data; // required, base64 encoded binary data
char contentType[100]; // optional
} onvif_BinaryData;
typedef struct
{
uint32 PasswordFlag : 1; // Indicates whether the field Password is valid
uint32 Reserved : 31;
char UserName[64]; // required, User name
char Password[64]; // optional, optional password
} onvif_UserCredential;
typedef struct
{
uint32 LocalPathFlag : 1; // Indicates whether the field LocalPath is valid
uint32 StorageUriFlag : 1; // Indicates whether the field StorageUri is valid
uint32 UserFlag : 1; // Indicates whether the field User is valid
uint32 RegionFlag : 1; // Indicates whether the field Region is valid
uint32 Reserved : 28;
char LocalPath[256]; // optional, local path
char StorageUri[256]; // optional, Storage server address
onvif_UserCredential User; // optional, User credential for the storage server
char type[100]; // required, StorageType lists the acceptable values for type attribute
// NFS, CIFS, CDMI, FTP, ObjectStorageS3, ObjectStorageAzure
char Region[100]; // optinal, Optional region of the storage server
} onvif_StorageConfigurationData;
typedef struct
{
char token[ONVIF_TOKEN_LEN]; // required
onvif_StorageConfigurationData Data; // required
} onvif_StorageConfiguration;
typedef struct _StorageConfigurationList
{
struct _StorageConfigurationList *next;
onvif_StorageConfiguration Configuration;
} StorageConfigurationList;
typedef struct
{
onvif_TransportProtocol Protocol; // required, Defines the network protocol for streaming, either UDP=RTP/UDP, RTSP=RTP/RTSP/TCP or HTTP=RTP/RTSP/HTTP/TCP
} onvif_Transport;
typedef struct
{
onvif_StreamType Stream; // required, Defines if a multicast or unicast stream is requested
onvif_Transport Transport; // required
} onvif_StreamSetup;
typedef struct
{
int SessionTimeout; // required, The RTSP session timeout, unit is second
} onvif_ReplayConfiguration;
typedef struct
{
char SourceId[128]; // required, Identifier for the source chosen by the client that creates the structure.
// This identifier is opaque to the device. Clients may use any type of URI for this field. A device shall support at least 128 characters
char Name[ONVIF_NAME_LEN]; // required, Informative user readable name of the source, e.g. "Camera23". A device shall support at least 20 characters
char Location[100]; // required, Informative description of the physical location of the source, e.g. the coordinates on a map
char Description[128]; // required, Informative description of the source
char Address[128]; // required, URI provided by the service supplying data to be recorded. A device shall support at least 128 characters
} onvif_RecordingSourceInformation;
typedef struct
{
uint32 KeyFlag : 1; // Indicates whether the field Key is valid
uint32 Reserved : 31;
char KID[64]; // required, Key ID of the associated key for encryption
char Key[1024]; // optional element of type xsd:hexBinary, Key for encrypting content.The device shall not include this parameter when reading
uint32 sizeTrack; // sequence of elements