The ltmmPlay object allows the user to playback multimedia files.
C Source
IltmmPlay* pPlay;
CoCreateInstance(&CLSID_ltmmPlay, NULL, CLSCTX_INPROC_SERVER, &IID_IltmmPlay, (void**) &pPlay);
C++ Source
IltmmPlay* pPlay;
CoCreateInstance(&CLSID_ltmmPlay, NULL, CLSCTX_INPROC_SERVER, &IID_IltmmPlay, (void**) &pPlay);
The function creates an instance of ltmmPlay and returns an IltmmPlay interface pointer. It is through the IltmmPlay interface that playback is controlled.
C Source
HWND hwndFrame;
IltmmPlay_put_VideoWindowFrame (pPlay, (long) hwndFrame);
C++ Source
HWND hwndFrame;
pPlay->put_VideoWindowFrame((long) hwndFrame);
The user is required to create the window that serves as the video frame. ltmmPlay will subclass this window, so there is no need to forward any messages to the ltmmPlay object. By default, ltmmPlay will automatically maximize the video within the frame window. The video will automatically resize when the frame window size changes.
C Source
BSTR bstr;
// create a string containing the source file path
bstr = SysAllocString(L"c:\\source.avi");
// assign the source file path to the play object
IltmmPlay_put_SourceFile (pPlay, bstr);
// free the string
SysFreeString(bstr);
C++ Source
BSTR bstr;
// create a string containing the source file path
bstr = SysAllocString(L"c:\\source.avi");
// assign the source file path to the play object
pPlay->put_SourceFile(bstr);
// free the string
SysFreeString(bstr);
The code above allocates a string containing an AVI file path and assigns the path to the play object with a call to put_SourceFile.
C Source
IltmmPlay_Run (pPlay);
C++ Source
pPlay->Run ();
The playback will continue until the end of the media file. It will then stop the playback and reset the video position to the start of the file.
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