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);
punk->Release();
if (SUCCEEDED(hr))
{
// Tell sink we are starting to change settings
pDvrSink->StartChangingAttributes();
// Set Two locations
pDvrSink->put_FolderCount(2);
pDvrSink->put_BaseName(TEXT("Capture.LBL"));
// 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
pDvrSink->StopChangingAttributes(VARIANT_FALSE);
// Release interface and free strings
pDvrSink->Release();
}
}
}
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document
Your email has been sent to support! Someone should be in touch! If your matter is urgent please come back into chat.
Chat Hours:
Monday - Friday, 8:30am to 6pm ET
Thank you for your feedback!
Please fill out the form again to start a new chat.
All agents are currently offline.
Chat Hours:
Monday - Friday
8:30AM - 6PM EST
To contact us please fill out this form and we will contact you via email.