4 #ifndef OWT_BASE_GLOBALCONFIGURATION_H_ 5 #define OWT_BASE_GLOBALCONFIGURATION_H_ 7 #include "owt/base/framegeneratorinterface.h" 8 #include "owt/base/videodecoderinterface.h" 9 #if defined(WEBRTC_WIN) 15 struct AudioProcessingSettings {
45 friend class PeerConnectionDependencyFactory;
47 #if defined(WEBRTC_WIN) 53 hardware_acceleration_enabled_ = enabled;
64 static void SetEncodedVideoFrameEnabled(
bool enabled) {
65 encoded_frame_ = enabled;
79 std::unique_ptr<AudioFrameGeneratorInterface> audio_frame_generator) {
81 audio_frame_generator_ = std::move(audio_frame_generator);
83 audio_frame_generator_.reset(
nullptr);
91 std::unique_ptr<VideoDecoderInterface> external_video_decoder) {
92 video_decoder_ = std::move(external_video_decoder);
100 audio_processing_settings_.AECEnabled = enabled;
108 audio_processing_settings_.AEC3Enabled = enabled;
116 audio_processing_settings_.AGCEnabled = enabled;
124 audio_processing_settings_.NSEnabled = enabled;
128 virtual ~GlobalConfiguration() {}
129 #if defined(WEBRTC_WIN) 134 static bool GetVideoHardwareAccelerationEnabled() {
135 return hardware_acceleration_enabled_;
137 static bool hardware_acceleration_enabled_;
144 static bool GetEncodedVideoFrameEnabled() {
145 return encoded_frame_;
151 static bool GetCustomizedAudioInputEnabled() {
152 return audio_frame_generator_ ? true :
false;
159 static bool GetAECEnabled() {
160 return audio_processing_settings_.AECEnabled ? true :
false;
166 static bool GetAEC3Enabled() {
167 return audio_processing_settings_.AEC3Enabled ? true :
false;
173 static bool GetAGCEnabled() {
174 return audio_processing_settings_.AGCEnabled ? true :
false;
180 static bool GetNSEnabled() {
181 return audio_processing_settings_.NSEnabled ? true :
false;
187 static std::unique_ptr<AudioFrameGeneratorInterface> GetAudioFrameGenerator(){
188 return std::move(audio_frame_generator_);
195 static bool encoded_frame_;
196 static std::unique_ptr<AudioFrameGeneratorInterface> audio_frame_generator_;
201 static bool GetCustomizedVideoDecoderEnabled() {
202 return video_decoder_ ? true :
false;
208 static std::unique_ptr<VideoDecoderInterface> GetCustomizedVideoDecoder() {
209 return std::move(video_decoder_);
214 static std::unique_ptr<VideoDecoderInterface> video_decoder_;
216 static AudioProcessingSettings audio_processing_settings_;
220 #endif // OWT_BASE_GLOBALCONFIGURATION_H_ static void SetAGCEnabled(bool enabled)
Definition: globalconfiguration.h:115
static void SetCustomizedAudioInputEnabled(bool enabled, std::unique_ptr< AudioFrameGeneratorInterface > audio_frame_generator)
This function sets the audio input to be an instance of AudioFrameGeneratorInterface.
Definition: globalconfiguration.h:77
static void SetAEC3Enabled(bool enabled)
Definition: globalconfiguration.h:107
static void SetCustomizedVideoDecoderEnabled(std::unique_ptr< VideoDecoderInterface > external_video_decoder)
This function sets the customized video decoder to decode the encoded images.
Definition: globalconfiguration.h:90
Definition: audioplayerinterface.h:8
static void SetVideoHardwareAccelerationEnabled(bool enabled)
This function sets hardware acceleration is enabled for video decoding.
Definition: globalconfiguration.h:52
configuration of global using. GlobalConfiguration class of setting for encoded frame and hardware ac...
Definition: globalconfiguration.h:44
static void SetAECEnabled(bool enabled)
Definition: globalconfiguration.h:99
static void SetNSEnabled(bool enabled)
Definition: globalconfiguration.h:123