Products | Support | Send comments on this topic. | Email a link to this topic. | Back to Getting Started | Help Version 18.0.10.24
LEADTOOLS Multimedia API Help

Media File Information

Show in webframe

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_Author

IltmmMediaInfo::get_Copyright

IltmmMediaInfo::get_Description

IltmmMediaInfo::get_Rating

IltmmMediaInfo::get_Title

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.

The name for a group of related video files (called "Chapters") on your DVD. For example, for a DVD called "My Summer Vacation," you might have the titles "Water Skiing," "New Friends," and "Hiking." For each of those titles, you might have one or more different video files.

The portion of the file holding the video data. The video data might be compressed to save disk space. The data has to be decompressed using a video decompressor before you can play (see) it.

The portion of the file holding the audio data. The audio data might be compressed to save disk space. The data has to be decompressed using an audio decompressor before you can play (hear) it.

Also known as a decoder, this is a module or algorithm to decompress data.

Products | Support | Contact Us | Copyright Notices
© 2006-2014 All Rights Reserved. LEAD Technologies, Inc.