 Chromium Code Reviews
 Chromium Code Reviews Issue 131763002:
  Adds MediaStreamSource, MediaStreamAudioSource and MediaStreamVideoCaptureDeviceSource  (Closed) 
  Base URL: svn://svn.chromium.org/chrome/trunk/src
    
  
    Issue 131763002:
  Adds MediaStreamSource, MediaStreamAudioSource and MediaStreamVideoCaptureDeviceSource  (Closed) 
  Base URL: svn://svn.chromium.org/chrome/trunk/src| OLD | NEW | 
|---|---|
| (Empty) | |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "content/renderer/media/media_stream_video_capture_device_source.h" | |
| 6 | |
| 7 #include "base/bind.h" | |
| 8 #include "base/debug/trace_event.h" | |
| 9 #include "content/renderer/media/rtc_media_constraints.h" | |
| 10 #include "content/renderer/media/rtc_video_capturer.h" | |
| 11 | |
| 12 namespace content { | |
| 13 | |
| 14 MediaStreamVideoCaptureDeviceSource::MediaStreamVideoCaptureDeviceSource( | |
| 15 const StreamDeviceInfo& device_info, | |
| 16 const SourceStoppedCallback& stop_callback, | |
| 17 MediaStreamDependencyFactory* factory) | |
| 18 : MediaStreamVideoSource(factory) { | |
| 19 SetDeviceInfo(device_info); | |
| 20 SetStopCallback(stop_callback); | |
| 21 } | |
| 22 | |
| 23 MediaStreamVideoCaptureDeviceSource::~MediaStreamVideoCaptureDeviceSource() { | |
| 24 } | |
| 25 | |
| 26 void MediaStreamVideoCaptureDeviceSource::Init( | |
| 27 const blink::WebMediaConstraints& constraints) { | |
| 28 // Create the webrtc::VideoSource implementation. | |
| 29 RTCMediaConstraints webrtc_constraints(constraints); | |
| 30 cricket::VideoCapturer* capturer = | |
| 31 factory()->CreateVideoCapturer(device_info()); | |
| 32 SetAdapter(factory()->CreateVideoSource(capturer, | |
| 33 &webrtc_constraints)); | |
| 
Ronghua Wu (Left Chromium)
2014/01/16 23:02:37
I think this should call the base class Init at th
 
perkj_chrome
2014/01/17 13:19:45
ptal - its the other way around. The base class ca
 | |
| 34 } | |
| 35 | |
| 36 } // namespace content | |
| OLD | NEW |