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:
IltmmMediaInfo::get_Description
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:
IltmmMediaInfo::get_SourceFilter
IltmmMediaInfo::get_SourceFilterClassID
IltmmMediaInfo::get_SourceFilterDispatch
IltmmMediaInfo::get_SourceFormat
IltmmMediaInfo::get_SourceFormatName
IltmmMediaInfo::get_SourceMediaType
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:
IltmmMediaInfo::get_StreamDuration
IltmmMediaInfo::get_StreamMediaType
IltmmMediaInfo::get_StreamSubtype
IltmmMediaInfo::get_StreamSubtypeName
IltmmMediaInfo::get_StreamType
IltmmMediaInfo::get_StreamTypeName
If the current stream is a video stream , the following functions can be used to obtain video information:
IltmmMediaInfo::get_VideoBitCount
IltmmMediaInfo::get_VideoBitRate
IltmmMediaInfo::get_VideoCompression
IltmmMediaInfo::get_VideoFrameRate
IltmmMediaInfo::get_VideoFrames
IltmmMediaInfo::get_VideoHeight
IltmmMediaInfo::get_VideoWidth
If the current stream is an audio stream , the following functions can be used to obtain audio information:
IltmmMediaInfo::get_AudioAvgBytesPerSec
IltmmMediaInfo::get_AudioBitsPerSample
IltmmMediaInfo::get_AudioChannels
IltmmMediaInfo::get_AudioFormatTag
IltmmMediaInfo::get_AudioSamplesPerSec
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.
Raster .NET | C API | C++ Class Library | JavaScript HTML5
Document .NET | C API | C++ Class Library | JavaScript HTML5
Medical .NET | C API | C++ Class Library | JavaScript HTML5
Medical Web Viewer .NET