OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 <vector> | 5 #include <vector> |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "media/base/video_frame.h" | 10 #include "media/base/video_frame.h" |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 task_runner_->RunTasks(); | 123 task_runner_->RunTasks(); |
124 | 124 |
125 for (int i = 0; i < 6; ++i) { | 125 for (int i = 0; i < 6; ++i) { |
126 capture_time += base::TimeDelta::FromMilliseconds(33); | 126 capture_time += base::TimeDelta::FromMilliseconds(33); |
127 test_video_encoder_callback_->SetExpectedResult(false, i + 1, i, | 127 test_video_encoder_callback_->SetExpectedResult(false, i + 1, i, |
128 capture_time); | 128 capture_time); |
129 EXPECT_TRUE(video_encoder_->EncodeVideoFrame(video_frame_, capture_time, | 129 EXPECT_TRUE(video_encoder_->EncodeVideoFrame(video_frame_, capture_time, |
130 frame_encoded_callback)); | 130 frame_encoded_callback)); |
131 task_runner_->RunTasks(); | 131 task_runner_->RunTasks(); |
132 } | 132 } |
| 133 // We need to run the task to cleanup the GPU instance. |
| 134 video_encoder_.reset(NULL); |
| 135 task_runner_->RunTasks(); |
133 } | 136 } |
134 | 137 |
135 } // namespace cast | 138 } // namespace cast |
136 } // namespace media | 139 } // namespace media |
OLD | NEW |