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

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

Issue 500653003: Video capture frame size: separate coded size and visible size. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix content_unittests build. Created 6 years, 3 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 | Annotate | Revision Log
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 586 matching lines...) Expand 10 before | Expand all | Expand 10 after
597 if (is_new_buffer) { 597 if (is_new_buffer) {
598 // On the first use of a buffer on a client, share the memory handle. 598 // On the first use of a buffer on a client, share the memory handle.
599 size_t memory_size = 0; 599 size_t memory_size = 0;
600 base::SharedMemoryHandle remote_handle = buffer_pool_->ShareToProcess( 600 base::SharedMemoryHandle remote_handle = buffer_pool_->ShareToProcess(
601 buffer->id(), client->render_process_handle, &memory_size); 601 buffer->id(), client->render_process_handle, &memory_size);
602 client->event_handler->OnBufferCreated( 602 client->event_handler->OnBufferCreated(
603 client->controller_id, remote_handle, memory_size, buffer->id()); 603 client->controller_id, remote_handle, memory_size, buffer->id());
604 } 604 }
605 605
606 client->event_handler->OnBufferReady( 606 client->event_handler->OnBufferReady(
607 client->controller_id, buffer->id(), buffer_format, timestamp); 607 client->controller_id, buffer->id(), buffer_format,
608 frame->visible_rect(), timestamp);
608 } 609 }
609 610
610 bool inserted = 611 bool inserted =
611 client->active_buffers.insert(std::make_pair(buffer->id(), frame)) 612 client->active_buffers.insert(std::make_pair(buffer->id(), frame))
612 .second; 613 .second;
613 DCHECK(inserted) << "Unexpected duplicate buffer: " << buffer->id(); 614 DCHECK(inserted) << "Unexpected duplicate buffer: " << buffer->id();
614 count++; 615 count++;
615 } 616 }
616 } 617 }
617 618
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
676 } 677 }
677 return NULL; 678 return NULL;
678 } 679 }
679 680
680 int VideoCaptureController::GetClientCount() { 681 int VideoCaptureController::GetClientCount() {
681 DCHECK_CURRENTLY_ON(BrowserThread::IO); 682 DCHECK_CURRENTLY_ON(BrowserThread::IO);
682 return controller_clients_.size(); 683 return controller_clients_.size();
683 } 684 }
684 685
685 } // namespace content 686 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698