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

Side by Side Diff: media/filters/pipeline_integration_test_base.cc

Issue 10535101: Replace Pipeline::SetNetworkActivity() with BufferedDataSource -> WebMediaPlayerImpl callback. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « media/filters/pipeline_integration_test.cc ('k') | media/tools/player_wtl/movie.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "media/filters/pipeline_integration_test_base.h" 5 #include "media/filters/pipeline_integration_test_base.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "media/base/media_log.h" 8 #include "media/base/media_log.h"
9 #include "media/crypto/aes_decryptor.h" 9 #include "media/crypto/aes_decryptor.h"
10 #include "media/filters/audio_renderer_impl.h" 10 #include "media/filters/audio_renderer_impl.h"
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 pipeline_status_ = status; 85 pipeline_status_ = status;
86 message_loop_.PostTask(FROM_HERE, MessageLoop::QuitClosure()); 86 message_loop_.PostTask(FROM_HERE, MessageLoop::QuitClosure());
87 } 87 }
88 88
89 bool PipelineIntegrationTestBase::Start(const std::string& url, 89 bool PipelineIntegrationTestBase::Start(const std::string& url,
90 PipelineStatus expected_status) { 90 PipelineStatus expected_status) {
91 pipeline_->Start( 91 pipeline_->Start(
92 CreateFilterCollection(url), 92 CreateFilterCollection(url),
93 base::Bind(&PipelineIntegrationTestBase::OnEnded, base::Unretained(this)), 93 base::Bind(&PipelineIntegrationTestBase::OnEnded, base::Unretained(this)),
94 base::Bind(&PipelineIntegrationTestBase::OnError, base::Unretained(this)), 94 base::Bind(&PipelineIntegrationTestBase::OnError, base::Unretained(this)),
95 NetworkEventCB(),
96 QuitOnStatusCB(expected_status)); 95 QuitOnStatusCB(expected_status));
97 message_loop_.Run(); 96 message_loop_.Run();
98 return (pipeline_status_ == PIPELINE_OK); 97 return (pipeline_status_ == PIPELINE_OK);
99 } 98 }
100 99
101 bool PipelineIntegrationTestBase::Start(const std::string& url, 100 bool PipelineIntegrationTestBase::Start(const std::string& url,
102 PipelineStatus expected_status, 101 PipelineStatus expected_status,
103 bool hashing_enabled) { 102 bool hashing_enabled) {
104 hashing_enabled_ = hashing_enabled; 103 hashing_enabled_ = hashing_enabled;
105 return Start(url, expected_status); 104 return Start(url, expected_status);
106 } 105 }
107 106
108 bool PipelineIntegrationTestBase::Start(const std::string& url) { 107 bool PipelineIntegrationTestBase::Start(const std::string& url) {
109 pipeline_->Start( 108 pipeline_->Start(
110 CreateFilterCollection(url), 109 CreateFilterCollection(url),
111 base::Bind(&PipelineIntegrationTestBase::OnEnded, base::Unretained(this)), 110 base::Bind(&PipelineIntegrationTestBase::OnEnded, base::Unretained(this)),
112 base::Bind(&PipelineIntegrationTestBase::OnError, base::Unretained(this)), 111 base::Bind(&PipelineIntegrationTestBase::OnError, base::Unretained(this)),
113 NetworkEventCB(),
114 base::Bind(&PipelineIntegrationTestBase::OnStatusCallback, 112 base::Bind(&PipelineIntegrationTestBase::OnStatusCallback,
115 base::Unretained(this))); 113 base::Unretained(this)));
116 message_loop_.Run(); 114 message_loop_.Run();
117 return (pipeline_status_ == PIPELINE_OK); 115 return (pipeline_status_ == PIPELINE_OK);
118 } 116 }
119 117
120 void PipelineIntegrationTestBase::Play() { 118 void PipelineIntegrationTestBase::Play() {
121 pipeline_->SetPlaybackRate(1); 119 pipeline_->SetPlaybackRate(1);
122 } 120 }
123 121
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 base::MD5Final(&digest, &md5_context_); 233 base::MD5Final(&digest, &md5_context_);
236 return base::MD5DigestToBase16(digest); 234 return base::MD5DigestToBase16(digest);
237 } 235 }
238 236
239 std::string PipelineIntegrationTestBase::GetAudioHash() { 237 std::string PipelineIntegrationTestBase::GetAudioHash() {
240 DCHECK(hashing_enabled_); 238 DCHECK(hashing_enabled_);
241 return audio_sink_->GetAudioHashForTesting(); 239 return audio_sink_->GetAudioHashForTesting();
242 } 240 }
243 241
244 } // namespace media 242 } // namespace media
OLDNEW
« no previous file with comments | « media/filters/pipeline_integration_test.cc ('k') | media/tools/player_wtl/movie.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698