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

Side by Side Diff: media/video/capture/win/video_capture_device_win.h

Issue 83633008: Reland: Reorganize media::VideoCapture* types (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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 // Windows specific implementation of VideoCaptureDevice. 5 // Windows specific implementation of VideoCaptureDevice.
6 // DirectShow is used for capturing. DirectShow provide its own threads 6 // DirectShow is used for capturing. DirectShow provide its own threads
7 // for capturing. 7 // for capturing.
8 8
9 #ifndef MEDIA_VIDEO_CAPTURE_WIN_VIDEO_CAPTURE_DEVICE_WIN_H_ 9 #ifndef MEDIA_VIDEO_CAPTURE_WIN_VIDEO_CAPTURE_DEVICE_WIN_H_
10 #define MEDIA_VIDEO_CAPTURE_WIN_VIDEO_CAPTURE_DEVICE_WIN_H_ 10 #define MEDIA_VIDEO_CAPTURE_WIN_VIDEO_CAPTURE_DEVICE_WIN_H_
(...skipping 22 matching lines...) Expand all
33 public VideoCaptureDevice, 33 public VideoCaptureDevice,
34 public SinkFilterObserver { 34 public SinkFilterObserver {
35 public: 35 public:
36 explicit VideoCaptureDeviceWin(const Name& device_name); 36 explicit VideoCaptureDeviceWin(const Name& device_name);
37 virtual ~VideoCaptureDeviceWin(); 37 virtual ~VideoCaptureDeviceWin();
38 // Opens the device driver for this device. 38 // Opens the device driver for this device.
39 // This function is used by the static VideoCaptureDevice::Create function. 39 // This function is used by the static VideoCaptureDevice::Create function.
40 bool Init(); 40 bool Init();
41 41
42 // VideoCaptureDevice implementation. 42 // VideoCaptureDevice implementation.
43 virtual void AllocateAndStart( 43 virtual void AllocateAndStart(const VideoCaptureParams& params,
44 const VideoCaptureCapability& capture_format, 44 scoped_ptr<VideoCaptureDevice::Client> client)
45 scoped_ptr<VideoCaptureDevice::Client> client) OVERRIDE; 45 OVERRIDE;
46 virtual void StopAndDeAllocate() OVERRIDE; 46 virtual void StopAndDeAllocate() OVERRIDE;
47 47
48 static void GetDeviceNames(Names* device_names); 48 static void GetDeviceNames(Names* device_names);
49 49
50 private: 50 private:
51 enum InternalState { 51 enum InternalState {
52 kIdle, // The device driver is opened but camera is not in use. 52 kIdle, // The device driver is opened but camera is not in use.
53 kCapturing, // Video is being captured. 53 kCapturing, // Video is being captured.
54 kError // Error accessing HW functions. 54 kError // Error accessing HW functions.
55 // User needs to recover by destroying the object. 55 // User needs to recover by destroying the object.
(...skipping 16 matching lines...) Expand all
72 base::win::ScopedComPtr<IPin> output_capture_pin_; 72 base::win::ScopedComPtr<IPin> output_capture_pin_;
73 // Used when using a MJPEG decoder. 73 // Used when using a MJPEG decoder.
74 base::win::ScopedComPtr<IBaseFilter> mjpg_filter_; 74 base::win::ScopedComPtr<IBaseFilter> mjpg_filter_;
75 base::win::ScopedComPtr<IPin> input_mjpg_pin_; 75 base::win::ScopedComPtr<IPin> input_mjpg_pin_;
76 base::win::ScopedComPtr<IPin> output_mjpg_pin_; 76 base::win::ScopedComPtr<IPin> output_mjpg_pin_;
77 77
78 scoped_refptr<SinkFilter> sink_filter_; 78 scoped_refptr<SinkFilter> sink_filter_;
79 79
80 // Map of all capabilities this device support. 80 // Map of all capabilities this device support.
81 CapabilityList capabilities_; 81 CapabilityList capabilities_;
82 VideoCaptureCapability current_setting_; 82 VideoCaptureFormat capture_format_;
83 83
84 DISALLOW_IMPLICIT_CONSTRUCTORS(VideoCaptureDeviceWin); 84 DISALLOW_IMPLICIT_CONSTRUCTORS(VideoCaptureDeviceWin);
85 }; 85 };
86 86
87 } // namespace media 87 } // namespace media
88 88
89 #endif // MEDIA_VIDEO_CAPTURE_WIN_VIDEO_CAPTURE_DEVICE_WIN_H_ 89 #endif // MEDIA_VIDEO_CAPTURE_WIN_VIDEO_CAPTURE_DEVICE_WIN_H_
OLDNEW
« no previous file with comments | « media/video/capture/win/video_capture_device_mf_win.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