| Index: webrtc/video/vie_encoder.cc
|
| diff --git a/webrtc/video/vie_encoder.cc b/webrtc/video/vie_encoder.cc
|
| index 8704947c2eb0213939473c55812685379c6f9b2b..0cfe474b10a96641395f7d615dc5fcf4a42c559f 100644
|
| --- a/webrtc/video/vie_encoder.cc
|
| +++ b/webrtc/video/vie_encoder.cc
|
| @@ -29,7 +29,6 @@
|
| namespace webrtc {
|
|
|
| ViEEncoder::ViEEncoder(uint32_t number_of_cores,
|
| - ProcessThread* module_process_thread,
|
| SendStatisticsProxy* stats_proxy,
|
| OveruseFrameDetector* overuse_detector,
|
| EncodedImageCallback* sink)
|
| @@ -39,18 +38,16 @@ ViEEncoder::ViEEncoder(uint32_t number_of_cores,
|
| video_sender_(Clock::GetRealTimeClock(), this, this, this),
|
| stats_proxy_(stats_proxy),
|
| overuse_detector_(overuse_detector),
|
| - time_of_last_frame_activity_ms_(0),
|
| encoder_config_(),
|
| last_observed_bitrate_bps_(0),
|
| encoder_paused_(true),
|
| encoder_paused_and_dropped_frame_(false),
|
| - module_process_thread_(module_process_thread),
|
| + module_process_thread_(nullptr),
|
| has_received_sli_(false),
|
| picture_id_sli_(0),
|
| has_received_rpsi_(false),
|
| picture_id_rpsi_(0),
|
| video_suspended_(false) {
|
| - module_process_thread_->RegisterModule(&video_sender_);
|
| vp_->EnableTemporalDecimation(true);
|
| }
|
|
|
| @@ -58,7 +55,14 @@ vcm::VideoSender* ViEEncoder::video_sender() {
|
| return &video_sender_;
|
| }
|
|
|
| -ViEEncoder::~ViEEncoder() {
|
| +ViEEncoder::~ViEEncoder() {}
|
| +
|
| +void ViEEncoder::RegisterProcessThread(ProcessThread* module_process_thread) {
|
| + RTC_DCHECK(!module_process_thread_);
|
| + module_process_thread_ = module_process_thread;
|
| + module_process_thread_->RegisterModule(&video_sender_);
|
| +}
|
| +void ViEEncoder::DeRegisterProcessThread() {
|
| module_process_thread_->DeRegisterModule(&video_sender_);
|
| }
|
|
|
| @@ -153,7 +157,6 @@ void ViEEncoder::EncodeVideoFrame(const VideoFrame& video_frame) {
|
| VideoCodecType codec_type;
|
| {
|
| rtc::CritScope lock(&data_cs_);
|
| - time_of_last_frame_activity_ms_ = rtc::TimeMillis();
|
| if (EncoderPaused()) {
|
| TraceFrameDropStart();
|
| return;
|
| @@ -202,11 +205,6 @@ void ViEEncoder::SendKeyFrame() {
|
| video_sender_.IntraFrameRequest(0);
|
| }
|
|
|
| -int64_t ViEEncoder::time_of_last_frame_activity_ms() {
|
| - rtc::CritScope lock(&data_cs_);
|
| - return time_of_last_frame_activity_ms_;
|
| -}
|
| -
|
| void ViEEncoder::OnSetRates(uint32_t bitrate_bps, int framerate) {
|
| if (stats_proxy_)
|
| stats_proxy_->OnSetRates(bitrate_bps, framerate);
|
| @@ -215,10 +213,6 @@ void ViEEncoder::OnSetRates(uint32_t bitrate_bps, int framerate) {
|
| int32_t ViEEncoder::Encoded(const EncodedImage& encoded_image,
|
| const CodecSpecificInfo* codec_specific_info,
|
| const RTPFragmentationHeader* fragmentation) {
|
| - {
|
| - rtc::CritScope lock(&data_cs_);
|
| - time_of_last_frame_activity_ms_ = rtc::TimeMillis();
|
| - }
|
| if (stats_proxy_) {
|
| stats_proxy_->OnSendEncodedImage(encoded_image, codec_specific_info);
|
| }
|
|
|