mirror of
https://git.libcamera.org/libcamera/libcamera.git
synced 2025-07-23 08:35:07 +03:00
libcamera: v4l2_subdevice: Expose media bus format info as internal API
The V4L2SubdeviceFormatInfo structure, internal to the v4l2_subdevice.cpp compilation unit, contains information about media bus formats that will be useful in other parts of libcamera. To prepare for this, expose the structure in the v4l2_subdevice.h header and turn it into a class with a similar design as PixelFormatInfo. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
parent
1a1cf4a2c1
commit
d60fb23258
2 changed files with 76 additions and 31 deletions
|
@ -29,6 +29,19 @@ namespace libcamera {
|
|||
|
||||
class MediaDevice;
|
||||
|
||||
class MediaBusFormatInfo
|
||||
{
|
||||
public:
|
||||
bool isValid() const { return code != 0; }
|
||||
|
||||
static const MediaBusFormatInfo &info(uint32_t code);
|
||||
|
||||
const char *name;
|
||||
uint32_t code;
|
||||
unsigned int bitsPerPixel;
|
||||
PixelFormatInfo::ColourEncoding colourEncoding;
|
||||
};
|
||||
|
||||
struct V4L2SubdeviceCapability final : v4l2_subdev_capability {
|
||||
bool isReadOnly() const
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue