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

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

Issue 83633008: Reland: Reorganize media::VideoCapture* types (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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_MF_WIN_H_ 9 #ifndef MEDIA_VIDEO_CAPTURE_WIN_VIDEO_CAPTURE_DEVICE_MF_WIN_H_
10 #define MEDIA_VIDEO_CAPTURE_WIN_VIDEO_CAPTURE_DEVICE_MF_WIN_H_ 10 #define MEDIA_VIDEO_CAPTURE_WIN_VIDEO_CAPTURE_DEVICE_MF_WIN_H_
(...skipping 20 matching lines...) Expand all
31 public VideoCaptureDevice { 31 public VideoCaptureDevice {
32 public: 32 public:
33 explicit VideoCaptureDeviceMFWin(const Name& device_name); 33 explicit VideoCaptureDeviceMFWin(const Name& device_name);
34 virtual ~VideoCaptureDeviceMFWin(); 34 virtual ~VideoCaptureDeviceMFWin();
35 35
36 // Opens the device driver for this device. 36 // Opens the device driver for this device.
37 // This function is used by the static VideoCaptureDevice::Create function. 37 // This function is used by the static VideoCaptureDevice::Create function.
38 bool Init(); 38 bool Init();
39 39
40 // VideoCaptureDevice implementation. 40 // VideoCaptureDevice implementation.
41 virtual void AllocateAndStart( 41 virtual void AllocateAndStart(const VideoCaptureParams& params,
42 const VideoCaptureCapability& capture_format, 42 scoped_ptr<VideoCaptureDevice::Client> client)
43 scoped_ptr<VideoCaptureDevice::Client> client) OVERRIDE; 43 OVERRIDE;
44 virtual void StopAndDeAllocate() OVERRIDE; 44 virtual void StopAndDeAllocate() OVERRIDE;
45 45
46 // Returns true iff the current platform supports the Media Foundation API 46 // Returns true iff the current platform supports the Media Foundation API
47 // and that the DLLs are available. On Vista this API is an optional download 47 // and that the DLLs are available. On Vista this API is an optional download
48 // but the API is advertised as a part of Windows 7 and onwards. However, 48 // but the API is advertised as a part of Windows 7 and onwards. However,
49 // we've seen that the required DLLs are not available in some Win7 49 // we've seen that the required DLLs are not available in some Win7
50 // distributions such as Windows 7 N and Windows 7 KN. 50 // distributions such as Windows 7 N and Windows 7 KN.
51 static bool PlatformSupported(); 51 static bool PlatformSupported();
52 52
53 static void GetDeviceNames(Names* device_names); 53 static void GetDeviceNames(Names* device_names);
(...skipping 10 matching lines...) Expand all
64 private: 64 private:
65 void OnError(HRESULT hr); 65 void OnError(HRESULT hr);
66 66
67 Name name_; 67 Name name_;
68 base::win::ScopedComPtr<IMFActivate> device_; 68 base::win::ScopedComPtr<IMFActivate> device_;
69 scoped_refptr<MFReaderCallback> callback_; 69 scoped_refptr<MFReaderCallback> callback_;
70 70
71 base::Lock lock_; // Used to guard the below variables. 71 base::Lock lock_; // Used to guard the below variables.
72 scoped_ptr<VideoCaptureDevice::Client> client_; 72 scoped_ptr<VideoCaptureDevice::Client> client_;
73 base::win::ScopedComPtr<IMFSourceReader> reader_; 73 base::win::ScopedComPtr<IMFSourceReader> reader_;
74 VideoCaptureCapability current_setting_; 74 VideoCaptureFormat capture_format_;
75 bool capture_; 75 bool capture_;
76 76
77 DISALLOW_IMPLICIT_CONSTRUCTORS(VideoCaptureDeviceMFWin); 77 DISALLOW_IMPLICIT_CONSTRUCTORS(VideoCaptureDeviceMFWin);
78 }; 78 };
79 79
80 } // namespace media 80 } // namespace media
81 81
82 #endif // MEDIA_VIDEO_CAPTURE_WIN_VIDEO_CAPTURE_DEVICE_MF_WIN_H_ 82 #endif // MEDIA_VIDEO_CAPTURE_WIN_VIDEO_CAPTURE_DEVICE_MF_WIN_H_
OLDNEW
« no previous file with comments | « media/video/capture/win/sink_input_pin_win.cc ('k') | media/video/capture/win/video_capture_device_mf_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698