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

Side by Side Diff: media/capture/video/linux/video_capture_device_linux.h

Issue 1323093006: Change the media::PowerLineFrequency from an enum class to a proper class (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Pass around PowerLineFrequency objects in VideoCaptureDevice instead of integers Created 5 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 // Linux specific implementation of VideoCaptureDevice. 5 // Linux specific implementation of VideoCaptureDevice.
6 // V4L2 is used for capturing. V4L2 does not provide its own thread for 6 // V4L2 is used for capturing. V4L2 does not provide its own thread for
7 // capturing so this implementation uses a Chromium thread for fetching frames 7 // capturing so this implementation uses a Chromium thread for fetching frames
8 // from V4L2. 8 // from V4L2.
9 9
10 #ifndef MEDIA_VIDEO_CAPTURE_LINUX_VIDEO_CAPTURE_DEVICE_LINUX_H_ 10 #ifndef MEDIA_VIDEO_CAPTURE_LINUX_VIDEO_CAPTURE_DEVICE_LINUX_H_
(...skipping 23 matching lines...) Expand all
34 34
35 // VideoCaptureDevice implementation. 35 // VideoCaptureDevice implementation.
36 void AllocateAndStart(const VideoCaptureParams& params, 36 void AllocateAndStart(const VideoCaptureParams& params,
37 scoped_ptr<Client> client) override; 37 scoped_ptr<Client> client) override;
38 void StopAndDeAllocate() override; 38 void StopAndDeAllocate() override;
39 39
40 protected: 40 protected:
41 void SetRotation(int rotation); 41 void SetRotation(int rotation);
42 42
43 private: 43 private:
44 static int TranslatePowerLineFrequencyToV4L2(int frequency); 44 static int TranslatePowerLineFrequencyToV4L2(
45 media::PowerLineFrequency frequency);
45 46
46 // Internal delegate doing the actual capture setting, buffer allocation and 47 // Internal delegate doing the actual capture setting, buffer allocation and
47 // circulation with the V4L2 API. Created and deleted in the thread where 48 // circulation with the V4L2 API. Created and deleted in the thread where
48 // VideoCaptureDeviceLinux lives but otherwise operating on |v4l2_thread_|. 49 // VideoCaptureDeviceLinux lives but otherwise operating on |v4l2_thread_|.
49 scoped_refptr<V4L2CaptureDelegate> capture_impl_; 50 scoped_refptr<V4L2CaptureDelegate> capture_impl_;
50 51
51 base::Thread v4l2_thread_; // Thread used for reading data from the device. 52 base::Thread v4l2_thread_; // Thread used for reading data from the device.
52 53
53 const Name device_name_; 54 const Name device_name_;
54 55
55 DISALLOW_IMPLICIT_CONSTRUCTORS(VideoCaptureDeviceLinux); 56 DISALLOW_IMPLICIT_CONSTRUCTORS(VideoCaptureDeviceLinux);
56 }; 57 };
57 58
58 } // namespace media 59 } // namespace media
59 60
60 #endif // MEDIA_VIDEO_CAPTURE_LINUX_VIDEO_CAPTURE_DEVICE_LINUX_H_ 61 #endif // MEDIA_VIDEO_CAPTURE_LINUX_VIDEO_CAPTURE_DEVICE_LINUX_H_
OLDNEW
« no previous file with comments | « media/base/video_capture_types_unittest.cc ('k') | media/capture/video/linux/video_capture_device_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698