How to Set DVR Buffer Locations on Multiple Physical Disks (C++)

The following method for C++ shows how to get the DVR Sink object from the ltmmPlayControl object and use it to set DVR buffer location settings on physical disks C: and D:.

void SetDVRBufferSettings(IltmmPlay *pPlay) 
   IUnknown *punk = NULL; 
   HRESULT hr = pPlay->GetSubObject(ltmmPlay_Object_SourceFilter, &punk); 
   if(SUCCEEDED(hr) && NULL != punk) 
      ILMDVRSink *pDvrSink; 
      hr = punk->QueryInterface(IID_ILMDVRSink, (LPVOID*)&pDvrSink); 
      if (SUCCEEDED(hr)) 
          // Tell sink we are starting to change settings  
          // Set Two locations  
         // Set folder 1 location 
         pDvrSink->put_FolderName(0, TEXT("C:\\Temp\\DVR")); 
         // Set folder 1 file count to 2, each set to 16MB max file size 
         pDvrSink->SetBufferSize(0, 2, 16384000); 
         // Set folder 2 location 
         pDvrSink->put_FolderName(0, TEXT("D:\\Temp\\DVR")); 
         // Set folder 2 file count to 4, each set to 8MB max file size 
         pDvrSink->SetBufferSize(1, 4, 8192000); 
          // Tell sink to apply the changes  
          // Release interface and free strings  

Help Version 20.0.2019.9.19
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2019 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Multimedia C API Help