Chromium Code Reviews| Index: content/browser/renderer_host/media/video_capture_controller.cc |
| diff --git a/content/browser/renderer_host/media/video_capture_controller.cc b/content/browser/renderer_host/media/video_capture_controller.cc |
| index 9778a9c491260df5054420e182fd6d347491a1ce..1e24d1b88384e05e43a12fc5a236fe54310fcafe 100644 |
| --- a/content/browser/renderer_host/media/video_capture_controller.cc |
| +++ b/content/browser/renderer_host/media/video_capture_controller.cc |
| @@ -153,6 +153,10 @@ void VideoCaptureController::AddClient( |
| << ", " << params.session_id |
| << ")"; |
| + // If this is the first client added to the controller, cache the parameters. |
| + if (!controller_clients_.size()) |
| + video_capture_format_ = params.requested_format; |
|
perkj_chrome
2013/11/13 13:04:18
So adding the first client implies that the captur
no longer working on chromium
2013/11/13 16:20:22
curiously, what is this video_capture_format_ cach
|
| + |
| // Signal error in case device is already in error state. |
| if (state_ == VIDEO_CAPTURE_STATE_ERROR) { |
| event_handler->OnError(id); |
| @@ -229,6 +233,12 @@ void VideoCaptureController::ReturnBuffer( |
| buffer_pool_->RelinquishConsumerHold(buffer_id, 1); |
| } |
| +const media::VideoCaptureFormat& |
| +VideoCaptureController::GetVideoCaptureFormat() const { |
|
no longer working on chromium
2013/11/13 16:20:22
same question on the naming since there might be m
|
| + DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
| + return video_capture_format_; |
| +} |
| + |
| scoped_refptr<media::VideoFrame> |
| VideoCaptureController::VideoCaptureDeviceClient::ReserveOutputBuffer( |
| const gfx::Size& size) { |