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

Side by Side Diff: media/cast/video_sender/external_video_encoder_unittest.cc

Issue 185403020: Make VEA client of command buffer; move sync. IPC to VDA/VEA::Initialize() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 7da5b6ec Rebase. 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 PopulateVideoFrame(video_frame_, 123); 104 PopulateVideoFrame(video_frame_, 123);
105 105
106 testing_clock_ = new base::SimpleTestTickClock(); 106 testing_clock_ = new base::SimpleTestTickClock();
107 task_runner_ = new test::FakeSingleThreadTaskRunner(testing_clock_); 107 task_runner_ = new test::FakeSingleThreadTaskRunner(testing_clock_);
108 cast_environment_ = 108 cast_environment_ =
109 new CastEnvironment(scoped_ptr<base::TickClock>(testing_clock_).Pass(), 109 new CastEnvironment(scoped_ptr<base::TickClock>(testing_clock_).Pass(),
110 task_runner_, 110 task_runner_,
111 task_runner_, 111 task_runner_,
112 task_runner_); 112 task_runner_);
113 scoped_ptr<VideoEncodeAccelerator> fake_vea( 113 scoped_ptr<VideoEncodeAccelerator> fake_vea(
114 new test::FakeVideoEncodeAccelerator()); 114 new test::FakeVideoEncodeAccelerator(task_runner_));
115 video_encoder_.reset( 115 video_encoder_.reset(
116 new ExternalVideoEncoder(cast_environment_, 116 new ExternalVideoEncoder(cast_environment_,
117 video_config_, 117 video_config_,
118 base::Bind(&CreateVideoEncodeAccelerator, 118 base::Bind(&CreateVideoEncodeAccelerator,
119 task_runner_, 119 task_runner_,
120 base::Passed(&fake_vea)), 120 base::Passed(&fake_vea)),
121 base::Bind(&CreateSharedMemory))); 121 base::Bind(&CreateSharedMemory)));
122 } 122 }
123 123
124 virtual ~ExternalVideoEncoderTest() {} 124 virtual ~ExternalVideoEncoderTest() {}
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 video_frame_, capture_time, frame_encoded_callback)); 156 video_frame_, capture_time, frame_encoded_callback));
157 task_runner_->RunTasks(); 157 task_runner_->RunTasks();
158 } 158 }
159 // We need to run the task to cleanup the GPU instance. 159 // We need to run the task to cleanup the GPU instance.
160 video_encoder_.reset(NULL); 160 video_encoder_.reset(NULL);
161 task_runner_->RunTasks(); 161 task_runner_->RunTasks();
162 } 162 }
163 163
164 } // namespace cast 164 } // namespace cast
165 } // namespace media 165 } // namespace media
OLDNEW
« no previous file with comments | « media/cast/video_sender/external_video_encoder.cc ('k') | media/cast/video_sender/video_sender_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698