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

Side by Side Diff: media/video/capture/fake_video_capture_device.h

Issue 24079003: Add VideoCaptureDevice::GetDeviceSupportedFormats to interface + implementation for Linux and Fake (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed inexistent video_capture_device_dummy; also removed from media.gyp targets. Created 7 years, 3 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
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 // Implementation of a fake VideoCaptureDevice class. Used for testing other 5 // Implementation of a fake VideoCaptureDevice class. Used for testing other
6 // video capture classes when no real hardware is available. 6 // video capture classes when no real hardware is available.
7 7
8 #ifndef MEDIA_VIDEO_CAPTURE_FAKE_VIDEO_CAPTURE_DEVICE_H_ 8 #ifndef MEDIA_VIDEO_CAPTURE_FAKE_VIDEO_CAPTURE_DEVICE_H_
9 #define MEDIA_VIDEO_CAPTURE_FAKE_VIDEO_CAPTURE_DEVICE_H_ 9 #define MEDIA_VIDEO_CAPTURE_FAKE_VIDEO_CAPTURE_DEVICE_H_
10 10
(...skipping 15 matching lines...) Expand all
26 26
27 static void GetDeviceNames(Names* device_names); 27 static void GetDeviceNames(Names* device_names);
28 28
29 // VideoCaptureDevice implementation. 29 // VideoCaptureDevice implementation.
30 virtual void Allocate(const VideoCaptureCapability& capture_format, 30 virtual void Allocate(const VideoCaptureCapability& capture_format,
31 VideoCaptureDevice::EventHandler* observer) OVERRIDE; 31 VideoCaptureDevice::EventHandler* observer) OVERRIDE;
32 virtual void Start() OVERRIDE; 32 virtual void Start() OVERRIDE;
33 virtual void Stop() OVERRIDE; 33 virtual void Stop() OVERRIDE;
34 virtual void DeAllocate() OVERRIDE; 34 virtual void DeAllocate() OVERRIDE;
35 virtual const Name& device_name() OVERRIDE; 35 virtual const Name& device_name() OVERRIDE;
36 virtual void GetDeviceSupportedFormats(
37 scoped_ptr<EventHandler> client) OVERRIDE;
38
39 int GetFrameRate() const;
perkj_chrome 2013/09/25 07:58:41 What is GetFrameRate and why? Make private or just
mcasas 2013/10/02 08:13:23 Calculates the frame rate of the fake device. We n
36 40
37 private: 41 private:
38 // Flag indicating the internal state. 42 // Flag indicating the internal state.
39 enum InternalState { 43 enum InternalState {
40 kIdle, 44 kIdle,
41 kAllocated, 45 kAllocated,
42 kCapturing, 46 kCapturing,
43 kError 47 kError
44 }; 48 };
45 explicit FakeVideoCaptureDevice(const Name& device_name); 49 explicit FakeVideoCaptureDevice(const Name& device_name);
(...skipping 20 matching lines...) Expand all
66 int capabilities_roster_index_; 70 int capabilities_roster_index_;
67 71
68 static bool fail_next_create_; 72 static bool fail_next_create_;
69 73
70 DISALLOW_IMPLICIT_CONSTRUCTORS(FakeVideoCaptureDevice); 74 DISALLOW_IMPLICIT_CONSTRUCTORS(FakeVideoCaptureDevice);
71 }; 75 };
72 76
73 } // namespace media 77 } // namespace media
74 78
75 #endif // MEDIA_VIDEO_CAPTURE_FAKE_VIDEO_CAPTURE_DEVICE_H_ 79 #endif // MEDIA_VIDEO_CAPTURE_FAKE_VIDEO_CAPTURE_DEVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698