In This Topic ▼

IltmmMultiStreamSource Interface

The ltmmMultiStreamSource Object is accessed through the IltmmMultiStreamSource Interface and the IltmmObjectWrapper Interface. For more information about the IltmmObjectWrapper Interface, refer to IltmmObjectWrapper. The IltmmMultiStreamSource Interface lets the user set and get information about an ltmmMultiStreamSource object.

In addition to the methods inherited from IDispatch, the IltmmMultiStreamSource interface exposes the following functions:

Functions

IltmmMultiStreamSource::get_StreamCount

IltmmMultiStreamSource::put_StreamCount

IltmmMultiStreamSource::SetMediaType

IltmmMultiStreamSource::GetMediaType

IltmmMultiStreamSource::GetSampleBuffer

IltmmMultiStreamSource::DeliverSample

IltmmMultiStreamSource::DeliverEndOfStream

A multi stream source will provide samples having different media types (each stream will have its own media type). Each media type is set in the ltmmMediaType object, accessed through the IltmmMediaTypeDisp interface. Once the media type is set using the IltmmMediaTypeDisp Interface, the media type for each source stream is set by calling IltmmMultiStreamSource::SetMediaType and retrieved using IltmmMultiStreamSource::GetMediaType.

The Multi Stream Source object is intended for use with either a Convert Object or a Play Object. Once the source for the Convert or Play object is set, the play or the conversion process can be started, after which the multiple stream source can begin sending samples downstream. For each stream, you would do the following:

A. Obtain a free sample buffer using GetSampleBuffer.

B. Set the sample information using the IltmmMediaSampleDisp Interface, and fill the sample data.

C. Deliver the sample by calling the DeliverSample.

D. Release the buffer.

E. Continue sending samples until the end of the stream is reached.

F. Call DeliverEndOfStream for each stream.

Then stop the play or conversion process.

An overview of the whole process would look like this:

  1. Set the number of streams with IltmmMultiStreamSource::put_StreamCount.

  2. For each stream n (n from 0 to StreamCount - 1), do the following:

    1. Set the stream media type IltmmMultiStreamSource::SetMediaType(n, )

    2. Feed the samples in a loop:

      1. Obtain a free sample buffer: IltmmMultiStreamSource::GetSampleBuffer(n)

      ii. Fill the sample data

      iii. Deliver the sample: IltmmMultiStreamSource::DeliverSample(n, )

    3. After all the samples for a stream have been delivered, indicate that the end of stream has been reached: IltmmMultiStreamSource::DeliverEndOfStream(n, )

    For one stream only, use IltmmSampleSource instead of IltmmMultiStreamSource.

Platforms

Win32, x64.

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.