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

Unified Diff: webrtc/video/video_receive_stream.cc

Issue 1340623002: Add stats for average QP per frame for VP8 (for received video streams). (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: remove check Created 5 years, 2 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/video_receive_stream.h ('k') | webrtc/video_frame.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/video/video_receive_stream.cc
diff --git a/webrtc/video/video_receive_stream.cc b/webrtc/video/video_receive_stream.cc
index 9aa7da14569bb9328d75cb07e0cf27519f687878..e892989f1670e44b43c9cd8e4a27e3a286d985e1 100644
--- a/webrtc/video/video_receive_stream.cc
+++ b/webrtc/video/video_receive_stream.cc
@@ -19,7 +19,6 @@
#include "webrtc/system_wrappers/interface/clock.h"
#include "webrtc/system_wrappers/interface/logging.h"
#include "webrtc/video/receive_statistics_proxy.h"
-#include "webrtc/video_encoder.h"
#include "webrtc/video_engine/call_stats.h"
#include "webrtc/video_receive_stream.h"
@@ -169,7 +168,6 @@ VideoReceiveStream::VideoReceiveStream(int num_cpu_cores,
channel_group_->GetCallStats()->RegisterStatsObserver(
vie_channel_->GetStatsObserver());
-
// TODO(pbos): This is not fine grained enough...
vie_channel_->SetProtectionMode(config_.rtp.nack.rtp_history_ms > 0, false,
-1, -1);
@@ -278,8 +276,7 @@ VideoReceiveStream::VideoReceiveStream(int num_cpu_cores,
incoming_video_stream_->SetExternalCallback(this);
vie_channel_->SetIncomingVideoStream(incoming_video_stream_.get());
- if (config.pre_decode_callback)
- vie_channel_->RegisterPreDecodeImageCallback(&encoded_frame_proxy_);
+ vie_channel_->RegisterPreDecodeImageCallback(this);
vie_channel_->RegisterPreRenderCallback(this);
}
@@ -365,6 +362,21 @@ int VideoReceiveStream::RenderFrame(const uint32_t /*stream_id*/,
return 0;
}
+// TODO(asapersson): Consider moving callback from video_encoder.h or
+// creating a different callback.
+int32_t VideoReceiveStream::Encoded(
+ const EncodedImage& encoded_image,
+ const CodecSpecificInfo* codec_specific_info,
+ const RTPFragmentationHeader* fragmentation) {
+ stats_proxy_->OnPreDecode(encoded_image, codec_specific_info);
+ if (config_.pre_decode_callback) {
+ // TODO(asapersson): Remove EncodedFrameCallbackAdapter.
+ encoded_frame_proxy_.Encoded(
+ encoded_image, codec_specific_info, fragmentation);
+ }
+ return 0;
+}
+
void VideoReceiveStream::SignalNetworkState(NetworkState state) {
vie_channel_->SetRTCPMode(state == kNetworkUp ? config_.rtp.rtcp_mode
: RtcpMode::kOff);
« no previous file with comments | « webrtc/video/video_receive_stream.h ('k') | webrtc/video_frame.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698