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

Unified Diff: webrtc/modules/audio_coding/neteq/neteq_impl.cc

Issue 1853183002: Change NetEq::GetPlayoutTimestamp to return an rtc::Optional<uint32_t> (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Fixing Minyue's comments Created 4 years, 8 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: webrtc/modules/audio_coding/neteq/neteq_impl.cc
diff --git a/webrtc/modules/audio_coding/neteq/neteq_impl.cc b/webrtc/modules/audio_coding/neteq/neteq_impl.cc
index aa973811082593c01217c9915e8b2116f78c1e95..b4dfc9986dace2a1b94bf8545785ce83a83c12bd 100644
--- a/webrtc/modules/audio_coding/neteq/neteq_impl.cc
+++ b/webrtc/modules/audio_coding/neteq/neteq_impl.cc
@@ -401,15 +401,15 @@ void NetEqImpl::DisableVad() {
vad_->Disable();
}
-bool NetEqImpl::GetPlayoutTimestamp(uint32_t* timestamp) {
+rtc::Optional<uint32_t> NetEqImpl::GetPlayoutTimestamp() {
rtc::CritScope lock(&crit_sect_);
if (first_packet_) {
// We don't have a valid RTP timestamp until we have decoded our first
// RTP packet.
- return false;
+ return rtc::Optional<uint32_t>();
}
- *timestamp = timestamp_scaler_->ToExternal(playout_timestamp_);
- return true;
+ return rtc::Optional<uint32_t>(
+ timestamp_scaler_->ToExternal(playout_timestamp_));
}
int NetEqImpl::last_output_sample_rate_hz() const {

Powered by Google App Engine
This is Rietveld 408576698