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

Side by Side Diff: content/browser/renderer_host/media/video_capture_controller.h

Issue 10391065: handle the case when device is closed before media pipeline is fully initialized. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: code review Created 8 years, 6 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 // VideoCaptureController is the glue between VideoCaptureHost, 5 // VideoCaptureController is the glue between VideoCaptureHost,
6 // VideoCaptureManager and VideoCaptureDevice. 6 // VideoCaptureManager and VideoCaptureDevice.
7 // It provides functions for VideoCaptureHost to start a VideoCaptureDevice and 7 // It provides functions for VideoCaptureHost to start a VideoCaptureDevice and
8 // is responsible for keeping track of shared DIBs and filling them with I420 8 // is responsible for keeping track of shared DIBs and filling them with I420
9 // video frames for IPC communication between VideoCaptureHost and 9 // video frames for IPC communication between VideoCaptureHost and
10 // VideoCaptureMessageFilter. 10 // VideoCaptureMessageFilter.
(...skipping 15 matching lines...) Expand all
26 #include "content/browser/renderer_host/media/video_capture_controller_event_han dler.h" 26 #include "content/browser/renderer_host/media/video_capture_controller_event_han dler.h"
27 #include "content/common/media/video_capture.h" 27 #include "content/common/media/video_capture.h"
28 #include "media/video/capture/video_capture.h" 28 #include "media/video/capture/video_capture.h"
29 #include "media/video/capture/video_capture_device.h" 29 #include "media/video/capture/video_capture_device.h"
30 #include "media/video/capture/video_capture_types.h" 30 #include "media/video/capture/video_capture_types.h"
31 31
32 namespace media_stream { 32 namespace media_stream {
33 class VideoCaptureManager; 33 class VideoCaptureManager;
34 } // namespace media_stream 34 } // namespace media_stream
35 35
36 class VideoCaptureController 36 class CONTENT_EXPORT VideoCaptureController
mflodman_chromium_OOO 2012/05/29 09:11:03 Is CONTENT_EXPORT really needed? I didn't find whe
wjia(left Chromium) 2012/05/29 16:59:14 It's needed by VideoCaptureControllerTest.
mflodman_chromium_OOO 2012/05/29 18:19:54 Ah, got it.
37 : public base::RefCountedThreadSafe<VideoCaptureController>, 37 : public base::RefCountedThreadSafe<VideoCaptureController>,
38 public media::VideoCaptureDevice::EventHandler { 38 public media::VideoCaptureDevice::EventHandler {
39 public: 39 public:
40 VideoCaptureController( 40 VideoCaptureController(
41 media_stream::VideoCaptureManager* video_capture_manager); 41 media_stream::VideoCaptureManager* video_capture_manager);
42 42
43 // Start video capturing and try to use the resolution specified in 43 // Start video capturing and try to use the resolution specified in
44 // |params|. 44 // |params|.
45 // When capturing has started, the |event_handler| receives a call OnFrameInfo 45 // When capturing has started, the |event_handler| receives a call OnFrameInfo
46 // with resolution that best matches the requested that the video 46 // with resolution that best matches the requested that the video
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 141
142 media_stream::VideoCaptureManager* video_capture_manager_; 142 media_stream::VideoCaptureManager* video_capture_manager_;
143 143
144 bool device_in_use_; 144 bool device_in_use_;
145 video_capture::State state_; 145 video_capture::State state_;
146 146
147 DISALLOW_IMPLICIT_CONSTRUCTORS(VideoCaptureController); 147 DISALLOW_IMPLICIT_CONSTRUCTORS(VideoCaptureController);
148 }; 148 };
149 149
150 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_CONTROLLER_H_ 150 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698