<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic You need add sm-&amp;gt;init() in Software Archive</title>
    <link>https://community.intel.com/t5/Software-Archive/Cannot-get-Device-Instance/m-p/1025780#M40065</link>
    <description>&lt;P&gt;You need add sm-&amp;gt;init() before PXCCaptureManager *cm = sm-&amp;gt;QueryCaptureManager(); Thanks!&lt;/P&gt;</description>
    <pubDate>Tue, 20 Oct 2015 20:54:32 GMT</pubDate>
    <dc:creator>Xusheng_L_Intel</dc:creator>
    <dc:date>2015-10-20T20:54:32Z</dc:date>
    <item>
      <title>Cannot get Device Instance</title>
      <link>https://community.intel.com/t5/Software-Archive/Cannot-get-Device-Instance/m-p/1025778#M40063</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;

&lt;P&gt;I have seen numerous examples of getting the device instance; looks simple enough.&amp;nbsp; However, I am getting a null return from QueryDevice().&amp;nbsp; I have tried (using c++):&lt;/P&gt;

&lt;PRE class="brush:cpp;"&gt;	// Create a PXCSenseManager instance
	PXCSenseManager *sm = PXCSenseManager::CreateInstance();
	if (!sm)
		return 1;

	// find Device Instance
	PXCCapture::Device *cp = sm-&amp;gt;QueryCaptureManager()-&amp;gt;QueryDevice();
	if (!cp)
	{
		sm-&amp;gt;Release();
		return 3;
	}
&lt;/PRE&gt;

&lt;P&gt;and&lt;/P&gt;

&lt;PRE class="brush:cpp;"&gt;	// Create a PXCSenseManager instance
	PXCSenseManager *sm = PXCSenseManager::CreateInstance();
	if (!sm)
		return 1;

	// find Capture Manager Instance
	PXCCaptureManager *cm = sm-&amp;gt;QueryCaptureManager();
	if (!cm)
	{
		sm-&amp;gt;Release();
		return 2;
	}

	// find Device Instance
	PXCCapture::Device *cp = cm-&amp;gt;QueryDevice();
	if (!cp)
	{
		sm-&amp;gt;Release();
		return 3;
	}
&lt;/PRE&gt;

&lt;P&gt;QueryCaptureManager() returns a non-NULL cm, but QueryDevice() returns a NULL for cp.&lt;/P&gt;

&lt;P&gt;Any help would be greatly appreciated.&amp;nbsp; Thanks!&lt;/P&gt;

&lt;P&gt;John&lt;/P&gt;

&lt;P&gt;.&lt;/P&gt;</description>
      <pubDate>Tue, 20 Oct 2015 18:02:28 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Cannot-get-Device-Instance/m-p/1025778#M40063</guid>
      <dc:creator>John_M_9</dc:creator>
      <dc:date>2015-10-20T18:02:28Z</dc:date>
    </item>
    <item>
      <title>Probably should have</title>
      <link>https://community.intel.com/t5/Software-Archive/Cannot-get-Device-Instance/m-p/1025779#M40064</link>
      <description>&lt;P&gt;Probably should have mentioned:&amp;nbsp; Using R200 camera with latest SDK&lt;/P&gt;</description>
      <pubDate>Tue, 20 Oct 2015 18:07:04 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Cannot-get-Device-Instance/m-p/1025779#M40064</guid>
      <dc:creator>John_M_9</dc:creator>
      <dc:date>2015-10-20T18:07:04Z</dc:date>
    </item>
    <item>
      <title>You need add sm-&gt;init()</title>
      <link>https://community.intel.com/t5/Software-Archive/Cannot-get-Device-Instance/m-p/1025780#M40065</link>
      <description>&lt;P&gt;You need add sm-&amp;gt;init() before PXCCaptureManager *cm = sm-&amp;gt;QueryCaptureManager(); Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 20 Oct 2015 20:54:32 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Cannot-get-Device-Instance/m-p/1025780#M40065</guid>
      <dc:creator>Xusheng_L_Intel</dc:creator>
      <dc:date>2015-10-20T20:54:32Z</dc:date>
    </item>
    <item>
      <title>That did it, David!  Thank</title>
      <link>https://community.intel.com/t5/Software-Archive/Cannot-get-Device-Instance/m-p/1025781#M40066</link>
      <description>&lt;P&gt;That did it, David!&amp;nbsp; Thank you very much!&lt;/P&gt;</description>
      <pubDate>Wed, 21 Oct 2015 14:25:54 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Cannot-get-Device-Instance/m-p/1025781#M40066</guid>
      <dc:creator>John_M_9</dc:creator>
      <dc:date>2015-10-21T14:25:54Z</dc:date>
    </item>
    <item>
      <title>Is it possible to get a</title>
      <link>https://community.intel.com/t5/Software-Archive/Cannot-get-Device-Instance/m-p/1025782#M40067</link>
      <description>&lt;P&gt;Is it possible to get a PXCMCapture::Device without initializing SenseManager?&lt;/P&gt;

&lt;P&gt;I want to be able to enumerate allowed stream configurations (e.g. which configurations of color+depth are possible) before calling SenseManager::init()&lt;/P&gt;

&lt;P&gt;The "Enumerating Streams" and "Enumerating Stream Configurations" sections of the SDK Documentation assume that we already have a reference to the device, but as best I can tell, the only way to get the actual Device (and not just DeviceInfo) is to initialize SenseManager, but that seems so round-about.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Nov 2015 15:32:42 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Cannot-get-Device-Instance/m-p/1025782#M40067</guid>
      <dc:creator>Aaron_S_4</dc:creator>
      <dc:date>2015-11-05T15:32:42Z</dc:date>
    </item>
    <item>
      <title>Yes, there is another option:</title>
      <link>https://community.intel.com/t5/Software-Archive/Cannot-get-Device-Instance/m-p/1025783#M40068</link>
      <description>&lt;P&gt;Yes, there is another option: create a PXCMCapture (by using &lt;SPAN class="f_CodeExample"&gt;&lt;A href="http://file:///D:/Intel%20RealSense%20SDK%20HTML%20Doc/index.html?createimpl_pxcsession.html"&gt;PXCSession&lt;/A&gt;&lt;/SPAN&gt;&lt;A href="http://file:///D:/Intel%20RealSense%20SDK%20HTML%20Doc/index.html?createimpl_pxcsession.html"&gt;&lt;SPAN class="f_CodeExample"&gt;::CreateImpl()&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN class="f_CodeExample"&gt;), then use &lt;/SPAN&gt;&lt;A href="http://file:///D:/Intel%20RealSense%20SDK%20HTML%20Doc/index.html?createdevice_pxccapture.html"&gt;PXCCapture::CreateDevice()&lt;/A&gt;.&lt;/P&gt;

&lt;P&gt;Something like this:&lt;/P&gt;

&lt;PRE class="brush:cpp;"&gt;PXCSession::ImplDesc desc={};
desc.group=PXCSession::IMPL_GROUP_SENSOR;
desc.subgroup=PXCSession::IMPL_SUBGROUP_VIDEO_CAPTURE;

for (int i=0;;i++) {
   PXCSession::ImplDesc desc1;
   if (session-&amp;gt;QueryImpl(&amp;amp;desc,i,&amp;amp;desc1)&amp;lt;PXC_STATUS_NO_ERROR) break;

   PXCCapture *capture;
   session-&amp;gt;CreateImpl&amp;lt;PXCCapture&amp;gt;(&amp;amp;desc1,&amp;amp;capture);

   for (int d=0;;d++) {
       PXCCapture::DeviceInfo dinfo;
       if (capture-&amp;gt;QueryDevice(d,&amp;amp;dinfo)&amp;lt;PXC_STATUS_NO_ERROR) break;
       
	   PXCCapture::Device *device = capture-&amp;gt;CreateDevice(d);
	   break;
   }
   capture-&amp;gt;Release();
}
&lt;/PRE&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Nov 2015 15:46:34 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Cannot-get-Device-Instance/m-p/1025783#M40068</guid>
      <dc:creator>Henning_J_</dc:creator>
      <dc:date>2015-11-05T15:46:34Z</dc:date>
    </item>
  </channel>
</rss>

