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

Unified Diff: content/renderer/media/rtc_video_capturer.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_capture_delegate.cc ('k') | content/renderer/media/video_capture_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/rtc_video_capturer.cc
diff --git a/content/renderer/media/rtc_video_capturer.cc b/content/renderer/media/rtc_video_capturer.cc
index 9aaf484aec3e15dd66ec314e14432e5b570df210..f60e6c80c71657d853bef0d26a77d735e8a5ed27 100644
--- a/content/renderer/media/rtc_video_capturer.cc
+++ b/content/renderer/media/rtc_video_capturer.cc
@@ -134,6 +134,7 @@ void RtcVideoCapturer::OnFrameCaptured(
void RtcVideoCapturer::OnStateChange(
RtcVideoCaptureDelegate::CaptureState state) {
cricket::CaptureState converted_state = cricket::CS_FAILED;
+ DVLOG(3) << " RtcVideoCapturer::OnStateChange " << state;
switch (state) {
case RtcVideoCaptureDelegate::CAPTURE_STOPPED:
converted_state = cricket::CS_STOPPED;
@@ -142,6 +143,10 @@ void RtcVideoCapturer::OnStateChange(
converted_state = cricket::CS_RUNNING;
break;
case RtcVideoCaptureDelegate::CAPTURE_FAILED:
+ // TODO(perkj): Update the comments in the the definition of
+ // cricket::CS_FAILED. According to the comments, cricket::CS_FAILED
+ // means that the capturer failed to start. But here and in libjingle it
+ // is also used if an error occur during capturing.
converted_state = cricket::CS_FAILED;
break;
default:
« no previous file with comments | « content/renderer/media/rtc_video_capture_delegate.cc ('k') | content/renderer/media/video_capture_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698