mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
V4l2 input (#825)
This commit is contained in:
@@ -11,6 +11,8 @@
|
||||
#include <utils/Logger.h>
|
||||
#include <utils/Components.h>
|
||||
|
||||
#include <QMultiMap>
|
||||
|
||||
///
|
||||
/// @brief The Grabber class is responsible to apply image resizes (with or without ImageResampler)
|
||||
/// Overwrite the videoMode with setVideoMode()
|
||||
@@ -34,6 +36,12 @@ public:
|
||||
///
|
||||
virtual void setCropping(unsigned cropLeft, unsigned cropRight, unsigned cropTop, unsigned cropBottom);
|
||||
|
||||
///
|
||||
/// @brief Apply new video input (used from v4l)
|
||||
/// @param input device input
|
||||
///
|
||||
virtual bool setInput(int input);
|
||||
|
||||
///
|
||||
/// @brief Apply new width/height values, on errors (collide with cropping) reject the values
|
||||
/// @return True on success else false
|
||||
@@ -116,6 +124,13 @@ public:
|
||||
///
|
||||
virtual QString getV4L2deviceName(QString devicePath) { return QString(); }
|
||||
|
||||
///
|
||||
/// @brief Get a name/index pair of supported device inputs
|
||||
/// @param devicePath The device path
|
||||
/// @return multi pair of name/index on success else empty pair
|
||||
///
|
||||
virtual QMultiMap<QString, int> getV4L2deviceInputs(QString devicePath) { return QMultiMap<QString, int>(); }
|
||||
|
||||
///
|
||||
/// @brief Get a list of supported device resolutions
|
||||
/// @param devicePath The device path
|
||||
@@ -144,9 +159,13 @@ protected:
|
||||
/// Height of the captured snapshot [pixels]
|
||||
int _height;
|
||||
|
||||
/// frame per second
|
||||
int _fps;
|
||||
|
||||
// number of pixels to crop after capturing
|
||||
/// device input
|
||||
int _input;
|
||||
|
||||
/// number of pixels to crop after capturing
|
||||
int _cropLeft, _cropRight, _cropTop, _cropBottom;
|
||||
|
||||
bool _enabled;
|
||||
|
Reference in New Issue
Block a user