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

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

Issue 218763007: Update MediaStreamTrack::Stop to latest draft. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed comments. Created 6 years, 8 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 2014 The Chromium Authors. All rights reserved. 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 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/media_stream_video_capturer_source.h" 5 #include "content/renderer/media/media_stream_video_capturer_source.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "content/renderer/media/video_capture_impl_manager.h" 9 #include "content/renderer/media/video_capture_impl_manager.h"
10 #include "content/renderer/render_thread_impl.h" 10 #include "content/renderer/render_thread_impl.h"
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 got_first_frame_ = false; 92 got_first_frame_ = false;
93 93
94 // Increase the reference count to ensure the object is not deleted until 94 // Increase the reference count to ensure the object is not deleted until
95 // it is unregistered in VideoCapturerDelegate::OnRemoved. 95 // it is unregistered in VideoCapturerDelegate::OnRemoved.
96 AddRef(); 96 AddRef();
97 capture_engine_->StartCapture(this, params); 97 capture_engine_->StartCapture(this, params);
98 } 98 }
99 99
100 void VideoCapturerDelegate::StopDeliver() { 100 void VideoCapturerDelegate::StopDeliver() {
101 // Immediately make sure we don't provide more frames. 101 // Immediately make sure we don't provide more frames.
102 DVLOG(3) << "VideoCapturerDelegate::StopCapture()"; 102 DVLOG(3) << "VideoCapturerDelegate::StopDeliver()";
103 DCHECK(message_loop_proxy_->BelongsToCurrentThread()); 103 DCHECK(message_loop_proxy_->BelongsToCurrentThread());
104 capture_engine_->StopCapture(this); 104 capture_engine_->StopCapture(this);
105 new_frame_callback_.Reset(); 105 new_frame_callback_.Reset();
106 started_callback_.Reset(); 106 started_callback_.Reset();
107 source_formats_callback_.Reset(); 107 source_formats_callback_.Reset();
108 } 108 }
109 109
110 void VideoCapturerDelegate::OnStarted(media::VideoCapture* capture) { 110 void VideoCapturerDelegate::OnStarted(media::VideoCapture* capture) {
111 DVLOG(3) << "VideoCapturerDelegate::OnStarted"; 111 DVLOG(3) << "VideoCapturerDelegate::OnStarted";
112 DCHECK(!message_loop_proxy_->BelongsToCurrentThread()); 112 DCHECK(!message_loop_proxy_->BelongsToCurrentThread());
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 base::Unretained(this)), 253 base::Unretained(this)),
254 base::Bind(&MediaStreamVideoCapturerSource::OnStartDone, 254 base::Bind(&MediaStreamVideoCapturerSource::OnStartDone,
255 base::Unretained(this))); 255 base::Unretained(this)));
256 } 256 }
257 257
258 void MediaStreamVideoCapturerSource::StopSourceImpl() { 258 void MediaStreamVideoCapturerSource::StopSourceImpl() {
259 delegate_->StopDeliver(); 259 delegate_->StopDeliver();
260 } 260 }
261 261
262 } // namespace content 262 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698