OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "content/browser/renderer_host/media/video_capture_controller.h" | 5 #include "content/browser/renderer_host/media/video_capture_controller.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <set> | 8 #include <set> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
495 scoped_refptr<media::VideoFrame> frame = | 495 scoped_refptr<media::VideoFrame> frame = |
496 media::VideoFrame::WrapExternalPackedMemory( | 496 media::VideoFrame::WrapExternalPackedMemory( |
497 media::VideoFrame::I420, | 497 media::VideoFrame::I420, |
498 dimensions, | 498 dimensions, |
499 gfx::Rect(dimensions), | 499 gfx::Rect(dimensions), |
500 dimensions, | 500 dimensions, |
501 yplane, | 501 yplane, |
502 media::VideoFrame::AllocationSize(media::VideoFrame::I420, | 502 media::VideoFrame::AllocationSize(media::VideoFrame::I420, |
503 dimensions), | 503 dimensions), |
504 base::SharedMemory::NULLHandle(), | 504 base::SharedMemory::NULLHandle(), |
| 505 0, |
505 base::TimeDelta(), | 506 base::TimeDelta(), |
506 base::Closure()); | 507 base::Closure()); |
507 DCHECK(frame.get()); | 508 DCHECK(frame.get()); |
508 | 509 |
509 VideoCaptureFormat format( | 510 VideoCaptureFormat format( |
510 dimensions, frame_format.frame_rate, media::PIXEL_FORMAT_I420); | 511 dimensions, frame_format.frame_rate, media::PIXEL_FORMAT_I420); |
511 BrowserThread::PostTask( | 512 BrowserThread::PostTask( |
512 BrowserThread::IO, | 513 BrowserThread::IO, |
513 FROM_HERE, | 514 FROM_HERE, |
514 base::Bind( | 515 base::Bind( |
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
729 DCHECK_CURRENTLY_ON(BrowserThread::IO); | 730 DCHECK_CURRENTLY_ON(BrowserThread::IO); |
730 int active_client_count = 0; | 731 int active_client_count = 0; |
731 for (ControllerClient* client : controller_clients_) { | 732 for (ControllerClient* client : controller_clients_) { |
732 if (!client->paused) | 733 if (!client->paused) |
733 ++active_client_count; | 734 ++active_client_count; |
734 } | 735 } |
735 return active_client_count; | 736 return active_client_count; |
736 } | 737 } |
737 | 738 |
738 } // namespace content | 739 } // namespace content |
OLD | NEW |