首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > VC/MFC >

怎么得到一个视频文件的分辨率

2012-02-20 
如何得到一个视频文件的分辨率?谢谢啊[解决办法]用DirectShow:通过IGraphBuilder得到IBasicVideo接口,调用

如何得到一个视频文件的分辨率?
谢谢啊

[解决办法]
用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.

热点排行