OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "remoting/test/test_video_renderer.h" | 5 #include "remoting/test/test_video_renderer.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/callback_helpers.h" | 10 #include "base/callback_helpers.h" |
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
303 SetCodecForDecoding(codec); | 303 SetCodecForDecoding(codec); |
304 } | 304 } |
305 | 305 |
306 protocol::VideoStub* TestVideoRenderer::GetVideoStub() { | 306 protocol::VideoStub* TestVideoRenderer::GetVideoStub() { |
307 DCHECK(thread_checker_.CalledOnValidThread()); | 307 DCHECK(thread_checker_.CalledOnValidThread()); |
308 | 308 |
309 VLOG(2) << "TestVideoRenderer::GetVideoStub() Called"; | 309 VLOG(2) << "TestVideoRenderer::GetVideoStub() Called"; |
310 return this; | 310 return this; |
311 } | 311 } |
312 | 312 |
| 313 protocol::FrameConsumer* TestVideoRenderer::GetFrameConsumer() { |
| 314 DCHECK(thread_checker_.CalledOnValidThread()); |
| 315 NOTREACHED(); |
| 316 return nullptr; |
| 317 } |
| 318 |
313 void TestVideoRenderer::ProcessVideoPacket(scoped_ptr<VideoPacket> video_packet, | 319 void TestVideoRenderer::ProcessVideoPacket(scoped_ptr<VideoPacket> video_packet, |
314 const base::Closure& done) { | 320 const base::Closure& done) { |
315 DCHECK(thread_checker_.CalledOnValidThread()); | 321 DCHECK(thread_checker_.CalledOnValidThread()); |
316 DCHECK(video_decode_task_runner_) << "Failed to start video decode thread"; | 322 DCHECK(video_decode_task_runner_) << "Failed to start video decode thread"; |
317 | 323 |
318 if (video_packet->has_data() && video_packet->data().size() != 0) { | 324 if (video_packet->has_data() && video_packet->data().size() != 0) { |
319 VLOG(2) << "process video packet is called!"; | 325 VLOG(2) << "process video packet is called!"; |
320 | 326 |
321 // Post video process task to the video decode thread. | 327 // Post video process task to the video decode thread. |
322 base::Closure process_video_task = base::Bind( | 328 base::Closure process_video_task = base::Bind( |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
368 DCHECK(thread_checker_.CalledOnValidThread()); | 374 DCHECK(thread_checker_.CalledOnValidThread()); |
369 | 375 |
370 video_decode_task_runner_->PostTask( | 376 video_decode_task_runner_->PostTask( |
371 FROM_HERE, | 377 FROM_HERE, |
372 base::Bind(&Core::save_frame_data_to_disk, base::Unretained(core_.get()), | 378 base::Bind(&Core::save_frame_data_to_disk, base::Unretained(core_.get()), |
373 save_frame_data_to_disk)); | 379 save_frame_data_to_disk)); |
374 } | 380 } |
375 | 381 |
376 } // namespace test | 382 } // namespace test |
377 } // namespace remoting | 383 } // namespace remoting |
OLD | NEW |