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

In Android, how to set the initial depth camera resolution 1280x720 or 1920x1080 ? #13653

Open
1programmer2dfg3 opened this issue Jan 6, 2025 · 4 comments
Labels

Comments

@1programmer2dfg3
Copy link

I am currently setting through this function
config.enableStream(StreamType.DEPTH, 1280, 720);
The result is abnormal, camera data cannot stream in, preview black screen.
But setting 640x480 is no problem。

2025-01-06 10:18:27.365 27702-27702 librs com.gather.terminal I ... /dev/bus/usb/001/003
2025-01-06 10:18:27.365 27702-27702 librs com.gather.terminal I Found 1 RealSense devices (0xfe requested & 0xff from device-mask in settings)
2025-01-06 10:18:27.366 27702-27702 librs com.gather.terminal I ... /dev/bus/usb/001/003
2025-01-06 10:18:27.366 27702-27702 librs com.gather.terminal I Found 1 RealSense devices (0xfe requested & 0xff from device-mask in settings)
2025-01-06 10:18:27.367 27702-27702 RemoteCaptureFragment com.gather.terminal D try start streaming
2025-01-06 10:18:27.367 27702-27702 librs com.gather.terminal I ... /dev/bus/usb/001/003
2025-01-06 10:18:27.367 27702-27702 librs com.gather.terminal I Found 1 RealSense devices (0xfe requested & 0xff from device-mask in settings)
2025-01-06 10:18:27.390 27702-27715 gather.termina com.gather.terminal I ThreadFlipBegin blocked for 11.482ms
2025-01-06 10:18:27.404 27702-27702 librs com.gather.terminal I Request: Z16 Depth,
Resolved to: Z16 Depth,
2025-01-06 10:18:27.404 27702-28865 librs com.gather.terminal W control_transfer returned error, index: 1, error: Broken pipe, number: 32
2025-01-06 10:18:27.405 27702-28865 librs com.gather.terminal W control_transfer returned error, index: 1, error: Broken pipe, number: 32
2025-01-06 10:18:27.406 27702-28865 librs com.gather.terminal W control_transfer returned error, index: 1, error: Broken pipe, number: 32
2025-01-06 10:18:27.407 27702-28865 librs com.gather.terminal W control_transfer returned error, index: 1, error: Broken pipe, number: 32
2025-01-06 10:18:27.407 27702-28865 librs com.gather.terminal W control_transfer returned error, index: 1, error: Broken pipe, number: 32
2025-01-06 10:18:27.408 27702-28865 librs com.gather.terminal W control_transfer returned error, index: 1, error: Broken pipe, number: 32
2025-01-06 10:18:27.408 27702-27702 librs com.gather.terminal E Probe-commit control transfer failed with error: RS2_USB_STATUS_OTHER
2025-01-06 10:18:27.411 27702-27702 librs com.gather.terminal E [rs2_pipeline_start_with_config( pipe:0x7273c61290, config:0x7273c707b0 ) Invalid Value]
Failed to resolve the request:
Format: Z16, width: 1280, height: 720

                                                                                                Into:
                                                                                                 Formats: 
                                                                                                  Z16
@MartyG-RealSense
Copy link
Collaborator

MartyG-RealSense commented Jan 6, 2025

Hi @1programmer2dfg3 Please try adding the FPS speed to your Android stream configuration instruction. The Failed to resolve the request error could occur if the program is automatically attempting to use 30 FPS but the camera is unable to provide it. A good FPS value to test with is '6', or '5' if you have the RealSense D455 camera model.

cfg.EnableStream(StreamType.Depth, 1280, 720, Format.Z16, 6);

@1programmer2dfg3
Copy link
Author

Thank you for your reply. I have tested it and found that it did not take effect. The screen I preview is still missing. My test was passed by one, which is

config.enableStream(StreamType.DEPTH, 1,1280, 720, StreamFormat.Z16, 6)

Below is the error log, help me look again, thank you

2025-01-10 15:01:17.247 29447-29447 librs com.gather.terminal E [rs2_pipeline_wait_for_frames( pipe:0x7273c630f0 ) Wrong Api Call Sequence] wait_for_frames cannot be called before start()
2025-01-10 15:01:17.247 29447-29447 System.err com.gather.terminal W java.lang.RuntimeException: wait_for_frames cannot be called before start()
2025-01-10 15:01:17.247 29447-29447 System.err com.gather.terminal W at com.intel.realsense.librealsense.Pipeline.nWaitForFrames(Native Method)
2025-01-10 15:01:17.247 29447-29447 System.err com.gather.terminal W at com.intel.realsense.librealsense.Pipeline.waitForFrames(Pipeline.java:45)
2025-01-10 15:01:17.247 29447-29447 System.err com.gather.terminal W at com.intel.realsense.librealsense.Pipeline.waitForFrames(Pipeline.java:41)
2025-01-10 15:01:17.247 29447-29447 System.err com.gather.terminal W at com.gather.terminal.ui.fragment.RemoteCaptureFragment$3.run(RemoteCaptureFragment.java:374)
2025-01-10 15:01:17.247 29447-29447 System.err com.gather.terminal W at android.os.Handler.handleCallback(Handler.java:938)
2025-01-10 15:01:17.247 29447-29447 System.err com.gather.terminal W at android.os.Handler.dispatchMessage(Handler.java:99)
2025-01-10 15:01:17.247 29447-29447 System.err com.gather.terminal W at android.os.Looper.loopOnce(Looper.java:201)
2025-01-10 15:01:17.377 29447-29447 System.err com.gather.terminal W at android.app.ActivityThread.main(ActivityThread.java:7870)
2025-01-10 15:01:17.377 29447-29447 System.err com.gather.terminal W at java.lang.reflect.Method.invoke(Native Method)
2025-01-10 15:01:17.377 29447-29447 System.err com.gather.terminal W at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
2025-01-10 15:01:17.377 29447-29447 System.err com.gather.terminal W at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)

@1programmer2dfg3
Copy link
Author

this is error log:
2025-01-10 15:12:45.574 23164-23164 librs com.gather.terminal E [rs2_pipeline_wait_for_frames( pipe:0x7273c6d1b0 ) Wrong Api Call Sequence] wait_for_frames cannot be called before start()
2025-01-10 15:12:45.574 23164-23164 System.err com.gather.terminal W java.lang.RuntimeException: wait_for_frames cannot be called before start()
2025-01-10 15:12:45.574 23164-23164 System.err com.gather.terminal W at com.intel.realsense.librealsense.Pipeline.nWaitForFrames(Native Method)
2025-01-10 15:12:45.574 23164-23164 System.err com.gather.terminal W at com.intel.realsense.librealsense.Pipeline.waitForFrames(Pipeline.java:45)
2025-01-10 15:12:45.574 23164-23164 System.err com.gather.terminal W at com.intel.realsense.librealsense.Pipeline.waitForFrames(Pipeline.java:41)
2025-01-10 15:12:45.574 23164-23164 System.err com.gather.terminal W at com.gather.terminal.ui.fragment.RemoteCaptureFragment$3.run(RemoteCaptureFragment.java:375)
2025-01-10 15:12:45.574 23164-23164 System.err com.gather.terminal W at android.os.Handler.handleCallback(Handler.java:938)
2025-01-10 15:12:45.574 23164-23164 System.err com.gather.terminal W at android.os.Handler.dispatchMessage(Handler.java:99)
2025-01-10 15:12:45.574 23164-23164 System.err com.gather.terminal W at android.os.Looper.loopOnce(Looper.java:201)
2025-01-10 15:12:45.574 23164-23164 System.err com.gather.terminal W at android.os.Looper.loop(Looper.java:288)
2025-01-10 15:12:45.574 23164-23164 System.err com.gather.terminal W at android.app.ActivityThread.main(ActivityThread.java:7870)
2025-01-10 15:12:45.574 23164-23164 System.err com.gather.terminal W at java.lang.reflect.Method.invoke(Native Method)
2025-01-10 15:12:45.574 23164-23164 System.err com.gather.terminal W at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
2025-01-10 15:12:45.574 23164-23164 System.err com.gather.terminal W at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)
2025-01-10 15:12:45.574 23164-23164 librs com.gather.terminal I ... /dev/bus/usb/001/003
2025-01-10 15:12:45.574 23164-23164 librs com.gather.terminal I Found 1 RealSense devices (0xfe requested & 0xff from device-mask in settings)
2025-01-10 15:12:45.575 23164-23164 librs com.gather.terminal I Found 107 unreachable streams, 107 extrinsics deleted
2025-01-10 15:12:45.644 23164-23164 librs com.gather.terminal I Request: Z16 Depth,
Resolved to: Z16 Depth,
2025-01-10 15:12:45.644 23164-24877 librs com.gather.terminal W control_transfer returned error, index: 1, error: Broken pipe, number: 32
2025-01-10 15:12:45.645 23164-24877 librs com.gather.terminal W control_transfer returned error, index: 1, error: Broken pipe, number: 32
2025-01-10 15:12:45.645 23164-24877 librs com.gather.terminal W control_transfer returned error, index: 1, error: Broken pipe, number: 32
2025-01-10 15:12:45.646 23164-24877 librs com.gather.terminal W control_transfer returned error, index: 1, error: Broken pipe, number: 32
2025-01-10 15:12:45.647 23164-24877 librs com.gather.terminal W control_transfer returned error, index: 1, error: Broken pipe, number: 32
2025-01-10 15:12:45.654 23164-24877 librs com.gather.terminal W control_transfer returned error, index: 1, error: Broken pipe, number: 32
2025-01-10 15:12:45.656 23164-23164 librs com.gather.terminal E Probe-commit control transfer failed with error: RS2_USB_STATUS_OTHER
2025-01-10 15:12:45.669 23164-23164 librs com.gather.terminal E [rs2_pipeline_start_with_config( pipe:0x7273c6d1b0, config:0x7273c86fb0 ) Invalid Value]
Failed to resolve the request:
Format: Z16, width: 1280, height: 720

                                                                                                Into:
                                                                                                	Formats: 
                                                                                                	 Z16

@MartyG-RealSense
Copy link
Collaborator

You said that 640x480 works. What about 848x480 please?

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

No branches or pull requests

2 participants