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

Unified Diff: media/cast/sender/audio_encoder.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 | « build/update-linux-sandbox.sh ('k') | media/cast/sender/congestion_control.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/cast/sender/audio_encoder.cc
diff --git a/media/cast/sender/audio_encoder.cc b/media/cast/sender/audio_encoder.cc
index 4173ff091b20f3adc8cf9c35cd29db1eb389a16a..2e17b119ccf2a17336d515eb8ef4305321883263 100644
--- a/media/cast/sender/audio_encoder.cc
+++ b/media/cast/sender/audio_encoder.cc
@@ -14,6 +14,7 @@
#include "base/stl_util.h"
#include "base/sys_byteorder.h"
#include "base/time/time.h"
+#include "base/trace_event/trace_event.h"
#include "media/cast/cast_defines.h"
#if !defined(OS_IOS)
@@ -107,6 +108,10 @@ class AudioEncoder::ImplBase
DVLOG(1) << "Skipping RTP timestamp ahead to account for "
<< num_frames_missed * samples_per_frame_
<< " samples' worth of underrun.";
+ TRACE_EVENT_INSTANT2("cast.stream", "Audio Skip",
+ TRACE_EVENT_SCOPE_THREAD,
+ "frames missed", num_frames_missed,
+ "sample_dropped", samples_dropped_from_buffer_);
}
}
frame_capture_time_ = recorded_time - buffer_fill_duration;
@@ -138,6 +143,9 @@ class AudioEncoder::ImplBase
audio_frame->rtp_timestamp = frame_rtp_timestamp_;
audio_frame->reference_time = frame_capture_time_;
+ TRACE_EVENT_ASYNC_BEGIN2("cast.stream", "Audio Encode", audio_frame.get(),
+ "frame_id", frame_id_,
+ "rtp_timestamp", frame_rtp_timestamp_);
if (EncodeFromFilledBuffer(&audio_frame->data)) {
// Compute deadline utilization as the real-world time elapsed divided
// by the signal duration.
@@ -145,6 +153,9 @@ class AudioEncoder::ImplBase
(base::TimeTicks::Now() - start_time).InSecondsF() /
frame_duration_.InSecondsF();
+ TRACE_EVENT_ASYNC_END1("cast.stream", "Audio Encode", audio_frame.get(),
+ "Deadline utilization",
+ audio_frame->deadline_utilization);
cast_environment_->PostTask(
CastEnvironment::MAIN,
FROM_HERE,
« no previous file with comments | « build/update-linux-sandbox.sh ('k') | media/cast/sender/congestion_control.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698