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

Unified Diff: media/cast/video_sender/video_sender.cc

Issue 286203004: Cast: Log target encode bitrate before a frame is encoded. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 7 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 | « media/cast/video_sender/video_sender.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/cast/video_sender/video_sender.cc
diff --git a/media/cast/video_sender/video_sender.cc b/media/cast/video_sender/video_sender.cc
index 153b579a6960c52b3fc5f7c785503b2546810f50..913cf8e6ad8b507e4537e000a168686cbe8cf52f 100644
--- a/media/cast/video_sender/video_sender.cc
+++ b/media/cast/video_sender/video_sender.cc
@@ -156,13 +156,15 @@ void VideoSender::InsertRawVideoFrame(
video_frame,
capture_time,
base::Bind(&VideoSender::SendEncodedVideoFrameMainThread,
- weak_factory_.GetWeakPtr()))) {
+ weak_factory_.GetWeakPtr(),
+ current_requested_bitrate_))) {
frames_in_encoder_++;
UpdateFramesInFlight();
}
}
void VideoSender::SendEncodedVideoFrameMainThread(
+ int requested_bitrate_before_encode,
scoped_ptr<transport::EncodedVideoFrame> encoded_frame,
const base::TimeTicks& capture_time) {
DCHECK(cast_environment_->CurrentlyOn(CastEnvironment::MAIN));
@@ -179,7 +181,7 @@ void VideoSender::SendEncodedVideoFrameMainThread(
last_send_time_, FRAME_ENCODED, VIDEO_EVENT, encoded_frame->rtp_timestamp,
frame_id, static_cast<int>(encoded_frame->data.size()),
encoded_frame->key_frame,
- current_requested_bitrate_);
+ requested_bitrate_before_encode);
// Used by chrome/browser/extension/api/cast_streaming/performance_test.cc
TRACE_EVENT_INSTANT1(
« no previous file with comments | « media/cast/video_sender/video_sender.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698