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/renderer/pepper/pepper_video_capture_host.h" | 5 #include "content/renderer/pepper/pepper_video_capture_host.h" |
6 | 6 |
7 #include "content/renderer/media/media_stream_video_source.h" | 7 #include "content/renderer/media/media_stream_video_source.h" |
8 #include "content/renderer/pepper/host_globals.h" | 8 #include "content/renderer/pepper/host_globals.h" |
9 #include "content/renderer/pepper/pepper_media_device_manager.h" | 9 #include "content/renderer/pepper/pepper_media_device_manager.h" |
10 #include "content/renderer/pepper/pepper_platform_video_capture.h" | 10 #include "content/renderer/pepper/pepper_platform_video_capture.h" |
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
254 SetRequestedInfo(requested_info, buffer_count); | 254 SetRequestedInfo(requested_info, buffer_count); |
255 | 255 |
256 GURL document_url = renderer_ppapi_host_->GetDocumentURL(pp_instance()); | 256 GURL document_url = renderer_ppapi_host_->GetDocumentURL(pp_instance()); |
257 if (!document_url.is_valid()) | 257 if (!document_url.is_valid()) |
258 return PP_ERROR_FAILED; | 258 return PP_ERROR_FAILED; |
259 | 259 |
260 platform_video_capture_.reset(new PepperPlatformVideoCapture( | 260 platform_video_capture_.reset(new PepperPlatformVideoCapture( |
261 renderer_ppapi_host_->GetRenderFrameForInstance(pp_instance())-> | 261 renderer_ppapi_host_->GetRenderFrameForInstance(pp_instance())-> |
262 GetRoutingID(), | 262 GetRoutingID(), |
263 device_id, | 263 device_id, |
264 document_url, | |
265 this)); | 264 this)); |
266 | 265 |
267 open_reply_context_ = context->MakeReplyMessageContext(); | 266 open_reply_context_ = context->MakeReplyMessageContext(); |
268 | 267 |
269 return PP_OK_COMPLETIONPENDING; | 268 return PP_OK_COMPLETIONPENDING; |
270 } | 269 } |
271 | 270 |
272 int32_t PepperVideoCaptureHost::OnStartCapture( | 271 int32_t PepperVideoCaptureHost::OnStartCapture( |
273 ppapi::host::HostMessageContext* context) { | 272 ppapi::host::HostMessageContext* context) { |
274 if (!SetStatus(PP_VIDEO_CAPTURE_STATUS_STARTING, false) || | 273 if (!SetStatus(PP_VIDEO_CAPTURE_STATUS_STARTING, false) || |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
412 : in_use(false), data(NULL), buffer() { | 411 : in_use(false), data(NULL), buffer() { |
413 } | 412 } |
414 | 413 |
415 PepperVideoCaptureHost::BufferInfo::BufferInfo(const BufferInfo& other) = | 414 PepperVideoCaptureHost::BufferInfo::BufferInfo(const BufferInfo& other) = |
416 default; | 415 default; |
417 | 416 |
418 PepperVideoCaptureHost::BufferInfo::~BufferInfo() { | 417 PepperVideoCaptureHost::BufferInfo::~BufferInfo() { |
419 } | 418 } |
420 | 419 |
421 } // namespace content | 420 } // namespace content |
OLD | NEW |