The Multi Stream Target Object is accessed through the IltmmMultiStreamTarget interface and the IltmmObjectWrapper interface. For more information about the IltmmObjectWrapper Interface, refer to IltmmObjectWrapper. The IltmmMultiStreamTarget Interface lets the user set and get information about an ltmmMultiStreamTarget object.
In addition to the methods inherited from IDispatch, the IltmmMultiStreamTarget interface exposes the following functions:
IltmmMultiStreamTarget::get_StreamCount
IltmmMultiStreamTarget::put_StreamCount
IltmmMultiStreamTarget::SetAcceptedMediaType
IltmmMultiStreamTarget::GetAcceptedMediaType
IltmmMultiStreamTarget::get_TargetFormat
IltmmMultiStreamTarget::put_TargetFormat
IltmmMultiStreamTarget::GetConnectedMediaType
IltmmMultiStreamTarget::GetSample
IltmmMultiStreamTarget::WaitForSample
A multi stream target will accept samples of different media types (each stream will have its own media type). The number of streams the object can support is specified using IltmmMultiStreamTarget::put_StreamCount and retrieved using IltmmMultiStreamTarget::get_StreamCount.
The media type of each stream is set in the ltmmMediaType object, and accessed through the IltmmMediaTypeDisp Interface. Once the media type is configured using the IltmmMediaTypeDisp Interface, use IltmmMultiStreamTarget::SetAcceptedMediaType to set the media type for a specific target stream. To determine the accepted media type of some target stream, call the GetAcceptedMediaType function.
The Multi Stream Target object is intended to receive samples from either a Convert Object or a Capture Object.
Once the target for the Convert or Capture object is set, the capturing or the conversion process can be started, after which the multiple stream target can begin receiving samples.
Using the WaitForSample and the GetSample functions, the multi stream target can get delivered samples for all streams, until the end of the stream is reached. When the end of the stream is reached, the convert or capture process should be stopped.
An overview of the whole process would look like this:
Set the number of streams with IltmmMultiStreamTarget::put_StreamCount.
Set the media type for all streams using IltmmMultiStreamTarget::SetAcceptedMediaType( n, ) for each stream n (n from 0 to StreamCount - 1).
Receive samples:
Call IltmmMultiStreamTarget::WaitForSample(timeout, &stream), on return this function will fill "stream" with the index of the stream most recently having a sample to retrieve.
Call IltmmMultiStreamTarget::GetSample(stream, ) to retrieve the sample.
You might need to call IltmmMultiStreamTarget::GetConnectedMediaType(stream, ) to know the media type of the sample to retrieve (or retrieved).
For one stream only, use IltmmSampleTarget instead of IltmmMultiStreamTarget.
Win32, x64.
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document