Index: webrtc/video/vie_encoder.cc |
diff --git a/webrtc/video/vie_encoder.cc b/webrtc/video/vie_encoder.cc |
index a147b2415c5a02caf9fd692cfc2663990e381121..99a4d6e5ef9de305de151986f637a05d150a610f 100644 |
--- a/webrtc/video/vie_encoder.cc |
+++ b/webrtc/video/vie_encoder.cc |
@@ -24,14 +24,15 @@ |
#include "webrtc/modules/bitrate_controller/include/bitrate_controller.h" |
#include "webrtc/modules/pacing/paced_sender.h" |
#include "webrtc/modules/utility/include/process_thread.h" |
+#include "webrtc/modules/video_coding/encoded_frame.h" |
mflodman
2016/01/21 08:00:05
Shouldn't this be webrtc/video_frame.h?
pbos-webrtc
2016/01/21 14:18:33
Done.
|
#include "webrtc/modules/video_coding/include/video_codec_interface.h" |
#include "webrtc/modules/video_coding/include/video_coding.h" |
#include "webrtc/modules/video_coding/include/video_coding_defines.h" |
-#include "webrtc/modules/video_coding/encoded_frame.h" |
#include "webrtc/system_wrappers/include/clock.h" |
#include "webrtc/system_wrappers/include/critical_section_wrapper.h" |
#include "webrtc/system_wrappers/include/metrics.h" |
#include "webrtc/system_wrappers/include/tick_util.h" |
+#include "webrtc/video/overuse_frame_detector.h" |
#include "webrtc/video/payload_router.h" |
#include "webrtc/video/send_statistics_proxy.h" |
@@ -108,6 +109,7 @@ ViEEncoder::ViEEncoder(uint32_t number_of_cores, |
ProcessThread* module_process_thread, |
SendStatisticsProxy* stats_proxy, |
I420FrameCallback* pre_encode_callback, |
+ OveruseFrameDetector* overuse_detector, |
PacedSender* pacer, |
BitrateAllocator* bitrate_allocator) |
: number_of_cores_(number_of_cores), |
@@ -120,6 +122,7 @@ ViEEncoder::ViEEncoder(uint32_t number_of_cores, |
data_cs_(CriticalSectionWrapper::CreateCriticalSection()), |
stats_proxy_(stats_proxy), |
pre_encode_callback_(pre_encode_callback), |
+ overuse_detector_(overuse_detector), |
pacer_(pacer), |
bitrate_allocator_(bitrate_allocator), |
time_of_last_frame_activity_ms_(0), |
@@ -464,12 +467,17 @@ int32_t ViEEncoder::SendData( |
if (stats_proxy_ != NULL) |
stats_proxy_->OnSendEncodedImage(encoded_image, rtp_video_hdr); |
- return send_payload_router_->RoutePayload( |
- encoded_image._frameType, payload_type, encoded_image._timeStamp, |
- encoded_image.capture_time_ms_, encoded_image._buffer, |
- encoded_image._length, &fragmentation_header, rtp_video_hdr) |
- ? 0 |
- : -1; |
+ bool success = |
+ send_payload_router_->RoutePayload(encoded_image._frameType, |
+ payload_type, |
+ encoded_image._timeStamp, |
+ encoded_image.capture_time_ms_, |
+ encoded_image._buffer, |
+ encoded_image._length, |
+ &fragmentation_header, |
+ rtp_video_hdr); |
+ overuse_detector_->FrameSent(encoded_image); |
+ return success ? 0 : -1; |
} |
void ViEEncoder::OnEncoderImplementationName( |