15#ifndef ZEPHYR_INCLUDE_VIDEO_VIDEO_H
16#define ZEPHYR_INCLUDE_VIDEO_VIDEO_H
Main header file for video controls IDs definitions.
#define NSEC_PER_SEC
number of nanoseconds per second
Definition clock.h:113
#define EINVAL
Invalid argument.
Definition errno.h:61
int video_enqueue(const struct device *dev, struct video_buffer *buf)
Pass a video buffer to a video device.
struct video_buffer * video_buffer_aligned_alloc(size_t size, size_t align, k_timeout_t timeout)
Allocate aligned video buffer.
int video_transfer_buffer(const struct device *src, const struct device *sink, enum video_buf_type src_type, enum video_buf_type sink_type, k_timeout_t timeout)
Transfer a buffer between 2 video device.
int video_set_signal(const struct device *dev, struct k_poll_signal *sig)
Register/Unregister k_poll signal for a video endpoint.
struct video_buffer * video_import_buffer(uint8_t *mem, size_t sz)
Import an external memory to the video buffer pool.
int video_buffer_release(struct video_buffer *buf)
Release a video buffer.
int video_dequeue(const struct device *dev, struct video_buffer **vbuf, k_timeout_t timeout)
Get a video buffer from a video device.
struct video_buffer * video_buffer_alloc(size_t size, k_timeout_t timeout)
Allocate video buffer.
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.
int video_set_ctrl(const struct device *dev, struct video_control *control)
Set the value of a control.
void video_print_ctrl(const struct video_ctrl_query *const cq)
Print all the information of a control.
int64_t video_get_csi_link_freq(const struct device *dev, uint8_t bpp, uint8_t lane_nb)
Return the link-frequency advertised by a device.
int video_get_ctrl(const struct device *dev, struct video_control *control)
Get the current value of a control.
int video_query_ctrl(struct video_ctrl_query *cq)
Query information about a control.
int video_enum_frmival(const struct device *dev, struct video_frmival_enum *fie)
List video frame intervals.
int video_get_frmival(const struct device *dev, struct video_frmival *frmival)
Get video frame interval of a driver.
int video_set_frmival(const struct device *dev, struct video_frmival *frmival)
Set video frame interval.
static uint64_t video_frmival_nsec(const struct video_frmival *frmival)
Compute the difference between two frame intervals.
Definition video.h:354
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.
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_stream_stop(const struct device *dev, enum video_buf_type type)
Stop the video device function.
int video_stream_start(const struct device *dev, enum video_buf_type type)
Start the video device function.
video_buf_type
video_buf_type enum
Definition types.h:42
#define NULL
Definition iar_missing_defs.h:20
Types used by both video drivers and subsystem.
__UINT64_TYPE__ uint64_t
Definition stdint.h:91
__UINT8_TYPE__ uint8_t
Definition stdint.h:88
__UINT16_TYPE__ uint16_t
Definition stdint.h:89
__INT64_TYPE__ int64_t
Definition stdint.h:75
Runtime device structure (in ROM) per driver instance.
Definition device.h:513
Poll signal object.
Definition kernel.h:6798
Kernel timeout type.
Definition clock.h:65
Video buffer structure.
Definition types.h:66
uint32_t size
size of the buffer in bytes.
Definition types.h:79
enum video_buf_type type
type of the buffer
Definition types.h:71
Video format capabilities.
Definition types.h:157
Video control structure.
Definition types.h:206
Video control query structure.
Definition types.h:221
Video frame interval enumeration structure.
Definition types.h:341
Video frame interval stepwise structure.
Definition types.h:327
Video frame interval structure.
Definition types.h:315
uint32_t numerator
numerator of the frame interval
Definition types.h:317
uint32_t denominator
denominator of the frame interval
Definition types.h:319
Video selection (crop / compose) structure.
Definition types.h:291