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

Unified Diff: media/cast/test/encode_decode_test.cc

Issue 145443005: Fixes for memory and threading issues in cast (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix compile Created 6 years, 11 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/cast/rtcp/rtcp_unittest.cc ('k') | media/cast/test/end2end_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/cast/test/encode_decode_test.cc
diff --git a/media/cast/test/encode_decode_test.cc b/media/cast/test/encode_decode_test.cc
index 9464872f8803af3bcd83d1906c055d670991e5ac..1d5fe567254b825b84e1059c11e0997f1fedbc4c 100644
--- a/media/cast/test/encode_decode_test.cc
+++ b/media/cast/test/encode_decode_test.cc
@@ -73,14 +73,16 @@ class EncodeDecodeTestFrameCallback :
class EncodeDecodeTest : public ::testing::Test {
protected:
EncodeDecodeTest()
- : task_runner_(new test::FakeTaskRunner(&testing_clock_)),
+ : testing_clock_(new base::SimpleTestTickClock()),
+ task_runner_(new test::FakeTaskRunner(testing_clock_)),
// CastEnvironment will only be used by the vp8 decoder; Enable only the
// video decoder and main threads.
- cast_environment_(new CastEnvironment(&testing_clock_, task_runner_,
+ cast_environment_(new CastEnvironment(
+ scoped_ptr<base::TickClock>(testing_clock_).Pass(), task_runner_,
NULL, NULL, NULL, task_runner_, NULL,
GetDefaultCastReceiverLoggingConfig())),
test_callback_(new EncodeDecodeTestFrameCallback()) {
- testing_clock_.Advance(
+ testing_clock_->Advance(
base::TimeDelta::FromMilliseconds(kStartMillisecond));
encoder_config_.max_number_of_video_buffers_used = 1;
encoder_config_.number_of_cores = 1;
@@ -112,7 +114,7 @@ class EncodeDecodeTest : public ::testing::Test {
scoped_ptr<Vp8Encoder> encoder_;
scoped_ptr<Vp8Decoder> decoder_;
scoped_refptr<media::VideoFrame> video_frame_;
- base::SimpleTestTickClock testing_clock_;
+ base::SimpleTestTickClock* testing_clock_; // Owned by CastEnvironment.
scoped_refptr<test::FakeTaskRunner> task_runner_;
scoped_refptr<CastEnvironment> cast_environment_;
scoped_refptr<EncodeDecodeTestFrameCallback> test_callback_;
« no previous file with comments | « media/cast/rtcp/rtcp_unittest.cc ('k') | media/cast/test/end2end_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698