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

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

Issue 1309433002: Report better error message on update sandbox for gn builds (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add cast events to about:tracing Created 5 years, 4 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/sender/frame_sender.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/cast/sender/video_sender.cc
diff --git a/media/cast/sender/video_sender.cc b/media/cast/sender/video_sender.cc
index ebdde8e8ea66872b1236c7d7999fb4ec78fca72d..bb3832b67f5463b20a7f6bf5331fb3c98bdae944 100644
--- a/media/cast/sender/video_sender.cc
+++ b/media/cast/sender/video_sender.cc
@@ -160,6 +160,10 @@ void VideoSender::InsertRawVideoFrame(
last_enqueued_frame_rtp_timestamp_) ||
reference_time <= last_enqueued_frame_reference_time_)) {
VLOG(1) << "Dropping video frame: RTP or reference time did not increase.";
+ TRACE_EVENT_INSTANT2("cast.stream", "Video Frame Drop",
+ TRACE_EVENT_SCOPE_THREAD,
+ "timestamp", reference_time.ToInternalValue(),
+ "rtp_timestamp", rtp_timestamp);
return;
}
@@ -189,11 +193,18 @@ void VideoSender::InsertRawVideoFrame(
// drop every subsequent frame for the rest of the session.
video_encoder_->EmitFrames();
+ TRACE_EVENT_INSTANT2("cast.stream", "Video Frame Drop",
+ TRACE_EVENT_SCOPE_THREAD,
+ "timestamp", reference_time.ToInternalValue(),
+ "rtp_timestamp", rtp_timestamp);
return;
}
uint32 bitrate = congestion_control_->GetBitrate(
reference_time + target_playout_delay_, target_playout_delay_);
+
+ TRACE_COUNTER_ID1("cast.stream", "Video Target Bitrate", this, bitrate);
+
if (bitrate != last_bitrate_) {
video_encoder_->SetBitRate(bitrate);
last_bitrate_ = bitrate;
@@ -210,6 +221,9 @@ void VideoSender::InsertRawVideoFrame(
last_reported_lossy_utilization_,
video_frame.get());
+ TRACE_EVENT_ASYNC_BEGIN2("cast.stream", "Video Encode", video_frame.get(),
+ "timestamp", reference_time.ToInternalValue(),
+ "rtp_timestamp", rtp_timestamp);
if (video_encoder_->EncodeVideoFrame(
video_frame,
reference_time,
@@ -223,6 +237,10 @@ void VideoSender::InsertRawVideoFrame(
last_enqueued_frame_reference_time_ = reference_time;
} else {
VLOG(1) << "Encoder rejected a frame. Skipping...";
+ TRACE_EVENT_INSTANT2("cast.stream", "Video Encode Reject",
+ TRACE_EVENT_SCOPE_THREAD,
+ "timestamp", reference_time.ToInternalValue(),
+ "rtp_timestamp", rtp_timestamp);
}
}
@@ -263,6 +281,11 @@ void VideoSender::OnEncodedVideoFrame(
last_reported_deadline_utilization_ = encoded_frame->deadline_utilization;
last_reported_lossy_utilization_ = encoded_frame->lossy_utilization;
+ TRACE_EVENT_ASYNC_END2("cast.stream", "Video Encode", video_frame.get(),
+ "duration", duration_in_encoder_.ToInternalValue(),
+ "deadline_utilization",
+ last_reported_lossy_utilization_);
+
// Report the resource utilization for processing this frame. Take the
// greater of the two utilization values and attenuate them such that the
// target utilization is reported as the maximum sustainable amount.
« no previous file with comments | « media/cast/sender/frame_sender.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698