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

Unified Diff: media/capture/video/linux/video_capture_device_linux.h

Issue 2143903003: [WIP] Move media/capture to device/capture (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: media/capture/video/linux/video_capture_device_linux.h
diff --git a/media/capture/video/linux/video_capture_device_linux.h b/media/capture/video/linux/video_capture_device_linux.h
deleted file mode 100644
index 49ec2e461839f9df0361f66bcae3345b74ac21e7..0000000000000000000000000000000000000000
--- a/media/capture/video/linux/video_capture_device_linux.h
+++ /dev/null
@@ -1,62 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// Linux specific implementation of VideoCaptureDevice.
-// V4L2 is used for capturing. V4L2 does not provide its own thread for
-// capturing so this implementation uses a Chromium thread for fetching frames
-// from V4L2.
-
-#ifndef MEDIA_CAPTURE_VIDEO_LINUX_VIDEO_CAPTURE_DEVICE_LINUX_H_
-#define MEDIA_CAPTURE_VIDEO_LINUX_VIDEO_CAPTURE_DEVICE_LINUX_H_
-
-#include <stdint.h>
-
-#include <string>
-
-#include "base/files/file_util.h"
-#include "base/files/scoped_file.h"
-#include "base/macros.h"
-#include "base/threading/thread.h"
-#include "media/base/video_capture_types.h"
-#include "media/capture/video/video_capture_device.h"
-
-namespace media {
-
-class V4L2CaptureDelegate;
-
-// Linux V4L2 implementation of VideoCaptureDevice.
-class VideoCaptureDeviceLinux : public VideoCaptureDevice {
- public:
- static VideoPixelFormat V4l2FourCcToChromiumPixelFormat(uint32_t v4l2_fourcc);
- static std::list<uint32_t> GetListOfUsableFourCCs(bool favour_mjpeg);
-
- explicit VideoCaptureDeviceLinux(const Name& device_name);
- ~VideoCaptureDeviceLinux() override;
-
- // VideoCaptureDevice implementation.
- void AllocateAndStart(const VideoCaptureParams& params,
- std::unique_ptr<Client> client) override;
- void StopAndDeAllocate() override;
-
- protected:
- void SetRotation(int rotation);
-
- private:
- static int TranslatePowerLineFrequencyToV4L2(PowerLineFrequency frequency);
-
- // Internal delegate doing the actual capture setting, buffer allocation and
- // circulation with the V4L2 API. Created and deleted in the thread where
- // VideoCaptureDeviceLinux lives but otherwise operating on |v4l2_thread_|.
- scoped_refptr<V4L2CaptureDelegate> capture_impl_;
-
- base::Thread v4l2_thread_; // Thread used for reading data from the device.
-
- const Name device_name_;
-
- DISALLOW_IMPLICIT_CONSTRUCTORS(VideoCaptureDeviceLinux);
-};
-
-} // namespace media
-
-#endif // MEDIA_CAPTURE_VIDEO_LINUX_VIDEO_CAPTURE_DEVICE_LINUX_H_

Powered by Google App Engine
This is Rietveld 408576698