Zephyr API Documentation 4.4.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches

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.

Detailed Description

Video frame interval APIs.

Function Documentation

◆ video_closest_frmival()

int video_closest_frmival ( const struct device * dev,
struct video_frmival_enum * match )

#include <zephyr/video/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:

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.
Parameters
devVideo device to query.
matchFrame interval enumerator with the query, and loaded with the result.
Return values
0If successful.

◆ video_closest_frmival_stepwise()

int video_closest_frmival_stepwise ( const struct video_frmival_stepwise * stepwise,
const struct video_frmival * desired,
struct video_frmival * match )

#include <zephyr/video/video.h>

Find the closest match to a frame interval value within a stepwise frame interval.

Parameters
stepwiseThe stepwise frame interval range to search
desiredThe frame interval for which find the closest match
matchThe resulting frame interval closest to desired
Return values
0If successful.

◆ video_enum_frmival()

int video_enum_frmival ( const struct device * dev,
struct video_frmival_enum * fie )

#include <zephyr/video/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.

Parameters
devPointer to the device structure for the driver instance.
fiePointer to a video frame interval enumeration struct.
Return values
0If successful.
-ENOSYSIf API is not implemented.
-EINVALIf parameters are invalid.
-EIOGeneral input / output error.

◆ video_frmival_nsec()

uint64_t video_frmival_nsec ( const struct video_frmival * frmival)
inlinestatic

#include <zephyr/video/video.h>

Compute the difference between two frame intervals.

Parameters
frmivalFrame interval to turn into microseconds.
Returns
The frame interval value in microseconds.

◆ video_get_frmival()

int video_get_frmival ( const struct device * dev,
struct video_frmival * frmival )

#include <zephyr/video/video.h>

Get video frame interval of a driver.

Get current frame interval of the video device.

Parameters
devPointer to the device structure for the driver instance.
frmivalPointer to a video frame interval struct.
Return values
0If successful.
-ENOSYSIf API is not implemented.
-EINVALIf parameters are invalid.
-EIOGeneral input / output error.

◆ video_set_frmival()

int video_set_frmival ( const struct device * dev,
struct video_frmival * frmival )

#include <zephyr/video/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.

Parameters
devPointer to the device structure for the driver instance.
frmivalPointer to a video frame interval struct.
Return values
0If successful.
-ENOSYSIf API is not implemented.
-EINVALIf parameters are invalid.
-EIOGeneral input / output error.