如何得到一个视频文件的分辨率?
谢谢啊
------解决方案--------------------用DirectShow:通过IGraphBuilder得到IBasicVideo接口,调用IBasicVideo的方法得到视频长、宽。这两个函数都是很好找的,属于一看就知道意思的那种。
------解决方案--------------------AVISTREAMINFO
The AVISTREAMINFO structure contains information for a single stream.
typedef struct {
DWORD fccType;
DWORD fccHandler;
DWORD dwFlags;
DWORD dwCaps;
WORD wPriority;
WORD wLanguage;
DWORD dwScale;
DWORD dwRate;
DWORD dwStart;
DWORD dwLength;
DWORD dwInitialFrames;
DWORD dwSuggestedBufferSize;
DWORD dwQuality;
DWORD dwSampleSize;
RECT rcFrame;
DWORD dwEditCount;
DWORD dwFormatChangeCount;
char szName[64];
} AVISTREAMINFO;
Members
fccType
Four-character code indicating the stream type. The following constants have been defined for the data commonly found in AVI streams: Constant Description
streamtypeAUDIO Indicates an audio stream.
streamtypeMIDI Indicates a MIDI stream.
streamtypeTEXT Indicates a text stream.
streamtypeVIDEO Indicates a video stream.