Search Results

Go to the documentation of this file.
1 // Copyright (c) 2016 Digital Barriers
4 
37 #pragma once
38 
39 #include <vector>
40 #include <unordered_map>
41 #include "ISettings.h"
42 #include "ConfigTypes.h"
43 #include "VideoCodecMode.h"
45 #include "AnalyticsInfo.h"
46 #include "IridiumConfig.h"
47 #include "AreaOfInterestConfig.h"
48 #include "BandwidthConfig.h"
49 #include "StreamConfig.h"
50 #include "VideoAnalyticsConfig.h"
51 
52 #include "EdgeVisSDK.h"
53 #include "Pimpl.h"
54 
55 
56 namespace EdgeVisDecoderSDK
57 {
58  typedef EdgeVisSDKCore::AreaOfInterestConfig AreaOfInterestConfig;
59  typedef EdgeVisSDKCore::BandwidthConfig BandwidthConfig;
60  typedef EdgeVisSDKCore::StreamConfig StreamConfig;
61  typedef EdgeVisSDKCore::IridiumConfig IridiumConfig;
62  typedef EdgeVisSDKCore::SecureConnectEndpointConfig SecureConnectEndpointConfig;
63 
64  typedef EdgeVisSDKCore::ConnectionProfile ConnectionProfile;
66 
67  class EncoderConfigImpl;
68 
69  class EncoderConfig : public ISettings, public EdgeVisSDKPimpl<EncoderConfigImpl>
70  {
71  private:
72  friend class EncoderConfigImpl;
73 
74  public:
75  EdgeVisSDKPimplWeakConstructor(EncoderConfig);
76 
80  DB_EDGEVIS_SDK EncoderConfig();
81 
82  DB_EDGEVIS_SDK virtual ~EncoderConfig();
83 
89  DB_EDGEVIS_SDK int32_t VideoInput() const;
90 
99  DB_EDGEVIS_SDK bool VideoInput( int32_t input );
100 
107  DB_EDGEVIS_SDK CameraConfig GetCameraConfig( int32_t input_id ) const;
108 
114  DB_EDGEVIS_SDK ColourInfo GetColourInfo() const;
115 
125  DB_EDGEVIS_SDK bool SetColourInfo( const ColourInfo& ci );
126 
132  DB_EDGEVIS_SDK FilterInfo GetFilterInfo() const;
133 
141  DB_EDGEVIS_SDK bool SetFilterInfo( const FilterInfo& fi );
142 
148  DB_EDGEVIS_SDK AudioInfo GetAudioInfo() const;
149 
162  DB_EDGEVIS_SDK bool SetAudioInfo( const AudioInfo& ai );
163 
169  DB_EDGEVIS_SDK std::vector< std::wstring > AvailableProfiles();
170 
179  DB_EDGEVIS_SDK bool SetAvailableProfiles( const std::vector< std::wstring >& names );
180 
188  DB_EDGEVIS_SDK std::wstring StaticGPSLocation() const;
189 
199  DB_EDGEVIS_SDK bool SetStaticGPSLocation( const std::wstring& loc );
200 
206  DB_EDGEVIS_SDK bool GetGPSEnabled() const;
207 
216  DB_EDGEVIS_SDK bool SetGPSEnabled( bool enabled );
217 
223  DB_EDGEVIS_SDK std::wstring ConnectionProfile() const;
224 
230  DB_EDGEVIS_SDK std::wstring TimeZoneID() const;
231 
237  DB_EDGEVIS_SDK bool SerialAlarmDeviceEnabled() const;
238 
244  DB_EDGEVIS_SDK bool RelayState() const;
245 
254  DB_EDGEVIS_SDK bool RelayState( bool powered );
255 
263  DB_EDGEVIS_SDK bool GetRelayState(int8_t index) const;
264 
273  DB_EDGEVIS_SDK bool SetRelayState(int8_t index, bool powered);
274 
282  DB_EDGEVIS_SDK int32_t CameraPower( int32_t camera ) const;
283 
293  DB_EDGEVIS_SDK bool CameraPower( int32_t camera, int32_t pwr );
294 
300  DB_EDGEVIS_SDK bool ArchiveRemotePlaybackEnabled() const;
301 
308  DB_EDGEVIS_SDK bool LocalWifiEnabled() const;
309 
315  DB_EDGEVIS_SDK LocalWifiDownloadInfo GetLocalWifiDownloadInfo() const;
316 
327  DB_EDGEVIS_SDK bool SetLocalWifiDownloadEnabled( bool enable );
328 
338  DB_EDGEVIS_SDK AreaOfInterestConfig GetAreaOfInterestConfig(const int32_t input) const;
339 
355  DB_EDGEVIS_SDK bool SetAreaOfInterestConfig( const AreaOfInterestConfig& aoi );
356 
357  DB_EDGEVIS_SDK AnalyticsInfo GetAnalyticsInfo() const;
358 
374  DB_EDGEVIS_SDK bool SetAnalyticsInfo(const AnalyticsInfo& ai);
375 
382  DB_EDGEVIS_SDK bool CanConfigureVideoAnalytics() const;
383 
384 
390  DB_EDGEVIS_SDK int32_t GetVideoAnalyticsVersion() const;
391 
399  DB_EDGEVIS_SDK VideoAnalyticsConfig GetVideoAnalyticsConfig(const int32_t input) const;
400 
406  DB_EDGEVIS_SDK std::map<int32_t, VideoAnalyticsConfig> GetVideoAnalyticsConfig() const;
407 
415  DB_EDGEVIS_SDK bool SetVideoAnalyticsConfig(const int32_t input, const VideoAnalyticsConfig& config);
416 
428  DB_EDGEVIS_SDK VideoCodecMode GetCodecMode() const;
429 
444  DB_EDGEVIS_SDK bool SetCodecMode( VideoCodecMode cm );
445 
451  DB_EDGEVIS_SDK std::wstring GetPTZTours();
452 
459  DB_EDGEVIS_SDK bool SetPTZTours( const std::wstring& tours );
460 
466  DB_EDGEVIS_SDK std::wstring PrimaryConnection();
467 
473  DB_EDGEVIS_SDK std::wstring BackupConnection();
474 
481  DB_EDGEVIS_SDK bool PrimaryConnectionInUse();
482 
489  DB_EDGEVIS_SDK bool BackupConnectionInUse();
490 
498  DB_EDGEVIS_SDK std::wstring CommunicationMethod();
499 
506  DB_EDGEVIS_SDK int32_t GetSecureConnectBandwidthPercentage() const;
507 
513  DB_EDGEVIS_SDK std::vector< SecureConnectEndpointConfig > GetSecureConnectEndpoints() const;
514 
520  DB_EDGEVIS_SDK int64_t GetResumeSleepTime() const;
521 
522 
529  DB_EDGEVIS_SDK bool SetResumeSleepTime(int64_t resume_sleep_time);
530 
531 
538  DB_EDGEVIS_SDK std::wstring GetSerialAlarmDevice() const;
539 
548  DB_EDGEVIS_SDK bool GetEdgeRecordingEnabled() const;
549 
560  DB_EDGEVIS_SDK bool SetEdgeRecordingEnabled(bool enabled);
561 
568  DB_EDGEVIS_SDK bool SupportsAlarmRecording() const;
569 
578  DB_EDGEVIS_SDK bool GetAlarmRecording() const;
579 
585  DB_EDGEVIS_SDK bool GetIridiumConfig(IridiumConfig& result) const;
586 
587 
598  DB_EDGEVIS_SDK bool GetBandwidthConfig(BandwidthConfig& bw_cfg) const;
599 
610  DB_EDGEVIS_SDK bool SetBandwidthConfig(const BandwidthConfig& bw_cfg);
611 
619  DB_EDGEVIS_SDK bool GetStreamConfig(StreamConfig& stream_cfg) const;
620 
628  DB_EDGEVIS_SDK bool SetStreamConfig(const StreamConfig& stream_cfg);
629 
637  DB_EDGEVIS_SDK bool GetReserveIdleStreamBandwidth() const;
638 
648  DB_EDGEVIS_SDK bool SetReserveIdleStreamBandwidth(const bool reserve_idle);
649 
656  DB_EDGEVIS_SDK bool GetAudioOnlyEnabled() const;
657 
658  bool IsUsingCameraInput(int32_t input) const;
659 
660  int32_t DetermineStreamIndex() const;
661  std::unordered_map<int32_t, bool> DetermineStreamEnableStates() const;
662  std::string DetermineConnectionStatus() const;
663 
664  private:
665  std::wstring GetConnectionMethodName(std::wstring connectionMethod);
666  std::wstring GetCurrentConnectionMethod();
667 
668  double CalculateSensitivity(const double sensitivity, const bool isSafeZone2D) const;
669 
670  public:
671  // ISettings methods
672  virtual std::wstring Name() const
673  {
674  return _Name;
675  }
676 
677  public:
678  static const std::wstring _Name;
679  };
680 }
DB_EDGEVIS_SDK bool SetEdgeRecordingEnabled(bool enabled)
Set edge recording enabled or disabled for the encoder.
DB_EDGEVIS_SDK int32_t VideoInput() const
Gets the current video input.
DB_EDGEVIS_SDK bool SetBandwidthConfig(const BandwidthConfig &bw_cfg)
Set the bandwidth configuration for the encoder.
DB_EDGEVIS_SDK bool SetFilterInfo(const FilterInfo &fi)
Sets the video filter information.
Defines Encoder local Wifi download settings.
Definition: ConfigTypes.h:84
DB_EDGEVIS_SDK bool SetPTZTours(const std::wstring &tours)
Sets the list of available PTZ tours on the encoder.
DB_EDGEVIS_SDK bool PrimaryConnectionInUse()
Gets the status of the primary connection.
AudioSource
Definition: AudioSource.h:24
DB_EDGEVIS_SDK bool GetAlarmRecording() const
Returns whether or not the encoder is recording due to an alarm action.
DB_EDGEVIS_SDK EncoderConfig()
Creates a new EncoderConfig object.
DB_EDGEVIS_SDK bool SetGPSEnabled(bool enabled)
Sets whether a GPS device is enabled for retrieving location information.
DB_EDGEVIS_SDK std::wstring TimeZoneID() const
Gets the Encoder&#39;s timezone ID.
Availability
Definition: ConnectionProfile.h:33
DB_EDGEVIS_SDK std::wstring GetSerialAlarmDevice() const
Retrieve the name of the serial alarm device that is currently configured.
DB_EDGEVIS_SDK bool RelayState() const
Gets the powered state of the relay (if the Encoder has one).
DB_EDGEVIS_SDK bool SerialAlarmDeviceEnabled() const
Gets the enabled state of the serial alarm device.
DB_EDGEVIS_SDK int32_t CameraPower(int32_t camera) const
Gets the powered state of the camera if it is powered from the Encoder (S400 and TriStar Encoders onl...
Class to allow for configuring the streaming characteristics of an Encoder.
Definition: StreamConfig.h:34
DB_EDGEVIS_SDK bool GetEdgeRecordingEnabled() const
Returns if edge recording is enabled for the encoder.
DB_EDGEVIS_SDK bool ArchiveRemotePlaybackEnabled() const
Gets the enabled state of remote archive playback.
Availability
Definition: SecureConnectEndpointConfig.h:33
DB_EDGEVIS_SDK std::wstring ConnectionProfile() const
Gets the name of the currently active connection profile.
DB_EDGEVIS_SDK AudioInfo GetAudioInfo() const
Gets the audio configuration information.
DB_EDGEVIS_SDK std::wstring CommunicationMethod()
Gets the name of the current communication method Will return a string of the type of communication m...
DB_EDGEVIS_SDK ColourInfo GetColourInfo() const
Gets the video colour information.
Defines the area of interest configuration to use for a video input.
Definition: AreaOfInterestConfig.h:34
virtual std::wstring Name() const
Gets the name of the settings object.
Definition: EncoderConfig.h:672
DB_EDGEVIS_SDK bool SetStaticGPSLocation(const std::wstring &loc)
Sets the Encoder&#39;s static GPS location so it can be represented on a map without the need for a GPS d...
DB_EDGEVIS_SDK bool LocalWifiEnabled() const
Gets the enabled state of the local Wifi connection if the Encoder supports it.
DB_EDGEVIS_SDK bool SetStreamConfig(const StreamConfig &stream_cfg)
Set the stream configuration for the encoder.
Definition of the ISettings interface class.
Definition: ISettings.h:34
DB_EDGEVIS_SDK bool GetIridiumConfig(IridiumConfig &result) const
Get the Iridium configuration in use for this encoder.
Defines Encoder video filter settings.
Definition: ConfigTypes.h:69
Contains the structs used in the Encoder settings.
DB_EDGEVIS_SDK bool SetAreaOfInterestConfig(const AreaOfInterestConfig &aoi)
Sets the area of interest configuration information.
DB_EDGEVIS_SDK bool GetBandwidthConfig(BandwidthConfig &bw_cfg) const
Get the bandwidth configuration for the encoder.
DB_EDGEVIS_SDK std::map< int32_t, VideoAnalyticsConfig > GetVideoAnalyticsConfig() const
Get a map of the video analytics configuration for each available input.
DB_EDGEVIS_SDK VideoCodecMode GetCodecMode() const
Gets the current codec mode.
DB_EDGEVIS_SDK LocalWifiDownloadInfo GetLocalWifiDownloadInfo() const
Retrieves the encoder&#39;s local Wifi download information.
DB_EDGEVIS_SDK bool SetResumeSleepTime(int64_t resume_sleep_time)
Sets the UTC timestamp at which the encoder will enter sleep.
DB_EDGEVIS_SDK FilterInfo GetFilterInfo() const
Gets the video filter information.
DB_EDGEVIS_SDK std::wstring GetPTZTours()
Gets the list of available PTZ tours for encoders that support the feature.
DB_EDGEVIS_SDK std::wstring StaticGPSLocation() const
Gets the Encoder&#39;s static GPS location so it can be represented on a map without the need for a GPS d...
DB_EDGEVIS_SDK std::wstring BackupConnection()
Gets the name of the backup connection set on the Encoder.
DB_EDGEVIS_SDK bool GetGPSEnabled() const
Gets whether a GPS device is enabled for retrieving location information.
Defines the Iridium configuration in use for an encoder.
Definition: IridiumConfig.h:32
DB_EDGEVIS_SDK bool SetReserveIdleStreamBandwidth(const bool reserve_idle)
Set the reserve idle stream bandwidth configuration for the encoder.
DB_EDGEVIS_SDK bool GetReserveIdleStreamBandwidth() const
Get the reserve idle stream bandwidth configuration for the encoder.
DB_EDGEVIS_SDK std::vector< SecureConnectEndpointConfig > GetSecureConnectEndpoints() const
Returns the list of available SecureConnect end points.
DB_EDGEVIS_SDK bool GetRelayState(int8_t index) const
Gets the powered state of the relay with the specified index (if the Encoder has a corresponding rela...
DB_EDGEVIS_SDK bool BackupConnectionInUse()
Gets the status of the backup connection.
DB_EDGEVIS_SDK AreaOfInterestConfig GetAreaOfInterestConfig(const int32_t input) const
Retrieves the encoder&#39;s area of interest configuration information.
DB_EDGEVIS_SDK bool SetRelayState(int8_t index, bool powered)
Sets the powered state of the relay with the specified index (if the Encoder has a corresponding rela...
DB_EDGEVIS_SDK std::vector< std::wstring > AvailableProfiles()
Gets the available connection profile names as a list.
The EncoderConfig interface contains the Encoder&#39;s global configuration settings. ...
Definition: EncoderConfig.h:69
DB_EDGEVIS_SDK bool CanConfigureVideoAnalytics() const
Determine if this Decoder SDK can configure video analytics on this specific encoder using the GetVid...
DB_EDGEVIS_SDK CameraConfig GetCameraConfig(int32_t input_id) const
Gets the camera configuration information.
Defines the type of analytics that the encoder will use and the configuration for each video input th...
Definition: AnalyticsInfo.h:39
DB_EDGEVIS_SDK bool SetAvailableProfiles(const std::vector< std::wstring > &names)
Sets the new list of available connection profile names.
VideoCodecMode
These are used by the EncoderConfig class to represent the codec modes available. ...
Definition: VideoCodecMode.h:21
DB_EDGEVIS_SDK bool GetAudioOnlyEnabled() const
Gets whether an encoder is in audio only mode.
DB_EDGEVIS_SDK bool SetAnalyticsInfo(const AnalyticsInfo &ai)
Sets the analytics configuration information.
DB_EDGEVIS_SDK int32_t GetVideoAnalyticsVersion() const
Get the version of the currently configured video analytics config.
DB_EDGEVIS_SDK int32_t GetSecureConnectBandwidthPercentage() const
Gets the percentage of the available bandwidth that may be used for Secure Connect.
DB_EDGEVIS_SDK bool SetLocalWifiDownloadEnabled(bool enable)
Sets the enable state of the local Wifi download access point.
DB_EDGEVIS_SDK int64_t GetResumeSleepTime() const
Returns the UTC timestamp at which the encoder will enter sleep.
DB_EDGEVIS_SDK std::wstring PrimaryConnection()
Gets the name of the primary connection set on the Encoder.
The EdgeVis Decoder SDK namespace.
DB_EDGEVIS_SDK bool SetColourInfo(const ColourInfo &ci)
Sets the video colour information.
DB_EDGEVIS_SDK bool SetAudioInfo(const AudioInfo &ai)
Sets the audio configuration information.
DB_EDGEVIS_SDK bool SupportsAlarmRecording() const
Returns whether or not the encoder is capable of indicating it is recording due to an alarm action...
Defines the bandwidth configuration to use for an encoder.
Definition: BandwidthConfig.h:41
DB_EDGEVIS_SDK bool SetCodecMode(VideoCodecMode cm)
Sets the codec mode.
DB_EDGEVIS_SDK bool SetVideoAnalyticsConfig(const int32_t input, const VideoAnalyticsConfig &config)
Sets the video analytics configuration.
DB_EDGEVIS_SDK bool GetStreamConfig(StreamConfig &stream_cfg) const
Get the stream configuration for the encoder.