diff options
Diffstat (limited to 'src/core/frontend/camera/interface.h')
| -rw-r--r-- | src/core/frontend/camera/interface.h | 61 |
1 files changed, 0 insertions, 61 deletions
diff --git a/src/core/frontend/camera/interface.h b/src/core/frontend/camera/interface.h deleted file mode 100644 index a55a495c9..000000000 --- a/src/core/frontend/camera/interface.h +++ /dev/null | |||
| @@ -1,61 +0,0 @@ | |||
| 1 | // Copyright 2016 Citra Emulator Project | ||
| 2 | // Licensed under GPLv2 or any later version | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 5 | #pragma once | ||
| 6 | |||
| 7 | #include <vector> | ||
| 8 | #include "common/common_types.h" | ||
| 9 | #include "core/hle/service/cam/cam.h" | ||
| 10 | |||
| 11 | namespace Camera { | ||
| 12 | |||
| 13 | /// An abstract class standing for a camera. All camera implementations should inherit from this. | ||
| 14 | class CameraInterface { | ||
| 15 | public: | ||
| 16 | virtual ~CameraInterface(); | ||
| 17 | |||
| 18 | /// Starts the camera for video capturing. | ||
| 19 | virtual void StartCapture() = 0; | ||
| 20 | |||
| 21 | /// Stops the camera for video capturing. | ||
| 22 | virtual void StopCapture() = 0; | ||
| 23 | |||
| 24 | /** | ||
| 25 | * Sets the video resolution from raw CAM service parameters. | ||
| 26 | * For the meaning of the parameters, please refer to Service::CAM::Resolution. Note that the | ||
| 27 | * actual camera implementation doesn't need to respect all the parameters. However, the width | ||
| 28 | * and the height parameters must be respected and be used to determine the size of output | ||
| 29 | * frames. | ||
| 30 | * @param resolution The resolution parameters to set | ||
| 31 | */ | ||
| 32 | virtual void SetResolution(const Service::CAM::Resolution& resolution) = 0; | ||
| 33 | |||
| 34 | /** | ||
| 35 | * Configures how received frames should be flipped by the camera. | ||
| 36 | * @param flip Flip applying to the frame | ||
| 37 | */ | ||
| 38 | virtual void SetFlip(Service::CAM::Flip flip) = 0; | ||
| 39 | |||
| 40 | /** | ||
| 41 | * Configures what effect should be applied to received frames by the camera. | ||
| 42 | * @param effect Effect applying to the frame | ||
| 43 | */ | ||
| 44 | virtual void SetEffect(Service::CAM::Effect effect) = 0; | ||
| 45 | |||
| 46 | /** | ||
| 47 | * Sets the output format of the all frames received after this function is called. | ||
| 48 | * @param format Output format of the frame | ||
| 49 | */ | ||
| 50 | virtual void SetFormat(Service::CAM::OutputFormat format) = 0; | ||
| 51 | |||
| 52 | /** | ||
| 53 | * Receives a frame from the camera. | ||
| 54 | * This function should be only called between a StartCapture call and a StopCapture call. | ||
| 55 | * @returns A std::vector<u16> containing pixels. The total size of the vector is width * height | ||
| 56 | * where width and height are set by a call to SetResolution. | ||
| 57 | */ | ||
| 58 | virtual std::vector<u16> ReceiveFrame() const = 0; | ||
| 59 | }; | ||
| 60 | |||
| 61 | } // namespace Camera | ||