title: saving RGB and depth images in Intel RealSense
body: <p>I'm using SetFileName() function to save the RGB and Depth image to the specified file location. But that's not saving anything. The code runs without error, but nothing gets saved. </p>
  
  <p>Here's my code:       </p>
  
  <pre><code>void RecordORPlayback(pxcCHAR *file, pxcBool record)
  {
  // Create a SenseManager instance
   PXCSenseManager *sm=PXCSenseManager::CreateInstance();
  
   // Set file recording or playback
  sm-&gt;QueryCaptureManager()-&gt;SetFileName(file,record);
  
  // Select the color stream
  
  sm-&gt;EnableStream(PXCCapture::STREAM_TYPE_COLOR,640,480,0); 
  sm-&gt;EnableStream(PXCCapture::STREAM_TYPE_DEPTH,640,480,0);
  
  PXCImage *colorIm, *depthIm;
  // Initialize and Record 300 frames
  
  sm-&gt;Init(); 
  
   for (int i=0;i&lt;300;i++) {
  
     // This function blocks until a color sample is ready
     if (sm-&gt;AcquireFrame(true)&lt;PXC_STATUS_NO_ERROR) break; 
  
     // Retrieve the sample
  
     PXCCapture::Sample *sample=sm-&gt;QuerySample();
  
     // Work on the image sample-&gt;color
      colorIm=sample-&gt;color;
      depthIm=sample-&gt;depth;
  
     // Go fetching the next sample
     sm-&gt;ReleaseFrame();
  
   }
   // close down
  sm-&gt;Release();
  
  }
  </code></pre>
  
  <p>I have no idea how to save the output. Any suggestions?</p>