make use of media_use_ffmpeg in BUILD.gn
[chromium-blink-merge.git] / extensions / browser / api / webcam_private / v4l2_webcam.h
blob388aed432bac12fe4566ae2adb414b93c1466c13
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef EXTENSIONS_BROWSER_API_WEBCAM_PRIVATE_V4L2_WEBCAM_H_
6 #define EXTENSIONS_BROWSER_API_WEBCAM_PRIVATE_V4L2_WEBCAM_H_
8 #include "extensions/browser/api/webcam_private/webcam.h"
10 #include "base/files/scoped_file.h"
12 namespace extensions {
14 class V4L2Webcam : public Webcam {
15 public:
16 V4L2Webcam(const std::string& device_id);
17 bool Open();
19 private:
20 ~V4L2Webcam() override;
21 bool EnsureLogitechCommandsMapped();
22 bool SetWebcamParameter(int fd, uint32_t control_id, int value);
23 bool GetWebcamParameter(int fd, uint32_t control_id, int* value);
25 // Webcam:
26 void Reset(bool pan, bool tilt, bool zoom) override;
27 bool GetPan(int* value) override;
28 bool GetTilt(int* value) override;
29 bool GetZoom(int* value) override;
30 bool SetPan(int value) override;
31 bool SetTilt(int value) override;
32 bool SetZoom(int value) override;
33 bool SetPanDirection(PanDirection direction) override;
34 bool SetTiltDirection(TiltDirection direction) override;
36 const std::string device_id_;
37 base::ScopedFD fd_;
39 DISALLOW_COPY_AND_ASSIGN(V4L2Webcam);
43 } // namespace extensions
45 #endif // EXTENSIONS_BROWSER_API_WEBCAM_PRIVATE_V4L2_WEBCAM_H_