Each media file may contain information about the file itself, as well as multiple streams of data. To obtain information about a media file, LEADTOOLS provides the IltmmMediaInfo object/interface.
An ltmmMediaInfo object must be created externally. To set the media file for which the ltmmMediaInfo object will obtain data, call IltmmMediaInfo::put_SourceFile. IltmmMediaInfo::put_SourceFile must be called before calling other IltmmMediaInfo functions in order for a media file to be associated with the object. To determine what media file is currently associated with the object, call IltmmMediaInfo::get_SourceFile. Once a media file is associated with an IltmmMediaInfo object, information about the file and the media within that file can be obtained using several functions. General information about the title, the author of the media, the rating of the media in the file, a description, etc. can be obtained using the following functions:
In addition, information about the format of the source media file, the media type contained in the file, filters, etc. can be obtained by calling the following functions:
A source media file may contain one or more streams of data. To determine the number of available streams, call IltmmMediaInfo::get_OutputStreams. Once the number of available streams is known, this number can be used to iterate through the streams and obtain information about each one. To get information on a stream, that stream must be set as the "current" stream. This is done by calling IltmmMediaInfo::put_CurrentStream. Call IltmmMediaInfo::get_CurrentStream to get the current stream in the media file. Once the current stream is set, information on the stream type, type name, media type, duration, filter, etc. can be obtained using the following functions:
If the current stream is a video stream , the following functions can be used to obtain video information:
If the current stream is an audio stream , the following functions can be used to obtain audio information:
When the programmer has obtained all the necessary information for the current source media file, IltmmMediaInfo::ResetSource should be called to dissociate the media file from the ltmmMediaInfo object.
Medical Web Viewer .NET
.NET, Java, Android, and iOS/macOS Assemblies
C API/C++ Class Libraries