View my account

Find out whether a pipe to a device is already started

Comments

4 comments

  • MartyX Grover

    Hi S Roy  I hope that the information in the link below will be helpful to you.

    https://github.com/IntelRealSense/librealsense/issues/2240

    0
    Comment actions Permalink
  • S Roy

    Hi MartyG,

    Thank you for the quick reply. I'm aware that I can use "try catch" to find out whether a pipe to a device is already started. But my problem is that I'm using the Intel RealSense API in an MFC application. It means that the only time I can start a pipe to a device is at initialization time. After that, any attempt to start a pipe will result in an exception even when no pipe to the device is already started. As a consequence, I cannot use "try catch". Therefore, I wondered if there was a flag that informs whether a device is already busy. 

    Best regards,
    Sylvain

    0
    Comment actions Permalink
  • MartyX Grover

    The RealSense SDK Manager advised in August 2019 that there was no function in the API for checking if a camera was busy and that catch should try to be used, or some mechanism placed  in your own application.  I researched the subject but could not find anything that updates that advice since then.

    https://github.com/IntelRealSense/librealsense/issues/4672#issuecomment-522915133

    It is possible that a function within the rs2::config class, such as can_resolve(), could provide a means of checking whether a request to the pipeline can be completed successfully.

    https://intelrealsense.github.io/librealsense/doxygen/classrs2_1_1config.html

    0
    Comment actions Permalink
  • S Roy

    Hi MartyG,

    Thank you, I will look into that. 
    That was usefull!

    Best regards,
    Sylvain

    0
    Comment actions Permalink

Please sign in to leave a comment.