21#ifndef __INCLUDE_NUTTX_VIDEO_IMGDATA_H
22#define __INCLUDE_NUTTX_VIDEO_IMGDATA_H
37#define IMGDATA_FMT_MAX (2)
38#define IMGDATA_FMT_MAIN (0)
39#define IMGDATA_FMT_SUB (1)
40#define IMGDATA_PIX_FMT_UYVY (0)
41#define IMGDATA_PIX_FMT_RGB565 (1)
42#define IMGDATA_PIX_FMT_JPEG (2)
43#define IMGDATA_PIX_FMT_JPEG_WITH_SUBIMG (3)
44#define IMGDATA_PIX_FMT_SUBIMG_UYVY (4)
45#define IMGDATA_PIX_FMT_SUBIMG_RGB565 (5)
46#define IMGDATA_PIX_FMT_YUYV (6)
47#define IMGDATA_PIX_FMT_YUV420P (7)
48#define IMGDATA_PIX_FMT_NV12 (8)
52#define IMGDATA_INIT(d) \
53 ((d)->ops->init ? (d)->ops->init(d) : -ENOTTY)
54#define IMGDATA_UNINIT(d) \
55 ((d)->ops->uninit ? (d)->ops->uninit(d) : -ENOTTY)
56#define IMGDATA_SET_BUF(d, a, s) \
57 ((d)->ops->set_buf ? (d)->ops->set_buf(d, a, s) : NULL)
58#define IMGDATA_VALIDATE_FRAME_SETTING(d, n, f, i) \
59 ((d)->ops->validate_frame_setting ? \
60 (d)->ops->validate_frame_setting(d, n, f, i) : -ENOTTY)
61#define IMGDATA_START_CAPTURE(d, n, f, i, c, a) \
62 ((d)->ops->start_capture ? \
63 (d)->ops->start_capture(d, n, f, i, c, a) : -ENOTTY)
64#define IMGDATA_STOP_CAPTURE(d) \
65 ((d)->ops->stop_capture ? (d)->ops->stop_capture(d) : -ENOTTY)
86typedef int (*imgdata_capture_t)(uint8_t result, uint32_t size,
87 FAR
const struct timeval *ts,
95 CODE int (*init)(FAR
struct imgdata_s *data);
96 CODE int (*uninit)(FAR
struct imgdata_s *data);
98 CODE int (*set_buf)(FAR
struct imgdata_s *data,
99 uint8_t *addr, uint32_t size);
101 CODE int (*validate_frame_setting)(FAR
struct imgdata_s *data,
105 CODE int (*start_capture)(FAR
struct imgdata_s *data,
109 FAR imgdata_capture_t callback,
111 CODE int (*stop_capture)(FAR
struct imgdata_s *data);
125#define EXTERN extern "C"
138void imgdata_register(FAR
struct imgdata_s *data);
Definition: imgdata.h:120