Wednesday, February 13, 2008

How can we effectly use Media Detector

Media Detector (MediaDet)
The Media Detector (MediaDet) object retrieves format information and still frames from file sources. The Media Detector does not require the Filter Graph Manager to function. To create this object, call CoCreateInstance. The class identifier is CLSID_MediaDet.
To read Windows Media™ files, the application must provide a software certificate, also called a key. Register the application as a key provider through the Media Detector's IObjectWithSite interface. For more information, see
Unlocking the Windows Media Format SDK.
The MediaDet object exposes the following interfaces:
IMediaDet
IObjectWithSite


IMediaDet Interface
The IMediaDet interface retrieves information about a media file, such as the number of streams, and the media type, duration, and frame rate of each stream. It also contains methods for retrieving individual frames from a video stream. The Media Detector (MediaDet) object exposes this interface.
To obtain information about a file using this interface, perform the following steps:
Create an instance of the MediaDet object by calling CoCreateInstance. The class ID is CLSID_MediaDet.
Call IMediaDet::put_Filename to specify the name of the source file.
Call IMediaDet::get_OutputStreams to obtain the number of output streams in the source.
Call IMediaDet::put_CurrentStream to specify a particular stream.
Call any of the following methods:
IMediaDet::get_FrameRate
IMediaDet::get_StreamLength
IMediaDet::get_StreamMediaType
IMediaDet::get_StreamType
To retrieve a video frame, call IMediaDet::GetBitmapBits or IMediaDet::WriteBitmapBits. The returned frame is always in 24-bit RGB format.
Video Thumbnail feature can also be achieved by this Media Detector.

1 comment:

BLOGGERMAN said...

HI CAN YOU PLEASE MAIL ME THE CODING FOR MPEG 4 COMPRESSION ?