Index: webrtc/modules/video_coding/main/source/video_coding_impl.h |
diff --git a/webrtc/modules/video_coding/main/source/video_coding_impl.h b/webrtc/modules/video_coding/main/source/video_coding_impl.h |
index c8f82215813fe408aaf4a1b209a3ef4006bbaaa8..bd079d271f4b0a740b60417bce0295461e9bea06 100644 |
--- a/webrtc/modules/video_coding/main/source/video_coding_impl.h |
+++ b/webrtc/modules/video_coding/main/source/video_coding_impl.h |
@@ -113,6 +113,28 @@ class VideoSender { |
int32_t Process(); |
private: |
+ |
+ struct EncodedFrameStats { |
+ EncodedFrameStats() |
+ : sum_encode_time_ms(0), |
+ max_encode_time_ms(-1), |
+ encoded_frames(0) {} |
+ |
+ void Update(int64_t encode_time_ms); |
+ int64_t AvgEncodeTimeMs() { |
+ return (encoded_frames > 0) ? (sum_encode_time_ms / encoded_frames) : -1; |
+ } |
+ int64_t MaxEncodeTimeMs() { |
+ return (encoded_frames > 0) ? max_encode_time_ms : -1; |
+ } |
+ |
+ private: |
+ int64_t sum_encode_time_ms; // The total encode time of encoded frames. |
+ int64_t max_encode_time_ms; // The maximum encode time of encoded frames. |
+ size_t encoded_frames; // The number of encoded frames. |
+ }; |
+ |
+ void UpdateHistograms(); |
Clock* clock_; |
rtc::scoped_ptr<CriticalSectionWrapper> process_crit_sect_; |
@@ -132,6 +154,8 @@ class VideoSender { |
VCMQMSettingsCallback* const qm_settings_callback_; |
VCMProtectionCallback* protection_callback_; |
+ |
+ EncodedFrameStats stats_; |
}; |
class VideoReceiver { |