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

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

Issue 120893002: Eliminate video capture thread in renderer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comments 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
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/media/rtc_video_capturer.h" 5 #include "content/renderer/media/rtc_video_capturer.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/debug/trace_event.h" 8 #include "base/debug/trace_event.h"
9 #include "media/base/video_frame.h" 9 #include "media/base/video_frame.h"
10 10
11 namespace content { 11 namespace content {
12 12
13 RtcVideoCapturer::RtcVideoCapturer(const media::VideoCaptureSessionId id, 13 RtcVideoCapturer::RtcVideoCapturer(const media::VideoCaptureSessionId id,
14 VideoCaptureImplManager* vc_manager,
15 bool is_screencast) 14 bool is_screencast)
16 : is_screencast_(is_screencast), 15 : is_screencast_(is_screencast),
17 delegate_(new RtcVideoCaptureDelegate(id, vc_manager)), 16 delegate_(new RtcVideoCaptureDelegate(id)),
18 state_(VIDEO_CAPTURE_STATE_STOPPED) {} 17 state_(VIDEO_CAPTURE_STATE_STOPPED) {}
19 18
20 RtcVideoCapturer::~RtcVideoCapturer() { 19 RtcVideoCapturer::~RtcVideoCapturer() {
21 DCHECK(VIDEO_CAPTURE_STATE_STOPPED); 20 DCHECK(VIDEO_CAPTURE_STATE_STOPPED);
22 DVLOG(3) << " RtcVideoCapturer::dtor"; 21 DVLOG(3) << " RtcVideoCapturer::dtor";
23 } 22 }
24 23
25 cricket::CaptureState RtcVideoCapturer::Start( 24 cricket::CaptureState RtcVideoCapturer::Start(
26 const cricket::VideoFormat& capture_format) { 25 const cricket::VideoFormat& capture_format) {
27 DVLOG(3) << " RtcVideoCapturer::Start "; 26 DVLOG(3) << " RtcVideoCapturer::Start ";
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 converted_state = cricket::CS_FAILED; 149 converted_state = cricket::CS_FAILED;
151 break; 150 break;
152 default: 151 default:
153 NOTREACHED(); 152 NOTREACHED();
154 break; 153 break;
155 } 154 }
156 SignalStateChange(this, converted_state); 155 SignalStateChange(this, converted_state);
157 } 156 }
158 157
159 } // namespace content 158 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698