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 450 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
461 break; | 461 break; |
462 case media::PIXEL_FORMAT_ARGB: | 462 case media::PIXEL_FORMAT_ARGB: |
463 origin_colorspace = libyuv::FOURCC_ARGB; | 463 origin_colorspace = libyuv::FOURCC_ARGB; |
464 break; | 464 break; |
465 case media::PIXEL_FORMAT_MJPEG: | 465 case media::PIXEL_FORMAT_MJPEG: |
466 origin_colorspace = libyuv::FOURCC_MJPG; | 466 origin_colorspace = libyuv::FOURCC_MJPG; |
467 break; | 467 break; |
468 default: | 468 default: |
469 NOTREACHED(); | 469 NOTREACHED(); |
470 } | 470 } |
471 | 471 |
mcasas
2015/02/04 17:00:02
Add a comment as to why _GE.
| |
472 DCHECK_GE(static_cast<size_t>(length), frame_format.ImageAllocationSize()); | |
473 | |
472 libyuv::ConvertToI420(data, | 474 libyuv::ConvertToI420(data, |
473 length, | 475 length, |
474 yplane, | 476 yplane, |
475 yplane_stride, | 477 yplane_stride, |
476 uplane, | 478 uplane, |
477 uv_plane_stride, | 479 uv_plane_stride, |
478 vplane, | 480 vplane, |
479 uv_plane_stride, | 481 uv_plane_stride, |
480 crop_x, | 482 crop_x, |
481 crop_y, | 483 crop_y, |
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
723 DCHECK_CURRENTLY_ON(BrowserThread::IO); | 725 DCHECK_CURRENTLY_ON(BrowserThread::IO); |
724 int active_client_count = 0; | 726 int active_client_count = 0; |
725 for (ControllerClient* client : controller_clients_) { | 727 for (ControllerClient* client : controller_clients_) { |
726 if (!client->paused) | 728 if (!client->paused) |
727 ++active_client_count; | 729 ++active_client_count; |
728 } | 730 } |
729 return active_client_count; | 731 return active_client_count; |
730 } | 732 } |
731 | 733 |
732 } // namespace content | 734 } // namespace content |
OLD | NEW |