|
Zephyr Project API 4.4.99
A Scalable Open Source RTOS
|
Video frame interval APIs. More...
Functions | |
| int | video_enum_frmival (const struct device *dev, struct video_frmival_enum *fie) |
| List video frame intervals. | |
| int | video_set_frmival (const struct device *dev, struct video_frmival *frmival) |
| Set video frame interval. | |
| int | video_get_frmival (const struct device *dev, struct video_frmival *frmival) |
| Get video frame interval of a driver. | |
| static uint64_t | video_frmival_nsec (const struct video_frmival *frmival) |
| Compute the difference between two frame intervals. | |
| int | video_closest_frmival_stepwise (const struct video_frmival_stepwise *stepwise, const struct video_frmival *desired, struct video_frmival *match) |
| Find the closest match to a frame interval value within a stepwise frame interval. | |
| int | video_closest_frmival (const struct device *dev, struct video_frmival_enum *match) |
| Find the closest match to a frame interval value within a video device. | |
Video frame interval APIs.
| int video_closest_frmival | ( | const struct device * | dev, |
| struct video_frmival_enum * | match ) |
#include <video.h>
Find the closest match to a frame interval value within a video device.
To compute the closest match, fill match with the following fields:
match->format to the video_format of interest.match->type to VIDEO_FRMIVAL_TYPE_DISCRETE.match->discrete to the desired frame interval.The result will be loaded into match, with the following fields set:
match->discrete to the value of the closest frame interval.match->index to the index of the closest frame interval.| dev | Video device to query. |
| match | Frame interval enumerator with the query, and loaded with the result. |
| 0 | If successful. |
| int video_closest_frmival_stepwise | ( | const struct video_frmival_stepwise * | stepwise, |
| const struct video_frmival * | desired, | ||
| struct video_frmival * | match ) |
#include <video.h>
Find the closest match to a frame interval value within a stepwise frame interval.
| stepwise | The stepwise frame interval range to search |
| desired | The frame interval for which find the closest match |
| match | The resulting frame interval closest to desired |
| 0 | If successful. |
| int video_enum_frmival | ( | const struct device * | dev, |
| struct video_frmival_enum * | fie ) |
#include <video.h>
List video frame intervals.
List all supported video frame intervals of a given format.
Applications should fill the pixelformat, width and height fields of the video_frmival_enum struct first to form a query. Then, the index field is used to iterate through the supported frame intervals list.
| dev | Pointer to the device structure for the driver instance. |
| fie | Pointer to a video frame interval enumeration struct. |
| 0 | If successful. |
| -ENOSYS | If API is not implemented. |
| -EINVAL | If parameters are invalid. |
| -EIO | General input / output error. |
|
inlinestatic |
#include <video.h>
Compute the difference between two frame intervals.
| frmival | Frame interval to turn into microseconds. |
| int video_get_frmival | ( | const struct device * | dev, |
| struct video_frmival * | frmival ) |
#include <video.h>
Get video frame interval of a driver.
Get current frame interval of the video device.
| dev | Pointer to the device structure for the driver instance. |
| frmival | Pointer to a video frame interval struct. |
| 0 | If successful. |
| -ENOSYS | If API is not implemented. |
| -EINVAL | If parameters are invalid. |
| -EIO | General input / output error. |
| int video_set_frmival | ( | const struct device * | dev, |
| struct video_frmival * | frmival ) |
#include <video.h>
Set video frame interval.
Configure video device with a specific frame interval, using the closest matchiing frame interval that the driver can provide, updating frmival with the value effectively applied to the driver.
| dev | Pointer to the device structure for the driver instance. |
| frmival | Pointer to a video frame interval struct. |
| 0 | If successful. |
| -ENOSYS | If API is not implemented. |
| -EINVAL | If parameters are invalid. |
| -EIO | General input / output error. |