Products | Support | Send comments on this topic. | Email a link to this topic. | Back to Getting Started | Help Version 18.0.10.24
LEADTOOLS Multimedia API Help

Implementing an ltmmSampleTarget Object

Show in webframe

To implement the ltmmSampleTarget Object you should use the following steps:

1.

Create an instance of the ltmmSampleTarget Object, acquiring the IltmmSampleTarget Interface.

2.

Create an ltmmMediaType Object.

3.

Set the media type attributes through the IltmmMediaTypeDisp Interface.

4.

Assign the accepted media type to the target by calling the SetAcceptedMediaType function.

5.

Assign the target to the ltmmCapture or ltmmConvert objects using the IltmmCapture::put_TargetObject or IltmmConvert::put_TargetObject function.

6.

Run the object (IltmmCapture::StartCapture or IltmmConvert::StartConvert).

7.

Fetch a sample until "end of stream" or until desired amount read:

8.

Get a delivered sample by calling the GetSample function.

9.

If GetSample returned S_FALSE, then "end of stream". Otherwise, read sample data and release the sample Interface.

10.

Stop the object by calling IltmmCapture::StopCapture or IltmmConvert::StopConvert.

Products | Support | Contact Us | Copyright Notices
© 2006-2014 All Rights Reserved. LEAD Technologies, Inc.