PeterBee97 commented on code in PR #18745:
URL: https://github.com/apache/nuttx/pull/18745#discussion_r3110916258


##########
boards/sim/sim/sim/src/sim_bringup.c:
##########
@@ -315,12 +317,28 @@ int sim_bringup(void)
 #ifdef CONFIG_SIM_CAMERA
   /* Initialize and register the simulated video driver */
 
-  sim_camera_initialize();
-
-  ret = capture_initialize(CONFIG_SIM_CAMERA_DEV_PATH);
+  ret = sim_camera_initialize();
   if (ret < 0)
     {
-      syslog(LOG_ERR, "ERROR: capture_initialize() failed: %d\n", ret);
+      syslog(LOG_ERR, "ERROR: sim_camera_initialize() failed: %d\n", ret);
+    }
+  else
+    {
+      int count = host_video_get_device_count();
+
+      for (int i = 0; i < count; i++)
+        {
+          char devpath[32];
+
+          snprintf(devpath, sizeof(devpath), "%s%d",
+                   CONFIG_SIM_CAMERA_DEV_PATH, i);
+          ret = capture_initialize(devpath);

Review Comment:
   done



##########
video/Makefile:
##########
@@ -21,8 +21,15 @@
 ############################################################################
 
 include $(TOPDIR)/Make.defs
+
 include videomode/Make.defs
 
+# Add dummy.c to ensure that we have at least one object.
+# On some platforms like macOS, we can't create an empty archive.
+ifeq ($(strip $(ASRCS) $(CSRCS)),)

Review Comment:
   done



-- 
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]

Reply via email to