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

Unified Diff: chromecast/media/cma/backend/alsa/audio_decoder_alsa.cc

Issue 2133293003: [Chromecast] Make ALSA rendering delay either accurate or kNoTimestamp (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Created 4 years, 5 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
Index: chromecast/media/cma/backend/alsa/audio_decoder_alsa.cc
diff --git a/chromecast/media/cma/backend/alsa/audio_decoder_alsa.cc b/chromecast/media/cma/backend/alsa/audio_decoder_alsa.cc
index eb9b6dd81bfe6a41578df7ae44224c2d6b99c1a5..9227b0dd79ce536d9bab1a58b261ecd20acc1de4 100644
--- a/chromecast/media/cma/backend/alsa/audio_decoder_alsa.cc
+++ b/chromecast/media/cma/backend/alsa/audio_decoder_alsa.cc
@@ -77,15 +77,7 @@ bool AudioDecoderAlsa::Initialize() {
is_eos_ = false;
last_buffer_pts_ = std::numeric_limits<int64_t>::min();
- struct timespec now;
- if (clock_gettime(CLOCK_MONOTONIC, &now) == 0) {
- last_known_delay_.timestamp_microseconds =
- static_cast<int64_t>(now.tv_sec) * 1000000 + now.tv_nsec / 1000;
- } else {
- LOG(ERROR) << "Failed to get current timestamp";
- last_known_delay_.timestamp_microseconds = kInvalidDelayTimestamp;
- return false;
- }
+ last_known_delay_.timestamp_microseconds = kInvalidDelayTimestamp;
tianyuwang1 2016/07/08 23:00:00 Can we use media::kNoTimestamp?
kmackay 2016/07/08 23:59:10 I would prefer not to, since media::kNoTimestamp i
last_known_delay_.delay_microseconds = 0;
return true;
}

Powered by Google App Engine
This is Rietveld 408576698