pkarashchenko commented on code in PR #1384: URL: https://github.com/apache/incubator-nuttx-apps/pull/1384#discussion_r1004064480
########## examples/camera/camera_main.c: ########## @@ -510,16 +529,40 @@ int main(int argc, FAR char *argv[]) * waits for new VIDIOC_QBUFed frame buffer. * And when new VIDIOC_QBUF is executed, the capturing is resumed. * - * Allocate freame buffers for FullHD JPEG size (512KB). + * Allocate frame buffers for JPEG size (512KB). + * Set FULLHD size in ISX012 case, QUADVGA size in ISX019 case or other + * image sensors, * Number of frame buffers is defined as STILL_BUFNUM(1). * And all allocated memorys are VIDIOC_QBUFed. */ if (capture_num != 0) { + /* Determine image size from connected image sensor name, + * because video driver does not support VIDIOC_ENUM_FRAMESIZES + * for now. + */ + + sensor = get_imgsensor_name(v_fd); + if (strncmp(sensor, "ISX012", strlen("ISX012")) == 0) Review Comment: With high optimisation levels the `strlen` of constant string will be computed at compile time, but `sizeof() - 1` should provide 100% of compile time resolution. I think it does not really matter here, so let's go with current version. -- 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: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org