sim/camera: add AVFoundation backend and multi-cam support#18745
sim/camera: add AVFoundation backend and multi-cam support#18745PeterBee97 wants to merge 5 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
18260b8 to
bd705d1
Compare
28dda56 to
13efe13
Compare
| return -EINVAL; | ||
| } | ||
|
|
||
| if (find_driver(devpath) != NULL) |
There was a problem hiding this comment.
let's capture_register check dup for you
| return ret; | ||
| } | ||
|
|
||
| cmng = find_driver(devpath); |
| return -EEXIST; | ||
| } | ||
|
|
||
| if (!get_available_registered_data_index(&index)) |
There was a problem hiding this comment.
if you don't want data register twice, why not zero out g_capture_data
There was a problem hiding this comment.
it's hard to support mulitple camera instances in the old capture_initialize/imgdata_register/imgsensor_register, that's why capture_register is added. I would suggest you move the related change to new pr to avoid blocking your other change.
13efe13 to
408638b
Compare
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>
408638b to
60bdeaf
Compare
| .fmtdescs = g_fmts, | ||
| } | ||
| }; | ||
| static sim_camera_priv_t *g_sim_camera_privs; |
There was a problem hiding this comment.
delete, don't need
| count = host_video_get_device_count(); | ||
| if (count <= 0) | ||
| { | ||
| count = 1; |
| return ret; | ||
| } | ||
|
|
||
| static int host_video_count_devices(void) |
There was a problem hiding this comment.
merge to host_video_get_device_count
| count++; | ||
| } | ||
|
|
||
| return ret; |
There was a problem hiding this comment.
-ENODEV and delete ret
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