Using the ltmmSampleSource Object

To use the ltmmSampleSource Object perform the following steps:

  1. Create an instance of the ltmmSampleSource object, by creating an instance of the IltmmSampleSource interface.

  2. Create an ltmmMediaType object.

  3. Set the media type attributes through the IltmmMediaTypeDisp interface.

  4. Assign the media type to the source by calling the SetMediaType function.

  5. Assign the source to the ltmmConvert or ltmmPlay objects using the IltmmConvert::put_SourceObject or the IltmmPlay::put_SourceObject function.

  6. Run the object (IltmmConvert::StartConvert or IltmmPlay::Run).

  7. Feed samples until the "end of stream":

    1. Get a free sample buffer by calling the GetSampleBuffer function.
    2. Set the sample attributes and data, through the IltmmMediaSampleDisp interface.
    3. Deliver the sample to the stream by calling the DeliverSample function.
    4. Release the buffer Interface.
  8. Inform the object at the "end of stream" by calling DeliverEndOfStream.

  9. Stop the object by calling IltmmConvert::StopConvert or IltmmPlay::Stop.

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.