Piping AutoMuter interface through to ViE API
This is a piece of the AutoMuter effort. A second CL will follow containing modifications to the new API, and tests.
BUG=2436
R=mflodman@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/2331004
git-svn-id: http://webrtc.googlecode.com/svn/trunk/webrtc@4899 4adac7df-926f-26a2-2b94-8c16560cd09d
diff --git a/video_engine/vie_codec_impl.cc b/video_engine/vie_codec_impl.cc
index 61449db..bf845d9 100644
--- a/video_engine/vie_codec_impl.cc
+++ b/video_engine/vie_codec_impl.cc
@@ -715,6 +715,19 @@
return vie_encoder->StopDebugRecording();
}
+void ViECodecImpl::EnableAutoMuting(int video_channel, int threshold_bps,
+ int window_bps) {
+ ViEChannelManagerScoped cs(*(shared_data_->channel_manager()));
+ ViEEncoder* vie_encoder = cs.Encoder(video_channel);
+ if (!vie_encoder) {
+ WEBRTC_TRACE(kTraceError, kTraceVideo,
+ ViEId(shared_data_->instance_id(), video_channel),
+ "%s: No encoder %d", __FUNCTION__, video_channel);
+ return;
+ }
+ return vie_encoder->EnableAutoMuting(threshold_bps, window_bps);
+}
+
bool ViECodecImpl::CodecValid(const VideoCodec& video_codec) {
// Check pl_name matches codec_type.
if (video_codec.codecType == kVideoCodecRED) {