Change NetEq::GetPlayoutTimestamp to return an rtc::Optional<uint32_t>

This is in preparation for changes to when the playout timestamp is
valid.

BUG=webrtc:5669

Review URL: https://codereview.webrtc.org/1853183002

Cr-Commit-Position: refs/heads/master@{#12256}
This commit is contained in:
henrik.lundin
2016-04-06 01:39:22 -07:00
committed by Commit bot
parent 05255b0e8a
commit 9a410dd082
13 changed files with 77 additions and 58 deletions

View File

@ -1522,9 +1522,9 @@ void NetEqDecodingTest::DuplicateCng() {
}
uint32_t NetEqDecodingTest::PlayoutTimestamp() {
uint32_t playout_timestamp = 0;
EXPECT_TRUE(neteq_->GetPlayoutTimestamp(&playout_timestamp));
return playout_timestamp;
rtc::Optional<uint32_t> playout_timestamp = neteq_->GetPlayoutTimestamp();
EXPECT_TRUE(playout_timestamp);
return playout_timestamp.value_or(0);
}
TEST_F(NetEqDecodingTest, DiscardDuplicateCng) { DuplicateCng(); }
@ -1570,5 +1570,4 @@ TEST_F(NetEqDecodingTest, CngFirst) {
// Verify speech output.
EXPECT_EQ(AudioFrame::kNormalSpeech, out_frame_.speech_type_);
}
} // namespace webrtc