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

Unified Diff: media/filters/pipeline_integration_test_base.cc

Issue 237353007: Refactor VideoRendererImpl to use VideoFrameScheduler. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase over split out CLs Created 6 years, 8 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/filters/pipeline_integration_test_base.h ('k') | media/filters/video_renderer_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/pipeline_integration_test_base.cc
diff --git a/media/filters/pipeline_integration_test_base.cc b/media/filters/pipeline_integration_test_base.cc
index 8abb8915f51b5a3103969dc4a6d715c61546491d..054cc589afc4892486a8067dcd84c491614b3c50 100644
--- a/media/filters/pipeline_integration_test_base.cc
+++ b/media/filters/pipeline_integration_test_base.cc
@@ -6,15 +6,16 @@
#include "base/bind.h"
#include "base/memory/scoped_vector.h"
-#include "media/base/clock.h"
#include "media/base/media_log.h"
#include "media/filters/audio_renderer_impl.h"
#include "media/filters/chunk_demuxer.h"
+#include "media/filters/clockless_video_frame_scheduler.h"
#include "media/filters/ffmpeg_audio_decoder.h"
#include "media/filters/ffmpeg_demuxer.h"
#include "media/filters/ffmpeg_video_decoder.h"
#include "media/filters/file_data_source.h"
#include "media/filters/opus_audio_decoder.h"
+#include "media/filters/video_frame_scheduler_impl.h"
#include "media/filters/vpx_video_decoder.h"
using ::testing::_;
@@ -126,9 +127,6 @@ bool PipelineIntegrationTestBase::Start(const base::FilePath& file_path,
kTestType test_type) {
hashing_enabled_ = test_type == kHashed;
clockless_playback_ = test_type == kClockless;
- if (clockless_playback_) {
- pipeline_->SetClockForTesting(new Clock(&dummy_clock_));
- }
return Start(file_path, expected_status);
}
@@ -243,16 +241,25 @@ PipelineIntegrationTestBase::CreateFilterCollection(
video_decoders.push_back(
new FFmpegVideoDecoder(message_loop_.message_loop_proxy()));
- // Disable frame dropping if hashing is enabled.
+ scoped_ptr<VideoFrameScheduler> scheduler;
+ if (!clockless_playback_) {
+ scheduler.reset(new VideoFrameSchedulerImpl(
+ message_loop_.message_loop_proxy(),
+ base::Bind(&PipelineIntegrationTestBase::OnVideoRendererPaint,
+ base::Unretained(this))));
+ } else {
+ scheduler.reset(new ClocklessVideoFrameScheduler(
+ base::Bind(&PipelineIntegrationTestBase::OnVideoRendererPaint,
+ base::Unretained(this))));
+ }
+
scoped_ptr<VideoRenderer> renderer(new VideoRendererImpl(
message_loop_.message_loop_proxy(),
+ scheduler.Pass(),
video_decoders.Pass(),
base::Bind(&PipelineIntegrationTestBase::SetDecryptor,
base::Unretained(this),
- decryptor),
- base::Bind(&PipelineIntegrationTestBase::OnVideoRendererPaint,
- base::Unretained(this)),
- false));
+ decryptor)));
collection->SetVideoRenderer(renderer.Pass());
if (!clockless_playback_) {
@@ -326,9 +333,4 @@ base::TimeDelta PipelineIntegrationTestBase::GetAudioTime() {
return clockless_audio_sink_->render_time();
}
-base::TimeTicks DummyTickClock::NowTicks() {
- now_ += base::TimeDelta::FromSeconds(60);
- return now_;
-}
-
} // namespace media
« no previous file with comments | « media/filters/pipeline_integration_test_base.h ('k') | media/filters/video_renderer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698