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

Unified Diff: media/cast/sender/frame_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/congestion_control.cc ('k') | media/cast/sender/video_sender.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/cast/sender/frame_sender.cc
diff --git a/media/cast/sender/frame_sender.cc b/media/cast/sender/frame_sender.cc
index a7d9a27cb60906d68bbfe93f18a98d7047bbc31a..c56c560e879ca50b39db99210f4ef7971ee2d830 100644
--- a/media/cast/sender/frame_sender.cc
+++ b/media/cast/sender/frame_sender.cc
@@ -260,6 +260,12 @@ void FrameSender::SendEncodedFrame(
encoded_frame->new_playout_delay_ms =
target_playout_delay_.InMilliseconds();
}
+
+ TRACE_EVENT_ASYNC_BEGIN2("cast.stream",
+ is_audio_ ? "Audio Transport" : "Video Transport",
+ frame_id,
+ "timestamp", encoded_frame->reference_time.ToInternalValue(),
+ "rtp_timestamp", encoded_frame->rtp_timestamp);
transport_sender_->InsertFrame(ssrc_, *encoded_frame);
}
@@ -299,6 +305,10 @@ void FrameSender::OnReceivedCastFeedback(const RtcpCastMessage& cast_feedback) {
if (duplicate_ack_counter_ >= 2 && duplicate_ack_counter_ % 3 == 2) {
VLOG(1) << SENDER_SSRC << "Received duplicate ACK for frame "
<< latest_acked_frame_id_;
+ TRACE_EVENT_INSTANT2(
+ "cast.stream", "Duplicate ACK", TRACE_EVENT_SCOPE_THREAD,
+ "ack_frame_id", cast_feedback.ack_frame_id,
+ "last_sent_frame_id", last_sent_frame_id_);
ResendForKickstart();
}
} else {
@@ -316,6 +326,18 @@ void FrameSender::OnReceivedCastFeedback(const RtcpCastMessage& cast_feedback) {
is_audio_ ? AUDIO_EVENT : VIDEO_EVENT,
GetRecordedRtpTimestamp(cast_feedback.ack_frame_id),
cast_feedback.ack_frame_id);
+ if (!duplicate_ack_counter_) {
+ if (have_valid_rtt) {
+ TRACE_EVENT_ASYNC_END1("cast.stream",
+ is_audio_ ? "Audio Transport" : "Video Transport",
+ cast_feedback.ack_frame_id,
+ "RTT", current_round_trip_time_.ToInternalValue());
+ } else {
+ TRACE_EVENT_ASYNC_END0("cast.stream",
+ is_audio_ ? "Audio Transport" : "Video Transport",
+ cast_feedback.ack_frame_id);
+ }
+ }
const bool is_acked_out_of_order =
static_cast<int32>(cast_feedback.ack_frame_id -
@@ -332,6 +354,11 @@ void FrameSender::OnReceivedCastFeedback(const RtcpCastMessage& cast_feedback) {
}
transport_sender_->CancelSendingFrames(ssrc_, cancel_sending_frames);
latest_acked_frame_id_ = cast_feedback.ack_frame_id;
+ } else {
+ TRACE_EVENT_INSTANT2(
+ "cast.stream", "ACK out of order", TRACE_EVENT_SCOPE_THREAD,
+ "ack_frame_id", cast_feedback.ack_frame_id,
+ "latest_acked_frame_id", latest_acked_frame_id_);
}
}
« no previous file with comments | « media/cast/sender/congestion_control.cc ('k') | media/cast/sender/video_sender.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698