Detailed Description
The Encoder object is the main component of the EdgeVis Encoder SDK.
The Encoder is the starting point of the SDK and normally the first object created. To connect to a server, the encoder requires a base configuration to connect. These include:
- Server name
- Encoder name and password
Config files
All the encoder settings are stored in a local config file. Once set, the Server and Encoder details are saved and used when the encoder is next started.
Interface
Encoder state changes will be received via the IEncoderListener Changes to configurations will be received via the IRemoteConfigListener
Examples
Availability
Available in version 6.5 of Encoder SDK. Requires a server version greater than 6.5
#include <Encoder.h>
Public Member Functions | |
| DB_EDGEVIS_SDK | Encoder (const std::wstring &config_path, const std::wstring &product_name) |
| Constructor for the Encoder object. More... | |
Encoder starting and server connection | |
Methods to start and stop the Encoder connection, checking the encoder connection status to the Server, version numbers and any error states. | |
| DB_EDGEVIS_SDK void | Start () |
| Starts the encoder This will start the encoder and connect to the EdgeVis server. More... | |
| DB_EDGEVIS_SDK bool | IsStarted () const |
| DB_EDGEVIS_SDK void | Stop () |
| Stops the encoder and disconnects it from the Server. | |
| DB_EDGEVIS_SDK void | SetSerialNumber (const std::wstring &serialNumber) |
| Application defined serial number. | |
| DB_EDGEVIS_SDK ServerLinkState | GetServerState () |
| Returns the current status of the server. More... | |
| DB_EDGEVIS_SDK ServerLinkError | GetServerError () |
| Returns the current error status of the server. More... | |
| DB_EDGEVIS_SDK MediaStreamState | GetStreamState () |
| Returns the current streaming status of the encoder. More... | |
| DB_EDGEVIS_SDK std::wstring | ClientVersion () |
| Returns the version of this SDK. More... | |
Encoder settings | |
These are settings applied to Encoder. Settings are set immediately and persisted within the local config. On startup the last known settings will be used. | |
| DB_EDGEVIS_SDK std::wstring | GetAddress () const |
| Get the configured server address. More... | |
| DB_EDGEVIS_SDK void | SetAddress (const std::wstring &address) |
| Sets the address of the initial server to connect to. More... | |
| DB_EDGEVIS_SDK std::wstring | GetEncoderName () const |
| Returns the current configured encoder name. More... | |
| DB_EDGEVIS_SDK std::wstring | GetPassword () const |
| Returns the current configured encoder password. More... | |
| DB_EDGEVIS_SDK void | SetCredentials (const std::wstring &name, const std::wstring &password) |
| Sets the Encoder name and Password to connect to the server as. More... | |
| DB_EDGEVIS_SDK std::wstring | GetServerName () const |
| Returns the name of the server the encoder is connected to. More... | |
| DB_EDGEVIS_SDK std::wstring | GetServerVersion () const |
| Returns the version of the server the encoder is connected to. More... | |
| DB_EDGEVIS_SDK EdgeVisSDKCore::AspectRatio | GetEncodeAspectRatio () |
| Returns the aspect ratio set on the Encoder. More... | |
| DB_EDGEVIS_SDK void | SetEncodeAspectRatio (EdgeVisSDKCore::AspectRatio aspectRatio) |
| Set the aspect ratio of the video frame being encoded. More... | |
| DB_EDGEVIS_SDK std::vector< CameraProfile > | GetCameraProfiles () const |
| Get the camera profiles. More... | |
| DB_EDGEVIS_SDK void | SetCameraProfiles (std::vector< CameraProfile > cameras) |
| Set the camera profiles. More... | |
| DB_EDGEVIS_SDK int8_t | GetVideoInput () const |
| The current video input the encoder is set to. More... | |
| DB_EDGEVIS_SDK void | SetVideoInput (int8_t input) |
| Sets the current video input. More... | |
| DB_EDGEVIS_SDK bool | GetAudioEnabled () |
| Returns the global audio enabled setting. More... | |
| DB_EDGEVIS_SDK void | SetAudioEnabled (bool enable) |
| Sets the global audio enabled setting. More... | |
| DB_EDGEVIS_SDK bool | GetAudioOnlyEnabled () |
| Returns the audio only enabled setting. More... | |
| DB_EDGEVIS_SDK void | SetAudioOnlyEnabled (bool enable) |
| Sets the audio only enabled setting. More... | |
| DB_EDGEVIS_SDK bool | GetGPSEnabled () |
| Returns the GPS enabled setting. More... | |
| DB_EDGEVIS_SDK void | SetGPSEnabled (bool enable) |
| Sets the GPS enabled setting. More... | |
| DB_EDGEVIS_SDK AreaOfInterestConfig | GetAreaOfInterestConfig (const int32_t input) const |
| Returns the area of interest configuration. More... | |
| DB_EDGEVIS_SDK bool | SetAreaOfInterestConfig (const AreaOfInterestConfig &aoi) |
| Sets the area of interest configuration. More... | |
| DB_EDGEVIS_SDK std::wstring | GetTimezone () |
| Returns the timezone set on the encoder. More... | |
| DB_EDGEVIS_SDK void | SetTimezone (std::wstring timezone) |
| Sets the timezone of the encoder. More... | |
| DB_EDGEVIS_SDK std::wstring | GetOperatorInfo () |
| Returns the operator info set on the encoder. More... | |
| DB_EDGEVIS_SDK void | SetOperatorInfo (const std::wstring &op) |
| Sets the operator of the encoder. More... | |
| DB_EDGEVIS_SDK void | ReportBatteryCharge (int32_t percent) |
| Report the battery level of the encoder to the server. More... | |
| DB_EDGEVIS_SDK void | ReportCPUTemperature (double temp) |
| Report the CPU temperature of the encoder to the server. More... | |
| DB_EDGEVIS_SDK void | ReportCPUUsage (int32_t percent) |
| Report the CPU usage of the encoder to the server. More... | |
| DB_EDGEVIS_SDK EncoderCapabilities | QueryEncoderCapabilities () const |
| Return the EncoderCapabilites object which defines the capabilities of this encoder. More... | |
Encoder Listeners | |
Register and unregistered for Encoder callbacks | |
| DB_EDGEVIS_SDK void | RegisterListener (IEncoderListener *listener) |
| Register for the IEncoderListener. More... | |
| DB_EDGEVIS_SDK void | UnregisterListener (IEncoderListener *listener) |
| Unregistered for the IEncoderListener. More... | |
| DB_EDGEVIS_SDK void | RegisterArchivePlaybackListener (IArchivePlaybackListener *listener) |
| Register for the IArchivePlaybackListener. More... | |
| DB_EDGEVIS_SDK void | UnregisterArchivePlaybackListener (IArchivePlaybackListener *listener) |
| Unregistered for the IArchivePlaybackListener. More... | |
| DB_EDGEVIS_SDK void | RegisterRemoteConfigListener (IRemoteConfigListener *listener) |
| Register for the IRemoteConfigListener. More... | |
| DB_EDGEVIS_SDK void | UnregisterRemoteConfigListener (IRemoteConfigListener *listener) |
| Unregistered for the IRemoteConfigListener. More... | |
Encoder data to stream | |
Methods to send Video, Audio and location data to the encoder. This data is encoded to TVI and sent to the Server. This data is not recorded to the archive, see the Archive section for more information. | |
| DB_EDGEVIS_SDK void | EncodeYCbCrFrame (YCbCrFrame frame) |
| A video frame to send to the encoder. More... | |
| DB_EDGEVIS_SDK void | EncodePCMAudio (PCMAudio audio) |
| Audio sample to send to the encoder. More... | |
| DB_EDGEVIS_SDK void | SetLocation (double lat, double lon, double accuracy, double altitude) |
| Sets the latitude and longitude location of the encoder. More... | |
Encoder Archive | |
The Encoder can record video and audio data into the proprietary CSX format. These files can then be downloaded and played back using the EdgeVis client software. A location for the archive must be set and a quota can be set for the total size of the archive. | |
| DB_EDGEVIS_SDK bool | GetArchiveRecordingEnabled () |
| Returns the current archive enabled setting in the configuration. More... | |
| DB_EDGEVIS_SDK void | SetArchiveRecordingEnabled (bool enable) |
| Sets the archive recording as enabled. More... | |
| DB_EDGEVIS_SDK std::wstring | GetArchiveRecordingPath () |
| Returns the path of the archive recordings. More... | |
| DB_EDGEVIS_SDK void | SetArchiveRecordingPath (const std::wstring &path) |
| Sets the path of the archive recordings. More... | |
| DB_EDGEVIS_SDK int32_t | GetArchiveDiskQuota () |
| Get the archive disk quota. More... | |
| DB_EDGEVIS_SDK void | SetArchiveDiskQuota (int32_t quota) |
| Set the archive disk quota. More... | |
| DB_EDGEVIS_SDK int32_t | GetArchiveDiskFullAlarmThreshold () |
| Get the archive disk full alarm threshold. More... | |
| DB_EDGEVIS_SDK void | SetArchiveDiskFullAlarmThreshold (int32_t threshold) |
| Set the archive disk full alarm threshold. More... | |
| DB_EDGEVIS_SDK ArchiveRecordMode | GetArchiveRecordMode () |
| Returns the current archive recording mode in the configuration. More... | |
| DB_EDGEVIS_SDK void | SetArchiveRecordMode (ArchiveRecordMode recordMode) |
| Sets the current archive recording mode in the configuration. More... | |
| DB_EDGEVIS_SDK int | GetPreRecordBufferDuration () |
| Returns the pre-record buffer duration. More... | |
| DB_EDGEVIS_SDK void | SetPreRecordBufferDuration (int bufferDuration) |
| Sets the pre-record buffer duration. More... | |
| DB_EDGEVIS_SDK int | GetPostRecordBufferDuration () |
| Returns the post-record buffer duration. More... | |
| DB_EDGEVIS_SDK void | SetPostRecordBufferDuration (int bufferDuration) |
| Sets the post-record buffer duration. More... | |
| DB_EDGEVIS_SDK bool | IsPostRecording () const |
| Determine if post-record is active. More... | |
| DB_EDGEVIS_SDK int8_t | GetArchiveDiskUsage () |
| Gets disk space used as a percentage. More... | |
| DB_EDGEVIS_SDK ArchiveRecordingState | GetArchiveRecordingState () |
| Returns the current state of the encoder. More... | |
| DB_EDGEVIS_SDK bool | EraseArchiveRecordings () |
| Erase all of the recordings from the encoder. More... | |
| DB_EDGEVIS_SDK ArchivePlaybackManager | GetArchivePlaybackManager () |
| Get the archive playback manager. More... | |
| DB_EDGEVIS_SDK bool | SetArchiveFileSize (int32_t file_size_mb) |
| Set the archive recording maximum file size. More... | |
| DB_EDGEVIS_SDK int32_t | GetArchiveFileSize () |
| Get the archive recording file size. More... | |
| DB_EDGEVIS_SDK bool | SetArchiveFileDuration (int32_t file_duration_minutes) |
| Set the archive recording maximum duration. More... | |
| DB_EDGEVIS_SDK int32_t | GetArchiveFileDuration () |
| Get the archive recording maximum duration. More... | |
| DB_EDGEVIS_SDK bool | ConfigureArchiveRecordingProfile (RecordingProfile profile) |
| DB_EDGEVIS_SDK RecordingProfile | GetArchiveRecordingProfile () const |
Encoder Profiles | |
Profiles are encoder encoding settings that are applied to the encoder. Profiles are notionally related to the physical link and can be switched when the underlying network technology changes. Use the GetProfiles to retrieve the currently specified set of profiles, profiles can then be amended and set back using the SetProfile Use SetCurrentProfile to set a profile as the currently active profile | |
| DB_EDGEVIS_SDK std::wstring | GetCurrentProfile () |
| Get the name of the profile currently in use. More... | |
| DB_EDGEVIS_SDK void | SetCurrentProfile (const std::wstring &profile_name) |
| Set the name of the profile to use. More... | |
| DB_EDGEVIS_SDK std::vector< EncoderProfile > | GetProfiles () const |
| Get all the available profiles. More... | |
| DB_EDGEVIS_SDK void | SetProfile (EncoderProfile profile) |
| Replace the EncoderProfile with updated settings. More... | |
Encoder events | |
Events can be sent by the Encoder to the server. These events can then be process by the server to create alerts to the user. | |
| DB_EDGEVIS_SDK int32_t | SendBatteryEvent (int8_t percent) |
| Sends a low battery event to the server. More... | |
| DB_EDGEVIS_SDK int32_t | SendCameraConnectedEvent (int input) |
| Sends a camera connected event to the server. More... | |
| DB_EDGEVIS_SDK int32_t | SendCameraDisconnectedEvent (int input) |
| Sends a camera disconnected event to the server. More... | |
| DB_EDGEVIS_SDK int32_t | SendCameraConnectedEvent (std::wstring input_name) |
| Sends a camera connected event to the server. More... | |
| DB_EDGEVIS_SDK int32_t | SendCameraDisconnectedEvent (std::wstring input_name) |
| Sends a camera disconnected event to the server. More... | |
| DB_EDGEVIS_SDK int32_t | SendAlertStartEvent () |
| Sends an alert start event to the server. More... | |
| DB_EDGEVIS_SDK int32_t | SendAlertEndEvent () |
| Sends an alert end event to the server. More... | |
| DB_EDGEVIS_SDK int32_t | SendLowVoltageEvent (double voltage) |
| Sends a low Voltage event to the server. More... | |
| DB_EDGEVIS_SDK int32_t | SendHighVoltageEvent (double voltage) |
| Sends a high Voltage event to the server. More... | |
| DB_EDGEVIS_SDK int32_t | SendLowTemperatureEvent (double temp) |
| Sends a low temperature event to the server. More... | |
| DB_EDGEVIS_SDK int32_t | SendHighTemperatureEvent (double temp) |
| Sends a high temperature event to the server. More... | |
| DB_EDGEVIS_SDK int32_t | SendExternalTriggerEvent (int alarm_id) |
| Sends an external trigger event to the server. More... | |
| DB_EDGEVIS_SDK int32_t | SendYardarmSensorEvent (const std::wstring &sensor_id, const std::wstring &friendly_name, bool holstered) |
| Sends a Yardarm holster event to the server. More... | |
| DB_EDGEVIS_SDK int32_t | SendYardarmBatteryEvent (const std::wstring &sensor_id, const std::wstring &friendly_name, int8_t percent) |
| Sends a low battery event for a Yardarm holster sensor to the server. More... | |
| DB_EDGEVIS_SDK int32_t | SendFaceDetectEvent (int input, std::wstring face_string, std::wstring metadata) |
| Sends a face detect event to the server This can be used to indicate that an external contact closure or sensor has been triggered. More... | |
Encoder licence information | |
The assigned EdgeVis licence level and extensions will enable different features on the encoder. These methods allow the application to check which licence restricted features are available with the current licence. Note that the server connection must be up in order to check the assigned licence levels for this encoder. | |
| DB_EDGEVIS_SDK bool | IsArchiveRecordingLicenced () |
| Determine if archive recording is licenced for this encoder. | |
| DB_EDGEVIS_SDK bool | IsExternalCameraLicenced () |
| Determine if external cameras are licenced for this encoder. | |
Encoder metrics | |
These methods provide information about data usage on this encoder. | |
| DB_EDGEVIS_SDK long long | GetTotalBytesSent () |
| Returns the current total number of bytes sent on this encoder. More... | |
| DB_EDGEVIS_SDK long long | GetTotalBytesReceived () |
| Returns the current total number of bytes received. More... | |
| DB_EDGEVIS_SDK void | ResetDataUsageStats () |
| Resets the counts of bytes sent/received on this encoder. | |
| DB_EDGEVIS_SDK int | GetCurrentBandwidth () |
| Returns the current bandwidth. More... | |
| DB_EDGEVIS_SDK int | GetRoundTripTime () |
| Returns round trip time. More... | |
| DB_EDGEVIS_SDK double | GetPacketsSentPerSecond () |
| Returns number of packets sent per second. More... | |
| DB_EDGEVIS_SDK double | GetPacketLossPercentage () |
| Returns percentage of packets lost in last 10 minutes. More... | |
| DB_EDGEVIS_SDK std::vector< SecureConnectEndpointInfo > | GetSecureConnectEndpoints () |
| Gets list of secure connect endpoints. More... | |
| DB_EDGEVIS_SDK bool | SetSecureConnectEndpoints (std::vector< SecureConnectEndpointInfo > endpoints) |
| Sets list of secure connect endpoints. More... | |
| DB_EDGEVIS_SDK int32_t | GetKeepAlivePeriod () |
| Gets the current period that the encoder sends keep alive messages to the server. More... | |
| DB_EDGEVIS_SDK bool | SetKeepAlivePeriod (int32_t keep_alive_period) |
| Sets the current period that the encoder sends keep alive messages to the server. More... | |
| DB_EDGEVIS_SDK void | SetLoggingLevel (EdgeVisSDKCore::LoggingLevel level, const std::wstring &log_location) |
| Used to enable or disable logging from the Encoder SDK. More... | |
Encoder Stream Config | |
These functions allow the user to manage the streaming characteristics of this encoder. Broadly, the encoder provides a number of pre-defined streaming profiles that contain fixed dimension and frame step values. These profiles are obtained by calling the GetStreamingProfiles() function in EncoderCapabilites. The ProfileID() value is used to switch between the available profiles in the StreamConfig object. The 'Custom' StreamingProfile is a special case - this profile allows the user to define their own dimension, frame step and TVI codec mode options. Use the GetStreamConfig() call to retrieve the current settings - these can then be modified and are applied using the SetStreamConfig() call. Information about what dimensions, frame steps etc. this encoder supports are obtained by calling the functions in the Stream Config section within the EncoderCapabilities object. These API calls supercede the Encoder Profiles API and should be used for new development. | |
| DB_EDGEVIS_SDK bool | SupportsStreamConfig () const |
| Checks whether the current connected server supports the StreamConfig API. More... | |
| DB_EDGEVIS_SDK EdgeVisSDKCore::StreamConfig | GetStreamConfig () const |
| Returns the stream config settings the encoder will use to encode the TVI stream. More... | |
| DB_EDGEVIS_SDK bool | SetStreamConfig (const EdgeVisSDKCore::StreamConfig &stream_cfg) |
| Used to modify the stream config settings the encoder will use to encode the TVI stream. More... | |
| DB_EDGEVIS_SDK EdgeVisSDKCore::BandwidthConfig | GetBandwidthConfig () const |
| Get the bandwidth configuration for the encoder. More... | |
| DB_EDGEVIS_SDK bool | SetBandwidthConfig (const EdgeVisSDKCore::BandwidthConfig &config) |
| Set the bandwidth configuration for the encoder. More... | |
| DB_EDGEVIS_SDK bool | GetEnhancedCodecModeEnabled () const |
| Returns the current enhanced codec mode enabled setting in the configuration. More... | |
| DB_EDGEVIS_SDK void | SetEnhancedCodecModeEnabled (bool enable) |
| Sets the enhanced codec mode as enabled. More... | |
Constructor & Destructor Documentation
| DB_EDGEVIS_SDK EdgeVisEncoderSDK::Encoder::Encoder | ( | const std::wstring & | config_path, |
| const std::wstring & | product_name | ||
| ) |
Constructor for the Encoder object.
After construction the Encoder listeners can be registered along with the config directory location.
- Parameters
-
config_path The folder location to store the configuration file. Note that the Encoder SDK should have write permissions for the specified directory. product_name A name to display for this application in other parts of the system.
- Returns
- The Encoder object.
Member Function Documentation
| DB_EDGEVIS_SDK void EdgeVisEncoderSDK::Encoder::Start | ( | ) |
Starts the encoder This will start the encoder and connect to the EdgeVis server.
Ensure SetAddresses() has been called to configure the server to connect to. Ensure setCredentials() has been called to configure the encode details
Subscribe to IEncoderListner for status callbacks
| DB_EDGEVIS_SDK ServerLinkState EdgeVisEncoderSDK::Encoder::GetServerState | ( | ) |
Returns the current status of the server.
The ServerLinkState is also returned in the IEncoderListener when it changes.
- Returns
- ServerLinkState for the server
| DB_EDGEVIS_SDK ServerLinkError EdgeVisEncoderSDK::Encoder::GetServerError | ( | ) |
Returns the current error status of the server.
The ServerLinkError is also returned in the IEncoderListener when it changes.
- Returns
- ServerLinkError for the server
| DB_EDGEVIS_SDK MediaStreamState EdgeVisEncoderSDK::Encoder::GetStreamState | ( | ) |
Returns the current streaming status of the encoder.
The MediaStreamState is also returned in the IEncoderListener when it changes.
- Returns
- MediaStreamState for the encoder
| DB_EDGEVIS_SDK std::wstring EdgeVisEncoderSDK::Encoder::ClientVersion | ( | ) |
Returns the version of this SDK.
- Returns
- The version of the SDK
| DB_EDGEVIS_SDK std::wstring EdgeVisEncoderSDK::Encoder::GetAddress | ( | ) | const |
Get the configured server address.
This method will retrieve the server address that the encoder connects to. In the case of connecting to a server cluster this method will return the address that was manually entered for the initial connection to the cluster. Note that the encoder may be conencted to any node in the cluster.
- Returns
- The configured server address (URL or IP address)
| DB_EDGEVIS_SDK void EdgeVisEncoderSDK::Encoder::SetAddress | ( | const std::wstring & | address | ) |
Sets the address of the initial server to connect to.
Note that if the encoder is connecting to a server in a cluster then the encoder may connect to a different server in the cluster from the one specified. The node the encoder connects to in the cluster will be variable.
- Parameters
-
addresses The server URL or IP address
| DB_EDGEVIS_SDK std::wstring EdgeVisEncoderSDK::Encoder::GetEncoderName | ( | ) | const |
Returns the current configured encoder name.
- Returns
- The encoder name
| DB_EDGEVIS_SDK std::wstring EdgeVisEncoderSDK::Encoder::GetPassword | ( | ) | const |
Returns the current configured encoder password.
- Returns
- The encoder password
| DB_EDGEVIS_SDK void EdgeVisEncoderSDK::Encoder::SetCredentials | ( | const std::wstring & | name, |
| const std::wstring & | password | ||
| ) |
| DB_EDGEVIS_SDK std::wstring EdgeVisEncoderSDK::Encoder::GetServerName | ( | ) | const |
Returns the name of the server the encoder is connected to.
- Returns
- The server name
| DB_EDGEVIS_SDK std::wstring EdgeVisEncoderSDK::Encoder::GetServerVersion | ( | ) | const |
Returns the version of the server the encoder is connected to.
- Returns
- The server version number
| DB_EDGEVIS_SDK void EdgeVisEncoderSDK::Encoder::RegisterListener | ( | IEncoderListener * | listener | ) |
Register for the IEncoderListener.
IEncoderListener provides status and error callbacks along with encryption and VPTZ info.
- Parameters
-
listener Pointer to the listening object. Object must conform to the IEncoderListener interface
| DB_EDGEVIS_SDK void EdgeVisEncoderSDK::Encoder::UnregisterListener | ( | IEncoderListener * | listener | ) |
Unregistered for the IEncoderListener.
- Parameters
-
listener Pointer to the listening object to unregistered
| DB_EDGEVIS_SDK void EdgeVisEncoderSDK::Encoder::RegisterArchivePlaybackListener | ( | IArchivePlaybackListener * | listener | ) |
Register for the IArchivePlaybackListener.
The IArchivePlaybackListener is called when the user has requested the local archive is played.
- Parameters
-
listener Pointer to the listening object. Object must conform to the IArchivePlaybackListener interface
| DB_EDGEVIS_SDK void EdgeVisEncoderSDK::Encoder::UnregisterArchivePlaybackListener | ( | IArchivePlaybackListener * | listener | ) |
Unregistered for the IArchivePlaybackListener.
- Parameters
-
listener Pointer to the listening object to unregistered
| DB_EDGEVIS_SDK void EdgeVisEncoderSDK::Encoder::RegisterRemoteConfigListener | ( | IRemoteConfigListener * | listener | ) |
Register for the IRemoteConfigListener.
The IRemoteConfigListener is called when the configuration settings have been changed remotely
- Parameters
-
listener Pointer to the listening object. Object must conform to the IRemoteConfigListener interface
| DB_EDGEVIS_SDK void EdgeVisEncoderSDK::Encoder::UnregisterRemoteConfigListener | ( | IRemoteConfigListener * | listener | ) |
Unregistered for the IRemoteConfigListener.
- Parameters
-
listener Pointer to the listening object to unregistered
| DB_EDGEVIS_SDK void EdgeVisEncoderSDK::Encoder::EncodeYCbCrFrame | ( | YCbCrFrame | frame | ) |
A video frame to send to the encoder.
This is the video frame in the YCbCrFrame format to send to the Encoder.
Video and audio should be constantly supplied to the encoder. If no video data is assigned the encoder will automatically send a �blue frame� of video after a timeout delay.
- Parameters
-
frame A YCbCrFrame object containing the frame to be encoded
| DB_EDGEVIS_SDK void EdgeVisEncoderSDK::Encoder::EncodePCMAudio | ( | PCMAudio | audio | ) |
| DB_EDGEVIS_SDK void EdgeVisEncoderSDK::Encoder::SetLocation | ( | double | lat, |
| double | lon, | ||
| double | accuracy, | ||
| double | altitude | ||
| ) |
Sets the latitude and longitude location of the encoder.
Sends the current GPS location with the video stream. Location information should be sent as often as possible, if location is static or has not changed resend the location at least every 10 seconds.
- Parameters
-
lat The current latitude to be sent. lon The current longitude to be sent. accuracy The current accuracy of the lat/lon values provided in meters altitude The current altitude to be sent in meters
| DB_EDGEVIS_SDK EdgeVisSDKCore::AspectRatio EdgeVisEncoderSDK::Encoder::GetEncodeAspectRatio | ( | ) |
Returns the aspect ratio set on the Encoder.
- Returns
- The AspectRatio set
| DB_EDGEVIS_SDK void EdgeVisEncoderSDK::Encoder::SetEncodeAspectRatio | ( | EdgeVisSDKCore::AspectRatio | aspectRatio | ) |
Set the aspect ratio of the video frame being encoded.
This does not affect the encoding and is send to the viewer to render the video the correct shape. This only needs to be set once on start up.
- Parameters
-
aspectRatio The AspectRatio the encoded video is.
| DB_EDGEVIS_SDK std::vector<CameraProfile> EdgeVisEncoderSDK::Encoder::GetCameraProfiles | ( | ) | const |
Get the camera profiles.
The CameraProfiles describes the number of available cameras attached to this encoder. The camera profile information is shown to the user, allowing them to select a different camera to stream.
- Returns
- A vector of the set CameraProfiles
| DB_EDGEVIS_SDK void EdgeVisEncoderSDK::Encoder::SetCameraProfiles | ( | std::vector< CameraProfile > | cameras | ) |
Set the camera profiles.
The CameraProfiles describes the number of available cameras attached to this encoder. The camera profile information is shown to the user, allowing them to select a different camera to stream.
At least one profile should be set.
- Parameters
-
cameras A vector of CameraProfiles to set. This will overwrite any existing profiles
| DB_EDGEVIS_SDK int8_t EdgeVisEncoderSDK::Encoder::GetVideoInput | ( | ) | const |
The current video input the encoder is set to.
Reports the current video input index the encoder has been set to.
- Returns
- The video index
| DB_EDGEVIS_SDK void EdgeVisEncoderSDK::Encoder::SetVideoInput | ( | int8_t | input | ) |
Sets the current video input.
Use this if the currently selected input has changed locally. This is a zero based index which must be >= 0 and < number of inputs.
- Parameters
-
input The video input to set.
| DB_EDGEVIS_SDK bool EdgeVisEncoderSDK::Encoder::GetAudioEnabled | ( | ) |
Returns the global audio enabled setting.
As well as a global audio enabled, each encoder profile has an audio enabled setting.
- Returns
- True if audio has been enabled globally.
| DB_EDGEVIS_SDK void EdgeVisEncoderSDK::Encoder::SetAudioEnabled | ( | bool | enable | ) |
Sets the global audio enabled setting.
As well as a global audio enabled, each encoder profile has an audio enabled setting.
- Parameters
-
enable Sets the audio enabled flag.
| DB_EDGEVIS_SDK bool EdgeVisEncoderSDK::Encoder::GetAudioOnlyEnabled | ( | ) |
Returns the audio only enabled setting.
- Returns
- True if audio only has been enabled.
| DB_EDGEVIS_SDK void EdgeVisEncoderSDK::Encoder::SetAudioOnlyEnabled | ( | bool | enable | ) |
Sets the audio only enabled setting.
If enabled, the encoder will only send Audio data along with a static video frame to the viewer
- Parameters
-
enable Sets the audio only flag.
| DB_EDGEVIS_SDK bool EdgeVisEncoderSDK::Encoder::GetGPSEnabled | ( | ) |
Returns the GPS enabled setting.
Is enabled the user is expecting GPS data to be provided along with the video stream if location information is available.
- Returns
- True is GPS has been enabled
| DB_EDGEVIS_SDK void EdgeVisEncoderSDK::Encoder::SetGPSEnabled | ( | bool | enable | ) |
Sets the GPS enabled setting.
Is enabled the user is expecting GPS data to be provided along with the video stream if location information is available.
- Parameters
-
enable Sets the GPS enabled flag in the encoder configuration
| DB_EDGEVIS_SDK AreaOfInterestConfig EdgeVisEncoderSDK::Encoder::GetAreaOfInterestConfig | ( | const int32_t | input | ) | const |
Returns the area of interest configuration.
- Parameters
-
The input to retrieve the AreaOfInterestConfig for
- Returns
- The AreaOfInterestConfig settings set on the encoder
| DB_EDGEVIS_SDK bool EdgeVisEncoderSDK::Encoder::SetAreaOfInterestConfig | ( | const AreaOfInterestConfig & | aoi | ) |
Sets the area of interest configuration.
- Parameters
-
aoi Sets the AreaOfInterestConfig configuration on the encoder.
| DB_EDGEVIS_SDK std::wstring EdgeVisEncoderSDK::Encoder::GetTimezone | ( | ) |
Returns the timezone set on the encoder.
- Returns
- A string describing the Timezone set on the encoder.
| DB_EDGEVIS_SDK void EdgeVisEncoderSDK::Encoder::SetTimezone | ( | std::wstring | timezone | ) |
Sets the timezone of the encoder.
See the TimezoneIDs.h file for the list of supported timezone strings.
- Parameters
-
timezone A string representing the timezone.
| DB_EDGEVIS_SDK std::wstring EdgeVisEncoderSDK::Encoder::GetOperatorInfo | ( | ) |
Returns the operator info set on the encoder.
- Returns
- A string containing the operator info set on the encoder.
| DB_EDGEVIS_SDK void EdgeVisEncoderSDK::Encoder::SetOperatorInfo | ( | const std::wstring & | op | ) |
Sets the operator of the encoder.
- Parameters
-
op A string of the current operator info
| DB_EDGEVIS_SDK void EdgeVisEncoderSDK::Encoder::ReportBatteryCharge | ( | int32_t | percent | ) |
Report the battery level of the encoder to the server.
- Parameters
-
percent A value between 0 and 100 representing the battery charge.
| DB_EDGEVIS_SDK void EdgeVisEncoderSDK::Encoder::ReportCPUTemperature | ( | double | temp | ) |
Report the CPU temperature of the encoder to the server.
- Parameters
-
temperature Temperature value in degrees C.
| DB_EDGEVIS_SDK void EdgeVisEncoderSDK::Encoder::ReportCPUUsage | ( | int32_t | percent | ) |
Report the CPU usage of the encoder to the server.
- Parameters
-
percent A value between 0 and 100 representing the CPU usage.
| DB_EDGEVIS_SDK EncoderCapabilities EdgeVisEncoderSDK::Encoder::QueryEncoderCapabilities | ( | ) | const |
Return the EncoderCapabilites object which defines the capabilities of this encoder.
- Returns
- the EncoderCapabilities object.
| DB_EDGEVIS_SDK bool EdgeVisEncoderSDK::Encoder::GetArchiveRecordingEnabled | ( | ) |
Returns the current archive enabled setting in the configuration.
- Returns
- True if archive recording is currently enabled
| DB_EDGEVIS_SDK void EdgeVisEncoderSDK::Encoder::SetArchiveRecordingEnabled | ( | bool | enable | ) |
Sets the archive recording as enabled.
Enabling the archive recording will require the archive path be set.
- Parameters
-
enable Sets the archive recording enabled state
| DB_EDGEVIS_SDK std::wstring EdgeVisEncoderSDK::Encoder::GetArchiveRecordingPath | ( | ) |
Returns the path of the archive recordings.
- Returns
- The path of the archive recordings
| DB_EDGEVIS_SDK void EdgeVisEncoderSDK::Encoder::SetArchiveRecordingPath | ( | const std::wstring & | path | ) |
Sets the path of the archive recordings.
Set this path before enabling the archive recordings. This is the path the archive files are recorded to. The archive will automatically reap files when the disk quota is reached
- Parameters
-
path The path of the archive recordings
| DB_EDGEVIS_SDK int32_t EdgeVisEncoderSDK::Encoder::GetArchiveDiskQuota | ( | ) |
Get the archive disk quota.
This is the maximum disk space the archive will use. Once the limit is hit the archive will start to reap and delete the oldest footage.
A value of 0 indicates the archive will use the entire free space on the disk
- Returns
- The disk space in use in GB.
| DB_EDGEVIS_SDK void EdgeVisEncoderSDK::Encoder::SetArchiveDiskQuota | ( | int32_t | quota | ) |
Set the archive disk quota.
This is the maximum disk space the archive will use in GB. Once the limit is hit the archive will start to reap and delete the oldest footage.
A value of 0 indicates the archive will use the entire free space on the disk
- Parameters
-
The disk space in use in GB. 0 will disable the Quota and use the entire free space
| DB_EDGEVIS_SDK int32_t EdgeVisEncoderSDK::Encoder::GetArchiveDiskFullAlarmThreshold | ( | ) |
Get the archive disk full alarm threshold.
Get the disk usage percentage at which an alarm will be triggered
- Returns
- The archive disk full alarm threshold
| DB_EDGEVIS_SDK void EdgeVisEncoderSDK::Encoder::SetArchiveDiskFullAlarmThreshold | ( | int32_t | threshold | ) |
Set the archive disk full alarm threshold.
- Parameters
-
The archive disk usage percentage at which an alarm will be triggered.
| DB_EDGEVIS_SDK ArchiveRecordMode EdgeVisEncoderSDK::Encoder::GetArchiveRecordMode | ( | ) |
Returns the current archive recording mode in the configuration.
- Returns
- The current archive recording mode in the configuration
| DB_EDGEVIS_SDK void EdgeVisEncoderSDK::Encoder::SetArchiveRecordMode | ( | ArchiveRecordMode | recordMode | ) |
Sets the current archive recording mode in the configuration.
- Parameters
-
Archive recording mode
| DB_EDGEVIS_SDK int EdgeVisEncoderSDK::Encoder::GetPreRecordBufferDuration | ( | ) |
Returns the pre-record buffer duration.
- Returns
- The pre-record buffer duration in milliseconds
| DB_EDGEVIS_SDK void EdgeVisEncoderSDK::Encoder::SetPreRecordBufferDuration | ( | int | bufferDuration | ) |
Sets the pre-record buffer duration.
- Parameters
-
The pre-record buffer duration in milliseconds
| DB_EDGEVIS_SDK int EdgeVisEncoderSDK::Encoder::GetPostRecordBufferDuration | ( | ) |
Returns the post-record buffer duration.
- Returns
- The post-record buffer duration in milliseconds
| DB_EDGEVIS_SDK void EdgeVisEncoderSDK::Encoder::SetPostRecordBufferDuration | ( | int | bufferDuration | ) |
Sets the post-record buffer duration.
- Parameters
-
The post-record buffer duration in milliseconds
| DB_EDGEVIS_SDK bool EdgeVisEncoderSDK::Encoder::IsPostRecording | ( | ) | const |
Determine if post-record is active.
- Returns
- True if currently post-recording, false otherwise
| DB_EDGEVIS_SDK int8_t EdgeVisEncoderSDK::Encoder::GetArchiveDiskUsage | ( | ) |
Gets disk space used as a percentage.
- Returns
- Disk space used as a percentage
| DB_EDGEVIS_SDK ArchiveRecordingState EdgeVisEncoderSDK::Encoder::GetArchiveRecordingState | ( | ) |
Returns the current state of the encoder.
- Returns
- The current recording state.
| DB_EDGEVIS_SDK bool EdgeVisEncoderSDK::Encoder::EraseArchiveRecordings | ( | ) |
Erase all of the recordings from the encoder.
This method would typically be used after changing the encrypted archive password to allow recordings to continue with the new password. WARNING: recordings removed using this method are permanently deleted
- Returns
- True if the recordings directory has been successfully cleared, false otherwise.
| DB_EDGEVIS_SDK ArchivePlaybackManager EdgeVisEncoderSDK::Encoder::GetArchivePlaybackManager | ( | ) |
Get the archive playback manager.
- Returns
- The archive playback manager
| DB_EDGEVIS_SDK bool EdgeVisEncoderSDK::Encoder::SetArchiveFileSize | ( | int32_t | file_size_mb | ) |
Set the archive recording maximum file size.
- Parameters
-
file_size_mb This is a value in MB between 5 and 100 inclusive. While recording the file will be finalised once its size reaches this limit or its duration reaches the value provided to SetArchiveFileDuration(). Default value is 25MB.
- Returns
- True if the value provided is valid, false otherwise.
| DB_EDGEVIS_SDK int32_t EdgeVisEncoderSDK::Encoder::GetArchiveFileSize | ( | ) |
Get the archive recording file size.
- Returns
- The archive file size
| DB_EDGEVIS_SDK bool EdgeVisEncoderSDK::Encoder::SetArchiveFileDuration | ( | int32_t | file_duration_minutes | ) |
Set the archive recording maximum duration.
- Parameters
-
file_duration_minutes This is a value in minutes between 1 and 30 inclusive. While recording the file will be finalised once its duration reaches this limit or its size reaches the value provided to SetArchiveFileSize(). Default value is 5 minutes.
- Returns
- True if the value provided is valid, false otherwise.
| DB_EDGEVIS_SDK int32_t EdgeVisEncoderSDK::Encoder::GetArchiveFileDuration | ( | ) |
Get the archive recording maximum duration.
- Returns
- The archive file max duration
| DB_EDGEVIS_SDK std::wstring EdgeVisEncoderSDK::Encoder::GetCurrentProfile | ( | ) |
Get the name of the profile currently in use.
The current profile name of EncoderProfile currently in use by the encoder. Use the GetProfiles method to retrieve all the profiles available.
- See also
- EncoderProfile
- Returns
- The profile name currently in use
| DB_EDGEVIS_SDK void EdgeVisEncoderSDK::Encoder::SetCurrentProfile | ( | const std::wstring & | profile_name | ) |
Set the name of the profile to use.
On call the profile settings will be applied to the encoder.
- See also
- EncoderProfile
- Parameters
-
profile_name The name of the profile to set
| DB_EDGEVIS_SDK std::vector<EncoderProfile> EdgeVisEncoderSDK::Encoder::GetProfiles | ( | ) | const |
Get all the available profiles.
Returns the current set of configured profiles. These EncoderProfile objects can then be modified and set by using the SetProfile
- See also
- EncoderProfile
- Returns
- A list of all the available profiles
| DB_EDGEVIS_SDK void EdgeVisEncoderSDK::Encoder::SetProfile | ( | EncoderProfile | profile | ) |
Replace the EncoderProfile with updated settings.
This will replace the Profile with the same name with new settings. If this profile is the current profile the settings will take affect immediately.
- See also
- EncoderProfile
- Parameters
-
profile The profile to replace.
| DB_EDGEVIS_SDK int32_t EdgeVisEncoderSDK::Encoder::SendBatteryEvent | ( | int8_t | percent | ) |
Sends a low battery event to the server.
This can be used indicate the battery on the encoder is running low.
- Parameters
-
percent The battery charge left in percentage.
| DB_EDGEVIS_SDK int32_t EdgeVisEncoderSDK::Encoder::SendCameraConnectedEvent | ( | int | input | ) |
Sends a camera connected event to the server.
This can be used indicate that a camera has been connected to the encoder
- Parameters
-
input The index of the input that has connected.
| DB_EDGEVIS_SDK int32_t EdgeVisEncoderSDK::Encoder::SendCameraDisconnectedEvent | ( | int | input | ) |
Sends a camera disconnected event to the server.
This can be used indicate that a camera has been disconnected from the encoder
- Parameters
-
input The index of the input that has disconnected.
| DB_EDGEVIS_SDK int32_t EdgeVisEncoderSDK::Encoder::SendCameraConnectedEvent | ( | std::wstring | input_name | ) |
Sends a camera connected event to the server.
This can be used indicate that a camera has been connected to the encoder
- Parameters
-
input_name The name of the input that has connected.
| DB_EDGEVIS_SDK int32_t EdgeVisEncoderSDK::Encoder::SendCameraDisconnectedEvent | ( | std::wstring | input_name | ) |
Sends a camera disconnected event to the server.
This can be used indicate that a camera has been disconnected from the encoder
- Parameters
-
input_name The name of the input that has disconnected.
| DB_EDGEVIS_SDK int32_t EdgeVisEncoderSDK::Encoder::SendAlertStartEvent | ( | ) |
Sends an alert start event to the server.
This can be used to indicate that an agent requries assistance.
| DB_EDGEVIS_SDK int32_t EdgeVisEncoderSDK::Encoder::SendAlertEndEvent | ( | ) |
Sends an alert end event to the server.
This can be used to indicate that an agent no longer requries assistance.
| DB_EDGEVIS_SDK int32_t EdgeVisEncoderSDK::Encoder::SendLowVoltageEvent | ( | double | voltage | ) |
Sends a low Voltage event to the server.
| DB_EDGEVIS_SDK int32_t EdgeVisEncoderSDK::Encoder::SendHighVoltageEvent | ( | double | voltage | ) |
Sends a high Voltage event to the server.
| DB_EDGEVIS_SDK int32_t EdgeVisEncoderSDK::Encoder::SendLowTemperatureEvent | ( | double | temp | ) |
Sends a low temperature event to the server.
| DB_EDGEVIS_SDK int32_t EdgeVisEncoderSDK::Encoder::SendHighTemperatureEvent | ( | double | temp | ) |
Sends a high temperature event to the server.
| DB_EDGEVIS_SDK int32_t EdgeVisEncoderSDK::Encoder::SendExternalTriggerEvent | ( | int | alarm_id | ) |
Sends an external trigger event to the server.
This can be used to indicate that an external contact closure or sensor has been triggered.
| DB_EDGEVIS_SDK int32_t EdgeVisEncoderSDK::Encoder::SendYardarmSensorEvent | ( | const std::wstring & | sensor_id, |
| const std::wstring & | friendly_name, | ||
| bool | holstered | ||
| ) |
Sends a Yardarm holster event to the server.
Indicates that an operator has unholstered or holstered their weapon.
- Parameters
-
sensor_id An identifier for the sensor, typically he serial number friendly_name A friendly name to help identify the sensor (eg. Taser or Glock) holstered Indicates if the weapon is holstered (true) or drawn (false)
| DB_EDGEVIS_SDK int32_t EdgeVisEncoderSDK::Encoder::SendYardarmBatteryEvent | ( | const std::wstring & | sensor_id, |
| const std::wstring & | friendly_name, | ||
| int8_t | percent | ||
| ) |
Sends a low battery event for a Yardarm holster sensor to the server.
- Parameters
-
sensor_id An identifier for the sensor, typically he serial number friendly_name A friendly name to help identify the sensor (eg. Taser or Glock) percent The charge level of the Yardarm sensor battery
| DB_EDGEVIS_SDK int32_t EdgeVisEncoderSDK::Encoder::SendFaceDetectEvent | ( | int | input, |
| std::wstring | face_string, | ||
| std::wstring | metadata | ||
| ) |
Sends a face detect event to the server This can be used to indicate that an external contact closure or sensor has been triggered.
- Parameters
-
input The index of the input that has disconnected. face_string Base64 encoded JPEG of the face thumbnail. This must be smaller than 14kB. metadata JSON string containing any metadata associated with the face detection event.
| DB_EDGEVIS_SDK long long EdgeVisEncoderSDK::Encoder::GetTotalBytesSent | ( | ) |
Returns the current total number of bytes sent on this encoder.
- Returns
- The current total number of bytes sent
| DB_EDGEVIS_SDK long long EdgeVisEncoderSDK::Encoder::GetTotalBytesReceived | ( | ) |
Returns the current total number of bytes received.
- Returns
- The current total number of bytes received
| DB_EDGEVIS_SDK int EdgeVisEncoderSDK::Encoder::GetCurrentBandwidth | ( | ) |
Returns the current bandwidth.
- Returns
- The current bandwidth
| DB_EDGEVIS_SDK int EdgeVisEncoderSDK::Encoder::GetRoundTripTime | ( | ) |
Returns round trip time.
- Returns
- Round trip time
| DB_EDGEVIS_SDK double EdgeVisEncoderSDK::Encoder::GetPacketsSentPerSecond | ( | ) |
Returns number of packets sent per second.
- Returns
- Packets sent per second
| DB_EDGEVIS_SDK double EdgeVisEncoderSDK::Encoder::GetPacketLossPercentage | ( | ) |
Returns percentage of packets lost in last 10 minutes.
- Returns
- Percentage of packets lost in last 10 minutes
| DB_EDGEVIS_SDK std::vector<SecureConnectEndpointInfo> EdgeVisEncoderSDK::Encoder::GetSecureConnectEndpoints | ( | ) |
Gets list of secure connect endpoints.
- Returns
- list of secure connect endpoints
| DB_EDGEVIS_SDK bool EdgeVisEncoderSDK::Encoder::SetSecureConnectEndpoints | ( | std::vector< SecureConnectEndpointInfo > | endpoints | ) |
Sets list of secure connect endpoints.
- Returns
- true if list set successfully, false otherwise
| DB_EDGEVIS_SDK int32_t EdgeVisEncoderSDK::Encoder::GetKeepAlivePeriod | ( | ) |
Gets the current period that the encoder sends keep alive messages to the server.
- Returns
- The current keep alive message period in milliseconds
| DB_EDGEVIS_SDK bool EdgeVisEncoderSDK::Encoder::SetKeepAlivePeriod | ( | int32_t | keep_alive_period | ) |
Sets the current period that the encoder sends keep alive messages to the server.
- Parameters
-
keep_alive_period The desired keep alive message period in milliseconds. This must be between 4000ms and 60000ms.
- Returns
- true if the keep alive period was set successfully, false otherwise
| DB_EDGEVIS_SDK void EdgeVisEncoderSDK::Encoder::SetLoggingLevel | ( | EdgeVisSDKCore::LoggingLevel | level, |
| const std::wstring & | log_location | ||
| ) |
Used to enable or disable logging from the Encoder SDK.
- Parameters
-
level Logging level to set. log_location Location where the log files will be written.
| DB_EDGEVIS_SDK bool EdgeVisEncoderSDK::Encoder::SupportsStreamConfig | ( | ) | const |
Checks whether the current connected server supports the StreamConfig API.
If there is no current connection with the server then it is assumed that the server will support it. Minimum server version for this feature is 7.4.0.
- Returns
- true if the server supports this feature, false otherwise.
| DB_EDGEVIS_SDK EdgeVisSDKCore::StreamConfig EdgeVisEncoderSDK::Encoder::GetStreamConfig | ( | ) | const |
Returns the stream config settings the encoder will use to encode the TVI stream.
These values define the dimension, frame step, TVI codec mode and audio options that are used to encode the TVI stream.
- Returns
- the current stream config settings.
| DB_EDGEVIS_SDK bool EdgeVisEncoderSDK::Encoder::SetStreamConfig | ( | const EdgeVisSDKCore::StreamConfig & | stream_cfg | ) |
Used to modify the stream config settings the encoder will use to encode the TVI stream.
- Parameters
-
stream_cfg the stream config values to apply to the encoder.
- Returns
- true if the new settings were applied successfully, false otherwise.
| DB_EDGEVIS_SDK EdgeVisSDKCore::BandwidthConfig EdgeVisEncoderSDK::Encoder::GetBandwidthConfig | ( | ) | const |
Get the bandwidth configuration for the encoder.
- Returns
- the current bandwidth configuration settings.
| DB_EDGEVIS_SDK bool EdgeVisEncoderSDK::Encoder::SetBandwidthConfig | ( | const EdgeVisSDKCore::BandwidthConfig & | config | ) |
Set the bandwidth configuration for the encoder.
- Parameters
-
config the bandwidth config values to apply to the encoder.
- Returns
- true if the new settings were applied successfully, false otherwise.
| DB_EDGEVIS_SDK bool EdgeVisEncoderSDK::Encoder::GetEnhancedCodecModeEnabled | ( | ) | const |
Returns the current enhanced codec mode enabled setting in the configuration.
- Returns
- True if enhanced codec mode is currently enabled
| DB_EDGEVIS_SDK void EdgeVisEncoderSDK::Encoder::SetEnhancedCodecModeEnabled | ( | bool | enable | ) |
Sets the enhanced codec mode as enabled.
Note that viewers must have a Decoder SDK of aat least 8.0.0 to decode a stream with enhanced codec mode enabled
- Parameters
-
enable Sets the enhanced codec mode enabled state
The documentation for this class was generated from the following file:
- SDKs/EdgeVisEncoderSDK/Encoder.h
