pkarashchenko commented on code in PR #1450:
URL: https://github.com/apache/nuttx-apps/pull/1450#discussion_r1041618149
##########
examples/camera/camera_fileutil.c:
##########
@@ -84,27 +85,23 @@ const char *futil_initialize(void)
int futil_writeimage(uint8_t *data, size_t len, const char *fsuffix)
Review Comment:
```suggestion
int futil_writeimage(FAR uint8_t *data, size_t len, FAR const char *fsuffix)
```
##########
examples/camera/camera_fileutil.c:
##########
@@ -40,7 +40,8 @@
* Private Data
****************************************************************************/
-static const char *save_dir;
+static const char *g_save_dir;
Review Comment:
```suggestion
static FAR const char *g_save_dir;
```
##########
examples/camera/camera_main.c:
##########
@@ -88,7 +83,7 @@ static void free_buffer(struct v_buffer *buffers, uint8_t
bufnum);
static int parse_arguments(int argc, char *argv[],
int *capture_num, enum v4l2_buf_type *type);
static int get_camimage(int fd, struct v4l2_buffer *v4l2_buf,
- enum v4l2_buf_type buf_type);
+ enum v4l2_buf_type buf_type);
static int release_camimage(int fd, struct v4l2_buffer *v4l2_buf);
Review Comment:
FAR
##########
examples/camera/camera_main.c:
##########
@@ -165,10 +146,23 @@ static int camera_prepare(int fd, enum v4l2_buf_type type,
return ret;
}
+ /* VIDIOC_REQBUFS initiate user pointer I/O */
+
+ req.type = type;
+ req.memory = V4L2_MEMORY_USERPTR;
+ req.count = buffernum;
+ req.mode = buf_mode;
+
+ ret = ioctl(fd, VIDIOC_REQBUFS, (unsigned long)&req);
Review Comment:
```suggestion
ret = ioctl(fd, VIDIOC_REQBUFS, (uintptr_t)&req);
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]