- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am trying to record the raw stream using the following C++ program from the documentation(C++ Example 17: Record or Playback Color Samples using the SenseManager)
void RecordORPlayback(pxcCHAR *file, bool record) { // Create a SenseManager instance PXCSenseManager *sm=PXCSenseManager::CreateInstance(); // Set file recording or playback sm->QueryCaptureManager()->SetFileName(file,record); // Select the color stream sm->EnableStream(PXCCapture.STREAM_TYPE_COLOR,640,480,0); // Initialize and Record 300 frames sm->Init(); for (int i=0;i<300;i++) { // This function blocks until a color sample is ready if (sm->AcquireFrame(true)<PXC_STATUS_NO_ERROR) break; // Retrieve the sample PXCCapture::Sample *sample=sm->QuerySample(); // Work on the image sample->color ... // Go fetching the next sample sm->ReleaseFrame(); } // close down sm->Release(); }
Could you please tell me how to create the file and assign it to a pxcCHAR pointer variable?
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Sumit,
You can record raw streams by directly using the above function by specifying a .rssdk file which can be viewed or edited in the clip editer sample of the sdk.
To assign the file name you simply have to mention the path in the PXCChar variable. The following code will work:
int wmain(int argc, WCHAR* argv[]) { // Create a SenseManager instance PXCPointF32 *uvmap = 0; pxcCHAR *file = L"C:\\new.rssdk"; PXCSenseManager *sm = PXCSenseManager::CreateInstance(); // Set file recording or playback sm->QueryCaptureManager()->SetFileName(file, 1); // Select the color stream sm->EnableStream(PXCCapture::STREAM_TYPE_DEPTH, 640, 480, 0); // Initialize and Record 300 frames sm->Init(); for (int i = 0; i<300; i++) { // This function blocks until a color sample is ready if (sm->AcquireFrame(true)<PXC_STATUS_NO_ERROR) break; // Retrieve the sample PXCCapture::Sample *sample = sm->QuerySample(); sm->ReleaseFrame(); } // close down sm->Release(); return 0; }
Dont forget to put the 'L' before the location as PXCChar is a whar_t. Type in the name of the new file in the location you want.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page