Lines Matching +full:start +full:- +full:of +full:- +full:frame

10  * SPDX-License-Identifier: Apache-2.0
36 * buffers the size of the video frame
38 #define LINE_COUNT_HEIGHT (-1)
44 * Used to configure frame format.
49 /** frame width in pixels. */
51 /** frame height in pixels. */
56 * This is the number of bytes that needs to be added to the address in the
57 * first pixel of a row in order to go to the address of the first pixel of
72 /** minimum supported frame width in pixels. */
74 /** maximum supported frame width in pixels. */
76 /** minimum supported frame height in pixels. */
78 /** maximum supported frame height in pixels. */
93 /** list of video format capabilities (zero terminated). */
95 /** minimal count of video buffers to enqueue before being able to start
99 /** Denotes minimum line count of a video buffer that this endpoint
101 * of bytes the selected video format's pitch uses, so the video
105 * a full video frame
109 * Denotes maximum line count of a video buffer that this endpoint
112 * fill or process more than a full video frame in one video buffer.
121 * Represent a video frame.
126 /** pointer to the start of the buffer. */
128 /** size of the buffer in bytes. */
130 /** number of bytes occupied by the valid data in the buffer. */
137 /** Line offset within frame this buffer represents, from the
138 * beginning of the frame. This offset is given in pixels,
139 * so `line_offset` * `pitch` provides offset from the start of
140 * the frame in bytes.
148 * Supported frame interval type of a video device.
151 /** discrete frame interval type */
153 /** stepwise frame interval type */
159 * @brief Video frame interval structure
161 * Used to describe a video frame interval.
164 /** numerator of the frame interval */
166 /** denominator of the frame interval */
172 * @brief Video frame interval stepwise structure
174 * Used to describe the video frame interval stepwise type.
177 /** minimum frame interval in seconds */
179 /** maximum frame interval in seconds */
181 /** frame interval step size in seconds */
187 * @brief Video frame interval enumeration structure
189 * Used to describe the supported video frame intervals of a given video format.
192 /** frame interval index during enumeration */
196 /** frame interval type the device supports */
198 /** the actual frame interval */
211 /** Targets some part of the video device not bound to an endpoint */
212 VIDEO_EP_NONE = -1,
213 /** Targets all input or output endpoints of the device */
214 VIDEO_EP_ALL = -2,
215 /** Targets all input endpoints of the device: those consuming data */
216 VIDEO_EP_IN = -3,
217 /** Targets all output endpoints of the device: those producing data */
218 VIDEO_EP_OUT = -4,
252 * @brief Set video frame interval
261 * @brief Get current video frame interval
270 * @brief List all supported frame intervals of a given format
306 * @brief Start the capture or output process.
338 * @brief Get capabilities of a video endpoint.
383 * @retval -EINVAL If parameters are invalid.
384 * @retval -ENOTSUP If format is not supported.
385 * @retval -EIO General input / output error.
390 const struct video_driver_api *api = (const struct video_driver_api *)dev->api; in video_set_format()
392 if (api->set_format == NULL) { in video_set_format()
393 return -ENOSYS; in video_set_format()
396 return api->set_format(dev, ep, fmt); in video_set_format()
413 const struct video_driver_api *api = (const struct video_driver_api *)dev->api; in video_get_format()
415 if (api->get_format == NULL) { in video_get_format()
416 return -ENOSYS; in video_get_format()
419 return api->get_format(dev, ep, fmt); in video_get_format()
423 * @brief Set video frame interval.
425 * Configure video device with a specific frame interval.
432 * @param frmival Pointer to a video frame interval struct.
435 * @retval -ENOSYS If API is not implemented.
436 * @retval -EINVAL If parameters are invalid.
437 * @retval -EIO General input / output error.
442 const struct video_driver_api *api = (const struct video_driver_api *)dev->api; in video_set_frmival()
444 if (api->set_frmival == NULL) { in video_set_frmival()
445 return -ENOSYS; in video_set_frmival()
448 return api->set_frmival(dev, ep, frmival); in video_set_frmival()
452 * @brief Get video frame interval.
454 * Get current frame interval of the video device.
458 * @param frmival Pointer to a video frame interval struct.
461 * @retval -ENOSYS If API is not implemented.
462 * @retval -EINVAL If parameters are invalid.
463 * @retval -EIO General input / output error.
468 const struct video_driver_api *api = (const struct video_driver_api *)dev->api; in video_get_frmival()
470 if (api->get_frmival == NULL) { in video_get_frmival()
471 return -ENOSYS; in video_get_frmival()
474 return api->get_frmival(dev, ep, frmival); in video_get_frmival()
478 * @brief List video frame intervals.
480 * List all supported video frame intervals of a given format.
482 * Applications should fill the pixelformat, width and height fields of the
484 * used to iterate through the supported frame intervals list.
488 * @param fie Pointer to a video frame interval enumeration struct.
491 * @retval -ENOSYS If API is not implemented.
492 * @retval -EINVAL If parameters are invalid.
493 * @retval -EIO General input / output error.
498 const struct video_driver_api *api = (const struct video_driver_api *)dev->api; in video_enum_frmival()
500 if (api->enum_frmival == NULL) { in video_enum_frmival()
501 return -ENOSYS; in video_enum_frmival()
504 return api->enum_frmival(dev, ep, fie); in video_enum_frmival()
518 * @retval -EINVAL If parameters are invalid.
519 * @retval -EIO General input / output error.
524 const struct video_driver_api *api = (const struct video_driver_api *)dev->api; in video_enqueue()
526 if (api->enqueue == NULL) { in video_enqueue()
527 return -ENOSYS; in video_enqueue()
530 return api->enqueue(dev, ep, buf); in video_enqueue()
545 * @retval -EINVAL If parameters are invalid.
546 * @retval -EIO General input / output error.
551 const struct video_driver_api *api = (const struct video_driver_api *)dev->api; in video_dequeue()
553 if (api->dequeue == NULL) { in video_dequeue()
554 return -ENOSYS; in video_dequeue()
557 return api->dequeue(dev, ep, buf, timeout); in video_dequeue()
569 * @param cancel If true, cancel buffer processing instead of waiting for
572 * @retval 0 Is successful, -ERRNO code otherwise.
576 const struct video_driver_api *api = (const struct video_driver_api *)dev->api; in video_flush()
578 if (api->flush == NULL) { in video_flush()
579 return -ENOSYS; in video_flush()
582 return api->flush(dev, ep, cancel); in video_flush()
586 * @brief Start the video device function.
590 * is called. If driver/device needs a minimum number of buffers before being
591 * able to start streaming, then driver set the min_vbuf_count to the related
595 * @retval -EIO General input / output error.
599 const struct video_driver_api *api = (const struct video_driver_api *)dev->api; in video_stream_start()
601 if (api->stream_start == NULL) { in video_stream_start()
602 return -ENOSYS; in video_stream_start()
605 return api->stream_start(dev); in video_stream_start()
615 * @retval -EIO General input / output error.
619 const struct video_driver_api *api = (const struct video_driver_api *)dev->api; in video_stream_stop()
622 if (api->stream_stop == NULL) { in video_stream_stop()
623 return -ENOSYS; in video_stream_stop()
626 ret = api->stream_stop(dev); in video_stream_stop()
633 * @brief Get the capabilities of a video endpoint.
639 * @retval 0 Is successful, -ERRNO code otherwise.
644 const struct video_driver_api *api = (const struct video_driver_api *)dev->api; in video_get_caps()
646 if (api->get_caps == NULL) { in video_get_caps()
647 return -ENOSYS; in video_get_caps()
650 return api->get_caps(dev, ep, caps); in video_get_caps()
654 * @brief Set the value of a control.
656 * This set the value of a video control, value type depends on control ID, and
664 * @retval -EINVAL If parameters are invalid.
665 * @retval -ENOTSUP If format is not supported.
666 * @retval -EIO General input / output error.
670 const struct video_driver_api *api = (const struct video_driver_api *)dev->api; in video_set_ctrl()
672 if (api->set_ctrl == NULL) { in video_set_ctrl()
673 return -ENOSYS; in video_set_ctrl()
676 return api->set_ctrl(dev, cid, value); in video_set_ctrl()
680 * @brief Get the current value of a control.
682 * This retrieve the value of a video control, value type depends on control ID,
690 * @retval -EINVAL If parameters are invalid.
691 * @retval -ENOTSUP If format is not supported.
692 * @retval -EIO General input / output error.
696 const struct video_driver_api *api = (const struct video_driver_api *)dev->api; in video_get_ctrl()
698 if (api->get_ctrl == NULL) { in video_get_ctrl()
699 return -ENOSYS; in video_get_ctrl()
702 return api->get_ctrl(dev, cid, value); in video_get_ctrl()
708 * Register a poll signal to the endpoint, which will be signaled on frame
716 * @retval 0 Is successful, -ERRNO code otherwise.
721 const struct video_driver_api *api = (const struct video_driver_api *)dev->api; in video_set_signal()
723 if (api->set_signal == NULL) { in video_set_signal()
724 return -ENOSYS; in video_set_signal()
727 return api->set_signal(dev, ep, signal); in video_set_signal()
733 * @param size Size of the video buffer (in bytes).
734 * @param align Alignment of the requested memory, must be a power of two.
744 * @param size Size of the video buffer (in bytes).
759 * @brief Search for a format that matches in a list of capabilities
763 * @param idx The pointer to a number of the first format that matches.
766 * @return -ENOENT when no matching format is found.
772 * @brief Compute the difference between two frame intervals
774 * @param frmival Frame interval to turn into microseconds.
776 * @return The frame interval value in microseconds.
780 return (uint64_t)NSEC_PER_SEC * frmival->numerator / frmival->denominator; in video_frmival_nsec()
784 * @brief Find the closest match to a frame interval value within a stepwise frame interval.
786 * @param stepwise The stepwise frame interval range to search
787 * @param desired The frame interval for which find the closest match
788 * @param match The resulting frame interval closest to @p desired
795 * @brief Find the closest match to a frame interval value within a video device.
799 * - @c match->format to the @ref video_format of interest.
800 * - @c match->type to @ref VIDEO_FRMIVAL_TYPE_DISCRETE.
801 * - @c match->discrete to the desired frame interval.
805 * - @c match->discrete to the value of the closest frame interval.
806 * - @c match->index to the index of the closest frame interval.
810 * @param match Frame interval enumerator with the query, and loaded with the result.
815 /* fourcc - four-character-code */
848 #define VIDEO_PIX_FMT_RGB565 video_fourcc('R', 'G', 'B', 'P') /* 16 RGB-5-6-5 */
851 #define VIDEO_PIX_FMT_XRGB32 video_fourcc('B', 'X', '2', '4') /* 32 XRGB-8-8-8-8 */
863 #define VIDEO_PIX_FMT_YUYV video_fourcc('Y', 'U', 'Y', 'V') /* 16 Y0-Cb0 Y1-Cr0 */
866 #define VIDEO_PIX_FMT_XYUV32 video_fourcc('X', 'Y', 'U', 'V') /* 32 XYUV-8-8-8-8 */
890 * @brief Get number of bytes per pixel of a pixel format