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

Unified Diff: content/browser/renderer_host/media/video_capture_host.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
Index: content/browser/renderer_host/media/video_capture_host.cc
diff --git a/content/browser/renderer_host/media/video_capture_host.cc b/content/browser/renderer_host/media/video_capture_host.cc
index 8e7231c46d13f7fa3fb0f2d8743e3fddd3617b5b..91d8f5173d505bab9a7a99bea8fe02b24c5b122c 100644
--- a/content/browser/renderer_host/media/video_capture_host.cc
+++ b/content/browser/renderer_host/media/video_capture_host.cc
@@ -50,6 +50,7 @@ void VideoCaptureHost::OnDestruct() const {
// Implements VideoCaptureControllerEventHandler.
void VideoCaptureHost::OnError(const VideoCaptureControllerID& controller_id) {
+ DVLOG(1) << "VideoCaptureHost::OnError";
BrowserThread::PostTask(
BrowserThread::IO, FROM_HERE,
base::Bind(&VideoCaptureHost::DoHandleErrorOnIOThread,
@@ -88,10 +89,11 @@ void VideoCaptureHost::OnFrameInfo(
this, controller_id, width, height, frame_per_second));
}
-void VideoCaptureHost::OnPaused(const VideoCaptureControllerID& controller_id) {
+void VideoCaptureHost::OnEnded(const VideoCaptureControllerID& controller_id) {
+ DVLOG(1) << "VideoCaptureHost::OnEnded";
BrowserThread::PostTask(
BrowserThread::IO, FROM_HERE,
- base::Bind(&VideoCaptureHost::DoPausedOnIOThread, this, controller_id));
+ base::Bind(&VideoCaptureHost::DoEndedOnIOThread, this, controller_id));
}
void VideoCaptureHost::DoSendNewBufferOnIOThread(
@@ -132,15 +134,15 @@ void VideoCaptureHost::DoHandleErrorOnIOThread(
DeleteVideoCaptureControllerOnIOThread(controller_id);
}
-void VideoCaptureHost::DoPausedOnIOThread(
+void VideoCaptureHost::DoEndedOnIOThread(
const VideoCaptureControllerID& controller_id) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
-
+ DVLOG(1) << "VideoCaptureHost::DoEndedOnIOThread";
if (entries_.find(controller_id) == entries_.end())
return;
Send(new VideoCaptureMsg_StateChanged(controller_id.device_id,
- VIDEO_CAPTURE_STATE_PAUSED));
+ VIDEO_CAPTURE_STATE_ENDED));
DeleteVideoCaptureControllerOnIOThread(controller_id);
}
@@ -241,6 +243,7 @@ void VideoCaptureHost::OnStopCapture(int device_id) {
void VideoCaptureHost::OnPauseCapture(int device_id) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
+ DVLOG(1) << "VideoCaptureHost::OnPauseCapture, device_id " << device_id;
// Not used.
Send(new VideoCaptureMsg_StateChanged(device_id, VIDEO_CAPTURE_STATE_ERROR));
}
« no previous file with comments | « content/browser/renderer_host/media/video_capture_host.h ('k') | content/browser/renderer_host/media/video_capture_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698