vendredi 14 juillet 2017

visionWorks render opening error

So yesterday, the program was working fine, but after I moved around some stuff (now they are commented out and not included in my program at all), I am getting this error when I open the render: [nvxio::Application::APP_EXIT_CODE_NO_RENDER] Error: Cannot open default render!

WOuld anyone know in which case I would get such an error? I tried rebooting a few times but it doesnt work

This is my code till the point that I try to create the render:

int main(int argc, char** argv){

nvxio::Application &app = nvxio::Application::get();

nvxio::FrameSource::Parameters config;
config.frameWidth = 1280;
config.frameHeight = 720;

//
// Parse command line arguments
//
cout << "here " << endl;

std::string resolution = "1280x720";

//app.setDescription("This sample captures frames from NVIDIA GStreamer     camera");
app.setDescription("This sample captures frames from ZED Mat");
app.addOption('r', "resolution", "Input frame resolution",     nvxio::OptionHandler::oneOf(&resolution,
{ "2592x1944", "2592x1458", "1280x720", "640x480" }));
app.addOption('f', "fps", "Frames per second",     nvxio::OptionHandler::unsignedInteger(&config.fps,
nvxio::ranges::atLeast(10u) & nvxio::ranges::atMost(120u)));

app.init(argc, argv);

parseResolution(resolution, config);

//
// Create OpenVX context
//

nvxio::ContextGuard context;

//
// Messages generated by the OpenVX framework will be processed by     nvxio::stdoutLogCallback
//

vxRegisterLogCallback(context, &nvxio::stdoutLogCallback, vx_false_e);

//
// Create a Render
//

std::unique_ptr<nvxio::Render> render(nvxio::createDefaultRender(
context, "cam capture", config.frameWidth, config.frameHeight));
if (!render)
{
std::cout << "Error: Cannot open default render!" << std::endl;
return nvxio::Application::APP_EXIT_CODE_NO_RENDER;
}



<....>

}

Aucun commentaire:

Enregistrer un commentaire