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

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: Fix mojo renderer. Created 5 years, 4 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
« no previous file with comments | « media/test/pipeline_integration_test_base.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..cd72c3d69a6068084734381b82ac08facdb5e310 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.
+ 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,8 +284,12 @@ 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_)
- audio_sink_->StartAudioHashForTesting();
+ if (hashing_enabled_) {
+ if (clockless_playback_)
+ clockless_audio_sink_->StartAudioHashForTesting();
+ else
+ audio_sink_->StartAudioHashForTesting();
+ }
scoped_ptr<RendererImpl> renderer_impl(
new RendererImpl(message_loop_.task_runner(),
@@ -319,6 +326,9 @@ std::string PipelineIntegrationTestBase::GetVideoHash() {
std::string PipelineIntegrationTestBase::GetAudioHash() {
DCHECK(hashing_enabled_);
+
+ if (clockless_playback_)
+ return clockless_audio_sink_->GetAudioHashForTesting();
return audio_sink_->GetAudioHashForTesting();
}
« no previous file with comments | « 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