libcamera: media_device: Add DeviceInfo features

Add the features of the DeviceInfo class needed to replace it with
MediaDevice.

Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
Jacopo Mondi
2018-12-26 11:04:10 +01:00
committed by Laurent Pinchart
parent b403cb4550
commit 14291e50b7
2 changed files with 54 additions and 1 deletions
+5
View File
@@ -24,6 +24,10 @@ public:
MediaDevice(const std::string &devnode);
~MediaDevice();
bool acquire();
void release() { acquired_ = false; }
bool busy() const { return acquired_; }
int open();
void close();
@@ -41,6 +45,7 @@ private:
std::string devnode_;
int fd_;
bool valid_;
bool acquired_;
std::map<unsigned int, MediaObject *> objects_;
MediaObject *object(unsigned int id);