|
Zephyr API Documentation 4.4.99
A Scalable Open Source RTOS
|
Video capabilities APIs. More...
Functions | |
| int | video_get_caps (const struct device *dev, struct video_caps *caps) |
| Get the capabilities of a video endpoint. | |
| int | video_transform_cap (const struct device *const dev, const struct video_format_cap *const cap, struct video_format_cap *const res_cap, enum video_buf_type type, uint16_t ind) |
| Transform a video format capability from one end to the other end of a m2m video device. | |
| int | video_format_caps_index (const struct video_format_cap *fmts, const struct video_format *fmt, size_t *idx) |
| Search for a format that matches in a list of capabilities. | |
Video capabilities APIs.
| int video_format_caps_index | ( | const struct video_format_cap * | fmts, |
| const struct video_format * | fmt, | ||
| size_t * | idx ) |
#include <zephyr/video/video.h>
Search for a format that matches in a list of capabilities.
| fmts | The format capability list to search. |
| fmt | The format to find in the list. |
| idx | The pointer to a number of the first format that matches. |
| int video_get_caps | ( | const struct device * | dev, |
| struct video_caps * | caps ) |
#include <zephyr/video/video.h>
Get the capabilities of a video endpoint.
| dev | Pointer to the device structure for the driver instance. |
| caps | Pointer to the video_caps struct to fill. |
| 0 | If successful, -ERRNO code otherwise. |
| -ENOSYS | API is not implemented. |
| int video_transform_cap | ( | const struct device *const | dev, |
| const struct video_format_cap *const | cap, | ||
| struct video_format_cap *const | res_cap, | ||
| enum video_buf_type | type, | ||
| uint16_t | ind ) |
#include <zephyr/video/video.h>
Transform a video format capability from one end to the other end of a m2m video device.
This function transforms a video_format_cap from one end to the other end of an m2m video device. It allows applications to iteratively get all the supported capabilities on one end of the device given a single input capability on the other end.
Applications pass the addresses of a single input cap and a single res_cap together with the type of the res_cap and the index (started from 0) to iterate through to the function. The driver fills the res_cap structure and return 0 each time. Index should be incremented to get the next res_cap until the function returns an errno e.g., -EINVAL. For example:
| dev | Pointer to the device structure. |
| cap | Pointer to the source video format capability structure. |
| res_cap | Pointer to the resulting video format capability structure, filled by the driver. |
| type | The video_buf_type of the resulting transformed cap. |
| ind | Index of the resulting transformed cap. |
| 0 | on success. |
| -ENOSYS | API is not implemented. |
| -ENOTSUP | The transformation is not supported. |