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

Side by Side Diff: content/browser/renderer_host/media/video_capture_controller.cc

Issue 877353002: media: VideoFrame: add offset for shared memory buffers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Simplify shm pointer computation Created 5 years, 10 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
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698