libcamera: v4l2_subdevice: Create device from entity name
Add a static method to V4L2Subdevice class to create a V4L2Subdevice instance from a media entity name. Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
This commit is contained in:
@@ -18,6 +18,8 @@
|
||||
|
||||
namespace libcamera {
|
||||
|
||||
class MediaDevice;
|
||||
|
||||
struct V4L2SubdeviceFormat {
|
||||
uint32_t mbus_code;
|
||||
uint32_t width;
|
||||
@@ -48,6 +50,9 @@ public:
|
||||
int getFormat(unsigned int pad, V4L2SubdeviceFormat *format);
|
||||
int setFormat(unsigned int pad, V4L2SubdeviceFormat *format);
|
||||
|
||||
static V4L2Subdevice *fromEntityName(const MediaDevice *media,
|
||||
const std::string &entity);
|
||||
|
||||
protected:
|
||||
std::string logPrefix() const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user