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

Unified Diff: content/renderer/media/video_capture_impl.cc

Issue 13616004: Switch event type when a capture device has been stopped from the render process. This make sure th… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed code review comments. Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/renderer/media/rtc_video_capturer.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/video_capture_impl.cc
diff --git a/content/renderer/media/video_capture_impl.cc b/content/renderer/media/video_capture_impl.cc
index aa428d8c8bcf856af7b361f3fefe4221e293114a..ebc7a6bfecfe2702a4365e07e2e0e030e5b8f837 100644
--- a/content/renderer/media/video_capture_impl.cc
+++ b/content/renderer/media/video_capture_impl.cc
@@ -321,6 +321,16 @@ void VideoCaptureImpl::DoStateChangedOnCaptureThread(VideoCaptureState state) {
clients_.clear();
state_ = VIDEO_CAPTURE_STATE_ERROR;
break;
+ case VIDEO_CAPTURE_STATE_ENDED:
+ DVLOG(1) << "OnStateChanged: ended!, device_id = " << device_id_;
+ STLDeleteValues(&cached_dibs_);
+ for (ClientInfo::iterator it = clients_.begin();
+ it != clients_.end(); ++it) {
+ it->first->OnRemoved(this);
+ }
+ clients_.clear();
+ state_ = VIDEO_CAPTURE_STATE_ENDED;
+ break;
default:
break;
}
« no previous file with comments | « content/renderer/media/rtc_video_capturer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698