Output to a DV Device

  1. Create an instance of the ltmmConvert class. This is accomplished using the Win32 CoCreateInstance function as follows:

    C API
    IltmmConvert* pConvert;   
    CoCreateInstance(&CLSID_ltmmConvert, NULL, CLSCTX_INPROC_SERVER, &IID_IltmmConvert, (void**) &pConvert); 
    C++
    IltmmConvert* pConvert;   
    CoCreateInstance(CLSID_ltmmConvert, NULL, CLSCTX_INPROC_SERVER, IID_IltmmConvert, (void**) &pConvert); 

  2. Set the source file as follows:

    C API
    BSTR bstr;   
    bstr = SysAllocString(L"c:\\Source.avi");   
    IltmmConvert_put_SourceFile(pConvert, bstr);   
    SysFreeString(bstr); 
    C++
    BSTR bstr;   
    bstr = SysAllocString(L"c:\\Source.avi");   
    pConvert->put_SourceFile(bstr);    
    SysFreeString(bstr); 

  3. Set the target type to DV as follows:

    C API
    IltmmConvert_put_TargetFormat(pConvert, ltmmConvert_TargetFormat_dvsd); 
    C++
    pConvert->put_TargetFormat(ltmmConvert_TargetFormat_dvsd); 

  4. Select the first available device as follows:

    C API
    IltmmTargetDevices* targetdevices;   
    IltmmConvert_get_TargetDevices(pConvert, &targetdevices);   
    IltmmTargetDevices_put_Selection(targetdevices, 0);   
    IUnknown_Release(targetdevices);  
    C++
    IltmmTargetDevices* targetdevices;   
    pConvert->get_TargetDevices(&targetdevices);   
    targetdevices->put_Selection(0);   
    targetdevices->Release(); 

  5. 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:

    C API
    IltmmVCRControl* pVCR;   
    IltmmConvert_get_TargetVCRControl(pConvert, &pVCR);   
    IltmmVCRControl_Record(pVCR);   
    IUnknown_Release(pVCR); 
    IltmmConvert_StartConvert(pConvert); 
    C++
    IltmmVCRControl* pVCR;   
    pConvert->get_TargetVCRControl(&pVCR);   
    pVCR->Record();   
    pVCR->Release();   
    pConvert->StartConvert(); 

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

LEADTOOLS Multimedia C API Help

Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.