Perform DV (Digital Video) Capture

  1. To begin simple digital video capturing, create an instance of the ltmmCapture class. This is accomplished using the Win32 CoCreateInstance function as follows:

    C API
    IltmmCapture* pCapture; 
    CoCreateInstance(&CLSID_ltmmCapture, NULL, CLSCTX_INPROC_SERVER, &IID_IltmmCapture, (void**) &pCapture); 
    C++
    IltmmCapture* pCapture;  
    CoCreateInstance(CLSID_ltmmCapture, NULL, CLSCTX_INPROC_SERVER, IID_IltmmCapture, (void**) &pCapture); 

  2. Define video devices to be used as the capture source. The ltmmCapture object contains video device collection objects. The first video device can be selected for capture by calling the device collections put_Selection function:

    C API
    IltmmDevices* pDevices; 
    // get an interface into video devices collection 
    IltmmCapture_get_VideoDevices(pCapture, &pDevices); 
    // select the first video device 
    IltmmDevices_put_Selection (pDevices, 0); 
    // release collection 
    IUnknown_Release(pDevices); 
    C++
    IltmmDevices* pDevices;  
    // get an interface into video devices collection 
    pCapture->get_VideoDevices(&pDevices); 
    // select device 
    pDevices->put_Selection(0); 
    // release collection 
    pDevices->Release(); 

  3. Now start capturing, as demonstrated with the following code:

    C API
    // start capturing 
    IltmmCapture_StartCapture(pCapture, ltmmCapture_Mode_VideoOrAudio); 
    C++
    // start capturing 
    pCapture->StartCapture (ltmmCapture_Mode_VideoOrAudio); 

  4. At the end, stop capturing and recording, as demonstrated with the following code:

    C API
    // stop capturing 
    IltmmCapture_StopCapture(pCapture); 
    C++
    // stop capturing 
    pCapture->StopCapture (); 

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.