Zephyr API Documentation 4.1.99
A Scalable Open Source RTOS
 4.1.99
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Video Interface

Video Interface . More...

Topics

 Video pixel formats
 The '|' characters separate the pixels or logical blocks, and spaces separate the bytes.
 

Data Structures

struct  video_format
 Video format structure. More...
 
struct  video_format_cap
 Video format capability. More...
 
struct  video_caps
 Video format capabilities. More...
 
struct  video_buffer
 Video buffer structure. More...
 
struct  video_frmival
 Video frame interval structure. More...
 
struct  video_frmival_stepwise
 Video frame interval stepwise structure. More...
 
struct  video_frmival_enum
 Video frame interval enumeration structure. More...
 
struct  video_driver_api
 

Macros

#define LINE_COUNT_HEIGHT   (-1)
 

Typedefs

typedef int(* video_api_format_t) (const struct device *dev, struct video_format *fmt)
 Function pointer type for video_set/get_format()
 
typedef int(* video_api_frmival_t) (const struct device *dev, struct video_frmival *frmival)
 Function pointer type for video_set/get_frmival()
 
typedef int(* video_api_enum_frmival_t) (const struct device *dev, struct video_frmival_enum *fie)
 List all supported frame intervals of a given format.
 
typedef int(* video_api_enqueue_t) (const struct device *dev, struct video_buffer *buf)
 Enqueue a buffer in the driver’s incoming queue.
 
typedef int(* video_api_dequeue_t) (const struct device *dev, struct video_buffer **buf, k_timeout_t timeout)
 Dequeue a buffer from the driver’s outgoing queue.
 
typedef int(* video_api_flush_t) (const struct device *dev, bool cancel)
 Flush endpoint buffers, buffer are moved from incoming queue to outgoing queue.
 
typedef int(* video_api_set_stream_t) (const struct device *dev, bool enable, enum video_buf_type type)
 Start or stop streaming on the video device.
 
typedef int(* video_api_ctrl_t) (const struct device *dev, uint32_t cid)
 Set/Get a video control value.
 
typedef int(* video_api_get_caps_t) (const struct device *dev, struct video_caps *caps)
 Get capabilities of a video endpoint.
 
typedef int(* video_api_set_signal_t) (const struct device *dev, struct k_poll_signal *sig)
 Register/Unregister poll signal for buffer events.
 

Enumerations

enum  video_buf_type { VIDEO_BUF_TYPE_INPUT , VIDEO_BUF_TYPE_OUTPUT }
 video_buf_type enum More...
 
enum  video_frmival_type { VIDEO_FRMIVAL_TYPE_DISCRETE = 1 , VIDEO_FRMIVAL_TYPE_STEPWISE = 2 }
 video_frmival_type enum More...
 
enum  video_signal_result { VIDEO_BUF_DONE , VIDEO_BUF_ABORTED , VIDEO_BUF_ERROR }
 video_event enum More...
 

Functions

static int video_set_format (const struct device *dev, struct video_format *fmt)
 Set video format.
 
static int video_get_format (const struct device *dev, struct video_format *fmt)
 Get video format.
 
static int video_set_frmival (const struct device *dev, struct video_frmival *frmival)
 Set video frame interval.
 
static int video_get_frmival (const struct device *dev, struct video_frmival *frmival)
 Get video frame interval.
 
static int video_enum_frmival (const struct device *dev, struct video_frmival_enum *fie)
 List video frame intervals.
 
static int video_enqueue (const struct device *dev, struct video_buffer *buf)
 Enqueue a video buffer.
 
static int video_dequeue (const struct device *dev, struct video_buffer **buf, k_timeout_t timeout)
 Dequeue a video buffer.
 
static int video_flush (const struct device *dev, bool cancel)
 Flush endpoint buffers.
 
static int video_stream_start (const struct device *dev, enum video_buf_type type)
 Start the video device function.
 
static int video_stream_stop (const struct device *dev, enum video_buf_type type)
 Stop the video device function.
 
static int video_get_caps (const struct device *dev, struct video_caps *caps)
 Get the capabilities of a video endpoint.
 
int video_set_ctrl (const struct device *dev, struct video_control *control)
 Set the value of a control.
 
int video_get_ctrl (const struct device *dev, struct video_control *control)
 Get the current value of a control.
 
int video_query_ctrl (const struct device *dev, struct video_ctrl_query *cq)
 Query information about a control.
 
void video_print_ctrl (const struct device *const dev, const struct video_ctrl_query *const cq)
 Print all the information of a control.
 
static int video_set_signal (const struct device *dev, struct k_poll_signal *sig)
 Register/Unregister k_poll signal for a video endpoint.
 
struct video_buffervideo_buffer_aligned_alloc (size_t size, size_t align, k_timeout_t timeout)
 Allocate aligned video buffer.
 
struct video_buffervideo_buffer_alloc (size_t size, k_timeout_t timeout)
 Allocate video buffer.
 
void video_buffer_release (struct video_buffer *buf)
 Release a video buffer.
 
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.
 
static uint64_t video_frmival_nsec (const struct video_frmival *frmival)
 Compute the difference between two frame intervals.
 
void 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.
 
void 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.
 
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.
 

MIPI CSI2 Data-types

#define VIDEO_MIPI_CSI2_DT_NULL   0x10
 
#define VIDEO_MIPI_CSI2_DT_BLANKING   0x11
 
#define VIDEO_MIPI_CSI2_DT_EMBEDDED_8   0x12
 
#define VIDEO_MIPI_CSI2_DT_YUV420_8   0x18
 
#define VIDEO_MIPI_CSI2_DT_YUV420_10   0x19
 
#define VIDEO_MIPI_CSI2_DT_YUV420_CSPS_8   0x1c
 
#define VIDEO_MIPI_CSI2_DT_YUV420_CSPS_10   0x1d
 
#define VIDEO_MIPI_CSI2_DT_YUV422_8   0x1e
 
#define VIDEO_MIPI_CSI2_DT_YUV422_10   0x1f
 
#define VIDEO_MIPI_CSI2_DT_RGB444   0x20
 
#define VIDEO_MIPI_CSI2_DT_RGB555   0x21
 
#define VIDEO_MIPI_CSI2_DT_RGB565   0x22
 
#define VIDEO_MIPI_CSI2_DT_RGB666   0x23
 
#define VIDEO_MIPI_CSI2_DT_RGB888   0x24
 
#define VIDEO_MIPI_CSI2_DT_RAW6   0x28
 
#define VIDEO_MIPI_CSI2_DT_RAW7   0x29
 
#define VIDEO_MIPI_CSI2_DT_RAW8   0x2a
 
#define VIDEO_MIPI_CSI2_DT_RAW10   0x2b
 
#define VIDEO_MIPI_CSI2_DT_RAW12   0x2c
 
#define VIDEO_MIPI_CSI2_DT_RAW14   0x2d
 
#define VIDEO_MIPI_CSI2_DT_USER(n)
 

Detailed Description

Video Interface .

Since
2.1
Version
1.1.0

Macro Definition Documentation

◆ LINE_COUNT_HEIGHT

#define LINE_COUNT_HEIGHT   (-1)

◆ VIDEO_MIPI_CSI2_DT_BLANKING

#define VIDEO_MIPI_CSI2_DT_BLANKING   0x11

◆ VIDEO_MIPI_CSI2_DT_EMBEDDED_8

#define VIDEO_MIPI_CSI2_DT_EMBEDDED_8   0x12

◆ VIDEO_MIPI_CSI2_DT_NULL

#define VIDEO_MIPI_CSI2_DT_NULL   0x10

◆ VIDEO_MIPI_CSI2_DT_RAW10

#define VIDEO_MIPI_CSI2_DT_RAW10   0x2b

◆ VIDEO_MIPI_CSI2_DT_RAW12

#define VIDEO_MIPI_CSI2_DT_RAW12   0x2c

◆ VIDEO_MIPI_CSI2_DT_RAW14

#define VIDEO_MIPI_CSI2_DT_RAW14   0x2d

◆ VIDEO_MIPI_CSI2_DT_RAW6

#define VIDEO_MIPI_CSI2_DT_RAW6   0x28

◆ VIDEO_MIPI_CSI2_DT_RAW7

#define VIDEO_MIPI_CSI2_DT_RAW7   0x29

◆ VIDEO_MIPI_CSI2_DT_RAW8

#define VIDEO_MIPI_CSI2_DT_RAW8   0x2a

◆ VIDEO_MIPI_CSI2_DT_RGB444

#define VIDEO_MIPI_CSI2_DT_RGB444   0x20

◆ VIDEO_MIPI_CSI2_DT_RGB555

#define VIDEO_MIPI_CSI2_DT_RGB555   0x21

◆ VIDEO_MIPI_CSI2_DT_RGB565

#define VIDEO_MIPI_CSI2_DT_RGB565   0x22

◆ VIDEO_MIPI_CSI2_DT_RGB666

#define VIDEO_MIPI_CSI2_DT_RGB666   0x23

◆ VIDEO_MIPI_CSI2_DT_RGB888

#define VIDEO_MIPI_CSI2_DT_RGB888   0x24

◆ VIDEO_MIPI_CSI2_DT_USER

#define VIDEO_MIPI_CSI2_DT_USER ( n)

#include <zephyr/drivers/video.h>

Value:
(0x30 + (n))

◆ VIDEO_MIPI_CSI2_DT_YUV420_10

#define VIDEO_MIPI_CSI2_DT_YUV420_10   0x19

◆ VIDEO_MIPI_CSI2_DT_YUV420_8

#define VIDEO_MIPI_CSI2_DT_YUV420_8   0x18

◆ VIDEO_MIPI_CSI2_DT_YUV420_CSPS_10

#define VIDEO_MIPI_CSI2_DT_YUV420_CSPS_10   0x1d

◆ VIDEO_MIPI_CSI2_DT_YUV420_CSPS_8

#define VIDEO_MIPI_CSI2_DT_YUV420_CSPS_8   0x1c

◆ VIDEO_MIPI_CSI2_DT_YUV422_10

#define VIDEO_MIPI_CSI2_DT_YUV422_10   0x1f

◆ VIDEO_MIPI_CSI2_DT_YUV422_8

#define VIDEO_MIPI_CSI2_DT_YUV422_8   0x1e

Typedef Documentation

◆ video_api_ctrl_t

typedef int(* video_api_ctrl_t) (const struct device *dev, uint32_t cid)

#include <zephyr/drivers/video.h>

Set/Get a video control value.

Parameters
devPointer to the device structure.
cidId of the control to set/get its value.

◆ video_api_dequeue_t

typedef int(* video_api_dequeue_t) (const struct device *dev, struct video_buffer **buf, k_timeout_t timeout)

#include <zephyr/drivers/video.h>

Dequeue a buffer from the driver’s outgoing queue.

See video_dequeue() for argument descriptions.

◆ video_api_enqueue_t

typedef int(* video_api_enqueue_t) (const struct device *dev, struct video_buffer *buf)

#include <zephyr/drivers/video.h>

Enqueue a buffer in the driver’s incoming queue.

See video_enqueue() for argument descriptions.

◆ video_api_enum_frmival_t

typedef int(* video_api_enum_frmival_t) (const struct device *dev, struct video_frmival_enum *fie)

#include <zephyr/drivers/video.h>

List all supported frame intervals of a given format.

See video_enum_frmival() for argument descriptions.

◆ video_api_flush_t

typedef int(* video_api_flush_t) (const struct device *dev, bool cancel)

#include <zephyr/drivers/video.h>

Flush endpoint buffers, buffer are moved from incoming queue to outgoing queue.

See video_flush() for argument descriptions.

◆ video_api_format_t

typedef int(* video_api_format_t) (const struct device *dev, struct video_format *fmt)

#include <zephyr/drivers/video.h>

Function pointer type for video_set/get_format()

See video_set/get_format() for argument descriptions.

◆ video_api_frmival_t

typedef int(* video_api_frmival_t) (const struct device *dev, struct video_frmival *frmival)

#include <zephyr/drivers/video.h>

Function pointer type for video_set/get_frmival()

See video_set/get_frmival() for argument descriptions.

◆ video_api_get_caps_t

typedef int(* video_api_get_caps_t) (const struct device *dev, struct video_caps *caps)

#include <zephyr/drivers/video.h>

Get capabilities of a video endpoint.

See video_get_caps() for argument descriptions.

◆ video_api_set_signal_t

typedef int(* video_api_set_signal_t) (const struct device *dev, struct k_poll_signal *sig)

#include <zephyr/drivers/video.h>

Register/Unregister poll signal for buffer events.

See video_set_signal() for argument descriptions.

◆ video_api_set_stream_t

typedef int(* video_api_set_stream_t) (const struct device *dev, bool enable, enum video_buf_type type)

#include <zephyr/drivers/video.h>

Start or stop streaming on the video device.

Start (enable == true) or stop (enable == false) streaming on the video device.

Parameters
devPointer to the device structure.
enableIf true, start streaming, otherwise stop streaming.
typeThe type of the buffers stream to start or stop.
Return values
0on success, otherwise a negative errno code.

Enumeration Type Documentation

◆ video_buf_type

#include <zephyr/drivers/video.h>

video_buf_type enum

Supported video buffer types of a video device. The direction (input or output) is defined from the device's point of view. Devices like cameras support only output type, encoders support only input types while m2m devices like ISP, PxP support both input and output types.

Enumerator
VIDEO_BUF_TYPE_INPUT 

input buffer type

VIDEO_BUF_TYPE_OUTPUT 

output buffer type

◆ video_frmival_type

#include <zephyr/drivers/video.h>

video_frmival_type enum

Supported frame interval type of a video device.

Enumerator
VIDEO_FRMIVAL_TYPE_DISCRETE 

discrete frame interval type

VIDEO_FRMIVAL_TYPE_STEPWISE 

stepwise frame interval type

◆ video_signal_result

#include <zephyr/drivers/video.h>

video_event enum

Identify video event.

Enumerator
VIDEO_BUF_DONE 
VIDEO_BUF_ABORTED 
VIDEO_BUF_ERROR 

Function Documentation

◆ video_buffer_aligned_alloc()

struct video_buffer * video_buffer_aligned_alloc ( size_t size,
size_t align,
k_timeout_t timeout )

#include <zephyr/drivers/video.h>

Allocate aligned video buffer.

Parameters
sizeSize of the video buffer (in bytes).
alignAlignment of the requested memory, must be a power of two.
timeoutTimeout duration or K_NO_WAIT
Return values
pointerto allocated video buffer

◆ video_buffer_alloc()

struct video_buffer * video_buffer_alloc ( size_t size,
k_timeout_t timeout )

#include <zephyr/drivers/video.h>

Allocate video buffer.

Parameters
sizeSize of the video buffer (in bytes).
timeoutTimeout duration or K_NO_WAIT
Return values
pointerto allocated video buffer

◆ video_buffer_release()

void video_buffer_release ( struct video_buffer * buf)

#include <zephyr/drivers/video.h>

Release a video buffer.

Parameters
bufPointer to the video buffer to release.

◆ video_closest_frmival()

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

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

◆ video_closest_frmival_stepwise()

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

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

◆ video_dequeue()

static int video_dequeue ( const struct device * dev,
struct video_buffer ** buf,
k_timeout_t timeout )
inlinestatic

#include <zephyr/drivers/video.h>

Dequeue a video buffer.

Dequeue a filled (capturing) or displayed (output) buffer from the driver’s endpoint outgoing queue.

Parameters
devPointer to the device structure for the driver instance.
bufPointer a video buffer pointer.
timeoutTimeout
Return values
0Is successful.
-EINVALIf parameters are invalid.
-EIOGeneral input / output error.

◆ video_enqueue()

static int video_enqueue ( const struct device * dev,
struct video_buffer * buf )
inlinestatic

#include <zephyr/drivers/video.h>

Enqueue a video buffer.

Enqueue an empty (capturing) or filled (output) video buffer in the driver’s endpoint incoming queue.

Parameters
devPointer to the device structure for the driver instance.
bufPointer to the video buffer.
Return values
0Is successful.
-EINVALIf parameters are invalid.
-EIOGeneral input / output error.

◆ video_enum_frmival()

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

#include <zephyr/drivers/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_flush()

static int video_flush ( const struct device * dev,
bool cancel )
inlinestatic

#include <zephyr/drivers/video.h>

Flush endpoint buffers.

A call to flush finishes when all endpoint buffers have been moved from incoming queue to outgoing queue. Either because canceled or fully processed through the video function.

Parameters
devPointer to the device structure for the driver instance.
cancelIf true, cancel buffer processing instead of waiting for completion.
Return values
0Is successful, -ERRNO code otherwise.

◆ video_format_caps_index()

int video_format_caps_index ( const struct video_format_cap * fmts,
const struct video_format * fmt,
size_t * idx )

#include <zephyr/drivers/video.h>

Search for a format that matches in a list of capabilities.

Parameters
fmtsThe format capability list to search.
fmtThe format to find in the list.
idxThe pointer to a number of the first format that matches.
Returns
0 when a format is found.
-ENOENT when no matching format is found.

◆ video_frmival_nsec()

static uint64_t video_frmival_nsec ( const struct video_frmival * frmival)
inlinestatic

#include <zephyr/drivers/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_caps()

static int video_get_caps ( const struct device * dev,
struct video_caps * caps )
inlinestatic

#include <zephyr/drivers/video.h>

Get the capabilities of a video endpoint.

Parameters
devPointer to the device structure for the driver instance.
capsPointer to the video_caps struct to fill.
Return values
0Is successful, -ERRNO code otherwise.

◆ video_get_csi_link_freq()

int64_t video_get_csi_link_freq ( const struct device * dev,
uint8_t bpp,
uint8_t lane_nb )

#include <zephyr/drivers/video.h>

Return the link-frequency advertised by a device.

Device exposing a CSI link should advertise at least one of the following two controls:

At first the helper will try read the VIDEO_CID_LINK_FREQ and if not available will approximate the link-frequency from the VIDEO_CID_PIXEL_RATE value, taking into consideration the bits per pixel of the format and the number of lanes.

Parameters
devVideo device to query.
bppAmount of bits per pixel of the pixel format produced by the device
lane_nbNumber of CSI-2 lanes used

◆ video_get_ctrl()

int video_get_ctrl ( const struct device * dev,
struct video_control * control )

#include <zephyr/drivers/video.h>

Get the current value of a control.

This retrieve the value of a video control, value type depends on control ID, and must be interpreted accordingly.

Parameters
devPointer to the device structure.
controlPointer to the video control struct.
Return values
0Is successful.
-EINVALIf parameters are invalid.
-ENOTSUPIf format is not supported.
-EIOGeneral input / output error.

◆ video_get_format()

static int video_get_format ( const struct device * dev,
struct video_format * fmt )
inlinestatic

#include <zephyr/drivers/video.h>

Get video format.

Get video device current video format.

Parameters
devPointer to the device structure for the driver instance.
fmtPointer to video format struct.
Return values
pointerto video format

◆ video_get_frmival()

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

#include <zephyr/drivers/video.h>

Get video frame interval.

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_print_ctrl()

void video_print_ctrl ( const struct device *const dev,
const struct video_ctrl_query *const cq )

#include <zephyr/drivers/video.h>

Print all the information of a control.

Print all the information of a control including its name, type, flag, range, menu (if any) and current value, i.e. by invoking the video_get_ctrl(), in a human readble format.

Parameters
devPointer to the device structure.
cqPointer to the control query struct.

◆ video_query_ctrl()

int video_query_ctrl ( const struct device * dev,
struct video_ctrl_query * cq )

#include <zephyr/drivers/video.h>

Query information about a control.

Applications set the id field of the query structure, the function fills the rest of this structure. It is possible to enumerate base class controls (i.e., VIDEO_CID_BASE + x) by calling this function with successive id values starting from VIDEO_CID_BASE up to and exclusive VIDEO_CID_LASTP1. The function may return -ENOTSUP if a control in this range is not supported. Applications can also enumerate private controls by starting at VIDEO_CID_PRIVATE_BASE and incrementing the id until the driver returns -ENOTSUP. For other control classes, it's a bit more difficult. Hence, the best way to enumerate all kinds of device's supported controls is to iterate with VIDEO_CTRL_FLAG_NEXT_CTRL.

Parameters
devPointer to the device structure.
cqPointer to the control query struct.
Return values
0If successful.
-EINVALIf the control id is invalid.
-ENOTSUPIf the control id is not supported.

◆ video_set_ctrl()

int video_set_ctrl ( const struct device * dev,
struct video_control * control )

#include <zephyr/drivers/video.h>

Set the value of a control.

This set the value of a video control, value type depends on control ID, and must be interpreted accordingly.

Parameters
devPointer to the device structure for the driver instance.
controlPointer to the video control struct.
Return values
0Is successful.
-EINVALIf parameters are invalid.
-ENOTSUPIf format is not supported.
-EIOGeneral input / output error.

◆ video_set_format()

static int video_set_format ( const struct device * dev,
struct video_format * fmt )
inlinestatic

#include <zephyr/drivers/video.h>

Set video format.

Configure video device with a specific format.

Parameters
devPointer to the device structure for the driver instance.
fmtPointer to a video format struct.
Return values
0Is successful.
-EINVALIf parameters are invalid.
-ENOTSUPIf format is not supported.
-EIOGeneral input / output error.

◆ video_set_frmival()

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

#include <zephyr/drivers/video.h>

Set video frame interval.

Configure video device with a specific frame interval.

Drivers must not return an error solely because the requested interval doesn’t match the device capabilities. They must instead modify the interval to match what the hardware can provide.

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_signal()

static int video_set_signal ( const struct device * dev,
struct k_poll_signal * sig )
inlinestatic

#include <zephyr/drivers/video.h>

Register/Unregister k_poll signal for a video endpoint.

Register a poll signal to the endpoint, which will be signaled on frame completion (done, aborted, error). Registering a NULL poll signal unregisters any previously registered signal.

Parameters
devPointer to the device structure for the driver instance.
sigPointer to k_poll_signal
Return values
0Is successful, -ERRNO code otherwise.

◆ video_stream_start()

static int video_stream_start ( const struct device * dev,
enum video_buf_type type )
inlinestatic

#include <zephyr/drivers/video.h>

Start the video device function.

video_stream_start is called to enter ‘streaming’ state (capture, output...). The driver may receive buffers with video_enqueue() before video_stream_start is called. If driver/device needs a minimum number of buffers before being able to start streaming, then driver set the min_vbuf_count to the related endpoint capabilities.

Parameters
devPointer to the device structure.
typeThe type of the buffers stream to start.
Return values
0Is successful.
-EIOGeneral input / output error.

◆ video_stream_stop()

static int video_stream_stop ( const struct device * dev,
enum video_buf_type type )
inlinestatic

#include <zephyr/drivers/video.h>

Stop the video device function.

On video_stream_stop, driver must stop any transactions or wait until they finish.

Parameters
devPointer to the device structure.
typeThe type of the buffers stream to stop.
Return values
0Is successful.
-EIOGeneral input / output error.