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

Unified Diff: media/test/pipeline_integration_test_base.cc

Issue 1935873002: Implement disabling and enabling media tracks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@track-control2
Patch Set: rebase Created 4 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 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 929b80462157b8ab6cd553799338761b0e61b28a..1a8ac0d6e92e818c9a12cdd456070c9f0a16dc11 100644
--- a/media/test/pipeline_integration_test_base.cc
+++ b/media/test/pipeline_integration_test_base.cc
@@ -51,7 +51,7 @@ PipelineIntegrationTestBase::PipelineIntegrationTestBase()
pipeline_status_(PIPELINE_OK),
last_video_frame_format_(PIXEL_FORMAT_UNKNOWN),
last_video_frame_color_space_(COLOR_SPACE_UNSPECIFIED) {
- base::MD5Init(&md5_context_);
+ ResetVideoHash();
}
PipelineIntegrationTestBase::~PipelineIntegrationTestBase() {
@@ -212,6 +212,7 @@ bool PipelineIntegrationTestBase::Seek(base::TimeDelta seek_time) {
pipeline_->Seek(seek_time, base::Bind(&PipelineIntegrationTestBase::OnSeeked,
base::Unretained(this), seek_time));
base::RunLoop().Run();
+ EXPECT_CALL(*this, OnBufferingStateChange(_)).Times(AnyNumber());
return (pipeline_status_ == PIPELINE_OK);
}
@@ -372,9 +373,15 @@ void PipelineIntegrationTestBase::OnVideoFramePaint(
if (!hashing_enabled_ || last_frame_ == frame)
return;
last_frame_ = frame;
+ DVLOG(3) << __FUNCTION__ << " pts=" << frame->timestamp().InSecondsF();
VideoFrame::HashFrameForTesting(&md5_context_, frame);
}
+void PipelineIntegrationTestBase::ResetVideoHash() {
+ DVLOG(1) << __FUNCTION__;
+ base::MD5Init(&md5_context_);
+}
+
std::string PipelineIntegrationTestBase::GetVideoHash() {
DCHECK(hashing_enabled_);
base::MD5Digest digest;
« 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