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

Unified Diff: media/video/capture/win/video_capture_device_win.h

Issue 10662049: Move the device enumerate/open/close work to device thread from IO thread (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: small changes to fix the trybots' failure Created 8 years, 5 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/test/webrtc_audio_device_test.cc ('k') | media/video/capture/win/video_capture_device_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/video/capture/win/video_capture_device_win.h
diff --git a/media/video/capture/win/video_capture_device_win.h b/media/video/capture/win/video_capture_device_win.h
index 1f7e03ace9427b29da1f29a2a5c7a6796c49f0eb..7e9f65ba9af46b3a8673902b5f798077273271d6 100644
--- a/media/video/capture/win/video_capture_device_win.h
+++ b/media/video/capture/win/video_capture_device_win.h
@@ -17,8 +17,8 @@
#include <map>
#include <string>
+#include "base/threading/non_thread_safe.h"
#include "base/threading/thread.h"
-#include "base/win/scoped_com_initializer.h"
#include "base/win/scoped_comptr.h"
#include "media/video/capture/video_capture_device.h"
#include "media/video/capture/video_capture_types.h"
@@ -27,8 +27,10 @@
namespace media {
+// All the methods in the class can only be run on a COM initialized thread.
class VideoCaptureDeviceWin
- : public VideoCaptureDevice,
+ : public base::NonThreadSafe,
+ public VideoCaptureDevice,
public SinkFilterObserver {
public:
explicit VideoCaptureDeviceWin(const Name& device_name);
@@ -64,8 +66,6 @@ class VideoCaptureDeviceWin
int GetBestMatchedCapability(int width, int height, int frame_rate);
void SetErrorState(const char* reason);
- base::win::ScopedCOMInitializer initialize_com_;
-
Name device_name_;
InternalState state_;
VideoCaptureDevice::EventHandler* observer_;
« no previous file with comments | « content/test/webrtc_audio_device_test.cc ('k') | media/video/capture/win/video_capture_device_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698