sim/camera: add AVFoundation backend and multi-cam support#18745
sim/camera: add AVFoundation backend and multi-cam support#18745PeterBee97 wants to merge 6 commits intoapache:masterfrom
Conversation
acassis
left a comment
There was a problem hiding this comment.
@PeterBee97 WOW! Amazing! Please update the nxcamera Documentation/ to include this new parameter: https://nuttx.apache.org/docs/latest/applications/system/nxcamera/index.html
|
@PeterBee97 please include this picture in the Documentation page, it is funny :-) |
d0fdb9c to
1131750
Compare
As u wish :) |
1131750 to
f1c856b
Compare
acassis
left a comment
There was a problem hiding this comment.
@PeterBee97 Amazing! Thank you very much!
f1c856b to
c2ea6da
Compare
|
Hi @PeterBee97 please fix |
6b24b6b to
6ae23c9
Compare
Add dummy.c so video can build an archive even when there are no other objects (e.g. on macOS). Signed-off-by: bijunda <bijunda@bytedance.com>
6ae23c9 to
c07e073
Compare
c07e073 to
18260b8
Compare
Move common v4l2 capture framework changes to a standalone commit. Signed-off-by: bijunda <bijunda@bytedance.com>
Allow the SIM camera/V4L2 capture framework to manage multiple imgdata instances with dynamic mounting. This avoids cross-talk between camera streams when multiple devices are used. Signed-off-by: Peter Bee <bijunda@bytedance.com>
Adapt the macOS AVFoundation backend for multi-device discovery, camera index mapping and capture startup compatibility. This enables reliable use of multiple cameras through the SIM camera framework. Signed-off-by: Peter Bee <bijunda@bytedance.com>
/Library/Developer/CommandLineTools/usr/bin/c++filt: error: unknown argument '-[' Signed-off-by: Peter Bee <bijunda@bytedance.com>
Document the nxcamera command usage, including device selection, resolution, and pixel format options. Also mention recent support for multi-instance camera mounting and the macOS AVFoundation backend on the SIM platform. Signed-off-by: Peter Bee <bijunda@bytedance.com>
18260b8 to
bd705d1
Compare
| FAR struct imgdata_s *imgdata; | ||
| FAR struct imgsensor_s *imgsensor; | ||
| enum v4l2_scene_mode capture_scene_mode; | ||
| uint8_t open_num; |
| get_connected_imgsensor(FAR struct imgsensor_s **sensors, | ||
| size_t sensor_num) | ||
| { | ||
| FAR struct imgsensor_s *sensor = NULL; |
| return ret; | ||
| } | ||
|
|
||
| g_capture_registered_data[index].devpath = registered_devpath; |
There was a problem hiding this comment.
why do you need save devpath
| priv->sensor.ops = &g_sim_camera_ops; | ||
| priv->sensor.frmsizes_num = 1; | ||
| priv->sensor.frmsizes = g_frmsizes; | ||
| priv->sensors[0] = sensor; |
There was a problem hiding this comment.
why do you need add sensors field
|
|
||
| wd_start(&priv->wdog, 0, sim_camera_interrupt, (wdparm_t)priv); | ||
| return 0; | ||
| g_sim_camera_privs = kmm_zalloc(sizeof(sim_camera_priv_t) * (size_t)count); |
| static void sim_camera_interrupt(wdparm_t arg) | ||
| { | ||
| sim_camera_priv_t *priv = (sim_camera_priv_t *)arg; | ||
| struct timespec ts; |
There was a problem hiding this comment.
why change? don't add the unnecessary change into pr, which just make your change review
Summary
Add AVFoundation backend and multi-cam support, enabling macOS users as well as Linux users to use multiple cameras on Simulator.
Impact
mkallsymshost-tool behavior for Objective-C symbols on macOSTesting
Tested on:
sim:nxcamera