Hey,
I’m trying to do some development on my Xavier over SSH, using a CSI camera, Visionworks and OpenVX, and attempting to use X forwarding to view my programs output.
I am running into an issue that when connecting to the Xavier over SSH with -X or -Y.
When running my Visionworks program from the SSH session it loads correctly then I receive “Error: Cannot open source” from the following code snippet:
nvxio::Application &app = nvxio::Application::get();
ovxio::printVersionInfo();
ovxio::FrameSource::Parameters config;
std::string resolution = "1920x1080", input = "device:///nvcamera?index=0";
app.setDescription("This sample captures frames from NVIDIA GStreamer camera");
app.addOption('r', "resolution", "Input frame resolution", nvxio::OptionHandler::oneOf(&resolution,
{ "2592x1944", "2592x1458", "1920x1080", "1280x720", "640x480" }));
app.init(argc, argv);
parseResolution(resolution, config);
std::unique_ptr<ovxio::FrameSource> source(ovxio::createDefaultFrameSource(context, input));
if (!source) {
std::cout << "Error: cannot open source!" << std::endl;
return nvxio::Application::APP_EXIT_CODE_NO_RESOURCE;
}
However, when I connect to the SSH session without -X, the Visionworks code correctly connects to the CSI camera source, but fails to create the default render as there is no attached display.
std::unique_ptr<ovxio::Render> render(ovxio::createDefaultRender(
context, "OpenVX Testing", config.frameWidth, config.frameHeight));
if (!render) {
std::cout << "Error: Cannot open default render!" << std::endl;
return nvxio::Application::APP_EXIT_CODE_NO_RENDER;
}
I am assuming that the input source “device:///nvcamera” is being overwritten or changed when connecting with X forwarding, however I’m unsure as to how I would go about correcting the issue.
And I can confirm that X forwarding is functioning correctly, can work with gvim, openCV imview() etc etc
I also see the same results when attempting to load the camera stream using gstreamer:
chris@chris-desktop:~/Documents/Spec-Rite/build$ gst-launch-1.0 nvarguscamerasrc sensor-id=0 ! 'video/x-raw (memory:NVMM), width=(int)1928, height=(int)1208, framerate=30/1' ! nvvidconv flip-method=0 ! 'video/x-raw, format=(string)I420' ! xvimagesink -e
No protocol specified
nvbuf_utils: Could not get EGL display connection
Setting pipeline to PAUSED ...
No protocol specified
ERROR: Pipeline doesn't want to pause.
ERROR: from element /GstPipeline:pipeline0/GstXvImageSink:xvimagesink0: Could not initialise Xv output
Additional debug info:
xvimagesink.c(1773): gst_xv_image_sink_open (): /GstPipeline:pipeline0/GstXvImageSink:xvimagesink0:
Could not open display (null)
Setting pipeline to NULL ...
Freeing pipeline ...
I am running on 32.1.0, would upgrading help? The latest drivers for my camera are only 32.3.1.
# R32 (release), REVISION: 1.0, GCID: 14531094, BOARD: t186ref, EABI: aarch64, DATE: Wed Mar 13 07:41:08 UTC 2019
Cheers!