Software Archive
Read-only legacy content
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
17060 Discussions

CreateDevice fails for F200, but works for R200

John_M_9
Beginner
439 Views

Hi All,

The following code works with the R200, but fails to CreateDevice for the F200.

	// Create session to be able to set depth
	PXCSession *session = PXCSession::CreateInstance();

	PXCSession::ImplDesc desc = {};
	desc.group = PXCSession::IMPL_GROUP_SENSOR;
	desc.subgroup = PXCSession::IMPL_SUBGROUP_VIDEO_CAPTURE;

	PXCSession::ImplDesc desc1 = {};
	sts = session->QueryImpl(&desc, 0, &desc1);

	PXCCapture* c;
	sts = session->CreateImpl<PXCCapture>(&desc1, &c);
	if (sts<PXC_STATUS_NO_ERROR)
		return 2;
	
	pxcI32 num = c->QueryDeviceNum();

	PXCCapture::Device* dv = c->CreateDevice(0);
	if (!dv)
		return 3;

 

With the F200, everything seems fine up through CreateImpl().  It comes back with a pointer, c, and sts == PXC_STATUS_NO_ERROR.  But then num = c->QueryDeviceNum(); == 0 (where it = 1 if connected to the R200 instead).  And dv = c->CreateDevice(0); comes back NULL.

I am only connecting one camera at a time.  Both cameras work fine using the Capture Viewer, so I am sure that all drivers are installed correctly.

Does anyone have any suggestions?  Any help is greatly appreciated.

John

0 Kudos
1 Reply
Xusheng_L_Intel
Employee
439 Views

Please do not use 

sts = session->QueryImpl(&desc, 0, &desc1);

use 

sts = session->QueryImpl(&desc1,m,&desc2)

You can find detail usage @https://software.intel.com/sites/landingpage/realsense/camera-sdk/v1.1/documentation/html/manuals_enumerate_i_o_devices.html

 

0 Kudos
Reply