Porting auto mute to new ViE API
This CL also includes tests for the auto mute function. A few minor lint
warnings were fixed too. Note that the auto mute function is still work
in progress.
The callback ViEEncoderObserver::VideoAutoMuted was not ported from the
old API. This is TBD; see issue 2457.
BUG=2436
R=holmer@google.com, mflodman@webrtc.org, pbos@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/2340004
git-svn-id: http://webrtc.googlecode.com/svn/trunk/webrtc@5021 4adac7df-926f-26a2-2b94-8c16560cd09d
diff --git a/video_engine/internal/video_send_stream.cc b/video_engine/internal/video_send_stream.cc
index d238b95..242f7fa 100644
--- a/video_engine/internal/video_send_stream.cc
+++ b/video_engine/internal/video_send_stream.cc
@@ -12,6 +12,7 @@
#include <string.h>
+#include <string>
#include <vector>
#include "webrtc/common_video/libyuv/include/webrtc_libyuv.h"
@@ -195,6 +196,13 @@
image_process_ = ViEImageProcess::GetInterface(video_engine);
image_process_->RegisterPreEncodeCallback(channel_,
config_.pre_encode_callback);
+
+ if (config.auto_muter.threshold_bps > 0) {
+ assert(config.auto_muter.window_bps >= 0);
+ codec_->EnableAutoMuting(channel_,
+ config.auto_muter.threshold_bps,
+ config.auto_muter.window_bps);
+ }
}
VideoSendStream::~VideoSendStream() {