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

Side by Side Diff: content/renderer/media/media_stream_video_capture_device_source.cc

Issue 131763002: Adds MediaStreamSource, MediaStreamAudioSource and MediaStreamVideoCaptureDeviceSource (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed unused file. Created 6 years, 11 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
(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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698