summaryrefslogtreecommitdiff
path: root/src/class/video/video_device.h
diff options
context:
space:
mode:
authorTobi <[email protected]>2025-10-30 15:01:52 +0100
committerTobi <[email protected]>2025-10-30 15:01:52 +0100
commit889cde7d4b31b30f34abc6e304445403bdf4ced4 (patch)
tree5e8b2195ba39d5ad821c981420d202bcdd4d024e /src/class/video/video_device.h
parentb8cea4ad766ea40de88fdaa28c19e69f5bc25f9d (diff)
Video class: Changed pararameters of payload request to a dedicated structure in order to meet coding guideliness
Diffstat (limited to 'src/class/video/video_device.h')
-rw-r--r--src/class/video/video_device.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/class/video/video_device.h b/src/class/video/video_device.h
index b3094dd81..f14555e4f 100644
--- a/src/class/video/video_device.h
+++ b/src/class/video/video_device.h
@@ -35,6 +35,16 @@
extern "C" {
#endif
+
+//--------------------------------------------------------------------+
+// Payload request
+//--------------------------------------------------------------------+
+typedef struct TU_ATTR_PACKED {
+ void* buf; /* Payload buffer to be filled */
+ size_t length; /* Length of the requested data in bytes */
+ size_t offset; /* Offset within the frame (in bytes) */
+} tud_video_payload_request_t;
+
//--------------------------------------------------------------------+
// Application API (Multiple Ports)
// CFG_TUD_VIDEO > 1
@@ -91,7 +101,7 @@ int tud_video_commit_cb(uint_fast8_t ctl_idx, uint_fast8_t stm_idx,
* @param[in] payload_size Size of payload_buf (requested data size)
* @param[in] offset Current byte offset relative to given bufsize from tud_video_n_frame_xfer (framesize)
* @return video_error_code_t */
-void tud_video_prepare_payload_cb(uint_fast8_t ctl_idx, uint_fast8_t stm_idx, void* payload_buf, size_t payload_size, size_t offset);
+void tud_video_prepare_payload_cb(uint_fast8_t ctl_idx, uint_fast8_t stm_idx, tud_video_payload_request_t* request);
//--------------------------------------------------------------------+
// INTERNAL USBD-CLASS DRIVER API