7 #ifndef __LIBCAMERA_INTERNAL_V4L2_SUBDEVICE_H__
8 #define __LIBCAMERA_INTERNAL_V4L2_SUBDEVICE_H__
62 const std::string &
entity);
68 std::vector<unsigned int> enumPadCodes(
unsigned int pad);
69 std::vector<SizeRange> enumPadSizes(
unsigned int pad,
Base class for V4L2VideoDevice and V4L2Subdevice.
Definition: v4l2_device.h:22
A V4L2 subdevice as exposed by the Linux kernel.
Definition: v4l2_subdevice.h:33
int open()
Open a V4L2 subdevice.
Definition: v4l2_subdevice.cpp:247
static V4L2Subdevice * fromEntityName(const MediaDevice *media, const std::string &entity)
Create a new video subdevice instance from entity in media device media.
Definition: v4l2_subdevice.cpp:448
int setSelection(unsigned int pad, unsigned int target, Rectangle *rect)
Set selection rectangle rect for target.
Definition: v4l2_subdevice.cpp:304
std::string logPrefix() const override
Retrieve a string to be prefixed to the log message.
Definition: v4l2_subdevice.cpp:458
int getSelection(unsigned int pad, unsigned int target, Rectangle *rect)
Get selection rectangle rect for target.
Definition: v4l2_subdevice.cpp:268
Whence
Specify the type of format for getFormat() and setFormat() operations.
Definition: v4l2_subdevice.h:35
@ ActiveFormat
The format operation applies to ACTIVE formats.
Definition: v4l2_subdevice.h:36
@ TryFormat
The format operation applies to TRY formats.
Definition: v4l2_subdevice.h:37
int setFormat(unsigned int pad, V4L2SubdeviceFormat *format, Whence whence=ActiveFormat)
Set an image format on one of the V4L2 subdevice pads.
Definition: v4l2_subdevice.cpp:411
ImageFormats formats(unsigned int pad)
Enumerate all media bus codes and frame sizes on a pad.
Definition: v4l2_subdevice.cpp:343
V4L2Subdevice(const MediaEntity *entity)
Create a V4L2 subdevice from a MediaEntity using its device node path.
Definition: v4l2_subdevice.cpp:233
int getFormat(unsigned int pad, V4L2SubdeviceFormat *format, Whence whence=ActiveFormat)
Retrieve the image format set on one of the V4L2 subdevice pads.
Definition: v4l2_subdevice.cpp:376
const MediaEntity * entity() const
Retrieve the media entity associated with the subdevice.
Definition: v4l2_subdevice.h:47
Data structures related to geometric objects.
Describe a rectangle's position and dimensions.
Definition: geometry.h:15
Describe a two-dimensional size.
Definition: geometry.h:30
Common base for V4L2 devices and subdevices.