Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1389)

Unified Diff: webrtc/video_engine/vie_encoder.cc

Issue 1374673003: Move sent key frame stats to send_statistics_proxy class. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: removed functions (SentFrameCount, SendCodecStatistics) Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/video_engine/vie_encoder.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/video_engine/vie_encoder.cc
diff --git a/webrtc/video_engine/vie_encoder.cc b/webrtc/video_engine/vie_encoder.cc
index cc4783f55bc4c0e20b34fefbe2ae5c289b1ad1ed..fcdc5bb34e0fd011f220a84db75badeab5d96335 100644
--- a/webrtc/video_engine/vie_encoder.cc
+++ b/webrtc/video_engine/vie_encoder.cc
@@ -137,8 +137,7 @@ ViEEncoder::ViEEncoder(int32_t channel_id,
picture_id_sli_(0),
has_received_rpsi_(false),
picture_id_rpsi_(0),
- video_suspended_(false),
- start_ms_(Clock::GetRealTimeClock()->TimeInMilliseconds()) {
+ video_suspended_(false) {
bitrate_observer_.reset(new ViEBitrateObserver(this));
}
@@ -175,25 +174,6 @@ void ViEEncoder::StopThreadsAndRemoveSharedMembers() {
}
ViEEncoder::~ViEEncoder() {
- UpdateHistograms();
-}
-
-void ViEEncoder::UpdateHistograms() {
- int64_t elapsed_sec =
- (Clock::GetRealTimeClock()->TimeInMilliseconds() - start_ms_) / 1000;
- if (elapsed_sec < metrics::kMinRunTimeInSeconds) {
- return;
- }
- webrtc::VCMFrameCount frames;
- if (vcm_->SentFrameCount(frames) != VCM_OK) {
- return;
- }
- uint32_t total_frames = frames.numKeyFrames + frames.numDeltaFrames;
- if (total_frames > 0) {
- RTC_HISTOGRAM_COUNTS_1000("WebRTC.Video.KeyFramesSentInPermille",
- static_cast<int>(
- (frames.numKeyFrames * 1000.0f / total_frames) + 0.5f));
- }
}
int ViEEncoder::Owner() const {
@@ -493,17 +473,6 @@ int ViEEncoder::SendKeyFrame() {
return vcm_->IntraFrameRequest(0);
}
-int32_t ViEEncoder::SendCodecStatistics(
- uint32_t* num_key_frames, uint32_t* num_delta_frames) {
- webrtc::VCMFrameCount sent_frames;
- if (vcm_->SentFrameCount(sent_frames) != VCM_OK) {
- return -1;
- }
- *num_key_frames = sent_frames.numKeyFrames;
- *num_delta_frames = sent_frames.numDeltaFrames;
- return 0;
-}
-
uint32_t ViEEncoder::LastObservedBitrateBps() const {
CriticalSectionScoped cs(data_cs_.get());
return last_observed_bitrate_bps_;
« no previous file with comments | « webrtc/video_engine/vie_encoder.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698