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

Unified Diff: media/test/pipeline_integration_test_base.cc

Issue 1260193005: Fix incorrect opus seek preroll and flaky pre-skip removal. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add test cases. Created 5 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/test/pipeline_integration_test_base.cc
diff --git a/media/test/pipeline_integration_test_base.cc b/media/test/pipeline_integration_test_base.cc
index 71521c4f237ecc95352939333d91f1d759c7498a..ccf12ac87a41c094fb9ecbc8c8558ea9fa7c3c35 100644
--- a/media/test/pipeline_integration_test_base.cc
+++ b/media/test/pipeline_integration_test_base.cc
@@ -148,9 +148,9 @@ PipelineStatus PipelineIntegrationTestBase::Start(const std::string& filename,
}
PipelineStatus PipelineIntegrationTestBase::Start(const std::string& filename,
- kTestType test_type) {
- hashing_enabled_ = test_type == kHashed;
- clockless_playback_ = test_type == kClockless;
+ uint8_t test_type) {
+ hashing_enabled_ = test_type & kHashed;
+ clockless_playback_ = test_type & kClockless;
return Start(filename);
}
@@ -268,12 +268,15 @@ scoped_ptr<Renderer> PipelineIntegrationTestBase::CreateRenderer() {
audio_decoders.push_back(
new OpusAudioDecoder(message_loop_.task_runner()));
- AudioParameters out_params(AudioParameters::AUDIO_PCM_LOW_LATENCY,
- CHANNEL_LAYOUT_STEREO,
- 44100,
- 16,
- 512);
- hardware_config_.UpdateOutputConfig(out_params);
+ // Don't allow the audio renderer to resample buffers if hashing is enabled.
wolenetz 2015/07/29 21:57:27 Is AudioHash too sensitive to resampling, despite
DaleCurtis 2015/07/30 01:28:14 Possibly, the tests files are also mono, so they w
+ if (!hashing_enabled_) {
+ AudioParameters out_params(AudioParameters::AUDIO_PCM_LOW_LATENCY,
+ CHANNEL_LAYOUT_STEREO,
+ 44100,
+ 16,
+ 512);
+ hardware_config_.UpdateOutputConfig(out_params);
+ }
scoped_ptr<AudioRenderer> audio_renderer(new AudioRendererImpl(
message_loop_.task_runner(),
@@ -281,7 +284,9 @@ scoped_ptr<Renderer> PipelineIntegrationTestBase::CreateRenderer() {
? static_cast<AudioRendererSink*>(clockless_audio_sink_.get())
: audio_sink_.get(),
audio_decoders.Pass(), hardware_config_, new MediaLog()));
- if (hashing_enabled_)
+ if (hashing_enabled_ && clockless_playback_)
+ clockless_audio_sink_->StartAudioHashForTesting();
+ else
audio_sink_->StartAudioHashForTesting();
wolenetz 2015/07/29 21:57:27 hmm. Previously we only hashed if |hashing_enabled
DaleCurtis 2015/07/30 01:28:14 Done.
scoped_ptr<RendererImpl> renderer_impl(
@@ -319,6 +324,9 @@ std::string PipelineIntegrationTestBase::GetVideoHash() {
std::string PipelineIntegrationTestBase::GetAudioHash() {
DCHECK(hashing_enabled_);
+
+ if (clockless_playback_)
+ return clockless_audio_sink_->GetAudioHashForTesting();
return audio_sink_->GetAudioHashForTesting();
}
« media/test/pipeline_integration_test_base.h ('K') | « media/test/pipeline_integration_test_base.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698