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

Unified Diff: media/base/audio_discard_helper_unittest.cc

Issue 2158923004: Convert media constants to constexpr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@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: media/base/audio_discard_helper_unittest.cc
diff --git a/media/base/audio_discard_helper_unittest.cc b/media/base/audio_discard_helper_unittest.cc
index 3763b84004199826973e39b332f1443d2ec94471..f836fa965bdadebc2f91049aff10482cc79e756d 100644
--- a/media/base/audio_discard_helper_unittest.cc
+++ b/media/base/audio_discard_helper_unittest.cc
@@ -30,14 +30,8 @@ static scoped_refptr<DecoderBuffer> CreateEncodedBuffer(
}
static scoped_refptr<AudioBuffer> CreateDecodedBuffer(int frames) {
- return MakeAudioBuffer(kSampleFormatPlanarF32,
- CHANNEL_LAYOUT_MONO,
- 1,
- kSampleRate,
- 0.0f,
- kDataStep,
- frames,
- kNoTimestamp());
+ return MakeAudioBuffer(kSampleFormatPlanarF32, CHANNEL_LAYOUT_MONO, 1,
+ kSampleRate, 0.0f, kDataStep, frames, kNoTimestamp);
}
static float ExtractDecodedData(const scoped_refptr<AudioBuffer>& buffer,
@@ -468,7 +462,7 @@ TEST(AudioDiscardHelperTest, CompleteDiscard) {
scoped_refptr<DecoderBuffer> encoded_buffer =
CreateEncodedBuffer(kTimestamp, kDuration);
encoded_buffer->set_discard_padding(
- std::make_pair(kInfiniteDuration(), base::TimeDelta()));
+ std::make_pair(kInfiniteDuration, base::TimeDelta()));
scoped_refptr<AudioBuffer> decoded_buffer = CreateDecodedBuffer(kTestFrames);
// Verify all of the first buffer is discarded.
@@ -498,7 +492,7 @@ TEST(AudioDiscardHelperTest, CompleteDiscardWithDelayedDiscard) {
scoped_refptr<DecoderBuffer> encoded_buffer =
CreateEncodedBuffer(kTimestamp, kDuration);
encoded_buffer->set_discard_padding(
- std::make_pair(kInfiniteDuration(), base::TimeDelta()));
+ std::make_pair(kInfiniteDuration, base::TimeDelta()));
scoped_refptr<AudioBuffer> decoded_buffer = CreateDecodedBuffer(kTestFrames);
// Setup a delayed discard.
@@ -534,7 +528,7 @@ TEST(AudioDiscardHelperTest, CompleteDiscardWithInitialDiscardDecoderDelay) {
scoped_refptr<DecoderBuffer> encoded_buffer =
CreateEncodedBuffer(kTimestamp, kDuration);
encoded_buffer->set_discard_padding(
- std::make_pair(kInfiniteDuration(), base::TimeDelta()));
+ std::make_pair(kInfiniteDuration, base::TimeDelta()));
scoped_refptr<AudioBuffer> decoded_buffer = CreateDecodedBuffer(kTestFrames);
// Verify all of the first buffer is discarded.

Powered by Google App Engine
This is Rietveld 408576698