diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2019-01-25 23:35:23 +0200 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2019-01-26 10:54:43 +0200 |
commit | e4d2dcc54971bc877f0d12a3af964d410515a997 (patch) | |
tree | 3112d22c1af305bfa660949a12ed6c63ca129fa2 /src/libcamera/include | |
parent | ac0a3d7fb678cc35857d3e4a49bedd6a7d69b57c (diff) |
libcamera: media_device: Fallback to legacy ioctls on older kernels
Prior to kernel v4.19, the MEDIA_IOC_G_TOPOLOGY ioctl didn't expose
entity flags. Fallback to calling MEDIA_IOC_ENUM_ENTITIES for each
entity to retrieve the flags in that case.
Fixes: 67d313240c9b ("libcamera: pipeline: uvcvideo: create a V4L2Device for the default video entity")
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'src/libcamera/include')
-rw-r--r-- | src/libcamera/include/media_device.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libcamera/include/media_device.h b/src/libcamera/include/media_device.h index 27a2b46a..9f038093 100644 --- a/src/libcamera/include/media_device.h +++ b/src/libcamera/include/media_device.h @@ -56,6 +56,8 @@ private: std::string driver_; std::string deviceNode_; std::string model_; + unsigned int version_; + int fd_; bool valid_; bool acquired_; @@ -72,6 +74,7 @@ private: bool populateEntities(const struct media_v2_topology &topology); bool populatePads(const struct media_v2_topology &topology); bool populateLinks(const struct media_v2_topology &topology); + void fixupEntityFlags(struct media_v2_entity *entity); friend int MediaLink::setEnabled(bool enable); int setupLink(const MediaLink *link, unsigned int flags); |