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 478 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
489 scoped_refptr<media::VideoFrame> frame = | 489 scoped_refptr<media::VideoFrame> frame = |
490 media::VideoFrame::WrapExternalPackedMemory( | 490 media::VideoFrame::WrapExternalPackedMemory( |
491 media::VideoFrame::I420, | 491 media::VideoFrame::I420, |
492 dimensions, | 492 dimensions, |
493 gfx::Rect(dimensions), | 493 gfx::Rect(dimensions), |
494 dimensions, | 494 dimensions, |
495 yplane, | 495 yplane, |
496 media::VideoFrame::AllocationSize(media::VideoFrame::I420, | 496 media::VideoFrame::AllocationSize(media::VideoFrame::I420, |
497 dimensions), | 497 dimensions), |
498 base::SharedMemory::NULLHandle(), | 498 base::SharedMemory::NULLHandle(), |
| 499 0, |
499 base::TimeDelta(), | 500 base::TimeDelta(), |
500 base::Closure()); | 501 base::Closure()); |
501 DCHECK(frame.get()); | 502 DCHECK(frame.get()); |
502 | 503 |
503 VideoCaptureFormat format( | 504 VideoCaptureFormat format( |
504 dimensions, frame_format.frame_rate, media::PIXEL_FORMAT_I420); | 505 dimensions, frame_format.frame_rate, media::PIXEL_FORMAT_I420); |
505 BrowserThread::PostTask( | 506 BrowserThread::PostTask( |
506 BrowserThread::IO, | 507 BrowserThread::IO, |
507 FROM_HERE, | 508 FROM_HERE, |
508 base::Bind( | 509 base::Bind( |
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
723 DCHECK_CURRENTLY_ON(BrowserThread::IO); | 724 DCHECK_CURRENTLY_ON(BrowserThread::IO); |
724 int active_client_count = 0; | 725 int active_client_count = 0; |
725 for (ControllerClient* client : controller_clients_) { | 726 for (ControllerClient* client : controller_clients_) { |
726 if (!client->paused) | 727 if (!client->paused) |
727 ++active_client_count; | 728 ++active_client_count; |
728 } | 729 } |
729 return active_client_count; | 730 return active_client_count; |
730 } | 731 } |
731 | 732 |
732 } // namespace content | 733 } // namespace content |
OLD | NEW |