Detailed Description
The PTZStream is used to send movement commands to a PTZ camera.
This interface extends the Stream interface and includes all methods and properties from that interface.
The StreamType returned by the Type property of Stream is always PTZStream.
Availability
Available in version 6.0 of Decoder SDK. Requires a server version greater than 6.0
#include <PTZStream.h>
Public Member Functions | |
| DB_EDGEVIS_SDK bool | SetAddress (int32_t address) |
| Set the input that PTZ actions should occur on without changing the input being viewed. More... | |
| DB_EDGEVIS_SDK PTZSteeringSpeed | GetSpeed () |
| Get the current steering speed that will be used when the next Pan or Tilt command is sent. More... | |
| DB_EDGEVIS_SDK void | SetSpeed (PTZSteeringSpeed speed) |
| Set the steering speed that will be used when the next Pan or Tilt command is sent. More... | |
| DB_EDGEVIS_SDK OpResult | PanLeft () |
| Move the camera by panning to the left. More... | |
| DB_EDGEVIS_SDK OpResult | PanRight () |
| Move the camera by panning to the right. More... | |
| DB_EDGEVIS_SDK OpResult | TiltUp () |
| Move the camera by tilting up. More... | |
| DB_EDGEVIS_SDK OpResult | TiltDown () |
| Move the camera by tilting down. More... | |
| DB_EDGEVIS_SDK OpResult | ZoomTele () |
| Zoom the camera towards the distance, also referred to as zoom in. More... | |
| DB_EDGEVIS_SDK OpResult | ZoomWide () |
| Zoom the camera towards the wide position, also referred to as zoom out. More... | |
| DB_EDGEVIS_SDK OpResult | Stop () |
| Stop any current panning, tilting or zooming operations. More... | |
| DB_EDGEVIS_SDK OpResult | FocusNear () |
| Instruct the camera to change the focus to be closer to the camera. More... | |
| DB_EDGEVIS_SDK OpResult | FocusFar () |
| Instruct the camera to change the focus to be futher away from the camera. More... | |
| DB_EDGEVIS_SDK OpResult | FocusAuto () |
| Toggles the auto focus on the camera on or off. More... | |
| DB_EDGEVIS_SDK OpResult | IrisOpen () |
| Instruct the camera to open its iris to increase the amount of light received in the image. More... | |
| DB_EDGEVIS_SDK OpResult | IrisClose () |
| Instruct the camera to close its iris to reduce the amount of light received in the image. More... | |
| DB_EDGEVIS_SDK OpResult | IrisAuto () |
| Toggles the auto iris control on the camera on or off. More... | |
| DB_EDGEVIS_SDK OpResult | ToggleBacklight () |
| Toggles the camera's backlight on or off. More... | |
| DB_EDGEVIS_SDK OpResult | ToggleAux (int32_t auxCmd, bool on) |
| Toggles an AUX command on or off on the camera. More... | |
| DB_EDGEVIS_SDK OpResult | ToggleAux (int32_t auxCmd) |
| Toggles an AUX command on or off on the camera. More... | |
| DB_EDGEVIS_SDK bool | GetAuxState (int32_t auxCmd) |
| Get the state of the specified Aux command. More... | |
| DB_EDGEVIS_SDK bool | IsVPTZMode () const |
| Get the current setting for Virtual PTZ Mode. More... | |
| DB_EDGEVIS_SDK void | SetVPTZMode (bool on) |
| Set the current setting for Virtual PTZ Mode. More... | |
| DB_EDGEVIS_SDK OpResult | VPTZReset () |
| Resets the Virtual PTZ back to the full visible frame. More... | |
| DB_EDGEVIS_SDK bool | SupportsVPTZ () |
| Determines if the PTZ Stream on the Encoder supports Virtual PTZ. More... | |
| DB_EDGEVIS_SDK int32_t | MaxPTZPresets () const |
| Gets the maximum number of PTZ presets that the current camera supports. More... | |
| DB_EDGEVIS_SDK std::vector< PTZPresetInfo > | PTZPresets () const |
| Gets a list of PTZ presets for the current camera. More... | |
| DB_EDGEVIS_SDK OpResult | GoToPreset (int32_t preset) |
| Instruct the camera to move to a predefined preset position that is stored on the camera. More... | |
| DB_EDGEVIS_SDK OpResult | SetPreset (const PTZPresetInfo &p, int32_t inputId=-1) |
| Sets a PTZ Preset. More... | |
| DB_EDGEVIS_SDK std::vector< PTZCustomCommand > | CustomCommands () const |
| Retrieve a list of the available PTZ Custom Commands for the current camera. More... | |
| DB_EDGEVIS_SDK OpResult | CustomCommand (int32_t command) |
| Sends a custom command to the camera. More... | |
| DB_EDGEVIS_SDK OpResult | ProcessCustomCommand (PTZCustomCommand customCommand, bool auxState) |
| Convenience method for processing custom PTZ commands including focus, iris, backlight and protocol specific custom commands and aux commands. More... | |
| DB_EDGEVIS_SDK std::vector< PTZTourInfo > | GetPTZTours () |
| Gets the PTZ tours configured for all camera inputs on the encoder. More... | |
| DB_EDGEVIS_SDK PTZTourInfo | GetPTZTour (int32_t input_id) |
| Gets the PTZ tour configured for requested input only. More... | |
| DB_EDGEVIS_SDK OpResult | SetPTZTour (PTZTourInfo tour) |
| Applies the provided tour settings to the encoder. More... | |
| DB_EDGEVIS_SDK bool | SupportsMove () |
| Determine if this encoder is capable of supporting the PTZ Move command. More... | |
| DB_EDGEVIS_SDK OpResult | Move (int8_t horizontal, int8_t vertical, int8_t zoom) |
| Issue a V2 PTZ command to the camera to move. More... | |
| virtual DB_EDGEVIS_SDK bool | IsConnected () const |
| Is the PTZStream currently connected ? More... | |
Public Member Functions inherited from EdgeVisDecoderSDK::Stream | |
| DB_EDGEVIS_SDK StreamType | Type () const |
| Gets the stream type. More... | |
| DB_EDGEVIS_SDK std::wstring | Name () const |
| Gets the stream's name. More... | |
| virtual DB_EDGEVIS_SDK OpResult | SetTransport (TransportType trans) |
| This is underlying transport type. More... | |
| virtual DB_EDGEVIS_SDK TransportType | GetTransport () |
| Gets the stream's transport. More... | |
| DB_EDGEVIS_SDK Encoder | GetEncoder () const |
| Gets the Encoder object that the Stream is on. More... | |
| DB_EDGEVIS_SDK OpResult | Open () |
| Opens the stream. More... | |
| DB_EDGEVIS_SDK void | Close () |
| Closes this stream. More... | |
| DB_EDGEVIS_SDK void | RegisterListener (IStreamListener *listener) |
| Registers the specified listener to be notified when stream data is received. More... | |
| DB_EDGEVIS_SDK void | UnregisterListener (IStreamListener *listener) |
| Removes the specified listener from the set of listeners to be notified about incoming stream data. More... | |
| DB_EDGEVIS_SDK int64_t | GetTotalBytesSent () |
| Returns the current total number of bytes sent on this stream. More... | |
| DB_EDGEVIS_SDK int64_t | GetTotalBytesReceived () |
| Returns the current total number of bytes received on this stream. More... | |
| DB_EDGEVIS_SDK void | ResetDataUsageStats () |
| Resets the count of the total number of bytes sent and received for this stream. | |
| DB_EDGEVIS_SDK int64_t | GetStreamUseDuration () const |
| Get the duration in milliseconds that the stream has been open. More... | |
| DB_EDGEVIS_SDK int64_t | GetLastStreamUseDuration () const |
| Get the duration in milliseconds that the stream was open on last use. More... | |
| DB_EDGEVIS_SDK void | SetEnableAnalyticsSync (bool enable) |
| Enables or disables synchronization of analytics metadata with audio and video Enabled by default, to disable set to false. More... | |
| DB_EDGEVIS_SDK bool | GetEnableAnalyticsSync () const |
| Returns true if Analytics Sync is enabled. More... | |
Member Function Documentation
| DB_EDGEVIS_SDK bool EdgeVisDecoderSDK::PTZStream::SetAddress | ( | int32_t | address | ) |
Set the input that PTZ actions should occur on without changing the input being viewed.
- Parameters
-
address The 0 based index of the input to use for PTZ. The maximum address if 0xFF. Set this to -1 to use the current viewing camera input.
- Returns
- true if the address was changed, false if not.
| DB_EDGEVIS_SDK PTZSteeringSpeed EdgeVisDecoderSDK::PTZStream::GetSpeed | ( | ) |
Get the current steering speed that will be used when the next Pan or Tilt command is sent.
- Returns
- The current steering speed.
| DB_EDGEVIS_SDK void EdgeVisDecoderSDK::PTZStream::SetSpeed | ( | PTZSteeringSpeed | speed | ) |
Set the steering speed that will be used when the next Pan or Tilt command is sent.
param speed The new steering speed.
| DB_EDGEVIS_SDK OpResult EdgeVisDecoderSDK::PTZStream::PanLeft | ( | ) |
Move the camera by panning to the left.
The pan operation will use the currently set PTZSteeringSpeed. The camera will continue moving until it receives a 'Stop' message.
- Returns
- OpResult - OR_Success
- OR_NotConnected
| DB_EDGEVIS_SDK OpResult EdgeVisDecoderSDK::PTZStream::PanRight | ( | ) |
Move the camera by panning to the right.
The pan operation will use the currently set PTZSteeringSpeed. The camera will continue moving until it receives a 'Stop' message.
- Returns
- OpResult - OR_Success
- OR_NotConnected
| DB_EDGEVIS_SDK OpResult EdgeVisDecoderSDK::PTZStream::TiltUp | ( | ) |
Move the camera by tilting up.
The tilt operation will use the currently set PTZSteeringSpeed. The camera will continue moving until it receives a 'Stop' message.
- Returns
- OpResult
- OR_Success
- OR_NotConnected
| DB_EDGEVIS_SDK OpResult EdgeVisDecoderSDK::PTZStream::TiltDown | ( | ) |
Move the camera by tilting down.
The tilt operation will use the currently set PTZSteeringSpeed. The camera will continue moving until it receives a 'Stop' message.
- Returns
- OpResult
- OR_Success
- OR_NotConnected
| DB_EDGEVIS_SDK OpResult EdgeVisDecoderSDK::PTZStream::ZoomTele | ( | ) |
Zoom the camera towards the distance, also referred to as zoom in.
The camera will continue zooming until it receives a 'Stop' message.
- Returns
- OpResult
- OR_Success
- OR_NotConnected
| DB_EDGEVIS_SDK OpResult EdgeVisDecoderSDK::PTZStream::ZoomWide | ( | ) |
Zoom the camera towards the wide position, also referred to as zoom out.
The camera will continue zooming until it receives a 'Stop' message.
- Returns
- OpResult
- OR_Success
- OR_NotConnected
| DB_EDGEVIS_SDK OpResult EdgeVisDecoderSDK::PTZStream::Stop | ( | ) |
Stop any current panning, tilting or zooming operations.
Must be called after a call to any of the movement commands; pan, tilt or zoom.
- Returns
- OpResult
- OR_Success
- OR_NotConnected
| DB_EDGEVIS_SDK OpResult EdgeVisDecoderSDK::PTZStream::FocusNear | ( | ) |
Instruct the camera to change the focus to be closer to the camera.
The camera will continue to focus closer until it receives a 'Stop' message. Auto focus may need to be toggled off before manual focus will work.
- Returns
- OpResult
- OR_Success
- OR_NotConnected
| DB_EDGEVIS_SDK OpResult EdgeVisDecoderSDK::PTZStream::FocusFar | ( | ) |
Instruct the camera to change the focus to be futher away from the camera.
The camera will continue to focus further away until it receives a 'Stop' message. Auto focus may need to be toggled off before manual focus will work.
- Returns
- OpResult
- OR_Success
- OR_NotConnected
| DB_EDGEVIS_SDK OpResult EdgeVisDecoderSDK::PTZStream::FocusAuto | ( | ) |
Toggles the auto focus on the camera on or off.
When auto focus is on the camera will automatically adjust to the best focus for the current image.
- Returns
- OpResult
- OR_Success
- OR_NotConnected
| DB_EDGEVIS_SDK OpResult EdgeVisDecoderSDK::PTZStream::IrisOpen | ( | ) |
Instruct the camera to open its iris to increase the amount of light received in the image.
The camera will continue to open its iris until it receives a 'Stop' message. Auto Iris may need to be toggled off before manual iris control will work.
- Returns
- OpResult
- OR_Success
- OR_NotConnected
| DB_EDGEVIS_SDK OpResult EdgeVisDecoderSDK::PTZStream::IrisClose | ( | ) |
Instruct the camera to close its iris to reduce the amount of light received in the image.
The camera will continue to close its iris until it receives a 'Stop' message. Auto Iris may need to be toggled off before manual iris control will work.
- Returns
- OpResult
- OR_Success
- OR_NotConnected
| DB_EDGEVIS_SDK OpResult EdgeVisDecoderSDK::PTZStream::IrisAuto | ( | ) |
Toggles the auto iris control on the camera on or off.
When auto iris control is on the camera will automatically adjust the iris to control the amount of light in the image.
- Returns
- OpResult
- OR_Success
- OR_NotConnected
| DB_EDGEVIS_SDK OpResult EdgeVisDecoderSDK::PTZStream::ToggleBacklight | ( | ) |
Toggles the camera's backlight on or off.
The image will be noticeable brighter when the backlight is on.
- Returns
- OpResult
- OR_Success
- OR_NotConnected
| DB_EDGEVIS_SDK OpResult EdgeVisDecoderSDK::PTZStream::ToggleAux | ( | int32_t | auxCmd, |
| bool | on | ||
| ) |
Toggles an AUX command on or off on the camera.
Check the camera's PTZ protocol to see what, if any, AUX commands it supports.
- Parameters
-
auxCmd The AUX command to be sent to the camera (in the range 0 to 255). on True if the command is being toggled on, false if it is being toggled off.
- Returns
- OpResult
- OR_Success
- OR_NotConnected
| DB_EDGEVIS_SDK OpResult EdgeVisDecoderSDK::PTZStream::ToggleAux | ( | int32_t | auxCmd | ) |
Toggles an AUX command on or off on the camera.
Check the camera's PTZ protocol to see what, if any, AUX commands it supports.
- Parameters
-
auxCmd The AUX command to be sent to the camera (in the range 0 to 255).
- Returns
- OpResult
- OR_Success
- OR_NotConnected
| DB_EDGEVIS_SDK bool EdgeVisDecoderSDK::PTZStream::GetAuxState | ( | int32_t | auxCmd | ) |
Get the state of the specified Aux command.
- Parameters
-
auxCmd The AUX state to get from the camera (in the range 0 to 255).
- Returns
- OpResult
- True if the aux state is On, false otherwise.
| DB_EDGEVIS_SDK bool EdgeVisDecoderSDK::PTZStream::IsVPTZMode | ( | ) | const |
Get the current setting for Virtual PTZ Mode.
- Returns
- True if VPTZ is the current mode, false otherwise.
| DB_EDGEVIS_SDK void EdgeVisDecoderSDK::PTZStream::SetVPTZMode | ( | bool | on | ) |
Set the current setting for Virtual PTZ Mode.
- Returns
- Set true to enable VPTZ mode, false for physical PTZ.
| DB_EDGEVIS_SDK OpResult EdgeVisDecoderSDK::PTZStream::VPTZReset | ( | ) |
Resets the Virtual PTZ back to the full visible frame.
- Returns
- OpResult
- OR_Success
- OR_NotConnected
| DB_EDGEVIS_SDK bool EdgeVisDecoderSDK::PTZStream::SupportsVPTZ | ( | ) |
| DB_EDGEVIS_SDK int32_t EdgeVisDecoderSDK::PTZStream::MaxPTZPresets | ( | ) | const |
Gets the maximum number of PTZ presets that the current camera supports.
If the camera is not a PTZ camera then this will return 0.
- Returns
- The maximum number of PTZ presets that the current camera supports. 0 if the current camera is not a PTZ camera.
| DB_EDGEVIS_SDK std::vector< PTZPresetInfo > EdgeVisDecoderSDK::PTZStream::PTZPresets | ( | ) | const |
Gets a list of PTZ presets for the current camera.
- Returns
- List of PTZ presets for the current camera. If the current camera is not a PTZ camera then this list will be empty.
| DB_EDGEVIS_SDK OpResult EdgeVisDecoderSDK::PTZStream::GoToPreset | ( | int32_t | preset | ) |
Instruct the camera to move to a predefined preset position that is stored on the camera.
The camera will automatically steer and zoom to that position.
- Parameters
-
preset Preset number from 1 to 255. If a preset has not been set on for this number or if the camera has fewer than 255 available presets then this command will have no effect.
- Returns
- OpResult
- OR_Success
- OR_NotConnected
| DB_EDGEVIS_SDK OpResult EdgeVisDecoderSDK::PTZStream::SetPreset | ( | const PTZPresetInfo & | p, |
| int32_t | inputId = -1 |
||
| ) |
Sets a PTZ Preset.
This will set the PTZ preset's name and the PTZ camera will store the current position.
- Parameters
-
p PTZPresetInfo containing the new preset metadata. inputId The ID of the camera input that the preset is on. -1 to use the current camera input.
- Returns
- OpResult
- OR_Success
- OR_NotConnected
| DB_EDGEVIS_SDK std::vector< PTZCustomCommand > EdgeVisDecoderSDK::PTZStream::CustomCommands | ( | ) | const |
Retrieve a list of the available PTZ Custom Commands for the current camera.
The available commands are dependent on the PTZ protocol in use.
| DB_EDGEVIS_SDK OpResult EdgeVisDecoderSDK::PTZStream::CustomCommand | ( | int32_t | command | ) |
Sends a custom command to the camera.
Check the camera's PTZ protocol to see what, if any, custom commands it supports.
- Parameters
-
command The custom command to be sent to the camera (in the range 0 to 255).
- Returns
- OpResult
- OR_Success
- OR_NotConnected
| DB_EDGEVIS_SDK OpResult EdgeVisDecoderSDK::PTZStream::ProcessCustomCommand | ( | PTZCustomCommand | customCommand, |
| bool | auxState | ||
| ) |
Convenience method for processing custom PTZ commands including focus, iris, backlight and protocol specific custom commands and aux commands.
- Parameters
-
customCommand The custom command to be sent to the camera. The supplied struct specifies the command code and the command type. auxState Only used in the case of PTZCommandType::AUX commands. True if the command is being toggled on, false if it is being toggled off.
- Returns
- OpResult
- OR_Failed
- OR_Success
- OR_NotConnected
| DB_EDGEVIS_SDK std::vector<PTZTourInfo> EdgeVisDecoderSDK::PTZStream::GetPTZTours | ( | ) |
Gets the PTZ tours configured for all camera inputs on the encoder.
- Returns
- A list of PTZTourInfo for all of the camera inputs.
| DB_EDGEVIS_SDK PTZTourInfo EdgeVisDecoderSDK::PTZStream::GetPTZTour | ( | int32_t | input_id | ) |
Gets the PTZ tour configured for requested input only.
- Parameters
-
input_id The camera input to retrieve the tour settings for.
- Returns
- PTZTourInfo for the requested camera input. If the requested input is not valid then an empty PTZTourConfig object will be returned with the input ID set to that which was requested.
| DB_EDGEVIS_SDK OpResult EdgeVisDecoderSDK::PTZStream::SetPTZTour | ( | PTZTourInfo | tour | ) |
Applies the provided tour settings to the encoder.
This will overwrite any existing tour settings for the given camera input.
- Parameters
-
tour The tour configuration to apply to the encoder, including the input the tour applies to.
- Returns
- OpResult
- OR_Success
- OR_InvalidCameraInput
- OR_InvalidParams
| DB_EDGEVIS_SDK bool EdgeVisDecoderSDK::PTZStream::SupportsMove | ( | ) |
Determine if this encoder is capable of supporting the PTZ Move command.
The Move command is capable of simultaneous pan, tilt and zoom. Support for this feature is camera dependent. If VPTZ mode is enabled this will determine if VPTZ supports the Move command.
- Returns
- True if this encoder and the current camera supports the PTZ Move command, false otherwise.
| DB_EDGEVIS_SDK OpResult EdgeVisDecoderSDK::PTZStream::Move | ( | int8_t | horizontal, |
| int8_t | vertical, | ||
| int8_t | zoom | ||
| ) |
Issue a V2 PTZ command to the camera to move.
This allows for simultaneous pan, tilt and zoom operation on supporting units with a supported camera. The camera will continue to move until it receives a 'Stop' message.
- Parameters
-
horizontal The horizontal component of the move command. Negative numbers are interpreted as move left, positive numbers are interpreted as move right. Larger magnitude indicates faster movement. vertical The vertical component of the move command. Negative numbers are interpreted as move down, positive numbers are interpreted as move up. Larger magnitude indicates faster movement. zoom The zoom component of the move command. Negative numbers are interpreted as zoom out, positive numbers are interpreted as zoom in. Larger magnitude indicates faster zoom.
- Returns
- OpResult
- OR_Success
- OR_NotConnected
- OR_NotSupported
- OR_PermissionDenied
|
virtual |
Is the PTZStream currently connected ?
- Returns
- true if connected, false if not
Reimplemented from EdgeVisDecoderSDK::Stream.
The documentation for this class was generated from the following file:
- SDKs/EdgeVisDecoderSDK/PTZStream.h

Public Member Functions inherited from