Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specify CameraSource when setting camera parameters #241

Open
michele-colombo opened this issue Jan 22, 2025 · 4 comments
Open

Specify CameraSource when setting camera parameters #241

michele-colombo opened this issue Jan 22, 2025 · 4 comments

Comments

@michele-colombo
Copy link

Hi,
we are using PSDK with DJI M300 RTK with H20 payload. We are trying to use DjiCameraManager_SetFocusRingValue, but we noted it only works if the selected camera source, on the receiver, is zoom and not wide. I know that the wide camera does not support focus (it has fixed focus), but we would like to be able to set the focus for the zoom camera, even if the current camera displayed on the receiver is wide. Would it be possible to add the possibility to specify the CameraSource (wide, zoom, ...) when calling DjiCameraManager_SetFocusRingValue, in a similar way to what is done with DjiLiveview_StartH264Stream? The signature would become something like:

T_DjiReturnCode DjiCameraManager_SetFocusRingValue(E_DjiMountPosition position,
                                                   uint16_t value, E_DjiCameraSource source = 0);

Our use case is the following: we start the streaming of the wide camera to be used by a companion computer to perform navigation tasks; meanwhile we start the recording of the zoom camera, which will be the output of the drone inspection. Thus we would like to be able to stream the wide camera, but set the focus ring value on the zoom camera.
Thanks!
Michele

@dji-dev
Copy link
Contributor

dji-dev commented Jan 23, 2025

Agent comment from Leon in Zendesk ticket #127867:

Hello, thank you for your patience. Regarding your requirements, have you tried to use multi-threading to achieve it? We noticed that you should want to get the wide-angle video stream while also setting the focus ring of the zoom camera.

°°°

@michele-colombo
Copy link
Author

Thanks for your reply!
My goal is exactly as you stated: received wide camera stream and set focus ring on zoom camera.
Could you explain in more detail how multi-threading could help achieve this? My understanding is that the issue arises because starting the H.264 stream on the wide camera causes subsequent requests—such as setting the focus ring—to be interpreted as targeting the streaming camera, leading to failures. This is why I was asking if there is any way to specify the camera source when sending a command or if will be possible in any next release.

@dji-dev
Copy link
Contributor

dji-dev commented Jan 24, 2025

Agent comment from Leon in Zendesk ticket #127867:

Hello, thank you for your supplement. We may need to try it locally first. If it is feasible, we will synchronize the solution to you. If it is not feasible, we will synchronize it to the R&D team to see if there is a good solution, or let them evaluate whether to add this function. Due to the approaching Spring Festival holiday, the response to this issue may not be too fast. After the holiday is over, we will contact you as soon as possible. Thank you again for your patience and we apologize for the inconvenience caused to you~

°°°

@michele-colombo
Copy link
Author

Thank you so much! I'm looking forward to hearing from you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants