Create an instance of the ltmmConvert class. This is accomplished using the Win32 CoCreateInstance function as follows:
IltmmConvert* pConvert;
CoCreateInstance(&CLSID_ltmmConvert, NULL, CLSCTX_INPROC_SERVER, &IID_IltmmConvert, (void**) &pConvert);
IltmmConvert* pConvert;
CoCreateInstance(CLSID_ltmmConvert, NULL, CLSCTX_INPROC_SERVER, IID_IltmmConvert, (void**) &pConvert);
Set the source file as follows:
BSTR bstr;
bstr = SysAllocString(L"c:\\Source.avi");
IltmmConvert_put_SourceFile(pConvert, bstr);
SysFreeString(bstr);
BSTR bstr;
bstr = SysAllocString(L"c:\\Source.avi");
pConvert->put_SourceFile(bstr);
SysFreeString(bstr);
Set the target type to DV as follows:
IltmmConvert_put_TargetFormat(pConvert, ltmmConvert_TargetFormat_dvsd);
pConvert->put_TargetFormat(ltmmConvert_TargetFormat_dvsd);
Select the first available device as follows:
IltmmTargetDevices* targetdevices;
IltmmConvert_get_TargetDevices(pConvert, &targetdevices);
IltmmTargetDevices_put_Selection(targetdevices, 0);
IUnknown_Release(targetdevices);
IltmmTargetDevices* targetdevices;
pConvert->get_TargetDevices(&targetdevices);
targetdevices->put_Selection(0);
targetdevices->Release();
You should start converting. What you have on the tape will be overwritten now, so make sure you do not have a tape inside the DV device that you do not want to record over. This is demonstrated with the following code:
IltmmVCRControl* pVCR;
IltmmConvert_get_TargetVCRControl(pConvert, &pVCR);
IltmmVCRControl_Record(pVCR);
IUnknown_Release(pVCR);
IltmmConvert_StartConvert(pConvert);
IltmmVCRControl* pVCR;
pConvert->get_TargetVCRControl(&pVCR);
pVCR->Record();
pVCR->Release();
pConvert->StartConvert();
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.