Skip to content

Instantly share code, notes, and snippets.

@eddietree
Created September 22, 2014 23:56
Show Gist options
  • Save eddietree/be776b975fc26159c94f to your computer and use it in GitHub Desktop.
Save eddietree/be776b975fc26159c94f to your computer and use it in GitHub Desktop.
#include <stdio.h>
#include <tchar.h>
#include <realsense/pxcsensemanager.h>
#include <realsense/pxchandmodule.h>
#include <realsense/pxchandconfiguration.h>
#include <realsense/pxchanddata.h>
#include <assert.h>
#define ASSERT assert
int _tmain(int argc, _TCHAR* argv[])
{
pxcStatus status;
// session
PXCSession * m_session = PXCSession_Create();
ASSERT( m_session != nullptr );
// manager
//PXCSenseManager * m_sense_mngr = m_session->CreateSenseManager();
PXCSenseManager * m_sense_mngr = PXCSenseManager::CreateInstance();
ASSERT( m_sense_mngr != nullptr );
// enable streams
PXCVideoModule::DataDesc desc={};
desc.deviceInfo.streams = PXCCapture::STREAM_TYPE_COLOR | PXCCapture::STREAM_TYPE_DEPTH | PXCCapture::STREAM_TYPE_IR;
status = m_sense_mngr->EnableStreams( &desc );
ASSERT( status == pxcStatus::PXC_STATUS_NO_ERROR );
// CRASHES HERE!!!!!!!!!!!!
status = m_sense_mngr->Init();
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment